@@ -213,7 +213,7 @@ AC_ARG_ENABLE([bip70],
213
213
[ AS_HELP_STRING ( [ --disable-bip70] ,
214
214
[ disable BIP70 (payment protocol) support in GUI (enabled by default)] ) ] ,
215
215
[ enable_bip70=$enableval] ,
216
- [ enable_bip70=yes ] )
216
+ [ enable_bip70=auto ] )
217
217
218
218
AC_ARG_WITH ( [ protoc-bindir] ,[ AS_HELP_STRING ( [ --with-protoc-bindir=BIN_DIR] ,[ specify protoc bin path] ) ] , [ protoc_bin_path=$withval] , [ ] )
219
219
@@ -1088,7 +1088,7 @@ if test x$use_pkgconfig = xyes; then
1088
1088
PKG_CHECK_MODULES([ SSL] , [ libssl] ,, [ AC_MSG_ERROR ( openssl not found. ) ] )
1089
1089
PKG_CHECK_MODULES([ CRYPTO] , [ libcrypto] ,,[ AC_MSG_ERROR ( libcrypto not found. ) ] )
1090
1090
if test x$enable_bip70 != xno; then
1091
- BITCOIN_QT_CHECK([ PKG_CHECK_MODULES([ PROTOBUF] , [ protobuf] , [ have_protobuf=yes] , [ BITCOIN_QT_FAIL(libprotobuf not found) ] )] )
1091
+ BITCOIN_QT_CHECK([ PKG_CHECK_MODULES([ PROTOBUF] , [ protobuf] , [ have_protobuf=yes] , [ have_protobuf=no ] )] )
1092
1092
fi
1093
1093
if test x$use_qr != xno; then
1094
1094
BITCOIN_QT_CHECK([ PKG_CHECK_MODULES([ QR] , [ libqrencode] , [ have_qrencode=yes] , [ have_qrencode=no] )] )
@@ -1150,7 +1150,7 @@ else
1150
1150
fi
1151
1151
1152
1152
if test x$enable_bip70 != xno; then
1153
- BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ protobuf] ,[ main] ,[ PROTOBUF_LIBS=-lprotobuf] , BITCOIN_QT_FAIL ( libprotobuf not found ) ) )
1153
+ BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ protobuf] ,[ main] ,[ PROTOBUF_LIBS=-lprotobuf] , [ have_protobuf=no ] ) )
1154
1154
fi
1155
1155
if test x$use_qr != xno; then
1156
1156
BITCOIN_QT_CHECK([ AC_CHECK_LIB ( [ qrencode] , [ main] ,[ QR_LIBS=-lqrencode] , [ have_qrencode=no] ) ] )
@@ -1229,8 +1229,10 @@ AM_CONDITIONAL([EMBEDDED_UNIVALUE],[test x$need_bundled_univalue = xyes])
1229
1229
AC_SUBST ( UNIVALUE_CFLAGS )
1230
1230
AC_SUBST ( UNIVALUE_LIBS )
1231
1231
1232
- if test x$enable_bip70 != xno; then
1233
- BITCOIN_QT_PATH_PROGS([ PROTOC] , [ protoc] ,$protoc_bin_path)
1232
+
1233
+ if test x$have_protobuf != xno &&
1234
+ test x$enable_bip70 != xno; then
1235
+ BITCOIN_QT_PATH_PROGS([ PROTOC] , [ protoc] ,$protoc_bin_path)
1234
1236
fi
1235
1237
1236
1238
AC_MSG_CHECKING ( [ whether to build bitcoind] )
@@ -1351,12 +1353,20 @@ if test x$bitcoin_enable_qt != xno; then
1351
1353
fi
1352
1354
1353
1355
AC_MSG_CHECKING ( [ whether to build BIP70 support] )
1354
- if test x$enable_bip70 != xno; then
1355
- AC_DEFINE ( [ ENABLE_BIP70] ,[ 1] ,[ Define if BIP70 support should be compiled in] )
1356
- enable_bip70=yes
1357
- AC_MSG_RESULT ( [ yes] )
1356
+ if test x$have_protobuf = xno; then
1357
+ if test x$enable_bip70 = xyes; then
1358
+ AC_MSG_ERROR ( protobuf missing )
1359
+ fi
1360
+ enable_bip70=no
1361
+ AC_MSG_RESULT ( no )
1358
1362
else
1359
- AC_MSG_RESULT ( [ no] )
1363
+ if test x$enable_bip70 != xno; then
1364
+ AC_DEFINE ( [ ENABLE_BIP70] ,[ 1] ,[ Define if BIP70 support should be compiled in] )
1365
+ enable_bip70=yes
1366
+ AC_MSG_RESULT ( [ yes] )
1367
+ else
1368
+ AC_MSG_RESULT ( [ no] )
1369
+ fi
1360
1370
fi
1361
1371
fi
1362
1372
0 commit comments