ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libptytty/ptytty.m4
(Generate patch)

Comparing libptytty/ptytty.m4 (file contents):
Revision 1.25 by sf-exg, Thu May 12 16:43:47 2011 UTC vs.
Revision 1.26 by sf-exg, Mon May 23 11:04:41 2011 UTC

146dnl# -------------------------------------------------------------------------- 146dnl# --------------------------------------------------------------------------
147dnl# check for host field in utmp structure 147dnl# check for host field in utmp structure
148 148
149dnl# -------------------------------------------- 149dnl# --------------------------------------------
150AC_CHECK_HEADERS(utmp.h, 150AC_CHECK_HEADERS(utmp.h,
151[AC_CACHE_CHECK([for struct utmp], pt_cv_struct_utmp, 151AC_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>
154if test x$pt_cv_struct_utmp = xyes; then 154])
155 AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp)
156fi
157]
158 155
159AC_CACHE_CHECK(for ut_host in utmp struct, pt_cv_struct_utmp_host, 156AC_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])])
162if 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)], [], [
164fi 158#include <sys/types.h>
159#include <utmp.h>
160])
165 161
166AC_CACHE_CHECK(for ut_pid in utmp struct, pt_cv_struct_utmp_pid, 162AC_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])])
169if 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)], [], [
171fi 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
174dnl# -------------------------------------------- 169dnl# --------------------------------------------
175 170
176AC_CHECK_HEADERS(utmpx.h, 171AC_CHECK_HEADERS(utmpx.h,
177[AC_CACHE_CHECK([for struct utmpx], pt_cv_struct_utmpx, 172AC_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>
180if test x$pt_cv_struct_utmpx = xyes; then 175])
181 AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx)
182fi
183]
184 176
185AC_CACHE_CHECK(for host in utmpx struct, pt_cv_struct_utmpx_host, 177AC_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])])
188if 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)], [], [
190fi 179#include <sys/types.h>
180#include <utmpx.h>
181])
191 182
192AC_CACHE_CHECK(for session in utmpx struct, pt_cv_struct_utmpx_session, 183AC_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])])
195if 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)], [], [
197fi 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
200dnl# -------------------------------------------------------------------------- 190dnl# --------------------------------------------------------------------------
201dnl# check for struct lastlog 191dnl# check for struct lastlog
202AC_CACHE_CHECK(for struct lastlog, pt_cv_struct_lastlog, 192AC_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])
209if 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)
211fi
212 199
213dnl# check for struct lastlogx 200dnl# check for struct lastlogx
214AC_CACHE_CHECK(for struct lastlogx, pt_cv_struct_lastlogx, 201AC_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])
221if 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)
223fi
224 208
225dnl# -------------------------------------------------------------------------- 209dnl# --------------------------------------------------------------------------
226dnl# FIND FILES 210dnl# FIND FILES
227dnl# -------------------------------------------------------------------------- 211dnl# --------------------------------------------------------------------------
228 212

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines