Skip to content
Snippets Groups Projects
Commit ed9b51ec authored by Christopher J. Morrone's avatar Christopher J. Morrone
Browse files

Add support for a --with-munge configure parameter.

parent 343f24d6
No related branches found
No related tags found
No related merge requests found
##*****************************************************************************
## $Id$
##*****************************************************************************
# AUTHOR:
# Chris Dunlap <cdunlap@llnl.gov> (originally for OpenSSL)
# Modified for munge by Christopher Morrone <morrone2@llnl.gov>
#
# SYNOPSIS:
# X_AC_MUNGE()
#
# DESCRIPTION:
# Check the usual suspects for an munge installation,
# updating CPPFLAGS and LDFLAGS as necessary.
#
# WARNINGS:
# This macro must be placed after AC_PROG_CC and before AC_PROG_LIBTOOL.
##*****************************************************************************
AC_DEFUN([X_AC_MUNGE], [
_x_ac_munge_dirs="/usr /usr/local /opt/freeware /opt/munge"
AC_ARG_WITH(
[munge],
AC_HELP_STRING(
[--with-munge=PATH],
[Specify path to munge installation]),
[_x_ac_munge_dirs="$withval $_x_ac_munge_dirs"])
AC_CACHE_CHECK(
[for munge installation],
[x_ac_cv_munge_dir],
[
for d in $_x_ac_munge_dirs; do
test -d "$d" || continue
test -d "$d/include" || continue
test -f "$d/include/munge.h" || continue
test -d "$d/lib" || continue
_x_ac_munge_libs_save="$LIBS"
LIBS="-L$d/lib -lmunge $LIBS"
AC_LINK_IFELSE(
AC_LANG_CALL([], munge_encode),
AS_VAR_SET(x_ac_cv_munge_dir, $d))
LIBS="$_x_ac_munge_libs_save"
test -n "$x_ac_cv_munge_dir" && break
done
])
if test -z "$x_ac_cv_munge_dir"; then
AC_MSG_WARN([unable to locate munge installation])
else
MUNGE_LIBS="-lmunge"
AC_SUBST(MUNGE_LIBS)
AM_CONDITIONAL(WITH_MUNGE, true)
if test "$x_ac_cv_munge_dir" != "/usr"; then
CPPFLAGS="$CPPFLAGS -I$x_ac_cv_munge_dir/include"
LDFLAGS="$LDFLAGS -L$x_ac_cv_munge_dir/lib"
fi
fi
])
......@@ -153,12 +153,7 @@ X_AC_SLURM_WITH_SSL
dnl
dnl Check for compilation of SLURM auth modules:
dnl
AC_CHECK_LIB(munge, munge_encode, [have_munge=yes], [have_munge=no])
if test "$have_munge" = "yes"; then
MUNGE_LIBS="-lmunge"
AC_SUBST(MUNGE_LIBS)
fi
AM_CONDITIONAL(WITH_MUNGE, test "x$have_munge" = "xyes")
X_AC_MUNGE
AUTHD_LIBS="-lauth -le"
savedLIBS="$LIBS"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment