Salome HOME
Amélioration de la détection des dépendances (dépendances Runtime)
[modules/eficas.git] / adm_local / unix / config_files / check_visu.m4
1 # Check availability of Salome's VISU binary distribution
2 #
3 # Author : Jerome Roy (CEA, 2003)
4 #
5
6 AC_DEFUN([CHECK_VISU],[
7
8 AC_CHECKING(for Visu)
9
10 Visu_ok=no
11
12 AC_ARG_WITH(visu,
13             [  --with-visu=DIR               root directory path of VISU build or installation],
14             VISU_DIR="$withval",VISU_DIR="")
15
16 if test "x$VISU_DIR" = "x" ; then
17
18 # no --with-visu-dir option used
19
20    if test "x$VISU_ROOT_DIR" != "x" ; then
21
22     # VISU_ROOT_DIR environment variable defined
23       VISU_DIR=$VISU_ROOT_DIR
24
25    else
26
27     # search Visu binaries in PATH variable
28       AC_PATH_PROG(TEMP, runSalome)
29       if test "x$TEMP" != "x" ; then
30          VISU_BIN_DIR=`dirname $TEMP`
31          VISU_DIR=`dirname $VISU_BIN_DIR`
32       fi
33       
34    fi
35
36 fi
37
38 if test -f ${VISU_DIR}/bin/salome/runSalome ; then
39    Visu_ok=yes
40    AC_MSG_RESULT(Using Visu module distribution in ${VISU_DIR})
41
42    if test "x$VISU_ROOT_DIR" = "x" ; then
43       VISU_ROOT_DIR=${VISU_DIR}
44    fi
45    if test "x$VISU_SITE_DIR" = "x" ; then
46       VISU_SITE_DIR=${VISU_ROOT_DIR}
47    fi
48    AC_SUBST(VISU_ROOT_DIR)
49    AC_SUBST(VISU_SITE_DIR)
50
51 else
52    AC_MSG_WARN("Cannot find compiled Visu module distribution")
53 fi
54
55 AC_MSG_RESULT(for Visu: $Visu_ok)
56  
57 ])dnl
58