Skip to content

Commit 85b4518

Browse files
Serge van den Boomgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 98ef23b commit 85b4518

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ all::
2323
# Define NO_EXPAT if you do not have expat installed. git-http-push is
2424
# not built, and you cannot push using http:// and https:// transports.
2525
#
26+
# Define EXPATDIR=/foo/bar if your expat header and library files are in
27+
# /foo/bar/include and /foo/bar/lib directories.
28+
#
2629
# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
2730
#
2831
# Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks
@@ -850,7 +853,12 @@ else
850853
endif
851854
endif
852855
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
854862
endif
855863
endif
856864

0 commit comments

Comments
 (0)