-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flux: ensure flux_job_timeleft() is available
flux_job_timeleft() was introduced in flux-core 0.47.0, so check the flux-core version in the spec file, and check the function is available when configure is run.
- Loading branch information
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
##***************************************************************************** | ||
# SYNOPSIS: | ||
# X_AC_FLUX_JOB_TIMELEFT() | ||
# | ||
# DESCRIPTION: | ||
# Check flux_job_timeleft() is present | ||
##***************************************************************************** | ||
|
||
AC_DEFUN([X_AC_FLUX_JOB_TIMELEFT], [ | ||
AS_IF([test "$FLUX_LIBADD"],[ | ||
AC_MSG_CHECKING([Whether flux_job_timeleft() is present.]) | ||
LIBS="$FLUX_LIBS $FLUX_LIBADD $LIBS" | ||
AC_LINK_IFELSE([ | ||
AC_LANG_PROGRAM( | ||
[[#include <flux/core.h>]], | ||
[[double tl = flux_job_timeleft(NULL, NULL, NULL);]] | ||
)], | ||
[x_ac_cv_flux_job_timeleft=1], | ||
[x_ac_cv_flux_job_timeleft=0] | ||
) | ||
AS_IF([test "x$x_ac_cv_flux_job_timeleft" = x1], | ||
[AC_MSG_RESULT([yes])], | ||
[ | ||
AC_MSG_RESULT([no]) | ||
AC_MSG_ERROR([flux_job_timeleft() is required. Update to a newer flux or use --without-flux.]) | ||
] | ||
) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ X_AC_LCRM | |
X_AC_MOAB | ||
X_AC_LSF | ||
X_AC_FLUX | ||
X_AC_FLUX_JOB_TIMELEFT | ||
|
||
aix_64bit_mode=no | ||
using_aix=no | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters