]> code.delx.au - gnu-emacs/blobdiff - configure
Merge from emacs--rel--22
[gnu-emacs] / configure
index 8242d6ef59f2e9fb3c9f31dde3ab4709c1780914..f2f564823478759bf2dd2695b4365fc54e6f51b5 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61.
+# Generated by GNU Autoconf 2.61 for emacs 23.0.50.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -570,13 +570,12 @@ MAKEFLAGS=
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
+PACKAGE_NAME='emacs'
+PACKAGE_TARNAME='emacs'
+PACKAGE_VERSION='23.0.50'
+PACKAGE_STRING='emacs 23.0.50'
+PACKAGE_BUGREPORT=''
 
-ac_unique_file="src/lisp.h"
 ac_config_libobj_dir=src
 # Factoring default headers for most tests.
 ac_includes_default="\
@@ -679,6 +678,7 @@ INSTALL_DATA
 RANLIB
 INSTALL_INFO
 GZIP_PROG
+MAKEINFO
 LIBSOUND
 PKG_CONFIG
 ALSA_CFLAGS
@@ -686,8 +686,13 @@ ALSA_LIBS
 CFLAGS_SOUND
 SET_MAKE
 XMKMF
+HAVE_XSERVER
+RSVG_CFLAGS
+RSVG_LIBS
 GTK_CFLAGS
 GTK_LIBS
+DBUS_CFLAGS
+DBUS_LIBS
 XFT_CFLAGS
 XFT_LIBS
 ALLOCA
@@ -770,7 +775,7 @@ sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
 infodir='${datarootdir}/info'
 htmldir='${docdir}'
 dvidir='${docdir}'
@@ -1234,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures emacs 23.0.50 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1282,7 +1287,7 @@ Fine tuning of the installation directories:
   --infodir=DIR          info documentation [DATAROOTDIR/info]
   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR           man documentation [DATAROOTDIR/man]
-  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/emacs]
   --htmldir=DIR          html documentation [DOCDIR]
   --dvidir=DIR           dvi documentation [DOCDIR]
   --pdfdir=DIR           pdf documentation [DOCDIR]
@@ -1307,17 +1312,21 @@ _ACEOF
 fi
 
 if test -n "$ac_init_help"; then
-
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of emacs 23.0.50:";;
+   esac
   cat <<\_ACEOF
 
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-carbon-app[=DIR]  [DIR=/Application]
+  --enable-carbon-app[=DIR]
                           specify install directory for Emacs.app on Mac OS X
+                          [DIR=/Application]
   --enable-asserts        compile code with asserts enabled
-  --enable-maintainer-mode enable make rules and dependencies not useful
-                          (and sometimes confusing) to the casual installer
+  --enable-maintainer-mode
+                          enable make rules and dependencies not useful (and
+                          sometimes confusing) to the casual installer
   --enable-locallisppath=PATH
                           directories Emacs should search for lisp files
                           specific to this site
@@ -1332,19 +1341,23 @@ Optional Packages:
   --with-kerberos5        support Kerberos version 5 authenticated POP
   --with-hesiod           support Hesiod to get the POP server host
   --without-sound         don't compile with sound support
-  --with-x-toolkit=KIT    use an X toolkit
-                              (KIT = yes/lucid/athena/motif/gtk/no)
+  --with-x-toolkit=KIT    use an X toolkit (KIT one of: yes, lucid, athena,
+                          motif, gtk, no)
   --with-xpm              use -lXpm for displaying XPM images
   --with-jpeg             use -ljpeg for displaying JPEG images
   --with-tiff             use -ltiff for displaying TIFF images
-  --with-gif              use -lungif for displaying GIF images
+  --with-gif              use -lgif (or -lungif) for displaying GIF images
   --with-png              use -lpng for displaying PNG images
+  --with-gpm              use -lgpm for mouse support on a GNU/Linux console
+  --with-rsvg             use -lrsvg-2 for displaying SVG images
   --with-gtk              use GTK (same as --with-x-toolkit=gtk)
-  --with-pkg-config-prog  Path to pkg-config to use for finding GTK
+  --with-pkg-config-prog  Path to pkg-config for finding GTK and librsvg
   --without-toolkit-scroll-bars
                           don't use Motif or Xaw3d scroll bars
+  --without-xaw3d         don't use Xaw3d
   --without-xim           don't use X11 XIM
   --without-carbon        don't use Carbon GUI on Mac OS X
+  --without-dbus          don't use D-Bus
   --with-x                use the X Window System
 
 Some influential environment variables:
@@ -1421,7 +1434,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-configure
+emacs configure 23.0.50
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1435,7 +1448,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by $as_me, which was
+It was created by emacs $as_me 23.0.50, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -1771,6 +1784,14 @@ fi
 
 
 
