The International Simutrans Forum

Development => Bug Reports => Topic started by: captain crunch on May 21, 2018, 12:37:50 AM

Title: [r8449] - Does not build without miniupnp
Post by: captain crunch on May 21, 2018, 12:37:50 AM
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:
Code: [Select]
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
Title: Re: [r8449] - Does not build without miniupnp
Post by: prissi on May 21, 2018, 03:40:46 AM
Ok that needs to be changed.Thanks for spotting.