]> SALOME platform Git repositories - modules/superv.git/blob - adm_local/unix/config_files/check_SUPERV.m4
Salome HOME
0ac2ba066fa463c621c53ec8dbf439b9d3ac87a1
[modules/superv.git] / adm_local / unix / config_files / check_SUPERV.m4
1 #  Check availability of SUPERV module binary distribution
2 #
3 #  Author : Marc Tajchman (CEA, 2002)
4 #------------------------------------------------------------
5
6 AC_DEFUN([CHECK_SUPERV],[
7
8 AC_CHECKING(for Superv)
9
10 Superv_ok=no
11
12 AC_ARG_WITH(superv,
13             --with-superv=DIR root directory path of SUPERV installation,
14             SUPERV_DIR="$withval",SUPERV_DIR="")
15
16 if test "x$SUPERV_DIR" = "x" ; then
17
18 # no --with-gui-dir option used
19
20   if test "x$SUPERV_ROOT_DIR" != "x" ; then
21
22     # SUPERV_ROOT_DIR environment variable defined
23     SUPERV_DIR=$SUPERV_ROOT_DIR
24
25   else
26
27     # search SUPERV binaries in PATH variable
28     AC_PATH_PROG(TEMP, libSUPERV.so)
29     if test "x$TEMP" != "x" ; then
30       SUPERV_BIN_DIR=`dirname $TEMP`
31       SUPERV_DIR=`dirname $SUPERV_BIN_DIR`
32     fi
33
34   fi
35 #
36 fi
37
38 if test -f ${SUPERV_DIR}/lib/salome/libSUPERV.so  ; then
39   Superv_ok=yes
40   AC_MSG_RESULT(Using SUPERV distribution in ${SUPERV_DIR})
41
42   if test "x$SUPERV_ROOT_DIR" == "x" ; then
43     SUPERV_ROOT_DIR=${SUPERV_DIR}
44   fi
45   AC_SUBST(SUPERV_ROOT_DIR)
46 else
47   AC_MSG_WARN("Cannot find compiled SUPERV distribution")
48 fi
49   
50 AC_MSG_RESULT(for SUPERV: $Superv_ok)
51  
52 ])dnl
53