From: dutka Date: Thu, 13 Jan 2005 14:32:03 +0000 (+0000) Subject: Add LSF Batch Manager detection to configure.in X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0208aa2f8b1a908f0f66ab0eb2a600df1aff947f;p=modules%2Fkernel.git Add LSF Batch Manager detection to configure.in --- diff --git a/configure.in.base b/configure.in.base index 8c0768b44..a382869d9 100644 --- a/configure.in.base +++ b/configure.in.base @@ -186,6 +186,22 @@ openpbs_ok=no CHECK_OPENPBS dnl openpbs_ok is set to yes by CHECK_OPENPBS +dnl +dnl --------------------------------------------- +dnl testing LSF +dnl --------------------------------------------- +dnl + +echo +echo --------------------------------------------- +echo testing LSF +echo --------------------------------------------- +echo + +lsf_ok=no +CHECK_LSF +dnl lsf_ok is set to yes by CHECK_LSF + echo echo --------------------------------------------- echo testing LEX \& YACC @@ -340,7 +356,7 @@ echo --------------------------------------------- echo echo Configure -variables="cc_ok boost_ok lex_yacc_ok mpi_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok openpbs_ok" +variables="cc_ok boost_ok lex_yacc_ok mpi_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok openpbs_ok lsf_ok" for var in $variables do diff --git a/salome_adm/unix/config_files/check_lsf.m4 b/salome_adm/unix/config_files/check_lsf.m4 new file mode 100755 index 000000000..5fb9e0b10 --- /dev/null +++ b/salome_adm/unix/config_files/check_lsf.m4 @@ -0,0 +1,76 @@ +# Check for LSF +AC_DEFUN([CHECK_LSF], +[ + AC_ARG_WITH([lsf], + AC_HELP_STRING([--with-lsf[[[[[=path] ]]]]], + [tell configure script to use LSF that is located at . Default is no. If path is not given, it is automaticaly determined from LSF_ENVDIR variable.]), + [], + [withval=no]) + + AC_MSG_CHECKING([for LSF]) + + if test ! "x$withval" = "xno" + then + if test "x$withval" = "xyes" + then + if test ! "x$LSF_ENVDIR" = "x" + then + test -f "$LSF_ENVDIR/lsf.conf" && . "$LSF_ENVDIR/lsf.conf" + LSF=$LSF_TOP + else + dnl some default values ... + LSF=/usr + LSF_INCLUDEDIR=$LSF/include + LSF_LIBDIR=$LSF/lib + fi + else + LSF=$withval + LSF_INCLUDEDIR=$LSF/include + LSF_LIBDIR=$LSF/lib + fi + + AC_MSG_RESULT([$LSF]) + + dnl INCLUDE directory + + LSF_INCLUDES="-I${LSF_INCLUDEDIR}" + saved_CPPFLAGS=${CPPFLAGS} + CPPFLAGS="${CPPFLAGS} ${LSF_INCLUDES}" + AC_CHECK_HEADER([lsf/lsbatch.h], [lsf_header_found=yes], [lsf_header_found=no], []) + test x${lsf_header_found} = xno && AC_MSG_WARN([LSF include file not found]) + CPPFLAGS=${saved_CPPFLAGS} + AC_SUBST(LSF_INCLUDES) + + dnl LIB directory + + LSF_LDFLAGS="-L${LSF_LIBDIR}" + LSF_LIBS="" + saved_LDFLAGS=${LDFLAGS} + saved_LIBS=${LIBS} + LDFLAGS="${LDFLAGS} ${LSF_LDFLAGS}" + lsf_lib_found=yes + AC_CHECK_LIB([lsf], [ls_load], [lsf_libs="-llsf ${lsf_libs}"], [lsf_lib_found=no], []) + AC_CHECK_LIB([bat], [lsb_init], [lsf_libs="-lbat ${lsf_libs}"], [lsf_lib_found=no], [-llsf]) + test x${lsf_lib_found} = xno && AC_MSG_WARN([LSF library not found]) + LIBS="${LSF_LIBS} ${LIBS}" + LDFLAGS=${saved_LDFLAGS} + LIBS=${saved_LIBS} + AC_SUBST(LSF_LDFLAGS) + AC_SUBST(LSF_LIBS) + + test x${lsf_lib_found} = xyes && test x${lsf_header_found} = xyes && WITH_LSF=yes + + else + WITH_LSF=no + + AC_MSG_RESULT([no]) + + fi + + dnl AM_CONDITIONAL(WITH_LSF, test $WITH_LSF = 1) + + lsf_ok=$WITH_LSF + AC_SUBST(WITH_LSF) + +]) + diff --git a/salome_adm/unix/make_commence.in b/salome_adm/unix/make_commence.in index cabebbd71..77747e2b8 100644 --- a/salome_adm/unix/make_commence.in +++ b/salome_adm/unix/make_commence.in @@ -46,6 +46,12 @@ OPENPBS_INCLUDES = @OPENPBS_INCLUDES@ OPENPBS_LIBDIR = @OPENPBS_LIBDIR@ OPENPBS_LIBS = @OPENPBS_LIBS@ +# LSF + +LSF_INCLUDES = @LSF_INCLUDES@ +LSF_LIBDIR = @LSF_LDFLAGS@ +LSF_LIBS = @LSF_LIBS@ + # JAVA #JAVA_INCLUDES = @JAVA_INCLUDES@