Skip to content

Commit 23a1fa0

Browse files
author
MarcoFalke
committed
Merge #14564: Adjust configure so that only bip70 is disabled when protobuf is missing instead of the GUI
58c5cc9 Adjust configure so that only bip70 is disabled when protobuf is missing instead of the GUI (James Hilliard) Pull request description: This change ensures that the GUI is still built even if protobuf is missing unless --enable-bip70 is passed to configure. If protobuf is present bip70 support will be compiled in unless --disable-bip70 is passed. Tree-SHA512: 432d2fbefec5436503d8aa8994e4efaf760d88bfd5249af031b502b356852e8fd56362f86420f9ffe78498649079d0f1b68c327960b215d83c275800626ad275
2 parents a88bd31 + 58c5cc9 commit 23a1fa0

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

configure.ac

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ AC_ARG_ENABLE([bip70],
214214
[AS_HELP_STRING([--disable-bip70],
215215
[disable BIP70 (payment protocol) support in GUI (enabled by default)])],
216216
[enable_bip70=$enableval],
217-
[enable_bip70=yes])
217+
[enable_bip70=auto])
218218

219219
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
220220

@@ -1089,7 +1089,7 @@ if test x$use_pkgconfig = xyes; then
10891089
PKG_CHECK_MODULES([SSL], [libssl],, [AC_MSG_ERROR(openssl not found.)])
10901090
PKG_CHECK_MODULES([CRYPTO], [libcrypto],,[AC_MSG_ERROR(libcrypto not found.)])
10911091
if test x$enable_bip70 != xno; then
1092-
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([PROTOBUF], [protobuf], [have_protobuf=yes], [BITCOIN_QT_FAIL(libprotobuf not found)])])
1092+
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([PROTOBUF], [protobuf], [have_protobuf=yes], [have_protobuf=no])])
10931093
fi
10941094
if test x$use_qr != xno; then
10951095
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
@@ -1151,7 +1151,7 @@ else
11511151
fi
11521152

11531153
if test x$enable_bip70 != xno; then
1154-
BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],[PROTOBUF_LIBS=-lprotobuf], BITCOIN_QT_FAIL(libprotobuf not found)))
1154+
BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],[PROTOBUF_LIBS=-lprotobuf], [have_protobuf=no]))
11551155
fi
11561156
if test x$use_qr != xno; then
11571157
BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],[QR_LIBS=-lqrencode], [have_qrencode=no])])
@@ -1230,8 +1230,10 @@ AM_CONDITIONAL([EMBEDDED_UNIVALUE],[test x$need_bundled_univalue = xyes])
12301230
AC_SUBST(UNIVALUE_CFLAGS)
12311231
AC_SUBST(UNIVALUE_LIBS)
12321232

1233-
if test x$enable_bip70 != xno; then
1234-
BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path)
1233+
1234+
if test x$have_protobuf != xno &&
1235+
test x$enable_bip70 != xno; then
1236+
BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path)
12351237
fi
12361238

12371239
AC_MSG_CHECKING([whether to build bitcoind])
@@ -1352,12 +1354,20 @@ if test x$bitcoin_enable_qt != xno; then
13521354
fi
13531355

13541356
AC_MSG_CHECKING([whether to build BIP70 support])
1355-
if test x$enable_bip70 != xno; then
1356-
AC_DEFINE([ENABLE_BIP70],[1],[Define if BIP70 support should be compiled in])
1357-
enable_bip70=yes
1358-
AC_MSG_RESULT([yes])
1357+
if test x$have_protobuf = xno; then
1358+
if test x$enable_bip70 = xyes; then
1359+
AC_MSG_ERROR(protobuf missing)
1360+
fi
1361+
enable_bip70=no
1362+
AC_MSG_RESULT(no)
13591363
else
1360-
AC_MSG_RESULT([no])
1364+
if test x$enable_bip70 != xno; then
1365+
AC_DEFINE([ENABLE_BIP70],[1],[Define if BIP70 support should be compiled in])
1366+
enable_bip70=yes
1367+
AC_MSG_RESULT([yes])
1368+
else
1369+
AC_MSG_RESULT([no])
1370+
fi
13611371
fi
13621372
fi
13631373

0 commit comments

Comments
 (0)