Add compile flag to disable compilation of mining code
This commit is contained in:
17
configure.ac
17
configure.ac
@@ -82,6 +82,12 @@ AC_ARG_ENABLE([wallet],
|
||||
[enable_wallet=$enableval],
|
||||
[enable_wallet=yes])
|
||||
|
||||
AC_ARG_ENABLE([mining],
|
||||
[AS_HELP_STRING([--enable-mining],
|
||||
[enable mining (default is yes)])],
|
||||
[enable_mining=$enableval],
|
||||
[enable_mining=yes])
|
||||
|
||||
AC_ARG_WITH([miniupnpc],
|
||||
[AS_HELP_STRING([--with-miniupnpc],
|
||||
[enable UPNP (default is yes if libminiupnpc is found)])],
|
||||
@@ -790,6 +796,16 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
dnl enable mining
|
||||
AC_MSG_CHECKING([if mining should be enabled])
|
||||
if test x$enable_mining != xno; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(ENABLE_MINING, 1, [Define to 1 to enable mining functions])
|
||||
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
dnl enable upnp support
|
||||
AC_MSG_CHECKING([whether to build with support for UPnP])
|
||||
if test x$have_miniupnpc = xno; then
|
||||
@@ -881,6 +897,7 @@ AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
|
||||
AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin])
|
||||
AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
|
||||
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
|
||||
AM_CONDITIONAL([ENABLE_MINING],[test x$enable_mining = xyes])
|
||||
AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes])
|
||||
AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes])
|
||||
AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$BUILD_TEST_QT = xyes])
|
||||
|
||||
Reference in New Issue
Block a user