Salome HOME
8d0c5474f5ce7a297f17a1c9e1659d54dd8d4aa2
[modules/kernel.git] / salome_adm / unix / config_files / check_msg2qm.m4
1 # Check availability of Qt's msg2qm tool binary distribution
2 #
3 # Author : Jerome Roy (CEA, 2003)
4 #
5
6 AC_DEFUN([CHECK_MSG2QM],[
7
8 AC_CHECKING(for msg2qm)
9
10 msg2qm_ok=no
11
12 AC_ARG_WITH(msg2qm,
13             [  --with-msg2qm=DIR               root directory path of MSG2QM installation],
14             MSG2QM_DIR="$withval",MSG2QM_DIR="")
15
16 if test "x$MSG2QM_DIR" == "x" ; then
17
18 # no --with-MSG2QM-dir option used
19
20    if test "x$MSG2QM_ROOT" != "x" ; then
21
22     # MSG2QM_ROOT environment variable defined
23       MSG2QM_DIR=$MSG2QM_ROOT
24
25    else
26
27     # search MSG2QM binaries in PATH variable
28       AC_PATH_PROG(TEMP, msg2qm)
29       if test "x$TEMP" != "x" ; then
30          MSG2QM_DIR=`dirname $TEMP`
31       fi
32       
33    fi
34
35 fi
36
37 # look for msg2qm in ${MSG2QM_DIR} directory
38 if test -f ${MSG2QM_DIR}/msg2qm ; then
39    msg2qm_ok=yes
40    MSG2QM="${MSG2QM_DIR}/msg2qm"
41    AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR})
42 else
43    # if not found, look for msg2qm in ${MSG2QM_DIR}/bin directory
44    if test -f ${MSG2QM_DIR}/bin/msg2qm ; then
45       msg2qm_ok=yes
46       MSG2QM="${MSG2QM_DIR}/bin/msg2qm"
47       AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}/bin)
48    else     
49       AC_MSG_WARN("Cannot find MSG2QM executable")
50    fi
51 fi
52
53 AC_SUBST(MSG2QM)
54 AC_MSG_RESULT(for MSG2QM: $msg2qm_ok)
55  
56 ])dnl
57