aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-03-03 21:19:09 +0800
committerfanquake <fanquake@gmail.com>2021-03-04 12:34:46 +0800
commit7af25024e9563241c72797d4eeabdf660e548f53 (patch)
tree93da9031608d7ed67eb7fe43cfba022afb3497b3 /configure.ac
parentee35745754075d862e1855c77b20a09b260cce75 (diff)
downloadbitcoin-7af25024e9563241c72797d4eeabdf660e548f53.tar.xz
build: compile libnatpmp with -DNATPMP_STATICLIB on Windows
This fixes linking issues and mirrors what we do with miniupnpc.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c5bc7ebc7f..391a75eeed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1669,6 +1669,9 @@ else
fi
AC_MSG_RESULT($use_natpmp_default)
AC_DEFINE_UNQUOTED([USE_NATPMP], [$natpmp_setting], [NAT-PMP support not compiled if undefined, otherwise value (0 or 1) determines default state])
+ if test x$TARGET_OS = xwindows; then
+ NATPMP_CPPFLAGS="-DSTATICLIB -DNATPMP_STATICLIB"
+ fi
else
AC_MSG_RESULT([no])
fi
@@ -1826,6 +1829,7 @@ AC_SUBST(SQLITE_LIBS)
AC_SUBST(TESTDEFS)
AC_SUBST(MINIUPNPC_CPPFLAGS)
AC_SUBST(MINIUPNPC_LIBS)
+AC_SUBST(NATPMP_CPPFLAGS)
AC_SUBST(NATPMP_LIBS)
AC_SUBST(EVENT_LIBS)
AC_SUBST(EVENT_PTHREADS_LIBS)