Salome HOME
mergefrom branch BR_V511_PR tag mergeto_trunk_03feb09
[modules/yacs.git] / src / wrappergen / src / HXX2SALOME_GENERIC_CLASS_NAME_SRC / adm_local / unix / config_files / check_msg2qm.m4
1 dnl  Copyright (C) 2006-2008  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.
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 # Check availability of Qt's msg2qm tool binary distribution
20 #
21 # Author : Jerome Roy (CEA, 2003)
22 #
23
24 AC_DEFUN([CHECK_MSG2QM],[
25
26 AC_CHECKING(for msg2qm)
27
28 msg2qm_ok=no
29
30 AC_ARG_WITH(msg2qm,
31             [  --with-msg2qm=DIR               root directory path of MSG2QM installation],
32             MSG2QM_DIR="$withval",MSG2QM_DIR="")
33
34 if test "x$MSG2QM_DIR" == "x" ; then
35
36 # no --with-MSG2QM-dir option used
37
38    if test "x$MSG2QM_ROOT" != "x" ; then
39
40     # MSG2QM_ROOT environment variable defined
41       MSG2QM_DIR=$MSG2QM_ROOT
42
43    else
44
45     # search MSG2QM binaries in PATH variable
46       AC_PATH_PROG(TEMP, msg2qm)
47       if test "x$TEMP" != "x" ; then
48          MSG2QM_DIR=`dirname $TEMP`
49       fi
50       
51    fi
52
53 fi
54
55 # look for msg2qm in ${MSG2QM_DIR} directory
56 if test -f ${MSG2QM_DIR}/msg2qm ; then
57    msg2qm_ok=yes
58    MSG2QM="${MSG2QM_DIR}/msg2qm"
59    AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR})
60 else
61    # if not found, look for msg2qm in ${MSG2QM_DIR}/bin directory
62    if test -f ${MSG2QM_DIR}/bin/msg2qm ; then
63       msg2qm_ok=yes
64       MSG2QM="${MSG2QM_DIR}/bin/msg2qm"
65       AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}/bin)
66    else     
67       AC_MSG_WARN("Cannot find MSG2QM executable")
68    fi
69 fi
70
71 AC_SUBST(MSG2QM)
72 AC_MSG_RESULT(for MSG2QM: $msg2qm_ok)
73  
74 ])dnl
75