… | |
… | |
146 | dnl# -------------------------------------------------------------------------- |
146 | dnl# -------------------------------------------------------------------------- |
147 | dnl# check for host field in utmp structure |
147 | dnl# check for host field in utmp structure |
148 | |
148 | |
149 | dnl# -------------------------------------------- |
149 | dnl# -------------------------------------------- |
150 | AC_CHECK_HEADERS(utmp.h, |
150 | AC_CHECK_HEADERS(utmp.h, |
151 | [AC_CACHE_CHECK([for struct utmp], pt_cv_struct_utmp, |
151 | AC_CHECK_TYPES([struct utmp], [], [], [ |
152 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
152 | #include <sys/types.h> |
153 | #include <utmp.h>]], [[struct utmp ut;]])],[pt_cv_struct_utmp=yes],[pt_cv_struct_utmp=no])]) |
153 | #include <utmp.h> |
154 | if test x$pt_cv_struct_utmp = xyes; then |
154 | ]) |
155 | AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) |
|
|
156 | fi |
|
|
157 | ] |
|
|
158 | |
155 | |
159 | AC_CACHE_CHECK(for ut_host in utmp struct, pt_cv_struct_utmp_host, |
156 | AC_CHECK_MEMBER([struct utmp.ut_host], |
160 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
|
161 | #include <utmp.h>]], [[struct utmp ut; ut.ut_host;]])],[pt_cv_struct_utmp_host=yes],[pt_cv_struct_utmp_host=no])]) |
|
|
162 | if test x$pt_cv_struct_utmp_host = xyes; then |
|
|
163 | AC_DEFINE(HAVE_UTMP_HOST, 1, Define if struct utmp contains ut_host) |
157 | [AC_DEFINE(HAVE_UTMP_HOST, 1, Define if struct utmp contains ut_host)], [], [ |
164 | fi |
158 | #include <sys/types.h> |
|
|
159 | #include <utmp.h> |
|
|
160 | ]) |
165 | |
161 | |
166 | AC_CACHE_CHECK(for ut_pid in utmp struct, pt_cv_struct_utmp_pid, |
162 | AC_CHECK_MEMBER([struct utmp.ut_pid], |
167 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
|
168 | #include <utmp.h>]], [[struct utmp ut; ut.ut_pid;]])],[pt_cv_struct_utmp_pid=yes],[pt_cv_struct_utmp_pid=no])]) |
|
|
169 | if test x$pt_cv_struct_utmp_pid = xyes; then |
|
|
170 | AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid) |
163 | [AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid)], [], [ |
171 | fi |
164 | #include <sys/types.h> |
|
|
165 | #include <utmp.h> |
|
|
166 | ]) |
172 | ) dnl# AC_CHECK_HEADERS(utmp.h |
167 | ) dnl# AC_CHECK_HEADERS(utmp.h |
173 | |
168 | |
174 | dnl# -------------------------------------------- |
169 | dnl# -------------------------------------------- |
175 | |
170 | |
176 | AC_CHECK_HEADERS(utmpx.h, |
171 | AC_CHECK_HEADERS(utmpx.h, |
177 | [AC_CACHE_CHECK([for struct utmpx], pt_cv_struct_utmpx, |
172 | AC_CHECK_TYPES([struct utmpx], [], [], [ |
178 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
173 | #include <sys/types.h> |
179 | #include <utmpx.h>]], [[struct utmpx ut;]])],[pt_cv_struct_utmpx=yes],[pt_cv_struct_utmpx=no])]) |
174 | #include <utmpx.h> |
180 | if test x$pt_cv_struct_utmpx = xyes; then |
175 | ]) |
181 | AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx) |
|
|
182 | fi |
|
|
183 | ] |
|
|
184 | |
176 | |
185 | AC_CACHE_CHECK(for host in utmpx struct, pt_cv_struct_utmpx_host, |
177 | AC_CHECK_MEMBER([struct utmpx.ut_host], |
186 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
|
187 | #include <utmpx.h>]], [[struct utmpx utx; utx.ut_host;]])],[pt_cv_struct_utmpx_host=yes],[pt_cv_struct_utmpx_host=no])]) |
|
|
188 | if test x$pt_cv_struct_utmpx_host = xyes; then |
|
|
189 | AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) |
178 | [AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host)], [], [ |
190 | fi |
179 | #include <sys/types.h> |
|
|
180 | #include <utmpx.h> |
|
|
181 | ]) |
191 | |
182 | |
192 | AC_CACHE_CHECK(for session in utmpx struct, pt_cv_struct_utmpx_session, |
183 | AC_CHECK_MEMBER([struct utmpx.ut_session], |
193 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
|
194 | #include <utmpx.h>]], [[struct utmpx utx; utx.ut_session;]])],[pt_cv_struct_utmpx_session=yes],[pt_cv_struct_utmpx_session=no])]) |
|
|
195 | if test x$pt_cv_struct_utmpx_session = xyes; then |
|
|
196 | AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session) |
184 | [AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session)], [], [ |
197 | fi |
185 | #include <sys/types.h> |
|
|
186 | #include <utmpx.h> |
|
|
187 | ]) |
198 | ) dnl# AC_CHECK_HEADERS(utmpx.h |
188 | ) dnl# AC_CHECK_HEADERS(utmpx.h |
199 | |
189 | |
200 | dnl# -------------------------------------------------------------------------- |
190 | dnl# -------------------------------------------------------------------------- |
201 | dnl# check for struct lastlog |
191 | dnl# check for struct lastlog |
202 | AC_CACHE_CHECK(for struct lastlog, pt_cv_struct_lastlog, |
192 | AC_CHECK_TYPES([struct lastlog], [], [], [ |
203 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
193 | #include <sys/types.h> |
204 | #include <utmp.h> |
194 | #include <utmp.h> |
205 | #ifdef HAVE_LASTLOG_H |
195 | #ifdef HAVE_LASTLOG_H |
206 | #include <lastlog.h> |
196 | #include <lastlog.h> |
207 | #endif |
197 | #endif |
208 | ]], [[struct lastlog ll;]])],[pt_cv_struct_lastlog=yes],[pt_cv_struct_lastlog=no])]) |
198 | ]) |
209 | if test x$pt_cv_struct_lastlog = xyes; then |
|
|
210 | AC_DEFINE(HAVE_STRUCT_LASTLOG, 1, Define if utmp.h or lastlog.h has struct lastlog) |
|
|
211 | fi |
|
|
212 | |
199 | |
213 | dnl# check for struct lastlogx |
200 | dnl# check for struct lastlogx |
214 | AC_CACHE_CHECK(for struct lastlogx, pt_cv_struct_lastlogx, |
201 | AC_CHECK_TYPES([struct lastlogx], [], [], [ |
215 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
202 | #include <sys/types.h> |
216 | #include <utmpx.h> |
203 | #include <utmpx.h> |
217 | #ifdef HAVE_LASTLOG_H |
204 | #ifdef HAVE_LASTLOG_H |
218 | #include <lastlog.h> |
205 | #include <lastlog.h> |
219 | #endif |
206 | #endif |
220 | ]], [[struct lastlogx ll;]])],[pt_cv_struct_lastlogx=yes],[pt_cv_struct_lastlogx=no])]) |
207 | ]) |
221 | if test x$pt_cv_struct_lastlogx = xyes; then |
|
|
222 | AC_DEFINE(HAVE_STRUCT_LASTLOGX, 1, Define if utmpx.h or lastlog.h has struct lastlogx) |
|
|
223 | fi |
|
|
224 | |
208 | |
225 | dnl# -------------------------------------------------------------------------- |
209 | dnl# -------------------------------------------------------------------------- |
226 | dnl# FIND FILES |
210 | dnl# FIND FILES |
227 | dnl# -------------------------------------------------------------------------- |
211 | dnl# -------------------------------------------------------------------------- |
228 | |
212 | |