@@ -1492,45 +1492,45 @@ if test "$use_boost" = "yes"; then
1492
1492
fi
1493
1493
1494
1494
if test "$use_external_signer" != "no"; then
1495
- case $host in
1496
- *mingw*)
1497
- dnl Boost Process uses Boost Filesystem when targeting Windows. Also,
1498
- dnl since Boost 1.71.0, Process does not work with mingw-w64 without
1499
- dnl workarounds. See 67669ab425b52a2b6be3d2f3b3b7e3939b676a2c.
1500
- if test "$use_external_signer" = "yes"; then
1501
- AC_MSG_ERROR ( [ External signing is not supported on Windows ] )
1502
- fi
1503
- use_external_signer="no";
1504
- ;;
1505
- *)
1506
- AC_MSG_CHECKING ( [ whether Boost.Process can be used ] )
1507
- TEMP_CXXFLAGS="$CXXFLAGS"
1508
- dnl Boost 1.78 requires the following workaround.
1509
- dnl See: https://github.com/boostorg/ process/issues/235
1510
- CXXFLAGS="$CXXFLAGS -Wno-error=narrowing"
1511
- TEMP_CPPFLAGS="$CPPFLAGS"
1512
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
1513
- TEMP_LDFLAGS="$LDFLAGS"
1514
- dnl Boost 1.73 and older require the following workaround.
1515
- LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
1516
- AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <boost/process.hpp> ] ] ) ] ,
1517
- [ have_boost_process="yes" ] ,
1518
- [ have_boost_process="no" ] )
1519
- LDFLAGS="$TEMP_LDFLAGS"
1520
- CPPFLAGS ="$TEMP_CPPFLAGS "
1521
- CXXFLAGS ="$TEMP_CXXFLAGS "
1522
- AC_MSG_RESULT ( [ $have_boost_process ] )
1523
- if test " $have_boost_process" = "yes"; then
1524
- use_external_signer= "yes"
1525
- AC_DEFINE ( [ ENABLE_EXTERNAL_SIGNER ] , [ 1 ] , [ Define if external signer support is enabled ] )
1526
- else
1527
- if test "$use_external_signer" = "yes"; then
1528
- AC_MSG_ERROR ( [ External signing is not supported for this Boost version ] )
1529
- fi
1530
- use_external_signer="no";
1531
- fi
1532
- ; ;
1533
- esac
1495
+ AC_MSG_CHECKING ( [ whether Boost.Process can be used ] )
1496
+ TEMP_CXXFLAGS="$CXXFLAGS"
1497
+ dnl Boost 1.78 requires the following workaround.
1498
+ dnl See: https://github.com/boostorg/process/issues/235
1499
+ CXXFLAGS="$CXXFLAGS -Wno-error=narrowing"
1500
+ TEMP_CPPFLAGS="$CPPFLAGS"
1501
+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
1502
+ TEMP_LDFLAGS="$LDFLAGS"
1503
+ dnl Boost 1.73 and older require the following workaround.
1504
+ LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
1505
+ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [
1506
+ #define BOOST_PROCESS_USE_STD_FS
1507
+ #include <boost/process.hpp>
1508
+ ] ] , [ [
1509
+ namespace bp = boost:: process;
1510
+ bp::opstream stdin_stream;
1511
+ bp::ipstream stdout_stream;
1512
+ bp::child c("dummy", bp::std_out > stdout_stream, bp::std_err > stdout_stream, bp::std_in < stdin_stream);
1513
+ stdin_stream << std::string{"test"} << std::endl;
1514
+ if (c.running()) c.terminate();
1515
+ c.wait();
1516
+ c.exit_code();
1517
+ ] ] ) ] ,
1518
+ [ have_boost_process="yes" ] ,
1519
+ [ have_boost_process="no" ] )
1520
+ LDFLAGS ="$TEMP_LDFLAGS "
1521
+ CPPFLAGS ="$TEMP_CPPFLAGS "
1522
+ CXXFLAGS="$TEMP_CXXFLAGS"
1523
+ AC_MSG_RESULT ( [ $have_boost_process] )
1524
+ if test "$have_boost_process" = "yes"; then
1525
+ use_external_signer="yes"
1526
+ AC_DEFINE ( [ ENABLE_EXTERNAL_SIGNER ] , [ 1 ] , [ Define if external signer support is enabled ] )
1527
+ AC_DEFINE ( [ BOOST_PROCESS_USE_STD_FS ] , [ 1 ] , [ Defined to avoid Boost::Process trying to use Boost Filesystem ] )
1528
+ else
1529
+ if test "$use_external_signer" = "yes"; then
1530
+ AC_MSG_ERROR ( [ External signing is not supported for this Boost version ] )
1531
+ fi
1532
+ use_external_signer="no" ;
1533
+ fi
1534
1534
fi
1535
1535
AM_CONDITIONAL([ ENABLE_EXTERNAL_SIGNER] , [ test "$use_external_signer" = "yes"] )
1536
1536
0 commit comments