1 dnl Copyright (C) 2006-2022 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 availability of Med binary distribution
22 # Author : Nicolas REJNERI (OPEN CASCADE, 2003)
25 AC_DEFUN([CHECK_MED],[
35 [ --with-med=DIR root directory path of MED installation ],
36 MED_DIR="$withval",MED_DIR="")
38 if test "x$MED_DIR" == "x" ; then
40 # no --with-med-dir option used
42 if test "x$MED_ROOT_DIR" != "x" ; then
44 # MED_ROOT_DIR environment variable defined
49 # search Med binaries in PATH variable
50 AC_PATH_PROG(TEMP, libMEDMEM_Swig.py)
51 if test "x$TEMP" != "x" ; then
52 MED_BIN_DIR=`dirname $TEMP`
53 MED_DIR=`dirname $MED_BIN_DIR`
60 if test -f ${MED_DIR}/bin/salome/libMEDMEM_Swig.py ; then
62 AC_MSG_RESULT(Using Med module distribution in ${MED_DIR})
64 if test "x$MED_ROOT_DIR" == "x" ; then
65 MED_ROOT_DIR=${MED_DIR}
67 AC_SUBST(MED_ROOT_DIR)
68 MED_INCLUDES="-I${MED_ROOT_DIR}/include/salome ${MED2_INCLUDES} ${HDF5_INCLUDES} -I${KERNEL_ROOT_DIR}/include/salome"
69 MED_LIBS="-L${MED_ROOT_DIR}/lib/salome -lmedmem ${MED2_LIBS} ${HDF5_LIBS} -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace"
70 AC_SUBST(MED_INCLUDES)
74 AC_MSG_WARN("Cannot find Med module sources")
77 AC_MSG_RESULT(for Med: $Med_ok)