News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

[r8449] - Does not build without miniupnp

Started by captain crunch, May 21, 2018, 12:37:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

captain crunch

configure defines USE_UPNP = 0 in config.default when the library is not found, whereas the Makefile checks for the (non-)empty string.

(The same probably applies to the USE_FREETYPE check).

Fix:

diff --git a/Makefile b/Makefile
index cc53d6888..14f4a3ef7 100644
--- a/Makefile
+++ b/Makefile
@@ -114,7 +114,7 @@ ifdef MSG_LEVEL
   CFLAGS += -DMSG_LEVEL=$(MSG_LEVEL)
endif

-ifneq ($(USE_UPNP),)
+ifneq ($(USE_UPNP),0)
   CFLAGS  += -DUSE_UPNP
   ifeq ($(OSTYPE),mingw)
     LDFLAGS += -Wl,-Bstatic -lminiupnpc -Wl,-Bdynamic -liphlpapi


prissi

Ok that needs to be changed.Thanks for spotting.