]> SALOME platform Git repositories - modules/kernel.git/blob - salome_adm/unix/config_files/check_Salome.m4
Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/kernel.git] / salome_adm / unix / config_files / check_Salome.m4
1 #  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3
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. 
8
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. 
13
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 
17
18 #  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
19 #
20 #------------------------------------------------------------
21 #  Check availability of Salome binary distribution
22 #
23 #  Author : Marc Tajchman (CEA, 2002)
24 #------------------------------------------------------------
25
26 AC_DEFUN([CHECK_SALOME],[
27
28 AC_CHECKING(for Salome)
29
30 Salome_ok=no
31
32 AC_ARG_WITH(salome,
33             --with-salome=DIR root directory path of SALOME installation,
34             SALOME_DIR="$withval",SALOME_DIR="")
35
36 if test "x$SALOME_DIR" == "x" ; then
37
38 # no --with-salome-dir option used
39
40    if test "x$SALOME_ROOT_DIR" != "x" ; then
41
42     # SALOME_ROOT_DIR environment variable defined
43       SALOME_DIR=$SALOME_ROOT_DIR
44
45    else
46
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`
52       fi
53       
54    fi
55
56 fi
57
58 if test -f ${SALOME_DIR}/bin/libMEDMEM_Swig.py  ; then
59    Salome_ok=yes
60    AC_MSG_RESULT(Using Salome distribution in ${SALOME_DIR})
61
62    if test "x$SALOME_ROOT_DIR" == "x" ; then
63       SALOME_ROOT_DIR=${SALOME_DIR}
64    fi
65    if test "x$SALOME_SITE_DIR" == "x" ; then
66       SALOME_SITE_DIR=${SALOME_ROOT_DIR}
67    fi
68    AC_SUBST(SALOME_ROOT_DIR)
69    AC_SUBST(SALOME_SITE_DIR)
70
71 else
72    AC_MSG_WARN("Cannot find compiled Salome distribution")
73 fi
74   
75 AC_MSG_RESULT(for Salome: $Salome_ok)
76  
77 ])dnl
78