summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index f8e0b956..20798aaa 100644
--- a/configure.in
+++ b/configure.in
@@ -347,6 +347,35 @@ else
AM_CONDITIONAL(HAVE_BOOST_PYTHON, false)
fi
+# check for CppUnit
+AC_CACHE_CHECK(
+ [if cppunit is available],
+ [cppunit_avail],
+ [cppunit_save_libs=$LIBS
+ LIBS="-lcppunit $LIBS"
+ AC_LANG_PUSH(C++)
+ AC_TRY_LINK(
+ [#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=true],
+ [cppunit_avail=false])
+ AC_LANG_POP
+ LIBS=$cppunit_save_libs])
+
+if [test x$cppunit_avail = xtrue ]; then
+ AM_CONDITIONAL(HAVE_CPPUNIT, true)
+else
+ AM_CONDITIONAL(HAVE_CPPUNIT, false)
+fi
+
# Check for options
AC_ARG_ENABLE(debug,
[ --enable-debug Turn on debugging],