From 9e7882ec96eecee3fabb66d861e69c6fd4bb8bf8 Mon Sep 17 00:00:00 2001 From: orbea Date: Mon, 25 Dec 2017 20:45:17 -0800 Subject: [PATCH] Makefile.common: Clean up the miniupnpc check --- Makefile.common | 39 ++++++++++++++++++--------------------- qb/config.libs.sh | 6 +----- 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/Makefile.common b/Makefile.common index e342c9ef7e..44179f2dcc 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1525,27 +1525,24 @@ ifeq ($(HAVE_NETWORKING), 1) cores/libretro-net-retropad/net_retropad_core.o endif - ifeq ($(HAVE_MINIUPNPC), 1) - ifeq ($(HAVE_BUILTINMINIUPNPC), 1) - DEFINES += -DHAVE_BUILTINMINIUPNPC -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR - DEFINES += -I$(DEPS_DIR) - OBJ += \ - $(DEPS_DIR)/miniupnpc/igd_desc_parse.o \ - $(DEPS_DIR)/miniupnpc/upnpreplyparse.o \ - $(DEPS_DIR)/miniupnpc/upnpcommands.o \ - $(DEPS_DIR)/miniupnpc/upnperrors.o \ - $(DEPS_DIR)/miniupnpc/connecthostport.o \ - $(DEPS_DIR)/miniupnpc/portlistingparse.o \ - $(DEPS_DIR)/miniupnpc/receivedata.o \ - $(DEPS_DIR)/miniupnpc/upnpdev.o \ - $(DEPS_DIR)/miniupnpc/minissdpc.o \ - $(DEPS_DIR)/miniupnpc/miniwget.o \ - $(DEPS_DIR)/miniupnpc/miniupnpc.o \ - $(DEPS_DIR)/miniupnpc/minixml.o \ - $(DEPS_DIR)/miniupnpc/minisoap.o - else - LIBS += $(MINIUPNPC_LIBS) - endif + ifeq ($(HAVE_BUILTINMINIUPNPC), 1) + DEFINES += -DHAVE_BUILTINMINIUPNPC -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR + DEFINES += -I$(DEPS_DIR) + OBJ += $(DEPS_DIR)/miniupnpc/igd_desc_parse.o \ + $(DEPS_DIR)/miniupnpc/upnpreplyparse.o \ + $(DEPS_DIR)/miniupnpc/upnpcommands.o \ + $(DEPS_DIR)/miniupnpc/upnperrors.o \ + $(DEPS_DIR)/miniupnpc/connecthostport.o \ + $(DEPS_DIR)/miniupnpc/portlistingparse.o \ + $(DEPS_DIR)/miniupnpc/receivedata.o \ + $(DEPS_DIR)/miniupnpc/upnpdev.o \ + $(DEPS_DIR)/miniupnpc/minissdpc.o \ + $(DEPS_DIR)/miniupnpc/miniwget.o \ + $(DEPS_DIR)/miniupnpc/miniupnpc.o \ + $(DEPS_DIR)/miniupnpc/minixml.o \ + $(DEPS_DIR)/miniupnpc/minisoap.o + else ifeq ($(HAVE_MINIUPNPC), 1) + LIBS += $(MINIUPNPC_LIBS) endif endif diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 615c36853c..5f9c731c21 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -195,13 +195,9 @@ if [ "$HAVE_NETWORKING" = 'yes' ]; then HAVE_NETWORK_CMD=yes HAVE_NETWORKGAMEPAD=yes - if [ "$HAVE_MINIUPNPC" != "no" ]; then + if [ "$HAVE_BUILTINMINIUPNPC" != "yes" ]; then check_lib '' MINIUPNPC "-lminiupnpc" fi - - if [ "$HAVE_BUILTINMINIUPNPC" = "yes" ]; then - HAVE_MINIUPNPC='yes' - fi else die : 'Warning: All networking features have been disabled.' HAVE_KEYMAPPER='no'