[sword-devel] test for cppunit

Daniel Glassey danglassey at ntlworld.com
Thu Jul 22 09:12:40 MST 2004


Hi,
We can add configure.ac tests for cppunit to only build the tests if it
can find cppunit.

# Locate CppUnit (minimum version 1.8.0) for testing.  
AM_PATH_CPPUNIT(1.8.0)

# You can set up an automake conditional and use it to conditionally
# build cppunit-using test programs.
AM_CONDITIONAL(HAVE_CPPUNIT, test "$CPPUNIT_LIBS")

However, this will mean that ./autogen.sh will only work if you have
cppunit installed (to get the autoconf macro).

A way to get around that is to put the cppunit.m4 into sword cvs as well
though that means keeping it uptodate if it were to change.

Opinions, preferences of people using CVS please (i.e. those who would
be affected).

Regards,
Daniel



More information about the sword-devel mailing list