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

Comparing libptytty/ptytty.m4 (file contents):
Revision 1.10 by ayin, Wed Jun 13 17:30:54 2007 UTC vs.
Revision 1.15 by ayin, Mon Nov 5 22:06:56 2007 UTC

83support_utmp=yes 83support_utmp=yes
84support_wtmp=yes 84support_wtmp=yes
85support_lastlog=yes 85support_lastlog=yes
86 86
87AC_ARG_ENABLE(utmp, 87AC_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
93AC_ARG_ENABLE(wtmp, 93AC_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
99AC_ARG_ENABLE(lastlog, 99AC_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
105if test x$support_utmp = xyes; then 105if test x$support_utmp = xyes; then
111if test x$support_lastlog = xyes; then 111if 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)
113fi 113fi
114 114
115AC_CHECK_FUNCS( \ 115AC_CHECK_FUNCS( \
116 ttyslot \
117 updwtmp \ 116 updwtmp \
118 updwtmpx \ 117 updwtmpx \
118 updlastlogx \
119) 119)
120 120
121AC_CHECK_HEADERS( \ 121AC_CHECK_HEADERS(lastlog.h)
122 utmp.h \
123 utmpx.h \
124 lastlog.h \
125)
126 122
127dnl# -------------------------------------------------------------------------- 123dnl# --------------------------------------------------------------------------
128dnl# DO ALL UTMP AND WTMP CHECKING 124dnl# DO ALL UTMP AND WTMP CHECKING
129dnl# -------------------------------------------------------------------------- 125dnl# --------------------------------------------------------------------------
130dnl# check for host field in utmp structure 126dnl# check for host field in utmp structure
131 127
132dnl# -------------------------------------------- 128dnl# --------------------------------------------
133AC_CHECK_HEADER(utmp.h, 129AC_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])])
137if test x$struct_utmp = xyes; then 133if 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])])
152if test x$struct_utmp_pid = xyes; then 148if 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)
154fi 150fi
155) dnl# AC_CHECK_HEADER(utmp.h 151) dnl# AC_CHECK_HEADERS(utmp.h
156 152
157dnl# -------------------------------------------- 153dnl# --------------------------------------------
158 154
159AC_CHECK_HEADER(utmpx.h, 155AC_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])])
163if test x$struct_utmpx = xyes; then 159if 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;],
179struct_utmpx_session=yes, struct_utmpx_session=no)]) 175struct_utmpx_session=yes, struct_utmpx_session=no)])
180if test x$struct_utmpx_session = xyes; then 176if 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)
182fi 178fi
183) dnl# AC_CHECK_HEADER(utmpx.h 179) dnl# AC_CHECK_HEADERS(utmpx.h
184 180
185dnl# -------------------------------------------------------------------------- 181dnl# --------------------------------------------------------------------------
186dnl# check for struct lastlog 182dnl# check for struct lastlog
187AC_CACHE_CHECK(for struct lastlog, struct_lastlog, 183AC_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>
403 exit(0); 399 exit(0);
404}]])],[path_lastlog=`cat conftestval`],[path_lastlog=],[dnl 400}]])],[path_lastlog=`cat conftestval`],[path_lastlog=],[dnl
405 AC_MSG_WARN(Define LASTLOG_FILE in config.h manually)])]) 401 AC_MSG_WARN(Define LASTLOG_FILE in config.h manually)])])
406if test x$path_lastlog != x; then 402if test x$path_lastlog != x; then
407 AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$path_lastlog", Define location of lastlog) 403 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
411fi 404fi
412dnl# -------------------------------------------------------------------------- 405dnl# --------------------------------------------------------------------------
413 406
414dnl# find lastlogx 407dnl# find lastlogx
415AC_CACHE_CHECK(where lastlogx is located, path_lastlogx, 408AC_CACHE_CHECK(where lastlogx is located, path_lastlogx,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines