*** empty log message ***
[dana/urxvt.git] / configure
index 3018338..cbc5bd0 100755 (executable)
--- a/configure
+++ b/configure
@@ -309,8 +309,8 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os VERSION DATE LSMDATE LIBVERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK LINKER CXXCPP EGREP INSTALL_LIBRXVT RXVTNAME MV RM CP LN SED ECHO CMP TBL TIC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XPM_CPPFLAGS XPM_CFLAGS XPM_LIBS rxvt_int16_typedef rxvt_uint16_typedef rxvt_int32_typedef rxvt_uint32_typedef rxvt_intp_define rxvt_u_intp_define DEBUG DINCLUDE DLIB include_stdint_h include_stdarg_h include_stdlib_h include_unistd_h include_string_h include_fcntl_h include_util_h include_assert_h include_sys_ioctl_h include_sys_select_h include_sys_strredir_h include_sys_time_h include_time_h LIBOBJS LTLIBOBJS'
-ac_subst_files='MCOMMON'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os VERSION DATE LSMDATE LIBVERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINKER CXXCPP EGREP INSTALL_LIBRXVT RXVTNAME MV RM CP LN SED ECHO CMP TIC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XPM_CPPFLAGS XPM_CFLAGS XPM_LIBS rxvt_int16_typedef rxvt_uint16_typedef rxvt_int32_typedef rxvt_uint32_typedef rxvt_intp_define rxvt_u_intp_define PERL PERLLIB PERLFLAGS PERLPRIVLIBEXP IF_PERL PERL_O DEBUG DINCLUDE DLIB include_stdint_h include_stdarg_h include_stdlib_h include_unistd_h include_string_h include_fcntl_h include_util_h include_assert_h include_sys_ioctl_h include_sys_select_h include_sys_strredir_h include_sys_time_h include_time_h LIBOBJS LTLIBOBJS'
+ac_subst_files=''
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -879,21 +879,18 @@ Optional Features:
   --enable-transparency   enable transparent backgrounds
   --enable-tinting        enable tinting of transparent bg
   --enable-fading         enable colors fading when off focus
-  --enable-menubar        enable menubar
   --enable-rxvt-scroll    enable rxvt style scrollbar
   --enable-next-scroll    enable NeXT style scrollbar
   --enable-xterm-scroll   enable Xterm style scrollbar
+  --enable-perl           enable embedded perl interpreter
   --enable-plain-scroll   enable plain style scrollbar
-  --enable-half-shadow    use half width/height shadow on rxvt scrollbar
   --enable-xim            XIM (X Input Method) protocol support
   --enable-ttygid         enable tty setting to group named "tty"
   --disable-backspace-key disable handling of the backspace key
   --disable-delete-key    disable handling of the delete key
   --disable-resources     disable all resource checking
-  --enable-xgetdefault    enable resources via X instead of our small version
   --enable-8bitctrls      enable 8 bit control sequences (not recommended)
   --enable-fallback(=CLASS) fall back on CLASS resources in addition to URxvt ones (default: Rxvt)
-  --enable-strings        enable some replacement system functions
   --disable-swapscreen    disable swap screen support
   --enable-iso14755       enable support for extended ISO 14755 modes
   --enable-frills         enable support for rarely used features
@@ -1374,8 +1371,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
+          ac_config_headers="$ac_config_headers config.h:config.h.in"
+
+
 ac_aux_dir=
-for ac_dir in autoconf $srcdir/autoconf; do
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   if test -f $ac_dir/install-sh; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -1391,17 +1392,14 @@ for ac_dir in autoconf $srcdir/autoconf; do
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in autoconf $srcdir/autoconf" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in autoconf $srcdir/autoconf" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
    { (exit 1); exit 1; }; }
 fi
 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
-          ac_config_headers="$ac_config_headers config.h:autoconf/config.h.in"
-
-
 # Make sure we can run config.sub.
 $ac_config_sub sun4 >/dev/null 2>&1 ||
   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
@@ -1463,6 +1461,8 @@ echo ""
 echo "configuring for rxvt $VERSION"
 echo ""
 
+orig_CXXFLAGS="$CXXFLAGS"
+
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -3052,46 +3052,6 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AWK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AWK="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$AWK" && break
-done
-
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -3101,9 +3061,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 if test -z "$orig_CXXFLAGS"; then
-  CXXFLAGS='-O'
   if test x$GCC = xyes && test "x$GXX" = xyes; then
     CXXFLAGS="-g -O3"
