Salome HOME
Copyright update 2021
[modules/homard.git] / adm_local / unix / config_files / check_GUI.m4
1 # Copyright (C) 2011-2021  CEA/DEN, EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19 #  Author : Marc Tajchman (CEA, 2002)
20 #------------------------------------------------------------
21
22 AC_DEFUN([CHECK_SALOME_GUI],[
23
24 AC_CHECKING(for Salome GUI)
25
26 SalomeGUI_ok=no
27
28 AC_ARG_WITH(gui,
29             --with-salome_gui=DIR root directory path of SALOME GUI installation,
30             SALOME_GUI_DIR="$withval",SALOME_GUI_DIR="")
31
32 if test "x$SALOME_GUI_DIR" = "x" ; then
33   if test "x$GUI_ROOT_DIR" != "x" ; then
34     SALOME_GUI_DIR=$GUI_ROOT_DIR
35   else
36     # search Salome binaries in PATH variable
37     AC_PATH_PROG(TEMP, SUITApp)
38     if test "x$TEMP" != "x" ; then
39       SALOME_GUI_BIN_DIR=`dirname $TEMP`
40       SALOME_GUI_DIR=`dirname $SALOME_GUI_BIN_DIR`
41     fi
42   fi
43 fi
44
45 if test "x$SALOME_GUI_DIR" != "x" ; then
46   if test -f ${SALOME_GUI_DIR}/bin/salome/SUITApp  ; then
47     SalomeGUI_ok=yes
48     AC_MSG_RESULT(Using SALOME GUI distribution in ${SALOME_GUI_DIR})
49     GUI_ROOT_DIR=${SALOME_GUI_DIR}
50   fi
51 fi
52 if test "x$SalomeGUI_ok" == "xno" ; then
53   AC_MSG_WARN("Cannot find compiled SALOME GUI distribution")
54 fi
55   
56 AC_SUBST(GUI_ROOT_DIR)
57
58 AC_MSG_RESULT(for SALOME GUI: $SalomeGUI_ok)
59  
60 ])dnl
61