1 dnl Copyright (C) 2006-2012 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.
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 AC_DEFUN([AC_CHECK_EXPAT],[
22 AC_CHECKING(for expat)
24 CXXFLAGS_old=$CXXFLAGS
25 CPPFLAGS_old=$CPPFLAGS
27 # Custom location of expat package can be specified
28 # through EXPAT_DIR variable
29 if test "x$EXPAT_DIR" != "x"
31 if test "x$EXPAT_DIR" = "x/usr"
33 AC_MSG_NOTICE(Trying native Expat...)
34 TMPLIBS="-lexpat $LIBS"
36 AC_MSG_NOTICE(Trying Expat from $EXPAT_DIR ...)
37 TMPLIBS="-L$EXPAT_DIR/lib -lexpat $LIBS"
38 CXXFLAGS="$CXXFLAGS -I$EXPAT_DIR/include"
39 CPPFLAGS="$CPPFLAGS -I$EXPAT_DIR/include"
40 EXPAT_INCLUDES="-I$EXPAT_DIR/include"
43 AC_MSG_NOTICE(Trying native Expat...)
44 TMPLIBS="-lexpat $LIBS"
47 AC_CHECK_HEADER(expat.h,expat_ok="yes",expat_ok="no")
49 if test "x$expat_ok" = "xyes"
53 AC_CHECK_LIB(expat,XML_ExpatVersionInfo,expat_ok="yes",expat_ok="no",)
57 if test "x$expat_ok" = "xyes"
62 AC_MSG_RESULT(for expat: $expat_ok)
64 CXXFLAGS=$CXXFLAGS_old
65 CPPFLAGS=$CPPFLAGS_old
68 AC_SUBST(EXPAT_INCLUDES)