1 dnl Copyright (C) 2007-2022 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, or (at your option) any later version.
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 availability of Fields binary distribution
25 # Author : Nicolas REJNERI (OPEN CASCADE, 2003)
28 AC_DEFUN([CHECK_FIELDS],[
29 AC_REQUIRE([AC_LINKER_OPTIONS])dnl
30 AC_REQUIRE([CHECK_MED3])
32 AC_CHECKING(for Fields)
40 [ --with-fields=DIR root directory path of Fields installation ],
41 FIELDS_DIR="$withval",FIELDS_DIR="")
43 if test "x${FIELDS_DIR}" == "x" ; then
44 AC_MSG_RESULT(for \${FIELDS_ROOT_DIR}: ${FIELDS_ROOT_DIR})
45 # --with-fields option is not used
46 if test "x${FIELDS_ROOT_DIR}" != "x" ; then
47 # FIELDS_ROOT_DIR environment variable defined
48 FIELDS_DIR=${FIELDS_ROOT_DIR}
52 if test -f ${FIELDS_DIR}/idl/salome/MEDCouplingCorbaServant.idl ; then
53 AC_MSG_RESULT(Using Fields module distribution in ${FIELDS_DIR})
56 if test "x$FIELDS_ROOT_DIR" == "x" ; then
57 FIELDS_ROOT_DIR=${FIELDS_DIR}
60 AC_SUBST(FIELDS_ROOT_DIR)
62 FIELDS_LDFLAGS=-L${FIELDS_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
63 FIELDS_CXXFLAGS=-I${FIELDS_DIR}/include/salome
65 AC_SUBST(FIELDS_LDFLAGS)
66 AC_SUBST(FIELDS_CXXFLAGS)
69 AC_MSG_WARN("Cannot find Fields module sources")
72 AC_MSG_RESULT(for Fields: $Fields_ok)
74 dnl Backward compatibility
75 MED_ROOT_DIR=${FIELDS_ROOT_DIR}
76 MED_CXXFLAGS=${FIELDS_CXXFLAGS}
77 MED_LDFLAGS=${FIELDS_LDFLAGS}
78 AC_SUBST(MED_ROOT_DIR)
79 AC_SUBST(MED_CXXFLAGS)
84 dnl Backward compatibility
85 AC_DEFUN([CHECK_MED],[CHECK_FIELDS])