[Mockpp-commits] mockpp configure.in,1.102,1.103
Brought to you by:
ewald-arnold
|
From: Ewald A. <ewa...@us...> - 2005-12-10 15:19:01
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13221 Modified Files: configure.in Log Message: enable cxxtest Index: configure.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/configure.in,v retrieving revision 1.102 retrieving revision 1.103 diff -u -d -r1.102 -r1.103 --- configure.in 9 Dec 2005 20:40:42 -0000 1.102 +++ configure.in 10 Dec 2005 15:18:52 -0000 1.103 @@ -91,10 +91,12 @@ if test x$cppunit_inc != xNO; then echo "found cppunit/TestCase.h at $cppunit_inc" EA_EXTRA_INC="$EA_EXTRA_INC -I$cppunit_inc" + AC_DEFINE(HAVE_CPPUNIT, 1, [Define if you have CppUnit installed.]) else echo "*******************************************************" - echo "*** cppunit/TestCase.h not found, continue anyway." + echo "*** cppunit/TestCase.h not found." echo "*******************************************************" + AH_TEMPLATE(HAVE_CPPUNIT, [Define if you have CppUnit installed.]) fi fi @@ -106,47 +108,10 @@ EA_EXTRA_LIB="$EA_EXTRA_LIB -L$cppunit_lib" else echo "*******************************************************" - echo "*** *cppunit.{la,so,a,dll}* not found, continue anyway." - echo "*******************************************************" -fi - -AC_MSG_CHECKING([for CppUnit compilable system]) -AC_LANG_SAVE -AC_LANG_CPLUSPLUS - -cat > conftest.$ac_ext <<EOF -#include <cppunit/extensions/TestFactoryRegistry.h> -#include <cppunit/CompilerOutputter.h> -#include <cppunit/ui/text/TestRunner.h> - -int main() -{ - CppUnit::TextUi::TestRunner runner; - runner.run(); -} -EOF - -ac_compile_link='${CXX} $CXXFLAGS $CPPFLAGS $all_includes conftest.$ac_ext -L$cppunit_lib $LIBDL -I $cppunit_inc $LIBCPPUNIT $all_libraries $LIBS' -if AC_TRY_EVAL(ac_compile_link); then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CPPUNIT, 1, [Define if you have CppUnit installed.]) -else - AH_TEMPLATE(HAVE_CPPUNIT, [Define if you have CppUnit installed.]) - echo + echo "*** *cppunit.{la,so,a,dll}* not found." echo "*******************************************************" - echo "*** Your system is not able to compile a small CppUnit application!" - echo "*** Check, if you installed the CppUnit files correctly," - echo "*** probably *cppunit.{so,a,dll}* is missing." - echo "*** For more details about this problem, look at the end of config.log." - echo "*** " - echo "*** Since CppUnit is missing, the unit tests won't be compiled." - echo "*** " - echo "*** If you have CPPUNIT installed though configure did not find" - echo "*** try setting HAVE_CPPUNIT in config.h" - echo "********************************************************" fi -AC_LANG_RESTORE AC_SUBST(LIBCPPUNIT) ]) @@ -301,6 +266,30 @@ AM_CONDITIONAL(BUILTIN_MINISTL, test x$enable_builtin_stl = xyes) dnl ------------------------------------------------------------------------ + +AC_DEFUN([EA_BUILTIN_CXXTEST], +[ +AC_ARG_ENABLE(builtin_cxxtest, [ --enable-builtin-cxxtest use built-in cxxtest (no)]) + +if test x$enable_builtin_cxxtest = xyes; then + echo "*******************************************************" + echo "** using builtin cxxtest" + echo "*******************************************************" + AC_DEFINE(MOCKPP_USE_BUILTIN_CXXTEST, 1, [Define to use built-in cxxtest.]) + EA_EXTRA_INC="$EA_EXTRA_INC -I\$(top_srcdir)/3party/cxxtest" +# EA_EXTRA_LIB="$EA_EXTRA_LIB -lmockpp_cxxtest" + AC_DEFINE(HAVE_CXXTEST, 1, [Define if you have CxxTest installed.]) +else + echo "*******************************************************" + echo "** NOT using builtin cxxtest" + echo "*******************************************************" + AH_TEMPLATE(HAVE_CXXTEST, [Define if you have CxxTest installed.]) + AH_TEMPLATE([MOCKPP_USE_BUILTIN_CXXTEST], [Define to use built-in cxxtest.]) +fi +]) +AM_CONDITIONAL(BUILTIN_CXXTEST, test x$enable_builtin_cxxtest = xyes) + +dnl ------------------------------------------------------------------------ dnl Find a file (or one of more files in a list of dirs) dnl params: filename path result(NO = none) dnl ------------------------------------------------------------------------ @@ -364,14 +353,14 @@ #include <cwchar> int main() { - std::wcscmp(0, 0); + return (int) std::wcscmp(0, 0); } EOF ac_compile_link='${CXX} $CXXFLAGS $all_includes $all_libraries $CPPFLAGS conftest.$ac_ext' if AC_TRY_EVAL(ac_compile_link); then AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STD_WCSCMP, 1, [Define if you have the std::wcscmp function.]) + AC_DEFINE(HAVE_STD_WCSCMP, 1, [Define if you have the std::wcscmp function.]) else AC_MSG_RESULT(no) fi @@ -387,15 +376,16 @@ EA_DISABLE_EXCEPTIONS EA_DISABLE_RTTI EA_BUILTIN_STL +EA_BUILTIN_CXXTEST EA_ENABLE_DOCBOOK EA_CHECK_LIBDL EA_ENABLE_DOXYGEN -EA_CHECK_LIBCPPUNIT EA_ENABLE_UNICODE EA_CHECK_MSGFMT EA_CHECK_WSTRING EA_CHECK_WCSCMP EA_CHECK_STD_WCSCMP +EA_CHECK_LIBCPPUNIT # ---------------------------------------------------------------------------- |