]> err.no Git - util-linux/commitdiff
build-sys: add support for audit
authorKarel Zak <kzak@redhat.com>
Mon, 12 Mar 2007 11:20:54 +0000 (12:20 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 12 Mar 2007 11:20:54 +0000 (12:20 +0100)
You can compile --with-audit now.

Signed-off-by: Karel Zak <kzak@redhat.com>
config.h.in
configure.ac

index b486f264abc6a15104245e739fb5ea93a9687f13..807cecfdc0824f1527e0c913605469b230032de8 100644 (file)
@@ -35,6 +35,9 @@
 /* Define to 1 if you have the `lchown' function. */
 #undef HAVE_LCHOWN
 
+/* Define to 1 if you have the `audit' library (-laudit). */
+#undef HAVE_LIBAUDIT
+
 /* Define to 1 if you have the `blkid' library (-lblkid). */
 #undef HAVE_LIBBLKID
 
index ccd05b361c43b567880f35dbab119eda51367d1a..95690ddf14d979fe09c23ae59055708e18b66924 100644 (file)
@@ -302,6 +302,19 @@ fi
 AM_CONDITIONAL(HAVE_SELINUX, test x$ac_cv_lib_selinux_getprevcon = xyes)
 
 
+AC_ARG_WITH([audit],
+  AC_HELP_STRING([--with-audit], [compile with audit support]),
+  with_audit=$withval, with_audit=no
+)
+
+if test x$with_audit != xno; then
+  AC_CHECK_LIB(audit, audit_log_user_message)
+  if test x$with_audit = xyes && test x$ac_cv_lib_audit_audit_log_user_message = xno; then
+    AC_MSG_ERROR([Audit selected but libaudit not found (or doesn't support audit_log_user_message())])
+  fi
+fi
+AM_CONDITIONAL(HAVE_AUDIT, test x$ac_cv_lib_audit_audit_log_user_message = xyes)
+
 
 AC_ARG_ENABLE([schedutils],
   AC_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]),