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