]> SALOME platform Git repositories - plugins/ghs3dprlplugin.git/blob - adm_local/unix/config_files/check_GHS3DPRL.m4
Salome HOME
Merge from BR_V5_DEV 16Feb09
[plugins/ghs3dprlplugin.git] / adm_local / unix / config_files / check_GHS3DPRL.m4
1 # Copyright (C) 2007-2008 OPEN CASCADE, 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.
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 # File   : check_GHS3DPRL.m4
22 # Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
23 #
24 # ---
25
26 AC_DEFUN([CHECK_GHS3DPRL],[
27
28 AC_REQUIRE([AC_PROG_CXX])dnl
29 AC_REQUIRE([AC_PROG_CXXCPP])dnl
30
31 AC_CHECKING(for GHS3DPRL(Tepal) commercial product)
32
33 AC_LANG_SAVE
34 AC_LANG_CPLUSPLUS
35
36 AC_ARG_WITH(,
37             [  --with-ghs3dprl=DIR     root directory path of GHS3DPRL (Tepal) installation])
38
39 GHS3DPRL_ok=no
40
41 if test "$with_ghs3dprl" == "no" ; then
42     AC_MSG_WARN(You have choosen building plugin without GHS3DPRL)
43 else
44     if test "$with_ghs3dprl" == "yes" || test "$with_ghs3dprl" == "auto"; then
45         GHS3DPRL_HOME=""
46     else
47         GHS3DPRL_HOME="$with_ghs3dprl"
48     fi
49     
50     if test "$GHS3DPRL_HOME" == "" ; then
51         if test "x$GHS3DPRLHOME" != "x" ; then
52             GHS3DPRL_HOME=$GHS3DPRLHOME
53         else
54             AC_MSG_WARN(Build plugin without GHS3DPRL)
55         fi
56     fi
57     
58     if test "x$GHS3DPRL_HOME" != "x"; then
59     
60       echo
61       echo -------------------------------------------------
62       echo You are about to choose to use somehow the
63       echo "GHS3DPRL(Tepal) commercial product to generate 3D tetrahedral mesh."
64       echo
65     
66       AC_CHECKING(for GHS3DPRL(Tepal) executable)
67     
68       AC_CHECK_PROG(GHS3DPRL,tepal,found)
69     
70       if test "x$GHS3DPRL" == x ; then
71         AC_MSG_WARN(Tepal program not found in PATH variable)
72         AC_MSG_WARN(Build plugin without GHS3DPRL)
73       else
74         GHS3DPRL_ok=yes
75       fi
76     
77     fi
78 fi
79
80 AC_MSG_RESULT(for GHS3DPRL(Tepal): $GHS3DPRL_ok)
81 AC_LANG_RESTORE
82
83 ])dnl