1 dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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
21 # Check existence of Test recorder sources and libraries.
22 # Set ENABLE_TESTRECORDER to yes|no
24 # Author : Margarita KARPUNINA (OCN, 2008)
27 AC_DEFUN([CHECK_TESTRECORDER],[
29 AC_ARG_WITH(testrecorder,
30 [ --with-testrecorder=DIR root directory path of TestRecorder installation],
32 [with_testrecorder=no])
34 AS_IF([test "x$with_testrecorder" != xno || test "$with_testrecorder" != "no"],[
37 echo ---------------------------------------------
38 echo Testing TestRecorder
39 echo ---------------------------------------------
42 AC_REQUIRE([CHECK_QT])dnl
43 AC_REQUIRE([AC_PROG_CXX])dnl
44 AC_REQUIRE([AC_PROG_CXXCPP])dnl
46 AC_CHECKING(for TestRecorder product)
51 TESTRECORDER_INCLUDES=""
53 ENABLE_TESTRECORDER="no"
57 if test "$with_testrecorder" == "yes" || test "$with_testrecorder" == "auto"; then
60 TESTRECORDER_HOME="$with_testrecorder"
63 if test "$TESTRECORDER_HOME" == "" ; then
64 if test "x$TESTRECORDERHOME" != "x" ; then
65 TESTRECORDER_HOME=$TESTRECORDERHOME
69 if test "x$TESTRECORDER_HOME" != "x"; then
70 TESTRECORDER_INCLUDES="-I$TESTRECORDER_HOME/include"
71 TESTRECORDER_LIBS="-L$TESTRECORDER_HOME/lib -lTestRecorder"
73 CPPFLAGS_old="$CPPFLAGS"
74 CXXFLAGS_old="$CXXFLAGS"
75 CPPFLAGS="$TESTRECORDER_INCLUDES $QT_INLCUDES $CPPFLAGS"
76 CXXFLAGS="$TESTRECORDER_INCLUDES $QT_INCLUDES $CXXFLAGS"
78 AC_MSG_CHECKING(for TestRecorder header file)
80 AC_CHECK_HEADER(TestApplication.h,TestRecorder_ok=yes,TestRecorder_ok=no)
82 if test "x$TestRecorder_ok" == "xyes"; then
84 AC_MSG_CHECKING(for TestRecorder library)
86 LDFLAGS_old="$LDFLAGS"
87 LDFLAGS="-L. -$TESTRECORDER_LIBS $QT_LIBS $LDFLAGS"
90 #include "TestApplication.h",
92 TestRecorder_ok=yes,TestRecorder_ok=no
95 LDFLAGS="$LDFLAGS_old"
97 AC_MSG_RESULT($TestRecorder_ok)
100 CPPFLAGS="$CPPFLAGS_old"
101 CXXFLAGS="$CXXFLAGS_old"
105 if test "x$TestRecorder_ok" == xno ; then
106 AC_MSG_RESULT(for TestRecorder: no)
107 AC_MSG_WARN(TestRecorder is not found or not properly installed)
109 AC_MSG_RESULT(for TestRecorder: yes)
110 ENABLE_TESTRECORDER="yes"
113 AC_SUBST(TESTRECORDER_INCLUDES)
114 AC_SUBST(TESTRECORDER_LIBS)