… | |
… | |
116 | updwtmp \ |
116 | updwtmp \ |
117 | updwtmpx \ |
117 | updwtmpx \ |
118 | updlastlogx \ |
118 | updlastlogx \ |
119 | ) |
119 | ) |
120 | |
120 | |
121 | AC_CHECK_HEADERS( \ |
121 | AC_CHECK_HEADERS(lastlog.h) |
122 | utmp.h \ |
|
|
123 | utmpx.h \ |
|
|
124 | lastlog.h \ |
|
|
125 | ) |
|
|
126 | |
122 | |
127 | dnl# -------------------------------------------------------------------------- |
123 | dnl# -------------------------------------------------------------------------- |
128 | dnl# DO ALL UTMP AND WTMP CHECKING |
124 | dnl# DO ALL UTMP AND WTMP CHECKING |
129 | dnl# -------------------------------------------------------------------------- |
125 | dnl# -------------------------------------------------------------------------- |
130 | dnl# check for host field in utmp structure |
126 | dnl# check for host field in utmp structure |
131 | |
127 | |
132 | dnl# -------------------------------------------- |
128 | dnl# -------------------------------------------- |
133 | AC_CHECK_HEADER(utmp.h, |
129 | AC_CHECK_HEADERS(utmp.h, |
134 | [AC_CACHE_CHECK([for struct utmp], struct_utmp, |
130 | [AC_CACHE_CHECK([for struct utmp], struct_utmp, |
135 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
131 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
136 | #include <utmp.h>]], [[struct utmp ut;]])],[struct_utmp=yes],[struct_utmp=no])]) |
132 | #include <utmp.h>]], [[struct utmp ut;]])],[struct_utmp=yes],[struct_utmp=no])]) |
137 | if test x$struct_utmp = xyes; then |
133 | if test x$struct_utmp = xyes; then |
138 | AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) |
134 | AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) |
… | |
… | |
150 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
146 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
151 | #include <utmp.h>]], [[struct utmp ut; ut.ut_pid;]])],[struct_utmp_pid=yes],[struct_utmp_pid=no])]) |
147 | #include <utmp.h>]], [[struct utmp ut; ut.ut_pid;]])],[struct_utmp_pid=yes],[struct_utmp_pid=no])]) |
152 | if test x$struct_utmp_pid = xyes; then |
148 | if test x$struct_utmp_pid = xyes; then |
153 | AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid) |
149 | AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid) |
154 | fi |
150 | fi |
155 | ) dnl# AC_CHECK_HEADER(utmp.h |
151 | ) dnl# AC_CHECK_HEADERS(utmp.h |
156 | |
152 | |
157 | dnl# -------------------------------------------- |
153 | dnl# -------------------------------------------- |
158 | |
154 | |
159 | AC_CHECK_HEADER(utmpx.h, |
155 | AC_CHECK_HEADERS(utmpx.h, |
160 | [AC_CACHE_CHECK([for struct utmpx], struct_utmpx, |
156 | [AC_CACHE_CHECK([for struct utmpx], struct_utmpx, |
161 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
157 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
162 | #include <utmpx.h>]], [[struct utmpx ut;]])],[struct_utmpx=yes],[struct_utmpx=no])]) |
158 | #include <utmpx.h>]], [[struct utmpx ut;]])],[struct_utmpx=yes],[struct_utmpx=no])]) |
163 | if test x$struct_utmpx = xyes; then |
159 | if test x$struct_utmpx = xyes; then |
164 | AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx) |
160 | AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx) |
… | |
… | |
178 | [struct utmpx utx; utx.ut_session;], |
174 | [struct utmpx utx; utx.ut_session;], |
179 | struct_utmpx_session=yes, struct_utmpx_session=no)]) |
175 | struct_utmpx_session=yes, struct_utmpx_session=no)]) |
180 | if test x$struct_utmpx_session = xyes; then |
176 | if test x$struct_utmpx_session = xyes; then |
181 | AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session) |
177 | AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session) |
182 | fi |
178 | fi |
183 | ) dnl# AC_CHECK_HEADER(utmpx.h |
179 | ) dnl# AC_CHECK_HEADERS(utmpx.h |
184 | |
180 | |
185 | dnl# -------------------------------------------------------------------------- |
181 | dnl# -------------------------------------------------------------------------- |
186 | dnl# check for struct lastlog |
182 | dnl# check for struct lastlog |
187 | AC_CACHE_CHECK(for struct lastlog, struct_lastlog, |
183 | AC_CACHE_CHECK(for struct lastlog, struct_lastlog, |
188 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
184 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |