1 dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 dnl This library is free software; you can redistribute it and/or
7 dnl modify it under the terms of the GNU Lesser General Public
8 dnl License as published by the Free Software Foundation; either
9 dnl version 2.1 of the License.
11 dnl This library is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 dnl Lesser General Public License for more details.
16 dnl You should have received a copy of the GNU Lesser General Public
17 dnl License along with this library; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 # Check existence of Test recorder sources and libraries.
24 # Set ENABLE_TESTRECORDER to yes|no
26 # Author : Margarita KARPUNINA (OCN, 2008)
29 AC_DEFUN([CHECK_TESTRECORDER],[
31 AC_ARG_WITH(testrecorder,
32 [ --with-testrecorder=DIR root directory path of TestRecorder installation],
34 [with_testrecorder=no])
36 AS_IF([test "x$with_testrecorder" != xno || test "$with_testrecorder" != "no"],[
39 echo ---------------------------------------------
40 echo Testing TestRecorder
41 echo ---------------------------------------------
44 AC_REQUIRE([CHECK_QT])dnl
45 AC_REQUIRE([AC_PROG_CXX])dnl
46 AC_REQUIRE([AC_PROG_CXXCPP])dnl
48 AC_CHECKING(for TestRecorder product)
53 TESTRECORDER_INCLUDES=""
55 ENABLE_TESTRECORDER="no"
59 if test "$with_testrecorder" == "yes" || test "$with_testrecorder" == "auto"; then
62 TESTRECORDER_HOME="$with_testrecorder"
65 if test "$TESTRECORDER_HOME" == "" ; then
66 if test "x$TESTRECORDERHOME" != "x" ; then
67 TESTRECORDER_HOME=$TESTRECORDERHOME
71 if test "x$TESTRECORDER_HOME" != "x"; then
72 TESTRECORDER_INCLUDES="-I$TESTRECORDER_HOME/include"
73 TESTRECORDER_LIBS="-L$TESTRECORDER_HOME/lib -lTestRecorder"
75 CPPFLAGS_old="$CPPFLAGS"
76 CXXFLAGS_old="$CXXFLAGS"
77 CPPFLAGS="$TESTRECORDER_INCLUDES $QT_INLCUDES $CPPFLAGS"
78 CXXFLAGS="$TESTRECORDER_INCLUDES $QT_INCLUDES $CXXFLAGS"
80 AC_MSG_CHECKING(for TestRecorder header file)
82 AC_CHECK_HEADER(TestApplication.h,TestRecorder_ok=yes,TestRecorder_ok=no)
84 if test "x$TestRecorder_ok" == "xyes"; then
86 AC_MSG_CHECKING(for TestRecorder library)
88 LDFLAGS_old="$LDFLAGS"
89 LDFLAGS="-L. -$TESTRECORDER_LIBS $QT_LIBS $LDFLAGS"
92 #include "TestApplication.h",
94 TestRecorder_ok=yes,TestRecorder_ok=no
97 LDFLAGS="$LDFLAGS_old"
99 AC_MSG_RESULT($TestRecorder_ok)
102 CPPFLAGS="$CPPFLAGS_old"
103 CXXFLAGS="$CXXFLAGS_old"
107 if test "x$TestRecorder_ok" == xno ; then
108 AC_MSG_RESULT(for TestRecorder: no)
109 AC_MSG_WARN(TestRecorder is not found or not properly installed)
111 AC_MSG_RESULT(for TestRecorder: yes)
112 ENABLE_TESTRECORDER="yes"
115 AC_SUBST(TESTRECORDER_INCLUDES)
116 AC_SUBST(TESTRECORDER_LIBS)