From 05c344135e8c5dd165d97b1e117a9bdac77016bc Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Wed, 27 Feb 2013 21:24:04 +0000 Subject: define WITH_LL only if libllapi is found --- configure.ac | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9a830320c..fb2d84ebb 100644 --- a/configure.ac +++ b/configure.ac @@ -994,7 +994,19 @@ AC_ARG_WITH([ll], ], [AC_MSG_RESULT(--with-ll not specified)]) AM_CONDITIONAL([WITH_LL], [test "x$llapi" = "xtrue"]) -AC_DEFINE_UNQUOTED(WITH_LL, $llapi, [Do we have to use IBM LoadLeveler]) +if test "x$llapi" = "xtrue" +then + AC_DEFINE_UNQUOTED([WITH_LL], [$llapi], [Do we have to use IBM LoadLeveler]) + AC_CHECK_HEADERS([pwd.h], + AC_CHECK_LIB([c],[getpwuid],, + AC_MSG_ERROR(getpwid function not available in libc but is required)), + AC_MSG_ERROR(pwd.h not found but is required), + [[ + #ifdef HAVE_SYS_TYPES_H + #include + #endif + ]]) +fi # should 'make check' run tests? AC_MSG_CHECKING(whether to run tests) -- cgit v1.2.3