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

Comparing libptytty/ptytty.m4 (file contents):
Revision 1.6 by root, Wed Jan 25 21:17:46 2006 UTC vs.
Revision 1.12 by ayin, Sun Nov 4 09:08:42 2007 UTC

15 revoke \ 15 revoke \
16 _getpty \ 16 _getpty \
17 getpt \ 17 getpt \
18 posix_openpt \ 18 posix_openpt \
19 isastream \ 19 isastream \
20 setuid \
21 seteuid \
22 setreuid \
23 setresuid \
20) 24)
21 25
22have_clone=no 26have_clone=no
23 27
24AC_MSG_CHECKING(for /dev/ptym/clone) 28AC_MSG_CHECKING(for /dev/ptym/clone)
79support_utmp=yes 83support_utmp=yes
80support_wtmp=yes 84support_wtmp=yes
81support_lastlog=yes 85support_lastlog=yes
82 86
83AC_ARG_ENABLE(utmp, 87AC_ARG_ENABLE(utmp,
84 [ --enable-utmp enable utmp (utmpx) support], 88 [AS_HELP_STRING([--enable-utmp],[enable utmp (utmpx) support])],
85 [if test x$enableval = xyes -o x$enableval = xno; then 89 [if test x$enableval = xyes -o x$enableval = xno; then
86 support_utmp=$enableval 90 support_utmp=$enableval
87 fi]) 91 fi])
88 92
89AC_ARG_ENABLE(wtmp, 93AC_ARG_ENABLE(wtmp,
90 [ --enable-wtmp enable wtmp (wtmpx) support (requires --enable-utmp)], 94 [AS_HELP_STRING([--enable-wtmp],[enable wtmp (wtmpx) support (requires --enable-utmp)])],
91 [if test x$enableval = xyes -o x$enableval = xno; then 95 [if test x$enableval = xyes -o x$enableval = xno; then
92 support_wtmp=$enableval 96 support_wtmp=$enableval
93 fi]) 97 fi])
94 98
95AC_ARG_ENABLE(lastlog, 99AC_ARG_ENABLE(lastlog,
96 [ --enable-lastlog enable lastlog support (requires --enable-utmp)], 100 [AS_HELP_STRING([--enable-lastlog],[enable lastlog support (requires --enable-utmp)])],
97 [if test x$enableval = xyes -o x$enableval = xno; then 101 [if test x$enableval = xyes -o x$enableval = xno; then
98 support_lastlog=$enableval 102 support_lastlog=$enableval
99 fi]) 103 fi])
100 104
101if test x$support_utmp = xyes; then 105if test x$support_utmp = xyes; then
110 114
111AC_CHECK_FUNCS( \ 115AC_CHECK_FUNCS( \
112 ttyslot \ 116 ttyslot \
113 updwtmp \ 117 updwtmp \
114 updwtmpx \ 118 updwtmpx \
119 updlastlogx \
115) 120)
116 121
117AC_CHECK_HEADERS( \ 122AC_CHECK_HEADERS( \
118 utmp.h \ 123 utmp.h \
119 utmpx.h \ 124 utmpx.h \
208dnl# -------------------------------------------------------------------------- 213dnl# --------------------------------------------------------------------------
209 214
210dnl# find utmp 215dnl# find utmp
211AC_CACHE_CHECK(where utmp is located, path_utmp, 216AC_CACHE_CHECK(where utmp is located, path_utmp,
212[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> 217[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
218#include <stdlib.h>
213#include <sys/types.h> 219#include <sys/types.h>
214#include <utmp.h> 220#include <utmp.h>
215#include <errno.h> 221#include <errno.h>
216main() 222main()
217{ 223{
244 250
245dnl# find utmpx - if a utmp file exists at the same location and is more than 251dnl# find utmpx - if a utmp file exists at the same location and is more than
246dnl# a day newer, then dump the utmpx. People leave lots of junk around. 252dnl# a day newer, then dump the utmpx. People leave lots of junk around.
247AC_CACHE_CHECK(where utmpx is located, path_utmpx, 253AC_CACHE_CHECK(where utmpx is located, path_utmpx,
248[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> 254[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
255#include <stdlib.h>
249#include <sys/types.h> 256#include <sys/types.h>
250#include <utmpx.h> 257#include <utmpx.h>
251#include <errno.h> 258#include <errno.h>
252#include <sys/stat.h> 259#include <sys/stat.h>
253#ifdef HAVE_STRING_H 260#ifdef HAVE_STRING_H
289dnl# -------------------------------------------------------------------------- 296dnl# --------------------------------------------------------------------------
290 297
291dnl# find wtmp 298dnl# find wtmp
292AC_CACHE_CHECK(where wtmp is located, path_wtmp, 299AC_CACHE_CHECK(where wtmp is located, path_wtmp,
293[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> 300[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
301#include <stdlib.h>
294#include <sys/types.h> 302#include <sys/types.h>
295#ifdef HAVE_UTMP_H 303#ifdef HAVE_UTMP_H
296#include <utmp.h> 304#include <utmp.h>
297#endif 305#endif
298#include <errno.h> 306#include <errno.h>
299main() 307main()
300{ 308{
301 char **w, *wtmplist[] = { 309 char **w, *wtmplist[] = {
302 "/var/log/wtmp", "/var/adm/wtmp", "/etc/wtmp", "/usr/etc/wtmp", "/usr/adm/wtmp", NULL }; 310 "/var/log/wtmp", "/var/adm/wtmp", "/etc/wtmp", "/usr/etc/wtmp", "/usr/adm/wtmp", NULL };
303 FILE *a, *f=fopen("conftestval", "w"); 311 FILE *a, *f=fopen("conftestval", "w");
304 if (!f) exit(1); 312 if (!f) exit(1);
305#ifdef WTMP_FILE 313#ifdef WTMP_FILE
306 fprintf(f, "%s\n", WTMP_FILE); 314 fprintf(f, "%s\n", WTMP_FILE);
307 exit(0); 315 exit(0);
325dnl# -------------------------------------------------------------------------- 333dnl# --------------------------------------------------------------------------
326 334
327dnl# find wtmpx 335dnl# find wtmpx
328AC_CACHE_CHECK(where wtmpx is located, path_wtmpx, 336AC_CACHE_CHECK(where wtmpx is located, path_wtmpx,
329[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> 337[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
338#include <stdlib.h>
330#ifdef HAVE_UTMPX_H 339#ifdef HAVE_UTMPX_H
331#include <utmpx.h> 340#include <utmpx.h>
332#endif 341#endif
333#include <errno.h> 342#include <errno.h>
334main() 343main()
335{ 344{
336 char **w, *wtmplist[] = { 345 char **w, *wtmplist[] = {
337 "/var/log/wtmpx", "/var/adm/wtmpx", NULL }; 346 "/var/log/wtmpx", "/var/adm/wtmpx", NULL };
338 FILE *a, *f=fopen("conftestval", "w"); 347 FILE *a, *f=fopen("conftestval", "w");
339 if (!f) exit(1); 348 if (!f) exit(1);
340#ifdef WTMPX_FILE 349#ifdef WTMPX_FILE
341 fprintf(f, "%s\n", WTMPX_FILE); 350 fprintf(f, "%s\n", WTMPX_FILE);
342 exit(0); 351 exit(0);
360dnl# -------------------------------------------------------------------------- 369dnl# --------------------------------------------------------------------------
361 370
362dnl# find lastlog 371dnl# find lastlog
363AC_CACHE_CHECK(where lastlog is located, path_lastlog, 372AC_CACHE_CHECK(where lastlog is located, path_lastlog,
364[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> 373[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
374#include <stdlib.h>
365#include <sys/types.h> 375#include <sys/types.h>
366#ifdef HAVE_UTMPX_H 376#ifdef HAVE_UTMPX_H
367#include <utmpx.h> 377#include <utmpx.h>
368#elif defined(HAVE_UTMP_H) 378#elif defined(HAVE_UTMP_H)
369#include <utmp.h> 379#include <utmp.h>
403dnl# -------------------------------------------------------------------------- 413dnl# --------------------------------------------------------------------------
404 414
405dnl# find lastlogx 415dnl# find lastlogx
406AC_CACHE_CHECK(where lastlogx is located, path_lastlogx, 416AC_CACHE_CHECK(where lastlogx is located, path_lastlogx,
407[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> 417[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
418#include <stdlib.h>
408#ifdef HAVE_UTMPX_H 419#ifdef HAVE_UTMPX_H
409#include <utmpx.h> 420#include <utmpx.h>
410#endif 421#endif
411#include <errno.h> 422#include <errno.h>
412main() 423main()
431 exit(0); 442 exit(0);
432}]])],[path_lastlogx=`cat conftestval`],[path_lastlogx=],[dnl 443}]])],[path_lastlogx=`cat conftestval`],[path_lastlogx=],[dnl
433 AC_MSG_WARN(Define LASTLOGX_FILE in config.h manually)])]) 444 AC_MSG_WARN(Define LASTLOGX_FILE in config.h manually)])])
434if test x$path_lastlogx != x; then 445if test x$path_lastlogx != x; then
435 AC_DEFINE_UNQUOTED(LASTLOGX_FILE, "$path_lastlogx", Define location of lastlogx) 446 AC_DEFINE_UNQUOTED(LASTLOGX_FILE, "$path_lastlogx", Define location of lastlogx)
436fi
437
438if test x$support_utmp != xyes; then
439 echo " utmp support: disabled"
440 echo
441else
442 echo " utmp support: enabled
443 utmp file: $path_utmp
444 utmpx file: $path_utmpx
445 wtmp file: $path_wtmp
446 wtmpx file: $path_wtmpx
447 lastlog file: $path_lastlog
448 lastlogx file: $path_lastlogx"
449fi 447fi
450]) 448])
451 449
452AC_DEFUN([SCM_RIGHTS_CHECK], 450AC_DEFUN([SCM_RIGHTS_CHECK],
453[ 451[

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines