@matheusbsbs / matheus-bagliano / commits / bef19da9b6
Fork 0

add option to find zlib in custom path

Some systems do not provide zlib development headers and libraries in default search path of the compiler. For these systems we should allow specifying the location by --with-zlib=PATH or by setting ZLIB_PATH in the makefile. Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Robert Schiele committed Jul 29, 2007 at 20:35 UTC bef19da9b663044887ecac5ee091ca93567ef331
2 files changed +10 -1
Makefile
+7 -1
@@ -373,7 +373,7 @@ BUILTIN_OBJS = \
373 builtin-pack-refs.o
374
375 GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
376 -EXTLIBS = -lz
376 +EXTLIBS =
377
378 #
379 # Platform specific tweaks
@@ -518,6 +518,12 @@ ifndef NO_CURL
518 endif
519 endif
520
521 +ifdef ZLIB_PATH
522 + BASIC_CFLAGS += -I$(ZLIB_PATH)/include
523 + EXTLIBS += -L$(ZLIB_PATH)/lib $(CC_LD_DYNPATH)$(ZLIB_PATH)/lib
524 +endif
525 +EXTLIBS += -lz
526 +
527 ifndef NO_OPENSSL
528 OPENSSL_LIBSSL = -lssl
529 ifdef OPENSSLDIR
configure.ac
+3
@@ -75,6 +75,9 @@ GIT_ARG_SET_PATH(shell)
75 # Define PERL_PATH to provide path to Perl.
76 GIT_ARG_SET_PATH(perl)
77 #
78 +# Define ZLIB_PATH to provide path to zlib.
79 +GIT_ARG_SET_PATH(zlib)
80 +#
81 # Declare the with-tcltk/without-tcltk options.
82 AC_ARG_WITH(tcltk,
83 AS_HELP_STRING([--with-tcltk],[use Tcl/Tk GUI (default is YES)])