*** empty log message ***
authorayin <ayin>
Sun, 22 Jan 2006 17:00:42 +0000 (17:00 +0000)
committerayin <ayin>
Sun, 22 Jan 2006 17:00:42 +0000 (17:00 +0000)
configure.ac
ptytty.m4

index 36addd4a013d27f481f200c5d3e09d65aa8e67ce..801d5aa7fe46f3753c0b85b4fb54f3cac4cdf890 100644 (file)
@@ -807,11 +807,11 @@ dnl# now add and remove other stuff
 dnl# --------------------------------------------------------------------------
 if test x$support_xft = xyes; then
   AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-  AC_PATH_PROG(XFT_CONFIG, xft-config, no)
   if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then
     LIBS="$LIBS `$PKG_CONFIG xft --libs`"
     CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`"
   else
+    AC_PATH_PROG(XFT_CONFIG, xft-config, no)
     if test $XFT_CONFIG != no; then
       LIBS="$LIBS `$XFT_CONFIG --libs`"
       CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`"
index 5fd4fba1627df9728154f7fef9982f3d3cd9731e..da71ee2c7c959533adf9a83f6017532212989b2b 100644 (file)
--- a/ptytty.m4
+++ b/ptytty.m4
@@ -443,3 +443,33 @@ else
    AC_MSG_ERROR([libptytty requires unix-compliant filehandle passing ability])
 fi
 ])
+
+AC_DEFUN([TTY_GROUP_CHECK],
+[
+AC_CACHE_CHECK([for tty group], tty_group,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <grp.h>
+
+main()
+{
+  struct stat st;
+  struct group *gr;
+  char *tty;
+  gr = getgrnam("tty");
+  tty = ttyname(0);
+  if (gr != 0
+      && tty != 0
+      && (stat(tty, &st)) == 0
+      && st.st_gid == gr->gr_gid)
+    return 0;
+  else
+    return 1;
+}],
+[tty_group=yes],[tty_group=no],[tty_group=no])])
+if test x$tty_group = xyes; then
+  AC_DEFINE(TTY_GID_SUPPORT, 1, "")
+fi])
+