summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEd Schouten <ed@80386.nl>2011-06-26 14:04:20 +0200
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-06-26 09:30:31 -0700
commit18d68ce74bd810bc09f99a476798b8e4a66ec494 (patch)
treec6defc3bc8077905ada0a235df8fc41ae9f92672 /configure.ac
parent9e93c5f65a22824f6b4af7ee68944f2226f7efa7 (diff)
Make lastlog work on BSD systems without <lastlog.h>.
FreeBSD 8.x and lower have struct lastlog in <utmp.h>. Add a specific Autoconf check for struct lastlog, where we include both <utmp.h> and <lastlog.h>. Also, change NO_LASTLOG to a definition for the opposite; USE_LASTLOG. This is more consistent with USE_UTMP and USE_UTMPX. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 739abfa..98061b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,7 @@ XORG_DEFAULT_OPTIONS
XORG_WITH_LINT
# Checks for header files.
-AC_CHECK_HEADERS([lastlog.h utmp.h utmpx.h sys/param.h])
+AC_CHECK_HEADERS([lastlog.h pwd.h utmp.h utmpx.h sys/param.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_MEMBERS([
@@ -53,6 +53,16 @@ AC_CHECK_MEMBERS([
#include <utmp.h>
])
AC_CHECK_MEMBERS([struct utmpx.ut_syslen], [], [], [#include <utmpx.h>])
+AC_CHECK_TYPES([
+ struct lastlog], [], [],[
+ #include <sys/types.h>
+ #ifdef HAVE_UTMP_H
+ #include <utmp.h>
+ #endif
+ #ifdef HAVE_LASTLOG_H
+ #include <lastlog.h>
+ #endif
+ ])
# Checks for library functions.
AC_CHECK_FUNCS([pututline updwtmpx utmpxname])