From 4af75e4a9e90f7e4894040dd8121398ddfb2158e Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Fri, 23 Oct 2009 14:10:25 +0200 Subject: Don't link with -lpam unless necessary II Oops, I sent older working version, here is correct one. I need to rest :(. Here is the correct one: All binaries are compiled with '-lpam' if --enable-pam is specified (and it is on by default). We want only the PAM module linked with it. The autoconf manual says about AC_CHECK_LIB: If action-if-found is not specified, the default action prepends -llibrary to LIBS And the action-if-found we used was '[]', i.e. empty -> -lpam was added to LIBS -> everything links with it. Simple action-if-found overrides this default. Changelog: - use 'dnl' as comments and ':' as the 'noop' action to reflect autoconf coding style. Signed-off-by: Jan Safranek Signed-off-by: Balbir Singh --- configure.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 8e2a40a..091cc98 100644 --- a/configure.in +++ b/configure.in @@ -131,7 +131,11 @@ if test x$with_pam = xtrue; then AC_CHECK_LIB( [pam], [pam_syslog], - [], + [ + dnl Override the default behavior of AC_CHECK_LIB, + dnl we don't want -lpam in LIBS. + : + ], [AC_MSG_ERROR([Cannot compile PAM module without libpam!])]) AC_CHECK_HEADERS( -- cgit