… | |
… | |
7 | pty.h \ |
7 | pty.h \ |
8 | util.h \ |
8 | util.h \ |
9 | libutil.h \ |
9 | libutil.h \ |
10 | sys/ioctl.h \ |
10 | sys/ioctl.h \ |
11 | sys/stropts.h \ |
11 | sys/stropts.h \ |
|
|
12 | stropts.h \ |
12 | ) |
13 | ) |
13 | |
14 | |
14 | AC_CHECK_FUNCS( \ |
15 | AC_CHECK_FUNCS( \ |
15 | revoke \ |
16 | revoke \ |
16 | _getpty \ |
17 | _getpty \ |
… | |
… | |
125 | dnl# -------------------------------------------------------------------------- |
126 | dnl# -------------------------------------------------------------------------- |
126 | dnl# check for host field in utmp structure |
127 | dnl# check for host field in utmp structure |
127 | |
128 | |
128 | dnl# -------------------------------------------- |
129 | dnl# -------------------------------------------- |
129 | AC_CHECK_HEADERS(utmp.h, |
130 | AC_CHECK_HEADERS(utmp.h, |
130 | [AC_CACHE_CHECK([for struct utmp], struct_utmp, |
131 | [AC_CACHE_CHECK([for struct utmp], pt_cv_struct_utmp, |
131 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
132 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
132 | #include <utmp.h>]], [[struct utmp ut;]])],[struct_utmp=yes],[struct_utmp=no])]) |
133 | #include <utmp.h>]], [[struct utmp ut;]])],[pt_cv_struct_utmp=yes],[pt_cv_struct_utmp=no])]) |
133 | if test x$struct_utmp = xyes; then |
134 | if test x$pt_cv_struct_utmp = xyes; then |
134 | AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) |
135 | AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) |
135 | fi |
136 | fi |
136 | ] |
137 | ] |
137 | |
138 | |
138 | AC_CACHE_CHECK(for ut_host in utmp struct, struct_utmp_host, |
139 | AC_CACHE_CHECK(for ut_host in utmp struct, pt_cv_struct_utmp_host, |
139 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
140 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
140 | #include <utmp.h>]], [[struct utmp ut; ut.ut_host;]])],[struct_utmp_host=yes],[struct_utmp_host=no])]) |
141 | #include <utmp.h>]], [[struct utmp ut; ut.ut_host;]])],[pt_cv_struct_utmp_host=yes],[pt_cv_struct_utmp_host=no])]) |
141 | if test x$struct_utmp_host = xyes; then |
142 | if test x$pt_cv_struct_utmp_host = xyes; then |
142 | AC_DEFINE(HAVE_UTMP_HOST, 1, Define if struct utmp contains ut_host) |
143 | AC_DEFINE(HAVE_UTMP_HOST, 1, Define if struct utmp contains ut_host) |
143 | fi |
144 | fi |
144 | |
145 | |
145 | AC_CACHE_CHECK(for ut_pid in utmp struct, struct_utmp_pid, |
146 | AC_CACHE_CHECK(for ut_pid in utmp struct, pt_cv_struct_utmp_pid, |
146 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
147 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
147 | #include <utmp.h>]], [[struct utmp ut; ut.ut_pid;]])],[struct_utmp_pid=yes],[struct_utmp_pid=no])]) |
148 | #include <utmp.h>]], [[struct utmp ut; ut.ut_pid;]])],[pt_cv_struct_utmp_pid=yes],[pt_cv_struct_utmp_pid=no])]) |
148 | if test x$struct_utmp_pid = xyes; then |
149 | if test x$pt_cv_struct_utmp_pid = xyes; then |
149 | AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid) |
150 | AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid) |
150 | fi |
151 | fi |
151 | ) dnl# AC_CHECK_HEADERS(utmp.h |
152 | ) dnl# AC_CHECK_HEADERS(utmp.h |
152 | |
153 | |
153 | dnl# -------------------------------------------- |
154 | dnl# -------------------------------------------- |
154 | |
155 | |
155 | AC_CHECK_HEADERS(utmpx.h, |
156 | AC_CHECK_HEADERS(utmpx.h, |
156 | [AC_CACHE_CHECK([for struct utmpx], struct_utmpx, |
157 | [AC_CACHE_CHECK([for struct utmpx], pt_cv_struct_utmpx, |
157 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
158 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
158 | #include <utmpx.h>]], [[struct utmpx ut;]])],[struct_utmpx=yes],[struct_utmpx=no])]) |
159 | #include <utmpx.h>]], [[struct utmpx ut;]])],[pt_cv_struct_utmpx=yes],[pt_cv_struct_utmpx=no])]) |
159 | if test x$struct_utmpx = xyes; then |
160 | if test x$pt_cv_struct_utmpx = xyes; then |
160 | AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx) |
161 | AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx) |
161 | fi |
162 | fi |
162 | ] |
163 | ] |
163 | |
164 | |
164 | AC_CACHE_CHECK(for host in utmpx struct, struct_utmpx_host, |
165 | AC_CACHE_CHECK(for host in utmpx struct, pt_cv_struct_utmpx_host, |
165 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
166 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
166 | #include <utmpx.h>]], [[struct utmpx utx; utx.ut_host;]])],[struct_utmpx_host=yes],[struct_utmpx_host=no])]) |
167 | #include <utmpx.h>]], [[struct utmpx utx; utx.ut_host;]])],[pt_cv_struct_utmpx_host=yes],[pt_cv_struct_utmpx_host=no])]) |
167 | if test x$struct_utmpx_host = xyes; then |
168 | if test x$pt_cv_struct_utmpx_host = xyes; then |
168 | AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) |
169 | AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) |
169 | fi |
170 | fi |
170 | |
171 | |
171 | AC_CACHE_CHECK(for session in utmpx struct, struct_utmpx_session, |
172 | AC_CACHE_CHECK(for session in utmpx struct, pt_cv_struct_utmpx_session, |
172 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
173 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
173 | #include <utmpx.h>]], [[struct utmpx utx; utx.ut_session;]])],[struct_utmpx_session=yes],[struct_utmpx_session=no])]) |
174 | #include <utmpx.h>]], [[struct utmpx utx; utx.ut_session;]])],[pt_cv_struct_utmpx_session=yes],[pt_cv_struct_utmpx_session=no])]) |
174 | if test x$struct_utmpx_session = xyes; then |
175 | if test x$pt_cv_struct_utmpx_session = xyes; then |
175 | AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session) |
176 | AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session) |
176 | fi |
177 | fi |
177 | ) dnl# AC_CHECK_HEADERS(utmpx.h |
178 | ) dnl# AC_CHECK_HEADERS(utmpx.h |
178 | |
179 | |
179 | dnl# -------------------------------------------------------------------------- |
180 | dnl# -------------------------------------------------------------------------- |
180 | dnl# check for struct lastlog |
181 | dnl# check for struct lastlog |
181 | AC_CACHE_CHECK(for struct lastlog, struct_lastlog, |
182 | AC_CACHE_CHECK(for struct lastlog, pt_cv_struct_lastlog, |
182 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
183 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
183 | #include <utmp.h> |
184 | #include <utmp.h> |
184 | #ifdef HAVE_LASTLOG_H |
185 | #ifdef HAVE_LASTLOG_H |
185 | #include <lastlog.h> |
186 | #include <lastlog.h> |
186 | #endif |
187 | #endif |
187 | ]], [[struct lastlog ll;]])],[struct_lastlog=yes],[struct_lastlog=no])]) |
188 | ]], [[struct lastlog ll;]])],[pt_cv_struct_lastlog=yes],[pt_cv_struct_lastlog=no])]) |
188 | if test x$struct_lastlog = xyes; then |
189 | if test x$pt_cv_struct_lastlog = xyes; then |
189 | AC_DEFINE(HAVE_STRUCT_LASTLOG, 1, Define if utmp.h or lastlog.h has struct lastlog) |
190 | AC_DEFINE(HAVE_STRUCT_LASTLOG, 1, Define if utmp.h or lastlog.h has struct lastlog) |
190 | fi |
191 | fi |
191 | |
192 | |
192 | dnl# check for struct lastlogx |
193 | dnl# check for struct lastlogx |
193 | AC_CACHE_CHECK(for struct lastlogx, struct_lastlogx, |
194 | AC_CACHE_CHECK(for struct lastlogx, pt_cv_struct_lastlogx, |
194 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
195 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
195 | #include <utmpx.h> |
196 | #include <utmpx.h> |
196 | #ifdef HAVE_LASTLOG_H |
197 | #ifdef HAVE_LASTLOG_H |
197 | #include <lastlog.h> |
198 | #include <lastlog.h> |
198 | #endif |
199 | #endif |
199 | ]], [[struct lastlogx ll;]])],[struct_lastlogx=yes],[struct_lastlogx=no])]) |
200 | ]], [[struct lastlogx ll;]])],[pt_cv_struct_lastlogx=yes],[pt_cv_struct_lastlogx=no])]) |
200 | if test x$struct_lastlogx = xyes; then |
201 | if test x$pt_cv_struct_lastlogx = xyes; then |
201 | AC_DEFINE(HAVE_STRUCT_LASTLOGX, 1, Define if utmpx.h or lastlog.h has struct lastlogx) |
202 | AC_DEFINE(HAVE_STRUCT_LASTLOGX, 1, Define if utmpx.h or lastlog.h has struct lastlogx) |
202 | fi |
203 | fi |
203 | |
204 | |
204 | dnl# -------------------------------------------------------------------------- |
205 | dnl# -------------------------------------------------------------------------- |
205 | dnl# FIND FILES |
206 | dnl# FIND FILES |
206 | dnl# -------------------------------------------------------------------------- |
207 | dnl# -------------------------------------------------------------------------- |
207 | |
208 | |
208 | dnl# find utmp |
209 | dnl# find utmp |
209 | AC_CACHE_CHECK(where utmp is located, path_utmp, |
210 | AC_CACHE_CHECK(where utmp is located, pt_cv_path_utmp, |
210 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
211 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
211 | #include <stdlib.h> |
212 | #include <stdlib.h> |
212 | #include <sys/types.h> |
213 | #include <sys/types.h> |
213 | #include <utmp.h> |
214 | #include <utmp.h> |
214 | #include <errno.h> |
215 | #include <errno.h> |
… | |
… | |
231 | fprintf(f, "%s\n", *u); |
232 | fprintf(f, "%s\n", *u); |
232 | exit(0); |
233 | exit(0); |
233 | } |
234 | } |
234 | } |
235 | } |
235 | exit(0); |
236 | exit(0); |
236 | }]])],[path_utmp=`cat conftestval`],[path_utmp=],[dnl |
237 | }]])],[pt_cv_path_utmp=`cat conftestval`],[pt_cv_path_utmp=],[dnl |
237 | AC_MSG_WARN(Define UTMP_FILE in config.h manually)])]) |
238 | AC_MSG_WARN(Define UTMP_FILE in config.h manually)])]) |
238 | if test x$path_utmp != x; then |
239 | if test x$pt_cv_path_utmp != x; then |
239 | AC_DEFINE_UNQUOTED(UTMP_FILE, "$path_utmp", Define location of utmp) |
240 | AC_DEFINE_UNQUOTED(UTMP_FILE, "$pt_cv_path_utmp", Define location of utmp) |
240 | fi |
241 | fi |
241 | |
242 | |
242 | dnl# -------------------------------------------------------------------------- |
243 | dnl# -------------------------------------------------------------------------- |
243 | |
244 | |
244 | dnl# find utmpx - if a utmp file exists at the same location and is more than |
245 | dnl# find utmpx - if a utmp file exists at the same location and is more than |
245 | dnl# a day newer, then dump the utmpx. People leave lots of junk around. |
246 | dnl# a day newer, then dump the utmpx. People leave lots of junk around. |
246 | AC_CACHE_CHECK(where utmpx is located, path_utmpx, |
247 | AC_CACHE_CHECK(where utmpx is located, pt_cv_path_utmpx, |
247 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
248 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
248 | #include <stdlib.h> |
249 | #include <stdlib.h> |
249 | #include <sys/types.h> |
250 | #include <sys/types.h> |
250 | #include <utmpx.h> |
251 | #include <utmpx.h> |
251 | #include <errno.h> |
252 | #include <errno.h> |
… | |
… | |
278 | fprintf(f, "%s\n", *u); |
279 | fprintf(f, "%s\n", *u); |
279 | exit(0); |
280 | exit(0); |
280 | } |
281 | } |
281 | } |
282 | } |
282 | exit(0); |
283 | exit(0); |
283 | }]])],[path_utmpx=`cat conftestval`],[path_utmpx=],[dnl |
284 | }]])],[pt_cv_path_utmpx=`cat conftestval`],[pt_cv_path_utmpx=],[dnl |
284 | AC_MSG_WARN(Define UTMPX_FILE in config.h manually)])]) |
285 | AC_MSG_WARN(Define UTMPX_FILE in config.h manually)])]) |
285 | if test x$path_utmpx != x; then |
286 | if test x$pt_cv_path_utmpx != x; then |
286 | AC_DEFINE_UNQUOTED(UTMPX_FILE, "$path_utmpx", Define location of utmpx) |
287 | AC_DEFINE_UNQUOTED(UTMPX_FILE, "$pt_cv_path_utmpx", Define location of utmpx) |
287 | fi |
288 | fi |
288 | |
289 | |
289 | dnl# -------------------------------------------------------------------------- |
290 | dnl# -------------------------------------------------------------------------- |
290 | |
291 | |
291 | dnl# find wtmp |
292 | dnl# find wtmp |
292 | AC_CACHE_CHECK(where wtmp is located, path_wtmp, |
293 | AC_CACHE_CHECK(where wtmp is located, pt_cv_path_wtmp, |
293 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
294 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
294 | #include <stdlib.h> |
295 | #include <stdlib.h> |
295 | #include <sys/types.h> |
296 | #include <sys/types.h> |
296 | #ifdef HAVE_UTMP_H |
297 | #ifdef HAVE_UTMP_H |
297 | #include <utmp.h> |
298 | #include <utmp.h> |
… | |
… | |
316 | fprintf(f, "%s\n", *w); |
317 | fprintf(f, "%s\n", *w); |
317 | exit(0); |
318 | exit(0); |
318 | } |
319 | } |
319 | } |
320 | } |
320 | exit(0); |
321 | exit(0); |
321 | }]])],[path_wtmp=`cat conftestval`],[path_wtmp=],[dnl |
322 | }]])],[pt_cv_path_wtmp=`cat conftestval`],[pt_cv_path_wtmp=],[dnl |
322 | AC_MSG_WARN(Define WTMP_FILE in config.h manually)])]) |
323 | AC_MSG_WARN(Define WTMP_FILE in config.h manually)])]) |
323 | if test x$path_wtmp != x; then |
324 | if test x$pt_cv_path_wtmp != x; then |
324 | AC_DEFINE_UNQUOTED(WTMP_FILE, "$path_wtmp", Define location of wtmp) |
325 | AC_DEFINE_UNQUOTED(WTMP_FILE, "$pt_cv_path_wtmp", Define location of wtmp) |
325 | fi |
326 | fi |
326 | dnl# -------------------------------------------------------------------------- |
327 | dnl# -------------------------------------------------------------------------- |
327 | |
328 | |
328 | dnl# find wtmpx |
329 | dnl# find wtmpx |
329 | AC_CACHE_CHECK(where wtmpx is located, path_wtmpx, |
330 | AC_CACHE_CHECK(where wtmpx is located, pt_cv_path_wtmpx, |
330 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
331 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
331 | #include <stdlib.h> |
332 | #include <stdlib.h> |
332 | #ifdef HAVE_UTMPX_H |
333 | #ifdef HAVE_UTMPX_H |
333 | #include <utmpx.h> |
334 | #include <utmpx.h> |
334 | #endif |
335 | #endif |
… | |
… | |
352 | fprintf(f, "%s\n", *w); |
353 | fprintf(f, "%s\n", *w); |
353 | exit(0); |
354 | exit(0); |
354 | } |
355 | } |
355 | } |
356 | } |
356 | exit(0); |
357 | exit(0); |
357 | }]])],[path_wtmpx=`cat conftestval`],[path_wtmpx=],[dnl |
358 | }]])],[pt_cv_path_wtmpx=`cat conftestval`],[pt_cv_path_wtmpx=],[dnl |
358 | AC_MSG_WARN(Define WTMPX_FILE in config.h manually)])]) |
359 | AC_MSG_WARN(Define WTMPX_FILE in config.h manually)])]) |
359 | if test x$path_wtmpx != x; then |
360 | if test x$pt_cv_path_wtmpx != x; then |
360 | AC_DEFINE_UNQUOTED(WTMPX_FILE, "$path_wtmpx", Define location of wtmpx) |
361 | AC_DEFINE_UNQUOTED(WTMPX_FILE, "$pt_cv_path_wtmpx", Define location of wtmpx) |
361 | fi |
362 | fi |
362 | dnl# -------------------------------------------------------------------------- |
363 | dnl# -------------------------------------------------------------------------- |
363 | |
364 | |
364 | dnl# find lastlog |
365 | dnl# find lastlog |
365 | AC_CACHE_CHECK(where lastlog is located, path_lastlog, |
366 | AC_CACHE_CHECK(where lastlog is located, pt_cv_path_lastlog, |
366 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
367 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
367 | #include <stdlib.h> |
368 | #include <stdlib.h> |
368 | #include <sys/types.h> |
369 | #include <sys/types.h> |
369 | #ifdef HAVE_UTMPX_H |
370 | #ifdef HAVE_UTMPX_H |
370 | #include <utmpx.h> |
371 | #include <utmpx.h> |
… | |
… | |
393 | fprintf(f, "%s\n", *w); |
394 | fprintf(f, "%s\n", *w); |
394 | exit(0); |
395 | exit(0); |
395 | } |
396 | } |
396 | } |
397 | } |
397 | exit(0); |
398 | exit(0); |
398 | }]])],[path_lastlog=`cat conftestval`],[path_lastlog=],[dnl |
399 | }]])],[pt_cv_path_lastlog=`cat conftestval`],[pt_cv_path_lastlog=],[dnl |
399 | AC_MSG_WARN(Define LASTLOG_FILE in config.h manually)])]) |
400 | AC_MSG_WARN(Define LASTLOG_FILE in config.h manually)])]) |
400 | if test x$path_lastlog != x; then |
401 | if test x$pt_cv_path_lastlog != x; then |
401 | AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$path_lastlog", Define location of lastlog) |
402 | AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$pt_cv_path_lastlog", Define location of lastlog) |
402 | fi |
403 | fi |
403 | dnl# -------------------------------------------------------------------------- |
404 | dnl# -------------------------------------------------------------------------- |
404 | |
405 | |
405 | dnl# find lastlogx |
406 | dnl# find lastlogx |
406 | AC_CACHE_CHECK(where lastlogx is located, path_lastlogx, |
407 | AC_CACHE_CHECK(where lastlogx is located, pt_cv_path_lastlogx, |
407 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
408 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
408 | #include <stdlib.h> |
409 | #include <stdlib.h> |
409 | #ifdef HAVE_UTMPX_H |
410 | #ifdef HAVE_UTMPX_H |
410 | #include <utmpx.h> |
411 | #include <utmpx.h> |
411 | #endif |
412 | #endif |
… | |
… | |
428 | fprintf(f, "%s\n", *w); |
429 | fprintf(f, "%s\n", *w); |
429 | exit(0); |
430 | exit(0); |
430 | } |
431 | } |
431 | } |
432 | } |
432 | exit(0); |
433 | exit(0); |
433 | }]])],[path_lastlogx=`cat conftestval`],[path_lastlogx=],[dnl |
434 | }]])],[pt_cv_path_lastlogx=`cat conftestval`],[pt_cv_path_lastlogx=],[dnl |
434 | AC_MSG_WARN(Define LASTLOGX_FILE in config.h manually)])]) |
435 | AC_MSG_WARN(Define LASTLOGX_FILE in config.h manually)])]) |
435 | if test x$path_lastlogx != x; then |
436 | if test x$pt_cv_path_lastlogx != x; then |
436 | AC_DEFINE_UNQUOTED(LASTLOGX_FILE, "$path_lastlogx", Define location of lastlogx) |
437 | AC_DEFINE_UNQUOTED(LASTLOGX_FILE, "$pt_cv_path_lastlogx", Define location of lastlogx) |
437 | fi |
438 | fi |
438 | ]) |
439 | ]) |
439 | |
440 | |
440 | AC_DEFUN([SCM_RIGHTS_CHECK], |
441 | AC_DEFUN([SCM_RIGHTS_CHECK], |
441 | [ |
442 | [ |
442 | AC_CACHE_CHECK(for unix-compliant filehandle passing ability, can_pass_fds, |
443 | AC_CACHE_CHECK(for unix-compliant filehandle passing ability, pt_cv_can_pass_fds, |
443 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
444 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
444 | #include <cstddef> // broken bsds (is that redundant?) need this |
445 | #include <cstddef> // broken bsds (is that redundant?) need this |
445 | #include <sys/types.h> |
446 | #include <sys/types.h> |
446 | #include <sys/socket.h> |
447 | #include <sys/socket.h> |
447 | #include <sys/uio.h> |
448 | #include <sys/uio.h> |
… | |
… | |
467 | |
468 | |
468 | *(int *)CMSG_DATA (cmsg) = 5; |
469 | *(int *)CMSG_DATA (cmsg) = 5; |
469 | |
470 | |
470 | return sendmsg (3, &msg, 0); |
471 | return sendmsg (3, &msg, 0); |
471 | } |
472 | } |
472 | ]])],[can_pass_fds=yes],[can_pass_fds=no])]) |
473 | ]])],[pt_cv_can_pass_fds=yes],[pt_cv_can_pass_fds=no])]) |
473 | if test x$can_pass_fds = xyes; then |
474 | if test x$pt_cv_can_pass_fds = xyes; then |
474 | AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing) |
475 | AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing) |
475 | else |
476 | else |
476 | AC_MSG_ERROR([libptytty requires unix-compliant filehandle passing ability]) |
477 | AC_MSG_ERROR([libptytty requires unix-compliant filehandle passing ability]) |
477 | fi |
478 | fi |
478 | ]) |
479 | ]) |
479 | |
480 | |
480 | AC_DEFUN([TTY_GROUP_CHECK], |
481 | AC_DEFUN([TTY_GROUP_CHECK], |
481 | [ |
482 | [ |
482 | AC_CACHE_CHECK([for tty group], tty_group, |
483 | AC_CACHE_CHECK([for tty group], pt_cv_tty_group, |
483 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
484 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
484 | #include <sys/types.h> |
485 | #include <sys/types.h> |
485 | #include <sys/stat.h> |
486 | #include <sys/stat.h> |
486 | #include <unistd.h> |
487 | #include <unistd.h> |
487 | #include <grp.h> |
488 | #include <grp.h> |
… | |
… | |
498 | && (stat(tty, &st)) == 0 |
499 | && (stat(tty, &st)) == 0 |
499 | && st.st_gid == gr->gr_gid) |
500 | && st.st_gid == gr->gr_gid) |
500 | return 0; |
501 | return 0; |
501 | else |
502 | else |
502 | return 1; |
503 | return 1; |
503 | }]])],[tty_group=yes],[tty_group=no],[tty_group=no])]) |
504 | }]])],[pt_cv_tty_group=yes],[pt_cv_tty_group=no],[pt_cv_tty_group=no])]) |
504 | if test x$tty_group = xyes; then |
505 | if test x$pt_cv_tty_group = xyes; then |
505 | AC_DEFINE(TTY_GID_SUPPORT, 1, "") |
506 | AC_DEFINE(TTY_GID_SUPPORT, 1, "") |
506 | fi]) |
507 | fi]) |
507 | |
508 | |