*** empty log message ***
authorroot <root>
Sat, 21 Jan 2006 18:34:25 +0000 (18:34 +0000)
committerroot <root>
Sat, 21 Jan 2006 18:34:25 +0000 (18:34 +0000)
config.h.in
configure

index a624b26..aceee6e 100644 (file)
@@ -1,5 +1,8 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* clone device filename */
+#undef CLONE_DEVICE
+
 /* Define if you want 8 bit control sequences */
 #undef EIGHT_BIT_CONTROLS
 
 /* Define to 1 if you have the <cwchar> header file. */
 #undef HAVE_CWCHAR
 
+/* Define to 1 if you have /dev/ptym/clone */
+#undef HAVE_DEV_CLONE
+
+/* Define to 1 if you have /dev/ptc */
+#undef HAVE_DEV_PTC
+
+/* Define to 1 if you have /dev/ptmx */
+#undef HAVE_DEV_PTMX
+
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `getpt' function. */
 #undef HAVE_GETPT
 
-/* Define to 1 if you have the `grantpt' function. */
-#undef HAVE_GRANTPT
-
-/* Define to 1 if you have the <grp.h> header file. */
-#undef HAVE_GRP_H
-
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
@@ -66,9 +72,6 @@
 /* Define to 1 if you have the <lastlog.h> header file. */
 #undef HAVE_LASTLOG_H
 
-/* Define to 1 if you have the <libc.h> header file. */
-#undef HAVE_LIBC_H
-
 /* Define to 1 if you have the <libutil.h> header file. */
 #undef HAVE_LIBUTIL_H
 
@@ -87,6 +90,9 @@
 /* Define to 1 if you have the `on_exit' function. */
 #undef HAVE_ON_EXIT
 
+/* Define to 1 if you have the `openpty' function. */
+#undef HAVE_OPENPTY
+
 /* Define to 1 if you have the `posix_openpt' function. */
 #undef HAVE_POSIX_OPENPT
 
    handle passing */
 #undef HAVE_UNIX_FDPASS
 
-/* Define to 1 if you have the `unlockpt' function. */
-#undef HAVE_UNLOCKPT
-
 /* Define to 1 if you have the `unsetenv' function. */
 #undef HAVE_UNSETENV
 
 /* Define to use a 24 bit visual if the screen has 24 bit mode */
 #undef PREFER_24BIT
 
-/* Define for first char in devptyXX */
-#undef PTYCHAR1
-
-/* Define for second char in devptyXX */
-#undef PTYCHAR2
-
-/* Define for this pty type */
-#undef PTYS_ARE_CLONE
-
-/* Define for this pty type */
-#undef PTYS_ARE_GETPT
-
-/* Define for this pty type */
-#undef PTYS_ARE_NUMERIC
-
-/* Define for this pty type */
-#undef PTYS_ARE_OPENPTY
-
-/* Define for this pty type */
-#undef PTYS_ARE_POSIX
-
-/* Define for this pty type */
-#undef PTYS_ARE_PTC
-
-/* Define for this pty type */
-#undef PTYS_ARE_PTMX
-
-/* Define for this pty type */
-#undef PTYS_ARE_SEARCHED
-
-/* Define for this pty type */
-#undef PTYS_ARE__GETPTY
-
 /* Resource class */
 #undef RESCLASS
 
 /* Define if you want to represent unicode characters outside plane 0 */
 #undef UNICODE_3
 
+/* "" */
+#undef UNIX98_PTY
+
 /* Define if you want to have XIM (X Input Method) protocol support - required
    for multibyte characters input */
 #undef USE_XIM
index 0aa69c8..3e1fe49 100755 (executable)
--- a/configure
+++ b/configure
@@ -3312,7 +3312,19 @@ if test -z "$orig_CXXFLAGS"; then
     CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs"
 
 cat >conftest.$ac_ext <<_ACEOF
-int i;
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -7207,21 +7219,9 @@ done
 
 
 
-
-
-
-
-
-
-
-
-
 for ac_header in \
        assert.h \
        fcntl.h \
-       grp.h \
-       libc.h \
-       lastlog.h \
        stdarg.h \
        stdlib.h \
        string.h \
@@ -7232,17 +7232,11 @@ for ac_header in \
        sys/select.h \
        sys/sockio.h \
        sys/strredir.h \
