diff options
Diffstat (limited to 'tools/configure.ac')
-rw-r--r-- | tools/configure.ac | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/tools/configure.ac b/tools/configure.ac index 92a30431..028727a8 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -401,31 +401,24 @@ else AM_CONDITIONAL(HAVE_BOOST_PYTHON, false) fi -# check for CppUnit +# check for Boost.Test AC_CACHE_CHECK( - [if cppunit is available], - [cppunit_avail_cv_], - [cppunit_save_libs=$LIBS - LIBS="-lcppunit $LIBS" + [if boost_test is available], + [boost_test_avail_cv_], + [boost_test_save_libs=$LIBS + LIBS="-lboost_unit_test_framework$BOOST_SUFFIX -lboost_test_exec_monitor$BOOST_SUFFIX $LIBS" AC_LANG_PUSH(C++) AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include <cppunit/CompilerOutputter.h> - #include <cppunit/TestResult.h> - #include <cppunit/TestResultCollector.h> - #include <cppunit/TestRunner.h> - #include <cppunit/TextTestProgressListener.h> - #include <cppunit/BriefTestProgressListener.h> - #include <cppunit/XmlOutputter.h> - #include <cppunit/extensions/TestFactoryRegistry.h>]], - [[CPPUNIT_NS::TestResult controller; - CPPUNIT_NS::TestResultCollector result;]])], - [cppunit_avail_cv_=true], - [cppunit_avail_cv_=false]) + [AC_LANG_SOURCE( + [[#define BOOST_TEST_MODULE sample + #include <boost/test/unit_test.hpp> + BOOST_AUTO_TEST_CASE(test_test) {}]])], + [boost_test_avail_cv_=true], + [boost_test_avail_cv_=false]) AC_LANG_POP - LIBS=$cppunit_save_libs]) + LIBS=$boost_test_save_libs]) -AM_CONDITIONAL(HAVE_CPPUNIT, test x$cppunit_avail_cv_ = xtrue) +AM_CONDITIONAL(HAVE_BOOST_TEST, test x$boost_test_avail_cv_ = xtrue) # Checks for header files. AC_HEADER_STDC |