summaryrefslogtreecommitdiff
path: root/makefiledir/Makefile.libdetection
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-03-31 10:04:18 +0000
committerbjarni <bjarni@openttd.org>2006-03-31 10:04:18 +0000
commit5bbf0049365ad01540580182a2a7d851485167b3 (patch)
tree96f450213a6617748595005f55ed39649e2b08f0 /makefiledir/Makefile.libdetection
parentb34daea3f2f9a1d5d15fbd723a9ff3c13adcfdf2 (diff)
downloadopenttd-5bbf0049365ad01540580182a2a7d851485167b3.tar.xz
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
Diffstat (limited to 'makefiledir/Makefile.libdetection')
-rw-r--r--makefiledir/Makefile.libdetection20
1 files changed, 18 insertions, 2 deletions
diff --git a/makefiledir/Makefile.libdetection b/makefiledir/Makefile.libdetection
index a8859505f..ade09c076 100644
--- a/makefiledir/Makefile.libdetection
+++ b/makefiledir/Makefile.libdetection
@@ -81,8 +81,8 @@ WITH_SDL:=$(shell $(SDL-CONFIG) --version 2>/dev/null)
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 @@ WITH_ZLIB:=1
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