From: Bart Van Assche Date: Mon, 10 Nov 2008 18:53:42 +0000 (+0000) Subject: Added configure test for Boost.Threads. X-Git-Tag: svn/VALGRIND_3_4_0~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fc6d04d97de18cc785d4bed7138c80954e101f7;p=thirdparty%2Fvalgrind.git Added configure test for Boost.Threads. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8762 --- diff --git a/configure.in b/configure.in index 317ab16956..749fffa9d4 100644 --- a/configure.in +++ b/configure.in @@ -769,6 +769,42 @@ AC_MSG_RESULT([no]) ]) +# Check whether the boost library 1.35 or later has been installed. +# The Boost.Threads library has undergone a major rewrite in version 1.35.0. + +AC_MSG_CHECKING([for boost]) + +AC_LANG(C++) +safe_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-lboost_thread-mt" + +AC_LINK_IFELSE( +[ +#include +static void thread_func(void) +{ } +int main(int argc, char** argv) +{ + boost::thread t(thread_func); + return 0; +} +], +[ +ac_have_boost_1_35=yes +AC_SUBST([BOOST_CFLAGS], []) +AC_SUBST([BOOST_LIBS], ["${CXXFLAGS}"]) +AC_MSG_RESULT([yes]) +], [ +ac_have_boost_1_35=no +AC_MSG_RESULT([no]) +]) + +CXXFLAGS=$safe_CXXFLAGS +AC_LANG(C) + +AM_CONDITIONAL([HAVE_BOOST_1_35], [test x$ac_have_boost_1_35 = xyes]) + + # does this compiler support -fopenmp, does it have the include file # and does it have libgomp ?