+  else
+    CXXFLAGS="-O"
   fi
   CFLAGS="$CXXFLAGS"
 fi
@@ -3614,7 +3575,99 @@ if test "$ac_cv_search_strerror" != no; then
 fi
 
 
-echo "$as_me:$LINENO: checking for setlocale in -lxpg4" >&5
+echo "$as_me:$LINENO: checking for setlocale" >&5
+echo $ECHO_N "checking for setlocale... $ECHO_C" >&6
+if test "${ac_cv_func_setlocale+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 setlocale to an innocuous variant, in case <limits.h> declares setlocale.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define setlocale innocuous_setlocale
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char setlocale (); 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 setlocale
+
+/* 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 setlocale ();
+/* 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_setlocale) || defined (__stub___setlocale)
+choke me
+#else
+char (*f) () = setlocale;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != setlocale;
+  ;
+  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
+  ac_cv_func_setlocale=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_setlocale=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setlocale" >&5
+echo "${ECHO_T}$ac_cv_func_setlocale" >&6
+if test $ac_cv_func_setlocale = yes; then
+  :
+else
+  echo "$as_me:$LINENO: checking for setlocale in -lxpg4" >&5
 echo $ECHO_N "checking for setlocale in -lxpg4... $ECHO_C" >&6
 if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3681,8 +3734,102 @@ if test $ac_cv_lib_xpg4_setlocale = yes; then
   LIBS="$LIBS -lxpg4"
 fi
 
+fi
+
+
+echo "$as_me:$LINENO: checking for gethostbyname" >&5
+echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
+if test "${ac_cv_func_gethostbyname+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 gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define gethostbyname innocuous_gethostbyname
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char gethostbyname (); 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 gethostbyname
+
+/* 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 gethostbyname ();
+/* 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_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+char (*f) () = gethostbyname;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != gethostbyname;
+  ;
+  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
+  ac_cv_func_gethostbyname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+ac_cv_func_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
+if test $ac_cv_func_gethostbyname = yes; then
+  :
+else
+  echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3749,31 +3896,60 @@ if test $ac_cv_lib_nsl_gethostbyname = yes; then
   LIBS="$LIBS -lnsl"
 fi
 
-echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
-echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
-if test "${ac_cv_lib_socket_socket+set}" = set; then
+fi
+
+echo "$as_me:$LINENO: checking for socket" >&5
+echo $ECHO_N "checking for socket... $ECHO_C" >&6
+if test "${ac_cv_func_socket+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define socket to an innocuous variant, in case <limits.h> declares socket.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define socket innocuous_socket
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char socket (); 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 socket
 
 /* 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 socket ();
+/* 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_socket) || defined (__stub___socket)
+choke me
+#else
+char (*f) () = socket;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
 int
 main ()
 {
-socket ();
+return f != socket;
   ;
   return 0;
 }
@@ -3799,35 +3975,317 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_socket_socket=yes
+  ac_cv_func_socket=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_socket_socket=no
+ac_cv_func_socket=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
-if test $ac_cv_lib_socket_socket = yes; then
-  LIBS="$LIBS -lsocket"
 fi
-
-
-
-MALLOC_TYPE=S
-
-support_addstrings=no
-support_frills=yes
-support_inheritpixmap=no
-support_tinting=yes
-support_fading=yes
-support_keepscrolling=yes
-support_selectionscrolling=yes
-support_menubar=no
+echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
+echo "${ECHO_T}$ac_cv_func_socket" >&6
+if test $ac_cv_func_socket = yes; then
+  :
+else
+  echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
+echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_socket+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* 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 socket ();
+int
+main ()
+{
+socket ();
+  ;
+  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
+  ac_cv_lib_socket_socket=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_socket=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
+if test $ac_cv_lib_socket_socket = yes; then
+  LIBS="$LIBS -lsocket"
+fi
+
+fi
+
+
+echo "$as_me:$LINENO: checking for sched_yield" >&5
+echo $ECHO_N "checking for sched_yield... $ECHO_C" >&6
+if test "${ac_cv_func_sched_yield+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 sched_yield to an innocuous variant, in case <limits.h> declares sched_yield.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define sched_yield innocuous_sched_yield
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char sched_yield (); 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 sched_yield
+
+/* 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 sched_yield ();
+/* 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_sched_yield) || defined (__stub___sched_yield)
+choke me
+#else
+char (*f) () = sched_yield;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != sched_yield;
+  ;
+  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
+  ac_cv_func_sched_yield=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_sched_yield=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_sched_yield" >&5
+echo "${ECHO_T}$ac_cv_func_sched_yield" >&6
+if test $ac_cv_func_sched_yield = yes; then
+  :
+else
+  echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
+echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6
+if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* 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 sched_yield ();
+int
+main ()
+{
+sched_yield ();
+  ;
+  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
+  ac_cv_lib_rt_sched_yield=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rt_sched_yield=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
+echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6
+if test $ac_cv_lib_rt_sched_yield = yes; then
+  LIBS="$LIBS -lrt"
+fi
+
+fi
+
+
+echo "$as_me:$LINENO: checking for sched_yield support" >&5
+echo $ECHO_N "checking for sched_yield support... $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 <sched.h>
+int
+main ()
+{
+sched_yield ()
+  ;
+  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
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SCHED_YIELD 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+
+MALLOC_TYPE=S
+
+support_frills=yes
+support_inheritpixmap=yes
+support_tinting=yes
+support_fading=yes
+support_keepscrolling=yes
+support_selectionscrolling=yes
 support_mousewheel=yes
 support_mouseslipwheel=yes
 support_utmp=yes
@@ -3840,13 +4298,14 @@ support_scroll_next=yes
 support_scroll_xterm=yes
 support_scroll_plain=yes
 support_xim=yes
-support_xpm=no
+support_xpm=yes
 support_xft=yes
 support_unicode3=no
 support_combining=yes
 support_8bitctrls=no
 support_iso14755=yes
 support_styles=yes
+support_perl=yes
 codesets=all
 
 
@@ -3873,7 +4332,6 @@ if test "${enable_everything+set}" = set; then
        support_keepscrolling=no
        support_selectionscrolling=no
        support_lastlog=no
-       support_menubar=no
        support_mousewheel=no
        support_mouseslipwheel=no
        support_text_blink=no
@@ -3892,6 +4350,7 @@ if test "${enable_everything+set}" = set; then
        support_8bitctrls=no
        support_iso14755=no
        support_styles=no
+       support_perl=no
        codesets=
     fi
     if test x$enableval = xyes; then
@@ -3903,7 +4362,6 @@ if test "${enable_everything+set}" = set; then
        support_keepscrolling=yes
        support_selectionscrolling=yes
        support_lastlog=yes
-       support_menubar=yes
        support_mousewheel=yes
        support_mouseslipwheel=yes
        support_text_blink=yes
@@ -3922,6 +4380,7 @@ if test "${enable_everything+set}" = set; then
        #support_8bitctrls=yes
        support_iso14755=yes
        support_styles=yes
+       support_perl=yes
        codesets=all
     fi
 
@@ -4015,14 +4474,6 @@ if test "${enable_fading+set}" = set; then
   fi
 fi;
 
-# Check whether --enable-menubar or --disable-menubar was given.
-if test "${enable_menubar+set}" = set; then
-  enableval="$enable_menubar"
-  if test x$enableval = xyes -o x$enableval = xno; then
-    support_menubar=$enableval
-  fi
-fi;
-
 # Check whether --enable-rxvt-scroll or --disable-rxvt-scroll was given.
 if test "${enable_rxvt_scroll+set}" = set; then
   enableval="$enable_rxvt_scroll"
@@ -4047,6 +4498,14 @@ if test "${enable_xterm_scroll+set}" = set; then
   fi
 fi;
 
+# Check whether --enable-perl or --disable-perl was given.
+if test "${enable_perl+set}" = set; then
+  enableval="$enable_perl"
+  if test x$enableval = xyes -o x$enableval = xno; then
+    support_perl=$enableval
+  fi
+fi;
+
 # Check whether --enable-plain-scroll or --disable-plain-scroll was given.
 if test "${enable_plain_scroll+set}" = set; then
   enableval="$enable_plain_scroll"
@@ -4055,17 +4514,6 @@ if test "${enable_plain_scroll+set}" = set; then
   fi
 fi;
 
-# Check whether --enable-half-shadow or --disable-half-shadow was given.
-if test "${enable_half_shadow+set}" = set; then
-  enableval="$enable_half_shadow"
-  if test x$enableval = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HALFSHADOW 1
-_ACEOF
-
-  fi
-fi;
 
 
 # Check whether --with-codesets or --without-codesets was given.
@@ -4130,18 +4578,6 @@ _ACEOF
   fi
 fi;
 
-# Check whether --enable-xgetdefault or --disable-xgetdefault was given.
-if test "${enable_xgetdefault+set}" = set; then
-  enableval="$enable_xgetdefault"
-  if test x$enableval = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_XGETDEFAULT 1
-_ACEOF
-
-  fi
-fi;
-
 # Check whether --enable-8bitctrls or --disable-8bitctrls was given.
 if test "${enable_8bitctrls+set}" = set; then
   enableval="$enable_8bitctrls"
@@ -4211,14 +4647,6 @@ _ACEOF
 RXVTNAME=`echo "$RXVTNAME"|sed "$program_transform_name"`
 
 
-# Check whether --enable-strings or --disable-strings was given.
-if test "${enable_strings+set}" = set; then
-  enableval="$enable_strings"
-  if test x$enableval = xyes -o x$enableval = xno; then
-    support_addstrings=$enableval
-  fi
-fi;
-
 # Check whether --enable-swapscreen or --disable-swapscreen was given.
 if test "${enable_swapscreen+set}" = set; then
   enableval="$enable_swapscreen"
@@ -4364,12 +4792,6 @@ _ACEOF
 fi;
 
 
-
-cat >>confdefs.h <<\_ACEOF
-#define PROTOTYPES 1
-_ACEOF
-
-
 # Extract the first word of "mv", so it can be a program name with args.
 set dummy mv; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -4650,45 +5072,6 @@ else
 echo "${ECHO_T}no" >&6
 fi
 
-# Extract the first word of "tbl", so it can be a program name with args.
-set dummy tbl; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_TBL+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $TBL in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TBL="$TBL" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_TBL="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-TBL=$ac_cv_path_TBL
-
-if test -n "$TBL"; then
-  echo "$as_me:$LINENO: result: $TBL" >&5
-echo "${ECHO_T}$TBL" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
 # Extract the first word of "tic", so it can be a program name with args.
 set dummy tic; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -6799,6 +7182,8 @@ done
 
 
 
+
+
 for ac_header in \
        assert.h \
        fcntl.h \
@@ -6821,6 +7206,8 @@ for ac_header in \
        utmpx.h \
         stdint.h \
         pty.h \
+        util.h \
+        libutil.h \
         wchar.h \
         cwchar \
         clocale \
@@ -9660,13 +10047,6 @@ _ACEOF
 
 
 
-case "$host_alias" in
-    *ultrix) ac_cv_func_setsid='no' ;;
-    *) break;;
-esac
-
-
-
 
 
 
@@ -9685,17 +10065,15 @@ esac
 
 
 for ac_func in \
-       atexit \
        revoke \
        unsetenv \
        setutent \
        seteuid \
+       setresuid \
        setreuid \
-       setsid \
-       setpgrp \
-       setpgid \
-       openpty \
        _getpty \
+       getpt \
+       posix_openpt \
        grantpt \
        unlockpt \
        isastream \
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $rxvt_cv_func_nl_langinfo" >&5
-echo "${ECHO_T}$rxvt_cv_func_nl_langinfo" >&6
-if test x$rxvt_cv_func_nl_langinfo = xyes; then
+echo "$as_me:$LINENO: result: $rxvt_cv_func_nl_langinfo" >&5
+echo "${ECHO_T}$rxvt_cv_func_nl_langinfo" >&6
+if test x$rxvt_cv_func_nl_langinfo = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for unix-compliant filehandle passing ability" >&5
+echo $ECHO_N "checking for unix-compliant filehandle passing ability... $ECHO_C" >&6
+if test "${rxvt_can_pass_fds+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 <sys/socket.h>
+
+int
+main ()
+{
+
+{
+  msghdr msg;
+  iovec iov;
+  char buf [100];
+  char data = 0;
+
+  iov.iov_base = &data;
+  iov.iov_len  = 1;
+
+  msg.msg_iov        = &iov;
+  msg.msg_iovlen     = 1;
+  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;
+
+  *(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_NL_LANGINFO 1
+#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
@@ -11398,9 +11868,10 @@ _ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking for getpt" >&5
-echo $ECHO_N "checking for getpt... $ECHO_C" >&6
-if test "${rxvt_cv_func_getpt+set}" = set; 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
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -11409,14 +11880,47 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#define _GNU_SOURCE
-#ifdef HAVE_STDLIB_H
-# include <cstdlib>
+/* Define openpty to an innocuous variant, in case <limits.h> declares openpty.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define openpty innocuous_openpty
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char openpty (); 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 openpty
+
+/* 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 openpty ();
+/* 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)
+choke me
+#else
+char (*f) () = openpty;
+#endif
+#ifdef __cplusplus
+}
 #endif
+
 int
 main ()
 {
-(void)getpt();
+return f != openpty;
   ;
   return 0;
 }
@@ -11442,23 +11946,89 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rxvt_cv_func_getpt=yes
+  ac_cv_func_openpty=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-rxvt_cv_func_getpt=no
+ac_cv_func_openpty=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $rxvt_cv_func_getpt" >&5
-echo "${ECHO_T}$rxvt_cv_func_getpt" >&6
-if test x$rxvt_cv_func_getpt = xyes; then
+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
+  :
+else
+  echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
+echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
+if test "${ac_cv_lib_util_openpty+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETPT 1
+/* 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 openpty ();
+int
+main ()
+{
+openpty ();
+  ;
+  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
+  ac_cv_lib_util_openpty=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_util_openpty=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+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
 
@@ -11467,16 +12037,18 @@ 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; then
+  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 x$rxvt_cv_func_getpt = xyes; then
-    rxvt_cv_ptys=GLIBC
  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
 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 = xOPENPTY; then
+if test x$rxvt_cv_ptys = xGLIBC; then
 
 cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_OPENPTY 1
+#define PTYS_ARE_GETPT 1
 _ACEOF
 
 fi
-if test x$rxvt_cv_ptys = xSCO; then
+if test x$rxvt_cv_ptys = xPOSIX; then
 
 cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_NUMERIC 1
+#define PTYS_ARE_POSIX 1
 _ACEOF
 
 fi
-if test x$rxvt_cv_ptys = xSTREAMS; then
+if test x$rxvt_cv_ptys = xOPENPTY; then
 
 cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_PTMX 1
+#define PTYS_ARE_OPENPTY 1
 _ACEOF
 
 fi
-if test x$rxvt_cv_ptys = xPTC; then
+if test x$rxvt_cv_ptys = xSCO; then
 
 cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_PTC 1
+#define PTYS_ARE_NUMERIC 1
 _ACEOF
 
 fi
-if test x$rxvt_cv_ptys = xSGI4; then
+if test x$rxvt_cv_ptys = xSTREAMS; then
 
 cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE__GETPTY 1
+#define PTYS_ARE_PTMX 1
 _ACEOF
 
 fi
-if test x$rxvt_cv_ptys = xCONVEX; then
+if test x$rxvt_cv_ptys = xPTC; then
 
 cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_GETPTY 1
+#define PTYS_ARE_PTC 1
 _ACEOF
 
 fi
-if test x$rxvt_cv_ptys = xGLIBC; then
+if test x$rxvt_cv_ptys = xSGI4; then
 
 cat >>confdefs.h <<\_ACEOF
-#define PTYS_ARE_GETPT 1
+#define PTYS_ARE__GETPTY 1
 _ACEOF
 
 fi
@@ -11557,7 +12130,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
-if test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xGLIBC; then
+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
@@ -11588,7 +12161,6 @@ fi
 
 if test x$support_xft = xyes; then
   LIBS="$LIBS `pkg-config xft --libs`"
-  CFLAGS="$CFLAGS `pkg-config xft --cflags`"
   CPPFLAGS="$CPPFLAGS `pkg-config xft --cflags`"
 
 
@@ -11882,13 +12454,6 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
-if test x$support_menubar = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define MENUBAR 1
-_ACEOF
-
-fi
 if test x$support_frills = xyes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -12057,6 +12622,184 @@ _ACEOF
   esac
 done
 
+IF_PERL=\#
+if test x$support_perl = xyes; then
+  # Extract the first word of "perl5", so it can be a program name with args.
+set dummy perl5; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PERL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+
+if test -n "$PERL"; then
+  echo "$as_me:$LINENO: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  # Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PERL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+
+if test -n "$PERL"; then
+  echo "$as_me:$LINENO: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+  echo "$as_me:$LINENO: checking for $PERL suitability" >&5
+echo $ECHO_N "checking for $PERL suitability... $ECHO_C" >&6
+  if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>/dev/null; then
+
+     save_CXXFLAGS="$CXXFLAGS"
+     save_LIBS="$LIBS"
+     CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`"
+     LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`"
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <EXTERN.h>
+#include <perl.h>
+#include <XSUB.h>
+
+int
+main ()
+{
+
+     PerlInterpreter *perl = perl_alloc ();
+
+  ;
+  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_perl_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+rxvt_perl_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+     CXXFLAGS="$save_CXXFLAGS"
+     LIBS="$save_LIBS"
+
+     if test x$rxvt_perl_link = xyes; then
+        echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_PERL 1
+_ACEOF
+
+        IF_PERL=
+        PERL_O=rxvtperl.o
+        PERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`"
+        PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`"
+        PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`"
+     else
+        { { echo "$as_me:$LINENO: error: no, unable to link" >&5
+echo "$as_me: error: no, unable to link" >&2;}
+   { (exit 1); exit 1; }; }
+     fi
+  else
+     { { echo "$as_me:$LINENO: error: no working perl found, or perl not version >= 5.8" >&5
+echo "$as_me: error: no working perl found, or perl not version >= 5.8" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+
+
+
+
+
+
+if test x$support_perl = xyes; then
+   support_frills=yes
+fi
+
 
 CFLAGS=${CFLAGS--O}
 LDFLAGS=${LDFLAGS--O}
 
 
 
-if test x$support_addstrings = xno; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_STRINGS 1
-_ACEOF
-
-fi
-
-MCOMMON=./autoconf/Make.common
-
-
 test "$program_prefix" != NONE &&
   program_transform_name="s,^,$program_prefix,;$program_transform_name"
 # Use a double $ so make ignores it.
@@ -12175,7 +12907,7 @@ else
   include_time_h="/* #include <time.h> */"
 fi
 
