mirror of https://github.com/OpenTTD/OpenTTD
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
useful if you for some reason got a libpng-config, which is called something elserelease/0.4.5
parent
4754dad0d6
commit
1a96770d81
12
Makefile
12
Makefile
|
@ -149,6 +149,10 @@ else
|
||||||
CONFIG_INCLUDED:=1
|
CONFIG_INCLUDED:=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifndef LIBPNG-CONFIG
|
||||||
|
LIBPNG-CONFIG :=libpng-config
|
||||||
|
endif
|
||||||
|
|
||||||
# updates Makefile.config if it's outdated
|
# updates Makefile.config if it's outdated
|
||||||
ifneq ($(MAKEFILE_VERSION),$(CONFIG_VERSION))
|
ifneq ($(MAKEFILE_VERSION),$(CONFIG_VERSION))
|
||||||
ifndef MANUAL_CONFIG # manual config should not check this
|
ifndef MANUAL_CONFIG # manual config should not check this
|
||||||
|
@ -461,19 +465,19 @@ endif
|
||||||
# libpng config
|
# libpng config
|
||||||
ifdef WITH_PNG
|
ifdef WITH_PNG
|
||||||
CDEFS += -DWITH_PNG
|
CDEFS += -DWITH_PNG
|
||||||
CFLAGS += $(shell libpng-config --cflags)
|
CFLAGS += $(shell $(LIBPNG-CONFIG) --cflags)
|
||||||
|
|
||||||
# seems like older libpng versions are broken and need this
|
# seems like older libpng versions are broken and need this
|
||||||
PNGCONFIG_FLAGS = --ldflags --libs
|
PNGCONFIG_FLAGS = --ldflags --libs
|
||||||
ifdef STATIC
|
ifdef STATIC
|
||||||
ifdef OSX
|
ifdef OSX
|
||||||
# Seems like we need a tiny hack for OSX static to work
|
# Seems like we need a tiny hack for OSX static to work
|
||||||
LIBS += $(shell libpng-config --prefix)/lib/libpng.a
|
LIBS += $(shell $(LIBPNG-CONFIG) --prefix)/lib/libpng.a
|
||||||
else
|
else
|
||||||
LIBS += $(shell libpng-config --static $(PNGCONFIG_FLAGS))
|
LIBS += $(shell $(LIBPNG-CONFIG) --static $(PNGCONFIG_FLAGS))
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
LIBS += $(shell libpng-config --L_opts $(PNGCONFIG_FLAGS))
|
LIBS += $(shell $(LIBPNG-CONFIG) --L_opts $(PNGCONFIG_FLAGS))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,7 @@ $(MAKE_CONFIG):
|
||||||
|
|
||||||
$(call CONFIG_LINE,\# misc)
|
$(call CONFIG_LINE,\# misc)
|
||||||
$(call CONFIG_LINE,SDL-CONFIG:=$(SDL-CONFIG))
|
$(call CONFIG_LINE,SDL-CONFIG:=$(SDL-CONFIG))
|
||||||
|
$(call CONFIG_LINE,LIBPNG-CONFIG:=$(LIBPNG-CONFIG))
|
||||||
$(call CONFIG_LINE,BEOS_NET_SERVER:=$(BEOS_NET_SERVER))
|
$(call CONFIG_LINE,BEOS_NET_SERVER:=$(BEOS_NET_SERVER))
|
||||||
$(call CONFIG_LINE,CONFIG_INCLUDED:=yes)
|
$(call CONFIG_LINE,CONFIG_INCLUDED:=yes)
|
||||||
$(call CONFIG_LINE,PATH_SET:=$(PATH_SET))
|
$(call CONFIG_LINE,PATH_SET:=$(PATH_SET))
|
||||||
|
|
|
@ -66,7 +66,7 @@ WITH_NETWORK:=1
|
||||||
WITH_SDL:=$(shell $(SDL-CONFIG) --version 2>/dev/null)
|
WITH_SDL:=$(shell $(SDL-CONFIG) --version 2>/dev/null)
|
||||||
|
|
||||||
# libpng detection
|
# libpng detection
|
||||||
WITH_PNG:=$(shell libpng-config --version 2>/dev/null)
|
WITH_PNG:=$(shell $(LIBPNG-CONFIG) --version 2>/dev/null)
|
||||||
|
|
||||||
ifdef WITH_PNG
|
ifdef WITH_PNG
|
||||||
# LibPNG depends on Zlib
|
# LibPNG depends on Zlib
|
||||||
|
|
Loading…
Reference in New Issue