… | |
… | |
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 | |
22 | have_clone=no |
26 | have_clone=no |
23 | |
27 | |
24 | AC_MSG_CHECKING(for /dev/ptym/clone) |
28 | AC_MSG_CHECKING(for /dev/ptym/clone) |
… | |
… | |
74 | fi |
78 | fi |
75 | ]) |
79 | ]) |
76 | |
80 | |
77 | AC_DEFUN([UTMP_CHECK], |
81 | AC_DEFUN([UTMP_CHECK], |
78 | [ |
82 | [ |
|
|
83 | support_utmp=yes |
|
|
84 | support_wtmp=yes |
|
|
85 | support_lastlog=yes |
|
|
86 | |
|
|
87 | AC_ARG_ENABLE(utmp, |
|
|
88 | [ --enable-utmp enable utmp (utmpx) support], |
|
|
89 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
90 | support_utmp=$enableval |
|
|
91 | fi]) |
|
|
92 | |
|
|
93 | AC_ARG_ENABLE(wtmp, |
|
|
94 | [ --enable-wtmp enable wtmp (wtmpx) support (requires --enable-utmp)], |
|
|
95 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
96 | support_wtmp=$enableval |
|
|
97 | fi]) |
|
|
98 | |
|
|
99 | AC_ARG_ENABLE(lastlog, |
|
|
100 | [ --enable-lastlog enable lastlog support (requires --enable-utmp)], |
|
|
101 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
102 | support_lastlog=$enableval |
|
|
103 | fi]) |
|
|
104 | |
|
|
105 | if test x$support_utmp = xyes; then |
|
|
106 | AC_DEFINE(UTMP_SUPPORT, 1, Define if you want to have utmp/utmpx support) |
|
|
107 | fi |
|
|
108 | if test x$support_wtmp = xyes; then |
|
|
109 | AC_DEFINE(WTMP_SUPPORT, 1, Define if you want to have wtmp support when utmp/utmpx is enabled) |
|
|
110 | fi |
|
|
111 | if 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) |
|
|
113 | fi |
|
|
114 | |
79 | AC_CHECK_FUNCS( \ |
115 | AC_CHECK_FUNCS( \ |
80 | ttyslot \ |
116 | ttyslot \ |
81 | updwtmp \ |
117 | updwtmp \ |
82 | updwtmpx \ |
118 | updwtmpx \ |
83 | ) |
119 | ) |
… | |
… | |
176 | dnl# -------------------------------------------------------------------------- |
212 | dnl# -------------------------------------------------------------------------- |
177 | |
213 | |
178 | dnl# find utmp |
214 | dnl# find utmp |
179 | AC_CACHE_CHECK(where utmp is located, path_utmp, |
215 | AC_CACHE_CHECK(where utmp is located, path_utmp, |
180 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
216 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
217 | #include <stdlib.h> |
181 | #include <sys/types.h> |
218 | #include <sys/types.h> |
182 | #include <utmp.h> |
219 | #include <utmp.h> |
183 | #include <errno.h> |
220 | #include <errno.h> |
184 | main() |
221 | main() |
185 | { |
222 | { |
… | |
… | |
212 | |
249 | |
213 | dnl# find utmpx - if a utmp file exists at the same location and is more than |
250 | dnl# find utmpx - if a utmp file exists at the same location and is more than |
214 | dnl# a day newer, then dump the utmpx. People leave lots of junk around. |
251 | dnl# a day newer, then dump the utmpx. People leave lots of junk around. |
215 | AC_CACHE_CHECK(where utmpx is located, path_utmpx, |
252 | AC_CACHE_CHECK(where utmpx is located, path_utmpx, |
216 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
253 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
254 | #include <stdlib.h> |
217 | #include <sys/types.h> |
255 | #include <sys/types.h> |
218 | #include <utmpx.h> |
256 | #include <utmpx.h> |
219 | #include <errno.h> |
257 | #include <errno.h> |
220 | #include <sys/stat.h> |
258 | #include <sys/stat.h> |
221 | #ifdef HAVE_STRING_H |
259 | #ifdef HAVE_STRING_H |
… | |
… | |
257 | dnl# -------------------------------------------------------------------------- |
295 | dnl# -------------------------------------------------------------------------- |
258 | |
296 | |
259 | dnl# find wtmp |
297 | dnl# find wtmp |
260 | AC_CACHE_CHECK(where wtmp is located, path_wtmp, |
298 | AC_CACHE_CHECK(where wtmp is located, path_wtmp, |
261 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
299 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
300 | #include <stdlib.h> |
262 | #include <sys/types.h> |
301 | #include <sys/types.h> |
263 | #ifdef HAVE_UTMP_H |
302 | #ifdef HAVE_UTMP_H |
264 | #include <utmp.h> |
303 | #include <utmp.h> |
265 | #endif |
304 | #endif |
266 | #include <errno.h> |
305 | #include <errno.h> |
267 | main() |
306 | main() |
268 | { |
307 | { |
269 | char **w, *wtmplist[] = { |
308 | char **w, *wtmplist[] = { |
270 | "/var/log/wtmp", "/var/adm/wtmp", "/etc/wtmp", "/usr/etc/wtmp", "/usr/adm/wtmp", NULL }; |
309 | "/var/log/wtmp", "/var/adm/wtmp", "/etc/wtmp", "/usr/etc/wtmp", "/usr/adm/wtmp", NULL }; |
271 | FILE *a, *f=fopen("conftestval", "w"); |
310 | FILE *a, *f=fopen("conftestval", "w"); |
272 | if (!f) exit(1); |
311 | if (!f) exit(1); |
273 | #ifdef WTMP_FILE |
312 | #ifdef WTMP_FILE |
274 | fprintf(f, "%s\n", WTMP_FILE); |
313 | fprintf(f, "%s\n", WTMP_FILE); |
275 | exit(0); |
314 | exit(0); |
… | |
… | |
293 | dnl# -------------------------------------------------------------------------- |
332 | dnl# -------------------------------------------------------------------------- |
294 | |
333 | |
295 | dnl# find wtmpx |
334 | dnl# find wtmpx |
296 | AC_CACHE_CHECK(where wtmpx is located, path_wtmpx, |
335 | AC_CACHE_CHECK(where wtmpx is located, path_wtmpx, |
297 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
336 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
337 | #include <stdlib.h> |
298 | #ifdef HAVE_UTMPX_H |
338 | #ifdef HAVE_UTMPX_H |
299 | #include <utmpx.h> |
339 | #include <utmpx.h> |
300 | #endif |
340 | #endif |
301 | #include <errno.h> |
341 | #include <errno.h> |
302 | main() |
342 | main() |
303 | { |
343 | { |
304 | char **w, *wtmplist[] = { |
344 | char **w, *wtmplist[] = { |
305 | "/var/log/wtmpx", "/var/adm/wtmpx", NULL }; |
345 | "/var/log/wtmpx", "/var/adm/wtmpx", NULL }; |
306 | FILE *a, *f=fopen("conftestval", "w"); |
346 | FILE *a, *f=fopen("conftestval", "w"); |
307 | if (!f) exit(1); |
347 | if (!f) exit(1); |
308 | #ifdef WTMPX_FILE |
348 | #ifdef WTMPX_FILE |
309 | fprintf(f, "%s\n", WTMPX_FILE); |
349 | fprintf(f, "%s\n", WTMPX_FILE); |
310 | exit(0); |
350 | exit(0); |
… | |
… | |
328 | dnl# -------------------------------------------------------------------------- |
368 | dnl# -------------------------------------------------------------------------- |
329 | |
369 | |
330 | dnl# find lastlog |
370 | dnl# find lastlog |
331 | AC_CACHE_CHECK(where lastlog is located, path_lastlog, |
371 | AC_CACHE_CHECK(where lastlog is located, path_lastlog, |
332 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
372 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
373 | #include <stdlib.h> |
333 | #include <sys/types.h> |
374 | #include <sys/types.h> |
334 | #ifdef HAVE_UTMPX_H |
375 | #ifdef HAVE_UTMPX_H |
335 | #include <utmpx.h> |
376 | #include <utmpx.h> |
336 | #elif defined(HAVE_UTMP_H) |
377 | #elif defined(HAVE_UTMP_H) |
337 | #include <utmp.h> |
378 | #include <utmp.h> |
… | |
… | |
371 | dnl# -------------------------------------------------------------------------- |
412 | dnl# -------------------------------------------------------------------------- |
372 | |
413 | |
373 | dnl# find lastlogx |
414 | dnl# find lastlogx |
374 | AC_CACHE_CHECK(where lastlogx is located, path_lastlogx, |
415 | AC_CACHE_CHECK(where lastlogx is located, path_lastlogx, |
375 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
416 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
417 | #include <stdlib.h> |
376 | #ifdef HAVE_UTMPX_H |
418 | #ifdef HAVE_UTMPX_H |
377 | #include <utmpx.h> |
419 | #include <utmpx.h> |
378 | #endif |
420 | #endif |
379 | #include <errno.h> |
421 | #include <errno.h> |
380 | main() |
422 | main() |
… | |
… | |
406 | |
448 | |
407 | AC_DEFUN([SCM_RIGHTS_CHECK], |
449 | AC_DEFUN([SCM_RIGHTS_CHECK], |
408 | [ |
450 | [ |
409 | AC_CACHE_CHECK(for unix-compliant filehandle passing ability, can_pass_fds, |
451 | AC_CACHE_CHECK(for unix-compliant filehandle passing ability, can_pass_fds, |
410 | [AC_TRY_LINK([ |
452 | [AC_TRY_LINK([ |
411 | #include <cstddef> // broken bsds (is that redundant) need this |
453 | #include <cstddef> // broken bsds (is that redundant?) need this |
412 | #include <sys/types.h> |
454 | #include <sys/types.h> |
413 | #include <sys/socket.h> |
455 | #include <sys/socket.h> |
414 | #include <sys/uio.h> |
456 | #include <sys/uio.h> |
415 | ],[ |
457 | ],[ |
416 | { |
458 | { |