mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
This commit is contained in:
parent
b34daea3f2
commit
5bbf004936
9
Makefile
9
Makefile
@ -417,7 +417,16 @@ endif
|
||||
# zlib config
|
||||
ifdef WITH_ZLIB
|
||||
CDEFS += -DWITH_ZLIB
|
||||
ifdef STATIC
|
||||
ifdef OSX
|
||||
# OSX links dynamically to zlib, even in static builds since it's always present in the system
|
||||
LIBS += -lz
|
||||
else
|
||||
LIBS += $(STATIC_ZLIB_PATH)
|
||||
endif
|
||||
else
|
||||
LIBS += -lz
|
||||
endif
|
||||
endif
|
||||
|
||||
# libpng config
|
||||
|
@ -67,6 +67,7 @@ $(MAKE_CONFIG):
|
||||
$(call CONFIG_LINE,WITH_ZLIB:=$(WITH_ZLIB))
|
||||
$(call CONFIG_LINE,WITH_SDL:=$(WITH_SDL))
|
||||
$(call CONFIG_LINE,WITH_PNG:=$(WITH_PNG))
|
||||
$(call CONFIG_LINE,STATIC_ZLIB_PATH:=$(STATIC_ZLIB_PATH))
|
||||
$(call CONFIG_LINE,WITH_COCOA:=$(WITH_COCOA))
|
||||
$(call CONFIG_LINE,)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user