]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Add LSF Batch Manager detection to configure.in
authordutka <dutka>
Thu, 13 Jan 2005 14:32:03 +0000 (14:32 +0000)
committerdutka <dutka>
Thu, 13 Jan 2005 14:32:03 +0000 (14:32 +0000)
configure.in.base
salome_adm/unix/config_files/check_lsf.m4 [new file with mode: 0755]
salome_adm/unix/make_commence.in

index 8c0768b44b1863bed16f1fd123c726fa5297665d..a382869d9935947fedfaf121d9f1bf66730bd8a4 100644 (file)
@@ -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 (executable)
index 0000000..5fb9e0b
--- /dev/null
@@ -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 <path>. 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)
+
+])
+
index cabebbd71ede02950cdc008bd1b9a76f5916a7d2..77747e2b817073799c45d4643c0246468f3cb02d 100644 (file)
@@ -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@