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