]> granicus.if.org Git - shadow/commitdiff
Fix the detection of the audit library and header file.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Wed, 16 Apr 2008 20:09:03 +0000 (20:09 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Wed, 16 Apr 2008 20:09:03 +0000 (20:09 +0000)
ChangeLog
NEWS
configure.in

index 2f88eb853cb2e4d2018c98c79154bb46cab437d6..c555fa329c249f4e4e603c6fd3eab98d353c2243 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-16  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * NEWS, configure.in: Fix the detection of the audit library and
+       header file.
+
 2008-04-04  Mark Rosenstand  <mark@borkware.net>
 
        * NEWS, etc/pam.d/Makefile.am: Add chfn, chsh, and userdel to
diff --git a/NEWS b/NEWS
index 4e1b16a07177faabfcb5b4bed02333e411bc5a5b..1367ca47a17f07df6eaefc6924c5298f3a2f5c92 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ shadow-4.1.1 -> shadow-4.1.2                                            UNRELEASED
 *** general:
 - packaging
   * Distribute the chfn, chsh, and userdel PAM configuration file.
+  * Fix the detection of the audit library and header file.
 
 shadow-4.1.0 -> shadow-4.1.1                                           02-04-2008
 
index 45db03173d36b2ba3c5b37050265a28ca2a0392d..4ab2122af51a7ac005b05e87fde94848e4880a24 100644 (file)
@@ -218,7 +218,7 @@ AC_ARG_ENABLE(man,
 
 AC_ARG_WITH(audit, 
        [AC_HELP_STRING([--with-audit], [use auditing support @<:@default=yes if found@:>@])],
-       [with_audit=$withval], [with_audit=yes])
+       [with_audit=$withval], [with_audit=maybe])
 AC_ARG_WITH(libpam,
        [AC_HELP_STRING([--with-libpam], [use libpam for PAM support @<:@default=yes if found@:>@])],
        [with_libpam=$withval], [with_libpam=yes])
@@ -275,12 +275,25 @@ AC_CHECK_LIB(crypt, crypt, [LIBCRYPT=-lcrypt],
        [AC_MSG_ERROR([crypt() not found])])
 
 AC_SUBST(LIBAUDIT)
-if test "$with_audit" = "yes"; then
+if test "$with_audit" != "no"; then
        AC_CHECK_HEADER(libaudit.h, [audit_header="yes"], [audit_header="no"])
-       if test "$audit_header" = "yes"; then
+       if test "$audit_header$with_audit" = "noyes" ; then
+               AC_MSG_ERROR([libaudit.h is missing])
+       elif test "$audit_header" = "yes"; then
                AC_CHECK_LIB(audit, audit_log_acct_message,
-                       [AC_DEFINE(WITH_AUDIT, 1, [Define if you want to enable Audit messages])
-                       LIBAUDIT="-laudit"])
+                            [audit_lib="yes"], [audit_lib="no"])
+               if test "$audit_lib$with_audit" = "noyes" ; then
+                       AC_MSG_ERROR([libaudit not found])
+               elif test "$audit_lib" = "no" ; then
+                       with_audit="no"
+               else
+                       AC_DEFINE(WITH_AUDIT, 1,
+                                 [Define if you want to enable Audit messages])
+                       LIBAUDIT="-laudit"
+                       with_audit="yes"
+               fi
+       else
+               with_audit="no"
        fi
 fi