Salome HOME
0be0007119c1ad9684c76b19e0c74b73cf89615a
[modules/yacs.git] / src / wrappergen / src / HXX2SALOME_GENERIC_CLASS_NAME_SRC / adm_local / unix / config_files / check_msg2qm.m4
1 dnl Copyright (C) 2006-2020  CEA/DEN, EDF R&D
2 dnl
3 dnl This library is free software; you can redistribute it and/or
4 dnl modify it under the terms of the GNU Lesser General Public
5 dnl License as published by the Free Software Foundation; either
6 dnl version 2.1 of the License, or (at your option) any later version.
7 dnl
8 dnl This library is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 dnl Lesser General Public License for more details.
12 dnl
13 dnl You should have received a copy of the GNU Lesser General Public
14 dnl License along with this library; if not, write to the Free Software
15 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 dnl
17 dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 dnl
19
20 # Check availability of Qt's msg2qm tool binary distribution
21 #
22 # Author : Jerome Roy (CEA, 2003)
23 #
24
25 AC_DEFUN([CHECK_MSG2QM],[
26
27 AC_CHECKING(for msg2qm)
28
29 msg2qm_ok=no
30
31 AC_ARG_WITH(msg2qm,
32             [  --with-msg2qm=DIR               root directory path of MSG2QM installation],
33             MSG2QM_DIR="$withval",MSG2QM_DIR="")
34
35 if test "x$MSG2QM_DIR" == "x" ; then
36
37 # no --with-MSG2QM-dir option used
38
39    if test "x$MSG2QM_ROOT" != "x" ; then
40
41     # MSG2QM_ROOT environment variable defined
42       MSG2QM_DIR=$MSG2QM_ROOT
43
44    else
45
46     # search MSG2QM binaries in PATH variable
47       AC_PATH_PROG(TEMP, msg2qm)
48       if test "x$TEMP" != "x" ; then
49          MSG2QM_DIR=`dirname $TEMP`
50       fi
51       
52    fi
53
54 fi
55
56 # look for msg2qm in ${MSG2QM_DIR} directory
57 if test -f ${MSG2QM_DIR}/msg2qm ; then
58    msg2qm_ok=yes
59    MSG2QM="${MSG2QM_DIR}/msg2qm"
60    AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR})
61 else
62    # if not found, look for msg2qm in ${MSG2QM_DIR}/bin directory
63    if test -f ${MSG2QM_DIR}/bin/msg2qm ; then
64       msg2qm_ok=yes
65       MSG2QM="${MSG2QM_DIR}/bin/msg2qm"
66       AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}/bin)
67    else     
68       AC_MSG_WARN("Cannot find MSG2QM executable")
69    fi
70 fi
71
72 AC_SUBST(MSG2QM)
73 AC_MSG_RESULT(for MSG2QM: $msg2qm_ok)
74  
75 ])dnl
76