-        sys/stropts.h \
        sys/time.h \
-       utmp.h \
-       utmpx.h \
-        stdint.h \
-        pty.h \
-        util.h \
-        libutil.h \
-        wchar.h \
-        cwchar \
-        clocale \
+       stdint.h \
+       wchar.h \
+       cwchar \
+       clocale \
 
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -10086,10 +10080,113 @@ _ACEOF
 
 
 
+for ac_func in \
+       unsetenv \
+       setutent \
+       seteuid \
+       setresuid \
+       setreuid \
+       on_exit \
+       nanosleep \
+
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
 
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
 
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
+fi
+done
 
 
 
@@ -10097,23 +10194,9 @@ _ACEOF
 
 
 for ac_func in \
-       revoke \
-       unsetenv \
-       setutent \
-       seteuid \
-       setresuid \
-       setreuid \
-       _getpty \
-       getpt \
-       posix_openpt \
-       grantpt \
-       unlockpt \
-       isastream \
-       on_exit \
-       nanosleep \
+       ttyslot \
        updwtmp \
        updwtmpx \
-       ttyslot \
 
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -10216,18 +10299,27 @@ done
 
 
 
-if test "${ac_cv_header_utmp_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for utmp.h" >&5
-echo $ECHO_N "checking for utmp.h... $ECHO_C" >&6
-if test "${ac_cv_header_utmp_h+set}" = set; then
+
+
+for ac_header in \
+       utmp.h \
+       utmpx.h \
+       lastlog.h \
+
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_utmp_h" >&5
-echo "${ECHO_T}$ac_cv_header_utmp_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking utmp.h usability" >&5
-echo $ECHO_N "checking utmp.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -10235,7 +10327,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <utmp.h>
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -10270,15 +10362,15 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 echo "${ECHO_T}$ac_header_compiler" >&6
 
 # Is the header present?
-echo "$as_me:$LINENO: checking utmp.h presence" >&5
-echo $ECHO_N "checking utmp.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <utmp.h>
+#include <$ac_header>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -10312,25 +10404,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: utmp.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: utmp.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: utmp.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: utmp.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: utmp.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: utmp.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: utmp.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: utmp.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: utmp.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: utmp.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: utmp.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: utmp.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: utmp.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: utmp.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: utmp.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: utmp.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     (
       cat <<\_ASBOX
 ## ------------------------------------------ ##
@@ -10341,38 +10433,48 @@ _ASBOX
       sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-echo "$as_me:$LINENO: checking for utmp.h" >&5
-echo $ECHO_N "checking for utmp.h... $ECHO_C" >&6
-if test "${ac_cv_header_utmp_h+set}" = set; then
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_utmp_h=$ac_header_preproc
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_utmp_h" >&5
-echo "${ECHO_T}$ac_cv_header_utmp_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
 fi
-if test $ac_cv_header_utmp_h = yes; then
-  echo "$as_me:$LINENO: checking for struct utmp" >&5
-echo $ECHO_N "checking for struct utmp... $ECHO_C" >&6
-if test "${rxvt_cv_struct_utmp+set}" = set; then
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+if test "${ac_cv_header_utmp_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for utmp.h" >&5
+echo $ECHO_N "checking for utmp.h... $ECHO_C" >&6
+if test "${ac_cv_header_utmp_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_utmp_h" >&5
+echo "${ECHO_T}$ac_cv_header_utmp_h" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking utmp.h usability" >&5
+echo $ECHO_N "checking utmp.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
+$ac_includes_default
 #include <utmp.h>
