aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-01-15 23:29:54 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-01-16 12:45:03 +0100
commit714cdecb0398a075e80e2263a09b9fb3a4fe70ea (patch)
tree8b0adc5d3cbcb0bcea1750fd7f77da1e94ea527f
parent0d40f5a6be7bfb7e874994bf5f68dc72f86eaa6d (diff)
build: Pass BOOST_CPPFLAGS to sleep implementation test
Makes sure that `-pthread` and other flags required for boost compilation are passed.
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index fa0a6dd1f4..9e5b83f2dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -378,6 +378,8 @@ BOOST_CHRONO_LIB="$BOOST_CHRONO_LIB $BOOST_CHRONO_EXTRALIBS"
TEMP_LIBS="$LIBS"
LIBS="$LIBS $BOOST_LIBS $BOOST_CHRONO_LIB"
+TEMP_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
AC_TRY_LINK([
#include <boost/thread/thread.hpp>
#include <boost/version.hpp>
@@ -392,11 +394,14 @@ AC_TRY_LINK([
AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])],
[boost_sleep=no])
LIBS="$TEMP_LIBS"
+CPPFLAGS="$TEMP_CPPFLAGS"
fi
if test x$boost_sleep != xyes; then
TEMP_LIBS="$LIBS"
LIBS="$LIBS $BOOST_LIBS"
+TEMP_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
AC_TRY_LINK([
#include <boost/version.hpp>
#include <boost/thread.hpp>
@@ -411,6 +416,7 @@ AC_TRY_LINK([
[boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])],
[boost_sleep=no])
LIBS="$TEMP_LIBS"
+CPPFLAGS="$TEMP_CPPFLAGS"
fi
if test x$boost_sleep != xyes; then