+
+
+
+
+
+
+
+
 
 
 
@@ -1812,12 +1833,14 @@ gamedir='${localstatedir}/games/emacs'
 gameuser=games
 
 
+
 # Check whether --with-gcc was given.
 if test "${with_gcc+set}" = set; then
   withval=$with_gcc;
 fi
 
 
+
 # Check whether --with-pop was given.
 if test "${with_pop+set}" = set; then
   withval=$with_pop; if test "$withval" = yes; then
@@ -1836,6 +1859,7 @@ fi
 
 
 
+
 # Check whether --with-kerberos was given.
 if test "${with_kerberos+set}" = set; then
   withval=$with_kerberos; if test "$withval" = yes; then
@@ -1848,6 +1872,7 @@ fi
 
 
 
+
 # Check whether --with-kerberos5 was given.
 if test "${with_kerberos5+set}" = set; then
   withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
@@ -1867,6 +1892,7 @@ fi
 fi
 
 
+
 # Check whether --with-hesiod was given.
 if test "${with_hesiod+set}" = set; then
   withval=$with_hesiod; if test "$withval" = yes; then
@@ -1890,19 +1916,19 @@ fi
 # Check whether --with-x-toolkit was given.
 if test "${with_x_toolkit+set}" = set; then
   withval=$with_x_toolkit;       case "${withval}" in
-           y | ye | yes )      val=athena ;;
+           y | ye | yes )      val=gtk ;;
            n | no )            val=no  ;;
            l | lu | luc | luci | lucid )       val=lucid ;;
            a | at | ath | athe | athen | athena )      val=athena ;;
            m | mo | mot | moti | motif )       val=motif ;;
            g | gt | gtk  )     val=gtk ;;
            * )
-{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
+{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
-Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
-echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
+\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
+echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
-Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
+\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
    { (exit 1); exit 1; }; }
            ;;
          esac
@@ -1911,6 +1937,7 @@ Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
 fi
 
 
+
 # Check whether --with-xpm was given.
 if test "${with_xpm+set}" = set; then
   withval=$with_xpm;
@@ -1941,6 +1968,18 @@ if test "${with_png+set}" = set; then
 fi
 
 
+# Check whether --with-gpm was given.
+if test "${with_gpm+set}" = set; then
+  withval=$with_gpm;
+fi
+
+
+# Check whether --with-rsvg was given.
+if test "${with_rsvg+set}" = set; then
+  withval=$with_rsvg;
+fi
+
+
 # Check whether --with-gtk was given.
 if test "${with_gtk+set}" = set; then
   withval=$with_gtk;
@@ -1959,6 +1998,12 @@ if test "${with_toolkit_scroll_bars+set}" = set; then
 fi
 
 
+# Check whether --with-xaw3d was given.
+if test "${with_xaw3d+set}" = set; then
+  withval=$with_xaw3d;
+fi
+
+
 # Check whether --with-xim was given.
 if test "${with_xim+set}" = set; then
   withval=$with_xim;
@@ -1970,6 +2015,13 @@ if test "${with_carbon+set}" = set; then
   withval=$with_carbon;
 fi
 
+
+# Check whether --with-dbus was given.
+if test "${with_dbus+set}" = set; then
+  withval=$with_dbus;
+fi
+
+
 # Check whether --enable-carbon-app was given.
 if test "${enable_carbon_app+set}" = set; then
   enableval=$enable_carbon_app;  carbon_appdir_x=${enableval}
@@ -2169,7 +2221,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 canonical=$host
-configuration=${host_alias-$host}
+configuration=${host_alias-${build_alias-$host}}
 
 
 
@@ -3008,14 +3060,8 @@ _ACEOF
                ;;
       *-sunos5* | *-solaris* )
                opsys=sol2-6
-## FIXME: make this into a proper fix that checks the compiler type,
-## rather than relying on path. Or is /usr/ccs/lib/cpp a bad default now?
-               if [ "x$CC" = x/opt/SUNWspro/bin/cc ]; then
-                 ## -Xs prevents spurious whitespace.
-                 NON_GNU_CPP="/opt/SUNWspro/bin/cc -E -Xs"
-               else
-                 NON_GNU_CPP=/usr/ccs/lib/cpp
-               fi
+               emacs_check_sunpro_c=yes
+               NON_GNU_CPP=/usr/ccs/lib/cpp
                ;;
       *                          ) opsys=bsd4-2   ;;
     esac
