summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.h.in3
-rw-r--r--configure.ac13
2 files changed, 16 insertions, 0 deletions
diff --git a/config.h.in b/config.h.in
index b486f264a..807cecfdc 100644
--- a/config.h.in
+++ b/config.h.in
@@ -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
diff --git a/configure.ac b/configure.ac
index ccd05b361..95690ddf1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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]),