1 dnl Copyright (C) 2006-2019 CEA/DEN, EDF R&D
3 dnl This library is free software; you can redistribute it and/or
4 dnl modify it under the terms of the GNU Lesser General Public
5 dnl License as published by the Free Software Foundation; either
6 dnl version 2.1 of the License, or (at your option) any later version.
8 dnl This library is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 dnl Lesser General Public License for more details.
13 dnl You should have received a copy of the GNU Lesser General Public
14 dnl License along with this library; if not, write to the Free Software
15 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # Check presence of "CPPUNIT" product presence
22 # Author : Anthony GEAY (CEA, 2006)
25 AC_DEFUN([CHECK_CPPUNIT],[
26 AC_REQUIRE([AC_PROG_CC])dnl
27 AC_REQUIRE([AC_PROG_CPP])dnl
29 AC_CHECKING(for CPPUNIT)
34 [AC_HELP_STRING([--with-cppunit=DIR],[cppunit directory path where cppunit is installed])],
35 [CPPUNITINSTDIR="$withval"
36 AC_MSG_RESULT("select $withval as path to cppunit")
39 AC_SUBST(CPPUNIT_INCLUDES)
40 AC_SUBST(CPPUNIT_LIBS)
41 AC_SUBST(CPPUNIT_LIBS_DIR)
42 AC_SUBST(CPPUNITINSTDIR)
50 if test "x$CPPUNITINSTDIR" = "x"
55 LOCAL_INCLUDES="-I$CPPUNITINSTDIR/include"
56 LOCAL_LIBS_DIR="$CPPUNITINSTDIR/lib"
61 CPPFLAGS_old="$CPPFLAGS"
62 CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES"
64 AC_CHECK_HEADER(cppunit/ui/text/TestRunner.h,cppunit_ok=yes ,cppunit_ok=no)
65 CPPFLAGS="$CPPFLAGS_old"
67 if test "x$cppunit_ok" = "xyes"
69 if test "x$LOCAL_INCLUDES" = "x"
72 CPPUNIT_LIBS="-lcppunit"
75 CPPUNIT_INCLUDES="$LOCAL_INCLUDES"
76 CPPUNIT_LIBS="-L$LOCAL_LIBS_DIR -lcppunit"
77 CPPUNIT_LIBS_DIR="$LOCAL_LIBS_DIR"
80 AM_CONDITIONAL(CPPUNIT_IS_OK, [test x"$cppunit_ok" = xyes])
82 AC_MSG_RESULT(for cppunit: $cppunit_ok)