1 # Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 # Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
25 #------------------------------------------------------------
27 AC_DEFUN([CHECK_PYLIGHT],[
29 AC_CHECKING(for PyLight)
37 --with-py-light=DIR root directory path of PYLIGHT installation,
38 PYLIGHT_DIR="$withval",PYLIGHT_DIR="")
40 if test "x$PYLIGHT_DIR" = "x" ; then
42 # no --with-light option used
44 if test "x$PYLIGHT_ROOT_DIR" != "x" ; then
46 # PYLIGHT_ROOT_DIR environment variable defined
47 LIGHT_DIR=$PYLIGHT_ROOT_DIR
51 # search PYLIGHT binaries in PATH variable
52 AC_PATH_PROG(TEMP, PYLIGHTGUI.py)
53 if test "x$TEMP" != "x" ; then
54 PYLIGHT_BIN_DIR=`dirname $TEMP`
55 PYLIGHT_DIR=`dirname $PYLIGHT_BIN_DIR`
62 if test -f ${PYLIGHT_DIR}/lib/salome/PYLIGHTGUI.py ; then
64 AC_MSG_RESULT(Using PYLIGHT distribution in ${PYLIGHT_DIR})
66 if test "x$PYLIGHT_ROOT_DIR" == "x" ; then
67 PYLIGHT_ROOT_DIR=${PYLIGHT_DIR}
69 AC_SUBST(PYLIGHT_ROOT_DIR)
71 AC_MSG_WARN("Cannot find compiled PYLIGHT distribution")
74 AC_MSG_RESULT(for PYLIGHT: $PyLight_ok)