-int
-main ()
-{
-struct utmp ut;
-  ;
-  return 0;
-}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -10395,15 +10497,152 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rxvt_cv_struct_utmp=yes
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-rxvt_cv_struct_utmp=no
+ac_header_compiler=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking utmp.h presence" >&5
+echo $ECHO_N "checking utmp.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <utmp.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: utmp.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: utmp.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: utmp.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: utmp.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: utmp.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: utmp.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: utmp.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: utmp.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: utmp.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: utmp.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: utmp.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: utmp.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: utmp.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: utmp.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: utmp.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: utmp.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for utmp.h" >&5
+echo $ECHO_N "checking for utmp.h... $ECHO_C" >&6
+if test "${ac_cv_header_utmp_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_utmp_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_utmp_h" >&5
+echo "${ECHO_T}$ac_cv_header_utmp_h" >&6
+
+fi
+if test $ac_cv_header_utmp_h = yes; then
+  echo "$as_me:$LINENO: checking for struct utmp" >&5
+echo $ECHO_N "checking for struct utmp... $ECHO_C" >&6
+if test "${rxvt_cv_struct_utmp+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <utmp.h>
+int
+main ()
+{
+struct utmp ut;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rxvt_cv_struct_utmp=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+rxvt_cv_struct_utmp=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 echo "$as_me:$LINENO: result: $rxvt_cv_struct_utmp" >&5
 echo "${ECHO_T}$rxvt_cv_struct_utmp" >&6
 if test x$rxvt_cv_struct_utmp = xyes; then
@@ -11475,6 +11714,7 @@ _ACEOF
 fi
 
 
+
 echo "$as_me:$LINENO: checking where ttys/ttytab is located" >&5
 echo $ECHO_N "checking where ttys/ttytab is located... $ECHO_C" >&6
 if test "${rxvt_cv_path_ttytab+set}" = set; then
@@ -11782,16 +12022,350 @@ main ()
   msg.msg_control    = buf;
   msg.msg_controllen = sizeof buf;
 
-  cmsghdr *cmsg = CMSG_FIRSTHDR (&msg);
-  cmsg->cmsg_level = SOL_SOCKET;
-  cmsg->cmsg_type  = SCM_RIGHTS;
-  cmsg->cmsg_len   = 100;
+  cmsghdr *cmsg = CMSG_FIRSTHDR (&msg);
+  cmsg->cmsg_level = SOL_SOCKET;
+  cmsg->cmsg_type  = SCM_RIGHTS;
+  cmsg->cmsg_len   = 100;
+
+  *(int *)CMSG_DATA (cmsg) = 5;
+
+  return sendmsg (3, &msg, 0);
+}
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rxvt_can_pass_fds=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+rxvt_can_pass_fds=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $rxvt_can_pass_fds" >&5
+echo "${ECHO_T}$rxvt_can_pass_fds" >&6
+if test x$rxvt_can_pass_fds = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNIX_FDPASS 1
+_ACEOF
+
+else
+   { { echo "$as_me:$LINENO: error: urxvt requires unix-compliant filehandle passing ability" >&5
+echo "$as_me: error: urxvt requires unix-compliant filehandle passing ability" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+echo "$as_me:$LINENO: checking for broken XIM callback" >&5
+echo $ECHO_N "checking for broken XIM callback... $ECHO_C" >&6
+if test "${rxvt_broken_ximcb+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+#include <X11/Xlib.h>
+
+void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3);
+
+void f() {
+  XIMCallback cb;
+  cb.callback = im_destroy_cb;
+}
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rxvt_broken_ximcb=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+rxvt_broken_ximcb=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $rxvt_broken_ximcb" >&5
+echo "${ECHO_T}$rxvt_broken_ximcb" >&6
+
+if test x$rxvt_broken_ximcb = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define XIMCB_PROTO_BROKEN 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+for ac_header in \
+  pty.h \
+  util.h \
+  libutil.h \
+  sys/ioctl.h \
+  sys/stropts.h \
+
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+for ac_func in \
+  revoke \
+  _getpty \
+  getpt \
+  posix_openpt \
+  isastream \
+
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-  *(int *)CMSG_DATA (cmsg) = 5;
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
-  return sendmsg (3, &msg, 0);
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
 }
+#endif
 
+int
+main ()
+{
+return f != $ac_func;
   ;
   return 0;
 }
@@ -11817,50 +12391,125 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rxvt_can_pass_fds=yes
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-rxvt_can_pass_fds=no
+eval "$as_ac_var=no"
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $rxvt_can_pass_fds" >&5
-echo "${ECHO_T}$rxvt_can_pass_fds" >&6
-if test x$rxvt_can_pass_fds = xyes; then
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+have_clone=no
+
+echo "$as_me:$LINENO: checking for /dev/ptym/clone" >&5
+echo $ECHO_N "checking for /dev/ptym/clone... $ECHO_C" >&6
+if test -e /dev/ptym/clone; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_UNIX_FDPASS 1
+#define HAVE_DEV_CLONE 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define CLONE_DEVICE "/dev/ptym/clone"
 _ACEOF
 
+  have_clone=yes
 else
