]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
Don't link with -lpam unless necessary II
authorJan Safranek <jsafrane@redhat.com>
Fri, 23 Oct 2009 12:10:25 +0000 (14:10 +0200)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Tue, 27 Oct 2009 07:38:28 +0000 (13:08 +0530)
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 <jsafrane@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
configure.in

index 8e2a40a98c19bf7693f7950e71a234e7e85b5eff..091cc9807c049bd5f423ee6f0b2722eb6c251e30 100644 (file)
@@ -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(