Salome HOME
Copyright update 2022
[plugins/hybridplugin.git] / adm_local / unix / config_files / check_HYBRID.m4
1 # Copyright (C) 2007-2022  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
20 # ---
21 #
22 # File   : check_HYBRID.m4
23 # Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
24 #
25 # ---
26
27 AC_DEFUN([CHECK_HYBRID],[
28
29 AC_REQUIRE([AC_PROG_CXX])dnl
30 AC_REQUIRE([AC_PROG_CXXCPP])dnl
31
32 AC_CHECKING(for HYBRID(MG_hybrid) commercial product)
33
34 AC_LANG_SAVE
35 AC_LANG_CPLUSPLUS
36
37 AC_ARG_WITH(,
38             [  --with-hybrid=DIR     root directory path of HYBRID (MG_hybrid) installation])
39
40 HYBRID_ok=no
41
42 if test "$with_hybrid" == "no" ; then
43     AC_MSG_WARN(You have choosen building plugin without HYBRID)
44 else
45     if test "$with_hybrid" == "yes" || test "$with_hybrid" == "auto"; then
46         HYBRID_HOME=""
47     else
48         HYBRID_HOME="$with_hybrid"
49     fi
50     
51     if test "$HYBRID_HOME" == "" ; then
52         if test "x$HYBRIDHOME" != "x" ; then
53             HYBRID_HOME=$HYBRIDHOME
54         else
55             AC_MSG_WARN(Build plugin without HYBRID)
56         fi
57     fi
58     
59     if test "x$HYBRID_HOME" != "x"; then
60     
61       echo
62       echo -------------------------------------------------
63       echo You are about to choose to use somehow the
64       echo "HYBRID(MG-hybrid) commercial product to generate 3D tetra-hexahedral mesh."
65       echo
66     
67       AC_CHECKING(for HYBRID(MG-hybrid) executable)
68     
69       AC_CHECK_PROG(HYBRID,MG-hybrid,found)
70     
71       if test "x$HYBRID" == x ; then
72         AC_MSG_WARN(MG-hybrid program not found in PATH variable)
73         AC_MSG_WARN(Build plugin without HYBRID)
74       else
75         HYBRID_ok=yes
76       fi
77     
78     fi
79 fi
80
81 AC_MSG_RESULT(for HYBRID: $HYBRID_ok)
82 AC_LANG_RESTORE
83
84 ])dnl