makefiledir/Makefile.libdetection
changeset 3389 56f72f7838cc
parent 3380 2d02cfdf6d14
child 3406 ee3af0f1932b
--- a/makefiledir/Makefile.libdetection	Fri Mar 31 09:09:26 2006 +0000
+++ b/makefiledir/Makefile.libdetection	Fri Mar 31 10:04:18 2006 +0000
@@ -81,8 +81,8 @@
 WITH_PNG:=$(shell $(LIBPNG-CONFIG) --version 2>/dev/null)
 
 ifdef WITH_PNG
-# LibPNG depends on Zlib
-WITH_ZLIB:=1
+	# LibPNG depends on Zlib
+	WITH_ZLIB:=1
 else
 # We go looking for zlib with a little hack
 WITH_ZLIB:=$(shell ls /usr/include | grep "zlib.h" 2>/dev/null) \
@@ -92,6 +92,22 @@
 endif
 endif
 
+ifdef WITH_ZLIB
+	TEMP:=$(shell ls /lib 2>/dev/null | grep "zlib.a")$(shell ls /lib 2>/dev/null | grep "libz.a")
+	ifdef TEMP
+		STATIC_ZLIB_PATH:=/lib/$(TEMP)
+	else
+		TEMP:=$(shell ls /usr/lib 2>/dev/null | grep "zlib.a")$(shell ls /usr/lib 2>/dev/null | grep "libz.a")
+		ifdef TEMP
+			STATIC_ZLIB_PATH:=/usr/lib/$(TEMP)
+		else
+			TEMP:=$(shell ls /usr/local/lib 2>/dev/null | grep "zlib.a")$(shell ls /usr/local/lib 2>/dev/null | grep "libz.a")
+			ifdef TEMP
+				STATIC_ZLIB_PATH:=/usr/local/lib/$(TEMP)
+			endif
+		endif
+	endif
+endif
 
 # sets the default paths
 ifdef UNIX