Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove slurmdb from libs to link against for newer Slurm versions (>18) #34

Merged
merged 2 commits into from
Mar 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions m4/ax_slurm.m4
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,22 @@ if test x$with_slurm_lib == x; then
fi
AC_MSG_RESULT([$with_slurm_lib$ax_slurm_msg])


SLURM_LIBS="-lslurmdb -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"

ax_slurm_ok="no"
Expand All @@ -101,6 +107,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
Expand Down