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

Comparing libptytty/ptytty.m4 (file contents):
Revision 1.1 by ayin, Sat Jan 21 23:11:04 2006 UTC vs.
Revision 1.3 by ayin, Sun Jan 22 16:57:03 2006 UTC

1dnl this file is part of libptytty, do not make local modifications
2dnl http://software.schmorp.de/pkg/libptytty
3
1AC_DEFUN([PTY_CHECK], 4AC_DEFUN([PTY_CHECK],
2[ 5[
3AC_CHECK_HEADERS( \ 6AC_CHECK_HEADERS( \
4 pty.h \ 7 pty.h \
5 util.h \ 8 util.h \
438 AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing) 441 AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing)
439else 442else
440 AC_MSG_ERROR([libptytty requires unix-compliant filehandle passing ability]) 443 AC_MSG_ERROR([libptytty requires unix-compliant filehandle passing ability])
441fi 444fi
442]) 445])
446
447AC_DEFUN([TTY_GROUP_CHECK],
448[
449AC_CACHE_CHECK([for tty group], tty_group,
450[AC_TRY_RUN([
451#include <sys/types.h>
452#include <sys/stat.h>
453#include <unistd.h>
454#include <grp.h>
455
456main()
457{
458 struct stat st;
459 struct group *gr;
460 char *tty;
461 gr = getgrnam("tty");
462 tty = ttyname(0);
463 if (gr != 0
464 && tty != 0
465 && (stat(tty, &st)) == 0
466 && st.st_gid == gr->gr_gid)
467 return 0;
468 else
469 return 1;
470}],
471[tty_group=yes],[tty_group=no],[tty_group=no])])
472if test x$tty_group = xyes; then
473 AC_DEFINE(TTY_GID_SUPPORT, 1, "")
474fi])
475

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines