summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-08-11 01:43:23 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-11 01:44:38 +0200
commit4927fcae48de061393b3ce9c12d49f80d73fbf1d (patch)
tree4034f6843ab1ed8ca8e3d9acf87897a9fd592c5e /configure.ac
parentb95cf3629e8d78a0d28e71b0f5559fa9a8c038b5 (diff)
audit,utmp: implement audit logic and rip utmp stuff out of the main daemon and into a helper binary
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac36
1 files changed, 36 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f5dba3a86f..72218e4df4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -186,6 +186,42 @@ fi
AC_SUBST(PAM_LIBS)
AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
+AC_ARG_ENABLE([audit],
+ AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
+ [case "${enableval}" in
+ yes) have_audit=yes ;;
+ no) have_audit=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
+ esac],
+ [have_audit=auto])
+
+if test "x${have_audit}" != xno ; then
+ AC_CHECK_HEADERS(
+ [libaudit.h],
+ [have_audit=yes],
+ [if test "x$have_audit" = xyes ; then
+ AC_MSG_ERROR([*** AUDIT headers not found.])
+ fi])
+
+ AC_CHECK_LIB(
+ [audit],
+ [audit_open],
+ [have_audit=yes],
+ [if test "x$have_audit" = xyes ; then
+ AC_MSG_ERROR([*** libaudit not found.])
+ fi])
+
+ if test "x$have_audit" = xyes ; then
+ AUDIT_LIBS="-laudit"
+ AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
+ else
+ have_audit=no
+ fi
+else
+ AUDIT_LIBS=
+fi
+AC_SUBST(AUDIT_LIBS)
+
have_gtk=no
AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [disable GTK tools]))
if test "x$enable_gtk" != "xno"; then