1 # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
20 #------------------------------------------------------------
21 # Check availability of Salome binary distribution
23 # Author : Marc Tajchman (CEA, 2002)
24 #------------------------------------------------------------
26 AC_DEFUN([CHECK_SALOME],[
28 AC_CHECKING(for Salome)
33 --with-salome=DIR root directory path of SALOME installation,
34 SALOME_DIR="$withval",SALOME_DIR="")
36 if test "x$SALOME_DIR" == "x" ; then
38 # no --with-salome-dir option used
40 if test "x$SALOME_ROOT_DIR" != "x" ; then
42 # SALOME_ROOT_DIR environment variable defined
43 SALOME_DIR=$SALOME_ROOT_DIR
47 # search Salome binaries in PATH variable
48 AC_PATH_PROG(TEMP, libMEDMEM_Swig.py)
49 if test "x$TEMP" != "x" ; then
50 SALOME_BIN_DIR=`dirname $TEMP`
51 SALOME_DIR=`dirname $SALOME_BIN_DIR`
58 if test -f ${SALOME_DIR}/bin/libMEDMEM_Swig.py ; then
60 AC_MSG_RESULT(Using Salome distribution in ${SALOME_DIR})
62 if test "x$SALOME_ROOT_DIR" == "x" ; then
63 SALOME_ROOT_DIR=${SALOME_DIR}
65 if test "x$SALOME_SITE_DIR" == "x" ; then
66 SALOME_SITE_DIR=${SALOME_ROOT_DIR}
68 AC_SUBST(SALOME_ROOT_DIR)
69 AC_SUBST(SALOME_SITE_DIR)
72 AC_MSG_WARN("Cannot find compiled Salome distribution")
75 AC_MSG_RESULT(for Salome: $Salome_ok)