1 dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 dnl This library is free software; you can redistribute it and/or
7 dnl modify it under the terms of the GNU Lesser General Public
8 dnl License as published by the Free Software Foundation; either
9 dnl version 2.1 of the License.
11 dnl This library is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 dnl Lesser General Public License for more details.
16 dnl You should have received a copy of the GNU Lesser General Public
17 dnl License along with this library; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
26 AC_HELP_STRING([--with-lsf[[[[[=path] ]]]]],
27 [tell configure script to use LSF that is located at <path>. Default is no. If path is not given, it is automaticaly determined from LSF_ENVDIR variable.]),
31 AC_MSG_CHECKING([for LSF])
33 if test ! "x$withval" = "xno"
35 if test "x$withval" = "xyes"
37 if test ! "x$LSF_ENVDIR" = "x"
39 test -f "$LSF_ENVDIR/lsf.conf" && . "$LSF_ENVDIR/lsf.conf"
42 dnl some default values ...
44 LSF_INCLUDEDIR=$LSF/include
49 LSF_INCLUDEDIR=$LSF/include
57 LSF_INCLUDES="-I${LSF_INCLUDEDIR}"
58 saved_CPPFLAGS=${CPPFLAGS}
59 CPPFLAGS="${CPPFLAGS} ${LSF_INCLUDES}"
60 AC_CHECK_HEADER([lsf/lsbatch.h], [lsf_header_found=yes], [lsf_header_found=no], [])
61 test x${lsf_header_found} = xno && AC_MSG_WARN([LSF include file not found])
62 CPPFLAGS=${saved_CPPFLAGS}
63 AC_SUBST(LSF_INCLUDES)
67 if test "x${LSF_LIBDIR}" = "x/usr/lib"
71 LSF_LDFLAGS="-L${LSF_LIBDIR}"
73 LSF_LIBS="-lbat -llsf"
74 saved_LDFLAGS=${LDFLAGS}
76 LDFLAGS="${LDFLAGS} ${LSF_LDFLAGS}"
78 AC_CHECK_LIB([lsf], [ls_load], [lsf_libs="-llsf ${lsf_libs}"], [lsf_lib_found=no], [])
79 AC_CHECK_LIB([bat], [lsb_init], [lsf_libs="-lbat ${lsf_libs}"], [lsf_lib_found=no], [-llsf])
80 test x${lsf_lib_found} = xno && AC_MSG_WARN([LSF library not found])
81 LIBS="${LSF_LIBS} ${LIBS}"
82 LDFLAGS=${saved_LDFLAGS}
87 test x${lsf_lib_found} = xyes && test x${lsf_header_found} = xyes && WITH_LSF=yes
96 AM_CONDITIONAL(WITH_LSF, test $WITH_LSF = yes)
99 if test $lsf_ok = no ; then