File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,16 +71,22 @@ if test x$with_slurm_lib == x; then
7171fi
7272AC_MSG_RESULT ( [ $with_slurm_lib$ax_slurm_msg] )
7373
74-
75- SLURM_LIBS="-lslurmdb -lslurm "
7674SLURM_LDFLAGS="-L${with_slurm_lib}"
7775
78-
7976CPPFLAGS_save="$CPPFLAGS"
8077LDFLAGS_save="$LDFLAGS"
8178LIBS_save="$LIBS"
79+ LD_LIBRARY_PATH_save="$LD_LIBRARY_PATH"
8280CPPFLAGS="$CPPFLAGS $SLURM_INCLUDES"
81+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${with_slurm_lib}"
8382LDFLAGS="$LDFLAGS $SLURM_LDFLAGS"
83+
84+ SLURM_LIBS="-lslurm "
85+ dnl Check if slurmdb functions have been merged into the slurm library
86+ dnl If slurmdb has not been merged, add it to the working slurm libs
87+ AC_CHECK_LIB ( slurm , slurmdb_users_get , [ ] , [ SLURM_LIBS="$SLURM_LIBS-lslurmdb "] )
88+ AC_MSG_RESULT ( Using slurm libraries $SLURM_LIBS )
89+
8490LIBS="$LIBS $SLURM_LIBS"
8591
8692ax_slurm_ok="no"
@@ -101,6 +107,7 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include "slurm/slurm.h" ]],
101107CPPFLAGS="$CPPFLAGS_save"
102108LDFLAGS="$LDFLAGS_save"
103109LIBS="$LIBS_save"
110+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH_save"
104111AC_MSG_RESULT ( [ $ax_slurm_ok] )
105112
106113if test x"$ax_slurm_ok" = xyes; then
You can’t perform that action at this time.
0 commit comments