Makefile: Make 'configure --with-expat=path' actually work
While the configure script sets the EXPATDIR environment variable to whatever value was passed to its option --with-expat as the prefix of the location of the expat library and headers, the Makefile ignored it. This patch fixes this bug. Signed-off-by: Serge van den Boom <svdb@stack.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Serge van den Boom committed
Jan 28, 2009 at 21:43 UTC
85b4518f44b1950918c80c32d1ede4731cb78b76
1 file changed
+9
-1
Makefile
+9
-1
@@ -23,6 +23,9 @@ all::
23
# Define NO_EXPAT if you do not have expat installed. git-http-push is
24
# not built, and you cannot push using http:// and https:// transports.
25
#
26
+# Define EXPATDIR=/foo/bar if your expat header and library files are in
27
+# /foo/bar/include and /foo/bar/lib directories.
28
+#
29
# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
30
#
31
# Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks
@@ -850,7 +853,12 @@ else
853
endif
854
endif
855
ifndef NO_EXPAT
853
- EXPAT_LIBEXPAT = -lexpat
856
+ ifdef EXPATDIR
857
+ BASIC_CFLAGS += -I$(EXPATDIR)/include
858
+ EXPAT_LIBEXPAT = -L$(EXPATDIR)/$(lib) $(CC_LD_DYNPATH)$(EXPATDIR)/$(lib) -lexpat
859
+ else
860
+ EXPAT_LIBEXPAT = -lexpat
861
+ endif
862
endif
863
endif
864