diff options
author | Adam Borowski <kilobyte@angband.pl> | 2009-11-17 15:40:10 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-11-17 16:02:42 +0100 |
commit | de82fbd153e177991e57b80fc6b9565be0bf7d27 (patch) | |
tree | 2e423e470fb4dc8ac541c648df259e3444022f42 /crawl-ref | |
parent | 3d45092b1f7e5df50d86bd3a0f9b7f5743ca761c (diff) | |
download | crawl-ref-de82fbd153e177991e57b80fc6b9565be0bf7d27.tar.gz crawl-ref-de82fbd153e177991e57b80fc6b9565be0bf7d27.zip |
Don't build against contrib lua and sqlite when system libs are available.
On Debian (and probably most others), it's a severity "Important" bug:
while not enough to get the package kicked out, this can get the Security
Team pretty angry.
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/makefile | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile index 4ccb28055e..faab50a1b3 100644 --- a/crawl-ref/source/makefile +++ b/crawl-ref/source/makefile @@ -113,6 +113,8 @@ ifdef CROSSHOST NO_AUTO_OPT = YesPlease NEED_STATIC = YesPlease CONFIGURE_FLAGS += --host=$(CROSSHOST) + BUILD_LUA = yes + BUILD_SQLITE = yes # If needed, override uname_S so we get the appropriate # things compiled. @@ -335,6 +337,23 @@ CFOPTIMIZE += $(shell util/gcc-opt.pl $(GCC)) endif endif +ifndef BUILD_LUA + ifeq (,($wildcard /usr/include/lua5.1)) + BUILD_LUA = yes + else + INCLUDES_L += -I/usr/include/lua5.1 + LIBS += -llua5.1 + endif +endif + +ifndef BUILD_SQLITE + ifeq (,($wildcard /usr/include/sqlite3.h)) + BUILD_SQLITE = yes + else + LIBS += -lsqlite3 + endif +endif + RLTILES = rltiles # @@ -673,9 +692,14 @@ ifdef BUILD_ZLIB CONTRIBS += zlib CONTRIB_LIBS += $(LIBZ) endif - -CONTRIBS += lua/src sqlite -CONTRIB_LIBS += $(LIBLUA) $(LIBSQLITE) +ifdef BUILD_LUA +CONTRIBS += lua/src +CONTRIB_LIBS += $(LIBLUA) +endif +ifdef BUILD_SQLITE +CONTRIBS += sqlite +CONTRIB_LIBS += $(LIBSQLITE) +endif EXTRA_OBJECTS += version.o @@ -880,7 +904,9 @@ $(CONTRIB_LIBS): .contrib-libs @: .contrib-libs: .cflags - +@$(MAKE) -C contrib $(CONTRIBS) +ifneq (,$(CONTRIBS)) + +@$(MAKE) -C contrib $(CONTRIBS) +endif @touch $@ $(foreach t,$(CONTRIB_LIBS),$(if $(wildcard $t),,$(shell rm -f .contrib-libs))) |