summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWilliam Jon McCann <mccann@jhu.edu>2007-04-05 15:21:14 -0400
committerWilliam Jon McCann <mccann@jhu.edu>2007-04-05 15:21:14 -0400
commite0244a8f6dd0b7f8ebecc6bec52c013ce5286279 (patch)
tree9e890e4d7bba3ed70194c012fccbd159357afa1f /configure.ac
parent33dcd02c399e3255a7a64c1e90b258d79c14f2c4 (diff)
use inotify to detect activity on tty when possible
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 21 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index a3dbae0..c2cba96 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,6 @@ AC_CHECK_HEADERS(paths.h)
AC_TYPE_UID_T
-AC_CHECK_FUNCS([setresuid setenv unsetenv clearenv])
PKG_CHECK_MODULES(CONSOLE_KIT,
dbus-glib-1 >= $DBUS_REQUIRED_VERSION
gobject-2.0 >= $GLIB_REQUIRED_VERSION
@@ -121,7 +120,7 @@ dnl ---------------------------------------------------------------------------
dnl - PID file
dnl ---------------------------------------------------------------------------
-AC_ARG_WITH(pid-file,
+AC_ARG_WITH(pid-file,
[AC_HELP_STRING([--with-pid-file=<file>],
[pid file location])])
@@ -171,7 +170,7 @@ AC_CHECK_LIB(pam, pam_syslog, [AC_DEFINE(HAVE_PAM_SYSLOG, [], [Define to 1 if yo
# Check if we should build the PAM module
msg_pam_module=no
-AC_ARG_ENABLE(pam-module,
+AC_ARG_ENABLE(pam-module,
[AC_HELP_STRING([--enable-pam-module],
[build PAM module])],
, enable_pam_module=no)
@@ -229,13 +228,30 @@ AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes)
AC_MSG_RESULT(yes)
dnl ---------------------------------------------------------------------------
+dnl check for inotify
+dnl ---------------------------------------------------------------------------
+
+enable_inotify=no
+AC_CHECK_FUNC(inotify_init,
+ [AC_CHECK_HEADER([sys/inotify.h],
+ [enable_inotify=yes],
+ [])],
+ [])
+
+AM_CONDITIONAL(ENABLE_INOTIFY, test "x$enable_inotify" = "xyes")
+
+if test "x$enable_inotify" = "xyes" ; then
+ AC_DEFINE(ENABLE_INOTIFY, [], [Define if we have inotify])
+fi
+
+dnl ---------------------------------------------------------------------------
dnl Finish
dnl ---------------------------------------------------------------------------
# Turn on the additional warnings last, so -Werror doesn't affect other tests.
AC_ARG_ENABLE(more-warnings,
- [AC_HELP_STRING([--enable-more-warnings],
+ [AC_HELP_STRING([--enable-more-warnings],
[Maximum compiler warnings])],
set_more_warnings="$enableval",[
if test -d $srcdir/.git; then
@@ -276,7 +292,7 @@ fi
#
# Enable Debug
#
-AC_ARG_ENABLE(debug,
+AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-debug],
[turn on debugging])],
, enable_debug=yes)