@@ -4171,6 +4217,72 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 
+## If not using gcc, and on Solaris, and no CPP specified, see if
+## using a Sun compiler, which needs -Xs to prevent whitespace.
+if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
+ test x"$CPP" = x; then
+  { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
+echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
+
+if test "${emacs_cv_sunpro_c+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.  */
+
+int
+main ()
+{
+#ifndef __SUNPRO_C
+fail;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  emacs_cv_sunpro_c=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       emacs_cv_sunpro_c=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+
+  { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
+echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
+
+  if test x"$emacs_cv_sunpro_c" = xyes; then
+    NON_GNU_CPP="$CC -E -Xs"
+  fi
+fi
+
 #### Some systems specify a CPP to use unless we are using GCC.
 #### Now that we know whether we are using GCC, we can decide whether
 #### to use that one.
@@ -4198,7 +4310,6 @@ then
   CC="$CC $NON_GCC_TEST_OPTIONS"
 fi
 
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5267,6 +5378,61 @@ fi
 
 
 
+## Need makeinfo >= 4.6 (?) to build the manuals.
+# Extract the first word of "makeinfo", so it can be a program name with args.
+set dummy makeinfo; 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_MAKEINFO+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAKEINFO in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MAKEINFO="$MAKEINFO" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_MAKEINFO="$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
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
+  ;;
+esac
+fi
+MAKEINFO=$ac_cv_path_MAKEINFO
+if test -n "$MAKEINFO"; then
+  { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
+echo "${ECHO_T}$MAKEINFO" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+if test "$MAKEINFO" != "no" && \
+  test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[6-9]|4\.[1-5][0-9]+)'`" = x; then
+   MAKEINFO=no
+fi
+
+if test "$MAKEINFO" = "no"; then
+  { { echo "$as_me:$LINENO: error: makeinfo >= 4.6 is required " >&5
+echo "$as_me: error: makeinfo >= 4.6 is required " >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
 then
   ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
@@ -9515,7 +9681,13 @@ case "${window_system}" in
       gtk ) with_gtk=yes
             USE_X_TOOLKIT=none ;;
       no ) USE_X_TOOLKIT=none ;;
-      * ) USE_X_TOOLKIT=maybe ;;
+      * )
+          if test x"$with_gtk" = xyes; then
+             USE_X_TOOLKIT=none
+          else
+             USE_X_TOOLKIT=maybe
+          fi
+          ;;
     esac
   ;;
   mac | none )
@@ -9525,6 +9697,68 @@ case "${window_system}" in
   ;;
 esac
 
