add option to find zlib in custom path
[gitweb.git] / Makefile
index c58a4c2a09bf7824f8d68b34d218c077f1996865..ca1247d0e4174f3700768b3941bdaa99063a1e72 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -373,7 +373,7 @@ BUILTIN_OBJS = \
        builtin-pack-refs.o
 
 GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
-EXTLIBS = -lz
+EXTLIBS =
 
 #
 # Platform specific tweaks
@@ -518,6 +518,12 @@ ifndef NO_CURL
        endif
 endif
 
+ifdef ZLIB_PATH
+       BASIC_CFLAGS += -I$(ZLIB_PATH)/include
+       EXTLIBS += -L$(ZLIB_PATH)/lib $(CC_LD_DYNPATH)$(ZLIB_PATH)/lib
+endif
+EXTLIBS += -lz
+
 ifndef NO_OPENSSL
        OPENSSL_LIBSSL = -lssl
        ifdef OPENSSLDIR