-                                                  ac_config_files="$ac_config_files autoconf/Make.common Makefile doc/Makefile src/Makefile src/rxvtlib.h"
+                                        ac_config_files="$ac_config_files Makefile doc/Makefile src/Makefile src/rxvtlib.h"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -12702,12 +13434,11 @@ for ac_config_target in $ac_config_targets
 do
   case "$ac_config_target" in
   # Handling of arguments.
-  "autoconf/Make.common" ) CONFIG_FILES="$CONFIG_FILES autoconf/Make.common" ;;
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
   "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
   "src/rxvtlib.h" ) CONFIG_FILES="$CONFIG_FILES src/rxvtlib.h" ;;
-  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:autoconf/config.h.in" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.h.in" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
@@ -12818,7 +13549,6 @@ s,@CPP@,$CPP,;t t
 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@AWK@,$AWK,;t t
 s,@LINKER@,$LINKER,;t t
 s,@CXXCPP@,$CXXCPP,;t t
 s,@EGREP@,$EGREP,;t t
@@ -12831,7 +13561,6 @@ s,@LN@,$LN,;t t
 s,@SED@,$SED,;t t
 s,@ECHO@,$ECHO,;t t
 s,@CMP@,$CMP,;t t
-s,@TBL@,$TBL,;t t
 s,@TIC@,$TIC,;t t
 s,@X_CFLAGS@,$X_CFLAGS,;t t
 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
