Skip to content

Commit 714cdec

Browse files
committed
build: Pass BOOST_CPPFLAGS to sleep implementation test
Makes sure that `-pthread` and other flags required for boost compilation are passed.
1 parent 0d40f5a commit 714cdec

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

configure.ac

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ BOOST_CHRONO_LIB="$BOOST_CHRONO_LIB $BOOST_CHRONO_EXTRALIBS"
378378

379379
TEMP_LIBS="$LIBS"
380380
LIBS="$LIBS $BOOST_LIBS $BOOST_CHRONO_LIB"
381+
TEMP_CPPFLAGS="$CPPFLAGS"
382+
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
381383
AC_TRY_LINK([
382384
#include <boost/thread/thread.hpp>
383385
#include <boost/version.hpp>
@@ -392,11 +394,14 @@ AC_TRY_LINK([
392394
AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])],
393395
[boost_sleep=no])
394396
LIBS="$TEMP_LIBS"
397+
CPPFLAGS="$TEMP_CPPFLAGS"
395398
fi
396399

397400
if test x$boost_sleep != xyes; then
398401
TEMP_LIBS="$LIBS"
399402
LIBS="$LIBS $BOOST_LIBS"
403+
TEMP_CPPFLAGS="$CPPFLAGS"
404+
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
400405
AC_TRY_LINK([
401406
#include <boost/version.hpp>
402407
#include <boost/thread.hpp>
@@ -411,6 +416,7 @@ AC_TRY_LINK([
411416
[boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])],
412417
[boost_sleep=no])
413418
LIBS="$TEMP_LIBS"
419+
CPPFLAGS="$TEMP_CPPFLAGS"
414420
fi
415421

416422
if test x$boost_sleep != xyes; then

0 commit comments

Comments
 (0)