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