Skip to content

Commit 02f5a5e

Browse files
committed
build: remove --enable-natpmp-default from configure
1 parent 25a0e8b commit 02f5a5e

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

configure.ac

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,6 @@ AC_ARG_WITH([natpmp],
175175
[use_natpmp=$withval],
176176
[use_natpmp=auto])
177177

178-
AC_ARG_ENABLE([natpmp-default],
179-
[AS_HELP_STRING([--enable-natpmp-default],
180-
[if NAT-PMP is enabled, turn it on at startup (default is no)])],
181-
[use_natpmp_default=$enableval],
182-
[use_natpmp_default=no])
183-
184178
AC_ARG_ENABLE(tests,
185179
AS_HELP_STRING([--disable-tests],[do not compile tests (default is to compile)]),
186180
[use_tests=$enableval],
@@ -1793,15 +1787,8 @@ if test "$have_natpmp" = "no"; then
17931787
else
17941788
if test "$use_natpmp" != "no"; then
17951789
AC_MSG_RESULT([yes])
1796-
AC_MSG_CHECKING([whether to build with NAT-PMP enabled by default])
17971790
use_natpmp=yes
1798-
natpmp_setting=0
1799-
if test "$use_natpmp_default" != "no"; then
1800-
use_natpmp_default=yes
1801-
natpmp_setting=1
1802-
fi
1803-
AC_MSG_RESULT($use_natpmp_default)
1804-
AC_DEFINE_UNQUOTED([USE_NATPMP], [$natpmp_setting], [NAT-PMP support not compiled if undefined, otherwise value (0 or 1) determines default state])
1791+
AC_DEFINE([USE_NATPMP], [1], [Define to 1 if UPnP support should be compiled in.])
18051792
if test "$TARGET_OS" = "windows"; then
18061793
NATPMP_CPPFLAGS="$NATPMP_CPPFLAGS -DSTATICLIB -DNATPMP_STATICLIB"
18071794
fi

doc/build-unix.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ executables, which are based on BerkeleyDB 4.8. If you do not care about wallet
7272

7373
To build Bitcoin Core without wallet, see [*Disable-wallet mode*](#disable-wallet-mode)
7474

75-
Optional port mapping libraries (see: `--with-miniupnpc`, `--enable-upnp-default`, and `--with-natpmp`, `--enable-natpmp-default`):
75+
Optional port mapping libraries (see: `--with-miniupnpc`, `--enable-upnp-default`, and `--with-natpmp`):
7676

7777
sudo apt install libminiupnpc-dev libnatpmp-dev
7878

@@ -133,7 +133,7 @@ pass `--with-incompatible-bdb` to configure. Otherwise, you can build Berkeley D
133133

134134
To build Bitcoin Core without wallet, see [*Disable-wallet mode*](#disable-wallet-mode)
135135

136-
Optional port mapping libraries (see: `--with-miniupnpc`, `--enable-upnp-default`, and `--with-natpmp`, `--enable-natpmp-default`):
136+
Optional port mapping libraries (see: `--with-miniupnpc`, `--enable-upnp-default`, and `--with-natpmp`):
137137

138138
sudo dnf install miniupnpc-devel libnatpmp-devel
139139

@@ -187,11 +187,7 @@ libnatpmp
187187

188188
[libnatpmp](https://miniupnp.tuxfamily.org/libnatpmp.html) may be used for NAT-PMP port mapping. It can be downloaded
189189
from [here](https://miniupnp.tuxfamily.org/files/). NAT-PMP support is compiled in and
190-
turned off by default. See the configure options for NAT-PMP behavior desired:
191-
192-
--without-natpmp No NAT-PMP support, libnatpmp not required
193-
--disable-natpmp-default (the default) NAT-PMP support turned off by default at runtime
194-
--enable-natpmp-default NAT-PMP support turned on by default at runtime
190+
turned off by default.
195191

196192
Berkeley DB
197193
-----------

0 commit comments

Comments
 (0)