Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[samples/pyhello.git] / adm_local / unix / config_files / check_PYHELLO.m4
1 #  Check availability of PYHELLO binary distribution
2 #
3 #  Author : Marc Tajchman (CEA, 2002)
4 #------------------------------------------------------------
5
6 AC_DEFUN([CHECK_PYHELLO],[
7
8 AC_CHECKING(for PyHello)
9
10 PyHello_ok=no
11
12 AC_ARG_WITH(pyHello,
13             --with-py-hello=DIR root directory path of PYHELLO installation,
14             PYHELLO_DIR="$withval",PYHELLO_DIR="")
15
16 if test "x$PYHELLO_DIR" = "x" ; then
17
18 # no --with-py-hello option used
19
20   if test "x$PYHELLO_ROOT_DIR" != "x" ; then
21
22     # PYHELLO_ROOT_DIR environment variable defined
23     PYHELLO_DIR=$PYHELLO_ROOT_DIR
24
25   else
26
27     # search PyHello binaries in PATH variable
28     AC_PATH_PROG(TEMP, PYHELLOGUI.py)
29     if test "x$TEMP" != "x" ; then
30       PYHELLO_BIN_DIR=`dirname $TEMP`
31       PYHELLO_DIR=`dirname $PYHELLO_BIN_DIR`
32     fi
33
34   fi
35 #
36 fi
37
38 if test -f ${PYHELLO_DIR}/bin/salome/PYHELLOGUI.py  ; then
39   PyHello_ok=yes
40   AC_MSG_RESULT(Using PYHELLO distribution in ${PYHELLO_DIR})
41
42   if test "x$PYHELLO_ROOT_DIR" == "x" ; then
43     PYHELLO_ROOT_DIR=${PYHELLO_DIR}
44   fi
45   AC_SUBST(PYHELLO_ROOT_DIR)
46 else
47   AC_MSG_WARN("Cannot find compiled PYHELLO distribution")
48 fi
49   
50 AC_MSG_RESULT(for PYHELLO: $PyHello_ok)
51  
52 ])dnl
53