@@ -12846,6 +13575,12 @@ s,@rxvt_int32_typedef@,$rxvt_int32_typedef,;t t
 s,@rxvt_uint32_typedef@,$rxvt_uint32_typedef,;t t
 s,@rxvt_intp_define@,$rxvt_intp_define,;t t
 s,@rxvt_u_intp_define@,$rxvt_u_intp_define,;t t
+s,@PERL@,$PERL,;t t
+s,@PERLLIB@,$PERLLIB,;t t
+s,@PERLFLAGS@,$PERLFLAGS,;t t
+s,@PERLPRIVLIBEXP@,$PERLPRIVLIBEXP,;t t
+s,@IF_PERL@,$IF_PERL,;t t
+s,@PERL_O@,$PERL_O,;t t
 s,@DEBUG@,$DEBUG,;t t
 s,@DINCLUDE@,$DINCLUDE,;t t
 s,@DLIB@,$DLIB,;t t
@@ -12864,8 +13599,6 @@ s,@include_sys_time_h@,$include_sys_time_h,;t t
 s,@include_time_h@,$include_time_h,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-/@MCOMMON@/r $MCOMMON
-s,@MCOMMON@,,;t t
 CEOF
 
 _ACEOF
@@ -13396,7 +14129,8 @@ else
   wtmp file:                  $rxvt_cv_path_wtmp
   wtmpx file:                 $rxvt_cv_path_wtmpx
   lastlog file:               $rxvt_cv_path_lastlog
-  ttys/ttytab file:           $rxvt_cv_path_ttytab"
+  ttys/ttytab file:           $rxvt_cv_path_ttytab
+  embedded perl:              $support_perl"
   echo
 fi
 if test x$term != x; then