-   { { echo "$as_me:$LINENO: error: urxvt requires unix-compliant filehandle passing ability" >&5
-echo "$as_me: error: urxvt requires unix-compliant filehandle passing ability" >&2;}
-   { (exit 1); exit 1; }; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-echo "$as_me:$LINENO: checking for broken XIM callback" >&5
-echo $ECHO_N "checking for broken XIM callback... $ECHO_C" >&6
-if test "${rxvt_broken_ximcb+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for /dev/ptc" >&5
+echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
+if test -e /dev/ptc; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DEV_PTC 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define CLONE_DEVICE "/dev/ptc"
+_ACEOF
+
+  have_clone=yes
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
 
-#include <X11/Xlib.h>
+case $host in
+  *-*-cygwin*)
+    have_clone=yes
 
-void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3);
+cat >>confdefs.h <<\_ACEOF
+#define CLONE_DEVICE "/dev/ptmx"
+_ACEOF
 
-void f() {
-  XIMCallback cb;
-  cb.callback = im_destroy_cb;
-}
+    ;;
+  *)
+    echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
+echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
+    if test -e /dev/ptmx; then
+      echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DEV_PTMX 1
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+
+
+cat >>confdefs.h <<\_ACEOF
+#define CLONE_DEVICE "/dev/ptmx"
+_ACEOF
+
+      have_clone=yes
+    else
+      echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    fi
+    ;;
+esac
+
+if test x$ac_cv_func_getpt = xyes -o x$ac_cv_func_posix_openpt = xyes -o x$have_clone = xyes; then
+  echo "$as_me:$LINENO: checking for UNIX98 ptys" >&5
+echo $ECHO_N "checking for UNIX98 ptys... $ECHO_C" >&6
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+int
+main ()
+{
+grantpt(0);unlockpt(0);ptsname(0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -11873,36 +12522,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
+        { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rxvt_broken_ximcb=yes
+  unix98_pty=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIX98_PTY 1
+_ACEOF
+
+               echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-rxvt_broken_ximcb=no
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $rxvt_broken_ximcb" >&5
-echo "${ECHO_T}$rxvt_broken_ximcb" >&6
-
-if test x$rxvt_broken_ximcb = xyes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define XIMCB_PROTO_BROKEN 1
-_ACEOF
-
-fi
+if test -z "$unix98_pty"; then
 
-if test x$ac_cv_func_getpt = xno -a x$ac_cv_func_posix_openpt = xno; then
-  echo "$as_me:$LINENO: checking for openpty" >&5
-echo $ECHO_N "checking for openpty... $ECHO_C" >&6
-if test "${ac_cv_func_openpty+set}" = set; then
+for ac_func in openpty
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -11911,12 +12563,12 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define openpty to an innocuous variant, in case <limits.h> declares openpty.
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define openpty innocuous_openpty
+#define $ac_func innocuous_$ac_func
 
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char openpty (); below.
+    which can conflict with char $ac_func (); below.
     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     <limits.h> exists even on freestanding compilers.  */
 
@@ -11926,7 +12578,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 # include <assert.h>
 #endif
 
-#undef openpty
+#undef $ac_func
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -11935,14 +12587,14 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char openpty ();
+char $ac_func ();
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_openpty) || defined (__stub___openpty)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-char (*f) () = openpty;
+char (*f) () = $ac_func;
 #endif
 #ifdef __cplusplus
 }
@@ -11951,7 +12603,7 @@ char (*f) () = openpty;
 int
 main ()
 {
-return f != openpty;
+return f != $ac_func;
   ;
   return 0;
 }
@@ -11977,20 +12629,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_func_openpty=yes
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func_openpty=no
+eval "$as_ac_var=no"
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_openpty" >&5
-echo "${ECHO_T}$ac_cv_func_openpty" >&6
-if test $ac_cv_func_openpty = yes; then
-  :
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
 else
   echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
 echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
 if test $ac_cv_lib_util_openpty = yes; then
-  LIBS="$LIBS -lutil"
-fi
-
-fi
-
-fi
-
-echo "$as_me:$LINENO: checking for pty/tty type" >&5
-echo $ECHO_N "checking for pty/tty type... $ECHO_C" >&6
-if test "${rxvt_cv_ptys+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test x$ac_cv_func_openpty = xyes -o x$ac_cv_lib_util_openpty = xyes; then
-    rxvt_cv_ptys=OPENPTY
- else if test x$ac_cv_func_getpt = xyes; then
-    rxvt_cv_ptys=GLIBC
- else if test x$ac_cv_func_posix_openpt = xyes; then
-    rxvt_cv_ptys=POSIX
- else if test x$ac_cv_func__getpty = xyes; then
-    rxvt_cv_ptys=SGI4
- else if test -c /dev/ttyp20; then
-    rxvt_cv_ptys=SCO
- else if test -c /dev/ptym/clone; then
-    rxvt_cv_ptys=HPUX
- else if test -c /dev/ptc -a -c /dev/pts; then
-    rxvt_cv_ptys=PTC
- else if test -c /dev/ptc -a -d /dev/pts; then
-    rxvt_cv_ptys=PTC
- else if test -c /dev/ptmx -a -c /dev/pts/0; then
-    rxvt_cv_ptys=STREAMS
- else if test x$ac_cv_func_grantpt = xyes && test x$ac_cv_func_unlockpt = xyes; then
-    rxvt_cv_ptys=STREAMS
- else
-    rxvt_cv_ptys=BSD
-fi
-fi
-fi
-fi
-fi
-fi
-fi
-fi
-fi
-fi
-
-fi
-echo "$as_me:$LINENO: result: $rxvt_cv_ptys" >&5
-echo "${ECHO_T}$rxvt_cv_ptys" >&6
-
-if test x$rxvt_cv_ptys = xGLIBC; then
-
-cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_GETPT 1
-_ACEOF
-
-fi
-if test x$rxvt_cv_ptys = xPOSIX; then
-
-cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_POSIX 1
-_ACEOF
-
-fi
-if test x$rxvt_cv_ptys = xOPENPTY; then
-
-cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_OPENPTY 1
-_ACEOF
-
-fi
-if test x$rxvt_cv_ptys = xSCO; then
-
-cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_NUMERIC 1
-_ACEOF
-
-fi
-if test x$rxvt_cv_ptys = xSTREAMS; then
-
-cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_PTMX 1
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_OPENPTY 1
 _ACEOF
-
-fi
-if test x$rxvt_cv_ptys = xPTC; then
-
-cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_PTC 1
-_ACEOF
-
-fi
-if test x$rxvt_cv_ptys = xSGI4; then
-
-cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE__GETPTY 1
-_ACEOF
-
-fi
-if test x$rxvt_cv_ptys = xHPUX; then
-
-cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_CLONE 1
-_ACEOF
-
+ LIBS="$LIBS -lutil"
 fi
-if test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xPOSIX; then
-
-cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_SEARCHED 1
-_ACEOF
 
 fi
-
-
-{ echo "$as_me:$LINENO: checking for pty ranges..." >&5
-echo "$as_me: checking for pty ranges..." >&6;}
-ptys=`echo /dev/pty??`
-pch1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
-pch2=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
-if test x$pch1 != x; then
-
-cat >>confdefs.h <<_ACEOF
-#define PTYCHAR1 "$pch1"
-_ACEOF
+done
 
 fi
-if test x$pch2 != x; then
-
-cat >>confdefs.h <<_ACEOF
-#define PTYCHAR2 "$pch2"
-_ACEOF
 
-fi
 
 if test x$support_xft = xyes; then
   LIBS="$LIBS `pkg-config xft --libs`"
@@ -14149,7 +14682,6 @@ fi
 echo "
 The following are set in config.h
 "
-echo "  pty/tty type:               "$rxvt_cv_ptys
 if test x$support_utmp != xyes; then
   echo "  utmp support:               disabled"
   echo
@@ -14176,12 +14708,6 @@ if test x$RESFALLBACK != x; then
    echo "  resource class fallback:    $RESFALLBACK"
 fi
 echo
-if test x$rxvt_cv_ptys = xUNKNOWN; then
-  echo ".----------------------------------------------------------------."
-  echo ". WARNING: could not determine pty/tty type.  Do not build until ."
-  echo ".          the appropriate PTYS_ARE_* is defined in config.h     ."
-  echo ".----------------------------------------------------------------."
-fi
 if test x$support_xpm = xneedsmanualspecification; then
   echo ".----------------------------------------------------------------."
   echo ". WARNING: --enable-xpm-background was specified however the     ."