+if test "$window_system" = none && test "X$with_x" != "Xno"; then
+   # Extract the first word of "X", so it can be a program name with args.
+set dummy X; 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_HAVE_XSERVER+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$HAVE_XSERVER"; then
+  ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_HAVE_XSERVER="true"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
+fi
+fi
+HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
+if test -n "$HAVE_XSERVER"; then
+  { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
+echo "${ECHO_T}$HAVE_XSERVER" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+   if test "$HAVE_XSERVER" = true ||
+      test -n "$DISPLAY" ||
+      test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
+        { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
+were found.  You should install the relevant development files for X
+and for the toolkit you want, such as Gtk+, Lesstif or Motif.  Also make
+sure you have development files for image handling, i.e.
+tiff, gif, jpeg, png and xpm.
+If you are sure you want Emacs compiled without X window support, pass
+  --without-x
+to configure." >&5
+echo "$as_me: error: You seem to be running X, but no X development libraries
+were found.  You should install the relevant development files for X
+and for the toolkit you want, such as Gtk+, Lesstif or Motif.  Also make
+sure you have development files for image handling, i.e.
+tiff, gif, jpeg, png and xpm.
+If you are sure you want Emacs compiled without X window support, pass
+  --without-x
+to configure." >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+fi
+
 ### If we're using X11, we should use the X menu package.
 HAVE_MENUS=no
 case ${HAVE_X11} in
@@ -10876,93 +11110,18 @@ echo "${ECHO_T}before 6" >&6; }
   fi
 fi
 
-if test "${window_system}" = "x11"; then
-  { echo "$as_me:$LINENO: checking X11 version 5" >&5
-echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6; }
-  if test "${emacs_cv_x11_version_5+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 <X11/Xlib.h>
-int
-main ()
-{
-#if XlibSpecificationRelease < 5
-fail;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  emacs_cv_x11_version_5=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       emacs_cv_x11_version_5=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-
-  if test $emacs_cv_x11_version_5 = yes; then
-    { echo "$as_me:$LINENO: result: 5 or newer" >&5
-echo "${ECHO_T}5 or newer" >&6; }
-    HAVE_X11R5=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_X11R5 1
-_ACEOF
 
-  else
-    HAVE_X11R5=no
-    { echo "$as_me:$LINENO: result: before 5" >&5
-echo "${ECHO_T}before 5" >&6; }
-  fi
-fi
+### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
+HAVE_RSVG=no
+if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
+  if test "${with_rsvg}" != "no"; then
+        if test "X${with_pkg_config_prog}" != X; then
+      PKG_CONFIG="${with_pkg_config_prog}"
+    fi
 
-HAVE_GTK=no
-if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
-  USE_X_TOOLKIT=none
-fi
-if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
-  if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
-    { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
-echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
-   { (exit 1); exit 1; }; };
-  fi
-  GLIB_REQUIRED=2.6
-  GTK_REQUIRED=2.6
-  GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
+    RSVG_REQUIRED=2.0.0
+    RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
 
-    if test "X${with_pkg_config_prog}" != X; then
-    PKG_CONFIG="${with_pkg_config_prog}"
-  fi
 
   succeeded=no
 
   fi
 
   if test "$PKG_CONFIG" = "no" ; then
-     { { echo "$as_me:$LINENO: error:
-      *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog.  Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&5
-echo "$as_me: error:
-      *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog.  Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&2;}
-   { (exit 1); exit 1; }; }
+     :
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
-        { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
-echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
+        { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
+echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
 
-        if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
+        if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
             { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
             succeeded=yes
 
-            { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
-echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
-            GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
-            { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
-echo "${ECHO_T}$GTK_CFLAGS" >&6; }
-
-            { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
-echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
-            GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
-            { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
-echo "${ECHO_T}$GTK_LIBS" >&6; }
+            { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
+echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
+            RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
+            { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
+echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
+
+            { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
+echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
+            RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
+            { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
+echo "${ECHO_T}$RSVG_LIBS" >&6; }
         else
             { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-            GTK_CFLAGS=""
-            GTK_LIBS=""
+            RSVG_CFLAGS=""
+            RSVG_LIBS=""
             ## If we have a custom action on failure, don't print errors, but
             ## do set a variable so people can do so.
-            GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
-            echo $GTK_PKG_ERRORS
+            RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
+
         fi
 
 
@@ -11060,27 +11215,166 @@ echo "${ECHO_T}no" >&6; }
   if test $succeeded = yes; then
      :
   else
-     { { echo "$as_me:$LINENO: error: Library requirements ($GTK_MODULES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
-echo "$as_me: error: Library requirements ($GTK_MODULES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
-   { (exit 1); exit 1; }; }
+     :
   fi
 
 
 
-  C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
-  CFLAGS="$CFLAGS $GTK_CFLAGS"
-  LIBS="$GTK_LIBS $LIBS"
-    GTK_COMPILES=no
 
-for ac_func in gtk_main
-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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+    if test ".${RSVG_CFLAGS}" != "."; then
+      HAVE_RSVG=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RSVG 1
+_ACEOF
+
+      CFLAGS="$CFLAGS $RSVG_CFLAGS"
+      LIBS="$RSVG_LIBS $LIBS"
+    fi
+  fi
+fi
+
+
+HAVE_GTK=no
+if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
+  USE_X_TOOLKIT=none
+fi
+if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \
+ test "$USE_X_TOOLKIT" = "maybe"; then
+  if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
+    { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
+echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
+   { (exit 1); exit 1; }; };
+  fi
+  GLIB_REQUIRED=2.6
+  GTK_REQUIRED=2.6
+  GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
+
+    if test "X${with_pkg_config_prog}" != X; then
+    PKG_CONFIG="${with_pkg_config_prog}"
+  fi
+
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; 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_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PKG_CONFIG="$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
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     pkg_check_gtk=no
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
+echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
+
+        if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
+            { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+            succeeded=yes
+
+            { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
+echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
+            GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
+            { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
+echo "${ECHO_T}$GTK_CFLAGS" >&6; }
+
+            { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
+echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
+            GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
+            { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
+echo "${ECHO_T}$GTK_LIBS" >&6; }
+        else
+            { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+            GTK_CFLAGS=""
+            GTK_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
+
+        fi
+
+
+
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     pkg_check_gtk=yes
+  else
+     pkg_check_gtk=no
+  fi
+
+  if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
+     { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
+echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+
+if test x"$pkg_check_gtk" = xyes; then
+
+
+
+  C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
+  CFLAGS="$CFLAGS $GTK_CFLAGS"
+  LIBS="$GTK_LIBS $LIBS"
+    GTK_COMPILES=no
+
+for ac_func in gtk_main
+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 { as_var=$as_ac_var; eval "test \"\${$as_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
 done
 
   if test "${GTK_COMPILES}" != "yes"; then
-    { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log.  Maybe some x11-devel files missing?" >&5
+    if test "$USE_X_TOOLKIT" != "maybe"; then
+      { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log.  Maybe some x11-devel files missing?" >&5
 echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log.  Maybe some x11-devel files missing?" >&2;}
    { (exit 1); exit 1; }; };
-  fi
-
-  HAVE_GTK=yes
+    fi
+  else
+    HAVE_GTK=yes
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_GTK 1
 _ACEOF
 
-  USE_X_TOOLKIT=none
+    USE_X_TOOLKIT=none
+  fi
+
+fi
+
+
+if test "${HAVE_GTK}" = "yes"; then
 
       if test "$with_toolkit_scroll_bars" != no; then
     with_toolkit_scroll_bars=yes
@@ -11285,6 +11586,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
   fi
+
       HAVE_GTK_FILE_SELECTION=no
 
 for ac_func in gtk_file_selection_new
@@ -11709,6 +12011,113 @@ _ACEOF
   fi
 fi
 
+HAVE_DBUS=no
+if test "${with_dbus}" = "yes"; then
+
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; 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_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PKG_CONFIG="$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
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     HAVE_DBUS=no
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
+echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
+
+        if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
+            { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+            succeeded=yes
+
+            { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
+echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
+            DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
+            { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
+echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
+
+            { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
+echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
+            DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
+            { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
+echo "${ECHO_T}$DBUS_LIBS" >&6; }
+        else
+            { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+            DBUS_CFLAGS=""
+            DBUS_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
+
+        fi
+
+
+
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     HAVE_DBUS=yes
+  else
+     HAVE_DBUS=no
+  fi
+
+   if test "$HAVE_DBUS" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DBUS 1
+_ACEOF
+
+   fi
+fi
+
 ### Link with -lXft if available to work around a bug.
 HAVE_XFT=maybe
 if test "${HAVE_GTK}" = "yes"; then
@@ -12030,11 +12439,12 @@ _ACEOF
   fi
 fi
 
+HAVE_XAW3D=no
 if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
-  if test x"${HAVE_X11R5}" = xyes; then
-    { echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
-echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6; }
-    if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
+  if test "$with_xaw3d" != no; then
+    { echo "$as_me:$LINENO: checking for xaw3d" >&5
+echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
+    if test "${emacs_cv_xaw3d+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -12045,7 +12455,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 #include <X11/Intrinsic.h>
-#include <X11/Xaw/Simple.h>
+#include <X11/Xaw3d/Simple.h>
 int
 main ()
 {
@@ -12072,45 +12482,109 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  emacs_cv_x11_version_5_with_xaw=yes
+  emacs_cv_xaw3d=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       emacs_cv_x11_version_5_with_xaw=no
+       emacs_cv_xaw3d=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
 
-    if test $emacs_cv_x11_version_5_with_xaw = yes; then
-      { echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
-echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6; }
-      USE_X_TOOLKIT=LUCID
-    else
-      if test x"${USE_X_TOOLKIT}" = xLUCID; then
-        { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
-echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
-   { (exit 1); exit 1; }; }
-      else
-        { echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
-echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6; }
-        USE_X_TOOLKIT=none
-      fi
-    fi
   else
-    USE_X_TOOLKIT=none
+    emacs_cv_xaw3d=no
   fi
-fi
+  if test $emacs_cv_xaw3d = yes; then
+    { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
+echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
+    USE_X_TOOLKIT=LUCID
+    HAVE_XAW3D=yes
 
-X_TOOLKIT_TYPE=$USE_X_TOOLKIT
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XAW3D 1
+_ACEOF
 
-if test "${USE_X_TOOLKIT}" != "none"; then
-  { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
-echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
-  if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  else
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    { echo "$as_me:$LINENO: checking for libXaw" >&5
+echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
+    if test "${emacs_cv_xaw+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 <X11/Intrinsic.h>
+#include <X11/Xaw/Simple.h>
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  emacs_cv_xaw=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       emacs_cv_xaw=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+
+    if test $emacs_cv_xaw = yes; then
+      { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
+echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
+      USE_X_TOOLKIT=LUCID
+    elif test x"${USE_X_TOOLKIT}" = xLUCID; then
+      { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
+echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
+   { (exit 1); exit 1; }; }
+    else
+      { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
+echo "${ECHO_T}no; do not use toolkit by default" >&6; }
+      USE_X_TOOLKIT=none
+    fi
+  fi
+fi
+
+X_TOOLKIT_TYPE=$USE_X_TOOLKIT
+
+if test "${USE_X_TOOLKIT}" != "none"; then
+  { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
+echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
+  if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -12537,130 +13011,6 @@ echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
   fi
 fi
 
-### Is -lXaw3d available?
-HAVE_XAW3D=no
-if test "${HAVE_X11}" = "yes"; then
-  if test "${USE_X_TOOLKIT}" != "none" && test "${with_toolkit_scroll_bars}" != "no"; then
-            { echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
-echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+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 <X11/Xaw3d/Scrollbar.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_cv_header_X11_Xaw3d_Scrollbar_h=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
-echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6; }
-if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
-  { echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
-echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6; }
-if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXaw3d  $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 GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XawScrollbarSetThumb ();
-int
-main ()
-{
-return XawScrollbarSetThumb ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
-echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
-if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
-  HAVE_XAW3D=yes
-fi
-
-fi
-
-
-    if test "${HAVE_XAW3D}" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_XAW3D 1
-_ACEOF
-
-    fi
-  fi
-fi
-
 
 
 USE_TOOLKIT_SCROLL_BARS=no
@@ -13646,28 +13996,315 @@ echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedenc
 
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
-echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_tiffio_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
+echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_tiffio_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_tiffio_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
+echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
+
+fi
+if test $ac_cv_header_tiffio_h = yes; then
+  tifflibs="-lz -lm"
+      # At least one tiff package requires the jpeg library.
+      if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
+      { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
+echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
+if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltiff $tifflibs $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 GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char TIFFGetVersion ();
+int
+main ()
+{
+return TIFFGetVersion ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_tiff_TIFFGetVersion=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_tiff_TIFFGetVersion=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
+echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
+if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
+  HAVE_TIFF=yes
+fi
+
+fi
+
+
+  fi
+
+  if test "${HAVE_TIFF}" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TIFF 1
+_ACEOF
+
+  fi
+fi
+
+### Use -lgif or -lungif if available, unless `--with-gif=no'.
+HAVE_GIF=no
+if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
+  if test "${ac_cv_header_gif_lib_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
+echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_gif_lib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
+echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
+echo $ECHO_N "checking gif_lib.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.  */
+$ac_includes_default
+#include <gif_lib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; 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 core 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 gif_lib.h presence" >&5
+echo $ECHO_N "checking gif_lib.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 <gif_lib.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.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_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gif_lib.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: gif_lib.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gif_lib.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: gif_lib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
+echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_gif_lib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_gif_lib_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
+echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
+
+fi
+if test $ac_cv_header_gif_lib_h = yes; then
+  # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
+# Earlier versions can crash Emacs.
+    { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
+echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
+if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgif  $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 GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char EGifPutExtensionLast ();
+int
+main ()
+{
+return EGifPutExtensionLast ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_gif_EGifPutExtensionLast=yes
 else
-  ac_cv_header_tiffio_h=$ac_header_preproc
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_gif_EGifPutExtensionLast=no
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
-echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
 
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-if test $ac_cv_header_tiffio_h = yes; then
-  tifflibs="-lz -lm"
-      # At least one tiff package requires the jpeg library.
-      if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
-      { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
-echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
-if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
+echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
+if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
+  HAVE_GIF=yes
+else
+  try_libungif=yes
+fi
+
+fi
+
+
+
+  if test "$HAVE_GIF" = yes; then
+      ac_gif_lib_name="-lgif"
+  fi
+
+# If gif_lib.h but no libgif, try libungif.
+  if test x"$try_libungif" = xyes; then
+    { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
+echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltiff $tifflibs $LIBS"
+LIBS="-lungif  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -13681,11 +14318,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char TIFFGetVersion ();
+char EGifPutExtensionLast ();
 int
 main ()
 {
-return TIFFGetVersion ();
+return EGifPutExtensionLast ();
   ;
   return 0;
 }
@@ -13708,54 +14345,90 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_tiff_TIFFGetVersion=yes
+  ac_cv_lib_ungif_EGifPutExtensionLast=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_tiff_TIFFGetVersion=no
+       ac_cv_lib_ungif_EGifPutExtensionLast=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
-echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
-if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
-  HAVE_TIFF=yes
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
+echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
+if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
+  HAVE_GIF=yes
 fi
 
-fi
 
+    if test "$HAVE_GIF" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define LIBGIF -lungif
+_ACEOF
 
+      ac_gif_lib_name="-lungif"
+    fi
   fi
 
-  if test "${HAVE_TIFF}" = "yes"; then
+  if test "${HAVE_GIF}" = "yes"; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_TIFF 1
+#define HAVE_GIF 1
 _ACEOF
 
   fi
 fi
 
-### Use -lgif if available, unless `--with-gif=no'.
-HAVE_GIF=no
 if test "${HAVE_X11}" = "yes"; then
-  if test "${with_gif}" != "no"; then
-    if test "${ac_cv_header_gif_lib_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
-echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_gif_lib_h+set}" = set; then
+  MISSING=""
+  WITH_NO=""
+  test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
+    MISSING="libXpm" && WITH_NO="--with-xpm=no"
+  test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
+    MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
+  test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
+    MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
+  test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
+    MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
+  test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
+    MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
+
+  if test "X${MISSING}" != X; then
+    { { echo "$as_me:$LINENO: error: The following required libraries were not found:
+    $MISSING
+Maybe some development libraries/packages are missing?
+If you don't want to link with them give
+    $WITH_NO
+as options to configure" >&5
+echo "$as_me: error: The following required libraries were not found:
+    $MISSING
+Maybe some development libraries/packages are missing?
+If you don't want to link with them give
+    $WITH_NO
+as options to configure" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+### Use -lgpm if available, unless `--with-gpm=no'.
+HAVE_GPM=no
+if test "${with_gpm}" != "no"; then
+  if test "${ac_cv_header_gpm_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for gpm.h" >&5
+echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_gpm_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
-echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
+echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
-echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
+echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -13763,7 +14436,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <gif_lib.h>
+#include <gpm.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -13795,15 +14468,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
-echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
+echo $ECHO_N "checking gpm.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 <gif_lib.h>
+#include <gpm.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -13836,49 +14509,47 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gif_lib.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: gif_lib.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gif_lib.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: gif_lib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gpm.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: gpm.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gpm.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: gpm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
 
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
-echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_gif_lib_h+set}" = set; then
+{ echo "$as_me:$LINENO: checking for gpm.h" >&5
+echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_gpm_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_gif_lib_h=$ac_header_preproc
+  ac_cv_header_gpm_h=$ac_header_preproc
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
-echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
+echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
 
 fi
-if test $ac_cv_header_gif_lib_h = yes; then
-  # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
-# Earlier versions can crash Emacs.
-      { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
-echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
+if test $ac_cv_header_gpm_h = yes; then
+  { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
+echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
+if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lungif  $LIBS"
+LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -13892,11 +14563,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char EGifPutExtensionLast ();
+char Gpm_Open ();
 int
 main ()
 {
-return EGifPutExtensionLast ();
+return Gpm_Open ();
   ;
   return 0;
 }
@@ -13919,36 +14590,35 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_ungif_EGifPutExtensionLast=yes
+  ac_cv_lib_gpm_Gpm_Open=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_ungif_EGifPutExtensionLast=no
+       ac_cv_lib_gpm_Gpm_Open=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
-echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
-if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
-  HAVE_GIF=yes
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
+if test $ac_cv_lib_gpm_Gpm_Open = yes; then
+  HAVE_GPM=yes
 fi
 
 fi
 
 
-  fi
+fi
 
-  if test "${HAVE_GIF}" = "yes"; then
+if test "${HAVE_GPM}" = "yes"; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_GIF 1
+#define HAVE_GPM 1
 _ACEOF
 
-  fi
 fi
 
 if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
@@ -14736,6 +15406,12 @@ _ACEOF
 fi
 
 
+if test x"$ac_cv_func_alloca_works" != xyes; then
+   { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
+echo "$as_me: error: a system implementation of alloca is required " >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
 # fmod, logb, and frexp are found in -lm on most systems.
 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
 
@@ -15309,12 +15985,11 @@ done
 
 
 
-
 
 
 for ac_func in gethostname getdomainname dup2 \
 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
-random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
+random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
 utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
@@ -18998,10 +19673,123 @@ _ACEOF
 fi
 
 
+# Do we have res_init, for detecting changes in /etc/resolv.conf?
+
+resolv=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+int
+main ()
+{
+return res_init();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  have_res_init=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       have_res_init=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$have_res_init" = no; then
+  OLIBS="$LIBS"
+  LIBS="$LIBS -lresolv"
+  { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
+echo $ECHO_N "checking for res_init with -lresolv... $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 <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+int
+main ()
+{
+return res_init();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  have_res_init=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       have_res_init=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+  { echo "$as_me:$LINENO: result: $have_res_init" >&5
+echo "${ECHO_T}$have_res_init" >&6; }
+  if test "$have_res_init" = yes ; then
+    resolv=yes
+  fi
+  LIBS="$OLIBS"
+fi
+
+if test "$have_res_init" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RES_INIT 1
+_ACEOF
+
+fi
+
 # Do we need the Hesiod library to provide the support routines?
 if test "$with_hesiod" = yes ; then
   # Don't set $LIBS here -- see comments above.
-  resolv=no
   { echo "$as_me:$LINENO: checking for res_send" >&5
 echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
 if test "${ac_cv_func_res_send+set}" = set; then
 
   if test "$resolv" = yes ; then
     RESOLVLIB=-lresolv
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBRESOLV 1
-_ACEOF
-
   else
     RESOLVLIB=
   fi
 
 fi
 
+# Do we need libresolv (due to res_init or Hesiod)?
+if test "$resolv" = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBRESOLV 1
+_ACEOF
+
+fi
+
 # These tell us which Kerberos-related libraries to use.
 if test "${with_kerberos+set}" = set; then
 
@@ -23083,6 +23875,7 @@ fi
 
 
 
+
 #### Report on what we decided to do.
 #### Report GTK as a toolkit, even if it doesn't use Xt.
 #### It makes printing result more understandable as using GTK sets
@@ -23119,8 +23912,10 @@ echo "  Does Emacs use -lXaw3d?                                 ${HAVE_XAW3D}"
 echo "  Does Emacs use -lXpm?                                   ${HAVE_XPM}"
 echo "  Does Emacs use -ljpeg?                                  ${HAVE_JPEG}"
 echo "  Does Emacs use -ltiff?                                  ${HAVE_TIFF}"
-echo "  Does Emacs use -lungif?                                 ${HAVE_GIF}"
+echo "  Does Emacs use a gif library?                           ${HAVE_GIF} $ac_gif_lib_name"
 echo "  Does Emacs use -lpng?                                   ${HAVE_PNG}"
+echo "  Does Emacs use -lrsvg-2?                                ${HAVE_RSVG}"
+echo "  Does Emacs use -lgpm?                                   ${HAVE_GPM}"
 echo "  Does Emacs use X toolkit scroll bars?                   ${USE_TOOLKIT_SCROLL_BARS}"
 echo
 
@@ -23141,6 +23936,19 @@ if test "$USE_X_TOOLKIT" = GTK; then
 fi
 
 
+if test "$HAVE_CARBON" = "yes"; then
+   echo
+   echo "Warning: The Mac Carbon port is currently unsupported and has
+known problems.  It is not recommended for use by non-developers.
+Read the emacs-devel archives for more information."
+   echo
+fi
+
+if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
+  echo "D-Bus integration has been tested for GNU/Linux only."
+  echo
+fi
+
 
 # Remove any trailing slashes in these variables.
 test "${prefix}" != NONE &&
@@ -23170,7 +23978,7 @@ fi
 rm -f conftest*
 
 
-ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile"
+ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile.c:src/Makefile.in lwlib/Makefile lisp/Makefile leim/Makefile"
 
 ac_config_commands="$ac_config_commands default"
 
@@ -23570,7 +24378,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by $as_me, which was
+This file was extended by emacs $as_me 23.0.50, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -23623,7 +24431,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-config.status
+emacs config.status 23.0.50
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
     "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
-    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
-    "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
+    "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
+    "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
+    "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
+    "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
     "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
+    "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
     "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
-    "lispref/Makefile") CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
-    "lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
     "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
@@ -23873,6 +24682,7 @@ INSTALL_DATA!$INSTALL_DATA$ac_delim
 RANLIB!$RANLIB$ac_delim
 INSTALL_INFO!$INSTALL_INFO$ac_delim
 GZIP_PROG!$GZIP_PROG$ac_delim
+MAKEINFO!$MAKEINFO$ac_delim
 LIBSOUND!$LIBSOUND$ac_delim
 PKG_CONFIG!$PKG_CONFIG$ac_delim
 ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
@@ -23880,8 +24690,13 @@ ALSA_LIBS!$ALSA_LIBS$ac_delim
 CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
 SET_MAKE!$SET_MAKE$ac_delim
 XMKMF!$XMKMF$ac_delim
+HAVE_XSERVER!$HAVE_XSERVER$ac_delim
+RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
+RSVG_LIBS!$RSVG_LIBS$ac_delim
 GTK_CFLAGS!$GTK_CFLAGS$ac_delim
 GTK_LIBS!$GTK_LIBS$ac_delim
+DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
+DBUS_LIBS!$DBUS_LIBS$ac_delim
 XFT_CFLAGS!$XFT_CFLAGS$ac_delim
 XFT_LIBS!$XFT_LIBS$ac_delim
 ALLOCA!$ALLOCA$ac_delim
@@ -23901,12 +24716,6 @@ locallisppath!$locallisppath$ac_delim
 lisppath!$lisppath$ac_delim
 x_default_search_path!$x_default_search_path$ac_delim
 etcdir!$etcdir$ac_delim
-archlibdir!$archlibdir$ac_delim
-bitmapdir!$bitmapdir$ac_delim
-gamedir!$gamedir$ac_delim
-gameuser!$gameuser$ac_delim
-c_switch_system!$c_switch_system$ac_delim
-c_switch_machine!$c_switch_machine$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -23948,6 +24757,12 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+archlibdir!$archlibdir$ac_delim
+bitmapdir!$bitmapdir$ac_delim
+gamedir!$gamedir$ac_delim
+gameuser!$gameuser$ac_delim
+c_switch_system!$c_switch_system$ac_delim
+c_switch_machine!$c_switch_machine$ac_delim
 LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
 LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
 C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
@@ -23958,7 +24773,7 @@ carbon_appdir!$carbon_appdir$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 14; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5