The International Simutrans Forum

 

Author Topic: [r8449] - Does not build without miniupnp  (Read 215 times)

0 Members and 1 Guest are viewing this topic.

Offline captain crunch

  • *
  • Posts: 97
[r8449] - Does not build without miniupnp
« 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

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9313
  • Languages: De,EN,JP
Re: [r8449] - Does not build without miniupnp
« Reply #1 on: May 21, 2018, 03:40:46 AM »
Ok that needs to be changed.Thanks for spotting.