From eb4a56ddd1207942596bb59807c3f7e7526c7165 Mon Sep 17 00:00:00 2001 From: Eric Robets Date: Fri, 3 Jan 2020 14:48:23 -0500 Subject: [PATCH 1/2] Remove slurmdb from libs to link against and add slurm library configure path to shared object runtime path for testing availability --- m4/ax_slurm.m4 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/m4/ax_slurm.m4 b/m4/ax_slurm.m4 index cfd4eec..889c1a0 100644 --- a/m4/ax_slurm.m4 +++ b/m4/ax_slurm.m4 @@ -71,17 +71,18 @@ if test x$with_slurm_lib == x; then fi AC_MSG_RESULT([$with_slurm_lib$ax_slurm_msg]) - -SLURM_LIBS="-lslurmdb -lslurm " +SLURM_LIBS="-lslurm " SLURM_LDFLAGS="-L${with_slurm_lib}" CPPFLAGS_save="$CPPFLAGS" LDFLAGS_save="$LDFLAGS" LIBS_save="$LIBS" +LD_LIBRARY_PATH_save="$LD_LIBRARY_PATH" CPPFLAGS="$CPPFLAGS $SLURM_INCLUDES" LDFLAGS="$LDFLAGS $SLURM_LDFLAGS" LIBS="$LIBS $SLURM_LIBS" +LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${with_slurm_lib}" ax_slurm_ok="no" @@ -101,6 +102,7 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include "slurm/slurm.h" ]], CPPFLAGS="$CPPFLAGS_save" LDFLAGS="$LDFLAGS_save" LIBS="$LIBS_save" +LD_LIBRARY_PATH="$LD_LIBRARY_PATH_save" AC_MSG_RESULT([$ax_slurm_ok]) if test x"$ax_slurm_ok" = xyes; then From f9cb32a4dab555b5bd51738282a9e70291a8c952 Mon Sep 17 00:00:00 2001 From: Eric Robets Date: Tue, 11 Feb 2020 15:09:05 -0500 Subject: [PATCH 2/2] Add check if slurmdb has been merged into slurm library --- m4/ax_slurm.m4 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/m4/ax_slurm.m4 b/m4/ax_slurm.m4 index 889c1a0..5b39c50 100644 --- a/m4/ax_slurm.m4 +++ b/m4/ax_slurm.m4 @@ -71,18 +71,23 @@ if test x$with_slurm_lib == x; then fi AC_MSG_RESULT([$with_slurm_lib$ax_slurm_msg]) -SLURM_LIBS="-lslurm " SLURM_LDFLAGS="-L${with_slurm_lib}" - CPPFLAGS_save="$CPPFLAGS" LDFLAGS_save="$LDFLAGS" LIBS_save="$LIBS" LD_LIBRARY_PATH_save="$LD_LIBRARY_PATH" CPPFLAGS="$CPPFLAGS $SLURM_INCLUDES" +LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${with_slurm_lib}" LDFLAGS="$LDFLAGS $SLURM_LDFLAGS" + +SLURM_LIBS="-lslurm " +dnl Check if slurmdb functions have been merged into the slurm library +dnl If slurmdb has not been merged, add it to the working slurm libs +AC_CHECK_LIB(slurm, slurmdb_users_get, [], [SLURM_LIBS="$SLURM_LIBS-lslurmdb "]) +AC_MSG_RESULT(Using slurm libraries $SLURM_LIBS) + LIBS="$LIBS $SLURM_LIBS" -LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${with_slurm_lib}" ax_slurm_ok="no"