Date: Monday, January 30, 2006 @ 11:03:40
  Author: csaba
    Path: /cvsroot/carob/libmysequoia

Modified: autogen.sh (1.2 -> 1.3) configure.ac (1.1 -> 1.2)
          test/Makefile.am (1.4 -> 1.5)

Added the --enable-cppunit=yes/no to the configure script.


------------------+
 autogen.sh       |    2 +-
 configure.ac     |   30 ++++++++++++++++++++++--------
 test/Makefile.am |    4 ++++
 3 files changed, 27 insertions(+), 9 deletions(-)


Index: libmysequoia/autogen.sh
diff -u libmysequoia/autogen.sh:1.2 libmysequoia/autogen.sh:1.3
--- libmysequoia/autogen.sh:1.2 Sat Dec 17 15:44:28 2005
+++ libmysequoia/autogen.sh     Mon Jan 30 11:03:40 2006
@@ -14,4 +14,4 @@
 autoheader
 automake --add-missing
 autoconf
-CXXFLAGS="-Wall -O0 -g3" ./configure --enable-gcov
+#CXXFLAGS="-Wall -O0 -g3" ./configure --enable-gcov --enable-cppunit
Index: libmysequoia/configure.ac
diff -u libmysequoia/configure.ac:1.1 libmysequoia/configure.ac:1.2
--- libmysequoia/configure.ac:1.1       Sat Dec 17 15:03:46 2005
+++ libmysequoia/configure.ac   Mon Jan 30 11:03:40 2006
@@ -21,17 +21,31 @@
 AC_SUBST(MYSQL_CFLAGS)
 
 # Check for cppunit
-AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no)
-if test "x$CPPUNIT_CONFIG" = "xno"; then
-  AC_MSG_ERROR([You need to install the CppUnit testing package])
+AC_ARG_ENABLE(cppunit, AC_HELP_STRING([--enable-cppunit], [enable test 
excution with cppunit]))
+
+enable_tests=yes
+
+if test "x$enable_cppunit" = xno; then
+        enable_tests=no
+else
+       AC_CHECK_PROG(CPPUNIT_CONFIG, cppunit-config, yes, no)
+       if test "x$CPPUNIT_CONFIG" = "xyes"
+       then
+               CPPUNIT_LDADD="`cppunit-config --libs`"
+               CPPUNIT_CFLAGS="`cppunit-config --cflags`"
+               AC_SUBST(CPPUNIT_CFLAGS)
+               AC_SUBST(CPPUNIT_LDADD)
+       else
+               AC_MSG_ERROR([You need to install the CppUnit testing package])
+       fi
+
+       AC_CHECK_HEADER([cppunit/TestFixture.h],, enable_tests=no)
 fi
-CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
-CPPUNIT_LDADD=`$CPPUNIT_CONFIG --libs`
-AC_SUBST(CPPUNIT_CFLAGS)
-AC_SUBST(CPPUNIT_LDADD)
+
+AM_CONDITIONAL(TESTS, test x$enable_tests = xyes)
 
 # Check for lcov
-AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov],[turn on code coverage 
analysis tools]))
+AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov], [turn on code coverage 
analysis tools]))
 if test "x$enable_gcov" = "xyes";
 then
        AC_PATH_PROG(LCOV, lcov, no)
Index: libmysequoia/test/Makefile.am
diff -u libmysequoia/test/Makefile.am:1.4 libmysequoia/test/Makefile.am:1.5
--- libmysequoia/test/Makefile.am:1.4   Mon Jan  2 13:19:56 2006
+++ libmysequoia/test/Makefile.am       Mon Jan 30 11:03:40 2006
@@ -20,6 +20,8 @@
 # Makefile for LibMySequoia and tests
 #
 
+if TESTS
+
 check_PROGRAMS = runTests
 
 runTests_SOURCES = runTests.cpp \
@@ -41,3 +43,5 @@
 
 clean-local:
        rm -f *.gcno *.gcda
+
+endif

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to