… | |
… | |
83 | support_utmp=yes |
83 | support_utmp=yes |
84 | support_wtmp=yes |
84 | support_wtmp=yes |
85 | support_lastlog=yes |
85 | support_lastlog=yes |
86 | |
86 | |
87 | AC_ARG_ENABLE(utmp, |
87 | AC_ARG_ENABLE(utmp, |
88 | [ --enable-utmp enable utmp (utmpx) support], |
88 | [AS_HELP_STRING([--enable-utmp],[enable utmp (utmpx) support])], |
89 | [if test x$enableval = xyes -o x$enableval = xno; then |
89 | [if test x$enableval = xyes -o x$enableval = xno; then |
90 | support_utmp=$enableval |
90 | support_utmp=$enableval |
91 | fi]) |
91 | fi]) |
92 | |
92 | |
93 | AC_ARG_ENABLE(wtmp, |
93 | AC_ARG_ENABLE(wtmp, |
94 | [ --enable-wtmp enable wtmp (wtmpx) support (requires --enable-utmp)], |
94 | [AS_HELP_STRING([--enable-wtmp],[enable wtmp (wtmpx) support (requires --enable-utmp)])], |
95 | [if test x$enableval = xyes -o x$enableval = xno; then |
95 | [if test x$enableval = xyes -o x$enableval = xno; then |
96 | support_wtmp=$enableval |
96 | support_wtmp=$enableval |
97 | fi]) |
97 | fi]) |
98 | |
98 | |
99 | AC_ARG_ENABLE(lastlog, |
99 | AC_ARG_ENABLE(lastlog, |
100 | [ --enable-lastlog enable lastlog support (requires --enable-utmp)], |
100 | [AS_HELP_STRING([--enable-lastlog],[enable lastlog support (requires --enable-utmp)])], |
101 | [if test x$enableval = xyes -o x$enableval = xno; then |
101 | [if test x$enableval = xyes -o x$enableval = xno; then |
102 | support_lastlog=$enableval |
102 | support_lastlog=$enableval |
103 | fi]) |
103 | fi]) |
104 | |
104 | |
105 | if test x$support_utmp = xyes; then |
105 | if test x$support_utmp = xyes; then |
… | |
… | |
111 | if test x$support_lastlog = xyes; then |
111 | if test x$support_lastlog = xyes; then |
112 | AC_DEFINE(LASTLOG_SUPPORT, 1, Define if you want to have lastlog support when utmp/utmpx is enabled) |
112 | AC_DEFINE(LASTLOG_SUPPORT, 1, Define if you want to have lastlog support when utmp/utmpx is enabled) |
113 | fi |
113 | fi |
114 | |
114 | |
115 | AC_CHECK_FUNCS( \ |
115 | AC_CHECK_FUNCS( \ |
116 | ttyslot \ |
|
|
117 | updwtmp \ |
116 | updwtmp \ |
118 | updwtmpx \ |
117 | updwtmpx \ |
|
|
118 | updlastlogx \ |
119 | ) |
119 | ) |
120 | |
120 | |
121 | AC_CHECK_HEADERS( \ |
121 | AC_CHECK_HEADERS( \ |
122 | utmp.h \ |
122 | utmp.h \ |
123 | utmpx.h \ |
123 | utmpx.h \ |
… | |
… | |
403 | exit(0); |
403 | exit(0); |
404 | }]])],[path_lastlog=`cat conftestval`],[path_lastlog=],[dnl |
404 | }]])],[path_lastlog=`cat conftestval`],[path_lastlog=],[dnl |
405 | AC_MSG_WARN(Define LASTLOG_FILE in config.h manually)])]) |
405 | AC_MSG_WARN(Define LASTLOG_FILE in config.h manually)])]) |
406 | if test x$path_lastlog != x; then |
406 | if test x$path_lastlog != x; then |
407 | AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$path_lastlog", Define location of lastlog) |
407 | AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$path_lastlog", Define location of lastlog) |
408 | if test -d "$path_lastlog"; then |
|
|
409 | AC_DEFINE(LASTLOG_IS_DIR, 1, Define if lastlog is provided via a directory) |
|
|
410 | fi |
|
|
411 | fi |
408 | fi |
412 | dnl# -------------------------------------------------------------------------- |
409 | dnl# -------------------------------------------------------------------------- |
413 | |
410 | |
414 | dnl# find lastlogx |
411 | dnl# find lastlogx |
415 | AC_CACHE_CHECK(where lastlogx is located, path_lastlogx, |
412 | AC_CACHE_CHECK(where lastlogx is located, path_lastlogx, |