@@ -750,11 +750,11 @@ case $host in
750
750
if test "$use_upnp" != "no" && $BREW list --versions miniupnpc >/dev/null; then
751
751
miniupnpc_prefix=$($BREW --prefix miniupnpc 2>/dev/null)
752
752
if test "$suppress_external_warnings" != "no"; then
753
- CORE_CPPFLAGS="$CORE_CPPFLAGS -isystem $miniupnpc_prefix/include"
753
+ MINIUPNPC_CPPFLAGS=" -isystem $miniupnpc_prefix/include"
754
754
else
755
- CORE_CPPFLAGS="$CORE_CPPFLAGS -I$miniupnpc_prefix/include"
755
+ MINIUPNPC_CPPFLAGS=" -I$miniupnpc_prefix/include"
756
756
fi
757
- CORE_LDFLAGS="$CORE_LDFLAGS -L$miniupnpc_prefix/lib"
757
+ MINIUPNPC_LIBS=" -L$miniupnpc_prefix/lib"
758
758
fi
759
759
if test "$use_natpmp" != "no" && $BREW list --versions libnatpmp >/dev/null; then
760
760
libnatpmp_prefix=$($BREW --prefix libnatpmp 2>/dev/null)
@@ -1392,9 +1392,11 @@ fi
1392
1392
1393
1393
dnl Check for libminiupnpc (optional)
1394
1394
if test "$use_upnp" != "no"; then
1395
+ TEMP_CPPFLAGS="$CPPFLAGS"
1396
+ CPPFLAGS="$CPPFLAGS $MINIUPNPC_CPPFLAGS"
1395
1397
AC_CHECK_HEADERS (
1396
1398
[ miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h] ,
1397
- [ AC_CHECK_LIB ( [ miniupnpc] , [ upnpDiscover] , [ MINIUPNPC_LIBS=-lminiupnpc] , [ have_miniupnpc=no] ) ] ,
1399
+ [ AC_CHECK_LIB ( [ miniupnpc] , [ upnpDiscover] , [ MINIUPNPC_LIBS="$MINIUPNPC_LIBS -lminiupnpc" ] , [ have_miniupnpc=no] , [ $MINIUPNPC_LIBS ] ) ] ,
1398
1400
[ have_miniupnpc=no]
1399
1401
)
1400
1402
dnl The minimum supported miniUPnPc API version is set to 10. This keeps compatibility
@@ -1417,6 +1419,7 @@ if test "$use_upnp" != "no"; then
1417
1419
have_miniupnpc=no
1418
1420
] )
1419
1421
fi
1422
+ CPPFLAGS="$TEMP_CPPFLAGS"
1420
1423
fi
1421
1424
1422
1425
dnl Check for libnatpmp (optional).
@@ -1721,7 +1724,7 @@ else
1721
1724
AC_MSG_RESULT ( [ $use_upnp_default] )
1722
1725
AC_DEFINE_UNQUOTED ( [ USE_UPNP] ,[ $upnp_setting] ,[ UPnP support not compiled if undefined, otherwise value (0 or 1) determines default state] )
1723
1726
if test "$TARGET_OS" = "windows"; then
1724
- MINIUPNPC_CPPFLAGS="-DSTATICLIB -DMINIUPNP_STATICLIB"
1727
+ MINIUPNPC_CPPFLAGS="$MINIUPNPC_CPPFLAGS -DSTATICLIB -DMINIUPNP_STATICLIB"
1725
1728
fi
1726
1729
else
1727
1730
AC_MSG_RESULT ( [ no] )
0 commit comments