Salome HOME
af7205034ad3283dfe05264edff7f0251fc70d1a
[samples/randomizer.git] / adm_local / unix / config_files / check_RANDOMIZER.m4
1 dnl Copyright (C) 2005-2021  OPEN CASCADE
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, or (at your option) any later version.
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
20 ###########################################################
21 # File    : check_Randomizer.m4
22 # Author  : Vadim SANDLER (OCN)
23 # Created : 13/07/05
24 # Check availability of Randomizer binary distribution
25 ###########################################################
26
27 AC_DEFUN([CHECK_RANDOMIZER],[
28
29 AC_CHECKING(for Randomizer)
30
31 Randomizer_ok=no
32
33 RANDOMIZER_CXXFLAGS=""
34 RANDOMIZER_LDFLAGS=""
35
36 AC_ARG_WITH(rnd,
37             [  --with-rnd=DIR root directory path of RANDOMIZER module installation ],
38             RANDOMIZER_DIR="$withval",RANDOMIZER_DIR="")
39
40 if test "x$RANDOMIZER_DIR" == "x" ; then
41    # no --with-rnd-dir option used
42    if test "x$RANDOMIZER_ROOT_DIR" != "x" ; then
43       # RANDOMIZER_ROOT_DIR environment variable defined
44       RANDOMIZER_DIR=$RANDOMIZER_ROOT_DIR
45    fi
46 fi
47
48 if test -f ${RANDOMIZER_DIR}/idl/salome/Randomizer.idl ; then
49    Randomizer_ok=yes
50    AC_MSG_RESULT(Using Randomizer module distribution in ${RANDOMIZER_DIR})
51
52    if test "x$RANDOMIZER_ROOT_DIR" == "x" ; then
53       RANDOMIZER_ROOT_DIR=${RANDOMIZER_DIR}
54    fi
55
56    RANDOMIZER_LDFLAGS=-L${RANDOMIZER_ROOT_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
57    RANDOMIZER_CXXFLAGS=-I${RANDOMIZER_ROOT_DIR}/include/salome
58
59    AC_SUBST(RANDOMIZER_ROOT_DIR)
60    AC_SUBST(RANDOMIZER_LDFLAGS)
61    AC_SUBST(RANDOMIZER_CXXFLAGS)
62 else
63    AC_MSG_WARN("Cannot find Randomizer module sources")
64 fi
65   
66 AC_MSG_RESULT(for Randomizer: $Randomizer_ok)
67  
68 ])dnl
69