--- emacs23-23.1+1.orig/debian/emacsVER.desktop
+++ emacs23-23.1+1/debian/emacsVER.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=GNU Emacs @MENU_VERSION@
+GenericName=Text Editor
+Comment=View and edit files
+MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
+Exec=/usr/bin/@DEB_FLAVOR@ %F
+TryExec=@DEB_FLAVOR@
+Icon=/usr/share/icons/hicolor/scalable/apps/@DEB_FLAVOR@.svg
+Type=Application
+Terminal=false
+Categories=Utility;Development;TextEditor;
--- emacs23-23.1+1.orig/debian/emacsVER-bin-common.lintian-overrides
+++ emacs23-23.1+1/debian/emacsVER-bin-common.lintian-overrides
@@ -0,0 +1,8 @@
+@PKG_NAME@ binary: setgid-binary @MOVEMAIL_BIN@ 2755 root/mail
+@PKG_NAME@ binary: binary-without-manpage usr/bin/b2m.@DEB_FLAVOR@
+@PKG_NAME@ binary: binary-without-manpage usr/bin/ctags.@DEB_FLAVOR@
+@PKG_NAME@ binary: binary-without-manpage usr/bin/ebrowse.@DEB_FLAVOR@
+@PKG_NAME@ binary: binary-without-manpage usr/bin/emacsclient.@DEB_FLAVOR@
+@PKG_NAME@ binary: binary-without-manpage usr/bin/etags.@DEB_FLAVOR@
+@PKG_NAME@ binary: binary-without-manpage usr/bin/grep-changelog.@DEB_FLAVOR@
+@PKG_NAME@ binary: binary-without-manpage usr/bin/rcs-checkin.@DEB_FLAVOR@
--- emacs23-23.1+1.orig/debian/emacsVER.postinst
+++ emacs23-23.1+1/debian/emacsVER.postinst
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+set -e
+
+FLAVOR=@DEB_FLAVOR@
+
+update-alternatives \
+  --install /usr/bin/emacs emacs \
+            /usr/bin/${FLAVOR}-@X_SUPPORT@ @BIN_PRIORITY@ \
+  --slave /usr/share/man/man1/emacs.1.gz emacs.1.gz \
+          /usr/share/man/man1/emacs.${FLAVOR}.1.gz \
+  --slave /usr/share/icons/hicolor/scalable/apps/emacs.svg emacs.svg \
+          /usr/share/icons/hicolor/scalable/apps/${FLAVOR}.svg \
+  --slave /usr/share/icons/hicolor/scalable/mimetypes/emacs-document.svg \
+          emacs-document.svg \
+          /usr/share/icons/hicolor/scalable/mimetypes/${FLAVOR}-document.svg \
+  --slave /usr/share/icons/hicolor/16x16/apps/emacs.png emacs-16x16.png \
+          /usr/share/icons/hicolor/16x16/apps/${FLAVOR}.png \
+  --slave /usr/share/icons/hicolor/24x24/apps/emacs.png  emacs-24x24.png \
+          /usr/share/icons/hicolor/24x24/apps/${FLAVOR}.png \
+  --slave /usr/share/icons/hicolor/32x32/apps/emacs.png emacs-32x32.png \
+          /usr/share/icons/hicolor/32x32/apps/${FLAVOR}.png \
+  --slave /usr/share/icons/hicolor/48x48/apps/emacs.png emacs-48x48.png \
+          /usr/share/icons/hicolor/48x48/apps/${FLAVOR}.png \
+  --slave /usr/share/icons/hicolor/128x128/apps/emacs.png emacs-128x128.png \
+          /usr/share/icons/hicolor/128x128/apps/${FLAVOR}.png
+
+update-alternatives \
+  --install /usr/bin/editor editor \
+            /usr/bin/${FLAVOR} 0 \
+  --slave /usr/share/man/man1/editor.1.gz editor.1.gz \
+          /usr/share/man/man1/emacs.1${FLAVOR}.1.gz
+
+# emacsen-common registration.
+/usr/lib/emacsen-common/emacs-install ${FLAVOR}
+
+#DEBHELPER#
--- emacs23-23.1+1.orig/debian/emacsVER-common.lintian-overrides
+++ emacs23-23.1+1/debian/emacsVER-common.lintian-overrides
@@ -0,0 +1 @@
+@PKG_NAME@ binary: desktop-command-not-in-package /usr/share/applications/emacs.desktop emacs
--- emacs23-23.1+1.orig/debian/mangle-info
+++ emacs23-23.1+1/debian/mangle-info
@@ -0,0 +1,17 @@
+#!/usr/bin/perl -w -i
+
+use English;
+use strict;
+
+$RS = undef;
+
+my $prefix = $ENV{"DEBIAN_INFO_PREFIX"};
+
+my $x = <>;
+if(!($x =~ m/^(\s*START-INFO-DIR-ENTRY\s+\*\s*[^:]+:\s*)\(([^\)]+)\)/mo)) {
+  die "Couldn't find START-INFO-DIR-ENTRY.";
+}
+   
+print ${PREMATCH};
+print "$1($prefix/$2)";
+print ${POSTMATCH};
--- emacs23-23.1+1.orig/debian/compat
+++ emacs23-23.1+1/debian/compat
@@ -0,0 +1 @@
+4
--- emacs23-23.1+1.orig/debian/emacsVER.README.Debian
+++ emacs23-23.1+1/debian/emacsVER.README.Debian
@@ -0,0 +1,3 @@
+
+Please see /usr/share/doc/emacs@MAJOR_VERSION@-common/ as the primary
+documentation directory.
--- emacs23-23.1+1.orig/debian/emacsVER-common.README
+++ emacs23-23.1+1/debian/emacsVER-common.README
@@ -0,0 +1,42 @@
+This file details the Debian specific changes to Emacs.
+
+The following tags may be used in the sections below: Patch, Status,
+Author, Added-by, Provided-by, and Date.  When known, Author is used
+to indicate the person believed to have written the relevant code.
+Provided-by may be used to indicate the person who submitted the code
+to Debian, and Added-by indicates the person who actually added the
+code to the Debian package.
+
+* The Debian copy of the upstream source contains no .elc files.
+
+  The .elc files have been removed because we always regenerate them
+  and because Emacs modifies them in the source tree during the build
+  process, even when using a VPATH build.  This means that a "make
+  clean" can't easily return the tree to the upstream state, resulting
+  in a giant Debian binary diff.  There are other solutions if this
+  turns out to be a problem.  If nothing else, we can keep the current
+  infrastructure and just add the .elc files to protected_files in
+  debian/rules.  Removing the .elc files doesn't affect whether or not
+  our source archive would match the upstream md5sum because we have
+  to repackage it anyway to add leim support.
+
+* The etc/yow.lines file has been updated from the upstream development tree.
+
+The etc/yow.lines file in the Debian package is newer than the one in
+the original distribution.  It has been copied from the upstream Emacs
+development tree.
+
+* The -i icon is the Emacs GNU.
+
+* Those who prefer the old-style scrollbars can edit debian/rules
+
+  If you prefer the old-style, non-toolkit scrollbars, just edit
+  debian/rules to add --without-toolkit-scrollbars where indicated and
+  rebuild.
+
+@@PATCH_LIST_HERE@@
+
+Local Variables:
+mode: outline
+outline-regexp: " *\\*+"
+End:
--- emacs23-23.1+1.orig/debian/emacsVER.prerm
+++ emacs23-23.1+1/debian/emacsVER.prerm
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+MAJOR=@MAJOR_VERSION@
+FLAVOR=@DEB_FLAVOR@
+
+# update-alternatives on things that collide with xemacs, other editors
+if [ "$1" != "upgrade" ]
+then
+  update-alternatives --remove emacs /usr/bin/${FLAVOR}-@X_SUPPORT@
+  update-alternatives --remove editor /usr/bin/${FLAVOR}
+fi
+
+# emacsen-common registration.
+/usr/lib/emacsen-common/emacs-remove ${FLAVOR}
+
+#DEBHELPER#
--- emacs23-23.1+1.orig/debian/copyright
+++ emacs23-23.1+1/debian/copyright
@@ -0,0 +1,116 @@
+-*-text-*-
+
+This package was debianized by Rob Browning <rlb@defaultvalue.org> on
+Tue, 16 Dec 1997 00:05:45 -0600.
+
+The original source archive is emacs-23.1.tar.gz, and it
+can be found here for stable releases:
+
+  ftp://ftp.gnu.org:/gnu/emacs/
+
+and here for alpha pre-releases:
+
+  ftp://alpha.gnu.org:/gnu/emacs/pretest/
+
+Please see /usr/share/doc/emacs23-common/README.Debian.gz for a
+description of the Debian specific differences from the upstream
+version.
+
+As mentioned there, some files (including some of the Emacs
+documentation) have been removed from this package because their
+licenses do not appear to satisfy the requirements of the Debian Free
+Software Guidelines (DFSG).  See http://www.debian.org/social_contract.
+
+In particular, some of the info pages are covered under the GNU Free
+Documentation License (GFDL), which Debian has decided does not
+satisfy the DFSG in cases where "Invariant Sections" are specified
+(this includes front and back cover texts).  See this Debian General
+Resolution on the topic: http://www.debian.org/vote/2006/vote_001.
+
+Some other files have been removed because their license only allows
+verbatim copying, or because there was some other question.
+
+Copyright:
+
+  Emacs itself is licensed under the terms of the GNU General Public
+  License (GPL), Version 3.  See the file
+  /usr/share/common-licenses/GPL-3 for more information.
+
+  doc/man/b2m.1, doc/man/ebrowse.1, doc/man/grep-changelog.1, and
+  doc/man/rcs-checkin.1 are licensed as follows:
+
+    Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+
+    Permission is granted to make and distribute verbatim copies of this
+    document provided the copyright notice and this permission notice are
+    preserved on all copies.
+
+    Permission is granted to copy and distribute modified versions of
+    this document under the conditions for verbatim copying, provided that
+    the entire resulting derived work is distributed under the terms of
+    a permission notice identical to this one.
+
+    Permission is granted to copy and distribute translations of this
+    document into another language, under the above conditions for
+    modified versions, except that this permission notice may be stated
+    in a translation approved by the Free Software Foundation.
+
+  doc/man/emacs.1 is licensed as follows:
+
+    Copyright (C) 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+      2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+
+    Permission is granted to make and distribute verbatim copies of
+    this document provided the copyright notice and this permission
+    notice are preserved on all copies.
+
+    Permission is granted to copy and distribute modified versions of
+    this document under the conditions for verbatim copying, provided
+    that the entire resulting derived work is distributed under the
+    terms of a permission notice identical to this one.
+
+    Permission is granted to copy and distribute translations of this
+    document into another language, under the above conditions for
+    modified versions, except that this permission notice may be
+    stated in a translation approved by the Free Software Foundation.
+
+  doc/man/etags.1 is licensed as follows:
+
+    Copyright (C) 1992, 1999, 2001, 2002, 2003, 2004, 2005, 2006,
+      2007, 2008, 2009 Free Software Foundation, Inc.
+
+    Permission is granted to make and distribute verbatim copies of this
+    document provided the copyright notice and this permission notice are
+    preserved on all copies.
+
+    Permission is granted to copy and distribute modified versions of
+    this document under the conditions for verbatim copying, provided that
+    the entire resulting derived work is distributed under the terms of
+    a permission notice identical to this one.
+
+    Permission is granted to copy and distribute translations of this
+    document into another language, under the above conditions for
+    modified versions, except that this permission notice may be stated
+    in a translation approved by the Free Software Foundation.
+
+  man/faq.texi is licensed as follows:
+
+    Copyright (C) 1994,1995,1996,1997,1998,1999,2000 Reuven M. Lerner
+    Copyright (C) 1992,1993 Steven Byrnes
+    Copyright (C) 1990,1991,1992 Joseph Brian Wells
+
+    This list of frequently asked questions about GNU Emacs with
+    answers ("FAQ") may be translated into other languages,
+    transformed into other formats (e.g. Texinfo, Info, WWW, WAIS),
+    and updated with new information.
+
+    The same conditions apply to any derivative of the FAQ as apply to
+    the FAQ itself.  Every copy of the FAQ must include this notice or
+    an approved translation, information on who is currently
+    maintaining the FAQ and how to contact them (including their
+    e-mail address), and information on where the latest version of
+    the FAQ is archived (including FTP information).
+
+    The FAQ may be copied and redistributed under these conditions,
+    except that the FAQ may not be embedded in a larger literary work
+    unless that work itself allows free copying and redistribution.
--- emacs23-23.1+1.orig/debian/dfsg-splitter
+++ emacs23-23.1+1/debian/dfsg-splitter
@@ -0,0 +1,135 @@
+#!/bin/bash
+
+set -e
+set -x
+
+# Usage: put the relevant emacs archive into the current directory and
+# run the script.  The resulting two orig.tar.gz files will be placed
+# into a new ./split-tmp directory.
+
+emacs_archive_name="emacs-23.1.tar.gz"
+emacs_dir="emacs-23.1"
+emacs_version="23.1"
+emacs_major="23"
+deb_src_rev="1"
+
+main_dir="$(pwd)/split-tmp/${emacs_dir}"
+non_main_dir="$(pwd)/split-tmp/${emacs_dir}-non-dfsg"
+
+if ! test root = "`whoami`"
+then
+  echo Use fakeroot.
+  exit 1
+fi
+
+if test -e split-tmp
+then
+  echo "./split-tmp already exists - aborting"
+  exit 1
+fi
+
+mkdir ./split-tmp
+pushd split-tmp
+
+umask 002
+
+tar xzf "../${emacs_archive_name}"
+
+find "${emacs_dir}" -name "*.elc" -exec rm {} +
+find "${emacs_dir}"/info -type f \
+  -not -name "COPYING" -not -name dir -exec rm {} +
+
+mkdir "${non_main_dir}"
+
+function move_to_non_main_dir()
+{
+  pushd "${emacs_dir}"
+  test "$1"
+  test ! -e "${non_main_dir}/$1"
+  cp -a --parents "$1" "${non_main_dir}/"
+  rm -r "$1"
+  popd
+}
+
+function copy_to_non_main_dir()
+{
+  pushd "${emacs_dir}"
+  cp -a --parents "$1" "${non_main_dir}/"
+  popd
+}
+
+function remove_from_main_dir()
+{
+  pushd "${emacs_dir}"
+  rm "$1"
+  popd
+}
+
+# assumes someone has already copied file to non-main dir
+function move_to_main_dir()
+{
+  pushd "${non_main_dir}"
+  cp -a --parents "$1" "${main_dir}/"
+  rm "$1"
+  popd
+}
+
+# assumes someone has already copied file to non-main dir
+function copy_to_main_dir()
+{
+  pushd "${non_main_dir}"
+  cp -a --parents "$1" "${main_dir}/"
+  popd
+}
+
+# So both sides will have a copy (at the very least, version.el refers to it).
+copy_to_non_main_dir "etc/COPYING"
+
+# verbatim dist only
+move_to_non_main_dir "etc/CENSORSHIP"
+move_to_non_main_dir "etc/copying.paper"
+move_to_non_main_dir "etc/LINUX-GNU"
+move_to_non_main_dir "etc/THE-GNU-PROJECT"
+move_to_non_main_dir "etc/WHY-FREE"
+move_to_non_main_dir "etc/GNU"
+move_to_non_main_dir "etc/MOTIVATION"
+
+# reprinted with permissions or copyright mentioned
+# no modification mention
+move_to_non_main_dir "etc/INTERVIEW"
+
+# Assuming modification not allowed by default (emails, etc.)
+move_to_non_main_dir "etc/COOKIES"
+move_to_non_main_dir "etc/DEVEL.HUMOR"
+move_to_non_main_dir "etc/JOKES"
+
+# This is used via debian/rules to track the nominal_ver.
+copy_to_non_main_dir "lisp/version.el"
+
+# GFDL documentation in doc/
+move_to_non_main_dir "doc/lispintro"
+move_to_non_main_dir "doc/lispref"
+move_to_non_main_dir "doc/emacs"
+
+# doc/misc
+
+# Most doc/misc files don't appear to be compatible with the DFSG.
+move_to_non_main_dir "doc/misc"
+
+# doc/misc files that do appear to be compatible with the DFSG
+move_to_main_dir "doc/misc/faq.texi"
+
+# Copy back files we want in both archives.
+copy_to_main_dir "doc/misc/ChangeLog"
+copy_to_main_dir "doc/misc/Makefile.in"
+
+
+GZIP=-9v tar czpSf \
+  "emacs${emacs_major}_${emacs_version}+${deb_src_rev}.orig.tar.gz" \
+  "${emacs_dir}"
+
+GZIP=-9v tar czpSf \
+  "emacs${emacs_major}-non-dfsg_${emacs_version}+${deb_src_rev}.orig.tar.gz" \
+  "${emacs_dir}"-non-dfsg
+
+exit 0
--- emacs23-23.1+1.orig/debian/control
+++ emacs23-23.1+1/debian/control
@@ -0,0 +1,89 @@
+Source: emacs23
+Section: editors
+Priority: optional
+Maintainer: Rob Browning <rlb@defaultvalue.org>
+Uploaders: Jerome Marant <jerome@debian.org>, Ralf Doering <rdoering@netsys-it.de>
+Build-Depends: mailx, libncurses5-dev, texinfo, liblockfile-dev, librsvg2-dev, libgif-dev | libungif4-dev, libtiff4-dev | libtiff-dev, xaw3dg-dev, libpng12-dev, libjpeg62-dev, libm17n-dev, libotf-dev, libgpm-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libdbus-1-dev, autotools-dev, dpkg-dev (>> 1.10.0), quilt (>= 0.42-1), debhelper (>= 4), libxaw7-dev, sharutils, imagemagick, libgtk2.0-dev, libasound2-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
+Standards-Version: 3.7.2
+
+Package: emacs
+Section: editors
+Priority: optional
+Architecture: all
+Depends: emacs23 | emacs23-lucid | emacs23-nox
+Provides: emacsen, editor, mail-reader, news-reader
+Description: The GNU Emacs editor (metapackage)
+ GNU Emacs is the extensible self-documenting text editor.
+ This is a metapackage which will always depend on the latest Emacs
+ release.
+
+Package: emacs23-lucid
+Section: editors
+Priority: optional
+Architecture: any
+Depends: emacs23-bin-common (= ${binary:Version}), ${shlibs:Depends}
+Provides: emacs23, emacsen, editor, info-browser, mail-reader, news-reader
+Suggests: emacs23-common-non-dfsg
+Conflicts: emacs23, emacs23-nox, emacs23-gtk
+Replaces: emacs23, emacs23-nox, emacs23-gtk
+Description: The GNU Emacs editor
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains a version of Emacs with a Lucid user interface.
+
+Package: emacs23-nox
+Section: editors
+Priority: optional
+Architecture: any
+Depends: emacs23-bin-common (= ${binary:Version}), ${shlibs:Depends}
+Provides: emacs23, editor, emacsen, info-browser, mail-reader, news-reader
+Suggests: emacs23-common-non-dfsg
+Conflicts: emacs23, emacs23-lucid, emacs23-gtk
+Replaces: emacs23, emacs23-lucid, emacs23-gtk
+Description: The GNU Emacs editor (without X support)
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains a version of Emacs compiled without support for X.
+
+Package: emacs23
+Section: editors
+Priority: optional
+Architecture: any
+Depends: emacs23-bin-common (= ${binary:Version}), ${shlibs:Depends}
+Provides: editor, emacsen, info-browser, mail-reader, news-reader, emacs23-gtk
+Suggests: emacs23-common-non-dfsg
+Conflicts: emacs23-lucid, emacs23-nox, emacs23-gtk
+Replaces: emacs23-lucid, emacs23-nox, emacs23-gtk
+Description: The GNU Emacs editor (with GTK+ user interface)
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains a version of Emacs with a GTK+ user interface.
+
+Package: emacs23-bin-common
+Section: editors
+Priority: optional
+Architecture: any
+Depends: emacs23-common (= ${source:Version}), ${shlibs:Depends}
+Description: The GNU Emacs editor's shared, architecture dependent files
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains the architecture dependent infrastructure
+ that's shared by emacs23, emacs23-lucid, and emacs23-nox.
+
+Package: emacs23-common
+Section: editors
+Priority: optional
+Architecture: all
+Depends: emacsen-common (>= 1.4.10), dpkg (>= 1.9.0), ${shlibs:Depends}
+Suggests: emacs23-el, emacs23-common-non-dfsg
+Conflicts: emacs23-el (<< ${Source-Version})
+Description: The GNU Emacs editor's shared, architecture independent infrastructure
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains the architecture independent infrastructure
+ that's shared by emacs23, emacs23-lucid, and emacs23-nox.
+
+Package: emacs23-el
+Section: editors
+Priority: optional
+Architecture: all
+Depends: emacs23-common (= ${source:Version})
+Description: GNU Emacs LISP (.el) files
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains the elisp sources for the convenience of users,
+ saving space in the main package for small systems.
--- emacs23-23.1+1.orig/debian/emacsVER-common.postinst
+++ emacs23-23.1+1/debian/emacsVER-common.postinst
@@ -0,0 +1,45 @@
+#!/bin/sh -e
+
+MAJOR=@MAJOR_VERSION@
+MINOR=@MINOR_VERSION@
+FULL=@FULL_VERSION@
+
+# Create the site-lisp dir for this flavor if we're allowed
+
+parentdir=/usr/local/share/emacs
+newdir=site-lisp
+
+if [ -d ${parentdir} ]
+then
+  if mkdir ${parentdir}/${newdir} 2>/dev/null
+  then
+    chown root:staff ${parentdir}/${newdir}
+    chmod 2775 ${parentdir}/${newdir}
+  fi
+fi
+
+parentdir=/usr/local/share/emacs
+newdir=${FULL}
+
+if [ -d ${parentdir} ]
+then
+  if mkdir ${parentdir}/${newdir} 2>/dev/null
+  then
+    chown root:staff ${parentdir}/${newdir}
+    chmod 2775 ${parentdir}/${newdir}
+  fi
+fi
+
+parentdir=/usr/local/share/emacs/${FULL}
+newdir=site-lisp
+
+if [ -d ${parentdir} ]
+then
+  if mkdir ${parentdir}/${newdir} 2>/dev/null
+  then
+    chown root:staff ${parentdir}/${newdir}
+    chmod 2775 ${parentdir}/${newdir}
+  fi
+fi
+
+#DEBHELPER#
--- emacs23-23.1+1.orig/debian/emacsVER-common.prerm
+++ emacs23-23.1+1/debian/emacsVER-common.prerm
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+MAJOR=@MAJOR_VERSION@
+MINOR=@MINOR_VERSION@
+FULL=@FULL_VERSION@
+
+set +e
+# Only remove these directories if they're empty.
+rmdir /usr/local/share/emacs/${FULL}/site-lisp 2>/dev/null
+rmdir /usr/local/share/emacs/${FULL} 2>/dev/null
+set -e
+
+#DEBHELPER#
--- emacs23-23.1+1.orig/debian/changelog
+++ emacs23-23.1+1/debian/changelog
@@ -0,0 +1,1491 @@
+emacs23 (23.1+1-4~bpo50+1) lenny-backports; urgency=low
+
+  * Backport to lenny.
+  * Remove dependency on install-info, which is contained in dpkg in lenny.
+
+ -- Ralf Doering <rdoering@netsys-it.de>  Wed, 14 Oct 2009 12:03:15 +0200
+
+emacs23 (23.1+1-4) unstable; urgency=low
+
+  * Remove redundant upstream emacs.desktop files from emacs23-common,
+    and merge some of the upstream emacs.desktop file info into the
+    Debian files.  Thanks to Michael Biebl <biebl@debian.org> for the
+    report. (closes: #541173)
+
+  * Handle the fact that the share/info/emacs-VER/dir{,.old} files may
+    not be created during the install (and so may not need to be
+    removed).  This may be the case with dpkg 1.5.4 or newer.  Thanks
+    to Sven Joachim <svenjoac@gmx.de> for the report and the
+    fix. (closes: 545379)
+
+  * Add a bit to the emacsVER-lucid description.  Thanks to Drew
+    Parsons <dparsons@debian.org> for the suggestion.
+    (closes: #545263)
+
+  * Add provides emacs23-gtk to emacs23 as a transition measure (to be
+    deleted in emacs24) to allow more seamless upgrades from the
+    earlier unstable/testing packages.  Thanks to Josh Triplett
+    <josh@joshtriplett.org> for the suggestion. (closes: #545405)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun, 13 Sep 2009 18:10:28 -0700
+
+emacs23 (23.1+1-3) unstable; urgency=low
+
+  * Fix overlooked manpage rename in emacsVER.postinst.  Thanks to
+    Sven Joachim <svenjoac@gmx.de>. (closes: #539926)
+
+  * Change emacsVER to be the GTK+ version to match the upstream
+    default, and add an emacsVER-lucid package for those who still
+    want the non-GTK+ version.  Thanks to Romain Francoise
+    <rfrancoise@debian.org> and others for the report.
+    (closes: #539800)
+
+  * Don't build-depend on libgmp-dev on hurd or kfreebsd.  Thanks to
+    Cyril Brulebois <kibi@debian.org>. (closes: #541353)
+
+  * Fix emacsVER.desktop to refer to SVG file instead of incorrect
+    PNG, remove emacs22.png files from unversioned /usr/share/icons
+    directory, and change emacs*.png and emacs*.svg files to
+    emacsVER*.png and emacsVER*.svg.  Also use update-alternatives to
+    manage the unversioned names for these files.  Thanks to Atsuhito
+    KOHDA <kohda@pm.tokushima-u.ac.jp> for the initial
+    report. (closes: #539851)
+
+  * Fix Rmail to handle capitalized month names in Date lines,
+    i.e. "Date: Thu, 06 Aug 2009 18:33:32 +0100".  Thanks to Jeroen
+    Nijhof <jeroen@nijhof.uklinux.net> for the report and Sven Joachim
+    <svenjoac@gmx.de> for the fix. (closes: #540234)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Thu, 03 Sep 2009 21:55:25 -0700
+
+emacs23 (23.1+1-2) unstable; urgency=low
+
+  * Add dependencies on install-info to primary binary packages and
+    remove install-info from meta package provides.  Thanks to Norbert
+    Preining <preining@logic.at>.  (See emacs21 bugs #532600, #532599,
+    #532597, and #532602.)
+
+  * Add libpm-dev and libdbus-1-dev build dependencies.  Thanks to
+    Sven Joachim <svenjoac@gmx.de> for reporting this and most of the
+    following additional issues.
+
+  * Fix a spelling error, fix a menu section error, add a version to
+    the GPL file referred to by debian/copyright, and add a number of
+    debian/emacsVER*.lintian-overrides to quiet long-standing
+    warnings.
+
+  * Fix update-alternatives to reflect the fact that all the binaries
+    have manpages now.  Rename manpages from NAME.1FLAVOR to
+    NAME.FLAVOR.1.
+
+  * Remove obsolete dependencies and conflicts (w3-el, emacs22
+    packages, etc.).
+
+  * Remove explicit install-info calls.  Rely on triggers now.
+
+  * Set debian-emacs-flavor to 'emacs23.  Somehow that change didn't
+    make it in to the initial package and it was still set to emacs22.
+
+  * Search /usr/share/info/emacs-23 rather than
+    /usr/share/info/emacs-22.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun, 02 Aug 2009 19:55:15 -0700
+
+emacs23 (23.1+1-1) unstable; urgency=low
+
+  * New emacs23 packages.
+
+  * The debian/dfsg-splitter has been updated.
+
+  * Patches have been removed or adjusted.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sat, 18 Jul 2009 18:41:25 -0700
+
+emacs22 (22.3+1-1) unstable; urgency=low
+
+  * New upstream release. (closes: #512134)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sat, 28 Mar 2009 19:18:43 -0700
+
+emacs22 (22.2+2-5) unstable; urgency=low
+
+  * Add a build dependency on libasound2-dev which emacs22 is already
+    linked against on i386.  This change just makes things consistent
+    across all the relevant platforms. Thanks to Sven Joachim
+    <svenjoac@gmx.de> for the fix. (closes: #503054)
+
+  * Set mail-interactive to t if /usr/bin/mail is not an executable and
+    fakemail is chosen.  This should still help avoid silent mail loss,
+    but won't signal an error if the mailer is never invoked.  Thanks to
+    Ralf Resack <horch_loeffelchen@yahoo.de> for proposing the
+    fix. (closes: #429059)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun, 09 Nov 2008 12:05:33 -0800
+
+emacs22 (22.2+2-4) unstable; urgency=medium
+
+  * Fix a security problem related to the invocation of python
+    (CVE-2008-3949).  Avoid including the current directory in the module
+    lookup path when invoking python from python.el.  Thanks to Sven
+    Joachim <svenjoac@gmx.de> and Michael Berg <michaeljberg@gmail.com>.
+    (closes: #499568)
+
+  * Invoke xmlstarlet from flymake as xmlstarlet rather than xml.  Thanks
+    to Jussi Judin <jjudin+debian@iki.fi>. (closes: #447378)
+
+  * Fix vc-mode's handling of internal temporary buffers.  This should
+    avoid failures when trying to open files under monotone version
+    control.  Thanks to Sven Joachim <svenjoac@gmx.de> and Michael Berg
+    <michaeljberg@gmail.com>. (closes: #476108)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Tue, 14 Oct 2008 21:28:47 -0700
+
+emacs22 (22.2+2-3) unstable; urgency=medium
+
+  * Fix an insecurity related to fast-lock-cache-directories
+    (CVE-2008-2142).  Thanks to Sven Joachim <svenjoac@gmx.de> and Morten
+    Welinder <mwelinder@gmail.com>. (closes: #480885)
+
+  * Don't remove /usr/local/share/emacs/site-lisp in emacs22-common.
+    Leave that up to emacsen-common.  Thanks to Sven Joachim
+    <svenjoac@gmx.de>. (closes: #490524)
+
+  * Don't prematurely raise an error when trying to save a non-ASCII
+    buffer when select-safe-coding-system-accept-default-p is set to a
+    function.  Thanks to Jun Inoue <jun.lambda@gmail.com>.
+    (closes: #488427)
+
+  * Don't look for GNU to find etc/.  Look for NEWS instead.  Thanks to
+    "Bernhard Michler" <Boregard@gmx.net> for the report and Sven Joachim
+    <svenjoac@gmx.de> for the fix. (closes: #478240)
+
+  * Fix a problem in WoMan which caused it to raise an error for a number
+    of manpages.  Thanks to Sven Joachim <svenjoac@gmx.de>. (closes: #476223)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Wed, 23 Jul 2008 20:56:33 -0700
+
+emacs22 (22.2+2-2) unstable; urgency=medium
+
+  * Fix debian-expand-file-name-dfsg and describe-gnu-project (C-h C-p).
+    Thanks to Valery V. Vorotyntsev <valery.vv@gmail.com>.
+    (closes: #448391, #477215)
+
+  * Fix an insecurity in vcdiff's temporary file handling
+    (CVE-2008-1694). Thanks to Moritz Muehlenhoff <jmm@debian.org> and
+    Steve Grubb. (closes: #476611)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sat, 26 Apr 2008 22:02:40 -0700
+
+emacs22 (22.2+2-1) unstable; urgency=low
+
+  * Move mh-e.texi here from the non-DFSG package because the license does
+    appear to be DFSG compatible.  Thanks to Peter S Galbraith
+    <psg@debian.org>. (closes: #433953)
+
+  * Add Conflicts and Replaces emacs22-common-non-dfsg (<< 22.2+1-2) to
+    debian/control.in to handle move of mh-e.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun, 20 Apr 2008 13:25:33 -0700
+
+emacs22 (22.2+1-1) unstable; urgency=low
+
+  * New upstream release. (closes: #473021, #474271)
+
+  * Move dired-x.texi to the non-DFSG package because the license has
+    changed.
+
+  * Update debian/copyright to reflect recent changes.
+
+  * Update debian/dfsg-splitter for new upstream release.
+
+  * Add libgif-dev to debian/control.  Thanks to Sven Joachim
+    <svenjoac@gmx.de>.  (closes: #472419)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Thu, 10 Apr 2008 18:41:02 -0700
+
+emacs22 (22.1+1-3) unstable; urgency=low
+
+  * Incorporate a patch to fix a vulnerability in the handling of file
+    local variables (CVE-2007-5795) (closes: #449008).  Thanks to Drake
+    Wilson <drake@begriffli.ch>, and also thanks to Romain Francoise for
+    the 22.1+1-2.1 NMU. [rlb]
+
+  * Support has been added for GNU/kFreeBSD.  Thanks to Petr Salinger
+    <Petr.Salinger@seznam.cz> (closes: #451178)
+
+  * Incorporate a patch to fix a a stack-based buffer overflow in the
+    format function which can occur when dealing with high precision
+    values.  The overflow could lead to arbitrary code execution
+    (CVE-2007-6109).  Thanks to Nico Golde <nion@debian.org> for the
+    22.1+1-2.2 and 22.1+1-2.3 NMUs.  The patch fixes both the CVE
+    (#455432) and a bug introduced by an incomplete initial patch
+    (#456235).
+
+  * Don't override install-info anymore. (closes: #438695)
+
+  * Fix a problem with auto save file names.  Thanks to Sven Joachim
+    <svenjoac@gmx.de>. (closes: #469017)
+
+  * Fix the switch-to-buffer-other-frame function so that it returns the
+    new buffer.  This also means that find-file-read-only-other-frame will
+    now correctly mark the new buffer as read only.  Thanks to Sven
+    Joachim <svenjoac@gmx.de>. (closes: #457539)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun, 02 Mar 2008 14:22:35 -0800
+
+emacs22 (22.1+1-2) unstable; urgency=low
+
+  * Fix mail locking patch for Debian's non-Linux architectures.  Thanks
+    to Michael Banck <mbanck@debian.org>. (closes: #433816) [rlb]
+
+  * Fix control file for binary NMUs.  Thanks to Lior Kaplan
+    <kaplan@debian.org>. (closes: #432957) [rlb]
+
+  * Fix problem with --no-bitmap-icon with upstream patch.  Thanks to Sven
+    Joachim <sven_joachim@web.de>. (closes: #433969) [rlb]
+
+  * Add build dependency versions of quilt that include support for
+    "header".  Thanks to Max Dmitrichenko
+    <dmitrmax@rain.ifmo.ru>. (closes: #432695) [rlb]
+
+  * Incorporate upstream fixes to Emacs manpage.  Thanks to Sven Joachim
+    <sven_joachim@web.de>. (closes: #432732) [rlb]
+
+  * Symlink etc/COPYING and lisp/COPYING to
+    /usr/share/common-licenses/GPL-2.  Thanks to Milan Zamazal
+    <pdm@debian.org> for the report.  (closes: #436810) [rlb]
+
+ -- Rob Browning <rlb@defaultvalue.org>  Tue, 21 Aug 2007 22:29:09 -0700
+
+emacs22 (22.1+1-1) unstable; urgency=low
+
+  * New upstream release. (closes: #427279) [rlb]
+
+  * Change build dependency from libpng3-dev to libpng12-dev.
+    (closes: #424622) [rlb]
+
+  * If allowed, create and remove non-flavor-specific
+    /usr/local/share/emacs/site-lisp.
+  
+  * Fix cc-mode local variable problem.  Thanks to Sven Joachim
+    <sven_joachim@web.de> for forwarding the upstream patch.
+    (closes: #428898) [rlb]
+
+  * Add desktop file for emacs22-gtk. (closes: #424069) [rlb]
+
+  * Remove /var/games/emacs/ since Emacs doesn't use it unless
+    update-game-score is setuid and Debian's isn't.
+    (closes: #423948, #430533) [rlb]
+
+  * New release restores python mode. (closes: #430553) [rlb]
+
+  * Add /usr/share/info/emacs-22 to Info-default-directory-list before
+    /usr/share/info. (closes: #425924, #429526) [rlb]
+
+  * Change the desktop file to only use the major version in the name,
+    rather than the full upstream version, so that the string won't change
+    from say 22.0.99 to 22.1.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Fri, 06 Jul 2007 20:20:15 -0700
+
+emacs22 (22.0.99+1-1) experimental; urgency=low
+
+  * Update to 22.0.99.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sat, 12 May 2007 11:01:29 -0700
+
+emacs22 (22.0.95+1-1) experimental; urgency=low
+
+  * New emacs22 packages.
+
+  * The debian/dfsg-splitter has been updated. [rlb]
+
+  * Obsolete patches have been removed. [rlb]
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun, 11 Mar 2007 10:14:16 -0700
+
+emacs21 (21.4a+1-5) unstable; urgency=low
+
+  * Move man pages back to emacs21-common. (closes: #414321) [rlb]
+    - debian/rules
+  
+ -- Rob Browning <rlb@defaultvalue.org>  Sat, 10 Mar 2007 16:16:15 -0800
+
+emacs21 (21.4a+1-4) unstable; urgency=low
+
+  * Merge useful bits from Jerome and my orphaned emacs22 tree (which
+    itself was based on JÃ©rÃ´me's snapshot tree) in preparation for
+    upcoming emacs22 branch.  Many thanks to JÃ©rÃ´me.  A partial summary of
+    these changes follows:
+
+    Add debian/rules info_subdir variable.
+  
+    Modify desktop and menu files version.  This approach should work for
+    normal versions, "Emacs 21.4a (X11)", and for snapshots, "Emacs
+    2006-09-09 (X11)".  See the menu_ver variable in debian/rules.
+
+    Overhaul debian/rules to build all of the install trees at once and
+    then call the dh_* programs generically rather than calling them once
+    per package. [rlb]
+
+    - emacsVER-bin-common.postinst
+    - emacsVER-bin-common.prerm
+    - emacsVER-common.postinst
+    - emacsVER-common.prerm
+    - emacsVER.desktop
+    - emacsVER.menu
+    - rules
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sat,  3 Mar 2007 16:13:23 -0800
+
+emacs21 (21.4a+1-3) unstable; urgency=high
+
+  * Fix build failure on mipsel.
+    Thanks to Aurelien Jarno <aurelien@aurel32.net>.
+    (closes: #401665) [JÃ©rÃ´me Marant]
+    - debian/patches/arch-mipsel.diff: set OUTPUT_ARCH to `mips'
+      instead of `mipsel'.
+
+  * Changed FSF address in copyright file. [JÃ©rÃ´me Marant]
+    - debian/copyright.in
+    - debian/copyright
+
+ -- Jerome Marant <jerome@debian.org>  Thu, 04 Jan 2007 08:31:28 +0100
+
+emacs21 (21.4a+1-2) unstable; urgency=low
+
+  * Make both emacs21 and emacs21-nox packages suggest non-DFSG
+    packages and fix erroneous emacs21-common dependency on it
+    [JÃ©rÃ´me Marant]
+    - debian/control.in
+    - debian/control
+
+  * Grab yow mode from the CVS trunk so it is now compatible with yow.lines
+    replacement which also comes from the CVS trunk.
+    (closes: #395501) [JÃ©rÃ´me Marant]
+    - debian/patches/yow-mode-from-cvs.diff: new patch.
+    - debian/patches/series: updated.
+  
+  * Properly handle ldapsearch output from OpenLDAP version 2 and above.
+    Thanks to both Joshua Judson Rosen <joshuar@russound.com> and
+    Henrik Holmboe <henrik@holmboe.se>.
+    (closes: #381484) [JÃ©rÃ´me Marant]
+    - debian/patches/ldapsearch-output.diff: new patch.
+    - debian/patches/series: updated.
+
+  * Mention license of both emacs.1 and etags.1 manpages and add a copy of
+    the GFDL to the copyright file (closes: #396875) [JÃ©rÃ´me Marant]
+    - debian/copyright.in
+    - debian/copyright: re-generated.
+
+  * Fix generation of emacs21-common README.Debian. [rlb]
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sat,  2 Dec 2006 11:45:44 -0800
+
+emacs21 (21.4a+1-1) unstable; urgency=low
+
+  * In accordance with the recent General Resolution
+    (http://www.debian.org/vote/2006/vote_001), move all non-DFSG files to
+    new packages that will be included in Debian's non-free section.  The
+    debian/dfsg-splitter script has been used to split the upstream
+    archive. (closes: #207932) [rlb]
+    - debian/control.in
+    - debian/copyright.in
+    - debian/dfsg-splitter
+    - debian/emacs-common.README
+    - debian/patches/handle-dfsg-split.diff
+    - debian/patches/series
+    - debian/replacement/yow.lines.uu
+    - debian/rules
+    - debian/missing-file.dfsg: new template file used to generate
+      replacements for non-free files normally accessible through C-h
+      key bindings. Those files will be displayed if the original
+      ones are not available.
+  
+  * Acknowledge NMU. Thanks Marc Brockschmidt <he@debian.org>
+    (Closes: #381452) [JÃ©rÃ´me Marant]
+
+  * Separate mipsel from mips autodetection in configure.in [JÃ©rÃ´me Marant]
+    - debian/patches/arch-mipsel.diff: update.
+  
+  * Split mips and mipsel ports into two separate patches [JÃ©rÃ´me Marant]
+    - debian/patches/arch-mips.diff: new file. Add mips-specific code
+      from arch-mipsel+mips.diff patch
+    - debian/patches/arch-mipsel.diff: add mipsel-specific code from
+      arch-mipsel+mips.diff patch
+    - debian/patches/arch-mipsel+mips.diff: remove.
+
+  * Bump Standards-Version to 3.7.2 [JÃ©rÃ´me Marant]
+    - debian/control.in
+
+  * Add a new dummy `emacs' package which depends on the latest
+    Emacs release (closes: #82687)
+    - debian/control.in: added new entry for `emacs' package.
+    - debian/control: re-generated.
+    - debian/emacs.*: renamed to debian/emacsVER.*
+    - debian/emacs-*.*: renamed to debian/emacsVER-*.*
+    - debian/rules: changed accordingly.
+
+  * Remove erroneous semicolon character when reading XBM files.
+    Thanks to Jochen Voss <voss@debian.org>.
+    (closes: #392651) [JÃ©rÃ´me Marant]
+    - debian/patches/xbm-read-erroneous-semicolon.diff: new file.
+    - debian/patches/series: updated.
+
+  * Properly point to README.Debian.gz from Emacs NEWS file.
+    Thanks to Per Bojsen <per.bojsen@bojsen.us>.
+    (closes: #389063) [JÃ©rÃ´me Marant]
+    - debian/patches/misc-unseparated.diff: updated.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Wed, 25 Oct 2006 00:40:34 -0700
+
+emacs21 (21.4a-6.2) unstable; urgency=low
+
+  * Non-maintainer brown paper bag release.
+  * Apply patch from 21.4a-6.1 properly, somehow quilt hates me. 
+
+ -- Marc 'HE' Brockschmidt <he@debian.org>  Wed, 27 Sep 2006 08:30:33 +0200
+
+emacs21 (21.4a-6.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/patches/arch-mipsel+mips.diff:
+     Add patch from Max Kellermann <max@duempel.org> (updated by
+     Thiemo Seufer <ths@networkno.de>) to fix segfaults on mips
+     and mipsel. Thanks for the hard work! (Closes: #381452)
+
+ -- Marc 'HE' Brockschmidt <he@debian.org>  Wed, 27 Sep 2006 00:13:30 +0200
+
+emacs21 (21.4a-6) unstable; urgency=low
+
+  * When we create an empty aclocal.m4 after patching (to get around
+    quilt's use of patch -E), make the timestamp match the timestamp of
+    configure.in, so that we won't accidentally re-run autoconf given the
+    dependency in Makefile.in. [rlb].
+    - debian/rules
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun, 14 May 2006 15:24:35 -0700
+
+emacs21 (21.4a-5) unstable; urgency=low
+
+  * Don't include dpatch.make in debian/rules since the package no longer
+    depends on dpatch.  Thanks to Romain Francoise
+    <rfrancoise@debian.org>.  (closes: #367177) [rlb]
+    - debian/rules
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun, 14 May 2006 10:18:04 -0700
+
+emacs21 (21.4a-4) unstable; urgency=low
+
+  * Migrate from dpatch to quilt and update generation of README. [rlb]
+    - debian/README.in  
+    - debian/rules
+    - debian/control.in
+    - debian/patches/*
+
+  * Change occurrence of "find ... -perm +u+x" to "find ... -perm /u+x".
+    The former is no longer handled the way it used to be, and *doesn't*
+    find all files with execute permission.  Thanks to FranÃ§ois Fleuret
+    for pointing out the initial problem.  [rlb]
+    - debian/rules
+
+  * Replace $(pwd) with $(CURDIR) in debian/rules.
+    - debian/rules
+
+  * Remove PACKAGE variable.
+    - debian/rules
+
+  * Arrange DEB_ vars as recommended by
+    /usr/share/doc/autotools-dev/README.Debian.gz and do the same with
+    DEB_HOST_ARCH and DEB_HOST_GNU_CPU. [rlb]
+    - debian/rules
+
+  * Use DEB_HOST_GNU_TYPE for the value of target rather than
+    DEB_BUILD_GNU_TYPE. [rlb]
+    - debian/rules
+
+  * Add $(src_name) and $(flavor) and use them. [rlb]
+    - debian/rules
+
+  * Remove show-upstream-diffs target (use check-diff instead). [rlb]
+    - debian/rules
+
+  * Rename orig_tgz and orig_tgz_dir variables to deb_orig_tgz and
+    deb_orig_tgz_dir. [rlb]
+    - debian/rules
+  
+  * Lowercase local makefile variable names. [rlb]
+    - debian/rules
+
+  * Migrate to debhelper (while consulting JÃ©rÃ´me Marant's work on
+    emacs-snapshot).  There may still be a bit to do. [rlb]
+    - debian/rules
+    - debian/changelog
+    - debian/compat
+    - debian/control
+    - debian/control.in
+    - debian/emacs-bin-common.postinst
+    - debian/emacs-bin-common.postrm
+    - debian/emacs-bin-common.prerm
+    - debian/emacs-common.README
+    - debian/emacs-common.docs
+    - debian/emacs-common.postinst
+    - debian/emacs-common.prerm
+    - debian/emacs-el.prerm
+    - debian/emacs.README
+    - debian/emacs.menu
+    - debian/emacs.postinst
+    - debian/emacs.postrm
+    - debian/emacs.preinst
+    - debian/emacs.prerm
+    - debian/rules
+    - debian/README.binpkg.in (moved to debian/emacs.README)
+    - debian/README.in (moved to debian/emacs-common.README)
+    - debian/build-binary-pkg (removed - now handled in debian/rules)
+    - debian/menu.in (moved to debian/emacs.menu)
+
+  * Change nominal_ver computation to match code in configure.in. [rlb]
+    - debian/rules
+
+  * Add libxaw7-dev dependency to make sure we get that instead of
+    libxaw8-dev.  Thanks to Tollef Fog Heen <tfheen@debian.org>.
+    (closes: #365597) [rlb]
+    - debian/control.in
+
+  * Apply an upstream patch to fix an mmap related Hurd build problem.
+    Thanks to Michael Banck <mbanck@debian.org>. (closes: #347554) [rlb]
+    - debian/patches/series
+    - debian/patches/hurd-mmap.diff
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sat, 13 May 2006 16:24:05 -0700
+
+emacs21 (21.4a-3) unstable; urgency=low
+
+  * Disable support for the ppc64 architecture: the patch breaks the
+    powerpc support and does not work on ppc64 any more anyway.
+    (closes: #329459) [JÃ©rÃ´me Marant]
+    - debian/patches/00list: disable arch-ppc64 patch.
+    - debian/patches/autofiles.dpatch: regenerated.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun,  2 Oct 2005 19:00:13 -0700
+
+emacs21 (21.4a-2) unstable; urgency=low
+
+  * Apply patch applying modifiers to multibyte-char keys. Thanks to
+    Martin Stjernholm <mast@lysator.liu.se> (closes: #309963) [JÃ©rÃ´me Marant]
+    - debian/patches/multibyte-char-key-modifiers.dpatch: new file.
+    - debian/00list: updated.
+
+  * Apply patch supporting the ppc64 architecture. This is a slightly
+    modified patch derived from the Emacs CVS mainline.
+    (closes: #300368) [JÃ©rÃ´me Marant]
+    - debian/patches/arch-ppc64.patch: new file.
+    - debian/00list: updated.
+  
+  * Add real dependency as an alternative to the libtiff-dev build
+    dependency in order for the build to be deterministic.
+    (closes: #311074) [JÃ©rÃ´me Marant]
+    - debian/control.in: add libtiff4-dev as alternative libtiff-dev
+      build dependency.
+    - debian/control: regenerated.
+
+  * Bump Standards-Version to 3.6.2. [JÃ©rÃ´me Marant]
+    - debian/control.in
+    - debian/control: regenerated.
+  
+  * Use the "kitchen sink" bitmap icon when iconifying the Emacs window.
+    (closes: #309930) [JÃ©rÃ´me Marant]
+    - debian/menu.in: pass the `-i' option to the command launching Emacs
+      under X11.
+    - debian/emacs.desktop: likewise.
+  
+  * Work around bug in Xorg which makes AltGr incorrectly recognized.
+    This patch has been backported from Emacs CVS trunk. [JÃ©rÃ´me Marant]
+    - debian/patches/xorg-altgr-fix.dpatch: new file.
+    - debian/00list: updated.
+  
+  * Apply patch preventing an infinite loop in whitespace.el if kill-read-only
+    is set to t. Thanks to Romain Francoise <rfrancoise@debian.org>
+    (closes: #273123) [JÃ©rÃ´me Marant]
+    - debian/patches/whitespace-readonly-infloop.dpatch: new file.
+    - debian/00list: updated.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sat, 17 Sep 2005 23:39:52 -0700
+
+emacs21 (21.4a-1) unstable; urgency=medium
+
+  * New upstream release. (closes: #294313) [JÃ©rÃ´me Marant]
+    - debian/patches/movemail-pop-fmt-vulnerability.dpatch: removed since
+    it has been applied upstream.
+  
+  * Apply patch from Romain Francoise <rfrancoise@debian.org> making PCL-CVS
+    compliant with recent versions of CVS. (closes: #291221) [JÃ©rÃ´me Marant]
+    - debian/patches/pcl-cvs-format.dpatch: new file.
+    - debian/00list: updated.
+    - debian/control: tightened dependency on dpatch (>= 2.0.9).
+  
+  * Add MIME type to desktop file. (closes: #296618) [JÃ©rÃ´me Marant]
+    - debian/emacs.desktop: added MimeType entry.
+  
+  * Apply patch supporting the AMD64 architecture. This is a slightly
+    modified patch derived from the Emacs CVS mainline. Thanks to
+    Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de> and
+    amd64 porters. (closes: #248796) [JÃ©rÃ´me Marant]
+    - debian/patches/arch-amd64.patch: new file.
+    - debian/00list: updated.
+
+  * Hard code leim version in copyright.in for now.  with 21.4a the emacs
+    tar.gz name changed, but the leim archive name didn't. [rlb]
+    - debian/copyright.in
+    - debian/copyright
+
+  * Remove prebuild target from debian/rules.  Instead, just issue
+    instructions to the user. [rlb]
+    - debian/rules
+  
+  * Fix invocation of wc -l when counting fns-*.el files. [rlb]
+    - debian/rules
+
+  * Use dpatch for the autotool related diff rather than generating and
+    applying a diff manually.  What was the debian/autofiles.diff is now
+    handled via debian/patches/autofiles.dpatch.  Also, we no longer try
+    to automatically generate the diff when needed.  Instead, the diff
+    must be generated manually via "debian/rules autofiles-sync".
+  
+    The earlier approach was broken because dpatch files that
+    autofiles.diff depended on could end up later in the Debian diff (and
+    hence have newer timestamps).  This would cause an unexpected run of
+    aclocal, etc.  and break the buildds.  If we ever want to re-automate
+    generation of the autofiles diff, we'll need to use dpatch md5 sigs
+    (or similar) rather than timestamps.  (closes: #297796) [rlb]
+    - debian/autofiles.diff: removed
+    - debian/patches/00list: added autofiles
+    - debian/patches/autofiles.dpatch: new
+    - debian/rules: updated
+  
+ -- Rob Browning <rlb@defaultvalue.org>  Tue, 15 Mar 2005 11:00:04 -0600
+
+emacs21 (21.3+1-9) unstable; urgency=high
+
+  * Modify debian/rules to support using an arch source repository and an
+    archive arrangement somewhat similar to, but not compatible with
+    arch-buildpackage's. [rlb]
+    - debian/rules
+  
+  * Applied patch to fix mailspool pop format string vulnerability
+    (CAN-2005-0100). [rlb]
+    Thanks to Max Vozeler <max@hinterhof.net>.
+    - debian/patches/movemail-pop-fmt-vulnerability.dpatch
+  
+ -- Rob Browning <rlb@defaultvalue.org>  Thu,  3 Feb 2005 21:02:03 -0600
+
+emacs21 (21.3+1-8) unstable; urgency=medium
+
+  * Apply patch allowing Emacs to properly interpret logo keys as Meta
+    rather than Meta+Super+Hyper. This problem has been showing up since
+    latest XFree86 and Xorg introducted `fake keys'.
+    Thanks to Denis Barbier <barbier@linufr.org>
+    (closes: #255286, #274103) [JÃ©rÃ´me Marant]
+    - debian/patches/xfree86-4.3-modifiers.dpatch: new file
+    - debian/patches/00list: updated.
+  
+  * Apply patch fixing long-standing memory leak in decode-coding-region
+    and similar routines. Thanks to Florian Weimer <fw@deneb.enyo.de>.
+    (closes: #273919) [JÃ©rÃ´me Marant]
+    - debian/patches/coding-region-leak.dpatch: new file.
+    - debian/patches/00list: updated.
+
+  * Apply patch tightening permissions of local backup copies of remote
+    files. Thanks to Michael Albinus <michael.albinus@gmx.de>.
+    (closes: #274427) [JÃ©rÃ´me Marant]
+    - debian/patches/remote-files-permissions.dpatch: new file.
+    - debian/patches/00list: updated.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sat, 16 Oct 2004 11:10:32 -0500
+
+emacs21 (21.3+1-7) unstable; urgency=medium
+
+  * set recompile against libtiff4-dev and upload with
+    urgency=medium. (closes: #262828) [rlb]
+    - debian/changelog
+
+ -- Rob Browning <rlb@defaultvalue.org>  Tue,  3 Aug 2004 11:34:43 -0500
+
+emacs21 (21.3+1-6) unstable; urgency=low
+
+  * fix debian/README rendering problem. [rlb]
+  
+  * Stop provinding www-browser since the w3-el-e21 package provides it
+    now. [JÃ©rÃ´me Marant]
+    - debian/control.in: remove www-browser provides for emacs and
+      emacs-nox.
+    - debian/control: synced.
+
+  * Fixed installation of .desktop entry. [JÃ©rÃ´me Marant]
+    - debian/build-binary-pkg: fixed typo.
+  
+  * Set value of the auto-save-file-name-transforms variable at run-time
+    in order to override its build-time value.
+    (closes: #160615, #167295, #175346, #241826, #250676, #178792)
+    [JÃ©rÃ´me Marant]
+    - debian/patches/startup-auto-save-file-name-transforms.dpatch: new file.
+    - debian/patches/00list: updated.
+  
+  * Add Python byte-compiled file extensions to completion-ignore-extensions
+    variable. (closes: #177276) [JÃ©rÃ´me Marant]
+    - debian/patches/python-completion-ignored-extensions.dpatch: new file.
+    - debian/patches/00list: updated.
+  
+  * Fixed removal of alternatives
+    (closes: #251822, #206901, #241820, #163034) [JÃ©rÃ´me Marant]
+    - debian/emacs-bin-common.prerm
+  
+  * Add a slave alternative for "editor" manpage.
+    Thanks to Daniel Kraft <da_kraft@web.de>. (closes: #255639) [JÃ©rÃ´me Marant]
+    - debian/emacs.postinst
+  
+  * Apply a 2003-06-21 patch from upstream CVS to fix a non-interactive
+    signal handling problem that could cause Emacs to die prematurely as
+    the result of a SIGIO or SIGHUP. (closes: #253887) [rlb]
+    - debian/patches/fix-batch-mode-signal-handling.dpatch
+    - debian/patches/00list
+
+  * Add warning message to prepare-release explaining that you have to run
+    it as a normal user (not root). [rlb]
+    - debian/rules
+
+ -- Rob Browning <rlb@defaultvalue.org>  Mon, 26 Jul 2004 10:27:10 -0500
+
+emacs21 (21.3+1-5) unstable; urgency=low
+
+  * Apply patch allowing emacsclient to handle ALTERNATE_EDITOR properly
+    when the command is run without any parameter [JÃ©rÃ´me Marant]
+    (closes: #219658)
+    - debian/patches/emacsclient-alternate-editor.dpatch: new file.
+
+  * Provide the `editor' virtual package. [JÃ©rÃ´me Marant]
+    (closes: #66243, #90154, #158807) 
+    - debian/control.in: emacs and emacs-nox now provide the `editor'
+      virtual package. 
+    - debian/control: synchronized with debian/control.in.
+    - debian/emacs.postinst: adding an `editor' alternative with a priority
+      of 0 as discussed in
+      http://lists.debian.org/debian-policy/2000/debian-policy-200006/msg00122.html
+    - debian/emacs.prerm: removing the `editor' alternative on package
+      removal.
+
+  * Added automatic switching to UTF-8 encoding when editing the debian
+    changelog file. [JÃ©rÃ´me Marant]
+    - debian/changelog: added Emacs local variables forcing coding
+      to UTF-8.
+
+  * Fix handling of menu entry for text version of Emacs [JÃ©rÃ´me Marant]
+    (closes: #221171)
+    - debian/menu.in: call the text version of emacs with the `-nw'
+      parameter.
+
+  * Install the emacsclient manpage [JÃ©rÃ´me Marant] (closes: #222767) 
+    - debian/build-common-pkg: install missing emacsclient manpage.
+    - debian/emacs-common.postinst: install alternative for emacsclient
+      manpage.
+  
+  * Install .desktop entry in order to make Emacs easy to start in
+    both GNOME and KDE. Thanks to Adam C Powell IV <hazelsct@debian.org>
+    [JÃ©rÃ´me Marant] (closes: #233711)
+    - emacs.desktop: new template file for desktop entries
+    - debian/rules: generate desktop file from emacs.desktop template
+      and install it for emacs21.
+
+  * test -n "${major_ver}" in a few places so that we don't accidentally
+    generate bad output files from our .in files. [rlb]
+    - debian/rules
+
+  * truncate aclocal.m4 during autofiles-sync so that old bits won't kill new
+    autoconf run.  Also ignore autom4te.cache when generating
+    autofiles.diff. [rlb]
+    - debian/rules
+  
+  * fix bug in prepare-release autodiff prompt handling. [rlb]
+    - debian/rules
+
+  * update configure.in for newer autoconf versions. [rlb]
+    - autoconf-updates.dpatch
+
+  * add an emacsXY-bin-common package containing all the architecture
+    specific bits, so that emacsXY-common can be architecture independent.
+    This should save many megabytes * architectures in the debian pool.
+    [rlb] (closes: #232888, #233345)
+    - debian/rules: move some build-* code from debian/ scripts to rules
+      and adjust to build emacsXY-bin-common.
+    - debian/emacs-common.postinst debian/emacs-common.prerm: some code
+      moved to new emacs-bin-common scripts.
+    - debian/emacs-common.postrm: deleted.
+    - debian/emacs-bin-common.postinst: new file.
+    - debian/emacs-bin-common.prerm: new file.
+    - debian/emacs-bin-common.postrm: new file.
+    - debian/build-common-pkg: deleted - code now in debian/rules.
+    - debian/build--pkg: deleted - code now in debian/rules.
+    - debian/emacs-el.postinst: deleted - was empty.
+    - debian/control.in: add emacsXY-bin-common and adjust other entries.
+    - debian/fix-debian-scripts: deleted - no longer used.
+    - debian/build-binary-pkg: adjusted to handle more of the common code.
+  
+  * Add support for linux 2.6 to ACPI in lisp/battery.el. Thanks to
+    Mario Lang <mlang@debian.org> [JÃ©rÃ´me Marant] (closes: #228658)
+    - debian/patches/battery-acpi-support.dpatch: updated.
+  
+  * Generate md5sums file for every package [JÃ©rÃ´me Marant] (closes: #22590)
+    - debian/rules: generate md5sums file just before building packages.
+    - debian/build-binary-pkg: likewise.
+  
+  * no point in byte-compiling fns-*.el according to upstream authors
+    (closes: #189277)
+
+  * fix configure args (--build alone doesn't seem to work anymore). [rlb]
+    - debian/rules
+  
+  * re-enable gif support via libungif. [rlb]
+    - debian/rules
+
+  * re-enable toolkit scrollbars, but make it really easy for people to
+    disable them in debian/rules.  Search for
+    --without-toolkit-scrollbars.  [rlb]
+    - debian/rules
+    - debian/README.in
+
+  * fix problem with upgrades by adding emacs21-common (<< 21.3+1-4) to
+    Replaces for the common packages. [rlb]
+    - debian/control.in
+    - debian/control
+
+ -- Rob Browning <rlb@defaultvalue.org>  Tue,  6 Apr 2004 18:07:38 -0500
+
+emacs21 (21.3+1-4) unstable; urgency=medium
+
+  * debian/changelog: converted to UTF-8 as per Policy. [JÃ©rÃ´me Marant]
+  * debian/control.in:
+    - Bumped Standards-Version to 3.6.1. [JÃ©rÃ´me Marant]
+    - Added versioned build-dependency on dpatch >= 1.23 since this version
+      no longer requires numerial prefixes to dpatches. [JÃ©rÃ´me Marant]
+  * debian/patches/*.dpatch: removed numerical prefix since the patch order
+    is specified in debian/patches/00list. [JÃ©rÃ´me Marant]
+  * debian/patches/hurd-libio-glibc.dpatch: new patch allowing Emacs
+    to be built on Hurd systems using a libio-based glibc.
+    Thanks to Markus Brinkmann <marcus@gnu.org>.
+    (closes: #143220) [JÃ©rÃ´me Marant]
+  * debian/patches/battery-acpi-support.dpatch: new patch adding ACPI
+    support to lisp/battery.el. Thanks to Mario Lang <mlang@debian.org>.
+    (closes: #208812) [JÃ©rÃ´me Marant]
+  * debian/patches/scroll-margin.dpatch: new patch preventing emacs
+    to hang with a non-0 scroll-margin set.
+    (closes: #175658) [JÃ©rÃ´me Marant]
+  * debian/patches/save-buffer.dpatch: new patch fixing a bug which
+    makes a file being removed when the coding system of its buffer
+    has changed and saving the changes was canceled.
+    (closes: #194171) [JÃ©rÃ´me Marant]
+  * debian/patches/00list: updated with respect to new patches.
+    [JÃ©rÃ´me Marant]
+  * debian/menu.in:
+    - Added hints to menu entries. (closes: #144282) [JÃ©rÃ´me Marant]
+    - Changed titles for both text and X11 entries in order to
+      differenciate them. (closes: #197527, #188598) [JÃ©rÃ´me Marant]
+  * debian/patches/browse-url.dpatch:
+    - Updated patch fixing a wrong call to galeon. Thanks to
+      Mikael Hedin <micce@debian.org>. (closes: #208206) [JÃ©rÃ´me Marant]
+    - Updated patch fixing browse-url's invocation of Mozilla.
+      Thanks to Jeff Sheinberg <jeffsh@erols.com>,
+      Martin Pool <mbp@sourcefrog.net> and KATO Kazuyoshi <kzys@users.sf.net>.
+      (closes: #148408, #216067) [JÃ©rÃ´me Marant]
+  * Use -O1 rather than -O2 on m68k.  Fixes a build failure (looks like a
+    broken byte compiler) with newer versions of gcc.  (closes: #207580)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Fri, 31 Oct 2003 00:00:10 -0600
+
+emacs21 (21.3+1-3) unstable; urgency=low
+
+  * create debian/stmap it doesn't exist. (closes: #210802)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sat, 13 Sep 2003 14:49:18 -0500
+
+emacs21 (21.3+1-2) unstable; urgency=low
+
+  * add back accidentally removed dpatch Build-Depends. (closes: #210627)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Fri, 12 Sep 2003 10:30:21 -0500
+
+emacs21 (21.3+1-1) unstable; urgency=low
+
+  * repackage without .elc files since we regenerate all of them anyway.
+    This will save space, and will also allow us to use dpatch in a
+    straightforward way.
+  * modify debian/rules computation of version numbers to handle
+    (i.e. ignore) the +1 in 21.3+1.
+  * rework to use dpatch and to patch/unpatch the debian source in-place
+    rather than using a debian/build-src copy of the whole source tree.
+  * incorporated patch (500-detect-coding-iso2022.dpatch) to fix raw-text
+    coding problem.  Thanks to Kenichi Handa <handa@etl.go.jp>.
+    (closes: #198736)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Thu, 11 Sep 2003 23:15:44 -0500
+
+emacs21 (21.3-2) unstable; urgency=low
+
+  * Compile --without-toolkit-scroll-bars for now (my pref, and to avoid
+    xaw3d issues for the moment).
+  * Update copyright to reflect documentation licenses. (closes: #161500)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Wed, 13 Aug 2003 08:53:35 -0500
+
+emacs21 (21.3-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Wed, 23 Apr 2003 13:16:06 -0500
+
+emacs21 (21.2-6) unstable; urgency=low
+
+  * changed sort behavior for x-vs-no-x fix in cus-dep.el based on
+    suggestion from Matt Kraai <kraai@alumni.cmu.edu>. (closes: #166139)
+  * finish breaking up most of the debian/patch/* files.
+  * set up automatic generation for autofiles.diff which contains all the
+    diffs to automatically generated files and is applied after all of the
+    debian/patch/*.diff files.
+  * add an apply-patches-upto command so it's easier to create partially
+    patched trees for editing.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Thu,  6 Feb 2003 18:12:41 -0600
+
+emacs21 (21.2-5) unstable; urgency=low
+
+  * fix bug in rules and binary-pkg generation. (closes: #164770)
+  * fix problem with config.sub and config.guess updates. (closes: #164763)
+  * time to stop creating the /usr/doc symlinks...
+
+ -- Rob Browning <rlb@defaultvalue.org>  Tue, 15 Oct 2002 16:34:52 -0500
+
+emacs21 (21.2-4) unstable; urgency=low
+
+  * create debian/patches/ and start migrating to represent
+    changes as patches against the upstream source.  Don't edit the main
+    tree anymore.
+  * rework tree and packaging to have emacs21-common, emacs21, and
+    emacs21-nox packages with emacs21-common containing nearly all the
+    data.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sat, 12 Oct 2002 15:09:37 -0500
+
+emacs21 (21.2-3) unstable; urgency=low
+
+  * Update emacs21-nox package description.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Wed, 29 May 2002 14:04:57 -0500
+
+emacs21 (21.2-2) unstable; urgency=low
+
+  * fix control file priorities to match overrides.
+  * fix rules to handle autotools more correctly.  See
+    /usr/share/doc/autotools-dev/README.Debian.gz for details.
+    (closes: #139998)
+  * firewall, headless box, and anti-X users everywhere rejoice!
+    Introducing emacs21-nox package :>
+
+ -- Rob Browning <rlb@defaultvalue.org>  Tue, 28 May 2002 12:09:48 -0500
+
+emacs21 (21.2-1) unstable; urgency=low
+
+  * new upstream release.
+  * move outline of Debian specific Emacs changes to
+    /usr/share/doc/*/README.Debian.gz.x
+
+ -- Rob Browning <rlb@defaultvalue.org>  Fri, 22 Mar 2002 11:41:17 -0600
+
+emacs21 (21.1-9) unstable; urgency=low
+
+  * fix control.in to use ${Source-Version}. (closes: #138994)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Mon, 18 Mar 2002 21:54:47 -0600
+
+emacs21 (21.1-8) unstable; urgency=low
+
+  * Fix .texi problems with upstream patch. (closes: #138236)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun, 17 Mar 2002 11:58:59 -0600
+
+emacs21 (21.1-7) unstable; urgency=high
+
+  * fix vc-path to be correct for a Debian system. (closes: #120079)
+  * re-add lost hppa and s390 patches. (closes: #107251)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Thu,  6 Dec 2001 14:10:45 -0600
+
+emacs21 (21.1-6) unstable; urgency=medium
+
+  * modify order in browse-url.el.
+  * added upstream iso-acc.el patch to fix accent bug. (closes: #119852)
+  * fix ppc nocombreloc bug with upstream patch. (closes: #117557)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Tue,  4 Dec 2001 08:43:38 -0600
+
+emacs21 (21.1-5) unstable; urgency=low
+
+  * Run autoconf to remove stale ppc code. (closes: #119189)
+  * Write new browse-url.el code with support for galeon and to default to
+    searching for a suitable browser, free browsers first.  (closes: #116822)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Tue, 13 Nov 2001 09:51:31 -0600
+
+emacs21 (21.1-4) unstable; urgency=low
+
+  * Really fix alternatives problem this time.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Fri,  9 Nov 2001 10:24:49 -0600
+
+emacs21 (21.1-3) unstable; urgency=low
+
+  * Fix but in grep in postinst. (closes: #117251, #117256, #117415, #118792)
+  * Remove vestigal ppc bits and add upstream patch for ppc nocombreloc
+    problem. (closes: #117557)
+  * fix bug in upstream-files.tar handling.
+  * don't configure gif support until our libungif is new enough.  See bug
+    #117729.
+  * Fix manpage to list correct default window size. (closes: #118641)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Thu,  8 Nov 2001 21:15:20 -0600
+
+emacs21 (21.1-2) unstable; urgency=low
+
+  * change to priority optional.
+  * use xaw3d scrollbars after checking upstream preferences.
+    (closes: #116831, #116911, #116638)
+  * added some build-depends. (closes: #116981)
+  * fixed typo in NEWS. (closes: #116814)
+  * fixed alternatives bug in postinst/prerm for emacsclient (closes: #116915)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Thu, 25 Oct 2001 16:02:45 -0500
+
+emacs21 (21.1-1) unstable; urgency=low
+
+  * New emacs21 packages.  Many changes -- reviewed all Debian files.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Thu, 18 Oct 2001 17:28:03 -0500
+
+emacs20 (20.7-10) unstable; urgency=medium
+
+  * Add arch header for mipsel and fix configure.in and
+    configure. (closes: #103959)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Mon, 23 Jul 2001 09:23:06 -0500
+
+emacs20 (20.7-9) unstable; urgency=low
+
+  * Added more Build-Depends. (closes: #101832)
+  * Disable ralloc on Hurd.  Thanks to Robert Bihlmeyer
+    <robbe@orcus.priv.at>. (closes: #101926)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Tue, 10 Jul 2001 12:48:22 -0500
+
+emacs20 (20.7-8) unstable; urgency=low
+
+  * Added ia64 patches from Bdale Garbee <bdale@gag.com> for ia64.h.
+    (closes: #90518)
+  * Added Build-Depends on mailx for now (though this is *wrong* for the
+    long run -- I need to fix my fakemail handling).
+    (closes: #95903, #96761)
+  * Fix fakeroot sgid problem (move movemail chmod +s in debian/rules).
+  * Remove emacs' overzealous dir.gz file.
+  * Shrink gnu.xpm to 32x32 and make it the menu icon. (closes: #20253, #21310)
+  * Update manpage to not refer to kitchen sink anymore -- though with
+    emacs21, we're going to move back to using whatever they choose.
+    (closes: #81682)
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Wed, 13 Jun 2001 23:56:16 -0500
+
+emacs20 (20.7-7) unstable; urgency=low
+
+  * Fixed reftex-info problem. (closes: #44837).
+  * Fix install-strip target in Makefile.in.  Thanks to 
+    Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>.  (closes: #51348)
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Sat,  5 May 2001 23:50:50 -0500
+
+emacs20 (20.7-6) unstable; urgency=low
+
+  * Fix improper usage of dpkg-statoverride and make sure movemail is set
+    up right. (closes: #95953)
+  * Fix bad manpage location in postinst update-alternatives call.
+  * Fix bad .so in ctags manpage (closes: #88231, #45317, #65017, #74570)
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Sat,  5 May 2001 09:47:40 -0500
+
+emacs20 (20.7-5) unstable; urgency=low
+
+  * configure.in: add detection of CONF_MAIL_PROGRAM_NAME.
+  * lib-src/fakemail.c: use CONF_MAIL_PROGRAM_NAME when appropriate
+    (closes: #72103) -- need to forward upstream.
+  * Add "modified by Debian" clause to (emacs-version) at RMS's request.
+  * Start Debian modifications section in copyright file as per policy.
+  * Add build fixes for hurd (closes: #78461).  Changes suggested by
+    Marcus.Brinkmann@ruhr-uni-bochum.de.  Thanks.
+  * Switch from Debian sendmail.el hack to Francesco's suggestion of
+    setting mail-from-style to 'system-default by default at startup
+    (closes: #35128).  This allows the user to override when desired in
+    the normal way.  This should be discussed with the upstream
+    maintainers.  They may be amenable to making this the default on
+    Debian systems.
+  * add dependency on dpkg (>= 1.9.0) for new install-info.
+  * info pages should finally work right (or at least closer to right).
+    They're now installed in /usr/share/info/emacs-20/ under their normal
+    names, and install-info can add the appropriate (emacs-20/emacs),
+    etc. entries to /usr/share/info/dir.  This hopefully closes a bunch of
+    old bugs.
+    (closes: #64994, #64512, #64025, #62155, #59332, #51163, #40443)
+  * No more files in /usr/doc. (closes: #91454, #63768)
+  * /usr/man moved to /usr/share/man. (closes: #91149)
+  * This should be fixed, in addition we've switched to dpkg-statoverride
+    (closes: #73007)
+  * /usr/share/info/dir.gz should be gone.
+    (closes: #75594, #68551, #65012)
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Sun, 29 Apr 2001 22:03:33 -0500
+
+emacs20 (20.7-4) unstable frozen; urgency=low
+
+  * Upload to unstable *and* frozen since this fixes outstanding grave
+    bugs.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Thu, 27 Jul 2000 16:21:15 -0500
+
+emacs20 (20.7-3) unstable; urgency=low
+
+  * Change code to rebuild *all* the install tree .elc files at build
+    time.  This should fix the grave problems with gnus trashing mail at
+    the expense of more CPU at build time.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Wed, 19 Jul 2000 20:27:27 -0500
+
+emacs20 (20.7-2) frozen unstable; urgency=low
+
+  * Revert to setting debian-emacs-flavor in startup.el as per recent
+    flip-flop in debian-emacs-policy :<  This was a *tiny* source change,
+    and definitely has to go into frozen - too much breaks otherwise.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Tue, 20 Jun 2000 11:31:29 -0500
+
+emacs20 (20.7-1) frozen unstable; urgency=low
+
+  * New upstream bug-fix version.  Fixes security bugs, among others.
+  * Removed some now redundant Debian patches.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Sat, 17 Jun 2000 12:59:48 -0500
+
+emacs20 (20.6-3) unstable frozen; urgency=medium
+
+  * Temp fix for alpha corruption problem in cm/src.h
+    src/termcap.c, src/terminfo.c, and src/sysdep.c (forwarded bug 63993).
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Mon, 12 Jun 2000 18:55:22 -0500
+
+emacs20 (20.6-2) frozen unstable; urgency=low
+
+  * Make sure info files get registered after /usr/share migration.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Fri, 12 May 2000 15:30:02 -0500
+
+emacs20 (20.6-1) frozen unstable; urgency=low
+
+  * Let emacsen-common handle setting debian-emacs-flavor and modify
+    "Depends:" accordingly.
+  * Maintainer release of 20.6 - fixes same issues as 20.6-0.1, so it
+    should go into frozen.
+  * Move info files to /usr/share/info.
+  * Make sure .elc files for .el files we've modified are *always* rebuilt.
+  * Add new unexelf.c from Gerd Moellmann <gerd@gnu.org>.  Without this,
+    emacs20 will *not* build on either frozen or unstable x86 machines.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Fri, 12 May 2000 11:00:33 -0500
+
+emacs20 (20.6-0.1) frozen unstable; urgency=low
+
+  * Non-maintainer release.
+  * New upstream bug fix release (closes:#60931).
+  * ARM support merged upstream.
+  * Add security patches from RUS-CERT posting on BugTraq.
+  * postinst: Use 2775 as directory permissions in /usr/local (closes:#59919)
+
+ -- Joel Klecker <espy@debian.org>  Wed, 26 Apr 2000 11:26:28 -0700
+
+emacs20 (20.5a-2) unstable; urgency=low
+
+  * Check in a bogus modification to all the .el files that we modified
+    before 20.5a so that new .elc files with our changes will be generated
+    when we build.  This must be done every time an upstream change is
+    merged in.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Tue, 28 Dec 1999 19:51:14 -0600
+
+emacs20 (20.5a-1) unstable; urgency=high
+
+  * Upstream version number is just fine (20.5a *is* newer than 20.5).
+    Switch to use it.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Wed, 22 Dec 1999 11:12:44 -0600
+
+emacs20 (20.4.pre20.5a-1) unstable; urgency=high
+
+  * New upstream version, including some Y2K fixes.
+  * Use weird version to avoid epochs.  This is upstream 20.5a.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Wed, 22 Dec 1999 00:16:52 -0600
+
+emacs20 (20.4-3) unstable; urgency=low
+
+  * Fix mistake in this file.  Fix bug number in architecture
+    dependency "closes" in last revision.
+  * Powerpc configure.in patch from Susumu OSAWA <susumuo@debian.org>.
+    (Should close bug 48997, but marked forwarded instead until patch is
+    resolved upstream.)
+  * Jargon problems apparently fixed. (closes: #31103 #37030)
+  * Gnus printing problems apparently fixed (closes: #20760)
+  * Fix manpage to refer to more accurate Debian file locations.
+    (closes: #35267)
+  * cperl-mode problem apparently fixed. (closes: #46739)
+  * Fix build stripping problem (use INSTALL_STRIP=-s rather than
+    INSTALL_PROGRAM="install -s").
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Sat,  4 Dec 1999 19:24:07 -0600
+
+emacs20 (20.4-2) unstable; urgency=low
+
+  * Modify mail-spool-directory/movemail patch in preparation for upstream
+    inclusion.
+  * Fix architecture dependency. (closes: #48997)
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Fri, 12 Nov 1999 17:59:01 -0600
+
+emacs20 (20.4-1) unstable; urgency=low
+
+  * New upstream version.
+  * I decided to go ahead and get this out without the major overhaul
+    that's coming, but I'm going to be working more tightly the core
+    upstream developers from now on, so there will be some more
+    substantial changes soon, including getting rid of more Debianisms and
+    double checking all our current patches.
+  * Fix movemail liblockfile detection to be non-Debian specific
+    (currently working out the appropriate upstream patch (see etc/NEWS)).
+  * Fix emacs to support a --with-mail-spool-directory configure option and to
+    automagically detect the right answer most of the time without it
+    (currently working out the appropriate upstream patch (see etc/NEWS)).
+  * Add the lisp-level variable mail-spool-directory which always contains
+    the location of the mail spool, and hack movemail, nnmail, rmail, and
+    friends to use it (currently working out the appropriate upstream
+    patch (see etc/NEWS)) .
+  * hexl-mode bug fixed upstream. (closes: #21762)
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Sat, 30 Oct 1999 13:24:39 -0500
+
+emacs20 (20.3-11) unstable; urgency=low
+
+  * Fix liblockfile version skew. (closes: #43803 #45123)
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Thu, 23 Sep 1999 13:27:00 -0500
+
+emacs20 (20.3-10) unstable; urgency=low
+
+  * Restructure debian/rules to build -el in binary-indep
+    (closes: #26761)
+  * Add emacsclient.1 manpage submitted ages ago. (closes: #22463)
+  * Handle duplicate DOC files (closes: #27668)
+  * Switch to gnu icon from old B&W drippy sink (closes: #33260)
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Tue,  6 Jul 1999 23:21:44 -0500
+
+emacs20 (20.3-9) unstable; urgency=low
+
+  * Added HURD patch from Marcus Brinkmann <brinkmd@debian.org>.
+    (closes: #38571).
+  * Backed out (global-set-key [delete] 'delete-char) modification 
+    (Ref: #26366).  This is too controversial (think cross-platform)
+    and needs to be resolved by the Debian Keyboard Czar in concert with
+    others.  For now we revert to the upstream behavior...
+  * Add /usr/share/info to info search path (closes: #38285).
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Fri, 11 Jun 1999 00:43:51 -0500
+
+emacs20 (20.3-8) unstable; urgency=low
+
+  * Added patch to emacs.c from Wolfram Gloger
+    <wmglo@dent.med.uni-muenchen.de> to fix exit segfaults.
+    (closes: #37745)
+  * Fixed suidregister inconsistency between postinst and postrm
+    (closes #36845)
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Sun, 30 May 1999 14:38:51 -0500
+
+emacs20 (20.3-7) unstable frozen; urgency=low
+
+  * Needed to go to frozen too: --print-architecture was an important
+    bug.  Should be OK since other fixes since -5 are minor and
+    important.
+  * Add conflict with w3-el (as per Ben Pfaff's <pfaffben@pilot.msu.edu>
+    request). (closes: #30413).
+  * Undo broken (and unneeded) "fix" for suidregister call in postrm.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Thu, 28 Jan 1999 14:49:27 -0600
+
+emacs20 (20.3-6) unstable; urgency=low
+
+  * Use --print-installation-architecture rather than --print-architecture
+    (closes: #28177).
+  * Remove "#undef SIGIO" from m/arm.h as indicated by David Welton
+    <davidw@debian.org> (closes: #31279).
+  * Fix call to suidunregister (I didn't realize that it can't take
+    multiple file arguments) (closes: #21243 #26886).
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Wed, 27 Jan 1999 11:50:14 -0600
+
+emacs20 (20.3-5) frozen unstable; urgency=low
+
+  * Added NetWinder patches (closes: #28277).  (Thanks to David Welton)
+  * Rebuilt emacs20-el so the versions coincide.  In the future, people
+    need to be sure to build *both* binary packages when doing a
+    non-maintainer binary release.  (This fix justifies inclusion into
+    frozen).
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Sun,  1 Nov 1998 20:14:36 -0600
+
+emacs20 (20.3-4) unstable; urgency=low
+
+  * Fix gnus to default to /var/spool/mail rather than /usr/spool/mail for
+    mailbox locations (closes: #21364).
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Sat, 17 Oct 1998 14:28:45 -0500
+
+emacs20 (20.3-3) unstable; urgency=low
+
+  * Fixed leim.  All the input methods should work now (closes: #27398).
+  * Made (global-set-key [delete] 'delete-char) the default (closes: #26366).
+  * Fix ownership on emacs20-el files (closes: #27398).
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Tue, 13 Oct 1998 16:57:51 -0500
+
+emacs20 (20.3-2) unstable; urgency=low
+
+  * Added 20.2 patches for powerpc.  I omitted the patches to the
+    following files because it looks like equivalent fixes have already
+    made it into 20.3.  If anyone who understands that code better knows
+    differently, please let me know.  The rest of the patches applied
+    cleanly.
+      src/callproc.c.rej
+      src/dired.c.rej
+      src/fileio.c.rej
+      src/process.c.rej
+      src/regex.c.rej
+    I also modified src/m/powerpc.h to fix problems calling the ldscript.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Mon,  7 Sep 1998 18:20:41 -0500
+
+emacs20 (20.3-1) unstable; urgency=low
+
+  * New upstream version.
+  * Modify all the debian/* stuff to automatically track version changes.
+  * Major changes to info page handling.  Emacs20 info is now integrated into
+    the main info page.  This was the best way I could think of to handle
+    cross references, etc. without major source changes.
+  * Locked emacs20-el and emacs20 package versions together with dependencies.
+  * Add info direntries for widget, info, and customize.
+  * Fix handling of /usr/local/share (which was badly broken).
+  * Turn stripping back on.  It appears to work.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Tue,  1 Sep 1998 11:44:04 -0500
+
+emacs20 (20.2-9) unstable; urgency=low
+
+  * Fixes for leim problems (closes: #25536).  Thanks to
+    Junio Hamano <junio@twinsun.com>
+  * update-elc now made executable (closes: #25899).  Thanks to
+    Junio Hamano <junio@twinsun.com>
+  * Fix problem with package including dirs in /usr/local/share
+    (closes: #23431).
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Sat, 22 Aug 1998 11:45:16 -0500
+
+emacs20 (20.2-8) unstable; urgency=low
+
+  * Regenerate .elc files for .el files we've modified.  I didn't realize
+    that some of the .elc files were in the upstream tar file.  Hope this
+    doesn't break anything.  We haven't been using our sendmail and
+    message modifications until now.  (closes: #21079).
+  * Fix i386ism in debian scripts use "dpkg --print-architecture"
+    instead. (closes: #20548).
+  * Fixed reference in README.add-on-package-maintainers
+    (closes: #23445)
+  * Fix some alpha problems (closes: #21834).
+  * Had to add Replaces: emacs20 to emacs20-el to fix problem with
+    copyright files being in the wrong package (closes: #21531).
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Fri,  7 Aug 1998 20:39:59 -0500
+
+emacs20 (20.2-7) frozen unstable; urgency=low
+
+  * Changed emacs20-el from standard to optional.
+  * Fixed broken postrm (release critical) (closes: #24236)
+  * Don't strip emacs binary (strip is broken see binutils #23153).
+  * Since we can't strip, don't compile or link with "-g".
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Thu, 16 Jul 1998 16:58:04 -0500
+
+emacs20 (20.2-6) frozen unstable; urgency=low
+
+  * Gack.  Fix reject due to changed .tar.gz file (./leim added to tar).
+	
+ -- Rob Browning <rlb@cs.utexas.edu>  Wed,  8 Apr 1998 14:04:54 -0500
+
+emacs20 (20.2-5) frozen unstable; urgency=low
+
+  * Make sure to preserve timestamps on .el files in emacs20-el
+    (closes: #20274)
+  * Add leim support for alternate input methods.  May close several
+    bugs.
+	
+ -- Rob Browning <rlb@cs.utexas.edu>  Sun,  5 Apr 1998 10:38:20 -0500
+
+emacs20 (20.2-4) frozen unstable; urgency=low
+
+  * Added copright file to emacs20-el package (closes: #19300)
+  * suidmanager doesn't understand symbolic perms
+    (closes: #18448, #19213)
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Fri, 13 Mar 1998 13:01:07 -0600
+
+emacs20 (20.2-3) unstable; urgency=low
+
+  * Fixed problem with permissions on /usr/share/emacs/20.2/site-lisp/
+    (closes: #18717)
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Mon,  2 Mar 1998 12:02:33 -0600
+
+emacs20 (20.2-2) unstable; urgency=low
+
+  * fixed bad menu line (closes: #18362).
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Thu, 19 Feb 1998 10:52:58 -0600
+
+emacs20 (20.2-2) unstable; urgency=low
+
+  * Explicit dependency on liblockfile0 until bug is fixed
+    (closes #18186)
+  * added lisp/site-lisp.el to fix info path problem (closes #18190)
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Sat, 14 Feb 1998 19:19:09 -0600
+
+emacs20 (20.2-1) unstable; urgency=low
+
+  * movemail no longer suid -- not needed.
+  * start from scratch with emacs-20.2 source and old emacs-19.34 and
+    xemacs patches.
+
+ -- Rob Browning <rlb@cs.utexas.edu>  Tue, 16 Dec 1997 01:20:27 -0600
+
+Local Variables:
+coding: utf-8
+End:
--- emacs23-23.1+1.orig/debian/emacsVER.lintian-overrides
+++ emacs23-23.1+1/debian/emacsVER.lintian-overrides
@@ -0,0 +1,2 @@
+@PKG_NAME@ binary: menu-icon-missing /usr/share/emacs/@FULL_VERSION@/etc/images/icons/hicolor/16x16/apps/emacs.xpm
+@PKG_NAME@ binary: menu-icon-missing /usr/share/emacs/@FULL_VERSION@/etc/images/icons/hicolor/32x32/apps/emacs.xpm
--- emacs23-23.1+1.orig/debian/missing-file.dfsg
+++ emacs23-23.1+1/debian/missing-file.dfsg
@@ -0,0 +1,10 @@
+
+The file that would normally be displayed here (@FILE@) has been moved
+to the emacs@MAJOR_VERSION@-common-non-dfsg package because its
+license does not appear to be compatible with the Debian Free Software
+Guidelines (DFSG).  Please see
+/usr/share/doc/emacs@MAJOR_VERSION@-common/copyright for more
+information.
+
+Please install @FILE@ from Debian's non-free distribution if you would
+like for Emacs to display the original file.
--- emacs23-23.1+1.orig/debian/control.in
+++ emacs23-23.1+1/debian/control.in
@@ -0,0 +1,89 @@
+Source: @DEB_FLAVOR@
+Section: editors
+Priority: optional
+Maintainer: Rob Browning <rlb@defaultvalue.org>
+Uploaders: Jerome Marant <jerome@debian.org>, Ralf Doering <rdoering@netsys-it.de>
+Build-Depends: mailx, libncurses5-dev, texinfo, liblockfile-dev, librsvg2-dev, libgif-dev | libungif4-dev, libtiff4-dev | libtiff-dev, xaw3dg-dev, libpng12-dev, libjpeg62-dev, libm17n-dev, libotf-dev, libgpm-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libdbus-1-dev, autotools-dev, dpkg-dev (>> 1.10.0), quilt (>= 0.42-1), debhelper (>= 4), libxaw7-dev, sharutils, imagemagick, libgtk2.0-dev, libasound2-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
+Standards-Version: 3.7.2
+
+Package: emacs
+Section: editors
+Priority: optional
+Architecture: all
+Depends: @DEB_FLAVOR@ | @DEB_FLAVOR@-lucid | @DEB_FLAVOR@-nox
+Provides: emacsen, editor, mail-reader, news-reader
+Description: The GNU Emacs editor (metapackage)
+ GNU Emacs is the extensible self-documenting text editor.
+ This is a metapackage which will always depend on the latest Emacs
+ release.
+
+Package: @DEB_FLAVOR@-lucid
+Section: editors
+Priority: optional
+Architecture: any
+Depends: @DEB_FLAVOR@-bin-common (= ${binary:Version}), ${shlibs:Depends}
+Provides: @DEB_FLAVOR@, emacsen, editor, info-browser, mail-reader, news-reader
+Suggests: @DEB_FLAVOR@-common-non-dfsg
+Conflicts: @DEB_FLAVOR@, @DEB_FLAVOR@-nox, emacs23-gtk
+Replaces: @DEB_FLAVOR@, @DEB_FLAVOR@-nox, emacs23-gtk
+Description: The GNU Emacs editor
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains a version of Emacs with a Lucid user interface.
+
+Package: @DEB_FLAVOR@-nox
+Section: editors
+Priority: optional
+Architecture: any
+Depends: @DEB_FLAVOR@-bin-common (= ${binary:Version}), ${shlibs:Depends}
+Provides: @DEB_FLAVOR@, editor, emacsen, info-browser, mail-reader, news-reader
+Suggests: @DEB_FLAVOR@-common-non-dfsg
+Conflicts: @DEB_FLAVOR@, @DEB_FLAVOR@-lucid, emacs23-gtk
+Replaces: @DEB_FLAVOR@, @DEB_FLAVOR@-lucid, emacs23-gtk
+Description: The GNU Emacs editor (without X support)
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains a version of Emacs compiled without support for X.
+
+Package: @DEB_FLAVOR@
+Section: editors
+Priority: optional
+Architecture: any
+Depends: @DEB_FLAVOR@-bin-common (= ${binary:Version}), ${shlibs:Depends}
+Provides: editor, emacsen, info-browser, mail-reader, news-reader, emacs23-gtk
+Suggests: @DEB_FLAVOR@-common-non-dfsg
+Conflicts: @DEB_FLAVOR@-lucid, @DEB_FLAVOR@-nox, emacs23-gtk
+Replaces: @DEB_FLAVOR@-lucid, @DEB_FLAVOR@-nox, emacs23-gtk
+Description: The GNU Emacs editor (with GTK+ user interface)
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains a version of Emacs with a GTK+ user interface.
+
+Package: @DEB_FLAVOR@-bin-common
+Section: editors
+Priority: optional
+Architecture: any
+Depends: @DEB_FLAVOR@-common (= ${source:Version}), ${shlibs:Depends}
+Description: The GNU Emacs editor's shared, architecture dependent files
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains the architecture dependent infrastructure
+ that's shared by @DEB_FLAVOR@, @DEB_FLAVOR@-lucid, and @DEB_FLAVOR@-nox.
+
+Package: @DEB_FLAVOR@-common
+Section: editors
+Priority: optional
+Architecture: all
+Depends: emacsen-common (>= 1.4.10), dpkg (>= 1.9.0), ${shlibs:Depends}
+Suggests: @DEB_FLAVOR@-el, @DEB_FLAVOR@-common-non-dfsg
+Conflicts: @DEB_FLAVOR@-el (<< ${Source-Version})
+Description: The GNU Emacs editor's shared, architecture independent infrastructure
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains the architecture independent infrastructure
+ that's shared by @DEB_FLAVOR@, @DEB_FLAVOR@-lucid, and @DEB_FLAVOR@-nox.
+
+Package: @DEB_FLAVOR@-el
+Section: editors
+Priority: optional
+Architecture: all
+Depends: @DEB_FLAVOR@-common (= ${source:Version})
+Description: GNU Emacs LISP (.el) files
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains the elisp sources for the convenience of users,
+ saving space in the main package for small systems.
--- emacs23-23.1+1.orig/debian/emacsVER-common.docs
+++ emacs23-23.1+1/debian/emacsVER-common.docs
@@ -0,0 +1,3 @@
+BUGS
+README
+debian/README.add-on-package-maintainers
--- emacs23-23.1+1.orig/debian/copyright.in
+++ emacs23-23.1+1/debian/copyright.in
@@ -0,0 +1,116 @@
+-*-text-*-
+
+This package was debianized by Rob Browning <rlb@defaultvalue.org> on
+Tue, 16 Dec 1997 00:05:45 -0600.
+
+The original source archive is emacs-@UPSTREAM_VERSION@.tar.gz, and it
+can be found here for stable releases:
+
+  ftp://ftp.gnu.org:/gnu/emacs/
+
+and here for alpha pre-releases:
+
+  ftp://alpha.gnu.org:/gnu/emacs/pretest/
+
+Please see /usr/share/doc/@DEB_FLAVOR@-common/README.Debian.gz for a
+description of the Debian specific differences from the upstream
+version.
+
+As mentioned there, some files (including some of the Emacs
+documentation) have been removed from this package because their
+licenses do not appear to satisfy the requirements of the Debian Free
+Software Guidelines (DFSG).  See http://www.debian.org/social_contract.
+
+In particular, some of the info pages are covered under the GNU Free
+Documentation License (GFDL), which Debian has decided does not
+satisfy the DFSG in cases where "Invariant Sections" are specified
+(this includes front and back cover texts).  See this Debian General
+Resolution on the topic: http://www.debian.org/vote/2006/vote_001.
+
+Some other files have been removed because their license only allows
+verbatim copying, or because there was some other question.
+
+Copyright:
+
+  Emacs itself is licensed under the terms of the GNU General Public
+  License (GPL), Version 3.  See the file
+  /usr/share/common-licenses/GPL-3 for more information.
+
+  doc/man/b2m.1, doc/man/ebrowse.1, doc/man/grep-changelog.1, and
+  doc/man/rcs-checkin.1 are licensed as follows:
+
+    Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+
+    Permission is granted to make and distribute verbatim copies of this
+    document provided the copyright notice and this permission notice are
+    preserved on all copies.
+
+    Permission is granted to copy and distribute modified versions of
+    this document under the conditions for verbatim copying, provided that
+    the entire resulting derived work is distributed under the terms of
+    a permission notice identical to this one.
+
+    Permission is granted to copy and distribute translations of this
+    document into another language, under the above conditions for
+    modified versions, except that this permission notice may be stated
+    in a translation approved by the Free Software Foundation.
+
+  doc/man/emacs.1 is licensed as follows:
+
+    Copyright (C) 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+      2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+
+    Permission is granted to make and distribute verbatim copies of
+    this document provided the copyright notice and this permission
+    notice are preserved on all copies.
+
+    Permission is granted to copy and distribute modified versions of
+    this document under the conditions for verbatim copying, provided
+    that the entire resulting derived work is distributed under the
+    terms of a permission notice identical to this one.
+
+    Permission is granted to copy and distribute translations of this
+    document into another language, under the above conditions for
+    modified versions, except that this permission notice may be
+    stated in a translation approved by the Free Software Foundation.
+
+  doc/man/etags.1 is licensed as follows:
+
+    Copyright (C) 1992, 1999, 2001, 2002, 2003, 2004, 2005, 2006,
+      2007, 2008, 2009 Free Software Foundation, Inc.
+
+    Permission is granted to make and distribute verbatim copies of this
+    document provided the copyright notice and this permission notice are
+    preserved on all copies.
+
+    Permission is granted to copy and distribute modified versions of
+    this document under the conditions for verbatim copying, provided that
+    the entire resulting derived work is distributed under the terms of
+    a permission notice identical to this one.
+
+    Permission is granted to copy and distribute translations of this
+    document into another language, under the above conditions for
+    modified versions, except that this permission notice may be stated
+    in a translation approved by the Free Software Foundation.
+
+  man/faq.texi is licensed as follows:
+
+    Copyright (C) 1994,1995,1996,1997,1998,1999,2000 Reuven M. Lerner
+    Copyright (C) 1992,1993 Steven Byrnes
+    Copyright (C) 1990,1991,1992 Joseph Brian Wells
+
+    This list of frequently asked questions about GNU Emacs with
+    answers ("FAQ") may be translated into other languages,
+    transformed into other formats (e.g. Texinfo, Info, WWW, WAIS),
+    and updated with new information.
+
+    The same conditions apply to any derivative of the FAQ as apply to
+    the FAQ itself.  Every copy of the FAQ must include this notice or
+    an approved translation, information on who is currently
+    maintaining the FAQ and how to contact them (including their
+    e-mail address), and information on where the latest version of
+    the FAQ is archived (including FTP information).
+
+    The FAQ may be copied and redistributed under these conditions,
+    except that the FAQ may not be embedded in a larger literary work
+    unless that work itself allows free copying and redistribution.
--- emacs23-23.1+1.orig/debian/emacsVER-bin-common.postinst
+++ emacs23-23.1+1/debian/emacsVER-bin-common.postinst
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+FLAVOR=@DEB_FLAVOR@
+MAJOR=@MAJOR_VERSION@
+MINOR=@MINOR_VERSION@
+FULL=@FULL_VERSION@
+ALTERNATIVES="@ALTERNATIVES@"
+BIN_PRIORITY=@BIN_PRIORITY@
+
+# update-alternatives on things that collide with xemacs, other editors
+for i in ${ALTERNATIVES}
+do
+  update-alternatives \
+    --install /usr/bin/$i $i /usr/bin/$i.${FLAVOR} ${BIN_PRIORITY} \
+    --slave /usr/share/man/man1/$i.1.gz $i.1.gz \
+            /usr/share/man/man1/$i.${FLAVOR}.1.gz
+done
+
+#DEBHELPER#
--- emacs23-23.1+1.orig/debian/README.add-on-package-maintainers
+++ emacs23-23.1+1/debian/README.add-on-package-maintainers
@@ -0,0 +1,2 @@
+Please see /usr/share/doc/emacsen-common/debian-emacs-policy.gz for
+information on how to properly structure your emacs add-on packages.
--- emacs23-23.1+1.orig/debian/emacsVER.menu
+++ emacs23-23.1+1/debian/emacsVER.menu
@@ -0,0 +1,17 @@
+?package(@PKG_NAME@):\
+  needs="X11"\
+  section="Applications/Editors"\
+  title="Emacs @MENU_VERSION@ (X11)"\
+  command="/usr/bin/@DEB_FLAVOR@"\
+  icon16x16="/usr/share/emacs/@FULL_VERSION@/etc/images/icons/hicolor/16x16/apps/emacs.xpm"\
+  icon32x32="/usr/share/emacs/@FULL_VERSION@/etc/images/icons/hicolor/32x32/apps/emacs.xpm"\
+  hints="Text"
+
+?package(@PKG_NAME@):\
+  needs="text"\
+  section="Applications/Editors"\
+  title="Emacs @MENU_VERSION@ (text)"\
+  command="/usr/bin/@DEB_FLAVOR@ -nw"\
+  icon16x16="/usr/share/emacs/@FULL_VERSION@/etc/images/icons/hicolor/16x16/apps/emacs.xpm"\
+  icon32x32="/usr/share/emacs/@FULL_VERSION@/etc/images/icons/hicolor/32x32/apps/emacs.xpm"\
+  hints="Text"
--- emacs23-23.1+1.orig/debian/autofiles-diff-header
+++ emacs23-23.1+1/debian/autofiles-diff-header
@@ -0,0 +1,3 @@
+* The autoconf related files have been updated.
+  Patch: autofiles.dpatch
+  Author: N/A (automatically generated)
--- emacs23-23.1+1.orig/debian/rules
+++ emacs23-23.1+1/debian/rules
@@ -0,0 +1,923 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# This file is licensed under the terms of the Gnu Public License.
+# With the one additional provision that Ian Jackson's name may not be
+# removed from the file.
+
+# Copyright 1994,1995 Ian Jackson
+# Copyright 2004-2005 Jérôme Marant <jerome@debian.org>
+# Copyright 1998-2009 Rob Browning <rlb@defaultvalue.org>
+
+# Originally copied from the GNU Hello Debian rules file (1.3).
+# Modified for emacs by Mark Eichin <eichin@kitten.gen.ma.us>.
+# Debhelper support added via one of Joey Hess' example files.
+# See the debian/changelog for further historical information.
+
+# TODO:
+#
+#   Figure out what happened to fns-*.elc
+#   Should we set defaults for things like xsupport at the top here?
+#   Deal with build_binary_pkg and continue integration.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+SHELL := /bin/bash
+
+quilt := QUILT_PATCHES=debian/patches quilt
+
+deb_trash :=
+
+pf := set -o pipefail
+
+# For now we assume that emacs' versioning scheme is always
+# MAJOR.MINORtinyrev where MAJOR and MINOR are integers and tinyrev is
+# an optional lowercase letter (or letters).  We also assume that
+# upstream uses a numbering scheme that sorts in a "Debian friendly"
+# way.  So far that's always been true.  If it becomes false, some of
+# the values below will have to be set manually.
+
+# At the moment, we try to make it so that a "debian/rules clean" will
+# get you back to the same state you were in before "debian/rules
+# build".  With the original upstream source that's somewhat tricky
+# because they ship the .elc files, but we need to re-build them when
+# we patch the corresponding .el files.  This is further complicated
+# by the fact that any of these .el files may have macros, and if
+# those are changed, then any other .el files that use those macros
+# must also be recompiled.  Over the years, we've tried various ways
+# to handle this problem, originally by trying to keep track of which
+# files need to be recompiled and only recompiling those, then later
+# by just re-building all the .elc files with "make bootstrap".  In
+# either case, if you don't want to have diff bloat, you have to do
+# something to keep track of the original .elc files so you can
+# restore them during make clean.
+
+# All of this was a lot of work, and was using quite a bit of
+# unnecessary storage both in the .orig.tar.gz and during the package
+# build.  So in order to avoid this, and to dramatically simplify
+# things, we now just remove the .elc files from the upstream
+# distribution whenever we create the debian .orig.tar.gz file for a
+# given upstream release.  Since were always clobbering all of the
+# .elc files during the package build anyway, this shouldn't be any
+# great loss, and it also means that "debian/rules clean" now needs to
+# be little more than a "make distclean" followed by a purge of all
+# the remaining .elc files.
+
+# NOTE -- emacs doesn't respect .elc files in VPATH build.  They're
+# modified in srcdir, not builddir.  We don't worry about this because
+# it shouldn't affect our builds ATM, but if we ever have more than
+# one emacs configuration which could produce differing .elc files,
+# we'll need to be careful.  We'll probably have to build completely
+# separate packages from completely separate source trees.
+
+# In order to keep the autofiles up to date, but avoid any alterations
+# outside of ./debian, we keep the changes made by running a new
+# autoconf, etc. in patches/autofiles.diff.  This patch can be
+# automatically regenerated by running "debian/rules autofiles-sync",
+# and this patch should always be maintained as the last one in the
+# patch series.
+
+# Note that we use quilt to handle the debian patches.  One of the
+# biggest differences between quilt and say dpatch is that you have to
+# explicitly "quilt add" a file to a patch before you edit it.  See
+# "man quilt" for details..
+
+# If the source tree ever ends up in an untenable "can't go forward,
+# can't go back" state with respect to patching, you can always start
+# over by just moving the current debian directory to a newly unpacked
+# orig.tar.gz tree.  Note that f you were in the process of editing a
+# patch, you will lose those edits, but shouldn't lose anything else.
+# This process just reverts all of the upstream files and abandons the
+# volatile "what's been done to the current tree" state that quilt
+# maintains in ./.pc.  All of the actual patches are stored in
+# debian/patches and should be unharmed.
+
+######################################################################
+# Important top-level targets:
+#
+# check-vars - displays how the version number has been parsed.
+# buildpackage - build binary packages via dpkg-buildpackage w/suitable args
+# prepare-release - prepare and check debs for upload.
+# autofiles-sync - force a new autofiles.diff to be generated.
+#
+######################################################################
+
+# The name of the Debian source package
+src_name := $(shell $(pf); dpkg-parsechangelog | egrep '^Source:')
+src_name := $(shell $(pf); echo $(src_name) | perl -pe 's/Source:\s+//o')
+
+# The version from the changelog (i.e. 20.5-1)
+debian_ver := $(shell $(pf); dpkg-parsechangelog | egrep '^Version:')
+debian_ver := $(shell $(pf); echo $(debian_ver) | perl -pe 's/Version:\s+//o')
+# The Debian revision (i.e. the 1 from 20.5-1)
+# Always everything after the last '-'
+debian_rev := $(shell $(pf); echo $(debian_ver) | perl -pe 's/.*-//o')
+
+# The official upstream version defined by emacs-version in lisp/version.el.
+# The extraction method matches the code in the upstream configure.in.
+nominal_ver := \
+  $(shell $(pf); grep 'defconst[	 ]*emacs-version' lisp/version.el \
+    | sed -e 's/^[^"]*"\([^"]*\)".*$$/\1/')
+
+# This must be the version that's actually used at runtime for things
+# like load-path.  It may not be the same as the upstream version
+# (i.e. when you have upstream 20.5a, the functional version may still
+# be 20.5), so sometimes we may have to do this by hand.
+runtime_ver := $(shell $(pf); echo $(nominal_ver) | perl -pe 's/[a-z]+$$//o')
+
+major_ver := $(shell $(pf); echo $(runtime_ver) | perl -pe 's/\..*$$//o')
+minor_ver := $(shell $(pf); echo $(runtime_ver) | perl -pe 's/^[^.]*\.//o')
+
+# version for the debian source, i.e. if the upstream is 21.3, this
+# might be 21.3, or it might be 21.3+1 if we've had to have more than
+# one re-release of the upstream source.  Rare, but it happens...
+# Always everything before the last '-'
+debsrc_ver := $(shell $(pf); echo $(debian_ver) | perl -pe 's/-[^-]+$$//o')
+
+# upstream version - the actual upstream version, i.e. 21.4a, minus any +foo
+upstream_ver := $(shell $(pf); echo $(debsrc_ver) | perl -pe 's/\+[^+]+$$//o')
+
+deb_orig_tgz := $(src_name)_$(debsrc_ver).orig.tar.gz
+# name of the orig_tgz unpack directory
+deb_orig_tgz_dir := emacs-$(runtime_ver)
+
+######################################################################
+# Customizable variables
+
+# The flavor (i.e. emacs21) currently matches the source package name.
+flavor := $(src_name)
+
+bin_priority := 26
+
+# This might also be something like 2006-09-09 for snapshots.
+menu_ver := $(major_ver)
+
+info_subdir := emacs-$(major_ver)
+
+######################################################################
+
+# Should these be exported like this (as autotools-dev recommends for
+# the two vars below) or not?
+export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+export DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+
+# As recommended by /usr/share/doc/autotools-dev/README.Debian.gz.
+# Handle cross-compiling and don't make ./configure guess.
+export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+
+LDFLAGS   := -g
+CFLAGS    := -DDEBIAN -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+  CFLAGS += -O0
+else # not noopt
+  ifeq (m68k,$(DEB_HOST_ARCH))
+    # fix problem with newer versions of gcc on m68k
+    # -O2 causes a build failure (broken byte compiler)
+    CFLAGS += -O1
+  else # neq (m68k,$(DEB_HOST_ARCH))
+    CFLAGS += -O2
+  endif # neq (m68k,$(DEB_HOST_ARCH))
+endif # not noopt
+
+target := $(DEB_HOST_GNU_TYPE)
+movemail_bin := usr/lib/emacs/$(runtime_ver)/$(target)/movemail
+
+# These files may be modified in the *source* tree during the build.
+# Wonder if we could patch emacs to copy/use these files to/from the
+# build tree... (See Makefile.in's AUTOGENEL definition.)
+protected_files := \
+  config.guess \
+  config.sub \
+  lisp/cus-load.el \
+  lisp/finder-inf.el \
+  lisp/loaddefs.el \
+  lisp/subdirs.el
+
+# Info files that are going to show up in the main dir.
+main_dir_info_files := \
+  efaq
+
+# Files that the build stage depends on (may also be listed in other vars).
+persistent_autogen_build_files := debian/control debian/copyright
+nonpersistent_autogen_build_files :=
+
+# These files must always exist, i.e. can't ever be cleaned.
+persistent_autogen_install_files :=
+
+nonpersistent_autogen_install_files := \
+  debian/$(flavor)-bin-common.lintian-overrides \
+  debian/$(flavor)-bin-common.postinst \
+  debian/$(flavor)-bin-common.prerm \
+  debian/$(flavor)-common.README.Debian \
+  debian/$(flavor)-common.docs \
+  debian/$(flavor)-common.lintian-overrides \
+  debian/$(flavor)-common.postinst \
+  debian/$(flavor)-common.prerm \
+  debian/$(flavor)-nox.README.Debian \
+  debian/$(flavor)-nox.lintian-overrides \
+  debian/$(flavor)-nox.menu \
+  debian/$(flavor)-nox.postinst \
+  debian/$(flavor)-nox.prerm \
+  debian/$(flavor)-lucid.README.Debian \
+  debian/$(flavor)-lucid.desktop \
+  debian/$(flavor)-lucid.lintian-overrides \
+  debian/$(flavor)-lucid.menu \
+  debian/$(flavor)-lucid.postinst \
+  debian/$(flavor)-lucid.prerm \
+  debian/$(flavor).README.Debian \
+  debian/$(flavor).desktop \
+  debian/$(flavor).menu \
+  debian/$(flavor).lintian-overrides \
+  debian/$(flavor).postinst \
+  debian/$(flavor).prerm
+
+autogen_build_files := \
+  $(nonpersistent_autogen_build_files) $(persistent_autogen_build_files)
+
+autogen_install_files := \
+  $(nonpersistent_autogen_install_files) $(persistent_autogen_install_files)
+
+persistent_autogen_files := \
+  $(persistent_autogen_build_files) $(persistent_autogen_install_files)
+
+nonpersistent_autogen_files := \
+  $(nonpersistent_autogen_build_files) $(nonpersistent_autogen_install_files)
+
+
+# Build directories
+pkgdir_common := $(CURDIR)/debian/$(flavor)-common
+pkgdir_bin_common := $(CURDIR)/debian/$(flavor)-bin-common
+pkgdir_x := $(CURDIR)/debian/$(flavor)
+pkgdir_nox := $(CURDIR)/debian/$(flavor)-nox
+pkgdir_lucid := $(CURDIR)/debian/$(flavor)-lucid
+pkgdir_el := $(CURDIR)/debian/$(flavor)-el
+
+install_dir_x := $(CURDIR)/debian/install-x
+install_dir_nox := $(CURDIR)/debian/install-nox
+install_dir_lucid := $(CURDIR)/debian/install-lucid
+
+local_lpath := /etc/$(flavor):/etc/emacs
+local_lpath := $(local_lpath):/usr/local/share/emacs/$(runtime_ver)/site-lisp
+local_lpath := $(local_lpath):/usr/local/share/emacs/site-lisp
+local_lpath := $(local_lpath):/usr/share/emacs/$(runtime_ver)/site-lisp
+local_lpath := $(local_lpath):/usr/share/emacs/site-lisp
+
+# This shouldn't be needed as of 20.3
+local_lpath := $(local_lpath):/usr/share/emacs/$(runtime_ver)/leim
+
+# Installation local_lpath
+local_lpath_install := $(pkgdir_common)/$(subst :,:$(pkgdir_common)/,$(local_lpath))
+
+define checkroot
+  test root = "`whoami`"
+endef
+
+define checkdir
+  @if ! test -s debian/patches/autofiles.diff; \
+  then \
+    echo; \
+    echo "The Debian autofiles patch is not available."; \
+    echo "Please run this command:"; \
+    echo "  debian/rules autofiles-sync"; \
+    echo; \
+    false; \
+  fi
+  dpkg-parsechangelog > /dev/null
+  dh_testdir debian/emacsVER.postinst
+  @if ! test -f src/emacs.c; \
+  then \
+    echo; \
+    echo -n "The upstream source does not appear to be available."; \
+    echo "  Please put the contents"; \
+    echo -n "of $(deb_orig_tgz) into the"; \
+    echo " current directory."; \
+    echo; \
+    false; \
+  fi
+endef
+
+define build_cmd
+  $(MAKE) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
+  # If we don't use bootstrap, we need to explicitly build info.
+  $(MAKE) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" info
+endef
+
+# If we ever need to do the stripping outside of dh_strip, just add an
+# INSTALL_STRIP="-s" to the make vars below.
+
+define emacs_inst
+  $(MAKE) -C debian/$(1) install DESTDIR=$(2) \
+    infodir=/usr/share/info/emacs-$(major_ver) \
+    localstatedir=/var
+endef
+
+
+
+define patch
+  $(quilt) push -a
+endef
+
+define unpatch
+  test -z "$$($(quilt) applied)" || $(quilt) pop -a
+  rm -f debian/stamp/patch
+  rm -rf .pc
+endef
+
+define cleanup_all
+  # distclean goes first so we clean using patched code
+  rm -f debian/stamp/setup
+  rm -f debian/stamp/configure
+  rm -f debian/stamp/build
+  -$(MAKE) distclean
+  cd info && rm -f $$(ls | grep -v COPYING | grep -v '^dir$$')
+  dh_clean
+  $(unpatch)
+  #   now clean up bits in the source tree that the above didn't handle
+  find -name "*.elc" | xargs --no-run-if-empty rm
+  if [ -e debian/protected-files.tgz ]; then \
+    tar xzpf debian/protected-files.tgz; \
+  fi
+  rm -f debian/protected-files.tgz
+  #   now clean up everything else (mostly ./debian related stuff)
+  find -name '*~' | xargs --no-run-if-empty rm -f
+  rm -f debian/substvars
+  rm -f $(nonpersistent_autogen_files)
+  rm -rf \
+    debian/build-x \
+    debian/install-x \
+    debian/build-nox \
+    debian/install-nox \
+    debian/build-lucid \
+    debian/install-lucid \
+    debian/files*
+  rm -rf debian/*.tmp
+  rm -rf $(deb_trash)
+  rm -rf .pc
+  test ! -e debian/stamp || rmdir debian/stamp
+endef
+
+define update_debian_autofiles_quilt
+  $(cleanup_all)
+  # Make sure autofiles.diff exists, otherwise patching will fail.
+  if ! test -e debian/patches/autofiles.diff; \
+  then \
+    touch debian/patches/autofiles.diff; \
+  fi;
+  $(quilt) push $$($(quilt) series | tail -n 2 | head -n 1)
+  test "$$($(quilt) next)" = autofiles.diff
+  $(quilt) pop
+  mkdir -p debian/tmp-autofiles/old
+  $(pf); tar cpSf - --exclude ./debian --exclude ./.pc . \
+    | tar -C debian/tmp-autofiles/old -xpSf -
+  cp -a debian/tmp-autofiles/old debian/tmp-autofiles/new
+  cd debian/tmp-autofiles/new && aclocal
+  cd debian/tmp-autofiles/new && autoconf
+  cd debian/tmp-autofiles/new && autoheader
+  cd debian/tmp-autofiles/new && rm -rf autom4te.cache
+  cd debian/tmp-autofiles && diff -ruN old new > new.diff; \
+    test $$? -eq 1
+  $(quilt) import -f -P autofiles.diff debian/tmp-autofiles/new.diff
+  $(quilt) header -r autofiles.diff < debian/autofiles-diff-header
+  $(patch)
+  $(quilt) refresh --no-timestamps autofiles.diff
+  $(cleanup_all)
+endef
+deb_trash += debian/tmp-autofiles
+
+# If we ever need it, we can create a copy that doesn't assume ./debian/
+define deb_sub
+  perl -p \
+    -e "s|\@PKG_NAME\@|$(pkg_name)|go;" \
+    -e "s|\@MAJOR_VERSION\@|$(major_ver)|go;" \
+    -e "s|\@MINOR_VERSION\@|$(minor_ver)|go;" \
+    -e "s|\@FULL_VERSION\@|$(runtime_ver)|go;" \
+    -e "s|\@PACKAGE_VERSION\@|$(debian_ver)|go;" \
+    -e "s|\@DEBIAN_REV\@|$(deb_rev)|go;" \
+    -e "s|\@NOMINAL_VERSION\@|$(nominal_ver)|go;" \
+    -e "s|\@UPSTREAM_VERSION\@|$(upstream_ver)|go;" \
+    -e "s|\@DEBSRC_VERSION\@|$(debsrc_ver)|go;" \
+    -e "s|\@DEB_FLAVOR\@|$(flavor)|go;" \
+    -e "s|\@MENU_VERSION\@|$(menu_ver)|go;" \
+    -e "s|\@INFO_FILES\@|$(main_dir_info_files)|go;" \
+    -e "s|\@INFO_SUBDIR\@|$(info_subdir)|go;" \
+    -e "s|\@X_SUPPORT\@|$(xsupport)|go;" \
+    -e "s|\@BIN_PRIORITY\@|$(bin_priority)|go;" \
+    -e "s|\@MOVEMAIL_BIN\@|$(movemail_bin)|go;" \
+      < $(1) > $(2)
+endef
+
+check-vars:
+	@echo "upstream_ver: $(upstream_ver)"
+	@echo "debian_ver: $(debian_ver)"
+	@echo "debsrc_ver: $(debsrc_ver)"
+	@echo "debian_rev: $(debian_rev)"
+	@echo "nominal_ver: $(nominal_ver)"
+	@echo "runtime_ver: $(runtime_ver)"
+	@echo "major_ver: $(major_ver)"
+	@echo "minor_ver: $(minor_ver)"
+	@echo "movemail_bin: $(movemail_bin)"
+.PHONY: check-vars
+
+.PHONY: check-diff
+check-diff: clean
+	$(checkdir)
+	test -r ../$(deb_orig_tgz)
+	rm -rf debian/tmp-diff && mkdir debian/tmp-diff
+	cd debian/tmp-diff && tar xzpSf ../../../$(deb_orig_tgz)
+	cd debian/tmp-diff && mv $(deb_orig_tgz_dir) orig
+
+	mkdir debian/tmp-diff/new
+	$(pf); tar cpf - --exclude './debian' --exclude './.pc' . \
+	  | (cd debian/tmp-diff/new && tar xpf -)
+
+	@echo
+	@echo "########################################"
+	@echo "### Diffs outside ./debian"
+	@cd debian/tmp-diff && diff -ruN orig new
+	@echo "########################################"
+	@echo "### Empty file list differences"
+	@diff -u \
+	  <(cd debian/tmp-diff/orig && find -size 0) \
+	  <(cd debian/tmp-diff/new && find -size 0) \
+	    > debian/tmp-diff/empty-files.diff || test $$? -eq 1
+	@cat debian/tmp-diff/empty-files.diff
+	@test ! -s debian/tmp-diff/empty-files.diff || false
+	@echo "########################################"
+	@rm -rf debian/tmp-diff
+
+deb_trash += debian/tmp-diff
+
+
+buildpackage:
+	$(checkdir)
+	dpkg-buildpackage -D -us -uc -rfakeroot -i'\.git|\.pc'
+.PHONY: buildpackage
+
+prepare-release:
+	$(checkdir)
+        # don't want to be root -- using fakeroot below.
+        # also, stacking fakeroots seems to cause trouble generating diff.
+	@test "`whoami`" != root || \
+	  (echo "please run prepare-release as a normal user (not root)"; \
+	   false)
+        # check for any uncommitted changes
+	@if test $$(cd debian && git-diff-files | wc -c) -ne 0; \
+	then \
+	  read -p "Uncommitted changes.  Continue? [y/n] "; \
+          if test "$${REPLY}" != y; \
+	  then \
+	    false; \
+	  fi; \
+	fi
+        # TODO: make sure we actually installed the binary.
+        # TODO: run tests (use a check target?)
+	@read -p "Regenerate autofiles.diff? [y/n] "; \
+          if test "$${REPLY}" == y; \
+	  then \
+	    $(MAKE) -f debian/rules autofiles-sync; \
+	  else \
+	    true; \
+	  fi
+	$(MAKE) -f debian/rules clean
+	$(MAKE) -f debian/rules buildpackage
+	test -f ../$(src_name)_$(debian_ver).diff.gz
+	@if [ $$(zgrep '^---' \
+	           ../$(src_name)_$(debian_ver).diff.gz  \
+	             | grep -v /debian/ | wc -c) -ne 0 ]; \
+	then \
+	  echo "Diffs outside debian/ found, please fix and retry."; \
+	  echo "This probably means either something wasn't cleaned"; \
+	  echo "properly, or you need to do some work in debian/patches."; \
+	  false; \
+	else \
+	  echo "Everything looks OK.  Ready for release."; \
+	  echo "Don't forget to run debsign if needed."; \
+	fi
+.PHONY: prepare-release 
+
+
+# we don't sync this automatically on clean because it's expensive and
+# should only be done by a maintainer with time to deal with any mess
+# it might create.
+autofiles-sync:
+	$(update_debian_autofiles_quilt)
+.PHONY: autofiles-sync
+
+debian-sync: $(persistent_autogen_files)
+
+.PHONY: force-debian-sync debian-sync
+
+debian/$(flavor).%: xsupport := "x"
+debian/$(flavor).%: pkg_name := $(flavor)
+
+debian/$(flavor)-nox.%: xsupport := "nox"
+debian/$(flavor)-nox.%: pkg_name := $(flavor)-nox
+
+debian/$(flavor)-lucid.%: xsupport := "lucid"
+debian/$(flavor)-lucid.%: pkg_name := $(flavor)-lucid
+
+debian/$(flavor)-common.%: pkg_name := $(flavor)-common
+debian/$(flavor)-bin-common.%: pkg_name := $(flavor)-bin-common
+
+debian/%: debian/%.in debian/changelog
+	$(call deb_sub,$<,$@)
+
+debian/$(flavor)-bin-common.%: debian/emacsVER-bin-common.% debian/changelog
+	$(call deb_sub,$<,$@)
+
+debian/$(flavor)-common.%: debian/emacsVER-common.% debian/changelog
+	$(call deb_sub,$<,$@)
+
+debian/$(flavor)-el.%: debian/emacsVER-el.% debian/changelog
+	$(call deb_sub,$<,$@)
+
+debian/$(flavor).%: debian/emacsVER.% debian/changelog
+	$(call deb_sub,$<,$@)
+
+debian/$(flavor)-nox.%: debian/emacsVER.% debian/changelog
+	$(call deb_sub,$<,$@)
+
+debian/$(flavor)-lucid.%: debian/emacsVER.% debian/changelog
+	$(call deb_sub,$<,$@)
+
+debian/$(flavor)-common.README.Debian: \
+  debian/emacsVER-common.README debian/patches/*.diff debian/patches/series
+	cd debian && \
+	  csplit -s -f emacsVER-common.README. \
+	  emacsVER-common.README '/@@PATCH_LIST_HERE@@/'
+	cp debian/emacsVER-common.README.00 debian/emacsVER-common.README.tmp
+	for p in $$($(quilt) series); do $(quilt) header $$p; done \
+	  >> debian/emacsVER-common.README.tmp
+	tail -n +2 \
+	  < debian/emacsVER-common.README.01 \
+	  >> debian/emacsVER-common.README.tmp
+	mv debian/emacsVER-common.README.tmp $@
+
+deb_trash += debian/emacsVER-common.README.tmp
+deb_trash += debian/emacsVER-common.README.00
+deb_trash += debian/emacsVER-common.README.01
+
+debian/protected-files.tgz:
+	tar czpSf debian/protected-files.tgz.tmp $(protected_files)
+	mv debian/protected-files.tgz.tmp $@
+
+debian/stamp/patch: debian/protected-files.tgz
+	$(checkdir)
+	$(patch)
+	mkdir -p $(dir $@) && touch $@
+
+debian/stamp/setup: debian/stamp/patch
+	$(checkdir)
+	cp /usr/share/misc/config.sub .
+	cp /usr/share/misc/config.guess .
+	mkdir -p $(dir $@) && touch $@
+
+# common configure flags
+confflags += --prefix=/usr
+confflags += --sharedstatedir=/var/lib
+confflags += --libexecdir=/usr/lib
+confflags += --localstatedir=/var/lib
+confflags += --infodir=/usr/share/info
+confflags += --mandir=/usr/share/man
+confflags += --with-pop=yes
+confflags += --enable-locallisppath=$(local_lpath)
+
+# x configure flags
+confflags_x := $(confflags) 
+confflags_x += --with-x=yes
+confflags_x += --with-x-toolkit=gtk
+confflags_x += --with-toolkit-scroll-bars
+
+# nox configure flags
+confflags_nox := $(confflags) 
+confflags_nox += --with-x=no
+
+# lucid configure flags
+confflags_lucid := $(confflags)
+confflags_lucid += --with-x=yes
+confflags_lucid += --with-x-toolkit=lucid
+confflags_lucid += --with-toolkit-scroll-bars
+
+configure: debian/stamp/configure
+.PHONY: configure
+
+define cfg_tree
+  rm -rf $(1)
+  mkdir $(1)
+  cp -a $$(ls -A | grep -v '^debian$$' | grep -v '^.pc$$') "$(1)"
+  cd $(1) && CFLAGS="$(CFLAGS)" ../../configure $(confflags) $(2)
+endef
+
+# For those who prefer the old-style non-toolkit scrollbars, just add
+# --without-toolkit-scroll-bars to the build-x cfg_tree line below.
+# The resulting emacsXY package will have the old scrollbars.
+
+debian/stamp/configure: debian/stamp/setup
+	$(checkdir)
+	$(call cfg_tree,debian/build-x,$(confflags_x))
+	$(call cfg_tree,debian/build-nox,$(confflags_nox))
+	$(call cfg_tree,debian/build-lucid,$(confflags_lucid))
+	mkdir -p debian/stamp && touch $@
+
+build: debian/stamp/build
+.PHONY: build
+
+debian/stamp/build: debian/stamp/configure $(autogen_build_files)
+	$(checkdir)
+        # See if we can do without the bootstrap now...
+        #cd debian/build-x && $(build_cmd) bootstrap
+        #cd debian/build-x && $(build_cmd) clean
+	$(call build_cmd,debian/build-x)
+	$(call build_cmd,debian/build-nox)
+	$(call build_cmd,debian/build-lucid)
+	mkdir -p debian/stamp && touch $@
+
+
+define install_common_binpkg_bits
+  # args: (1) srcdir (2) pkgdir (3) pkgname (4) bin-suffix
+
+  install -d $(2)/usr/bin/
+  test -f $(1)/usr/bin/emacs-*
+  cp -a $(1)/usr/bin/emacs-* $(2)/usr/bin/$(flavor)-$(4)
+  dh_link -p$(3) usr/bin/$(flavor)-$(4) usr/bin/$(flavor)
+
+  install -d $(2)/usr/share/emacs/$(runtime_ver)/etc
+  cp -a $(1)/usr/share/emacs/$(runtime_ver)/etc/DOC-$(runtime_ver).1 \
+	$(2)/usr/share/emacs/$(runtime_ver)/etc/
+
+  install -d $(2)/usr/share/man/man1
+  dh_link -p$(3) \
+    usr/share/man/man1/emacs.$(flavor).1.gz \
+    usr/share/man/man1/$(flavor).1.gz
+  dh_link -p$(3) \
+    usr/share/man/man1/emacs.$(flavor).1.gz \
+    usr/share/man/man1/$(flavor)-$(4).1.gz
+
+endef
+
+
+install: debian/stamp/build $(autogen_install_files)
+	$(checkdir)
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	rm -rf $(install_dir_x) $(install_dir_nox) $(install_dir_lucid)
+
+        # Deal with accidental multiple version problem.
+	rm -f debian/build-x/etc/DOC-$(runtime_ver).*
+	rm -f debian/build-x/src/emacs-$(runtime_ver).*
+	rm -f debian/build-x/src/emacs
+	$(call emacs_inst,build-x,$(install_dir_x))
+
+        # Deal with accidental multiple version problem.
+	rm -f debian/build-nox/etc/DOC-$(runtime_ver).*
+	rm -f debian/build-nox/src/emacs-$(runtime_ver).*
+	rm -f debian/build-nox/src/emacs
+	$(call emacs_inst,build-nox,$(install_dir_nox))
+
+	$(call emacs_inst,build-lucid,$(install_dir_lucid))
+
+#        # Use X install dir for the common packages too.
+#	$(call emacs_inst,build-x,$(install_dir_x))
+
+        ##################################################
+        # emacsXY-common
+
+	cp -a $(install_dir_x)/* $(pkgdir_common)
+
+	rm -r $(pkgdir_common)/usr/bin
+	rm -r $(pkgdir_common)/usr/lib
+
+	cd $(pkgdir_common)/usr/share/emacs/$(runtime_ver)/etc \
+	  && test -f DOC-$(runtime_ver).*
+	cd $(pkgdir_common)/usr/share/emacs/$(runtime_ver)/etc \
+	  && rm DOC-$(runtime_ver).*
+
+        # lisp path directories
+	install -d $(pkgdir_common)/etc/$(flavor)/site-start.d
+	install -d $(pkgdir_common)/usr/share/$(flavor)
+
+        # The version-specific site-lisp dir, say emacs/21.1/site-lisp, needs
+        # to be in share/FLAVOR so that as we upgrade from 21.1 to 21.2,
+        # etc., add-on package bits don't get left behind.
+	mv $(pkgdir_common)/usr/share/emacs/$(runtime_ver)/site-lisp \
+		$(pkgdir_common)/usr/share/$(flavor)
+	dh_link -p$(flavor)-common usr/share/$(flavor)/site-lisp \
+			usr/share/emacs/$(runtime_ver)/site-lisp
+
+        # This is a duplicate of the file in FLAVOR/site-lisp
+	rm $(pkgdir_common)/usr/share/emacs/site-lisp/subdirs.el
+
+	cd $(pkgdir_common)/usr/share/emacs/$(runtime_ver)/etc/images/icons \
+	  && convert hicolor/16x16/apps/emacs.{png,xpm}
+	cd $(pkgdir_common)/usr/share/emacs/$(runtime_ver)/etc/images/icons \
+	  && convert hicolor/32x32/apps/emacs.{png,xpm}
+
+        # Fixup image files in unversioned directories (remove old
+        # images, version unversioned images) and prepare for
+        # update-alternatives.
+	rm $(pkgdir_common)/usr/share/icons/hicolor/16x16/apps/emacs22.png
+	rm $(pkgdir_common)/usr/share/icons/hicolor/24x24/apps/emacs22.png
+	rm $(pkgdir_common)/usr/share/icons/hicolor/48x48/apps/emacs22.png
+
+	cd $(pkgdir_common)/usr/share/icons/hicolor \
+	  && mv scalable/apps/emacs.svg scalable/apps/${flavor}.svg \
+	  && mv 16x16/apps/emacs.png 16x16/apps/${flavor}.png \
+	  && mv 24x24/apps/emacs.png 24x24/apps/${flavor}.png \
+	  && mv 32x32/apps/emacs.png 32x32/apps/${flavor}.png \
+	  && mv 48x48/apps/emacs.png 48x48/apps/${flavor}.png \
+	  && mv 128x128/apps/emacs.png 128x128/apps/${flavor}.png
+
+	cd $(pkgdir_common)/usr/share/icons/hicolor/scalable/mimetypes \
+	  && mv emacs-document.svg ${flavor}-document.svg
+
+        # Remove redundant emacs.desktop file.
+	rm $(pkgdir_common)/usr/share/emacs/$(runtime_ver)/etc/emacs.desktop
+	rm $(pkgdir_common)/usr/share/applications/emacs.desktop
+
+        # Mangle info files.
+	chmod 755 debian/mangle-info
+	for f in $(main_dir_info_files); \
+	do \
+	  DEBIAN_INFO_PREFIX=$(info_subdir) \
+	    debian/mangle-info \
+	      $(pkgdir_common)/usr/share/info/$(info_subdir)/$$f; \
+	done
+
+	perl -pi -e "s|man1/etags\\.1|man1/etags\\.$(flavor)\\.1|" \
+	  $(pkgdir_common)/usr/share/man/man1/ctags.$(flavor).1
+
+	cd $(pkgdir_common)/usr/share/man/man1/ && \
+	  for f in *.1; do mv $$f $$(basename $${f} .1).$(flavor).1; done
+
+        # At least etc/COPYING is needed by M-x describe-copying.
+	rm $(pkgdir_common)/usr/share/emacs/$(runtime_ver)/etc/COPYING
+	rm $(pkgdir_common)/usr/share/emacs/$(runtime_ver)/lisp/COPYING
+	dh_link -p$(flavor)-common /usr/share/common-licenses/GPL-3 \
+	  usr/share/emacs/$(runtime_ver)/etc/COPYING
+	dh_link -p$(flavor)-common /usr/share/common-licenses/GPL-3 \
+	  usr/share/emacs/$(runtime_ver)/lisp/COPYING
+
+        # Install replacements for non-free files that can be reached
+        # through C-h
+	for f in THE-GNU-PROJECT; \
+	do \
+	  sed \
+	    -e "s/@FILE@/$$f/g" \
+	    -e "s/@MAJOR_VERSION@/$(major_ver)/g" \
+	    $(CURDIR)/debian/missing-file.dfsg > \
+	    $(pkgdir_common)/usr/share/emacs/$(runtime_ver)/etc/$$f.dfsg ; \
+	done
+
+	$(pf); cd $(pkgdir_common) && \
+	  find -name "*.elc" | perl -pe 's/\.elc$$/\.el/o' | xargs rm -f
+
+	$(pf); cd $(pkgdir_common) && \
+	  find -name "*.elc" | perl -pe 's/\.elc$$/\.el\.gz/o' | xargs rm -f
+
+        # Remove extraneous info dir files.  These may not exist if dpkg
+        # is 1.5.4 or newer.
+	rm -f $(pkgdir_common)/usr/share/info/emacs-$(major_ver)/dir
+	rm -f $(pkgdir_common)/usr/share/info/emacs-$(major_ver)/dir.old
+
+        # Remove the shared game score directory to as a simple way to avoid
+        # a conflict with other flavors of Emacs.  Since Debian's
+        # update-game-score binary isn't setuid, that directory is never used.
+	rm $(pkgdir_common)/var/games/emacs/tetris-scores
+	rm $(pkgdir_common)/var/games/emacs/snake-scores
+	rmdir $(pkgdir_common)/var/games/emacs/
+	rmdir $(pkgdir_common)/var/games/
+	rmdir $(pkgdir_common)/var/
+
+        # Make sure /usr/local dir doesn't exist.
+	rm -r $(pkgdir_common)/usr/local
+
+        ##################################################
+        # emacsXY-bin-common
+
+        # Move common binaries to emacs-bin-common.
+	install -d $(pkgdir_bin_common)/usr
+	cp -a $(install_dir_x)/usr/bin $(pkgdir_bin_common)/usr
+	cp -a $(install_dir_x)/usr/lib $(pkgdir_bin_common)/usr
+
+        # Make sure there's just one.
+	test -f $(pkgdir_bin_common)/usr/bin/emacs-*
+	rm $(pkgdir_bin_common)/usr/bin/{emacs,emacs-*}
+
+        # Set up movemail.
+	chown root.mail $(pkgdir_bin_common)/$(movemail_bin)
+	chmod g+s $(pkgdir_bin_common)/$(movemail_bin)
+
+        # Set up alternatives.
+	alternatives=`ls $(pkgdir_bin_common)/usr/bin | xargs` && \
+	  set -x && \
+	  for f in debian/$(flavor)-bin-common.*; \
+	  do \
+	    perl -pwi -e "s|\@ALTERNATIVES\@|$${alternatives}|go" $$f ; \
+	  done
+
+	for f in `ls $(pkgdir_bin_common)/usr/bin`; \
+	do \
+	  mv $(pkgdir_bin_common)/usr/bin/$$f \
+	     $(pkgdir_bin_common)/usr/bin/$$f.$(flavor) ; \
+	done
+
+        ##################################################
+        # emacsXY
+	$(call install_common_binpkg_bits,\
+	  $(install_dir_x),$(pkgdir_x),$(flavor),x)
+
+        # install desktop entry
+	install -d $(pkgdir_x)/usr/share/applications
+	install -m 0644 \
+	  debian/$(flavor).desktop $(pkgdir_x)/usr/share/applications/
+
+        ##################################################
+        # emacsXY-nox
+	$(call emacs_inst,build-nox,$(install_dir_nox))
+	$(call install_common_binpkg_bits,\
+	  $(install_dir_nox),$(pkgdir_nox),$(flavor)-nox,nox)
+	rm -rf $(install_dir_nox)
+
+        ##################################################
+        # emacsXY-lucid
+	$(call emacs_inst,build-lucid,$(install_dir_lucid))
+	$(call install_common_binpkg_bits,\
+	  $(install_dir_lucid),$(pkgdir_lucid),$(flavor)-lucid,lucid)
+
+        # install desktop entry
+	install -d $(pkgdir_lucid)/usr/share/applications
+	install -m 0644 \
+	  debian/$(flavor)-lucid.desktop $(pkgdir_lucid)/usr/share/applications/
+	rm -rf $(install_dir_lucid)
+
+        ##################################################
+        # emacsXY-el
+
+	$(pf); \
+	(cd $(install_dir_x) && find -name "*.el" -o -name "*.el.gz" -print0 \
+	 | tar cpf - --null --files-from -) \
+	   | (cd $(pkgdir_el) && tar xpf -)
+
+        ##################################################
+        # final cleanup
+	rm -rf $(install_dir_x)
+	rm -rf $(install_dir_nox)
+	rm -rf $(install_dir_lucid)
+
+
+binary-indep: build install
+	$(checkdir)
+	dh_testdir -i
+	dh_testroot -i
+	dh_installchangelogs -i
+	dh_lintian -i
+	dh_installdocs -i
+	dh_link -i
+	dh_strip -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_shlibdeps -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+binary-arch: build install
+	$(checkdir)
+	dh_testdir -a
+	dh_testroot -a
+	dh_installinfo -a
+	dh_lintian -a
+	dh_installman -a
+	dh_installchangelogs -a
+	dh_installdocs -a
+	dh_installexamples -a
+#	dh_install -a
+	dh_installmenu -a
+	dh_link -a
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a -X$(movemail_bin)
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+
+clean: debian-sync
+	$(checkdir)
+	$(cleanup_all)
+
+source diff:
+	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+.PHONY: binary binary-arch binary-indep clean
--- emacs23-23.1+1.orig/debian/emacsVER-bin-common.prerm
+++ emacs23-23.1+1/debian/emacsVER-bin-common.prerm
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+FLAVOR=@DEB_FLAVOR@
+MAJOR=@MAJOR_VERSION@
+MINOR=@MINOR_VERSION@
+FULL=@FULL_VERSION@
+ALTERNATIVES="@ALTERNATIVES@"
+
+# update-alternatives on things that collide with xemacs, other editors
+if [ "$1" != "upgrade" ]
+then
+  for i in ${ALTERNATIVES}
+  do
+    update-alternatives --remove $i /usr/bin/$i.${FLAVOR}
+  done
+fi
+
+#DEBHELPER#
+
--- emacs23-23.1+1.orig/debian/emacsVER.README
+++ emacs23-23.1+1/debian/emacsVER.README
@@ -0,0 +1,3 @@
+
+Please see /usr/share/doc/@PKG_NAME@-common/ as the primary
+documentation directory.
--- emacs23-23.1+1.orig/debian/patches/fix-rmail-capitalized-month-names.diff
+++ emacs23-23.1+1/debian/patches/fix-rmail-capitalized-month-names.diff
@@ -0,0 +1,40 @@
+* Rmail can now handle capitilized month names.
+  Patch: fix-rmail-capitalized-month-names.diff
+  Provided-by: Sven Joachim <svenjoac@gmx.de>
+  Originally-reported-by: Jeroen Nijhof <jeroen@nijhof.uklinux.net>
+  Date: Thu, 06 Aug 2009 22:51:47 +0200
+  Added-by: Rob Browning <rlb@defaultvalue.org>
+  Status: incorporated upstream
+  Bug: 540234
+
+  Rmail can not handle Date lines that have a capitalized month name
+  like "Date: Thu, 06 Aug 2009 18:33:32 +0100".
+
+Index: b/lisp/mail/rmailsum.el
+===================================================================
+--- a/lisp/mail/rmailsum.el
++++ b/lisp/mail/rmailsum.el
+@@ -518,16 +518,19 @@
+    (concat (save-excursion
+ 	     (if (not (re-search-forward "^Date:" nil t))
+ 		 "      "
+-	       (cond ((re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)"
+-		       (line-end-position) t)
++	       ;; Match month names case-insensitively
++	       (cond ((let ((case-fold-search t))
++			(re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)"
++					   (line-end-position) t))
+ 		      (format "%2d-%3s"
+ 			      (string-to-number (buffer-substring
+ 						 (match-beginning 2)
+ 						 (match-end 2)))
+ 			      (buffer-substring
+ 			       (match-beginning 4) (match-end 4))))
+-		     ((re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)"
+-		       (line-end-position) t)
++		     ((let ((case-fold-search t))
++			(re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)"
++					   (line-end-position) t))
+ 		      (format "%2d-%3s"
+ 			      (string-to-number (buffer-substring
+ 						 (match-beginning 4)
--- emacs23-23.1+1.orig/debian/patches/require-movemail-use-liblockfile.diff
+++ emacs23-23.1+1/debian/patches/require-movemail-use-liblockfile.diff
@@ -0,0 +1,40 @@
+* The build will fail if liblockfile isn't selected for movemail.
+  Patch: require-movemail-use-liblockfile.diff
+  Author: Rob Browning <rlb@defaultvalue.org>
+  Added-by: Rob Browning <rlb@defaultvalue.org>
+
+  This makes sure the Debian Emacs won't accidentally be built with
+  the wrong locking strategy.  To disable this check, comment out
+  require-movemail-use-liblockfile.diff in debian/patches/series.
+
+Index: b/lib-src/movemail.c
+===================================================================
+--- a/lib-src/movemail.c
++++ b/lib-src/movemail.c
+@@ -166,6 +166,10 @@
+ /* Nonzero means this is name of a lock file to delete on fatal error.  */
+ char *delete_lockname;
+ 
++#ifndef MAIL_USE_MAILLOCK
++#error "Debian requires that mail locking be handled by liblockfile."
++#endif /* ndef MAIL_USE_MAILLOCK */
++
+ int
+ main (argc, argv)
+      int argc;
+Index: b/src/s/bsd-common.h
+===================================================================
+--- a/src/s/bsd-common.h
++++ b/src/s/bsd-common.h
+@@ -66,7 +66,11 @@
+    The alternative is that a lock file named
+    /usr/spool/mail/$USER.lock.  */
+ 
++/* conditional copied from gnu-linux.h */
++#if !((defined (HAVE_LIBMAIL) || defined (HAVE_LIBLOCKFILE)) && \
++      defined (HAVE_MAILLOCK_H))
+ #define MAIL_USE_FLOCK
++#endif
+ 
+ /* Define CLASH_DETECTION if you want lock files to be written
+    so that Emacs can tell instantly when you try to modify
--- emacs23-23.1+1.orig/debian/patches/debian-adjust-mail-from-addresses.diff
+++ emacs23-23.1+1/debian/patches/debian-adjust-mail-from-addresses.diff
@@ -0,0 +1,46 @@
+* The default handling of mail from addresses has been changed.
+  Patch: debian-adjust-mail-from-addresses.diff
+  Bug: 7051 35128
+
+  * The default for message-sendmail-f-is-evil has been changed to t.
+
+    This is correct for Debian systems where we know the MTA should be
+    trusted.
+    
+  * The default mail-from-style is 'system-default rather than 'angles.
+    
+Index: b/lisp/gnus/message.el
+===================================================================
+--- a/lisp/gnus/message.el
++++ b/lisp/gnus/message.el
+@@ -808,9 +808,14 @@
+ 		 (const never)
+ 		 (const ask)))
+ 
+-(defcustom message-sendmail-f-is-evil nil
+-  "*Non-nil means don't add \"-f username\" to the sendmail command line.
+-Doing so would be even more evil than leaving it out."
++;; message-sendmail-f-is-evil is nil here in the upstream source, but
++;; sendmail works right under Debian Linux, so we want t. [was
++;; orignally reported for emacs 19 as debian#7051]
++(defcustom message-sendmail-f-is-evil t
++  "*Non-nil means don't add \"-f username\" to the sendmail command
++line, because adding it would be more evil than leaving it out.  Under
++Debian/GNU/Linux, sendmail works right, so it should be safe for this
++to be set to true."
+   :group 'message-sending
+   :link '(custom-manual "(message)Mail Variables")
+   :type 'boolean)
+Index: b/lisp/mail/sendmail.el
+===================================================================
+--- a/lisp/mail/sendmail.el
++++ b/lisp/mail/sendmail.el
+@@ -58,7 +58,7 @@
+   :type 'file)
+ 
+ ;;;###autoload
+-(defcustom mail-from-style 'angles
++(defcustom mail-from-style 'system-default
+   "Specifies how \"From:\" fields look.
+ 
+ If `nil', they contain just the return address like:
--- emacs23-23.1+1.orig/debian/patches/version-mention-debian.diff
+++ emacs23-23.1+1/debian/patches/version-mention-debian.diff
@@ -0,0 +1,20 @@
+* The output of (version) has been modified to indicate Debian modifications.
+  Patch: version-mention-debian.diff
+  Author: Rob Browning <rlb@defaultvalue.org>
+  Added-by: Rob Browning <rlb@defaultvalue.org>
+
+Index: b/lisp/version.el
+===================================================================
+--- a/lisp/version.el
++++ b/lisp/version.el
+@@ -57,8 +57,8 @@
+   (interactive "P")
+   (let ((version-string
+          (format (if (not (interactive-p))
+-		     "GNU Emacs %s (%s%s%s)\n of %s on %s"
+-		   "GNU Emacs %s (%s%s%s) of %s on %s")
++		     "GNU Emacs %s (%s%s%s)\n of %s on %s, modified by Debian"
++		   "GNU Emacs %s (%s%s%s) of %s on %s, modified by Debian")
+                  emacs-version
+ 		 system-configuration
+ 		 (cond ((featurep 'motif)
--- emacs23-23.1+1.orig/debian/patches/series
+++ emacs23-23.1+1/debian/patches/series
@@ -0,0 +1,12 @@
+debian-site-init-el.diff
+debian-startup.diff
+debian-adjust-mail-from-addresses.diff
+handle-dfsg-split.diff
+misc-unseparated.diff
+require-movemail-use-liblockfile.diff
+avoid-fakemail-mail-loss.diff
+version-mention-debian.diff
+look-for-news-to-find-etc.diff
+fix-flymake-xmlstarlet-invocation.diff
+fix-rmail-capitalized-month-names.diff
+autofiles.diff
--- emacs23-23.1+1.orig/debian/patches/fix-flymake-xmlstarlet-invocation.diff
+++ emacs23-23.1+1/debian/patches/fix-flymake-xmlstarlet-invocation.diff
@@ -0,0 +1,24 @@
+* Emacs now invokes the correct xmlstarlet executable on Debian systems.
+  Patch: fix-flymake-xmlstarlet-invocation.diff
+  Provided-by: Jussi Judin <jjudin+debian@iki.fi>
+  Date: Sat, 20 Oct 2007 14:42:02 UTC
+  Added-by: Rob Browning <rlb@defaultvalue.org>
+  Status: Debian specific
+  Bug: 447378
+
+  Emacs invokes xmlstarlet rather than xml, which is the correct
+  executable name on Debian systems.
+
+Index: b/lisp/progmodes/flymake.el
+===================================================================
+--- a/lisp/progmodes/flymake.el
++++ b/lisp/progmodes/flymake.el
+@@ -1754,7 +1754,7 @@
+ 
+ ;;;; xml-specific init-cleanup routines
+ (defun flymake-xml-init ()
+-  (list "xml" (list "val" (flymake-init-create-temp-buffer-copy 'flymake-create-temp-inplace))))
++  (list "xmlstarlet" (list "val" (flymake-init-create-temp-buffer-copy 'flymake-create-temp-inplace))))
+ 
+ (provide 'flymake)
+ 
--- emacs23-23.1+1.orig/debian/patches/debian-site-init-el.diff
+++ emacs23-23.1+1/debian/patches/debian-site-init-el.diff
@@ -0,0 +1,23 @@
+* Emacs will prefer /usr/share/info/emacs-23 over /usr/share/info.
+  Patch: debian-site-init-el.diff
+
+  The value of Info-default-directory-list has been augmented via
+  site-init.el to include /usr/share/info/emacs-23 before
+  /usr/share/info.
+    
+Index: b/lisp/site-init.el
+===================================================================
+--- /dev/null
++++ b/lisp/site-init.el
+@@ -0,0 +1,11 @@
++
++;; Add the flavor specific directory for Debian.
++(setq Info-default-directory-list
++      (let ((result nil)
++            (found-match nil))
++        (dolist (elt Info-default-directory-list (nreverse result))
++          (if (and (not found-match) (equal elt "/usr/share/info/"))
++              (progn
++                (push "/usr/share/info/emacs-23" result)
++                (setq found-match t)))
++          (push elt result))))
--- emacs23-23.1+1.orig/debian/patches/handle-dfsg-split.diff
+++ emacs23-23.1+1/debian/patches/handle-dfsg-split.diff
@@ -0,0 +1,549 @@
+* Files apparently incompatible with the DFSG have been removed.
+
+  A number of files have been removed from this package because their
+  licenses are not compatible with the Debian Free Software Guidelines
+  (DFSG), or because it wasn't completely clear that their licenses
+  are compatible.
+
+  In particular, all of the files which are covered under the GFDL and
+  have invariant sections have been removed in accordance with this
+  General Resolution: http://www.debian.org/vote/2006/vote_001.
+
+  The files that have been removed, but still appear to be
+  distributable, have been moved to packages in Debian's non-free
+  section.
+
+  Patch: handle-dfsg-split.diff
+  Author: Rob Browning <rlb@defaultvalue.org>
+  Added-by: Rob Browning <rlb@defaultvalue.org>
+  Status: new
+
+Index: b/lisp/help.el
+===================================================================
+--- a/lisp/help.el
++++ b/lisp/help.el
+@@ -297,6 +297,14 @@
+   (goto-address-mode 1)
+   (goto-char (point-min)))
+ 
++(defun debian-expand-file-name-dfsg (filename)
++  "Apply expand-file-name to FILENAME.
++If expand-file-name does not find a file, append `.dfsg' and try again."
++  (let ((file (expand-file-name filename data-directory)))
++    (if (file-exists-p file)
++        file
++      (expand-file-name (concat file ".dfsg") data-directory))))
++
+ (defun describe-distribution ()
+   "Display info on how to obtain the latest version of GNU Emacs."
+   (interactive)
+@@ -310,7 +318,7 @@
+ (defun describe-gnu-project ()
+   "Display info on the GNU project."
+   (interactive)
+-  (view-help-file "THE-GNU-PROJECT"))
++  (view-help-file (debian-expand-file-name-dfsg "THE-GNU-PROJECT")))
+ 
+ (define-obsolete-function-alias 'describe-project 'describe-gnu-project "22.2")
+ 
+Index: b/Makefile.in
+===================================================================
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -139,12 +139,7 @@
+ # since there are now many packages documented with the texinfo
+ # system, it is inappropriate to imply that it is part of Emacs.
+ infodir=@infodir@
+-INFO_FILES=ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse	\
+-           ediff efaq eintr elisp emacs emacs-mime epa erc eshell eudc	\
+-           flymake forms gnus idlwave info mairix-el message mh-e	\
+-           newsticker nxml-mode org pcl-cvs pgg rcirc reftex remember	\
+-           sasl sc ses sieve smtpmail speedbar tramp url vip viper	\
+-           widget woman
++INFO_FILES=efaq
+ 
+ # Directory for local state files for all programs.
+ localstatedir=@localstatedir@
+@@ -270,7 +265,7 @@
+ SUBDIR = lib-src src lisp
+ 
+ # The subdir makefiles created by config.status.
+-SUBDIR_MAKEFILES = lib-src/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispref/Makefile doc/lispintro/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile lisp/Makefile
++SUBDIR_MAKEFILES = lib-src/Makefile doc/misc/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile lisp/Makefile
+ 
+ # Subdirectories to install, and where they'll go.
+ # lib-src's makefile knows how to install it, so we don't do that here.
+@@ -357,10 +352,7 @@
+           $(srcdir)/Makefile.in \
+           $(srcdir)/src/Makefile.in \
+           $(srcdir)/lib-src/Makefile.in \
+-          $(srcdir)/doc/emacs/Makefile.in \
+           $(srcdir)/doc/misc/Makefile.in \
+-          $(srcdir)/doc/lispref/Makefile.in \
+-          $(srcdir)/doc/lispintro/Makefile.in \
+           $(srcdir)/oldXMenu/Makefile.in \
+           $(srcdir)/lwlib/Makefile.in \
+           $(srcdir)/leim/Makefile.in \
+@@ -699,10 +691,7 @@
+ 	(cd oldXMenu; $(MAKE) $(MFLAGS) mostlyclean)
+ 	(cd lwlib;    $(MAKE) $(MFLAGS) mostlyclean)
+ 	(cd lib-src;  $(MAKE) $(MFLAGS) mostlyclean)
+-	-(cd doc/emacs &&   $(MAKE) $(MFLAGS) mostlyclean)
+ 	-(cd doc/misc &&   $(MAKE) $(MFLAGS) mostlyclean)
+-	-(cd doc/lispref &&   $(MAKE) $(MFLAGS) mostlyclean)
+-	-(cd doc/lispintro &&   $(MAKE) $(MFLAGS) mostlyclean)
+ 	(cd leim;     $(MAKE) $(MFLAGS) mostlyclean)
+ 
+ ### `clean'
+@@ -718,10 +707,7 @@
+ 	(cd oldXMenu; $(MAKE) $(MFLAGS) clean)
+ 	(cd lwlib;    $(MAKE) $(MFLAGS) clean)
+ 	(cd lib-src;  $(MAKE) $(MFLAGS) clean)
+-	-(cd doc/emacs &&   $(MAKE) $(MFLAGS) clean)
+ 	-(cd doc/misc &&   $(MAKE) $(MFLAGS) clean)
+-	-(cd doc/lispref &&   $(MAKE) $(MFLAGS) clean)
+-	-(cd doc/lispintro &&   $(MAKE) $(MFLAGS) clean)
+ 	(cd leim;     $(MAKE) $(MFLAGS) clean)
+ 
+ ### `bootclean'
+@@ -742,10 +728,7 @@
+ 	(cd oldXMenu; $(MAKE) $(MFLAGS) distclean)
+ 	(cd lwlib;    $(MAKE) $(MFLAGS) distclean)
+ 	(cd lib-src;  $(MAKE) $(MFLAGS) distclean)
+-	(cd doc/emacs &&    $(MAKE) $(MFLAGS) distclean)
+ 	(cd doc/misc &&    $(MAKE) $(MFLAGS) distclean)
+-	(cd doc/lispref &&    $(MAKE) $(MFLAGS) distclean)
+-	(cd doc/lispintro &&    $(MAKE) $(MFLAGS) distclean)
+ 	(cd leim;     $(MAKE) $(MFLAGS) distclean)
+ 	(cd lisp;     $(MAKE) $(MFLAGS) distclean)
+ 	${top_distclean}
+@@ -758,10 +741,7 @@
+ 	(cd oldXMenu; $(MAKE) $(MFLAGS) maintainer-clean)
+ 	(cd lwlib;    $(MAKE) $(MFLAGS) maintainer-clean)
+ 	(cd lib-src;  $(MAKE) $(MFLAGS) maintainer-clean)
+-	-(cd doc/emacs &&   $(MAKE) $(MFLAGS) maintainer-clean)
+ 	-(cd doc/misc &&   $(MAKE) $(MFLAGS) maintainer-clean)
+-	-(cd doc/lispref &&   $(MAKE) $(MFLAGS) maintainer-clean)
+-	-(cd doc/lispintro &&   $(MAKE) $(MFLAGS) maintainer-clean)
+ 	(cd leim;     $(MAKE) $(MFLAGS) maintainer-clean)
+ 	(cd lisp;     $(MAKE) $(MFLAGS) bootstrap-clean)
+ 	${top_bootclean}
+@@ -806,10 +786,7 @@
+ .PHONY: info dvi dist check html
+ 
+ info-real: 
+-	-(cd doc/emacs; $(MAKE) $(MFLAGS) info)
+ 	-(cd doc/misc; $(MAKE) $(MFLAGS) info)
+-	-(cd doc/lispref; $(MAKE) $(MFLAGS) info)
+-	-(cd doc/lispintro; $(MAKE) $(MFLAGS) info)
+ 
+ force-info:
+ # Note that man/Makefile knows how to
+@@ -843,10 +820,7 @@
+ 	echo "info/dir is OK"
+ 
+ dvi:
+-	(cd doc/emacs; $(MAKE) $(MFLAGS) dvi)
+ 	(cd doc/misc; $(MAKE) $(MFLAGS) dvi)
+-	(cd doc/lispref; $(MAKE) $(MFLAGS) elisp.dvi)
+-	(cd doc/lispintro; $(MAKE) $(MFLAGS) emacs-lisp-intro.dvi)
+ 
+ #### Bootstrapping.
+ 
+Index: b/doc/misc/Makefile.in
+===================================================================
+--- a/doc/misc/Makefile.in
++++ b/doc/misc/Makefile.in
+@@ -38,96 +38,10 @@
+ 
+ # Also add new entries to INFO_FILES in the top-level Makefile.in.
+ INFO_TARGETS = \
+-	$(infodir)/ada-mode \
+-	$(infodir)/auth \
+-	$(infodir)/autotype \
+-	$(infodir)/calc \
+-	$(infodir)/ccmode \
+-	$(infodir)/cl \
+-	$(infodir)/dbus \
+-	$(infodir)/dired-x \
+-	$(infodir)/ebrowse \
+-	$(infodir)/ediff \
+-	$(infodir)/emacs-mime \
+-	$(infodir)/epa \
+-	$(infodir)/erc \
+-	$(infodir)/eshell \
+-	$(infodir)/eudc \
+-	$(infodir)/efaq \
+-	$(infodir)/flymake \
+-	$(infodir)/forms \
+-	$(infodir)/gnus \
+-	$(infodir)/idlwave \
+-	$(infodir)/info \
+-	$(infodir)/mairix-el \
+-	$(infodir)/message \
+-	$(infodir)/mh-e \
+-	$(infodir)/newsticker \
+-	$(infodir)/nxml-mode \
+-	$(infodir)/org \
+-	$(infodir)/pcl-cvs \
+-	$(infodir)/pgg \
+-	$(infodir)/rcirc \
+-	$(infodir)/remember \
+-	$(infodir)/reftex \
+-	$(infodir)/sasl \
+-	$(infodir)/sc \
+-	$(infodir)/ses \
+-	$(infodir)/sieve \
+-	$(infodir)/smtpmail \
+-	$(infodir)/speedbar \
+-	$(infodir)/tramp \
+-	$(infodir)/url \
+-	$(infodir)/vip \
+-	$(infodir)/viper \
+-	$(infodir)/widget \
+-	$(infodir)/woman
++	$(infodir)/efaq
+ 
+ DVI_TARGETS = \
+-	ada-mode.dvi \
+-	auth.dvi \
+-	autotype.dvi \
+-	calc.dvi \
+-	cc-mode.dvi \
+-	cl.dvi \
+-	dbus.dvi \
+-	dired-x.dvi \
+-	ebrowse.dvi \
+-	ediff.dvi \
+-	emacs-mime.dvi \
+-	epa.dvi \
+-	erc.dvi \
+-	eshell.dvi \
+-	eudc.dvi \
+-	faq.dvi \
+-	flymake.dvi \
+-	forms.dvi \
+-	gnus.dvi \
+-	idlwave.dvi \
+-	info.dvi \
+-	mairix-el.dvi \
+-	message.dvi \
+-	mh-e.dvi \
+-	newsticker.dvi \
+-	nxml-mode.dvi \
+-	org.dvi \
+-	pcl-cvs.dvi \
+-	pgg.dvi \
+-	rcirc.dvi \
+-	reftex.dvi \
+-	remember.dvi \
+-	sasl.dvi \
+-	sc.dvi \
+-	ses.dvi \
+-	sieve.dvi \
+-	smtpmail.dvi \
+-	speedbar.dvi \
+-	tramp.dvi \
+-	url.dvi \
+-	vip.dvi \
+-	viper.dvi \
+-	widget.dvi \
+-	woman.dvi
++	faq.dvi
+ 
+ 
+ TEXI2DVI = texi2dvi
+@@ -154,278 +68,12 @@
+ # In a distribution of Emacs, the Info files should be up to date.
+ 
+ ## "short" target names for convenience, to just rebuild one manual.
+-ada-mode : $(infodir)/ada-mode
+-$(infodir)/ada-mode: ada-mode.texi
+-	cd $(srcdir); $(MAKEINFO) ada-mode.texi
+-ada-mode.dvi: ada-mode.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/ada-mode.texi
+-
+-auth : $(infodir)/auth
+-$(infodir)/auth: auth.texi
+-	cd $(srcdir); $(MAKEINFO) auth.texi
+-auth.dvi: auth.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/auth.texi
+-
+-autotype : $(infodir)/autotype
+-$(infodir)/autotype: autotype.texi
+-	cd $(srcdir); $(MAKEINFO) autotype.texi
+-autotype.dvi: autotype.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/autotype.texi
+-
+-calc : $(infodir)/calc
+-$(infodir)/calc: calc.texi
+-	cd $(srcdir); $(MAKEINFO) calc.texi
+-calc.dvi: calc.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/calc.texi
+-
+-ccmode : $(infodir)/ccmode
+-$(infodir)/ccmode: cc-mode.texi
+-	cd $(srcdir); $(MAKEINFO) cc-mode.texi
+-cc-mode.dvi: cc-mode.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/cc-mode.texi
+-
+-cl : $(infodir)/cl
+-$(infodir)/cl: cl.texi
+-	cd $(srcdir); $(MAKEINFO) cl.texi
+-cl.dvi: cl.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi
+-
+-dbus : $(infodir)/dbus
+-$(infodir)/dbus: dbus.texi
+-	cd $(srcdir); $(MAKEINFO) dbus.texi
+-dbus.dvi: dbus.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/dbus.texi
+-
+-dired-x : $(infodir)/dired-x
+-$(infodir)/dired-x: dired-x.texi
+-	cd $(srcdir); $(MAKEINFO) dired-x.texi
+-dired-x.dvi: dired-x.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/dired-x.texi
+-
+-ebrowse : $(infodir)/ebrowse
+-$(infodir)/ebrowse: ebrowse.texi
+-	cd $(srcdir); $(MAKEINFO) ebrowse.texi
+-ebrowse.dvi: ebrowse.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/ebrowse.texi
+-
+-ediff : $(infodir)/ediff
+-$(infodir)/ediff: ediff.texi
+-	cd $(srcdir); $(MAKEINFO) ediff.texi
+-ediff.dvi: ediff.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/ediff.texi
+-
+-emacs-mime : $(infodir)/emacs-mime
+-$(infodir)/emacs-mime: emacs-mime.texi
+-	cd $(srcdir); $(MAKEINFO) --enable-encoding emacs-mime.texi
+-emacs-mime.dvi: emacs-mime.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-mime.texi
+-
+-epa : $(infodir)/epa
+-$(infodir)/epa: epa.texi
+-	cd $(srcdir); $(MAKEINFO) epa.texi
+-epa.dvi: epa.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/epa.texi
+-
+-erc : $(infodir)/erc
+-$(infodir)/erc: erc.texi
+-	cd $(srcdir); $(MAKEINFO) erc.texi
+-erc.dvi: erc.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/erc.texi
+-
+-eshell : $(infodir)/eshell
+-$(infodir)/eshell: eshell.texi
+-	cd $(srcdir); $(MAKEINFO) eshell.texi
+-eshell.dvi: eshell.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/eshell.texi
+-
+-eudc : $(infodir)/eudc
+-$(infodir)/eudc: eudc.texi
+-	cd $(srcdir); $(MAKEINFO) eudc.texi
+-eudc.dvi: eudc.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/eudc.texi
+-
+ efaq : $(infodir)/efaq
+ $(infodir)/efaq: faq.texi
+ 	cd $(srcdir); $(MAKEINFO) faq.texi
+ faq.dvi: faq.texi
+ 	$(ENVADD) $(TEXI2DVI) ${srcdir}/faq.texi
+ 
+-flymake : $(infodir)/flymake
+-$(infodir)/flymake: flymake.texi
+-	cd $(srcdir); $(MAKEINFO) flymake.texi
+-flymake.dvi: flymake.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/flymake.texi
+-
+-forms : $(infodir)/forms
+-$(infodir)/forms: forms.texi
+-	cd $(srcdir); $(MAKEINFO) forms.texi
+-forms.dvi: forms.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/forms.texi
+-
+-# gnus/message/emacs-mime/sieve/pgg are part of Gnus:
+-gnus : $(infodir)/gnus
+-$(infodir)/gnus: gnus.texi gnus-faq.texi
+-	cd $(srcdir); $(MAKEINFO) gnus.texi
+-gnus.dvi: gnus.texi gnus-faq.texi
+-	sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi
+-	$(ENVADD) $(TEXI2DVI) gnustmp.texi
+-	cp gnustmp.dvi $*.dvi
+-	rm gnustmp.*
+-
+-# This is produced with --no-split to avoid making files whose
+-# names clash on DOS 8+3 filesystems
+-idlwave : $(infodir)/idlwave
+-$(infodir)/idlwave: idlwave.texi
+-	cd $(srcdir); $(MAKEINFO) --no-split idlwave.texi
+-idlwave.dvi: idlwave.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/idlwave.texi
+-
+-# The following target uses an explicit -o switch to work around
+-# the @setfilename directive in info.texi, which is required for
+-# the Texinfo distribution.
+-###info : $(infodir)/info   # circular!
+-$(infodir)/info: info.texi
+-	cd $(srcdir); $(MAKEINFO) --no-split info.texi -o $@
+-info.dvi: info.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/info.texi
+-
+-mairix-el : $(infodir)/mairix-el
+-$(infodir)/mairix-el: mairix-el.texi
+-	cd $(srcdir); $(MAKEINFO) mairix-el.texi
+-mairix-el.dvi: mairix-el.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/mairix-el.texi
+-
+-message : $(infodir)/message
+-$(infodir)/message: message.texi
+-	cd $(srcdir); $(MAKEINFO) message.texi
+-message.dvi: message.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/message.texi
+-
+-mh-e : $(infodir)/mh-e
+-$(infodir)/mh-e: mh-e.texi
+-	cd $(srcdir); $(MAKEINFO) mh-e.texi
+-mh-e.dvi: mh-e.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/mh-e.texi
+-
+-newsticker : $(infodir)/newsticker
+-$(infodir)/newsticker: newsticker.texi
+-	cd $(srcdir); $(MAKEINFO) newsticker.texi
+-newsticker.dvi: newsticker.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/newsticker.texi
+-
+-nxml-mode : $(infodir)/nxml-mode
+-$(infodir)/nxml-mode: nxml-mode.texi
+-	cd $(srcdir); $(MAKEINFO) nxml-mode.texi
+-nxml-mode.dvi: nxml-mode.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/nxml-mode.texi
+-
+-org : $(infodir)/org
+-$(infodir)/org: org.texi
+-	cd $(srcdir); $(MAKEINFO) org.texi
+-org.dvi: org.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/org.texi
+-
+-pcl-cvs : $(infodir)/pcl-cvs
+-$(infodir)/pcl-cvs: pcl-cvs.texi
+-	cd $(srcdir); $(MAKEINFO) pcl-cvs.texi
+-pcl-cvs.dvi: pcl-cvs.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/pcl-cvs.texi
+-
+-pgg : $(infodir)/pgg
+-$(infodir)/pgg: pgg.texi
+-	cd $(srcdir); $(MAKEINFO) pgg.texi
+-pgg.dvi: pgg.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/pgg.texi
+-
+-rcirc : $(infodir)/rcirc
+-$(infodir)/rcirc: rcirc.texi
+-	cd $(srcdir); $(MAKEINFO) rcirc.texi
+-rcirc.dvi: rcirc.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/rcirc.texi
+-
+-reftex : $(infodir)/reftex
+-$(infodir)/reftex: reftex.texi
+-	cd $(srcdir); $(MAKEINFO) reftex.texi
+-reftex.dvi: reftex.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/reftex.texi
+-
+-remember : $(infodir)/remember
+-$(infodir)/remember: remember.texi
+-	cd $(srcdir); $(MAKEINFO) remember.texi
+-remember.dvi: remember.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/remember.texi
+-
+-sasl : $(infodir)/sasl
+-$(infodir)/sasl: sasl.texi
+-	cd $(srcdir); $(MAKEINFO) sasl.texi
+-sasl.dvi: sasl.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/sasl.texi
+-
+-sc : $(infodir)/sc
+-$(infodir)/sc: sc.texi
+-	cd $(srcdir); $(MAKEINFO) sc.texi
+-sc.dvi: sc.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/sc.texi
+-
+-ses : $(infodir)/ses
+-$(infodir)/ses: ses.texi
+-	cd $(srcdir); $(MAKEINFO) ses.texi
+-ses.dvi: ses.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/ses.texi
+-
+-sieve : $(infodir)/sieve
+-$(infodir)/sieve: sieve.texi
+-	cd $(srcdir); $(MAKEINFO) sieve.texi
+-sieve.dvi: sieve.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/sieve.texi
+-
+-smtpmail : $(infodir)/smtpmail
+-$(infodir)/smtpmail: smtpmail.texi
+-	cd $(srcdir); $(MAKEINFO) smtpmail.texi
+-smtpmail.dvi: smtpmail.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/smtpmail.texi
+-
+-speedbar : $(infodir)/speedbar
+-$(infodir)/speedbar: speedbar.texi
+-	cd $(srcdir); $(MAKEINFO) speedbar.texi
+-speedbar.dvi: speedbar.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/speedbar.texi
+-
+-tramp : $(infodir)/tramp
+-$(infodir)/tramp: tramp.texi trampver.texi
+-	cd $(srcdir); $(MAKEINFO) -D emacs tramp.texi
+-tramp.dvi: tramp.texi trampver.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/tramp.texi
+-
+-url : $(infodir)/url
+-$(infodir)/url: url.texi
+-	cd $(srcdir); $(MAKEINFO) url.texi
+-url.dvi: url.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/url.texi
+-
+-vip : $(infodir)/vip
+-$(infodir)/vip: vip.texi
+-	cd $(srcdir); $(MAKEINFO) vip.texi
+-vip.dvi: vip.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/vip.texi
+-
+-viper : $(infodir)/viper
+-$(infodir)/viper: viper.texi
+-	cd $(srcdir); $(MAKEINFO) viper.texi
+-viper.dvi: viper.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/viper.texi
+-
+-widget : $(infodir)/widget
+-$(infodir)/widget: widget.texi
+-	cd $(srcdir); $(MAKEINFO) widget.texi
+-widget.dvi: widget.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/widget.texi
+-
+-woman : $(infodir)/woman
+-$(infodir)/woman: woman.texi
+-	cd $(srcdir); $(MAKEINFO) woman.texi
+-woman.dvi: woman.texi
+-	$(ENVADD) $(TEXI2DVI) ${srcdir}/woman.texi
+ 
+ 
+ mostlyclean:
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -2952,8 +2952,8 @@
+ 	CPP_NEED_TRADITIONAL=yes)
+ 
+ AC_OUTPUT(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 \
++	doc/misc/Makefile \
++	src/Makefile.c:src/Makefile.in \
+ 	lwlib/Makefile lisp/Makefile leim/Makefile, [
+ 
+ ### Make the necessary directories, if they don't exist.
--- emacs23-23.1+1.orig/debian/patches/look-for-news-to-find-etc.diff
+++ emacs23-23.1+1/debian/patches/look-for-news-to-find-etc.diff
@@ -0,0 +1,33 @@
+* Emacs will now look for NEWS in order to find etc/ rather than GNU.
+  Patch: look-for-news-to-find-etc.diff
+  Provided-by: Sven Joachim <svenjoac@gmx.de>
+  Originally-reported-by: Bernhard Michler <Boregard@gmx.net>
+  Date: Mon, 28 Apr 2008 11:20:23 +0200
+  Added-by: Rob Browning <rlb@defaultvalue.org>
+  Status: Debian specific
+
+  Since Debian doesn't include GNU in the Debian packages (the common
+  licenses are in /usr/share/common-licenses), Emacs will now look for
+  NEWS to find the etc directory instead of GNU.
+
+Index: b/src/callproc.c
+===================================================================
+--- a/src/callproc.c
++++ b/src/callproc.c
+@@ -1521,14 +1521,14 @@
+ 
+       srcdir = Fexpand_file_name (build_string ("../src/"),
+ 				  build_string (PATH_DUMPLOADSEARCH));
+-      tem = Fexpand_file_name (build_string ("GNU"), Vdata_directory);
++      tem = Fexpand_file_name (build_string ("NEWS"), Vdata_directory);
+       tem1 = Ffile_exists_p (tem);
+       if (!NILP (Fequal (srcdir, Vinvocation_directory)) || NILP (tem1))
+ 	{
+ 	  Lisp_Object newdir;
+ 	  newdir = Fexpand_file_name (build_string ("../etc/"),
+ 				      build_string (PATH_DUMPLOADSEARCH));
+-	  tem = Fexpand_file_name (build_string ("GNU"), newdir);
++	  tem = Fexpand_file_name (build_string ("NEWS"), newdir);
+ 	  tem1 = Ffile_exists_p (tem);
+ 	  if (!NILP (tem1))
+ 	    Vdata_directory = newdir;
--- emacs23-23.1+1.orig/debian/patches/autofiles.diff
+++ emacs23-23.1+1/debian/patches/autofiles.diff
@@ -0,0 +1,32163 @@
+* The autoconf related files have been updated.
+  Patch: autofiles.dpatch
+  Author: N/A (automatically generated)
+Index: sid/configure
+===================================================================
+--- sid.orig/configure
++++ sid/configure
+@@ -1,60 +1,81 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.61 for emacs 23.1.
++# Generated by GNU Autoconf 2.64 for emacs 23.1.
+ #
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
++# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
++# Foundation, Inc.
++#
+ # This configure script is free software; the Free Software Foundation
+ # gives unlimited permission to copy, distribute and modify it.
+-## --------------------- ##
+-## M4sh Initialization.  ##
+-## --------------------- ##
++## -------------------- ##
++## M4sh Initialization. ##
++## -------------------- ##
+ 
+ # Be more Bourne compatible
+ DUALCASE=1; export DUALCASE # for MKS sh
+-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+   emulate sh
+   NULLCMD=:
+-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+   # is contrary to our usage.  Disable this feature.
+   alias -g '${1+"$@"}'='"$@"'
+   setopt NO_GLOB_SUBST
+ else
+-  case `(set -o) 2>/dev/null` in
+-  *posix*) set -o posix ;;
++  case `(set -o) 2>/dev/null` in #(
++  *posix*) :
++    set -o posix ;; #(
++  *) :
++     ;;
+ esac
+-
+ fi
+ 
+ 
+-
+-
+-# PATH needs CR
+-# Avoid depending upon Character Ranges.
+-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+-as_cr_digits='0123456789'
+-as_cr_alnum=$as_cr_Letters$as_cr_digits
+-
+-# The user is always right.
+-if test "${PATH_SEPARATOR+set}" != set; then
+-  echo "#! /bin/sh" >conf$$.sh
+-  echo  "exit 0"   >>conf$$.sh
+-  chmod +x conf$$.sh
+-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+-    PATH_SEPARATOR=';'
+-  else
+-    PATH_SEPARATOR=:
++as_nl='
++'
++export as_nl
++# Printing a long string crashes Solaris 7 /usr/bin/printf.
++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
++# Prefer a ksh shell builtin over an external printf program on Solaris,
++# but without wasting forks for bash or zsh.
++if test -z "$BASH_VERSION$ZSH_VERSION" \
++    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
++  as_echo='print -r --'
++  as_echo_n='print -rn --'
++elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
++  as_echo='printf %s\n'
++  as_echo_n='printf %s'
++else
++  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
++    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
++    as_echo_n='/usr/ucb/echo -n'
++  else
++    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
++    as_echo_n_body='eval
++      arg=$1;
++      case $arg in #(
++      *"$as_nl"*)
++	expr "X$arg" : "X\\(.*\\)$as_nl";
++	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
++      esac;
++      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
++    '
++    export as_echo_n_body
++    as_echo_n='sh -c $as_echo_n_body as_echo'
+   fi
+-  rm -f conf$$.sh
++  export as_echo_body
++  as_echo='sh -c $as_echo_body as_echo'
+ fi
+ 
+-# Support unset when possible.
+-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+-  as_unset=unset
+-else
+-  as_unset=false
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++  PATH_SEPARATOR=:
++  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
++    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
++      PATH_SEPARATOR=';'
++  }
+ fi
+ 
+ 
+@@ -63,20 +84,18 @@
+ # there to prevent editors from complaining about space-tab.
+ # (If _AS_PATH_WALK were called with IFS unset, it would disable word
+ # splitting by setting IFS to empty value.)
+-as_nl='
+-'
+ IFS=" ""	$as_nl"
+ 
+ # Find who we are.  Look in the path if we contain no directory separator.
+-case $0 in
++case $0 in #((
+   *[\\/]* ) as_myself=$0 ;;
+   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+-done
++    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++  done
+ IFS=$as_save_IFS
+ 
+      ;;
+@@ -87,354 +106,321 @@
+   as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+-  { (exit 1); exit 1; }
++  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++  exit 1
+ fi
+ 
+-# Work around bugs in pre-3.0 UWIN ksh.
+-for as_var in ENV MAIL MAILPATH
+-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++# Unset variables that we do not need and which cause bugs (e.g. in
++# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
++# suppresses any "Segmentation fault" message there.  '((' could
++# trigger a bug in pdksh 5.2.14.
++for as_var in BASH_ENV ENV MAIL MAILPATH
++do eval test x\${$as_var+set} = xset \
++  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+ done
+ PS1='$ '
+ PS2='> '
+ PS4='+ '
+ 
+ # NLS nuisances.
+-for as_var in \
+-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+-  LC_TELEPHONE LC_TIME
+-do
+-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+-    eval $as_var=C; export $as_var
+-  else
+-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+-  fi
+-done
+-
+-# Required to use basename.
+-if expr a : '\(a\)' >/dev/null 2>&1 &&
+-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+-  as_expr=expr
+-else
+-  as_expr=false
+-fi
+-
+-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+-  as_basename=basename
+-else
+-  as_basename=false
+-fi
+-
+-
+-# Name of the executable.
+-as_me=`$as_basename -- "$0" ||
+-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+-	 X"$0" : 'X\(//\)$' \| \
+-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+-echo X/"$0" |
+-    sed '/^.*\/\([^/][^/]*\)\/*$/{
+-	    s//\1/
+-	    q
+-	  }
+-	  /^X\/\(\/\/\)$/{
+-	    s//\1/
+-	    q
+-	  }
+-	  /^X\/\(\/\).*/{
+-	    s//\1/
+-	    q
+-	  }
+-	  s/.*/./; q'`
++LC_ALL=C
++export LC_ALL
++LANGUAGE=C
++export LANGUAGE
+ 
+ # CDPATH.
+-$as_unset CDPATH
+-
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+ 
+ if test "x$CONFIG_SHELL" = x; then
+-  if (eval ":") 2>/dev/null; then
+-  as_have_required=yes
++  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
++  emulate sh
++  NULLCMD=:
++  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
++  # is contrary to our usage.  Disable this feature.
++  alias -g '\${1+\"\$@\"}'='\"\$@\"'
++  setopt NO_GLOB_SUBST
+ else
+-  as_have_required=no
++  case \`(set -o) 2>/dev/null\` in #(
++  *posix*) :
++    set -o posix ;; #(
++  *) :
++     ;;
++esac
+ fi
+-
+-  if test $as_have_required = yes && 	 (eval ":
+-(as_func_return () {
+-  (exit \$1)
+-}
+-as_func_success () {
+-  as_func_return 0
+-}
+-as_func_failure () {
+-  as_func_return 1
+-}
+-as_func_ret_success () {
+-  return 0
+-}
+-as_func_ret_failure () {
+-  return 1
+-}
++"
++  as_required="as_fn_return () { (exit \$1); }
++as_fn_success () { as_fn_return 0; }
++as_fn_failure () { as_fn_return 1; }
++as_fn_ret_success () { return 0; }
++as_fn_ret_failure () { return 1; }
+ 
+ exitcode=0
+-if as_func_success; then
+-  :
+-else
+-  exitcode=1
+-  echo as_func_success failed.
+-fi
+-
+-if as_func_failure; then
+-  exitcode=1
+-  echo as_func_failure succeeded.
+-fi
+-
+-if as_func_ret_success; then
+-  :
+-else
+-  exitcode=1
+-  echo as_func_ret_success failed.
+-fi
+-
+-if as_func_ret_failure; then
+-  exitcode=1
+-  echo as_func_ret_failure succeeded.
+-fi
+-
+-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+-  :
++as_fn_success || { exitcode=1; echo as_fn_success failed.; }
++as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
++as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
++as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
++if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
++
++else
++  exitcode=1; echo positional parameters were not saved.
++fi
++test x\$exitcode = x0 || exit 1"
++  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
++  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
++  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
++  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
++test \$(( 1 + 1 )) = 2 || exit 1"
++  if (eval "$as_required") 2>/dev/null; then :
++  as_have_required=yes
+ else
+-  exitcode=1
+-  echo positional parameters were not saved.
++  as_have_required=no
+ fi
++  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+ 
+-test \$exitcode = 0) || { (exit 1); exit 1; }
+-
+-(
+-  as_lineno_1=\$LINENO
+-  as_lineno_2=\$LINENO
+-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+-") 2> /dev/null; then
+-  :
+ else
+-  as_candidate_shells=
+-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++as_found=false
+ for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  case $as_dir in
++  as_found=:
++  case $as_dir in #(
+ 	 /*)
+ 	   for as_base in sh bash ksh sh5; do
+-	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
++	     # Try only shells that exist, to save several forks.
++	     as_shell=$as_dir/$as_base
++	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
++		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
++  CONFIG_SHELL=$as_shell as_have_required=yes
++		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
++  break 2
++fi
++fi
+ 	   done;;
+        esac
++  as_found=false
+ done
++$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
++	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
++  CONFIG_SHELL=$SHELL as_have_required=yes
++fi; }
+ IFS=$as_save_IFS
+ 
+ 
+-      for as_shell in $as_candidate_shells $SHELL; do
+-	 # Try only shells that exist, to save several forks.
+-	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+-		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+-  emulate sh
+-  NULLCMD=:
+-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+-  # is contrary to our usage.  Disable this feature.
+-  alias -g '${1+"$@"}'='"$@"'
+-  setopt NO_GLOB_SUBST
+-else
+-  case `(set -o) 2>/dev/null` in
+-  *posix*) set -o posix ;;
+-esac
+-
++      if test "x$CONFIG_SHELL" != x; then :
++  # We cannot yet assume a decent shell, so we have to provide a
++	# neutralization value for shells without unset; and this also
++	# works around shells that cannot unset nonexistent variables.
++	BASH_ENV=/dev/null
++	ENV=/dev/null
++	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
++	export CONFIG_SHELL
++	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
++fi
++
++    if test x$as_have_required = xno; then :
++  $as_echo "$0: This script requires a shell more modern than all"
++  $as_echo "$0: the shells that I found on your system."
++  if test x${ZSH_VERSION+set} = xset ; then
++    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
++    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
++  else
++    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
++$0: including any error possibly output before this
++$0: message. Then install a modern shell, or manually run
++$0: the script under such a shell if you do have one."
++  fi
++  exit 1
+ fi
+-
+-
+-:
+-_ASEOF
+-}; then
+-  CONFIG_SHELL=$as_shell
+-	       as_have_required=yes
+-	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+-  emulate sh
+-  NULLCMD=:
+-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+-  # is contrary to our usage.  Disable this feature.
+-  alias -g '${1+"$@"}'='"$@"'
+-  setopt NO_GLOB_SUBST
+-else
+-  case `(set -o) 2>/dev/null` in
+-  *posix*) set -o posix ;;
+-esac
+-
+ fi
+-
+-
+-:
+-(as_func_return () {
+-  (exit $1)
+-}
+-as_func_success () {
+-  as_func_return 0
+-}
+-as_func_failure () {
+-  as_func_return 1
+-}
+-as_func_ret_success () {
+-  return 0
+-}
+-as_func_ret_failure () {
+-  return 1
+-}
+-
+-exitcode=0
+-if as_func_success; then
+-  :
+-else
+-  exitcode=1
+-  echo as_func_success failed.
+ fi
++SHELL=${CONFIG_SHELL-/bin/sh}
++export SHELL
++# Unset more variables known to interfere with behavior of common tools.
++CLICOLOR_FORCE= GREP_OPTIONS=
++unset CLICOLOR_FORCE GREP_OPTIONS
+ 
+-if as_func_failure; then
+-  exitcode=1
+-  echo as_func_failure succeeded.
+-fi
++## --------------------- ##
++## M4sh Shell Functions. ##
++## --------------------- ##
++# as_fn_unset VAR
++# ---------------
++# Portably unset VAR.
++as_fn_unset ()
++{
++  { eval $1=; unset $1;}
++}
++as_unset=as_fn_unset
++
++# as_fn_set_status STATUS
++# -----------------------
++# Set $? to STATUS, without forking.
++as_fn_set_status ()
++{
++  return $1
++} # as_fn_set_status
++
++# as_fn_exit STATUS
++# -----------------
++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
++as_fn_exit ()
++{
++  set +e
++  as_fn_set_status $1
++  exit $1
++} # as_fn_exit
++
++# as_fn_mkdir_p
++# -------------
++# Create "$as_dir" as a directory, including parents if necessary.
++as_fn_mkdir_p ()
++{
+ 
+-if as_func_ret_success; then
+-  :
+-else
+-  exitcode=1
+-  echo as_func_ret_success failed.
+-fi
++  case $as_dir in #(
++  -*) as_dir=./$as_dir;;
++  esac
++  test -d "$as_dir" || eval $as_mkdir_p || {
++    as_dirs=
++    while :; do
++      case $as_dir in #(
++      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
++      *) as_qdir=$as_dir;;
++      esac
++      as_dirs="'$as_qdir' $as_dirs"
++      as_dir=`$as_dirname -- "$as_dir" ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++	 X"$as_dir" : 'X\(//\)[^/]' \| \
++	 X"$as_dir" : 'X\(//\)$' \| \
++	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$as_dir" |
++    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++	    s//\1/
++	    q
++	  }
++	  /^X\(\/\/\)[^/].*/{
++	    s//\1/
++	    q
++	  }
++	  /^X\(\/\/\)$/{
++	    s//\1/
++	    q
++	  }
++	  /^X\(\/\).*/{
++	    s//\1/
++	    q
++	  }
++	  s/.*/./; q'`
++      test -d "$as_dir" && break
++    done
++    test -z "$as_dirs" || eval "mkdir $as_dirs"
++  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ 
+-if as_func_ret_failure; then
+-  exitcode=1
+-  echo as_func_ret_failure succeeded.
+-fi
+ 
+-if ( set x; as_func_ret_success y && test x = "$1" ); then
+-  :
++} # as_fn_mkdir_p
++# as_fn_append VAR VALUE
++# ----------------------
++# Append the text in VALUE to the end of the definition contained in VAR. Take
++# advantage of any shell optimizations that allow amortized linear growth over
++# repeated appends, instead of the typical quadratic growth present in naive
++# implementations.
++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
++  eval 'as_fn_append ()
++  {
++    eval $1+=\$2
++  }'
+ else
+-  exitcode=1
+-  echo positional parameters were not saved.
+-fi
+-
+-test $exitcode = 0) || { (exit 1); exit 1; }
+-
+-(
+-  as_lineno_1=$LINENO
+-  as_lineno_2=$LINENO
+-  test "x$as_lineno_1" != "x$as_lineno_2" &&
+-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+-
+-_ASEOF
+-}; then
+-  break
+-fi
+-
+-fi
+-
+-      done
+-
+-      if test "x$CONFIG_SHELL" != x; then
+-  for as_var in BASH_ENV ENV
+-        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+-        done
+-        export CONFIG_SHELL
+-        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+-fi
+-
+-
+-    if test $as_have_required = no; then
+-  echo This script requires a shell more modern than all the
+-      echo shells that I found on your system.  Please install a
+-      echo modern shell, or manually run the script under such a
+-      echo shell if you do have one.
+-      { (exit 1); exit 1; }
+-fi
+-
+-
+-fi
+-
+-fi
++  as_fn_append ()
++  {
++    eval $1=\$$1\$2
++  }
++fi # as_fn_append
+ 
++# as_fn_arith ARG...
++# ------------------
++# Perform arithmetic evaluation on the ARGs, and store the result in the
++# global $as_val. Take advantage of shells that can avoid forks. The arguments
++# must be portable across $(()) and expr.
++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
++  eval 'as_fn_arith ()
++  {
++    as_val=$(( $* ))
++  }'
++else
++  as_fn_arith ()
++  {
++    as_val=`expr "$@" || test $? -eq 1`
++  }
++fi # as_fn_arith
+ 
+ 
+-(eval "as_func_return () {
+-  (exit \$1)
+-}
+-as_func_success () {
+-  as_func_return 0
+-}
+-as_func_failure () {
+-  as_func_return 1
+-}
+-as_func_ret_success () {
+-  return 0
+-}
+-as_func_ret_failure () {
+-  return 1
+-}
++# as_fn_error ERROR [LINENO LOG_FD]
++# ---------------------------------
++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
++# script with status $?, using 1 if that was 0.
++as_fn_error ()
++{
++  as_status=$?; test $as_status -eq 0 && as_status=1
++  if test "$3"; then
++    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
++  fi
++  $as_echo "$as_me: error: $1" >&2
++  as_fn_exit $as_status
++} # as_fn_error
+ 
+-exitcode=0
+-if as_func_success; then
+-  :
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++   test "X`expr 00001 : '.*\(...\)'`" = X001; then
++  as_expr=expr
+ else
+-  exitcode=1
+-  echo as_func_success failed.
+-fi
+-
+-if as_func_failure; then
+-  exitcode=1
+-  echo as_func_failure succeeded.
++  as_expr=false
+ fi
+ 
+-if as_func_ret_success; then
+-  :
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
++  as_basename=basename
+ else
+-  exitcode=1
+-  echo as_func_ret_success failed.
+-fi
+-
+-if as_func_ret_failure; then
+-  exitcode=1
+-  echo as_func_ret_failure succeeded.
++  as_basename=false
+ fi
+ 
+-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+-  :
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++  as_dirname=dirname
+ else
+-  exitcode=1
+-  echo positional parameters were not saved.
++  as_dirname=false
+ fi
+ 
+-test \$exitcode = 0") || {
+-  echo No shell found that supports shell functions.
+-  echo Please tell autoconf@gnu.org about your system,
+-  echo including any error possibly output before this
+-  echo message
+-}
++as_me=`$as_basename -- "$0" ||
++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
++	 X"$0" : 'X\(//\)$' \| \
++	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X/"$0" |
++    sed '/^.*\/\([^/][^/]*\)\/*$/{
++	    s//\1/
++	    q
++	  }
++	  /^X\/\(\/\/\)$/{
++	    s//\1/
++	    q
++	  }
++	  /^X\/\(\/\).*/{
++	    s//\1/
++	    q
++	  }
++	  s/.*/./; q'`
+ 
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
+ 
+ 
+-  as_lineno_1=$LINENO
+-  as_lineno_2=$LINENO
+-  test "x$as_lineno_1" != "x$as_lineno_2" &&
+-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+-
+-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+-  # uniformly replaced by the line number.  The first 'sed' inserts a
+-  # line-number line after each line using $LINENO; the second 'sed'
+-  # does the real work.  The second script uses 'N' to pair each
+-  # line-number line with the line containing $LINENO, and appends
+-  # trailing '-' during substitution so that $LINENO is not a special
+-  # case at line end.
+-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+-  # E. McMahon (1931-1989) for sed's syntax.  :-)
++  as_lineno_1=$LINENO as_lineno_1a=$LINENO
++  as_lineno_2=$LINENO as_lineno_2a=$LINENO
++  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
++  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
++  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+   sed -n '
+     p
+     /[$]LINENO/=
+@@ -451,8 +437,7 @@
+       s/-\n.*//
+     ' >$as_me.lineno &&
+   chmod +x "$as_me.lineno" ||
+-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+-   { (exit 1); exit 1; }; }
++    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ 
+   # Don't try to exec as it changes $[0], causing all sort of problems
+   # (the dirname of $[0] is not the place where we might find the
+@@ -462,49 +447,40 @@
+   exit
+ }
+ 
+-
+-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+-  as_dirname=dirname
+-else
+-  as_dirname=false
+-fi
+-
+ ECHO_C= ECHO_N= ECHO_T=
+-case `echo -n x` in
++case `echo -n x` in #(((((
+ -n*)
+-  case `echo 'x\c'` in
++  case `echo 'xy\c'` in
+   *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+-  *)   ECHO_C='\c';;
++  xy)  ECHO_C='\c';;
++  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
++       ECHO_T='	';;
+   esac;;
+ *)
+   ECHO_N='-n';;
+ esac
+ 
+-if expr a : '\(a\)' >/dev/null 2>&1 &&
+-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+-  as_expr=expr
+-else
+-  as_expr=false
+-fi
+-
+ rm -f conf$$ conf$$.exe conf$$.file
+ if test -d conf$$.dir; then
+   rm -f conf$$.dir/conf$$.file
+ else
+   rm -f conf$$.dir
+-  mkdir conf$$.dir
++  mkdir conf$$.dir 2>/dev/null
+ fi
+-echo >conf$$.file
+-if ln -s conf$$.file conf$$ 2>/dev/null; then
+-  as_ln_s='ln -s'
+-  # ... but there are two gotchas:
+-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+-  # In both cases, we have to default to `cp -p'.
+-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
++if (echo >conf$$.file) 2>/dev/null; then
++  if ln -s conf$$.file conf$$ 2>/dev/null; then
++    as_ln_s='ln -s'
++    # ... but there are two gotchas:
++    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++    # In both cases, we have to default to `cp -p'.
++    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
++      as_ln_s='cp -p'
++  elif ln conf$$.file conf$$ 2>/dev/null; then
++    as_ln_s=ln
++  else
+     as_ln_s='cp -p'
+-elif ln conf$$.file conf$$ 2>/dev/null; then
+-  as_ln_s=ln
++  fi
+ else
+   as_ln_s='cp -p'
+ fi
+@@ -512,7 +488,7 @@
+ rmdir conf$$.dir 2>/dev/null
+ 
+ if mkdir -p . 2>/dev/null; then
+-  as_mkdir_p=:
++  as_mkdir_p='mkdir -p "$as_dir"'
+ else
+   test -d ./-p && rmdir ./-p
+   as_mkdir_p=false
+@@ -529,12 +505,12 @@
+   as_test_x='
+     eval sh -c '\''
+       if test -d "$1"; then
+-        test -d "$1/.";
++	test -d "$1/.";
+       else
+-	case $1 in
+-        -*)set "./$1";;
++	case $1 in #(
++	-*)set "./$1";;
+ 	esac;
+-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
++	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ 	???[sx]*):;;*)false;;esac;fi
+     '\'' sh
+   '
+@@ -548,7 +524,6 @@
+ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+ 
+ 
+-
+ exec 7<&0 </dev/null 6>&1
+ 
+ # Name of the host.
+@@ -567,7 +542,6 @@
+ subdirs=
+ MFLAGS=
+ MAKEFLAGS=
+-SHELL=${CONFIG_SHELL-/bin/sh}
+ 
+ # Identity of this package.
+ PACKAGE_NAME='emacs'
+@@ -575,6 +549,7 @@
+ PACKAGE_VERSION='23.1'
+ PACKAGE_STRING='emacs 23.1'
+ PACKAGE_BUGREPORT=''
++PACKAGE_URL=''
+ 
+ ac_unique_file="src/lisp.h"
+ # Factoring default headers for most tests.
+@@ -616,141 +591,178 @@
+ ac_config_libobj_dir=src
+ ac_header_list=
+ ac_func_list=
+-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
+-datarootdir
+-datadir
+-sysconfdir
+-sharedstatedir
+-localstatedir
+-includedir
+-oldincludedir
+-docdir
+-infodir
+-htmldir
+-dvidir
+-pdfdir
+-psdir
+-libdir
+-localedir
+-mandir
+-DEFS
+-ECHO_C
+-ECHO_N
+-ECHO_T
+-LIBS
++ac_subst_vars='LTLIBOBJS
++LIB_SRC_EXTRA_INSTALLABLES
++GNU_OBJC_CFLAGS
++GNUSTEP_SYSTEM_LIBRARIES
++GNUSTEP_SYSTEM_HEADERS
++GNUSTEP_MAKEFILES
++ns_appsrc
++ns_appresdir
++ns_appbindir
++ns_appdir
++opsysfile
++machfile
++X_TOOLKIT_TYPE
++C_SWITCH_X_SITE
++LD_SWITCH_X_SITE_AUX
++LD_SWITCH_X_SITE
++c_switch_machine
++c_switch_system
++gameuser
++gamedir
++bitmapdir
++archlibdir
++etcdir
++x_default_search_path
++lisppath
++locallisppath
++lispdir
++srcdir
++canonical
++configuration
++version
++GETOPTOBJS
++GETOPT_H
++GETLOADAVG_LIBS
++KMEM_GROUP
++NEED_SETGID
++LIBOBJS
++liblockfile
++ALLOCA
++FREETYPE_LIBS
++FREETYPE_CFLAGS
++M17N_FLT_LIBS
++M17N_FLT_CFLAGS
++LIBOTF_LIBS
++LIBOTF_CFLAGS
++XFT_LIBS
++XFT_CFLAGS
++FONTCONFIG_LIBS
++FONTCONFIG_CFLAGS
++DBUS_LIBS
++DBUS_CFLAGS
++GTK_LIBS
++GTK_CFLAGS
++RSVG_LIBS
++RSVG_CFLAGS
++HAVE_XSERVER
++XMKMF
++SET_MAKE
++CFLAGS_SOUND
++ALSA_LIBS
++ALSA_CFLAGS
++PKG_CONFIG
++LIBSOUND
++MAKEINFO
++GZIP_PROG
++INSTALL_INFO
++RANLIB
++INSTALL_DATA
++INSTALL_SCRIPT
++INSTALL_PROGRAM
++LN_S
++EGREP
++GREP
++CPP
++OBJEXT
++EXEEXT
++ac_ct_CC
++CPPFLAGS
++LDFLAGS
++CFLAGS
++CC
++host_os
++host_vendor
++host_cpu
++host
++build_os
++build_vendor
++build_cpu
++build
++MAINT
++target_alias
++host_alias
+ build_alias
++LIBS
++ECHO_T
++ECHO_N
++ECHO_C
++DEFS
++mandir
++localedir
++libdir
++psdir
++pdfdir
++dvidir
++htmldir
++infodir
++docdir
++oldincludedir
++includedir
++localstatedir
++sharedstatedir
++sysconfdir
++datadir
++datarootdir
++libexecdir
++sbindir
++bindir
++program_transform_name
++prefix
++exec_prefix
++PACKAGE_URL
++PACKAGE_BUGREPORT
++PACKAGE_STRING
++PACKAGE_VERSION
++PACKAGE_TARNAME
++PACKAGE_NAME
++PATH_SEPARATOR
++SHELL'
++ac_subst_files=''
++ac_user_opts='
++enable_option_checking
++with_pop
++with_kerberos
++with_kerberos5
++with_hesiod
++with_sound
++with_sync_input
++with_x_toolkit
++with_xpm
++with_jpeg
++with_tiff
++with_gif
++with_png
++with_rsvg
++with_xft
++with_libotf
++with_m17n_flt
++with_toolkit_scroll_bars
++with_xaw3d
++with_xim
++with_ns
++with_gpm
++with_dbus
++with_makeinfo
++with_gtk
++with_gcc
++with_pkg_config_prog
++with_gnustep_conf
++enable_ns_self_contained
++enable_asserts
++enable_maintainer_mode
++enable_locallisppath
++enable_largefile
++with_x
++'
++      ac_precious_vars='build_alias
+ host_alias
+ target_alias
+-MAINT
+-build
+-build_cpu
+-build_vendor
+-build_os
+-host
+-host_cpu
+-host_vendor
+-host_os
+ CC
+ CFLAGS
+ LDFLAGS
+-CPPFLAGS
+-ac_ct_CC
+-EXEEXT
+-OBJEXT
+-CPP
+-GREP
+-EGREP
+-LN_S
+-INSTALL_PROGRAM
+-INSTALL_SCRIPT
+-INSTALL_DATA
+-RANLIB
+-INSTALL_INFO
+-GZIP_PROG
+-MAKEINFO
+-LIBSOUND
+-PKG_CONFIG
+-ALSA_CFLAGS
+-ALSA_LIBS
+-CFLAGS_SOUND
+-SET_MAKE
+-XMKMF
+-HAVE_XSERVER
+-RSVG_CFLAGS
+-RSVG_LIBS
+-GTK_CFLAGS
+-GTK_LIBS
+-DBUS_CFLAGS
+-DBUS_LIBS
+-FONTCONFIG_CFLAGS
+-FONTCONFIG_LIBS
+-XFT_CFLAGS
+-XFT_LIBS
+-LIBOTF_CFLAGS
+-LIBOTF_LIBS
+-M17N_FLT_CFLAGS
+-M17N_FLT_LIBS
+-FREETYPE_CFLAGS
+-FREETYPE_LIBS
+-ALLOCA
+-liblockfile
+-LIBOBJS
+-NEED_SETGID
+-KMEM_GROUP
+-GETLOADAVG_LIBS
+-GETOPT_H
+-GETOPTOBJS
+-version
+-configuration
+-canonical
+-srcdir
+-lispdir
+-locallisppath
+-lisppath
+-x_default_search_path
+-etcdir
+-archlibdir
+-bitmapdir
+-gamedir
+-gameuser
+-c_switch_system
+-c_switch_machine
+-LD_SWITCH_X_SITE
+-LD_SWITCH_X_SITE_AUX
+-C_SWITCH_X_SITE
+-X_TOOLKIT_TYPE
+-machfile
+-opsysfile
+-ns_appdir
+-ns_appbindir
+-ns_appresdir
+-ns_appsrc
+-GNUSTEP_MAKEFILES
+-GNUSTEP_SYSTEM_HEADERS
+-GNUSTEP_SYSTEM_LIBRARIES
+-GNU_OBJC_CFLAGS
+-LIB_SRC_EXTRA_INSTALLABLES
+-LTLIBOBJS'
+-ac_subst_files=''
+-      ac_precious_vars='build_alias
+-host_alias
+-target_alias
+-CC
+-CFLAGS
+-LDFLAGS
+-LIBS
++LIBS
+ CPPFLAGS
+ CPP
+ XMKMF'
+@@ -759,6 +771,8 @@
+ # Initialize some variables set by options.
+ ac_init_help=
+ ac_init_version=false
++ac_unrecognized_opts=
++ac_unrecognized_sep=
+ # The variables have the same names as the options, with
+ # dashes changed to underlines.
+ cache_file=/dev/null
+@@ -857,13 +871,20 @@
+     datarootdir=$ac_optarg ;;
+ 
+   -disable-* | --disable-*)
+-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
++    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+     # Reject names that are not valid shell variable names.
+-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+-   { (exit 1); exit 1; }; }
+-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+-    eval enable_$ac_feature=no ;;
++    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++      as_fn_error "invalid feature name: $ac_useropt"
++    ac_useropt_orig=$ac_useropt
++    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    case $ac_user_opts in
++      *"
++"enable_$ac_useropt"
++"*) ;;
++      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
++	 ac_unrecognized_sep=', ';;
++    esac
++    eval enable_$ac_useropt=no ;;
+ 
+   -docdir | --docdir | --docdi | --doc | --do)
+     ac_prev=docdir ;;
+@@ -876,13 +897,20 @@
+     dvidir=$ac_optarg ;;
+ 
+   -enable-* | --enable-*)
+-    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
++    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+     # Reject names that are not valid shell variable names.
+-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+-   { (exit 1); exit 1; }; }
+-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+-    eval enable_$ac_feature=\$ac_optarg ;;
++    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++      as_fn_error "invalid feature name: $ac_useropt"
++    ac_useropt_orig=$ac_useropt
++    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    case $ac_user_opts in
++      *"
++"enable_$ac_useropt"
++"*) ;;
++      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
++	 ac_unrecognized_sep=', ';;
++    esac
++    eval enable_$ac_useropt=\$ac_optarg ;;
+ 
+   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+@@ -1073,22 +1101,36 @@
+     ac_init_version=: ;;
+ 
+   -with-* | --with-*)
+-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
++    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+     # Reject names that are not valid shell variable names.
+-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+-      { echo "$as_me: error: invalid package name: $ac_package" >&2
+-   { (exit 1); exit 1; }; }
+-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+-    eval with_$ac_package=\$ac_optarg ;;
++    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++      as_fn_error "invalid package name: $ac_useropt"
++    ac_useropt_orig=$ac_useropt
++    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    case $ac_user_opts in
++      *"
++"with_$ac_useropt"
++"*) ;;
++      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
++	 ac_unrecognized_sep=', ';;
++    esac
++    eval with_$ac_useropt=\$ac_optarg ;;
+ 
+   -without-* | --without-*)
+-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
++    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+     # Reject names that are not valid shell variable names.
+-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+-      { echo "$as_me: error: invalid package name: $ac_package" >&2
+-   { (exit 1); exit 1; }; }
+-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+-    eval with_$ac_package=no ;;
++    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++      as_fn_error "invalid package name: $ac_useropt"
++    ac_useropt_orig=$ac_useropt
++    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    case $ac_user_opts in
++      *"
++"with_$ac_useropt"
++"*) ;;
++      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
++	 ac_unrecognized_sep=', ';;
++    esac
++    eval with_$ac_useropt=no ;;
+ 
+   --x)
+     # Obsolete; use --with-x.
+@@ -1108,25 +1150,25 @@
+   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+     x_libraries=$ac_optarg ;;
+ 
+-  -*) { echo "$as_me: error: unrecognized option: $ac_option
+-Try \`$0 --help' for more information." >&2
+-   { (exit 1); exit 1; }; }
++  -*) as_fn_error "unrecognized option: \`$ac_option'
++Try \`$0 --help' for more information."
+     ;;
+ 
+   *=*)
+     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+     # Reject names that are not valid shell variable names.
+-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+-      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+-   { (exit 1); exit 1; }; }
++    case $ac_envvar in #(
++      '' | [0-9]* | *[!_$as_cr_alnum]* )
++      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
++    esac
+     eval $ac_envvar=\$ac_optarg
+     export $ac_envvar ;;
+ 
+   *)
+     # FIXME: should be removed in autoconf 3.0.
+-    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
++    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+-      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
++      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+     ;;
+ 
+@@ -1135,23 +1177,36 @@
+ 
+ if test -n "$ac_prev"; then
+   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+-  { echo "$as_me: error: missing argument to $ac_option" >&2
+-   { (exit 1); exit 1; }; }
++  as_fn_error "missing argument to $ac_option"
+ fi
+ 
+-# Be sure to have absolute directory names.
++if test -n "$ac_unrecognized_opts"; then
++  case $enable_option_checking in
++    no) ;;
++    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
++    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
++  esac
++fi
++
++# Check all directory arguments for consistency.
+ for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ 		datadir sysconfdir sharedstatedir localstatedir includedir \
+ 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ 		libdir localedir mandir
+ do
+   eval ac_val=\$$ac_var
++  # Remove trailing slashes.
++  case $ac_val in
++    */ )
++      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
++      eval $ac_var=\$ac_val;;
++  esac
++  # Be sure to have absolute directory names.
+   case $ac_val in
+     [\\/$]* | ?:[\\/]* )  continue;;
+     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+   esac
+-  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+-   { (exit 1); exit 1; }; }
++  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+ done
+ 
+ # There might be people who depend on the old broken behavior: `$host'
+@@ -1165,7 +1220,7 @@
+ if test "x$host_alias" != x; then
+   if test "x$build_alias" = x; then
+     cross_compiling=maybe
+-    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
++    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+     If a cross compiler is detected then cross compile mode will be used." >&2
+   elif test "x$build_alias" != "x$host_alias"; then
+     cross_compiling=yes
+@@ -1181,23 +1236,21 @@
+ ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ ac_ls_di=`ls -di .` &&
+ ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+-  { echo "$as_me: error: Working directory cannot be determined" >&2
+-   { (exit 1); exit 1; }; }
++  as_fn_error "working directory cannot be determined"
+ test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+-  { echo "$as_me: error: pwd does not report name of working directory" >&2
+-   { (exit 1); exit 1; }; }
++  as_fn_error "pwd does not report name of working directory"
+ 
+ 
+ # Find the source files, if location was not specified.
+ if test -z "$srcdir"; then
+   ac_srcdir_defaulted=yes
+   # Try the directory containing this script, then the parent directory.
+-  ac_confdir=`$as_dirname -- "$0" ||
+-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+-	 X"$0" : 'X\(//\)[^/]' \| \
+-	 X"$0" : 'X\(//\)$' \| \
+-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+-echo X"$0" |
++  ac_confdir=`$as_dirname -- "$as_myself" ||
++$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++	 X"$as_myself" : 'X\(//\)[^/]' \| \
++	 X"$as_myself" : 'X\(//\)$' \| \
++	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$as_myself" |
+     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ 	    s//\1/
+ 	    q
+@@ -1224,13 +1277,11 @@
+ fi
+ if test ! -r "$srcdir/$ac_unique_file"; then
+   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+-  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+-   { (exit 1); exit 1; }; }
++  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+ fi
+ ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ ac_abs_confdir=`(
+-	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+-   { (exit 1); exit 1; }; }
++	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ 	pwd)`
+ # When building in place, set srcdir=.
+ if test "$ac_abs_confdir" = "$ac_pwd"; then
+@@ -1278,9 +1329,9 @@
+ 
+ Installation directories:
+   --prefix=PREFIX         install architecture-independent files in PREFIX
+-			  [$ac_default_prefix]
++                          [$ac_default_prefix]
+   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+-			  [PREFIX]
++                          [PREFIX]
+ 
+ By default, \`make install' will install all the files in
+ \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+@@ -1290,25 +1341,25 @@
+ For better control, use the options below.
+ 
+ Fine tuning of the installation directories:
+-  --bindir=DIR           user executables [EPREFIX/bin]
+-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+-  --libexecdir=DIR       program executables [EPREFIX/libexec]
+-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+-  --libdir=DIR           object code libraries [EPREFIX/lib]
+-  --includedir=DIR       C header files [PREFIX/include]
+-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+-  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
+-  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
+-  --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/emacs]
+-  --htmldir=DIR          html documentation [DOCDIR]
+-  --dvidir=DIR           dvi documentation [DOCDIR]
+-  --pdfdir=DIR           pdf documentation [DOCDIR]
+-  --psdir=DIR            ps documentation [DOCDIR]
++  --bindir=DIR            user executables [EPREFIX/bin]
++  --sbindir=DIR           system admin executables [EPREFIX/sbin]
++  --libexecdir=DIR        program executables [EPREFIX/libexec]
++  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
++  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
++  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
++  --libdir=DIR            object code libraries [EPREFIX/lib]
++  --includedir=DIR        C header files [PREFIX/include]
++  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
++  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
++  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
++  --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/emacs]
++  --htmldir=DIR           html documentation [DOCDIR]
++  --dvidir=DIR            dvi documentation [DOCDIR]
++  --pdfdir=DIR            pdf documentation [DOCDIR]
++  --psdir=DIR             ps documentation [DOCDIR]
+ _ACEOF
+ 
+   cat <<\_ACEOF
+@@ -1335,6 +1386,7 @@
+   cat <<\_ACEOF
+ 
+ Optional Features:
++  --disable-option-checking  ignore unrecognized --enable/--with options
+   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+   --disable-ns-self-contained
+@@ -1399,6 +1451,7 @@
+ Use these variables to override the choices made by `configure' or to help
+ it to find libraries and programs with nonstandard names/locations.
+ 
++Report bugs to the package provider.
+ _ACEOF
+ ac_status=$?
+ fi
+@@ -1406,15 +1459,17 @@
+ if test "$ac_init_help" = "recursive"; then
+   # If there are subdirs, report their specific --help.
+   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+-    test -d "$ac_dir" || continue
++    test -d "$ac_dir" ||
++      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
++      continue
+     ac_builddir=.
+ 
+ case "$ac_dir" in
+ .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *)
+-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
++  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+   # A ".." for each directory in $ac_dir_suffix.
+-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
++  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+   case $ac_top_builddir_sub in
+   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+@@ -1450,7 +1505,7 @@
+       echo &&
+       $SHELL "$ac_srcdir/configure" --help=recursive
+     else
+-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
++      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+     fi || ac_status=$?
+     cd "$ac_pwd" || { ac_status=$?; break; }
+   done
+@@ -1460,21 +1515,551 @@
+ if $ac_init_version; then
+   cat <<\_ACEOF
+ emacs configure 23.1
+-generated by GNU Autoconf 2.61
++generated by GNU Autoconf 2.64
+ 
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
++Copyright (C) 2009 Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+ _ACEOF
+   exit
+ fi
++
++## ------------------------ ##
++## Autoconf initialization. ##
++## ------------------------ ##
++
++# ac_fn_c_try_compile LINENO
++# --------------------------
++# Try to compile conftest.$ac_ext, and return whether this succeeded.
++ac_fn_c_try_compile ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_compile") 2>conftest.err
++  ac_status=$?
++  if test -s conftest.err; then
++    grep -v '^ *+' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    mv -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && {
++	 test -z "$ac_c_werror_flag" ||
++	 test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++	ac_retval=1
++fi
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++  return $ac_retval
++
++} # ac_fn_c_try_compile
++
++# ac_fn_c_try_link LINENO
++# -----------------------
++# Try to link conftest.$ac_ext, and return whether this succeeded.
++ac_fn_c_try_link ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_link") 2>conftest.err
++  ac_status=$?
++  if test -s conftest.err; then
++    grep -v '^ *+' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    mv -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && {
++	 test -z "$ac_c_werror_flag" ||
++	 test ! -s conftest.err
++       } && test -s conftest$ac_exeext && {
++	 test "$cross_compiling" = yes ||
++	 $as_test_x conftest$ac_exeext
++       }; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++	ac_retval=1
++fi
++  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
++  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
++  # interfere with the next link command; also delete a directory that is
++  # left behind by Apple's compiler.  We do this before executing the actions.
++  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++  return $ac_retval
++
++} # ac_fn_c_try_link
++
++# ac_fn_c_try_cpp LINENO
++# ----------------------
++# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
++ac_fn_c_try_cpp ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if { { ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
++  ac_status=$?
++  if test -s conftest.err; then
++    grep -v '^ *+' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    mv -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } >/dev/null && {
++	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++	 test ! -s conftest.err
++       }; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++    ac_retval=1
++fi
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++  return $ac_retval
++
++} # ac_fn_c_try_cpp
++
++# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
++# -------------------------------------------------------
++# Tests whether HEADER exists, giving a warning if it cannot be compiled using
++# the include files in INCLUDES and setting the cache variable VAR
++# accordingly.
++ac_fn_c_check_header_mongrel ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++fi
++eval ac_res=\$$3
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++else
++  # Is the header compilable?
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
++$as_echo_n "checking $2 usability... " >&6; }
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++#include <$2>
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_header_compiler=yes
++else
++  ac_header_compiler=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
++$as_echo "$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
++$as_echo_n "checking $2 presence... " >&6; }
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <$2>
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
++  ac_header_preproc=yes
++else
++  ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
++$as_echo "$ac_header_preproc" >&6; }
++
++# So?  What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
++  yes:no: )
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
++$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
++    ;;
++  no:yes:* )
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
++$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
++$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
++$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
++$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
++    ;;
++esac
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  eval "$3=\$ac_header_compiler"
++fi
++eval ac_res=\$$3
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++fi
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++
++} # ac_fn_c_check_header_mongrel
++
++# ac_fn_c_try_run LINENO
++# ----------------------
++# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
++# that executables *can* be run.
++ac_fn_c_try_run ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if { { ac_try="$ac_link"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_link") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
++  { { case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_try") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; }; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: program exited with status $ac_status" >&5
++       $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++       ac_retval=$ac_status
++fi
++  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++  return $ac_retval
++
++} # ac_fn_c_try_run
++
++# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
++# -------------------------------------------------------
++# Tests whether HEADER exists and can be compiled using the include files in
++# INCLUDES, setting the cache variable VAR accordingly.
++ac_fn_c_check_header_compile ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++#include <$2>
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "$3=yes"
++else
++  eval "$3=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++eval ac_res=\$$3
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++
++} # ac_fn_c_check_header_compile
++
++# ac_fn_c_check_header_preproc LINENO HEADER VAR
++# ----------------------------------------------
++# Tests whether HEADER is present, setting the cache variable VAR accordingly.
++ac_fn_c_check_header_preproc ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <$2>
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
++  eval "$3=yes"
++else
++  eval "$3=no"
++fi
++rm -f conftest.err conftest.$ac_ext
++fi
++eval ac_res=\$$3
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++
++} # ac_fn_c_check_header_preproc
++
++# ac_fn_c_check_decl LINENO SYMBOL VAR
++# ------------------------------------
++# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
++ac_fn_c_check_decl ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
++$as_echo_n "checking whether $2 is declared... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++#ifndef $2
++  (void) $2;
++#endif
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "$3=yes"
++else
++  eval "$3=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++eval ac_res=\$$3
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++
++} # ac_fn_c_check_decl
++
++# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
++# ----------------------------------------------------
++# Tries to find if the field MEMBER exists in type AGGR, after including
++# INCLUDES, setting cache variable VAR accordingly.
++ac_fn_c_check_member ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
++$as_echo_n "checking for $2.$3... " >&6; }
++if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$5
++int
++main ()
++{
++static $2 ac_aggr;
++if (ac_aggr.$3)
++return 0;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "$4=yes"
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$5
++int
++main ()
++{
++static $2 ac_aggr;
++if (sizeof ac_aggr.$3)
++return 0;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "$4=yes"
++else
++  eval "$4=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++eval ac_res=\$$4
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++
++} # ac_fn_c_check_member
++
++# ac_fn_c_check_func LINENO FUNC VAR
++# ----------------------------------
++# Tests whether FUNC exists, setting the cache variable VAR accordingly
++ac_fn_c_check_func ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
++   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
++#define $2 innocuous_$2
++
++/* System header to define __stub macros and hopefully few prototypes,
++    which can conflict with char $2 (); 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 $2
++
++/* 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 $2 ();
++/* 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_$2 || defined __stub___$2
++choke me
++#endif
++
++int
++main ()
++{
++return $2 ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  eval "$3=yes"
++else
++  eval "$3=no"
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi
++eval ac_res=\$$3
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++
++} # ac_fn_c_check_func
++
++# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
++# -------------------------------------------
++# Tests whether TYPE exists after having included INCLUDES, setting cache
++# variable VAR accordingly.
++ac_fn_c_check_type ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  eval "$3=no"
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++if (sizeof ($2))
++	 return 0;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++if (sizeof (($2)))
++	    return 0;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++else
++  eval "$3=yes"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++eval ac_res=\$$3
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++
++} # ac_fn_c_check_type
+ 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 emacs $as_me 23.1, which was
+-generated by GNU Autoconf 2.61.  Invocation command line was
++generated by GNU Autoconf 2.64.  Invocation command line was
+ 
+   $ $0 $@
+ 
+@@ -1510,8 +2095,8 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  echo "PATH: $as_dir"
+-done
++    $as_echo "PATH: $as_dir"
++  done
+ IFS=$as_save_IFS
+ 
+ } >&5
+@@ -1545,12 +2130,12 @@
+     | -silent | --silent | --silen | --sile | --sil)
+       continue ;;
+     *\'*)
+-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
++      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+     esac
+     case $ac_pass in
+-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
++    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+     2)
+-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
++      as_fn_append ac_configure_args1 " '$ac_arg'"
+       if test $ac_must_keep_next = true; then
+ 	ac_must_keep_next=false # Got value, back to normal.
+       else
+@@ -1566,13 +2151,13 @@
+ 	  -* ) ac_must_keep_next=true ;;
+ 	esac
+       fi
+-      ac_configure_args="$ac_configure_args '$ac_arg'"
++      as_fn_append ac_configure_args " '$ac_arg'"
+       ;;
+     esac
+   done
+ done
+-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
++{ ac_configure_args0=; unset ac_configure_args0;}
++{ ac_configure_args1=; unset ac_configure_args1;}
+ 
+ # When interrupted or exit'd, cleanup temporary files, and complete
+ # config.log.  We remove comments because anyway the quotes in there
+@@ -1597,12 +2182,13 @@
+     case $ac_val in #(
+     *${as_nl}*)
+       case $ac_var in #(
+-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
++      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
++$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+       esac
+       case $ac_var in #(
+       _ | IFS | as_nl) ;; #(
+-      *) $as_unset $ac_var ;;
++      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
++      *) { eval $ac_var=; unset $ac_var;} ;;
+       esac ;;
+     esac
+   done
+@@ -1631,9 +2217,9 @@
+     do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+-      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+-      echo "$ac_var='\''$ac_val'\''"
++      $as_echo "$ac_var='\''$ac_val'\''"
+     done | sort
+     echo
+ 
+@@ -1648,9 +2234,9 @@
+       do
+ 	eval ac_val=\$$ac_var
+ 	case $ac_val in
+-	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ 	esac
+-	echo "$ac_var='\''$ac_val'\''"
++	$as_echo "$ac_var='\''$ac_val'\''"
+       done | sort
+       echo
+     fi
+@@ -1666,64 +2252,69 @@
+       echo
+     fi
+     test "$ac_signal" != 0 &&
+-      echo "$as_me: caught signal $ac_signal"
+-    echo "$as_me: exit $exit_status"
++      $as_echo "$as_me: caught signal $ac_signal"
++    $as_echo "$as_me: exit $exit_status"
+   } >&5
+   rm -f core *.core core.conftest.* &&
+     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+     exit $exit_status
+ ' 0
+ for ac_signal in 1 2 13 15; do
+-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
++  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+ done
+ ac_signal=0
+ 
+ # confdefs.h avoids OS command line length limits that DEFS can exceed.
+ rm -f -r conftest* confdefs.h
+ 
++$as_echo "/* confdefs.h */" > confdefs.h
++
+ # Predefined preprocessor variables.
+ 
+ cat >>confdefs.h <<_ACEOF
+ #define PACKAGE_NAME "$PACKAGE_NAME"
+ _ACEOF
+ 
+-
+ cat >>confdefs.h <<_ACEOF
+ #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+ _ACEOF
+ 
+-
+ cat >>confdefs.h <<_ACEOF
+ #define PACKAGE_VERSION "$PACKAGE_VERSION"
+ _ACEOF
+ 
+-
+ cat >>confdefs.h <<_ACEOF
+ #define PACKAGE_STRING "$PACKAGE_STRING"
+ _ACEOF
+ 
+-
+ cat >>confdefs.h <<_ACEOF
+ #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+ _ACEOF
+ 
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_URL "$PACKAGE_URL"
++_ACEOF
++
+ 
+ # Let the site file select an alternate cache file if it wants to.
+-# Prefer explicitly selected file to automatically selected ones.
++# Prefer an explicitly selected file to automatically selected ones.
++ac_site_file1=NONE
++ac_site_file2=NONE
+ if test -n "$CONFIG_SITE"; then
+-  set x "$CONFIG_SITE"
++  ac_site_file1=$CONFIG_SITE
+ elif test "x$prefix" != xNONE; then
+-  set x "$prefix/share/config.site" "$prefix/etc/config.site"
++  ac_site_file1=$prefix/share/config.site
++  ac_site_file2=$prefix/etc/config.site
+ else
+-  set x "$ac_default_prefix/share/config.site" \
+-	"$ac_default_prefix/etc/config.site"
++  ac_site_file1=$ac_default_prefix/share/config.site
++  ac_site_file2=$ac_default_prefix/etc/config.site
+ fi
+-shift
+-for ac_site_file
++for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+ do
++  test "x$ac_site_file" = xNONE && continue
+   if test -r "$ac_site_file"; then
+-    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+-echo "$as_me: loading site script $ac_site_file" >&6;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
++$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+     sed 's/^/| /' "$ac_site_file" >&5
+     . "$ac_site_file"
+   fi
+@@ -1733,22 +2324,22 @@
+   # Some versions of bash will fail to source /dev/null (special
+   # files actually), so we avoid doing that.
+   if test -f "$cache_file"; then
+-    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+-echo "$as_me: loading cache $cache_file" >&6;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
++$as_echo "$as_me: loading cache $cache_file" >&6;}
+     case $cache_file in
+       [\\/]* | ?:[\\/]* ) . "$cache_file";;
+       *)                      . "./$cache_file";;
+     esac
+   fi
+ else
+-  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+-echo "$as_me: creating cache $cache_file" >&6;}
++  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
++$as_echo "$as_me: creating cache $cache_file" >&6;}
+   >$cache_file
+ fi
+ 
+-ac_header_list="$ac_header_list sys/time.h"
+-ac_header_list="$ac_header_list unistd.h"
+-ac_func_list="$ac_func_list alarm"
++as_fn_append ac_header_list " sys/time.h"
++as_fn_append ac_header_list " unistd.h"
++as_fn_append ac_func_list " alarm"
+ # Check that the precious variables saved in the cache have kept the same
+ # value.
+ ac_cache_corrupted=false
+@@ -1759,68 +2350,56 @@
+   eval ac_new_val=\$ac_env_${ac_var}_value
+   case $ac_old_set,$ac_new_set in
+     set,)
+-      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
++      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
++$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+       ac_cache_corrupted=: ;;
+     ,set)
+-      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
++      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
++$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+       ac_cache_corrupted=: ;;
+     ,);;
+     *)
+       if test "x$ac_old_val" != "x$ac_new_val"; then
+-	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+-	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+-echo "$as_me:   former value:  $ac_old_val" >&2;}
+-	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+-echo "$as_me:   current value: $ac_new_val" >&2;}
+-	ac_cache_corrupted=:
++	# differences in whitespace do not lead to failure.
++	ac_old_val_w=`echo x $ac_old_val`
++	ac_new_val_w=`echo x $ac_new_val`
++	if test "$ac_old_val_w" != "$ac_new_val_w"; then
++	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
++$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
++	  ac_cache_corrupted=:
++	else
++	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
++$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
++	  eval $ac_var=\$ac_old_val
++	fi
++	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
++$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
++	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
++$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+       fi;;
+   esac
+   # Pass precious variables to config.status.
+   if test "$ac_new_set" = set; then
+     case $ac_new_val in
+-    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
++    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+     *) ac_arg=$ac_var=$ac_new_val ;;
+     esac
+     case " $ac_configure_args " in
+       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
++      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+     esac
+   fi
+ done
+ if $ac_cache_corrupted; then
+-  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+-  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
++  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
++$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
++  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
++fi
++## -------------------- ##
++## Main body of script. ##
++## -------------------- ##
+ 
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+@@ -1838,13 +2417,10 @@
+ # Use a double $ so make ignores it.
+ test "$program_suffix" != NONE &&
+   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+-# Double any \ or $.  echo might interpret backslashes.
++# Double any \ or $.
+ # By default was `s,x,x', remove it if useless.
+-cat <<\_ACEOF >conftest.sed
+-s/[\\$]/&&/g;s/;s,x,x,$//
+-_ACEOF
+-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+-rm -f conftest.sed
++ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
++program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+ 
+ 
+ lispdir='${datadir}/emacs/${version}/lisp'
+@@ -1862,39 +2438,33 @@
+ 
+ 
+ # Check whether --with-pop was given.
+-if test "${with_pop+set}" = set; then
++if test "${with_pop+set}" = set; then :
+   withval=$with_pop;
+ else
+      with_pop=yes
+ fi
+ 
+ if test "$with_pop" = yes; then
+-   cat >>confdefs.h <<\_ACEOF
+-#define MAIL_USE_POP 1
+-_ACEOF
++   $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
+ 
+ fi
+ 
+ 
+-
+ # Check whether --with-kerberos was given.
+-if test "${with_kerberos+set}" = set; then
++if test "${with_kerberos+set}" = set; then :
+   withval=$with_kerberos;
+ else
+       with_kerberos=no
+ fi
+ 
+ if test "$with_kerberos" != no; then
+-   cat >>confdefs.h <<\_ACEOF
+-#define KERBEROS 1
+-_ACEOF
++   $as_echo "#define KERBEROS 1" >>confdefs.h
+ 
+ fi
+ 
+ 
+-
+ # Check whether --with-kerberos5 was given.
+-if test "${with_kerberos5+set}" = set; then
++if test "${with_kerberos5+set}" = set; then :
+   withval=$with_kerberos5;
+ else
+       with_kerberos5=no
+@@ -1903,21 +2473,17 @@
+ if test "${with_kerberos5}" != no; then
+   if test "${with_kerberos}" = no; then
+     with_kerberos=yes
+-    cat >>confdefs.h <<\_ACEOF
+-#define KERBEROS 1
+-_ACEOF
++    $as_echo "#define KERBEROS 1" >>confdefs.h
+ 
+   fi
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define KERBEROS5 1
+-_ACEOF
++$as_echo "#define KERBEROS5 1" >>confdefs.h
+ 
+ fi
+ 
+ 
+ # Check whether --with-hesiod was given.
+-if test "${with_hesiod+set}" = set; then
++if test "${with_hesiod+set}" = set; then :
+   withval=$with_hesiod;
+ else
+       with_hesiod=no
+@@ -1925,15 +2491,13 @@
+ 
+ if test "$with_hesiod" != no; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HESIOD 1
+-_ACEOF
++$as_echo "#define HESIOD 1" >>confdefs.h
+ 
+ fi
+ 
+ 
+ # Check whether --with-sound was given.
+-if test "${with_sound+set}" = set; then
++if test "${with_sound+set}" = set; then :
+   withval=$with_sound;
+ else
+      with_sound=yes
+@@ -1942,7 +2506,7 @@
+ 
+ 
+ # Check whether --with-sync-input was given.
+-if test "${with_sync_input+set}" = set; then
++if test "${with_sync_input+set}" = set; then :
+   withval=$with_sync_input;
+ else
+      with_sync_input=yes
+@@ -1950,15 +2514,13 @@
+ 
+ if test "$with_sync_input" = yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define SYNC_INPUT 1
+-_ACEOF
++$as_echo "#define SYNC_INPUT 1" >>confdefs.h
+ 
+ fi
+ 
+ 
+ # Check whether --with-x-toolkit was given.
+-if test "${with_x_toolkit+set}" = set; then
++if test "${with_x_toolkit+set}" = set; then :
+   withval=$with_x_toolkit; 	  case "${withval}" in
+ 	    y | ye | yes )	val=gtk ;;
+ 	    n | no )		val=no  ;;
+@@ -1967,13 +2529,9 @@
+ 	    m | mo | mot | moti | motif )	val=motif ;;
+ 	    g | gt | gtk  )	val=gtk ;;
+ 	    * )
+-{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
+-this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
+-\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
+-echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
++as_fn_error "\`--with-x-toolkit=$withval' is invalid;
+ this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
+-\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
+-   { (exit 1); exit 1; }; }
++\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
+ 	    ;;
+ 	  esac
+ 	  with_x_toolkit=$val
+@@ -1983,7 +2541,7 @@
+ 
+ 
+ # Check whether --with-xpm was given.
+-if test "${with_xpm+set}" = set; then
++if test "${with_xpm+set}" = set; then :
+   withval=$with_xpm;
+ else
+      with_xpm=yes
+@@ -1991,7 +2549,7 @@
+ 
+ 
+ # Check whether --with-jpeg was given.
+-if test "${with_jpeg+set}" = set; then
++if test "${with_jpeg+set}" = set; then :
+   withval=$with_jpeg;
+ else
+      with_jpeg=yes
+@@ -1999,7 +2557,7 @@
+ 
+ 
+ # Check whether --with-tiff was given.
+-if test "${with_tiff+set}" = set; then
++if test "${with_tiff+set}" = set; then :
+   withval=$with_tiff;
+ else
+      with_tiff=yes
+@@ -2007,7 +2565,7 @@
+ 
+ 
+ # Check whether --with-gif was given.
+-if test "${with_gif+set}" = set; then
++if test "${with_gif+set}" = set; then :
+   withval=$with_gif;
+ else
+      with_gif=yes
+@@ -2015,7 +2573,7 @@
+ 
+ 
+ # Check whether --with-png was given.
+-if test "${with_png+set}" = set; then
++if test "${with_png+set}" = set; then :
+   withval=$with_png;
+ else
+      with_png=yes
+@@ -2023,7 +2581,7 @@
+ 
+ 
+ # Check whether --with-rsvg was given.
+-if test "${with_rsvg+set}" = set; then
++if test "${with_rsvg+set}" = set; then :
+   withval=$with_rsvg;
+ else
+      with_rsvg=yes
+@@ -2032,7 +2590,7 @@
+ 
+ 
+ # Check whether --with-xft was given.
+-if test "${with_xft+set}" = set; then
++if test "${with_xft+set}" = set; then :
+   withval=$with_xft;
+ else
+      with_xft=yes
+@@ -2040,7 +2598,7 @@
+ 
+ 
+ # Check whether --with-libotf was given.
+-if test "${with_libotf+set}" = set; then
++if test "${with_libotf+set}" = set; then :
+   withval=$with_libotf;
+ else
+      with_libotf=yes
+@@ -2048,7 +2606,7 @@
+ 
+ 
+ # Check whether --with-m17n-flt was given.
+-if test "${with_m17n_flt+set}" = set; then
++if test "${with_m17n_flt+set}" = set; then :
+   withval=$with_m17n_flt;
+ else
+      with_m17n_flt=yes
+@@ -2057,7 +2615,7 @@
+ 
+ 
+ # Check whether --with-toolkit-scroll-bars was given.
+-if test "${with_toolkit_scroll_bars+set}" = set; then
++if test "${with_toolkit_scroll_bars+set}" = set; then :
+   withval=$with_toolkit_scroll_bars;
+ else
+      with_toolkit_scroll_bars=yes
+@@ -2065,7 +2623,7 @@
+ 
+ 
+ # Check whether --with-xaw3d was given.
+-if test "${with_xaw3d+set}" = set; then
++if test "${with_xaw3d+set}" = set; then :
+   withval=$with_xaw3d;
+ else
+      with_xaw3d=yes
+@@ -2073,7 +2631,7 @@
+ 
+ 
+ # Check whether --with-xim was given.
+-if test "${with_xim+set}" = set; then
++if test "${with_xim+set}" = set; then :
+   withval=$with_xim;
+ else
+      with_xim=yes
+@@ -2081,7 +2639,7 @@
+ 
+ 
+ # Check whether --with-ns was given.
+-if test "${with_ns+set}" = set; then
++if test "${with_ns+set}" = set; then :
+   withval=$with_ns;
+ else
+       with_ns=no
+@@ -2090,7 +2648,7 @@
+ 
+ 
+ # Check whether --with-gpm was given.
+-if test "${with_gpm+set}" = set; then
++if test "${with_gpm+set}" = set; then :
+   withval=$with_gpm;
+ else
+      with_gpm=yes
+@@ -2098,7 +2656,7 @@
+ 
+ 
+ # Check whether --with-dbus was given.
+-if test "${with_dbus+set}" = set; then
++if test "${with_dbus+set}" = set; then :
+   withval=$with_dbus;
+ else
+      with_dbus=yes
+@@ -2109,7 +2667,7 @@
+ ## a suitable makeinfo, and can live without the manuals.
+ 
+ # Check whether --with-makeinfo was given.
+-if test "${with_makeinfo+set}" = set; then
++if test "${with_makeinfo+set}" = set; then :
+   withval=$with_makeinfo;
+ else
+      with_makeinfo=yes
+@@ -2118,29 +2676,23 @@
+ 
+ 
+ # Check whether --with-gtk was given.
+-if test "${with_gtk+set}" = set; then
+-  withval=$with_gtk; { { echo "$as_me:$LINENO: error: --with-gtk has been removed.  Use --with-x-toolkit to
+-specify a toolkit." >&5
+-echo "$as_me: error: --with-gtk has been removed.  Use --with-x-toolkit to
+-specify a toolkit." >&2;}
+-   { (exit 1); exit 1; }; }
++if test "${with_gtk+set}" = set; then :
++  withval=$with_gtk; as_fn_error "--with-gtk has been removed.  Use --with-x-toolkit to
++specify a toolkit." "$LINENO" 5
+ fi
+ 
+ 
+ 
+ # Check whether --with-gcc was given.
+-if test "${with_gcc+set}" = set; then
+-  withval=$with_gcc; { { echo "$as_me:$LINENO: error: --with-gcc has been removed.  Set the \`CC' environment
+-variable to specify a compiler." >&5
+-echo "$as_me: error: --with-gcc has been removed.  Set the \`CC' environment
+-variable to specify a compiler." >&2;}
+-   { (exit 1); exit 1; }; }
++if test "${with_gcc+set}" = set; then :
++  withval=$with_gcc; as_fn_error "--with-gcc has been removed.  Set the \`CC' environment
++variable to specify a compiler." "$LINENO" 5
+ fi
+ 
+ 
+ 
+ # Check whether --with-pkg-config-prog was given.
+-if test "${with_pkg_config_prog+set}" = set; then
++if test "${with_pkg_config_prog+set}" = set; then :
+   withval=$with_pkg_config_prog;
+ fi
+ 
+@@ -2152,7 +2704,7 @@
+ 
+ 
+ # Check whether --with-gnustep-conf was given.
+-if test "${with_gnustep_conf+set}" = set; then
++if test "${with_gnustep_conf+set}" = set; then :
+   withval=$with_gnustep_conf;
+ fi
+ 
+@@ -2162,7 +2714,7 @@
+      GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
+ 
+ # Check whether --enable-ns-self-contained was given.
+-if test "${enable_ns_self_contained+set}" = set; then
++if test "${enable_ns_self_contained+set}" = set; then :
+   enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
+ else
+   EN_NS_SELF_CONTAINED=yes
+@@ -2170,7 +2722,7 @@
+ 
+ 
+ # Check whether --enable-asserts was given.
+-if test "${enable_asserts+set}" = set; then
++if test "${enable_asserts+set}" = set; then :
+   enableval=$enable_asserts; USE_XASSERTS=$enableval
+ else
+   USE_XASSERTS=no
+@@ -2178,7 +2730,7 @@
+ 
+ 
+ # Check whether --enable-maintainer-mode was given.
+-if test "${enable_maintainer_mode+set}" = set; then
++if test "${enable_maintainer_mode+set}" = set; then :
+   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+ else
+   USE_MAINTAINER_MODE=no
+@@ -2192,7 +2744,7 @@
+ 
+ 
+ # Check whether --enable-locallisppath was given.
+-if test "${enable_locallisppath+set}" = set; then
++if test "${enable_locallisppath+set}" = set; then :
+   enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
+   locallisppath=
+ elif test "${enableval}" != "yes"; then
+@@ -2228,13 +2780,13 @@
+ #### Check if the source directory already has a configured system in it.
+ if test `pwd` != `(cd ${srcdir} && pwd)` \
+    && test -f "${srcdir}/src/config.h" ; then
+-  { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used
+    as a build directory right now; it has been configured in its own
+    right.  To configure in another directory as well, you MUST
+    use GNU make.  If you do not have GNU make, then you must
+    now do \`make distclean' in ${srcdir},
+    and then run $0 again." >&5
+-echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
++$as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
+    as a build directory right now; it has been configured in its own
+    right.  To configure in another directory as well, you MUST
+    use GNU make.  If you do not have GNU make, then you must
+@@ -2249,24 +2801,16 @@
+ 
+ ac_aux_dir=
+ 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"
+-    break
+-  elif test -f "$ac_dir/install.sh"; then
+-    ac_aux_dir=$ac_dir
+-    ac_install_sh="$ac_aux_dir/install.sh -c"
+-    break
+-  elif test -f "$ac_dir/shtool"; then
+-    ac_aux_dir=$ac_dir
+-    ac_install_sh="$ac_aux_dir/shtool install -c"
+-    break
+-  fi
++  for ac_t in install-sh install.sh shtool; do
++    if test -f "$ac_dir/$ac_t"; then
++      ac_aux_dir=$ac_dir
++      ac_install_sh="$ac_aux_dir/$ac_t -c"
++      break 2
++    fi
++  done
+ done
+ if test -z "$ac_aux_dir"; then
+-  { { 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; }; }
++  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+ fi
+ 
+ # These three variables are undocumented and unsupported,
+@@ -2280,35 +2824,27 @@
+ 
+ # Make sure we can run config.sub.
+ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+-   { (exit 1); exit 1; }; }
+-
+-{ echo "$as_me:$LINENO: checking build system type" >&5
+-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+-if test "${ac_cv_build+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
++$as_echo_n "checking build system type... " >&6; }
++if test "${ac_cv_build+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_build_alias=$build_alias
+ test "x$ac_build_alias" = x &&
+   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+ test "x$ac_build_alias" = x &&
+-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ 
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+-echo "${ECHO_T}$ac_cv_build" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
++$as_echo "$ac_cv_build" >&6; }
+ case $ac_cv_build in
+ *-*-*) ;;
+-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+-echo "$as_me: error: invalid value of canonical build" >&2;}
+-   { (exit 1); exit 1; }; };;
++*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+ esac
+ build=$ac_cv_build
+ ac_save_IFS=$IFS; IFS='-'
+@@ -2324,28 +2860,24 @@
+ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+ 
+ 
+-{ echo "$as_me:$LINENO: checking host system type" >&5
+-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+-if test "${ac_cv_host+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
++$as_echo_n "checking host system type... " >&6; }
++if test "${ac_cv_host+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test "x$host_alias" = x; then
+   ac_cv_host=$ac_cv_build
+ else
+   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ fi
+ 
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+-echo "${ECHO_T}$ac_cv_host" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
++$as_echo "$ac_cv_host" >&6; }
+ case $ac_cv_host in
+ *-*-*) ;;
+-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+-echo "$as_me: error: invalid value of canonical host" >&2;}
+-   { (exit 1); exit 1; }; };;
++*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+ esac
+ host=$ac_cv_host
+ ac_save_IFS=$IFS; IFS='-'
+@@ -2425,9 +2957,7 @@
+     opsys=netbsd
+     if test -f /usr/lib/crti.o; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_CRTIN
+-_ACEOF
++$as_echo "#define HAVE_CRTIN /**/" >>confdefs.h
+ 
+    fi
+ 
+@@ -2701,11 +3231,8 @@
+ 
+ 
+ if test $unported = yes; then
+-  { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
+-Check \`etc/MACHINES' for recognized configuration names." >&5
+-echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
+-Check \`etc/MACHINES' for recognized configuration names." >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
++Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
+ fi
+ 
+ machfile="m/${machine}.h"
+@@ -2726,10 +3253,10 @@
+ if test -n "$ac_tool_prefix"; then
+   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}gcc; 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_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$CC"; then
+   ac_cv_prog_CC="$CC" # Let the user override the test.
+@@ -2739,25 +3266,25 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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_CC="${ac_tool_prefix}gcc"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+-  { echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+@@ -2766,10 +3293,10 @@
+   ac_ct_CC=$CC
+   # Extract the first word of "gcc", so it can be a program name with args.
+ set dummy gcc; 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_ac_ct_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$ac_ct_CC"; then
+   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+@@ -2779,25 +3306,25 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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_ac_ct_CC="gcc"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+ fi
+ fi
+ ac_ct_CC=$ac_cv_prog_ac_ct_CC
+ if test -n "$ac_ct_CC"; then
+-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+-echo "${ECHO_T}$ac_ct_CC" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
++$as_echo "$ac_ct_CC" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+   if test "x$ac_ct_CC" = x; then
+@@ -2805,12 +3332,8 @@
+   else
+     case $cross_compiling:$ac_tool_warned in
+ yes:)
+-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+-whose name does not start with the host triplet.  If you think this
+-configuration is useful to you, please write to autoconf@gnu.org." >&5
+-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+-whose name does not start with the host triplet.  If you think this
+-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     CC=$ac_ct_CC
+@@ -2823,10 +3346,10 @@
+           if test -n "$ac_tool_prefix"; then
+     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}cc; 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_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$CC"; then
+   ac_cv_prog_CC="$CC" # Let the user override the test.
+@@ -2836,25 +3359,25 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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_CC="${ac_tool_prefix}cc"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+-  { echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+@@ -2863,10 +3386,10 @@
+ if test -z "$CC"; then
+   # Extract the first word of "cc", so it can be a program name with args.
+ set dummy cc; 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_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$CC"; then
+   ac_cv_prog_CC="$CC" # Let the user override the test.
+@@ -2877,18 +3400,18 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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
+     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+        continue
+      fi
+     ac_cv_prog_CC="cc"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+ if test $ac_prog_rejected = yes; then
+@@ -2907,11 +3430,11 @@
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+-  { echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+@@ -2922,10 +3445,10 @@
+   do
+     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+ set dummy $ac_tool_prefix$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_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$CC"; then
+   ac_cv_prog_CC="$CC" # Let the user override the test.
+@@ -2935,25 +3458,25 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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_CC="$ac_tool_prefix$ac_prog"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+-  { echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+@@ -2966,10 +3489,10 @@
+ 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_ac_ct_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$ac_ct_CC"; then
+   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+@@ -2979,25 +3502,25 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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_ac_ct_CC="$ac_prog"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+ fi
+ fi
+ ac_ct_CC=$ac_cv_prog_ac_ct_CC
+ if test -n "$ac_ct_CC"; then
+-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+-echo "${ECHO_T}$ac_ct_CC" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
++$as_echo "$ac_ct_CC" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+@@ -3009,12 +3532,8 @@
+   else
+     case $cross_compiling:$ac_tool_warned in
+ yes:)
+-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+-whose name does not start with the host triplet.  If you think this
+-configuration is useful to you, please write to autoconf@gnu.org." >&5
+-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+-whose name does not start with the host triplet.  If you think this
+-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     CC=$ac_ct_CC
+@@ -3024,98 +3543,82 @@
+ fi
+ 
+ 
+-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: no acceptable C compiler found in \$PATH
+-See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }
++test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "no acceptable C compiler found in \$PATH
++See \`config.log' for more details." "$LINENO" 5; }
+ 
+ # Provide some information about the compiler.
+-echo "$as_me:$LINENO: checking for C compiler version" >&5
+-ac_compiler=`set X $ac_compile; echo $2`
+-{ (ac_try="$ac_compiler --version >&5"
+-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_compiler --version >&5") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }
+-{ (ac_try="$ac_compiler -v >&5"
+-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_compiler -v >&5") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }
+-{ (ac_try="$ac_compiler -V >&5"
++$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
++set X $ac_compile
++ac_compiler=$2
++for ac_option in --version -v -V -qversion; do
++  { { ac_try="$ac_compiler $ac_option >&5"
+ 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_compiler -V >&5") 2>&5
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+   ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }
++  if test -s conftest.err; then
++    sed '10a\
++... rest of stderr output deleted ...
++         10q' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    rm -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }
++done
+ 
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-
++#include <stdio.h>
+ int
+ main ()
+ {
++FILE *f = fopen ("conftest.out", "w");
++ return ferror (f) || fclose (f) != 0;
+ 
+   ;
+   return 0;
+ }
+ _ACEOF
+ ac_clean_files_save=$ac_clean_files
+-ac_clean_files="$ac_clean_files a.out a.exe b.out"
++ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+ # Try to create an executable without -o first, disregard a.out.
+ # It will help us diagnose broken compilers, and finding out an intuition
+ # of exeext.
+-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
+-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+-#
+-# List of possible output files, starting from the most likely.
+-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+-# only as a last resort.  b.out is created by i960 compilers.
+-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+-#
+-# The IRIX 6 linker writes into existing files which may not be
+-# executable, retaining their permissions.  Remove them first so a
+-# subsequent execution test works.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
++$as_echo_n "checking for C compiler default output file name... " >&6; }
++ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
++
++# The possible output files:
++ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
++
+ ac_rmfiles=
+ for ac_file in $ac_files
+ do
+   case $ac_file in
+-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+   esac
+ done
+ rm -f $ac_rmfiles
+ 
+-if { (ac_try="$ac_link_default"
++if { { ac_try="$ac_link_default"
+ 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_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
+   (eval "$ac_link_default") 2>&5
+   ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; then
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then :
+   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+ # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+ # in a Makefile.  We should not override ac_cv_exeext if it was cached,
+@@ -3125,14 +3628,14 @@
+ do
+   test -f "$ac_file" || continue
+   case $ac_file in
+-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ 	;;
+     [ab].out )
+ 	# We found the default executable, but exeext='' is most
+ 	# certainly right.
+ 	break;;
+     *.* )
+-        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
++	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ 	then :; else
+ 	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ 	fi
+@@ -3151,78 +3654,75 @@
+ else
+   ac_file=''
+ fi
+-
+-{ echo "$as_me:$LINENO: result: $ac_file" >&5
+-echo "${ECHO_T}$ac_file" >&6; }
+-if test -z "$ac_file"; then
+-  echo "$as_me: failed program was:" >&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
++$as_echo "$ac_file" >&6; }
++if test -z "$ac_file"; then :
++  $as_echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: C compiler cannot create executables
+-See \`config.log' for more details." >&2;}
+-   { (exit 77); exit 77; }; }
++{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ as_fn_set_status 77
++as_fn_error "C compiler cannot create executables
++See \`config.log' for more details." "$LINENO" 5; }; }
+ fi
+-
+ ac_exeext=$ac_cv_exeext
+ 
+ # Check that the compiler produces executables we can run.  If not, either
+ # the compiler is broken, or we cross compile.
+-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
++$as_echo_n "checking whether the C compiler works... " >&6; }
+ # If not cross compiling, check that we can run a simple program.
+ if test "$cross_compiling" != yes; then
+   if { ac_try='./$ac_file'
+-  { (case "(($ac_try" in
++  { { 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_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
+   (eval "$ac_try") 2>&5
+   ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; }; then
+     cross_compiling=no
+   else
+     if test "$cross_compiling" = maybe; then
+ 	cross_compiling=yes
+     else
+-	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
++	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "cannot run C compiled programs.
+ If you meant to cross compile, use \`--host'.
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot run C compiled programs.
+-If you meant to cross compile, use \`--host'.
+-See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }
++See \`config.log' for more details." "$LINENO" 5; }
+     fi
+   fi
+ fi
+-{ echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ 
+-rm -f a.out a.exe conftest$ac_cv_exeext b.out
++rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+ ac_clean_files=$ac_clean_files_save
+ # Check that the compiler produces executables we can run.  If not, either
+ # the compiler is broken, or we cross compile.
+-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+-echo "${ECHO_T}$cross_compiling" >&6; }
+-
+-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+-if { (ac_try="$ac_link"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
++$as_echo_n "checking whether we are cross compiling... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
++$as_echo "$cross_compiling" >&6; }
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
++$as_echo_n "checking for suffix of executables... " >&6; }
++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_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
+   (eval "$ac_link") 2>&5
+   ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; then
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then :
+   # If both `conftest.exe' and `conftest' are `present' (well, observable)
+ # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+ # work properly (i.e., refer to `conftest.exe'), while it won't with
+@@ -3230,37 +3730,31 @@
+ for ac_file in conftest.exe conftest conftest.*; do
+   test -f "$ac_file" || continue
+   case $ac_file in
+-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ 	  break;;
+     * ) break;;
+   esac
+ done
+ else
+-  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+-See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "cannot compute suffix of executables: cannot compile and link
++See \`config.log' for more details." "$LINENO" 5; }
+ fi
+-
+ rm -f conftest$ac_cv_exeext
+-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+-echo "${ECHO_T}$ac_cv_exeext" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
++$as_echo "$ac_cv_exeext" >&6; }
+ 
+ rm -f conftest.$ac_ext
+ EXEEXT=$ac_cv_exeext
+ ac_exeext=$EXEEXT
+-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+-if test "${ac_cv_objext+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
++$as_echo_n "checking for suffix of object files... " >&6; }
++if test "${ac_cv_objext+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -3272,51 +3766,46 @@
+ }
+ _ACEOF
+ rm -f conftest.o conftest.obj
+-if { (ac_try="$ac_compile"
++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_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
+   (eval "$ac_compile") 2>&5
+   ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; then
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then :
+   for ac_file in conftest.o conftest.obj conftest.*; do
+   test -f "$ac_file" || continue;
+   case $ac_file in
+-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+        break;;
+   esac
+ done
+ else
+-  echo "$as_me: failed program was:" >&5
++  $as_echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot compute suffix of object files: cannot compile
+-See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }
++{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "cannot compute suffix of object files: cannot compile
++See \`config.log' for more details." "$LINENO" 5; }
+ fi
+-
+ rm -f conftest.$ac_cv_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+-echo "${ECHO_T}$ac_cv_objext" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
++$as_echo "$ac_cv_objext" >&6; }
+ OBJEXT=$ac_cv_objext
+ ac_objext=$OBJEXT
+-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+-if test "${ac_cv_c_compiler_gnu+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
++$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
++if test "${ac_cv_c_compiler_gnu+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -3330,54 +3819,34 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_compiler_gnu=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_compiler_gnu=no
++  ac_compiler_gnu=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_c_compiler_gnu=$ac_compiler_gnu
+ 
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+-GCC=`test $ac_compiler_gnu = yes && echo yes`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
++$as_echo "$ac_cv_c_compiler_gnu" >&6; }
++if test $ac_compiler_gnu = yes; then
++  GCC=yes
++else
++  GCC=
++fi
+ ac_test_CFLAGS=${CFLAGS+set}
+ ac_save_CFLAGS=$CFLAGS
+-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+-if test "${ac_cv_prog_cc_g+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
++$as_echo_n "checking whether $CC accepts -g... " >&6; }
++if test "${ac_cv_prog_cc_g+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_save_c_werror_flag=$ac_c_werror_flag
+    ac_c_werror_flag=yes
+    ac_cv_prog_cc_g=no
+    CFLAGS="-g"
+-   cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -3388,34 +3857,11 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_prog_cc_g=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	CFLAGS=""
+-      cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  CFLAGS=""
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -3426,35 +3872,12 @@
+   return 0;
+ }
+ _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
+-  :
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++if ac_fn_c_try_compile "$LINENO"; then :
+ 
+-	ac_c_werror_flag=$ac_save_c_werror_flag
++else
++  ac_c_werror_flag=$ac_save_c_werror_flag
+ 	 CFLAGS="-g"
+-	 cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -3465,42 +3888,18 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_prog_cc_g=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ac_c_werror_flag=$ac_save_c_werror_flag
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
++$as_echo "$ac_cv_prog_cc_g" >&6; }
+ if test "$ac_test_CFLAGS" = set; then
+   CFLAGS=$ac_save_CFLAGS
+ elif test $ac_cv_prog_cc_g = yes; then
+@@ -3516,18 +3915,14 @@
+     CFLAGS=
+   fi
+ fi
+-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+-if test "${ac_cv_prog_cc_c89+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
++$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
++if test "${ac_cv_prog_cc_c89+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_cv_prog_cc_c89=no
+ ac_save_CC=$CC
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <stdarg.h>
+ #include <stdio.h>
+@@ -3584,31 +3979,9 @@
+ 	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+ do
+   CC="$ac_save_CC $ac_arg"
+-  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
++  if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_prog_cc_c89=$ac_arg
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext
+   test "x$ac_cv_prog_cc_c89" != "xno" && break
+ done
+@@ -3619,17 +3992,19 @@
+ # AC_CACHE_VAL
+ case "x$ac_cv_prog_cc_c89" in
+   x)
+-    { echo "$as_me:$LINENO: result: none needed" >&5
+-echo "${ECHO_T}none needed" >&6; } ;;
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
++$as_echo "none needed" >&6; } ;;
+   xno)
+-    { echo "$as_me:$LINENO: result: unsupported" >&5
+-echo "${ECHO_T}unsupported" >&6; } ;;
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
++$as_echo "unsupported" >&6; } ;;
+   *)
+     CC="$CC $ac_cv_prog_cc_c89"
+-    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
++$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+ esac
++if test "x$ac_cv_prog_cc_c89" != xno; then :
+ 
++fi
+ 
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+@@ -3647,17 +4022,13 @@
+ ## 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; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
++$as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
+ 
+-if test "${emacs_cv_sunpro_c+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++if test "${emacs_cv_sunpro_c+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -3671,38 +4042,17 @@
+   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
++if ac_fn_c_try_link "$LINENO"; 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
++  emacs_cv_sunpro_c=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    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; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
++$as_echo "$emacs_cv_sunpro_c" >&6; }
+ 
+   if test x"$emacs_cv_sunpro_c" = xyes; then
+     NON_GNU_CPP="$CC -E -Xs"
+@@ -3736,26 +4086,20 @@
+   CC="$CC $NON_GCC_TEST_OPTIONS"
+ fi
+ 
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define _GNU_SOURCE 1
+-_ACEOF
+-
+-
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
++$as_echo_n "checking how to run the C preprocessor... " >&6; }
+ # On Suns, sometimes $CPP names a directory.
+ if test -n "$CPP" && test -d "$CPP"; then
+   CPP=
+ fi
+ if test -z "$CPP"; then
+-  if test "${ac_cv_prog_CPP+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  if test "${ac_cv_prog_CPP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+       # Double quotes because CPP needs to be expanded
+     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+@@ -3769,11 +4113,7 @@
+   # <limits.h> exists even on freestanding compilers.
+   # On the NeXT, cc -E runs the code through the compiler's parser,
+   # not just through cpp. "Syntax error" is here to catch this case.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef __STDC__
+ # include <limits.h>
+@@ -3782,76 +4122,34 @@
+ #endif
+ 		     Syntax error
+ _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
+-  :
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++if ac_fn_c_try_cpp "$LINENO"; then :
+ 
++else
+   # Broken: fails on valid input.
+ continue
+ fi
+-
+ rm -f conftest.err conftest.$ac_ext
+ 
+   # OK, works on sane cases.  Now check whether nonexistent headers
+   # can be detected and how.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <ac_nonexistent.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
++if ac_fn_c_try_cpp "$LINENO"; then :
+   # Broken: success on invalid input.
+ continue
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+   # Passes both tests.
+ ac_preproc_ok=:
+ break
+ fi
+-
+ rm -f conftest.err conftest.$ac_ext
+ 
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+ rm -f conftest.err conftest.$ac_ext
+-if $ac_preproc_ok; then
++if $ac_preproc_ok; then :
+   break
+ fi
+ 
+@@ -3863,8 +4161,8 @@
+ else
+   ac_cv_prog_CPP=$CPP
+ fi
+-{ echo "$as_me:$LINENO: result: $CPP" >&5
+-echo "${ECHO_T}$CPP" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
++$as_echo "$CPP" >&6; }
+ ac_preproc_ok=false
+ for ac_c_preproc_warn_flag in '' yes
+ do
+@@ -3874,11 +4172,7 @@
+   # <limits.h> exists even on freestanding compilers.
+   # On the NeXT, cc -E runs the code through the compiler's parser,
+   # not just through cpp. "Syntax error" is here to catch this case.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef __STDC__
+ # include <limits.h>
+@@ -3887,83 +4181,40 @@
+ #endif
+ 		     Syntax error
+ _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
+-  :
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++if ac_fn_c_try_cpp "$LINENO"; then :
+ 
++else
+   # Broken: fails on valid input.
+ continue
+ fi
+-
+ rm -f conftest.err conftest.$ac_ext
+ 
+   # OK, works on sane cases.  Now check whether nonexistent headers
+   # can be detected and how.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <ac_nonexistent.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
++if ac_fn_c_try_cpp "$LINENO"; then :
+   # Broken: success on invalid input.
+ continue
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+   # Passes both tests.
+ ac_preproc_ok=:
+ break
+ fi
+-
+ rm -f conftest.err conftest.$ac_ext
+ 
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+ rm -f conftest.err conftest.$ac_ext
+-if $ac_preproc_ok; then
+-  :
++if $ac_preproc_ok; then :
++
+ else
+-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+-See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ 
+ ac_ext=c
+@@ -3973,45 +4224,40 @@
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+ 
+-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+-if test "${ac_cv_path_GREP+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  # Extract the first word of "grep ggrep" to use in msg output
+-if test -z "$GREP"; then
+-set dummy grep ggrep; ac_prog_name=$2
+-if test "${ac_cv_path_GREP+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
++$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
++if test "${ac_cv_path_GREP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
++  if test -z "$GREP"; then
+   ac_path_GREP_found=false
+-# Loop through the user's path and test for each of PROGNAME-LIST
+-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++  # Loop through the user's path and test for each of PROGNAME-LIST
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_prog in grep ggrep; do
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+-    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+-    # Check for GNU ac_path_GREP and select it if it is found.
++    for ac_prog in grep ggrep; do
++    for ac_exec_ext in '' $ac_executable_extensions; do
++      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
++      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
++# Check for GNU ac_path_GREP and select it if it is found.
+   # Check for GNU $ac_path_GREP
+ case `"$ac_path_GREP" --version 2>&1` in
+ *GNU*)
+   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+ *)
+   ac_count=0
+-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
++  $as_echo_n 0123456789 >"conftest.in"
+   while :
+   do
+     cat "conftest.in" "conftest.in" >"conftest.tmp"
+     mv "conftest.tmp" "conftest.in"
+     cp "conftest.in" "conftest.nl"
+-    echo 'GREP' >> "conftest.nl"
++    $as_echo 'GREP' >> "conftest.nl"
+     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+-    ac_count=`expr $ac_count + 1`
++    as_fn_arith $ac_count + 1 && ac_count=$as_val
+     if test $ac_count -gt ${ac_path_GREP_max-0}; then
+       # Best one so far, save it but keep looking for a better one
+       ac_cv_path_GREP="$ac_path_GREP"
+@@ -4023,77 +4269,61 @@
+   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+ esac
+ 
+-
+-    $ac_path_GREP_found && break 3
++      $ac_path_GREP_found && break 3
++    done
++  done
+   done
+-done
+-
+-done
+ IFS=$as_save_IFS
+-
+-
+-fi
+-
+-GREP="$ac_cv_path_GREP"
+-if test -z "$GREP"; then
+-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
++  if test -z "$ac_cv_path_GREP"; then
++    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++  fi
+ else
+   ac_cv_path_GREP=$GREP
+ fi
+ 
+-
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
++$as_echo "$ac_cv_path_GREP" >&6; }
+  GREP="$ac_cv_path_GREP"
+ 
+ 
+-{ echo "$as_me:$LINENO: checking for egrep" >&5
+-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+-if test "${ac_cv_path_EGREP+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
++$as_echo_n "checking for egrep... " >&6; }
++if test "${ac_cv_path_EGREP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+    then ac_cv_path_EGREP="$GREP -E"
+    else
+-     # Extract the first word of "egrep" to use in msg output
+-if test -z "$EGREP"; then
+-set dummy egrep; ac_prog_name=$2
+-if test "${ac_cv_path_EGREP+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
++     if test -z "$EGREP"; then
+   ac_path_EGREP_found=false
+-# Loop through the user's path and test for each of PROGNAME-LIST
+-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++  # Loop through the user's path and test for each of PROGNAME-LIST
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_prog in egrep; do
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+-    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+-    # Check for GNU ac_path_EGREP and select it if it is found.
++    for ac_prog in egrep; do
++    for ac_exec_ext in '' $ac_executable_extensions; do
++      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
++      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
++# Check for GNU ac_path_EGREP and select it if it is found.
+   # Check for GNU $ac_path_EGREP
+ case `"$ac_path_EGREP" --version 2>&1` in
+ *GNU*)
+   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+ *)
+   ac_count=0
+-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
++  $as_echo_n 0123456789 >"conftest.in"
+   while :
+   do
+     cat "conftest.in" "conftest.in" >"conftest.tmp"
+     mv "conftest.tmp" "conftest.in"
+     cp "conftest.in" "conftest.nl"
+-    echo 'EGREP' >> "conftest.nl"
++    $as_echo 'EGREP' >> "conftest.nl"
+     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+-    ac_count=`expr $ac_count + 1`
++    as_fn_arith $ac_count + 1 && ac_count=$as_val
+     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+       # Best one so far, save it but keep looking for a better one
+       ac_cv_path_EGREP="$ac_path_EGREP"
+@@ -4105,75 +4335,31 @@
+   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+ esac
+ 
+-
+-    $ac_path_EGREP_found && break 3
++      $ac_path_EGREP_found && break 3
++    done
++  done
+   done
+-done
+-
+-done
+ IFS=$as_save_IFS
+-
+-
++  if test -z "$ac_cv_path_EGREP"; then
++    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++  fi
++else
++  ac_cv_path_EGREP=$EGREP
+ fi
+ 
+-EGREP="$ac_cv_path_EGREP"
+-if test -z "$EGREP"; then
+-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+-   { (exit 1); exit 1; }; }
++   fi
+ fi
+-
+-else
+-  ac_cv_path_EGREP=$EGREP
+-fi
+-
+-
+-   fi
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
++$as_echo "$ac_cv_path_EGREP" >&6; }
+  EGREP="$ac_cv_path_EGREP"
+ 
+ 
+-
+-{ echo "$as_me:$LINENO: checking for AIX" >&5
+-echo $ECHO_N "checking for AIX... $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.  */
+-#ifdef _AIX
+-  yes
+-#endif
+-
+-_ACEOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "yes" >/dev/null 2>&1; then
+-  { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-cat >>confdefs.h <<\_ACEOF
+-#define _ALL_SOURCE 1
+-_ACEOF
+-
+-else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-fi
+-rm -f conftest*
+-
+-
+-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+-if test "${ac_cv_header_stdc+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
++$as_echo_n "checking for ANSI C header files... " >&6; }
++if test "${ac_cv_header_stdc+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <stdlib.h>
+ #include <stdarg.h>
+@@ -4188,47 +4374,23 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_header_stdc=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_header_stdc=no
++  ac_cv_header_stdc=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+ if test $ac_cv_header_stdc = yes; then
+   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <string.h>
+ 
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "memchr" >/dev/null 2>&1; then
+-  :
++  $EGREP "memchr" >/dev/null 2>&1; then :
++
+ else
+   ac_cv_header_stdc=no
+ fi
+@@ -4238,18 +4400,14 @@
+ 
+ if test $ac_cv_header_stdc = yes; then
+   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <stdlib.h>
+ 
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "free" >/dev/null 2>&1; then
+-  :
++  $EGREP "free" >/dev/null 2>&1; then :
++
+ else
+   ac_cv_header_stdc=no
+ fi
+@@ -4259,14 +4417,10 @@
+ 
+ if test $ac_cv_header_stdc = yes; then
+   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+-  if test "$cross_compiling" = yes; then
++  if test "$cross_compiling" = yes; then :
+   :
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <ctype.h>
+ #include <stdlib.h>
+@@ -4293,113 +4447,36 @@
+   return 0;
+ }
+ _ACEOF
+-rm -f 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>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (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_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  :
+-else
+-  echo "$as_me: program exited with status $ac_status" >&5
+-echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++if ac_fn_c_try_run "$LINENO"; then :
+ 
+-( exit $ac_status )
+-ac_cv_header_stdc=no
++else
++  ac_cv_header_stdc=no
+ fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ 
+-
+ fi
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
++$as_echo "$ac_cv_header_stdc" >&6; }
+ if test $ac_cv_header_stdc = yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define STDC_HEADERS 1
+-_ACEOF
++$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+ 
+ fi
+ 
+ # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+-
+-
+-
+-
+-
+-
+-
+-
+-
+ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ 		  inttypes.h stdint.h unistd.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; 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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-
+-#include <$ac_header>
+-_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
+-  eval "$as_ac_Header=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_Header=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
++"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+ 
+ fi
+@@ -4407,176 +4484,34 @@
+ done
+ 
+ 
+-if test "${ac_cv_header_minix_config_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for minix/config.h" >&5
+-echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_minix_config_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+-echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
+-echo $ECHO_N "checking minix/config.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 <minix/config.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 minix/config.h presence" >&5
+-echo $ECHO_N "checking minix/config.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 <minix/config.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: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: minix/config.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: minix/config.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
+-echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_minix_config_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_minix_config_h=$ac_header_preproc
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+-echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
+ 
+-fi
+-if test $ac_cv_header_minix_config_h = yes; then
++  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
++if test "x$ac_cv_header_minix_config_h" = x""yes; then :
+   MINIX=yes
+ else
+   MINIX=
+ fi
+ 
+ 
+-if test "$MINIX" = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define _POSIX_SOURCE 1
+-_ACEOF
+-
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define _POSIX_1_SOURCE 2
+-_ACEOF
+-
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define _MINIX 1
+-_ACEOF
+-
+-fi
+-
+-
+-
++  if test "$MINIX" = yes; then
+ 
++$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+ 
+ 
++$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+ 
+ 
++$as_echo "#define _MINIX 1" >>confdefs.h
+ 
++  fi
+ 
+ 
+-  { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
+-echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
+-if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
++$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
++if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ #	  define __EXTENSIONS__ 1
+@@ -4589,60 +4524,34 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_safe_to_define___extensions__=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_safe_to_define___extensions__=no
++  ac_cv_safe_to_define___extensions__=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
+-echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
++$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+   test $ac_cv_safe_to_define___extensions__ = yes &&
+-    cat >>confdefs.h <<\_ACEOF
+-#define __EXTENSIONS__ 1
+-_ACEOF
++    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+ 
+-  cat >>confdefs.h <<\_ACEOF
+-#define _POSIX_PTHREAD_SEMANTICS 1
+-_ACEOF
++  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+ 
+-  cat >>confdefs.h <<\_ACEOF
+-#define _TANDEM_SOURCE 1
+-_ACEOF
++  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
++
++  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
++
++  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+ 
+ 
+ 
+ ### Use -Wno-pointer-sign if the compiler supports it
+-{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
+-echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5
++$as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; }
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wno-pointer-sign"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -4653,52 +4562,32 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   has_option=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	has_option=no
++  has_option=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $has_option = yes; then
+    C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
+ fi
+-{ echo "$as_me:$LINENO: result: $has_option" >&5
+-echo "${ECHO_T}$has_option" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
++$as_echo "$has_option" >&6; }
+ CFLAGS="$SAVE_CFLAGS"
+ unset has_option
+ unset SAVE_CFLAGS
+ 
+ #### Some other nice autoconf tests.
+ 
+-{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
+-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
++$as_echo_n "checking whether ln -s works... " >&6; }
+ LN_S=$as_ln_s
+ if test "$LN_S" = "ln -s"; then
+-  { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+-echo "${ECHO_T}no, using $LN_S" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
++$as_echo "no, using $LN_S" >&6; }
+ fi
+ 
+ ac_ext=c
+@@ -4706,15 +4595,15 @@
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
++$as_echo_n "checking how to run the C preprocessor... " >&6; }
+ # On Suns, sometimes $CPP names a directory.
+ if test -n "$CPP" && test -d "$CPP"; then
+   CPP=
+ fi
+ if test -z "$CPP"; then
+-  if test "${ac_cv_prog_CPP+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  if test "${ac_cv_prog_CPP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+       # Double quotes because CPP needs to be expanded
+     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+@@ -4728,11 +4617,7 @@
+   # <limits.h> exists even on freestanding compilers.
+   # On the NeXT, cc -E runs the code through the compiler's parser,
+   # not just through cpp. "Syntax error" is here to catch this case.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef __STDC__
+ # include <limits.h>
+@@ -4741,76 +4626,34 @@
+ #endif
+ 		     Syntax error
+ _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
+-  :
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++if ac_fn_c_try_cpp "$LINENO"; then :
+ 
++else
+   # Broken: fails on valid input.
+ continue
+ fi
+-
+ rm -f conftest.err conftest.$ac_ext
+ 
+   # OK, works on sane cases.  Now check whether nonexistent headers
+   # can be detected and how.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <ac_nonexistent.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
++if ac_fn_c_try_cpp "$LINENO"; then :
+   # Broken: success on invalid input.
+ continue
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+   # Passes both tests.
+ ac_preproc_ok=:
+ break
+ fi
+-
+ rm -f conftest.err conftest.$ac_ext
+ 
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+ rm -f conftest.err conftest.$ac_ext
+-if $ac_preproc_ok; then
++if $ac_preproc_ok; then :
+   break
+ fi
+ 
+@@ -4822,8 +4665,8 @@
+ else
+   ac_cv_prog_CPP=$CPP
+ fi
+-{ echo "$as_me:$LINENO: result: $CPP" >&5
+-echo "${ECHO_T}$CPP" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
++$as_echo "$CPP" >&6; }
+ ac_preproc_ok=false
+ for ac_c_preproc_warn_flag in '' yes
+ do
+@@ -4833,11 +4676,7 @@
+   # <limits.h> exists even on freestanding compilers.
+   # On the NeXT, cc -E runs the code through the compiler's parser,
+   # not just through cpp. "Syntax error" is here to catch this case.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef __STDC__
+ # include <limits.h>
+@@ -4846,83 +4685,40 @@
+ #endif
+ 		     Syntax error
+ _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
+-  :
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++if ac_fn_c_try_cpp "$LINENO"; then :
+ 
++else
+   # Broken: fails on valid input.
+ continue
+ fi
+-
+ rm -f conftest.err conftest.$ac_ext
+ 
+   # OK, works on sane cases.  Now check whether nonexistent headers
+   # can be detected and how.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <ac_nonexistent.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
++if ac_fn_c_try_cpp "$LINENO"; then :
+   # Broken: success on invalid input.
+ continue
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+   # Passes both tests.
+ ac_preproc_ok=:
+ break
+ fi
+-
+ rm -f conftest.err conftest.$ac_ext
+ 
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+ rm -f conftest.err conftest.$ac_ext
+-if $ac_preproc_ok; then
+-  :
++if $ac_preproc_ok; then :
++
+ else
+-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+-See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ 
+ ac_ext=c
+@@ -4944,22 +4740,23 @@
+ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+ # OS/2's system install, which has a completely different semantic
+ # ./install, which can be erroneously created by make from ./install.sh.
+-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
++# Reject install programs that cannot install multiple files.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
++$as_echo_n "checking for a BSD-compatible install... " >&6; }
+ if test -z "$INSTALL"; then
+-if test "${ac_cv_path_install+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++if test "${ac_cv_path_install+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  # Account for people who put trailing slashes in PATH elements.
+-case $as_dir/ in
+-  ./ | .// | /cC/* | \
++    # Account for people who put trailing slashes in PATH elements.
++case $as_dir/ in #((
++  ./ | .// | /[cC]/* | \
+   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
++  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+   /usr/ucb/* ) ;;
+   *)
+     # OSF1 and SCO ODT 3.0 have their own names for install.
+@@ -4977,17 +4774,29 @@
+ 	    # program-specific install script used by HP pwplus--don't use.
+ 	    :
+ 	  else
+-	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+-	    break 3
++	    rm -rf conftest.one conftest.two conftest.dir
++	    echo one > conftest.one
++	    echo two > conftest.two
++	    mkdir conftest.dir
++	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
++	      test -s conftest.one && test -s conftest.two &&
++	      test -s conftest.dir/conftest.one &&
++	      test -s conftest.dir/conftest.two
++	    then
++	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
++	      break 3
++	    fi
+ 	  fi
+ 	fi
+       done
+     done
+     ;;
+ esac
+-done
++
++  done
+ IFS=$as_save_IFS
+ 
++rm -rf conftest.one conftest.two conftest.dir
+ 
+ fi
+   if test "${ac_cv_path_install+set}" = set; then
+@@ -5000,8 +4809,8 @@
+     INSTALL=$ac_install_sh
+   fi
+ fi
+-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+-echo "${ECHO_T}$INSTALL" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
++$as_echo "$INSTALL" >&6; }
+ 
+ # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+ # It thinks the first close brace ends the variable substitution.
+@@ -5015,10 +4824,10 @@
+   if test -n "$ac_tool_prefix"; then
+   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_RANLIB+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$RANLIB"; then
+   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+@@ -5028,25 +4837,25 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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_RANLIB="${ac_tool_prefix}ranlib"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+ fi
+ fi
+ RANLIB=$ac_cv_prog_RANLIB
+ if test -n "$RANLIB"; then
+-  { echo "$as_me:$LINENO: result: $RANLIB" >&5
+-echo "${ECHO_T}$RANLIB" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
++$as_echo "$RANLIB" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+@@ -5055,10 +4864,10 @@
+   ac_ct_RANLIB=$RANLIB
+   # Extract the first word of "ranlib", so it can be a program name with args.
+ set dummy ranlib; 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_ac_ct_RANLIB+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$ac_ct_RANLIB"; then
+   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+@@ -5068,25 +4877,25 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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_ac_ct_RANLIB="ranlib"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+ fi
+ fi
+ ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+ if test -n "$ac_ct_RANLIB"; then
+-  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+-echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
++$as_echo "$ac_ct_RANLIB" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+   if test "x$ac_ct_RANLIB" = x; then
+@@ -5094,12 +4903,8 @@
+   else
+     case $cross_compiling:$ac_tool_warned in
+ yes:)
+-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+-whose name does not start with the host triplet.  If you think this
+-configuration is useful to you, please write to autoconf@gnu.org." >&5
+-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+-whose name does not start with the host triplet.  If you think this
+-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     RANLIB=$ac_ct_RANLIB
+@@ -5111,10 +4916,10 @@
+ fi
+ # Extract the first word of "install-info", so it can be a program name with args.
+ set dummy install-info; 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_INSTALL_INFO+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $INSTALL_INFO in
+   [\\/]* | ?:[\\/]*)
+@@ -5126,14 +4931,14 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+   ;;
+@@ -5141,20 +4946,20 @@
+ fi
+ INSTALL_INFO=$ac_cv_path_INSTALL_INFO
+ if test -n "$INSTALL_INFO"; then
+-  { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
+-echo "${ECHO_T}$INSTALL_INFO" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
++$as_echo "$INSTALL_INFO" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+ # Extract the first word of "install-info", so it can be a program name with args.
+ set dummy install-info; 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_INSTALL_INFO+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $INSTALL_INFO in
+   [\\/]* | ?:[\\/]*)
+@@ -5166,14 +4971,14 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+   ;;
+@@ -5181,20 +4986,20 @@
+ fi
+ INSTALL_INFO=$ac_cv_path_INSTALL_INFO
+ if test -n "$INSTALL_INFO"; then
+-  { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
+-echo "${ECHO_T}$INSTALL_INFO" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
++$as_echo "$INSTALL_INFO" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+ # Extract the first word of "install-info", so it can be a program name with args.
+ set dummy install-info; 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_INSTALL_INFO+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $INSTALL_INFO in
+   [\\/]* | ?:[\\/]*)
+@@ -5206,14 +5011,14 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
+@@ -5222,20 +5027,20 @@
+ fi
+ INSTALL_INFO=$ac_cv_path_INSTALL_INFO
+ if test -n "$INSTALL_INFO"; then
+-  { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
+-echo "${ECHO_T}$INSTALL_INFO" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
++$as_echo "$INSTALL_INFO" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+ # Extract the first word of "gzip", so it can be a program name with args.
+ set dummy gzip; 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_GZIP_PROG+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $GZIP_PROG in
+   [\\/]* | ?:[\\/]*)
+@@ -5247,14 +5052,14 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+   ;;
+@@ -5262,11 +5067,11 @@
+ fi
+ GZIP_PROG=$ac_cv_path_GZIP_PROG
+ if test -n "$GZIP_PROG"; then
+-  { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
+-echo "${ECHO_T}$GZIP_PROG" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
++$as_echo "$GZIP_PROG" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+@@ -5275,10 +5080,10 @@
+ ## 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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_MAKEINFO+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $MAKEINFO in
+   [\\/]* | ?:[\\/]*)
+@@ -5290,14 +5095,14 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
+@@ -5306,11 +5111,11 @@
+ fi
+ MAKEINFO=$ac_cv_path_MAKEINFO
+ if test -n "$MAKEINFO"; then
+-  { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
+-echo "${ECHO_T}$MAKEINFO" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
++$as_echo "$MAKEINFO" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+@@ -5332,15 +5137,10 @@
+   if test "x${with_makeinfo}" = "xno"; then
+     MAKEINFO=off
+   elif ! test -e $srcdir/info/emacs; then
+-    { { echo "$as_me:$LINENO: error: You do not seem to have makeinfo >= 4.6, and your
+-source tree does not seem to have pre-built manuals in the \`info' directory.
+-Either install a suitable version of makeinfo, or re-run configure
+-with the \`--without-makeinfo' option to build without the manuals. " >&5
+-echo "$as_me: error: You do not seem to have makeinfo >= 4.6, and your
++    as_fn_error "You do not seem to have makeinfo >= 4.6, and your
+ source tree does not seem to have pre-built manuals in the \`info' directory.
+ Either install a suitable version of makeinfo, or re-run configure
+-with the \`--without-makeinfo' option to build without the manuals. " >&2;}
+-   { (exit 1); exit 1; }; }
++with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
+   fi
+ fi
+ 
+@@ -5363,49 +5163,29 @@
+   LDFLAGS="$LDFLAGS -znocombreloc"
+ fi
+ 
+-{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
+-echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
++$as_echo_n "checking for -znocombreloc... " >&6; }
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 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
+-  { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	LDFLAGS=$late_LDFLAGS
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++if ac_fn_c_try_link "$LINENO"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++else
++  LDFLAGS=$late_LDFLAGS
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
+ #### Extract some information from the operating system and machine files.
+ 
+-{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the machine- and system-dependent files to find out
+  - which libraries the lib-src programs will want, and
+  - whether the GNU malloc routines are usable..." >&5
+-echo "$as_me: checking the machine- and system-dependent files to find out
++$as_echo "$as_me: checking the machine- and system-dependent files to find out
+  - which libraries the lib-src programs will want, and
+  - whether the GNU malloc routines are usable..." >&6;}
+ 
+@@ -5548,16 +5328,16 @@
+ 
+ 
+ # Check whether --enable-largefile was given.
+-if test "${enable_largefile+set}" = set; then
++if test "${enable_largefile+set}" = set; then :
+   enableval=$enable_largefile;
+ fi
+ 
+ if test "$enable_largefile" != no; then
+ 
+-  { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
+-echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
+-if test "${ac_cv_sys_largefile_CC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
++$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
++if test "${ac_cv_sys_largefile_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_cv_sys_largefile_CC=no
+      if test "$GCC" != yes; then
+@@ -5565,11 +5345,7 @@
+        while :; do
+ 	 # IRIX 6.2 and later do not support large files by default,
+ 	 # so use the C compiler's -n32 option if that helps.
+-	 cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+  /* Check that off_t can represent 2**63 - 1 correctly.
+@@ -5588,58 +5364,14 @@
+   return 0;
+ }
+ _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
++	 if ac_fn_c_try_compile "$LINENO"; then :
+   break
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext
+ 	 CC="$CC -n32"
+-	 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
++	 if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_sys_largefile_CC=' -n32'; break
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext
+ 	 break
+        done
+@@ -5647,23 +5379,19 @@
+        rm -f conftest.$ac_ext
+     fi
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+-echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
++$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+   if test "$ac_cv_sys_largefile_CC" != no; then
+     CC=$CC$ac_cv_sys_largefile_CC
+   fi
+ 
+-  { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+-echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
+-if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
++$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
++if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   while :; do
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+  /* Check that off_t can represent 2**63 - 1 correctly.
+@@ -5682,37 +5410,11 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_sys_file_offset_bits=no; break
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #define _FILE_OFFSET_BITS 64
+ #include <sys/types.h>
+@@ -5732,38 +5434,16 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_sys_file_offset_bits=64; break
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cv_sys_file_offset_bits=unknown
+   break
+ done
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+-echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
++$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+ case $ac_cv_sys_file_offset_bits in #(
+   no | unknown) ;;
+   *)
+@@ -5772,19 +5452,15 @@
+ _ACEOF
+ ;;
+ esac
+-rm -f conftest*
++rm -rf conftest*
+   if test $ac_cv_sys_file_offset_bits = unknown; then
+-    { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
+-echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
+-if test "${ac_cv_sys_large_files+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
++$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
++if test "${ac_cv_sys_large_files+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   while :; do
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+  /* Check that off_t can represent 2**63 - 1 correctly.
+@@ -5803,37 +5479,11 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_sys_large_files=no; break
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #define _LARGE_FILES 1
+ #include <sys/types.h>
+@@ -5853,38 +5503,16 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_sys_large_files=1; break
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cv_sys_large_files=unknown
+   break
+ done
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+-echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
++$as_echo "$ac_cv_sys_large_files" >&6; }
+ case $ac_cv_sys_large_files in #(
+   no | unknown) ;;
+   *)
+@@ -5893,7 +5521,7 @@
+ _ACEOF
+ ;;
+ esac
+-rm -f conftest*
++rm -rf conftest*
+   fi
+ fi
+ 
+@@ -5907,9 +5535,7 @@
+   x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
+     if test -e /usr/lib64/crtn.o; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_LIB64_DIR 1
+-_ACEOF
++$as_echo "#define HAVE_LIB64_DIR 1" >>confdefs.h
+ 
+ fi
+ esac
+@@ -5919,142 +5545,14 @@
+ 
+ if test "${with_sound}" != "no"; then
+   # Sound support for GNU/Linux and the free BSDs.
+-
+-
+-
+-for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++  for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+ 
+ fi
+@@ -6062,18 +5560,14 @@
+ done
+ 
+   # Emulation library used on NetBSD.
+-  { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
+-echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
++$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
++if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lossaudio  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -6091,39 +5585,18 @@
+   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
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_ossaudio__oss_ioctl=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_ossaudio__oss_ioctl=no
++  ac_cv_lib_ossaudio__oss_ioctl=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core 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_ossaudio__oss_ioctl" >&5
+-echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
+-if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
++$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
++if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
+   LIBSOUND=-lossaudio
+ else
+   LIBSOUND=
+@@ -6138,10 +5611,10 @@
+ 
+   # 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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $PKG_CONFIG in
+   [\\/]* | ?:[\\/]*)
+@@ -6153,14 +5626,14 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
++    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
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+@@ -6169,11 +5642,11 @@
+ 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; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+@@ -6183,28 +5656,28 @@
+   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 $ALSA_MODULES" >&5
+-echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
++$as_echo_n "checking for $ALSA_MODULES... " >&6; }
+ 
+         if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
+-            { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+             succeeded=yes
+ 
+-            { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
+-echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
++$as_echo_n "checking ALSA_CFLAGS... " >&6; }
+             ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
+-            { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
+-echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
++$as_echo "$ALSA_CFLAGS" >&6; }
+ 
+-            { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
+-echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
++$as_echo_n "checking ALSA_LIBS... " >&6; }
+             ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
+-            { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
+-echo "${ECHO_T}$ALSA_LIBS" >&6; }
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
++$as_echo "$ALSA_LIBS" >&6; }
+         else
+-            { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+             ALSA_CFLAGS=""
+             ALSA_LIBS=""
+             ## If we have a custom action on failure, don't print errors, but
+@@ -6232,11 +5705,7 @@
+     SAVE_LDFLAGS="$LDFLAGS"
+     CFLAGS="$ALSA_CFLAGS $CFLAGS"
+     LDFLAGS="$ALSA_LIBS $LDFLAGS"
+-    cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <asoundlib.h>
+ int
+@@ -6247,38 +5716,14 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   emacs_alsa_normal=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_alsa_normal=no
++  emacs_alsa_normal=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     if test "$emacs_alsa_normal" != yes; then
+-      cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <alsa/asoundlib.h>
+ int
+@@ -6289,36 +5734,14 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   emacs_alsa_subdir=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_alsa_subdir=no
++  emacs_alsa_subdir=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       if test "$emacs_alsa_subdir" != yes; then
+-        { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile.  See config.log for error messages." >&5
+-echo "$as_me: error: pkg-config found alsa, but it does not compile.  See config.log for error messages." >&2;}
+-   { (exit 1); exit 1; }; }
++        as_fn_error "pkg-config found alsa, but it does not compile.  See config.log for error messages." "$LINENO" 5
+       fi
+       ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
+     fi
+@@ -6328,395 +5751,138 @@
+     LIBSOUND="$LIBSOUND $ALSA_LIBS"
+     CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_ALSA 1
+-_ACEOF
++$as_echo "#define HAVE_ALSA 1" >>confdefs.h
+ 
+   fi
+ 
+ fi
+ 
++for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
++  linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
++  termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
++  sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
++  sys/utsname.h pwd.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
+ 
++fi
+ 
++done
+ 
+ 
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
++$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/personality.h>
++int
++main ()
++{
++personality (PER_LINUX32)
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  emacs_cv_personality_linux32=yes
++else
++  emacs_cv_personality_linux32=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
++$as_echo "$emacs_cv_personality_linux32" >&6; }
+ 
++if test $emacs_cv_personality_linux32 = yes; then
+ 
++$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
+ 
++fi
+ 
++for ac_header in term.h
++do :
++  ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
++if test "x$ac_cv_header_term_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_TERM_H 1
++_ACEOF
+ 
++fi
+ 
++done
+ 
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
++$as_echo_n "checking for ANSI C header files... " >&6; }
++if test "${ac_cv_header_stdc+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdlib.h>
++#include <stdarg.h>
++#include <string.h>
++#include <float.h>
+ 
++int
++main ()
++{
+ 
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_header_stdc=yes
++else
++  ac_cv_header_stdc=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
++if test $ac_cv_header_stdc = yes; then
++  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <string.h>
+ 
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "memchr" >/dev/null 2>&1; then :
+ 
++else
++  ac_cv_header_stdc=no
++fi
++rm -f conftest*
+ 
++fi
+ 
++if test $ac_cv_header_stdc = yes; then
++  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdlib.h>
+ 
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "free" >/dev/null 2>&1; then :
+ 
++else
++  ac_cv_header_stdc=no
++fi
++rm -f conftest*
+ 
+-
+-
+-
+-
+-for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
+-  linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
+-  termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
+-  sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
+-  sys/utsname.h pwd.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
+-
+-{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
+-echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <sys/personality.h>
+-int
+-main ()
+-{
+-personality (PER_LINUX32)
+-  ;
+-  return 0;
+-}
+-_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
+-  emacs_cv_personality_linux32=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_personality_linux32=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
+-echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
+-
+-if test $emacs_cv_personality_linux32 = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_PERSONALITY_LINUX32 1
+-_ACEOF
+-
+-fi
+-
+-
+-for ac_header in term.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; 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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_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
+-  eval "$as_ac_Header=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-  eval "$as_ac_Header=no"
+-fi
+-
+-rm -f conftest.err conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
+-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+-if test "${ac_cv_header_stdc+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 <stdlib.h>
+-#include <stdarg.h>
+-#include <string.h>
+-#include <float.h>
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_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_cv_header_stdc=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_header_stdc=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
+-if test $ac_cv_header_stdc = yes; then
+-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <string.h>
+-
+-_ACEOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "memchr" >/dev/null 2>&1; then
+-  :
+-else
+-  ac_cv_header_stdc=no
+-fi
+-rm -f conftest*
+-
+-fi
+-
+-if test $ac_cv_header_stdc = yes; then
+-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <stdlib.h>
+-
+-_ACEOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "free" >/dev/null 2>&1; then
+-  :
+-else
+-  ac_cv_header_stdc=no
+-fi
+-rm -f conftest*
+-
+-fi
++fi
+ 
+ if test $ac_cv_header_stdc = yes; then
+   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+-  if test "$cross_compiling" = yes; then
++  if test "$cross_compiling" = yes; then :
+   :
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <ctype.h>
+ #include <stdlib.h>
+@@ -6743,61 +5909,31 @@
+   return 0;
+ }
+ _ACEOF
+-rm -f 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>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (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_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  :
+-else
+-  echo "$as_me: program exited with status $ac_status" >&5
+-echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++if ac_fn_c_try_run "$LINENO"; then :
+ 
+-( exit $ac_status )
+-ac_cv_header_stdc=no
++else
++  ac_cv_header_stdc=no
+ fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ 
+-
+ fi
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
++$as_echo "$ac_cv_header_stdc" >&6; }
+ if test $ac_cv_header_stdc = yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define STDC_HEADERS 1
+-_ACEOF
++$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+ 
+ fi
+ 
+-{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
+-if test "${ac_cv_header_time+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
++$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
++if test "${ac_cv_header_time+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+ #include <sys/time.h>
+@@ -6812,199 +5948,57 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_header_time=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_header_time=no
++  ac_cv_header_time=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+-echo "${ECHO_T}$ac_cv_header_time" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
++$as_echo "$ac_cv_header_time" >&6; }
+ if test $ac_cv_header_time = yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define TIME_WITH_SYS_TIME 1
+-_ACEOF
++$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+ 
+ fi
+ 
+-{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
+-echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
+-if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
++if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
++  ac_have_decl=1
+ else
+-  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
+-int
+-main ()
+-{
+-#ifndef sys_siglist
+-  (void) sys_siglist;
+-#endif
++  ac_have_decl=0
++fi
+ 
+-  ;
+-  return 0;
+-}
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
+ _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_cv_have_decl_sys_siglist=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_have_decl_sys_siglist=no
+-fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++if test $ac_cv_have_decl_sys_siglist != yes; then
++  # For Tru64, at least:
++  ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
++if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
++  ac_have_decl=1
++else
++  ac_have_decl=0
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
+-echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
+-if test $ac_cv_have_decl_sys_siglist = yes; then
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL_SYS_SIGLIST 1
++#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
+ _ACEOF
+ 
++  if test $ac_cv_have_decl___sys_siglist = yes; then
+ 
+-else
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL_SYS_SIGLIST 0
+-_ACEOF
+-
++$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
+ 
++  fi
+ fi
+-
+-
+-if test $ac_cv_have_decl_sys_siglist != yes; then
+-  # For Tru64, at least:
+-  { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
+-echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
+-if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
++$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
++if test "${ac_cv_header_sys_wait_h+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  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
+-int
+-main ()
+-{
+-#ifndef __sys_siglist
+-  (void) __sys_siglist;
+-#endif
+-
+-  ;
+-  return 0;
+-}
+-_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_cv_have_decl___sys_siglist=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_have_decl___sys_siglist=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
+-echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
+-if test $ac_cv_have_decl___sys_siglist = yes; then
+-
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL___SYS_SIGLIST 1
+-_ACEOF
+-
+-
+-else
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL___SYS_SIGLIST 0
+-_ACEOF
+-
+-
+-fi
+-
+-
+-  if test $ac_cv_have_decl___sys_siglist = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define sys_siglist __sys_siglist
+-_ACEOF
+-
+-  fi
+-fi
+-{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+-echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
+-if test "${ac_cv_header_sys_wait_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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+ #include <sys/wait.h>
+@@ -7025,54 +6019,28 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_header_sys_wait_h=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_header_sys_wait_h=no
++  ac_cv_header_sys_wait_h=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
++$as_echo "$ac_cv_header_sys_wait_h" >&6; }
+ if test $ac_cv_header_sys_wait_h = yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_SYS_WAIT_H 1
+-_ACEOF
++$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+ 
+ fi
+ 
+ 
+-{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
+-echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
+-if test "${emacs_cv_struct_utimbuf+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
++$as_echo_n "checking for struct utimbuf... " >&6; }
++if test "${emacs_cv_struct_utimbuf+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef TIME_WITH_SYS_TIME
+ #include <sys/time.h>
+@@ -7095,53 +6063,27 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   emacs_cv_struct_utimbuf=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_struct_utimbuf=no
++  emacs_cv_struct_utimbuf=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
+-echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
++$as_echo "$emacs_cv_struct_utimbuf" >&6; }
+ if test $emacs_cv_struct_utimbuf = yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_STRUCT_UTIMBUF 1
+-_ACEOF
++$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
+ 
+ fi
+ 
+-{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+-echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
+-if test "${ac_cv_type_signal+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
++$as_echo_n "checking return type of signal handlers... " >&6; }
++if test "${ac_cv_type_signal+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+ #include <signal.h>
+@@ -7154,35 +6096,15 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_type_signal=int
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_type_signal=void
++  ac_cv_type_signal=void
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+-echo "${ECHO_T}$ac_cv_type_signal" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
++$as_echo "$ac_cv_type_signal" >&6; }
+ 
+ cat >>confdefs.h <<_ACEOF
+ #define RETSIGTYPE $ac_cv_type_signal
+@@ -7190,16 +6112,12 @@
+ 
+ 
+ 
+-{ echo "$as_me:$LINENO: checking for speed_t" >&5
+-echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
+-if test "${emacs_cv_speed_t+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
++$as_echo_n "checking for speed_t... " >&6; }
++if test "${emacs_cv_speed_t+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <termios.h>
+ int
+@@ -7210,53 +6128,27 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   emacs_cv_speed_t=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_speed_t=no
++  emacs_cv_speed_t=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
+-echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
++$as_echo "$emacs_cv_speed_t" >&6; }
+ if test $emacs_cv_speed_t = yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_SPEED_T 1
+-_ACEOF
++$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
+ 
+ fi
+ 
+-{ echo "$as_me:$LINENO: checking for struct timeval" >&5
+-echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
+-if test "${emacs_cv_struct_timeval+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
++$as_echo_n "checking for struct timeval... " >&6; }
++if test "${emacs_cv_struct_timeval+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef TIME_WITH_SYS_TIME
+ #include <sys/time.h>
+@@ -7276,54 +6168,28 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   emacs_cv_struct_timeval=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_struct_timeval=no
++  emacs_cv_struct_timeval=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
+-echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
++$as_echo "$emacs_cv_struct_timeval" >&6; }
+ HAVE_TIMEVAL=$emacs_cv_struct_timeval
+ if test $emacs_cv_struct_timeval = yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_TIMEVAL 1
+-_ACEOF
++$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
+ 
+ fi
+ 
+-{ echo "$as_me:$LINENO: checking for struct exception" >&5
+-echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
+-if test "${emacs_cv_struct_exception+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
++$as_echo_n "checking for struct exception... " >&6; }
++if test "${emacs_cv_struct_exception+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <math.h>
+ int
+@@ -7334,239 +6200,44 @@
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   emacs_cv_struct_exception=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_struct_exception=no
++  emacs_cv_struct_exception=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
+-echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
++$as_echo "$emacs_cv_struct_exception" >&6; }
+ HAVE_EXCEPTION=$emacs_cv_struct_exception
+ if test $emacs_cv_struct_exception != yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define NO_MATHERR 1
+-_ACEOF
++$as_echo "#define NO_MATHERR 1" >>confdefs.h
+ 
+ fi
+ 
+-
+ for ac_header in sys/socket.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_SYS_SOCKET_H 1
+ _ACEOF
+ 
+ fi
+ 
+ done
+ 
+-
+ for ac_header in net/if.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; 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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
++do :
++  ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
+ #if HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+-
+-#include <$ac_header>
+-_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
+-  eval "$as_ac_Header=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_Header=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++"
++if test "x$ac_cv_header_net_if_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_NET_IF_H 1
+ _ACEOF
+ 
+ fi
+@@ -7574,16 +6245,12 @@
+ done
+ 
+ 
+-{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+-echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
+-if test "${ac_cv_struct_tm+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
++$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
++if test "${ac_cv_struct_tm+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+ #include <time.h>
+@@ -7593,10236 +6260,1807 @@
+ {
+ struct tm tm;
+ 				     int *p = &tm.tm_sec;
+- 				     return !p;
++				     return !p;
+   ;
+   return 0;
+ }
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_struct_tm=time.h
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_struct_tm=sys/time.h
++  ac_cv_struct_tm=sys/time.h
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+-echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
++$as_echo "$ac_cv_struct_tm" >&6; }
+ if test $ac_cv_struct_tm = sys/time.h; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define TM_IN_SYS_TIME 1
+-_ACEOF
++$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+ 
+ fi
+ 
+-{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
+-echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
+-if test "${ac_cv_member_struct_tm_tm_zone+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>
++ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
+ #include <$ac_cv_struct_tm>
+ 
++"
++if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
+ 
+-int
+-main ()
+-{
+-static struct tm ac_aggr;
+-if (ac_aggr.tm_zone)
+-return 0;
+-  ;
+-  return 0;
+-}
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_TM_TM_ZONE 1
+ _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_cv_member_struct_tm_tm_zone=yes
++
++
++fi
++
++if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
++
++$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
++
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
++"
++if test "x$ac_cv_have_decl_tzname" = x""yes; then :
++  ac_have_decl=1
++else
++  ac_have_decl=0
++fi
+ 
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_TZNAME $ac_have_decl
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+-#include <$ac_cv_struct_tm>
+ 
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
++$as_echo_n "checking for tzname... " >&6; }
++if test "${ac_cv_var_tzname+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <time.h>
++#if !HAVE_DECL_TZNAME
++extern char *tzname[];
++#endif
+ 
+ int
+ main ()
+ {
+-static struct tm ac_aggr;
+-if (sizeof ac_aggr.tm_zone)
+-return 0;
++return tzname[0][0];
+   ;
+   return 0;
+ }
+ _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_cv_member_struct_tm_tm_zone=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_var_tzname=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_member_struct_tm_tm_zone=no
++  ac_cv_var_tzname=no
+ fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
++$as_echo "$ac_cv_var_tzname" >&6; }
++  if test $ac_cv_var_tzname = yes; then
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
++
++  fi
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
++"
++if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
++
++$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
++
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
+-if test $ac_cv_member_struct_tm_tm_zone = yes; then
++
++ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
++#if HAVE_SYS_SOCKET_H
++#include <sys/socket.h>
++#endif
++#if HAVE_NET_IF_H
++#include <net/if.h>
++#endif
++"
++if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_TM_TM_ZONE 1
++#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
+ _ACEOF
+ 
+ 
+ fi
++ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
++#if HAVE_SYS_SOCKET_H
++#include <sys/socket.h>
++#endif
++#if HAVE_NET_IF_H
++#include <net/if.h>
++#endif
++"
++if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
+ 
+-if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_TM_ZONE 1
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
+ _ACEOF
+ 
+-else
+-  { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
+-echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
+-if test "${ac_cv_have_decl_tzname+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 <time.h>
+ 
+-int
+-main ()
+-{
+-#ifndef tzname
+-  (void) tzname;
++fi
++ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
++#if HAVE_SYS_SOCKET_H
++#include <sys/socket.h>
++#endif
++#if HAVE_NET_IF_H
++#include <net/if.h>
+ #endif
++"
++if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
+ 
+-  ;
+-  return 0;
+-}
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
+ _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_cv_have_decl_tzname=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	ac_cv_have_decl_tzname=no
+-fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
+-echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
+-if test $ac_cv_have_decl_tzname = yes; then
++ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
++#if HAVE_SYS_SOCKET_H
++#include <sys/socket.h>
++#endif
++#if HAVE_NET_IF_H
++#include <net/if.h>
++#endif
++"
++if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL_TZNAME 1
++#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
+ _ACEOF
+ 
+ 
+-else
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL_TZNAME 0
++fi
++ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
++#if HAVE_SYS_SOCKET_H
++#include <sys/socket.h>
++#endif
++#if HAVE_NET_IF_H
++#include <net/if.h>
++#endif
++"
++if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
+ _ACEOF
+ 
+ 
+ fi
+ 
+ 
+-  { echo "$as_me:$LINENO: checking for tzname" >&5
+-echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
+-if test "${ac_cv_var_tzname+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
++$as_echo_n "checking for function prototypes... " >&6; }
++if test "$ac_cv_prog_cc_c89" != no; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
++$as_echo "#define PROTOTYPES 1" >>confdefs.h
++
++
++$as_echo "#define __PROTOTYPES 1" >>confdefs.h
++
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
++$as_echo_n "checking for working volatile... " >&6; }
++if test "${ac_cv_c_volatile+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <time.h>
+-#if !HAVE_DECL_TZNAME
+-extern char *tzname[];
+-#endif
+ 
+ int
+ main ()
+ {
+-return tzname[0][0];
++
++volatile int x;
++int * volatile y = (int *) 0;
++return !x && !y;
+   ;
+   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_var_tzname=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_volatile=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_var_tzname=no
++  ac_cv_c_volatile=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
+-echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
+-  if test $ac_cv_var_tzname = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
++$as_echo "$ac_cv_c_volatile" >&6; }
++if test $ac_cv_c_volatile = no; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_TZNAME 1
+-_ACEOF
++$as_echo "#define volatile /**/" >>confdefs.h
+ 
+-  fi
+ fi
+ 
+-{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
+-echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
+-if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
++$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
++if test "${ac_cv_c_const+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <time.h>
+ 
+ int
+ main ()
+ {
+-static struct tm ac_aggr;
+-if (ac_aggr.tm_gmtoff)
+-return 0;
+-  ;
+-  return 0;
+-}
+-_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_cv_member_struct_tm_tm_gmtoff=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++/* FIXME: Include the comments suggested by Paul. */
++#ifndef __cplusplus
++  /* Ultrix mips cc rejects this.  */
++  typedef int charset[2];
++  const charset cs;
++  /* SunOS 4.1.1 cc rejects this.  */
++  char const *const *pcpcc;
++  char **ppc;
++  /* NEC SVR4.0.2 mips cc rejects this.  */
++  struct point {int x, y;};
++  static struct point const zero = {0,0};
++  /* AIX XL C 1.02.0.0 rejects this.
++     It does not let you subtract one const X* pointer from another in
++     an arm of an if-expression whose if-part is not a constant
++     expression */
++  const char *g = "string";
++  pcpcc = &g + (g ? g-g : 0);
++  /* HPUX 7.0 cc rejects these. */
++  ++pcpcc;
++  ppc = (char**) pcpcc;
++  pcpcc = (char const *const *) ppc;
++  { /* SCO 3.2v4 cc rejects this.  */
++    char *t;
++    char const *s = 0 ? (char *) 0 : (char const *) 0;
+ 
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <time.h>
++    *t++ = 0;
++    if (s) return 0;
++  }
++  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
++    int x[] = {25, 17};
++    const int *foo = &x[0];
++    ++foo;
++  }
++  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
++    typedef const int *iptr;
++    iptr p = 0;
++    ++p;
++  }
++  { /* AIX XL C 1.02.0.0 rejects this saying
++       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
++    struct s { int j; const int *ap[3]; };
++    struct s *b; b->j = 5;
++  }
++  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
++    const int foo = 10;
++    if (!foo) return 0;
++  }
++  return !cs[0] && !zero.x;
++#endif
+ 
+-int
+-main ()
+-{
+-static struct tm ac_aggr;
+-if (sizeof ac_aggr.tm_gmtoff)
+-return 0;
+   ;
+   return 0;
+ }
+ _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_cv_member_struct_tm_tm_gmtoff=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_const=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_member_struct_tm_tm_gmtoff=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  ac_cv_c_const=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
+-if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
++$as_echo "$ac_cv_c_const" >&6; }
++if test $ac_cv_c_const = no; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_TM_GMTOFF 1
+-_ACEOF
++$as_echo "#define const /**/" >>confdefs.h
+ 
+ fi
+ 
+-{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
+-echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
+-if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
++$as_echo_n "checking for void * support... " >&6; }
++if test "${emacs_cv_void_star+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
+-#if HAVE_SYS_SOCKET_H
+-#include <sys/socket.h>
+-#endif
+-#if HAVE_NET_IF_H
+-#include <net/if.h>
+-#endif
+ 
+ int
+ main ()
+ {
+-static struct ifreq ac_aggr;
+-if (ac_aggr.ifr_flags)
+-return 0;
++void * foo;
+   ;
+   return 0;
+ }
+ _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_cv_member_struct_ifreq_ifr_flags=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  emacs_cv_void_star=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	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
+-#if HAVE_SYS_SOCKET_H
+-#include <sys/socket.h>
+-#endif
+-#if HAVE_NET_IF_H
+-#include <net/if.h>
+-#endif
++  emacs_cv_void_star=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
++$as_echo "$emacs_cv_void_star" >&6; }
++if test $emacs_cv_void_star = yes; then
++  $as_echo "#define POINTER_TYPE void" >>confdefs.h
+ 
+-int
+-main ()
+-{
+-static struct ifreq ac_aggr;
+-if (sizeof ac_aggr.ifr_flags)
+-return 0;
+-  ;
+-  return 0;
+-}
+-_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_cv_member_struct_ifreq_ifr_flags=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  $as_echo "#define POINTER_TYPE char" >>confdefs.h
+ 
+-	ac_cv_member_struct_ifreq_ifr_flags=no
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
+-if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
+ 
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
+-_ACEOF
+ 
+ 
+-fi
+-{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
+-echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
+-if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
++$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
++set x ${MAKE-make}
++ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
++if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  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
+-#if HAVE_SYS_SOCKET_H
+-#include <sys/socket.h>
+-#endif
+-#if HAVE_NET_IF_H
+-#include <net/if.h>
+-#endif
+-
+-int
+-main ()
+-{
+-static struct ifreq ac_aggr;
+-if (ac_aggr.ifr_hwaddr)
+-return 0;
+-  ;
+-  return 0;
+-}
++  cat >conftest.make <<\_ACEOF
++SHELL = /bin/sh
++all:
++	@echo '@@@%%%=$(MAKE)=@@@%%%'
+ _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;;
++# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
++case `${MAKE-make} -f conftest.make 2>/dev/null` in
++  *@@@%%%=?*=@@@%%%*)
++    eval ac_cv_prog_make_${ac_make}_set=yes;;
++  *)
++    eval ac_cv_prog_make_${ac_make}_set=no;;
+ 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_cv_member_struct_ifreq_ifr_hwaddr=yes
++rm -f conftest.make
++fi
++if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++  SET_MAKE=
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++  SET_MAKE="MAKE=${MAKE-make}"
++fi
+ 
+-	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
+-#if HAVE_SYS_SOCKET_H
+-#include <sys/socket.h>
+-#endif
+-#if HAVE_NET_IF_H
+-#include <net/if.h>
+-#endif
+ 
+-int
+-main ()
+-{
+-static struct ifreq ac_aggr;
+-if (sizeof ac_aggr.ifr_hwaddr)
+-return 0;
+-  ;
+-  return 0;
+-}
+-_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_cv_member_struct_ifreq_ifr_hwaddr=yes
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
++$as_echo_n "checking for long file names... " >&6; }
++if test "${ac_cv_sys_long_file_names+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_member_struct_ifreq_ifr_hwaddr=no
++  ac_cv_sys_long_file_names=yes
++# Test for long file names in all the places we know might matter:
++#      .		the current directory, where building will happen
++#      $prefix/lib	where we will be installing things
++#      $exec_prefix/lib	likewise
++#      $TMPDIR		if set, where it might want to write temporary files
++#      /tmp		where it might want to write temporary files
++#      /var/tmp		likewise
++#      /usr/tmp		likewise
++for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
++  # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
++  # in the usual case where exec_prefix is '${prefix}'.
++  case $ac_dir in #(
++    . | /* | ?:[\\/]*) ;; #(
++    *) continue;;
++  esac
++  test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
++  ac_xdir=$ac_dir/cf$$
++  (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
++  ac_tf1=$ac_xdir/conftest9012345
++  ac_tf2=$ac_xdir/conftest9012346
++  touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
++    ac_cv_sys_long_file_names=no
++  rm -f -r "$ac_xdir" 2>/dev/null
++  test $ac_cv_sys_long_file_names = no && break
++done
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
++$as_echo "$ac_cv_sys_long_file_names" >&6; }
++if test $ac_cv_sys_long_file_names = yes; then
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
++$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
+-if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
+ 
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
+-_ACEOF
+ 
++#### Choose a window system.
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
++$as_echo_n "checking for X... " >&6; }
+ 
++
++# Check whether --with-x was given.
++if test "${with_x+set}" = set; then :
++  withval=$with_x;
+ fi
+-{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
+-echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
+-if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++
++# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
++if test "x$with_x" = xno; then
++  # The user explicitly disabled X.
++  have_x=disabled
++else
++  case $x_includes,$x_libraries in #(
++    *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
++    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++  # One or both of the vars are not set, and there is no cached value.
++ac_x_includes=no ac_x_libraries=no
++rm -f -r conftest.dir
++if mkdir conftest.dir; then
++  cd conftest.dir
++  cat >Imakefile <<'_ACEOF'
++incroot:
++	@echo incroot='${INCROOT}'
++usrlibdir:
++	@echo usrlibdir='${USRLIBDIR}'
++libdir:
++	@echo libdir='${LIBDIR}'
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#if HAVE_SYS_SOCKET_H
+-#include <sys/socket.h>
+-#endif
+-#if HAVE_NET_IF_H
+-#include <net/if.h>
+-#endif
++  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
++    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
++    for ac_var in incroot usrlibdir libdir; do
++      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
++    done
++    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
++    for ac_extension in a so sl dylib la dll; do
++      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
++	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
++	ac_im_usrlibdir=$ac_im_libdir; break
++      fi
++    done
++    # Screen out bogus values from the imake configuration.  They are
++    # bogus both because they are the default anyway, and because
++    # using them would break gcc on systems where it needs fixed includes.
++    case $ac_im_incroot in
++	/usr/include) ac_x_includes= ;;
++	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
++    esac
++    case $ac_im_usrlibdir in
++	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
++	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
++    esac
++  fi
++  cd ..
++  rm -f -r conftest.dir
++fi
+ 
+-int
+-main ()
+-{
+-static struct ifreq ac_aggr;
+-if (ac_aggr.ifr_netmask)
+-return 0;
+-  ;
+-  return 0;
+-}
++# Standard set of common directories for X headers.
++# Check X11 before X11Rn because it is often a symlink to the current release.
++ac_x_header_dirs='
++/usr/X11/include
++/usr/X11R7/include
++/usr/X11R6/include
++/usr/X11R5/include
++/usr/X11R4/include
++
++/usr/include/X11
++/usr/include/X11R7
++/usr/include/X11R6
++/usr/include/X11R5
++/usr/include/X11R4
++
++/usr/local/X11/include
++/usr/local/X11R7/include
++/usr/local/X11R6/include
++/usr/local/X11R5/include
++/usr/local/X11R4/include
++
++/usr/local/include/X11
++/usr/local/include/X11R7
++/usr/local/include/X11R6
++/usr/local/include/X11R5
++/usr/local/include/X11R4
++
++/usr/X386/include
++/usr/x386/include
++/usr/XFree86/include/X11
++
++/usr/include
++/usr/local/include
++/usr/unsupported/include
++/usr/athena/include
++/usr/local/x11r5/include
++/usr/lpp/Xamples/include
++
++/usr/openwin/include
++/usr/openwin/share/include'
++
++if test "$ac_x_includes" = no; then
++  # Guess where to find include files, by looking for Xlib.h.
++  # First, try using that file with no special directory specified.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <X11/Xlib.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_cv_member_struct_ifreq_ifr_netmask=yes
++if ac_fn_c_try_cpp "$LINENO"; then :
++  # We can compile using X headers with no special include directory.
++ac_x_includes=
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  for ac_dir in $ac_x_header_dirs; do
++  if test -r "$ac_dir/X11/Xlib.h"; then
++    ac_x_includes=$ac_dir
++    break
++  fi
++done
++fi
++rm -f conftest.err conftest.$ac_ext
++fi # $ac_x_includes = no
+ 
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++if test "$ac_x_libraries" = no; then
++  # Check for the libraries.
++  # See if we find them without any special options.
++  # Don't add to $LIBS permanently.
++  ac_save_LIBS=$LIBS
++  LIBS="-lX11 $LIBS"
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
+-#if HAVE_SYS_SOCKET_H
+-#include <sys/socket.h>
+-#endif
+-#if HAVE_NET_IF_H
+-#include <net/if.h>
+-#endif
+-
++#include <X11/Xlib.h>
+ int
+ main ()
+ {
+-static struct ifreq ac_aggr;
+-if (sizeof ac_aggr.ifr_netmask)
+-return 0;
++XrmInitialize ()
+   ;
+   return 0;
+ }
+ _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_cv_member_struct_ifreq_ifr_netmask=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  LIBS=$ac_save_LIBS
++# We can link X programs with no special library path.
++ac_x_libraries=
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  LIBS=$ac_save_LIBS
++for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
++do
++  # Don't even attempt the hair of trying to link an X program!
++  for ac_extension in a so sl dylib la dll; do
++    if test -r "$ac_dir/libX11.$ac_extension"; then
++      ac_x_libraries=$ac_dir
++      break 2
++    fi
++  done
++done
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi # $ac_x_libraries = no
+ 
+-	ac_cv_member_struct_ifreq_ifr_netmask=no
++case $ac_x_includes,$ac_x_libraries in #(
++  no,* | *,no | *\'*)
++    # Didn't find X, or a directory has "'" in its name.
++    ac_cv_have_x="have_x=no";; #(
++  *)
++    # Record where we found X for the cache.
++    ac_cv_have_x="have_x=yes\
++	ac_x_includes='$ac_x_includes'\
++	ac_x_libraries='$ac_x_libraries'"
++esac
+ fi
++;; #(
++    *) have_x=yes;;
++  esac
++  eval "$ac_cv_have_x"
++fi # $with_x != no
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++if test "$have_x" != yes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
++$as_echo "$have_x" >&6; }
++  no_x=yes
++else
++  # If each of the values was on the command line, it overrides each guess.
++  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
++  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
++  # Update the cache value to reflect the command line values.
++  ac_cv_have_x="have_x=yes\
++	ac_x_includes='$x_includes'\
++	ac_x_libraries='$x_libraries'"
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
++$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++if test "$no_x" = yes; then
++  window_system=none
++else
++  window_system=x11
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
+-if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
+ 
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
+-_ACEOF
++## Workaround for bug in autoconf <= 2.62.
++## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
++## No need to do anything special for these standard directories.
++## This is an experiment, take it out if it causes problems.
++if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
+ 
++   x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
++
++fi
+ 
++if test "${x_libraries}" != NONE; then
++  if test -n "${x_libraries}"; then
++    LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
++    LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
++  fi
++  x_default_search_path=""
++  x_search_path=${x_libraries}
++  if test -z "${x_search_path}"; then
++    x_search_path=/usr/lib
++  fi
++  for x_library in `echo ${x_search_path}: | \
++		    sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
++    x_search_path="\
++${x_library}/X11/%L/%T/%N%C%S:\
++${x_library}/X11/%l/%T/%N%C%S:\
++${x_library}/X11/%T/%N%C%S:\
++${x_library}/X11/%L/%T/%N%S:\
++${x_library}/X11/%l/%T/%N%S:\
++${x_library}/X11/%T/%N%S"
++    if test x"${x_default_search_path}" = x; then
++      x_default_search_path=${x_search_path}
++    else
++      x_default_search_path="${x_search_path}:${x_default_search_path}"
++    fi
++  done
+ fi
+-{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
+-echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
+-if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++if test "${x_includes}" != NONE && test -n "${x_includes}"; then
++  C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
++fi
++
++if test x"${x_includes}" = x; then
++  bitmapdir=/usr/include/X11/bitmaps
+ else
+-  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
+-#if HAVE_SYS_SOCKET_H
+-#include <sys/socket.h>
+-#endif
+-#if HAVE_NET_IF_H
+-#include <net/if.h>
+-#endif
++  # accumulate include directories that have X11 bitmap subdirectories
++  bmd_acc="dummyval"
++  for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
++    if test -d "${bmd}/X11/bitmaps"; then
++      bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
++    fi
++    if test -d "${bmd}/bitmaps"; then
++      bmd_acc="${bmd_acc}:${bmd}/bitmaps"
++    fi
++  done
++  if test ${bmd_acc} != "dummyval"; then
++    bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
++  fi
++fi
+ 
+-int
+-main ()
+-{
+-static struct ifreq ac_aggr;
+-if (ac_aggr.ifr_broadaddr)
+-return 0;
+-  ;
+-  return 0;
+-}
+-_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_cv_member_struct_ifreq_ifr_broadaddr=yes
++HAVE_NS=no
++NS_IMPL_COCOA=no
++NS_IMPL_GNUSTEP=no
++tmp_CPPFLAGS="$CPPFLAGS"
++tmp_CFLAGS="$CFLAGS"
++CPPFLAGS="$CPPFLAGS -x objective-c"
++CFLAGS="$CFLAGS -x objective-c"
++if test "${with_ns}" != no; then
++  if test "${opsys}" = darwin; then
++     NS_IMPL_COCOA=yes
++     ns_appdir=`pwd`/nextstep/Emacs.app
++     ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
++     ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
++     ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
++  elif test -f $GNUSTEP_CONFIG_FILE; then
++     NS_IMPL_GNUSTEP=yes
++     ns_appdir=`pwd`/nextstep/Emacs.app
++     ns_appbindir=`pwd`/nextstep/Emacs.app
++     ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
++     ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
++          GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
++     GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
++     GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
++     CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
++     CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
++     REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
++     LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
++  fi
++  ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
++if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
++  HAVE_NS=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  as_fn_error "\`--with-ns' was specified, but the include
++  files are missing or cannot be compiled." "$LINENO" 5
++fi
+ 
+-	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
+-#if HAVE_SYS_SOCKET_H
+-#include <sys/socket.h>
+-#endif
+-#if HAVE_NET_IF_H
+-#include <net/if.h>
+-#endif
+ 
++  NS_HAVE_NSINTEGER=yes
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <Foundation/NSObjCRuntime.h>
+ int
+ main ()
+ {
+-static struct ifreq ac_aggr;
+-if (sizeof ac_aggr.ifr_broadaddr)
+-return 0;
++NSInteger i;
+   ;
+   return 0;
+ }
+ _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_cv_member_struct_ifreq_ifr_broadaddr=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  ns_have_nsinteger=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_member_struct_ifreq_ifr_broadaddr=no
++  ns_have_nsinteger=no
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  if test $ns_have_nsinteger = no; then
++    NS_HAVE_NSINTEGER=no
++  fi
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++if test "${HAVE_NS}" = yes; then
++  window_system=nextstep
++  with_xft=no
++  # set up packaging dirs
++  exec_prefix=${ns_appbindir}
++  libexecdir=${ns_appbindir}/libexec
++  if test "${EN_NS_SELF_CONTAINED}" = yes; then
++     prefix=${ns_appresdir}
++  fi
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
+-if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
++CFLAGS="$tmp_CFLAGS"
++CPPFLAGS="$tmp_CPPFLAGS"
+ 
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
+-_ACEOF
++case "${window_system}" in
++  x11 )
++    HAVE_X_WINDOWS=yes
++    HAVE_X11=yes
++    case "${with_x_toolkit}" in
++      athena | lucid ) USE_X_TOOLKIT=LUCID ;;
++      motif ) USE_X_TOOLKIT=MOTIF ;;
++      gtk ) with_gtk=yes
++            USE_X_TOOLKIT=none ;;
++      no ) USE_X_TOOLKIT=none ;;
++      * ) USE_X_TOOLKIT=maybe ;;
++    esac
++  ;;
++  nextstep | none )
++    HAVE_X_WINDOWS=no
++    HAVE_X11=no
++    USE_X_TOOLKIT=none
++  ;;
++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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
++  $as_echo_n "(cached) " >&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"
++    $as_echo "$as_me:${as_lineno-$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
+-{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
+-echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
+-if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
++if test -n "$HAVE_XSERVER"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
++$as_echo "$HAVE_XSERVER" >&6; }
+ else
+-  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
+-#if HAVE_SYS_SOCKET_H
+-#include <sys/socket.h>
+-#endif
+-#if HAVE_NET_IF_H
+-#include <net/if.h>
+-#endif
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
+-int
+-main ()
+-{
+-static struct ifreq ac_aggr;
+-if (ac_aggr.ifr_addr)
+-return 0;
+-  ;
+-  return 0;
+-}
+-_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;;
++
++   if test "$HAVE_XSERVER" = true ||
++      test -n "$DISPLAY" ||
++      test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
++        as_fn_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." "$LINENO" 5
++   fi
++fi
++
++### If we're using X11, we should use the X menu package.
++HAVE_MENUS=no
++case ${HAVE_X11} in
++  yes ) HAVE_MENUS=yes ;;
+ 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_cv_member_struct_ifreq_ifr_addr=yes
++
++# Do the opsystem or machine files prohibit the use of the GNU malloc?
++# Assume not, until told otherwise.
++GNU_MALLOC=yes
++doug_lea_malloc=yes
++ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
++if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
++
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  doug_lea_malloc=no
++fi
+ 
+-	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
+-#if HAVE_SYS_SOCKET_H
+-#include <sys/socket.h>
+-#endif
+-#if HAVE_NET_IF_H
+-#include <net/if.h>
+-#endif
++ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
++if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
+ 
++else
++  doug_lea_malloc=no
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
++$as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
++if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++extern void (* __after_morecore_hook)();
+ int
+ main ()
+ {
+-static struct ifreq ac_aggr;
+-if (sizeof ac_aggr.ifr_addr)
+-return 0;
++__after_morecore_hook = 0
+   ;
+   return 0;
+ }
+ _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_cv_member_struct_ifreq_ifr_addr=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  emacs_cv_var___after_morecore_hook=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_member_struct_ifreq_ifr_addr=no
++  emacs_cv_var___after_morecore_hook=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
++$as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
++if test $emacs_cv_var___after_morecore_hook = no; then
++  doug_lea_malloc=no
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
+-if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
+-
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
+-_ACEOF
++if test "${system_malloc}" = "yes"; then
++  GNU_MALLOC=no
++  GNU_MALLOC_reason="
++    (The GNU allocators don't work with this system configuration.)"
++fi
++if test "$doug_lea_malloc" = "yes" ; then
++  if test "$GNU_MALLOC" = yes ; then
++    GNU_MALLOC_reason="
++      (Using Doug Lea's new malloc from the GNU C Library.)"
++  fi
+ 
++$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
+ 
+ fi
+ 
++if test x"${REL_ALLOC}" = x; then
++  REL_ALLOC=${GNU_MALLOC}
++fi
+ 
+ 
+-{ echo "$as_me:$LINENO: checking for function prototypes" >&5
+-echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
+-if test "$ac_cv_prog_cc_c89" != no; then
+-  { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define PROTOTYPES 1
++for ac_header in stdlib.h unistd.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+ 
++fi
++
++done
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define __PROTOTYPES 1
++for ac_func in getpagesize
++do :
++  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
++if test "x$ac_cv_func_getpagesize" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETPAGESIZE 1
+ _ACEOF
+ 
+-else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+ fi
++done
+ 
+-{ echo "$as_me:$LINENO: checking for working volatile" >&5
+-echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
+-if test "${ac_cv_c_volatile+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
++$as_echo_n "checking for working mmap... " >&6; }
++if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_mmap_fixed_mapped=no
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
++$ac_includes_default
++/* malloc might have been renamed as rpl_malloc. */
++#undef malloc
++
++/* Thanks to Mike Haertel and Jim Avera for this test.
++   Here is a matrix of mmap possibilities:
++	mmap private not fixed
++	mmap private fixed at somewhere currently unmapped
++	mmap private fixed at somewhere already mapped
++	mmap shared not fixed
++	mmap shared fixed at somewhere currently unmapped
++	mmap shared fixed at somewhere already mapped
++   For private mappings, we should verify that changes cannot be read()
++   back from the file, nor mmap's back from the file at a different
++   address.  (There have been systems where private was not correctly
++   implemented like the infamous i386 svr4.0, and systems where the
++   VM page cache was not coherent with the file system buffer cache
++   like early versions of FreeBSD and possibly contemporary NetBSD.)
++   For shared mappings, we should conversely verify that changes get
++   propagated back to all the places they're supposed to be.
++
++   Grep wants private fixed already mapped.
++   The main things grep needs to know about mmap are:
++   * does it exist and is it safe to write into the mmap'd area
++   * how to use it (BSD variants)  */
++
++#include <fcntl.h>
++#include <sys/mman.h>
++
++#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
++char *malloc ();
++#endif
++
++/* This mess was copied from the GNU getpagesize.h.  */
++#ifndef HAVE_GETPAGESIZE
++/* Assume that all systems that can run configure have sys/param.h.  */
++# ifndef HAVE_SYS_PARAM_H
++#  define HAVE_SYS_PARAM_H 1
++# endif
++
++# ifdef _SC_PAGESIZE
++#  define getpagesize() sysconf(_SC_PAGESIZE)
++# else /* no _SC_PAGESIZE */
++#  ifdef HAVE_SYS_PARAM_H
++#   include <sys/param.h>
++#   ifdef EXEC_PAGESIZE
++#    define getpagesize() EXEC_PAGESIZE
++#   else /* no EXEC_PAGESIZE */
++#    ifdef NBPG
++#     define getpagesize() NBPG * CLSIZE
++#     ifndef CLSIZE
++#      define CLSIZE 1
++#     endif /* no CLSIZE */
++#    else /* no NBPG */
++#     ifdef NBPC
++#      define getpagesize() NBPC
++#     else /* no NBPC */
++#      ifdef PAGESIZE
++#       define getpagesize() PAGESIZE
++#      endif /* PAGESIZE */
++#     endif /* no NBPC */
++#    endif /* no NBPG */
++#   endif /* no EXEC_PAGESIZE */
++#  else /* no HAVE_SYS_PARAM_H */
++#   define getpagesize() 8192	/* punt totally */
++#  endif /* no HAVE_SYS_PARAM_H */
++# endif /* no _SC_PAGESIZE */
++
++#endif /* no HAVE_GETPAGESIZE */
+ 
+ int
+ main ()
+ {
++  char *data, *data2, *data3;
++  int i, pagesize;
++  int fd;
+ 
+-volatile int x;
+-int * volatile y = (int *) 0;
+-return !x && !y;
+-  ;
++  pagesize = getpagesize ();
++
++  /* First, make a file with some known garbage in it. */
++  data = (char *) malloc (pagesize);
++  if (!data)
++    return 1;
++  for (i = 0; i < pagesize; ++i)
++    *(data + i) = rand ();
++  umask (0);
++  fd = creat ("conftest.mmap", 0600);
++  if (fd < 0)
++    return 1;
++  if (write (fd, data, pagesize) != pagesize)
++    return 1;
++  close (fd);
++
++  /* Next, try to mmap the file at a fixed address which already has
++     something else allocated at it.  If we can, also make sure that
++     we see the same garbage.  */
++  fd = open ("conftest.mmap", O_RDWR);
++  if (fd < 0)
++    return 1;
++  data2 = (char *) malloc (2 * pagesize);
++  if (!data2)
++    return 1;
++  data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
++  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
++		     MAP_PRIVATE | MAP_FIXED, fd, 0L))
++    return 1;
++  for (i = 0; i < pagesize; ++i)
++    if (*(data + i) != *(data2 + i))
++      return 1;
++
++  /* Finally, make sure that changes to the mapped area do not
++     percolate back to the file as seen by read().  (This is a bug on
++     some variants of i386 svr4.0.)  */
++  for (i = 0; i < pagesize; ++i)
++    *(data2 + i) = *(data2 + i) + 1;
++  data3 = (char *) malloc (pagesize);
++  if (!data3)
++    return 1;
++  if (read (fd, data3, pagesize) != pagesize)
++    return 1;
++  for (i = 0; i < pagesize; ++i)
++    if (*(data + i) != *(data3 + i))
++      return 1;
++  close (fd);
+   return 0;
+ }
+ _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_cv_c_volatile=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_mmap_fixed_mapped=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_c_volatile=no
++  ac_cv_func_mmap_fixed_mapped=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
+-echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
+-if test $ac_cv_c_volatile = no; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
++$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
++if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define volatile
+-_ACEOF
++$as_echo "#define HAVE_MMAP 1" >>confdefs.h
+ 
+ fi
++rm -f conftest.mmap
++
++if test $use_mmap_for_buffers = yes; then
++  REL_ALLOC=no
++fi
++
++LIBS="$libsrc_libs $LIBS"
+ 
+-{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
+-if test "${ac_cv_c_const+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
++$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
++if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-ldnet  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-int
+-main ()
+-{
+-/* FIXME: Include the comments suggested by Paul. */
+-#ifndef __cplusplus
+-  /* Ultrix mips cc rejects this.  */
+-  typedef int charset[2];
+-  const charset cs;
+-  /* SunOS 4.1.1 cc rejects this.  */
+-  char const *const *pcpcc;
+-  char **ppc;
+-  /* NEC SVR4.0.2 mips cc rejects this.  */
+-  struct point {int x, y;};
+-  static struct point const zero = {0,0};
+-  /* AIX XL C 1.02.0.0 rejects this.
+-     It does not let you subtract one const X* pointer from another in
+-     an arm of an if-expression whose if-part is not a constant
+-     expression */
+-  const char *g = "string";
+-  pcpcc = &g + (g ? g-g : 0);
+-  /* HPUX 7.0 cc rejects these. */
+-  ++pcpcc;
+-  ppc = (char**) pcpcc;
+-  pcpcc = (char const *const *) ppc;
+-  { /* SCO 3.2v4 cc rejects this.  */
+-    char *t;
+-    char const *s = 0 ? (char *) 0 : (char const *) 0;
+-
+-    *t++ = 0;
+-    if (s) return 0;
+-  }
+-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+-    int x[] = {25, 17};
+-    const int *foo = &x[0];
+-    ++foo;
+-  }
+-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+-    typedef const int *iptr;
+-    iptr p = 0;
+-    ++p;
+-  }
+-  { /* AIX XL C 1.02.0.0 rejects this saying
+-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+-    struct s { int j; const int *ap[3]; };
+-    struct s *b; b->j = 5;
+-  }
+-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+-    const int foo = 10;
+-    if (!foo) return 0;
+-  }
+-  return !cs[0] && !zero.x;
++/* 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 dnet_ntoa ();
++int
++main ()
++{
++return dnet_ntoa ();
+   ;
+   return 0;
+ }
+ _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_cv_c_const=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_dnet_dnet_ntoa=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_c_const=no
++  ac_cv_lib_dnet_dnet_ntoa=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++rm -f core 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_c_const" >&5
+-echo "${ECHO_T}$ac_cv_c_const" >&6; }
+-if test $ac_cv_c_const = no; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define const
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
++$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
++if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBDNET 1
+ _ACEOF
+ 
++  LIBS="-ldnet $LIBS"
++
+ fi
+ 
+-{ echo "$as_me:$LINENO: checking for void * support" >&5
+-echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
+-if test "${emacs_cv_void_star+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
++$as_echo_n "checking for main in -lXbsd... " >&6; }
++if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lXbsd  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
++
+ int
+ main ()
+ {
+-void * foo;
++return main ();
+   ;
+   return 0;
+ }
+ _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
+-  emacs_cv_void_star=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_Xbsd_main=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_void_star=no
++  ac_cv_lib_Xbsd_main=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
+-echo "${ECHO_T}$emacs_cv_void_star" >&6; }
+-if test $emacs_cv_void_star = yes; then
+-  cat >>confdefs.h <<\_ACEOF
+-#define POINTER_TYPE void
+-_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
++$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
++if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
++  LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
++fi
++
+ 
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
++$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
++if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >>confdefs.h <<\_ACEOF
+-#define POINTER_TYPE char
+-_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lpthreads  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* 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 cma_open ();
++int
++main ()
++{
++return cma_open ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_pthreads_cma_open=yes
++else
++  ac_cv_lib_pthreads_cma_open=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
++$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
++if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBPTHREADS 1
++_ACEOF
+ 
++  LIBS="-lpthreads $LIBS"
+ 
++fi
+ 
+ 
+ 
+-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  cat >conftest.make <<\_ACEOF
+-SHELL = /bin/sh
+-all:
+-	@echo '@@@%%%=$(MAKE)=@@@%%%'
+-_ACEOF
+-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+-case `${MAKE-make} -f conftest.make 2>/dev/null` in
+-  *@@@%%%=?*=@@@%%%*)
+-    eval ac_cv_prog_make_${ac_make}_set=yes;;
+-  *)
+-    eval ac_cv_prog_make_${ac_make}_set=no;;
+-esac
+-rm -f conftest.make
+-fi
+-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+-  { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-  SET_MAKE=
++case ${host_os} in
++aix*)
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
++$as_echo_n "checking for -bbigtoc option... " >&6; }
++if test "${gdb_cv_bigtoc+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-  SET_MAKE="MAKE=${MAKE-make}"
+-fi
+ 
++    case $GCC in
++    yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
++    *) gdb_cv_bigtoc=-bbigtoc ;;
++    esac
+ 
+-{ echo "$as_me:$LINENO: checking for long file names" >&5
+-echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
+-if test "${ac_cv_sys_long_file_names+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_sys_long_file_names=yes
+-# Test for long file names in all the places we know might matter:
+-#      .		the current directory, where building will happen
+-#      $prefix/lib	where we will be installing things
+-#      $exec_prefix/lib	likewise
+-#      $TMPDIR		if set, where it might want to write temporary files
+-#      /tmp		where it might want to write temporary files
+-#      /var/tmp		likewise
+-#      /usr/tmp		likewise
+-for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
+-  # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
+-  # in the usual case where exec_prefix is '${prefix}'.
+-  case $ac_dir in #(
+-    . | /* | ?:[\\/]*) ;; #(
+-    *) continue;;
+-  esac
+-  test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
+-  ac_xdir=$ac_dir/cf$$
+-  (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
+-  ac_tf1=$ac_xdir/conftest9012345
+-  ac_tf2=$ac_xdir/conftest9012346
+-  touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
+-    ac_cv_sys_long_file_names=no
+-  rm -f -r "$ac_xdir" 2>/dev/null
+-  test $ac_cv_sys_long_file_names = no && break
+-done
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
+-echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
+-if test $ac_cv_sys_long_file_names = yes; then
++    LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_LONG_FILE_NAMES 1
++int
++main ()
++{
++int i;
++  ;
++  return 0;
++}
+ _ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
+ 
++else
++  gdb_cv_bigtoc=
+ fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
++$as_echo "$gdb_cv_bigtoc" >&6; }
++  ;;
++esac
+ 
+-#### Choose a window system.
++# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
++# used for the tests that follow.  We set them back to REAL_CFLAGS and
++# REAL_CPPFLAGS later on.
+ 
+-{ echo "$as_me:$LINENO: checking for X" >&5
+-echo $ECHO_N "checking for X... $ECHO_C" >&6; }
++REAL_CPPFLAGS="$CPPFLAGS"
+ 
++if test "${HAVE_X11}" = "yes"; then
++  DEFS="$C_SWITCH_X_SITE $DEFS"
++  LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
++  LIBS="$LIBX $LIBS"
++  CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
++  CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
+ 
+-# Check whether --with-x was given.
+-if test "${with_x+set}" = set; then
+-  withval=$with_x;
+-fi
++  # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
++  # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
++  # but it's more convenient here to set LD_RUN_PATH
++  # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
++  if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
++    LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
++    export LD_RUN_PATH
++  fi
+ 
+-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+-if test "x$with_x" = xno; then
+-  # The user explicitly disabled X.
+-  have_x=disabled
+-else
+-  case $x_includes,$x_libraries in #(
+-    *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
+-echo "$as_me: error: Cannot use X directory names containing '" >&2;}
+-   { (exit 1); exit 1; }; };; #(
+-    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  # One or both of the vars are not set, and there is no cached value.
+-ac_x_includes=no ac_x_libraries=no
+-rm -f -r conftest.dir
+-if mkdir conftest.dir; then
+-  cd conftest.dir
+-  cat >Imakefile <<'_ACEOF'
+-incroot:
+-	@echo incroot='${INCROOT}'
+-usrlibdir:
+-	@echo usrlibdir='${USRLIBDIR}'
+-libdir:
+-	@echo libdir='${LIBDIR}'
++  if test "${opsys}" = "gnu-linux"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
++$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++XOpenDisplay ("foo");
++  ;
++  return 0;
++}
+ _ACEOF
+-  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+-    for ac_var in incroot usrlibdir libdir; do
+-      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+-    done
+-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+-    for ac_extension in a so sl; do
+-      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+-	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
+-	ac_im_usrlibdir=$ac_im_libdir; break
+-      fi
+-    done
+-    # Screen out bogus values from the imake configuration.  They are
+-    # bogus both because they are the default anyway, and because
+-    # using them would break gcc on systems where it needs fixed includes.
+-    case $ac_im_incroot in
+-	/usr/include) ac_x_includes= ;;
+-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+-    esac
+-    case $ac_im_usrlibdir in
+-	/usr/lib | /lib) ;;
+-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+-    esac
+-  fi
+-  cd ..
+-  rm -f -r conftest.dir
++if ac_fn_c_try_link "$LINENO"; then :
++  xlinux_first_failure=no
++else
++  xlinux_first_failure=yes
+ fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++    if test "${xlinux_first_failure}" = "yes"; then
++      OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
++      OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
++      OLD_CPPFLAGS="$CPPFLAGS"
++      OLD_LIBS="$LIBS"
++      LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
++      C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
++      CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
++      LIBS="$LIBS -b i486-linuxaout"
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-# Standard set of common directories for X headers.
+-# Check X11 before X11Rn because it is often a symlink to the current release.
+-ac_x_header_dirs='
+-/usr/X11/include
+-/usr/X11R6/include
+-/usr/X11R5/include
+-/usr/X11R4/include
+-
+-/usr/include/X11
+-/usr/include/X11R6
+-/usr/include/X11R5
+-/usr/include/X11R4
+-
+-/usr/local/X11/include
+-/usr/local/X11R6/include
+-/usr/local/X11R5/include
+-/usr/local/X11R4/include
+-
+-/usr/local/include/X11
+-/usr/local/include/X11R6
+-/usr/local/include/X11R5
+-/usr/local/include/X11R4
+-
+-/usr/X386/include
+-/usr/x386/include
+-/usr/XFree86/include/X11
+-
+-/usr/include
+-/usr/local/include
+-/usr/unsupported/include
+-/usr/athena/include
+-/usr/local/x11r5/include
+-/usr/lpp/Xamples/include
+-
+-/usr/openwin/include
+-/usr/openwin/share/include'
+-
+-if test "$ac_x_includes" = no; then
+-  # Guess where to find include files, by looking for Xlib.h.
+-  # First, try using that file with no special directory specified.
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++int
++main ()
++{
++XOpenDisplay ("foo");
++  ;
++  return 0;
++}
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  xlinux_second_failure=no
++else
++  xlinux_second_failure=yes
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++      if test "${xlinux_second_failure}" = "yes"; then
++	# If we get the same failure with -b, there is no use adding -b.
++	# So take it out.  This plays safe.
++	LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
++	C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
++	CPPFLAGS="$OLD_CPPFLAGS"
++	LIBS="$OLD_LIBS"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++      else
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++      fi
++    else
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++    fi
++  fi
++
++  # Reportedly, some broken Solaris systems have XKBlib.h but are missing
++  # header files included from there.
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
++$as_echo_n "checking for Xkb... " >&6; }
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <X11/Xlib.h>
++#include <X11/XKBlib.h>
++int
++main ()
++{
++XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
++  ;
++  return 0;
++}
+ _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
+-  # We can compile using X headers with no special include directory.
+-ac_x_includes=
++if ac_fn_c_try_link "$LINENO"; then :
++  emacs_xkb=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  emacs_xkb=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
++$as_echo "$emacs_xkb" >&6; }
++  if test $emacs_xkb = yes; then
++
++$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
+ 
+-  for ac_dir in $ac_x_header_dirs; do
+-  if test -r "$ac_dir/X11/Xlib.h"; then
+-    ac_x_includes=$ac_dir
+-    break
+   fi
+-done
++
++  for ac_func in XrmSetDatabase XScreenResourceString \
++XScreenNumberOfScreen XSetWMProtocols
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
+ fi
++done
+ 
+-rm -f conftest.err conftest.$ac_ext
+-fi # $ac_x_includes = no
++fi
+ 
+-if test "$ac_x_libraries" = no; then
+-  # Check for the libraries.
+-  # See if we find them without any special options.
+-  # Don't add to $LIBS permanently.
+-  ac_save_LIBS=$LIBS
+-  LIBS="-lX11 $LIBS"
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++if test "${window_system}" = "x11"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
++$as_echo_n "checking X11 version 6... " >&6; }
++  if test "${emacs_cv_x11_version_6+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <X11/Xlib.h>
+ int
+ main ()
+ {
+-XrmInitialize ()
++#if XlibSpecificationRelease < 6
++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
+-  LIBS=$ac_save_LIBS
+-# We can link X programs with no special library path.
+-ac_x_libraries=
++if ac_fn_c_try_link "$LINENO"; then :
++  emacs_cv_x11_version_6=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  emacs_cv_x11_version_6=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi
+ 
+-	LIBS=$ac_save_LIBS
+-for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+-do
+-  # Don't even attempt the hair of trying to link an X program!
+-  for ac_extension in a so sl; do
+-    if test -r "$ac_dir/libX11.$ac_extension"; then
+-      ac_x_libraries=$ac_dir
+-      break 2
+-    fi
+-  done
+-done
++  if test $emacs_cv_x11_version_6 = yes; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
++$as_echo "6 or newer" >&6; }
++
++$as_echo "#define HAVE_X11R6 1" >>confdefs.h
++
++  else
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
++$as_echo "before 6" >&6; }
++  fi
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi # $ac_x_libraries = no
+ 
+-case $ac_x_includes,$ac_x_libraries in #(
+-  no,* | *,no | *\'*)
+-    # Didn't find X, or a directory has "'" in its name.
+-    ac_cv_have_x="have_x=no";; #(
++### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
++HAVE_RSVG=no
++if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
++  if test "${with_rsvg}" != "no"; then
++    RSVG_REQUIRED=2.11.0
++    RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
++
++
++  succeeded=no
++
++  # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  case $PKG_CONFIG in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
++  ;;
+   *)
+-    # Record where we found X for the cache.
+-    ac_cv_have_x="have_x=yes\
+-	ac_x_includes='$ac_x_includes'\
+-	ac_x_libraries='$ac_x_libraries'"
++  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"
++    $as_echo "$as_me:${as_lineno-$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
+-;; #(
+-    *) have_x=yes;;
+-  esac
+-  eval "$ac_cv_have_x"
+-fi # $with_x != no
+-
+-if test "$have_x" != yes; then
+-  { echo "$as_me:$LINENO: result: $have_x" >&5
+-echo "${ECHO_T}$have_x" >&6; }
+-  no_x=yes
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
+ else
+-  # If each of the values was on the command line, it overrides each guess.
+-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+-  # Update the cache value to reflect the command line values.
+-  ac_cv_have_x="have_x=yes\
+-	ac_x_includes='$x_includes'\
+-	ac_x_libraries='$x_libraries'"
+-  { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
+-echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+-if test "$no_x" = yes; then
+-  window_system=none
+-else
+-  window_system=x11
+-fi
+ 
+-## Workaround for bug in autoconf <= 2.62.
+-## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
+-## No need to do anything special for these standard directories.
+-## This is an experiment, take it out if it causes problems.
+-if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
+ 
+-   x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
++  if test "$PKG_CONFIG" = "no" ; then
++     :
++  else
++     PKG_CONFIG_MIN_VERSION=0.9.0
++     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
++$as_echo_n "checking for $RSVG_MODULE... " >&6; }
+ 
+-fi
++        if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++            succeeded=yes
+ 
+-if test "${x_libraries}" != NONE; then
+-  if test -n "${x_libraries}"; then
+-    LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
+-    LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
+-  fi
+-  x_default_search_path=""
+-  x_search_path=${x_libraries}
+-  if test -z "${x_search_path}"; then
+-    x_search_path=/usr/lib
+-  fi
+-  for x_library in `echo ${x_search_path}: | \
+-		    sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
+-    x_search_path="\
+-${x_library}/X11/%L/%T/%N%C%S:\
+-${x_library}/X11/%l/%T/%N%C%S:\
+-${x_library}/X11/%T/%N%C%S:\
+-${x_library}/X11/%L/%T/%N%S:\
+-${x_library}/X11/%l/%T/%N%S:\
+-${x_library}/X11/%T/%N%S"
+-    if test x"${x_default_search_path}" = x; then
+-      x_default_search_path=${x_search_path}
+-    else
+-      x_default_search_path="${x_search_path}:${x_default_search_path}"
+-    fi
+-  done
+-fi
+-if test "${x_includes}" != NONE && test -n "${x_includes}"; then
+-  C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
+-fi
+-
+-if test x"${x_includes}" = x; then
+-  bitmapdir=/usr/include/X11/bitmaps
+-else
+-  # accumulate include directories that have X11 bitmap subdirectories
+-  bmd_acc="dummyval"
+-  for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
+-    if test -d "${bmd}/X11/bitmaps"; then
+-      bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
+-    fi
+-    if test -d "${bmd}/bitmaps"; then
+-      bmd_acc="${bmd_acc}:${bmd}/bitmaps"
+-    fi
+-  done
+-  if test ${bmd_acc} != "dummyval"; then
+-    bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
+-  fi
+-fi
+-
+-HAVE_NS=no
+-NS_IMPL_COCOA=no
+-NS_IMPL_GNUSTEP=no
+-tmp_CPPFLAGS="$CPPFLAGS"
+-tmp_CFLAGS="$CFLAGS"
+-CPPFLAGS="$CPPFLAGS -x objective-c"
+-CFLAGS="$CFLAGS -x objective-c"
+-if test "${with_ns}" != no; then
+-  if test "${opsys}" = darwin; then
+-     NS_IMPL_COCOA=yes
+-     ns_appdir=`pwd`/nextstep/Emacs.app
+-     ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
+-     ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
+-     ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
+-  elif test -f $GNUSTEP_CONFIG_FILE; then
+-     NS_IMPL_GNUSTEP=yes
+-     ns_appdir=`pwd`/nextstep/Emacs.app
+-     ns_appbindir=`pwd`/nextstep/Emacs.app
+-     ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
+-     ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
+-          GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
+-     GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
+-     GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
+-     CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
+-     CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
+-     REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
+-     LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
+-  fi
+-  if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
+-echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
+-echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking AppKit/AppKit.h usability" >&5
+-echo $ECHO_N "checking AppKit/AppKit.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 <AppKit/AppKit.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
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5
++$as_echo_n "checking RSVG_CFLAGS... " >&6; }
++            RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5
++$as_echo "$RSVG_CFLAGS" >&6; }
+ 
+-	ac_header_compiler=no
+-fi
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5
++$as_echo_n "checking RSVG_LIBS... " >&6; }
++            RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5
++$as_echo "$RSVG_LIBS" >&6; }
++        else
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++            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.
++            RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
+ 
+-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; }
++        fi
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking AppKit/AppKit.h presence" >&5
+-echo $ECHO_N "checking AppKit/AppKit.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 <AppKit/AppKit.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; }
++     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
+ 
+-# 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: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: AppKit/AppKit.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: AppKit/AppKit.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&2;}
++  if test $succeeded = yes; then
++     :
++  else
++     :
++  fi
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
+-echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_AppKit_AppKit_h=$ac_header_preproc
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
+-echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
+ 
+-fi
+-if test $ac_cv_header_AppKit_AppKit_h = yes; then
+-  HAVE_NS=yes
+-else
+-  { { echo "$as_me:$LINENO: error: \`--with-ns' was specified, but the include
+-  files are missing or cannot be compiled." >&5
+-echo "$as_me: error: \`--with-ns' was specified, but the include
+-  files are missing or cannot be compiled." >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+ 
+ 
+-  NS_HAVE_NSINTEGER=yes
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <Foundation/NSObjCRuntime.h>
+-int
+-main ()
+-{
+-NSInteger i;
+-  ;
+-  return 0;
+-}
+-_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
+-  ns_have_nsinteger=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++    if test ".${RSVG_CFLAGS}" != "."; then
++      HAVE_RSVG=yes
+ 
+-	ns_have_nsinteger=no
+-fi
++$as_echo "#define HAVE_RSVG 1" >>confdefs.h
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-  if test $ns_have_nsinteger = no; then
+-    NS_HAVE_NSINTEGER=no
+-  fi
+-fi
+-if test "${HAVE_NS}" = yes; then
+-  window_system=nextstep
+-  with_xft=no
+-  # set up packaging dirs
+-  exec_prefix=${ns_appbindir}
+-  libexecdir=${ns_appbindir}/libexec
+-  if test "${EN_NS_SELF_CONTAINED}" = yes; then
+-     prefix=${ns_appresdir}
++      CFLAGS="$CFLAGS $RSVG_CFLAGS"
++      LIBS="$RSVG_LIBS $LIBS"
++    fi
+   fi
+ fi
+-CFLAGS="$tmp_CFLAGS"
+-CPPFLAGS="$tmp_CPPFLAGS"
+ 
+-case "${window_system}" in
+-  x11 )
+-    HAVE_X_WINDOWS=yes
+-    HAVE_X11=yes
+-    case "${with_x_toolkit}" in
+-      athena | lucid ) USE_X_TOOLKIT=LUCID ;;
+-      motif ) USE_X_TOOLKIT=MOTIF ;;
+-      gtk ) with_gtk=yes
+-            USE_X_TOOLKIT=none ;;
+-      no ) USE_X_TOOLKIT=none ;;
+-      * ) USE_X_TOOLKIT=maybe ;;
+-    esac
+-  ;;
+-  nextstep | none )
+-    HAVE_X_WINDOWS=no
+-    HAVE_X11=no
+-    USE_X_TOOLKIT=none
+-  ;;
+-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.
++HAVE_GTK=no
++if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
++  GLIB_REQUIRED=2.6
++  GTK_REQUIRED=2.6
++  GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
++
++
++  succeeded=no
++
++  # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++  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
++    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
++    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
+ IFS=$as_save_IFS
+ 
+-  test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
+-fi
++  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
++  ;;
++esac
+ 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; }
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
+ else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "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
+-  yes ) HAVE_MENUS=yes ;;
+-esac
+-
+-# Do the opsystem or machine files prohibit the use of the GNU malloc?
+-# Assume not, until told otherwise.
+-GNU_MALLOC=yes
+-doug_lea_malloc=yes
+-{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
+-echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
+-if test "${ac_cv_func_malloc_get_state+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 malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define malloc_get_state innocuous_malloc_get_state
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char malloc_get_state (); 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 malloc_get_state
+-
+-/* 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 malloc_get_state ();
+-/* 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_malloc_get_state || defined __stub___malloc_get_state
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return malloc_get_state ();
+-  ;
+-  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_func_malloc_get_state=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_malloc_get_state=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: $ac_cv_func_malloc_get_state" >&5
+-echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
+-if test $ac_cv_func_malloc_get_state = yes; then
+-  :
+-else
+-  doug_lea_malloc=no
+-fi
+-
+-{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
+-echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
+-if test "${ac_cv_func_malloc_set_state+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 malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define malloc_set_state innocuous_malloc_set_state
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char malloc_set_state (); 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 malloc_set_state
++  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
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
++$as_echo_n "checking for $GTK_MODULES... " >&6; }
+ 
+-/* 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 malloc_set_state ();
+-/* 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_malloc_set_state || defined __stub___malloc_set_state
+-choke me
+-#endif
++        if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++            succeeded=yes
+ 
+-int
+-main ()
+-{
+-return malloc_set_state ();
+-  ;
+-  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_func_malloc_set_state=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
++$as_echo_n "checking GTK_CFLAGS... " >&6; }
++            GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
++$as_echo "$GTK_CFLAGS" >&6; }
+ 
+-	ac_cv_func_malloc_set_state=no
+-fi
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
++$as_echo_n "checking GTK_LIBS... " >&6; }
++            GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
++$as_echo "$GTK_LIBS" >&6; }
++        else
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "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"`
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
+-echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
+-if test $ac_cv_func_malloc_set_state = yes; then
+-  :
+-else
+-  doug_lea_malloc=no
+-fi
++        fi
+ 
+-{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
+-echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
+-if test "${emacs_cv_var___after_morecore_hook+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.  */
+-extern void (* __after_morecore_hook)();
+-int
+-main ()
+-{
+-__after_morecore_hook = 0
+-  ;
+-  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_var___after_morecore_hook=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	emacs_cv_var___after_morecore_hook=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_var___after_morecore_hook" >&5
+-echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
+-if test $emacs_cv_var___after_morecore_hook = no; then
+-  doug_lea_malloc=no
+-fi
+-if test "${system_malloc}" = "yes"; then
+-  GNU_MALLOC=no
+-  GNU_MALLOC_reason="
+-    (The GNU allocators don't work with this system configuration.)"
+-fi
+-if test "$doug_lea_malloc" = "yes" ; then
+-  if test "$GNU_MALLOC" = yes ; then
+-    GNU_MALLOC_reason="
+-      (Using Doug Lea's new malloc from the GNU C Library.)"
++     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
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define DOUG_LEA_MALLOC 1
+-_ACEOF
+-
+-fi
+-
+-if test x"${REL_ALLOC}" = x; then
+-  REL_ALLOC=${GNU_MALLOC}
+-fi
+-
+-
+-
+-
+-for ac_header in stdlib.h unistd.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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
++  if test $succeeded = yes; then
++     pkg_check_gtk=yes
++  else
++     pkg_check_gtk=no
++  fi
+ 
+-	ac_header_compiler=no
++  if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
++     as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
++  fi
+ 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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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; }
++if test x"$pkg_check_gtk" = xyes; then
+ 
+-# 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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+ 
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; 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 :
++  ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
++if test "x$ac_cv_func_gtk_main" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_GTK_MAIN 1
+ _ACEOF
+-
++ GTK_COMPILES=yes
+ fi
+-
+ done
+ 
++  if test "${GTK_COMPILES}" != "yes"; then
++    if test "$USE_X_TOOLKIT" != "maybe"; then
++      as_fn_error "Gtk+ wanted, but it does not compile, see config.log.  Maybe some x11-devel files missing?" "$LINENO" 5;
++    fi
++  else
++    HAVE_GTK=yes
+ 
+-for ac_func in getpagesize
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
++$as_echo "#define USE_GTK 1" >>confdefs.h
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-done
+-
+-{ echo "$as_me:$LINENO: checking for working mmap" >&5
+-echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
+-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test "$cross_compiling" = yes; then
+-  ac_cv_func_mmap_fixed_mapped=no
+-else
+-  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
+-/* malloc might have been renamed as rpl_malloc. */
+-#undef malloc
+-
+-/* Thanks to Mike Haertel and Jim Avera for this test.
+-   Here is a matrix of mmap possibilities:
+-	mmap private not fixed
+-	mmap private fixed at somewhere currently unmapped
+-	mmap private fixed at somewhere already mapped
+-	mmap shared not fixed
+-	mmap shared fixed at somewhere currently unmapped
+-	mmap shared fixed at somewhere already mapped
+-   For private mappings, we should verify that changes cannot be read()
+-   back from the file, nor mmap's back from the file at a different
+-   address.  (There have been systems where private was not correctly
+-   implemented like the infamous i386 svr4.0, and systems where the
+-   VM page cache was not coherent with the file system buffer cache
+-   like early versions of FreeBSD and possibly contemporary NetBSD.)
+-   For shared mappings, we should conversely verify that changes get
+-   propagated back to all the places they're supposed to be.
+-
+-   Grep wants private fixed already mapped.
+-   The main things grep needs to know about mmap are:
+-   * does it exist and is it safe to write into the mmap'd area
+-   * how to use it (BSD variants)  */
+-
+-#include <fcntl.h>
+-#include <sys/mman.h>
+-
+-#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
+-char *malloc ();
+-#endif
+-
+-/* This mess was copied from the GNU getpagesize.h.  */
+-#ifndef HAVE_GETPAGESIZE
+-/* Assume that all systems that can run configure have sys/param.h.  */
+-# ifndef HAVE_SYS_PARAM_H
+-#  define HAVE_SYS_PARAM_H 1
+-# endif
+-
+-# ifdef _SC_PAGESIZE
+-#  define getpagesize() sysconf(_SC_PAGESIZE)
+-# else /* no _SC_PAGESIZE */
+-#  ifdef HAVE_SYS_PARAM_H
+-#   include <sys/param.h>
+-#   ifdef EXEC_PAGESIZE
+-#    define getpagesize() EXEC_PAGESIZE
+-#   else /* no EXEC_PAGESIZE */
+-#    ifdef NBPG
+-#     define getpagesize() NBPG * CLSIZE
+-#     ifndef CLSIZE
+-#      define CLSIZE 1
+-#     endif /* no CLSIZE */
+-#    else /* no NBPG */
+-#     ifdef NBPC
+-#      define getpagesize() NBPC
+-#     else /* no NBPC */
+-#      ifdef PAGESIZE
+-#       define getpagesize() PAGESIZE
+-#      endif /* PAGESIZE */
+-#     endif /* no NBPC */
+-#    endif /* no NBPG */
+-#   endif /* no EXEC_PAGESIZE */
+-#  else /* no HAVE_SYS_PARAM_H */
+-#   define getpagesize() 8192	/* punt totally */
+-#  endif /* no HAVE_SYS_PARAM_H */
+-# endif /* no _SC_PAGESIZE */
+-
+-#endif /* no HAVE_GETPAGESIZE */
+-
+-int
+-main ()
+-{
+-  char *data, *data2, *data3;
+-  int i, pagesize;
+-  int fd;
+-
+-  pagesize = getpagesize ();
+-
+-  /* First, make a file with some known garbage in it. */
+-  data = (char *) malloc (pagesize);
+-  if (!data)
+-    return 1;
+-  for (i = 0; i < pagesize; ++i)
+-    *(data + i) = rand ();
+-  umask (0);
+-  fd = creat ("conftest.mmap", 0600);
+-  if (fd < 0)
+-    return 1;
+-  if (write (fd, data, pagesize) != pagesize)
+-    return 1;
+-  close (fd);
+-
+-  /* Next, try to mmap the file at a fixed address which already has
+-     something else allocated at it.  If we can, also make sure that
+-     we see the same garbage.  */
+-  fd = open ("conftest.mmap", O_RDWR);
+-  if (fd < 0)
+-    return 1;
+-  data2 = (char *) malloc (2 * pagesize);
+-  if (!data2)
+-    return 1;
+-  data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
+-  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+-		     MAP_PRIVATE | MAP_FIXED, fd, 0L))
+-    return 1;
+-  for (i = 0; i < pagesize; ++i)
+-    if (*(data + i) != *(data2 + i))
+-      return 1;
+-
+-  /* Finally, make sure that changes to the mapped area do not
+-     percolate back to the file as seen by read().  (This is a bug on
+-     some variants of i386 svr4.0.)  */
+-  for (i = 0; i < pagesize; ++i)
+-    *(data2 + i) = *(data2 + i) + 1;
+-  data3 = (char *) malloc (pagesize);
+-  if (!data3)
+-    return 1;
+-  if (read (fd, data3, pagesize) != pagesize)
+-    return 1;
+-  for (i = 0; i < pagesize; ++i)
+-    if (*(data + i) != *(data3 + i))
+-      return 1;
+-  close (fd);
+-  return 0;
+-}
+-_ACEOF
+-rm -f 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>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (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_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_func_mmap_fixed_mapped=yes
+-else
+-  echo "$as_me: program exited with status $ac_status" >&5
+-echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-( exit $ac_status )
+-ac_cv_func_mmap_fixed_mapped=no
+-fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+-fi
+-
+-
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
+-echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
+-if test $ac_cv_func_mmap_fixed_mapped = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_MMAP 1
+-_ACEOF
+-
+-fi
+-rm -f conftest.mmap
+-
+-if test $use_mmap_for_buffers = yes; then
+-  REL_ALLOC=no
+-fi
+-
+-LIBS="$libsrc_libs $LIBS"
+-
+-
+-{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
+-echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ldnet  $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 dnet_ntoa ();
+-int
+-main ()
+-{
+-return dnet_ntoa ();
+-  ;
+-  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_dnet_dnet_ntoa=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_dnet_dnet_ntoa=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_dnet_dnet_ntoa" >&5
+-echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+-if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBDNET 1
+-_ACEOF
+-
+-  LIBS="-ldnet $LIBS"
+-
+-fi
+-
+-
+-{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
+-echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_Xbsd_main+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lXbsd  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-
+-int
+-main ()
+-{
+-return 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
+-  ac_cv_lib_Xbsd_main=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_Xbsd_main=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_Xbsd_main" >&5
+-echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
+-if test $ac_cv_lib_Xbsd_main = yes; then
+-  LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
+-fi
+-
+-
+-
+-{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
+-echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lpthreads  $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 cma_open ();
+-int
+-main ()
+-{
+-return cma_open ();
+-  ;
+-  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_pthreads_cma_open=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_pthreads_cma_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_pthreads_cma_open" >&5
+-echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
+-if test $ac_cv_lib_pthreads_cma_open = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBPTHREADS 1
+-_ACEOF
+-
+-  LIBS="-lpthreads $LIBS"
+-
+-fi
+-
+-
+-
+-case ${host_os} in
+-aix*)
+-  { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
+-echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
+-if test "${gdb_cv_bigtoc+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-
+-    case $GCC in
+-    yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
+-    *) gdb_cv_bigtoc=-bbigtoc ;;
+-    esac
+-
+-    LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
+-    cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-int i;
+-  ;
+-  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
+-  :
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	gdb_cv_bigtoc=
+-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: $gdb_cv_bigtoc" >&5
+-echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
+-  ;;
+-esac
+-
+-# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
+-# used for the tests that follow.  We set them back to REAL_CFLAGS and
+-# REAL_CPPFLAGS later on.
+-
+-REAL_CPPFLAGS="$CPPFLAGS"
+-
+-if test "${HAVE_X11}" = "yes"; then
+-  DEFS="$C_SWITCH_X_SITE $DEFS"
+-  LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
+-  LIBS="$LIBX $LIBS"
+-  CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
+-  CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
+-
+-  # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
+-  # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
+-  # but it's more convenient here to set LD_RUN_PATH
+-  # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
+-  if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
+-    LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
+-    export LD_RUN_PATH
+-  fi
+-
+-  if test "${opsys}" = "gnu-linux"; then
+-    { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
+-echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $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.  */
+-
+-int
+-main ()
+-{
+-XOpenDisplay ("foo");
+-  ;
+-  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
+-  xlinux_first_failure=no
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	xlinux_first_failure=yes
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-    if test "${xlinux_first_failure}" = "yes"; then
+-      OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
+-      OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
+-      OLD_CPPFLAGS="$CPPFLAGS"
+-      OLD_LIBS="$LIBS"
+-      LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
+-      C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
+-      CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
+-      LIBS="$LIBS -b i486-linuxaout"
+-      cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-XOpenDisplay ("foo");
+-  ;
+-  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
+-  xlinux_second_failure=no
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	xlinux_second_failure=yes
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-      if test "${xlinux_second_failure}" = "yes"; then
+-	# If we get the same failure with -b, there is no use adding -b.
+-	# So take it out.  This plays safe.
+-	LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
+-	C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
+-	CPPFLAGS="$OLD_CPPFLAGS"
+-	LIBS="$OLD_LIBS"
+-        { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-      else
+-        { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-      fi
+-    else
+-      { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-    fi
+-  fi
+-
+-  # Reportedly, some broken Solaris systems have XKBlib.h but are missing
+-  # header files included from there.
+-  { echo "$as_me:$LINENO: checking for Xkb" >&5
+-echo $ECHO_N "checking for Xkb... $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 <X11/Xlib.h>
+-#include <X11/XKBlib.h>
+-int
+-main ()
+-{
+-XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
+-  ;
+-  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_xkb=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_xkb=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: $emacs_xkb" >&5
+-echo "${ECHO_T}$emacs_xkb" >&6; }
+-  if test $emacs_xkb = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_XKBGETKEYBOARD 1
+-_ACEOF
+-
+-  fi
+-
+-
+-
+-
+-
+-for ac_func in XrmSetDatabase XScreenResourceString \
+-XScreenNumberOfScreen XSetWMProtocols
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* Override any 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-done
+-
+-fi
+-
+-if test "${window_system}" = "x11"; then
+-  { echo "$as_me:$LINENO: checking X11 version 6" >&5
+-echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
+-  if test "${emacs_cv_x11_version_6+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 < 6
+-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_6=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_x11_version_6=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_6 = yes; then
+-    { echo "$as_me:$LINENO: result: 6 or newer" >&5
+-echo "${ECHO_T}6 or newer" >&6; }
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_X11R6 1
+-_ACEOF
+-
+-  else
+-    { echo "$as_me:$LINENO: result: before 6" >&5
+-echo "${ECHO_T}before 6" >&6; }
+-  fi
+-fi
+-
+-
+-### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
+-HAVE_RSVG=no
+-if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
+-  if test "${with_rsvg}" != "no"; then
+-    RSVG_REQUIRED=2.11.0
+-    RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
+-
+-
+-  succeeded=no
+-
+-  # 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
+-
+-
+-
+-  if test "$PKG_CONFIG" = "no" ; then
+-     :
+-  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 $RSVG_MODULE" >&5
+-echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
+-
+-        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 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; }
+-            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.
+-            RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
+-
+-        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
+-     :
+-  else
+-     :
+-  fi
+-
+-
+-
+-
+-    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" = "maybe"; then
+-  GLIB_REQUIRED=2.6
+-  GTK_REQUIRED=2.6
+-  GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
+-
+-
+-  succeeded=no
+-
+-  # 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
+-
+-
+-
+-  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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* Override any 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+- GTK_COMPILES=yes
+-fi
+-done
+-
+-  if test "${GTK_COMPILES}" != "yes"; then
+-    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
+-  else
+-    HAVE_GTK=yes
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define USE_GTK 1
+-_ACEOF
+-
+-    USE_X_TOOLKIT=none
+-    if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
+-      :
+-    else
+-      { echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with
+-       closing open displays.  This is no problem if you just use
+-       one display, but if you use more than one and close one of them
+-       Emacs may crash." >&5
+-echo "$as_me: WARNING: Your version of Gtk+ will have problems with
+-       closing open displays.  This is no problem if you just use
+-       one display, but if you use more than one and close one of them
+-       Emacs may crash." >&2;}
+-      sleep 3
+-    fi
+-  fi
+-
+-fi
+-
+-
+-if test "${HAVE_GTK}" = "yes"; then
+-
+-      if test "$with_toolkit_scroll_bars" != no; then
+-    with_toolkit_scroll_bars=yes
+-  fi
+-
+-      HAVE_GTK_MULTIDISPLAY=no
+-
+-for ac_func in gdk_display_open
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* Override any 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+- HAVE_GTK_MULTIDISPLAY=yes
+-fi
+-done
+-
+-  if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GTK_MULTIDISPLAY 1
+-_ACEOF
+-
+-  fi
+-
+-          HAVE_GTK_FILE_SELECTION=no
+-  { echo "$as_me:$LINENO: checking whether GTK_TYPE_FILE_SELECTION is declared" >&5
+-echo $ECHO_N "checking whether GTK_TYPE_FILE_SELECTION is declared... $ECHO_C" >&6; }
+-if test "${ac_cv_have_decl_GTK_TYPE_FILE_SELECTION+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.  */
+-$ac_includes_default
+-#include <gtk/gtk.h>
+-
+-int
+-main ()
+-{
+-#ifndef GTK_TYPE_FILE_SELECTION
+-  (void) GTK_TYPE_FILE_SELECTION;
+-#endif
+-
+-  ;
+-  return 0;
+-}
+-_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_cv_have_decl_GTK_TYPE_FILE_SELECTION=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_have_decl_GTK_TYPE_FILE_SELECTION=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" >&5
+-echo "${ECHO_T}$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" >&6; }
+-if test $ac_cv_have_decl_GTK_TYPE_FILE_SELECTION = yes; then
+-  HAVE_GTK_FILE_SELECTION=yes
+-else
+-  HAVE_GTK_FILE_SELECTION=no
+-fi
+-
+-  if test "$HAVE_GTK_FILE_SELECTION" = yes; then
+-
+-for ac_func in gtk_file_selection_new
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* Override any 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+- HAVE_GTK_FILE_SELECTION=yes
+-else
+-  HAVE_GTK_FILE_SELECTION=no
+-fi
+-done
+-
+-  fi
+-
+-    HAVE_GTK_FILE_CHOOSER=no
+-  { echo "$as_me:$LINENO: checking whether GTK_TYPE_FILE_CHOOSER is declared" >&5
+-echo $ECHO_N "checking whether GTK_TYPE_FILE_CHOOSER is declared... $ECHO_C" >&6; }
+-if test "${ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER+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.  */
+-$ac_includes_default
+-#include <gtk/gtk.h>
+-
+-int
+-main ()
+-{
+-#ifndef GTK_TYPE_FILE_CHOOSER
+-  (void) GTK_TYPE_FILE_CHOOSER;
+-#endif
+-
+-  ;
+-  return 0;
+-}
+-_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_cv_have_decl_GTK_TYPE_FILE_CHOOSER=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" >&5
+-echo "${ECHO_T}$ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" >&6; }
+-if test $ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER = yes; then
+-  HAVE_GTK_FILE_CHOOSER=yes
+-else
+-  HAVE_GTK_FILE_CHOOSER=no
+-fi
+-
+-  if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
+-
+-for ac_func in gtk_file_chooser_dialog_new
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* Override any 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+- HAVE_GTK_FILE_CHOOSER=yes
+-else
+-  HAVE_GTK_FILE_CHOOSER=no
+-fi
+-done
+-
+-  fi
+-
+-  if test "$HAVE_GTK_FILE_SELECTION" = yes \
+-     && test "$HAVE_GTK_FILE_CHOOSER" = yes;  then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GTK_FILE_BOTH 1
+-_ACEOF
+-
+-  fi
+-
+-      if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
+-    HAVE_GTK_AND_PTHREAD=no
+-
+-for ac_header in pthread.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
+-    if test "$ac_cv_header_pthread_h"; then
+-      { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
+-echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lpthread  $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 pthread_self ();
+-int
+-main ()
+-{
+-return pthread_self ();
+-  ;
+-  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_pthread_pthread_self=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_pthread_pthread_self=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_pthread_pthread_self" >&5
+-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
+-if test $ac_cv_lib_pthread_pthread_self = yes; then
+-  HAVE_GTK_AND_PTHREAD=yes
+-fi
+-
+-    fi
+-    if test "$HAVE_GTK_AND_PTHREAD" = yes; then
+-      case "${canonical}" in
+-        *-hpux*) ;;
+-        *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
+-      esac
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GTK_AND_PTHREAD 1
+-_ACEOF
+-
+-    fi
+-  fi
+-fi
+-
+-HAVE_DBUS=no
+-if test "${with_dbus}" = "yes"; then
+-
+-  succeeded=no
+-
+-  # 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
+-
+-
+-
+-  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
+-
+-HAVE_XAW3D=no
+-if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; 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
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-#include <X11/Intrinsic.h>
+-#include <X11/Xaw3d/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_xaw3d=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_xaw3d=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-
+-  else
+-    emacs_cv_xaw3d=no
+-  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
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_XAW3D 1
+-_ACEOF
+-
+-  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.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <X11/Intrinsic.h>
+-int
+-main ()
+-{
+-#if XtSpecificationRelease < 6
+-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_toolkit_version_6=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_x11_toolkit_version_6=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-
+-  HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
+-  if test $emacs_cv_x11_toolkit_version_6 = yes; then
+-    { echo "$as_me:$LINENO: result: 6 or newer" >&5
+-echo "${ECHO_T}6 or newer" >&6; }
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_X11XTR6 1
+-_ACEOF
+-
+-  else
+-    { echo "$as_me:$LINENO: result: before 6" >&5
+-echo "${ECHO_T}before 6" >&6; }
+-  fi
+-
+-  OLDLIBS="$LIBS"
+-  if test x$HAVE_X11XTR6 = xyes; then
+-    LIBS="-lXt -lSM -lICE $LIBS"
+-  else
+-    LIBS="-lXt $LIBS"
+-  fi
+-
+-{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
+-echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lXmu  $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 XmuConvertStandardSelection ();
+-int
+-main ()
+-{
+-return XmuConvertStandardSelection ();
+-  ;
+-  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_Xmu_XmuConvertStandardSelection=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_Xmu_XmuConvertStandardSelection=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_Xmu_XmuConvertStandardSelection" >&5
+-echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
+-if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBXMU 1
+-_ACEOF
+-
+-  LIBS="-lXmu $LIBS"
+-
+-fi
+-
+-  test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
+-fi
+-
+-# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
+-if test "${HAVE_X11}" = "yes"; then
+-  if test "${USE_X_TOOLKIT}" != "none"; then
+-
+-{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
+-echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lXext  $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 XShapeQueryExtension ();
+-int
+-main ()
+-{
+-return XShapeQueryExtension ();
+-  ;
+-  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_Xext_XShapeQueryExtension=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_Xext_XShapeQueryExtension=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_Xext_XShapeQueryExtension" >&5
+-echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
+-if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBXEXT 1
+-_ACEOF
+-
+-  LIBS="-lXext $LIBS"
+-
+-fi
+-
+-  fi
+-fi
+-
+-if test "${USE_X_TOOLKIT}" = "MOTIF"; then
+-  { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
+-echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
+-if test "${emacs_cv_motif_version_2_1+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 <Xm/Xm.h>
+-int
+-main ()
+-{
+-#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
+-int x = 5;
+-#else
+-Motif version prior to 2.1.
+-#endif
+-  ;
+-  return 0;
+-}
+-_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
+-  emacs_cv_motif_version_2_1=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_motif_version_2_1=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
+-echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
+-  HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
+-  if test $emacs_cv_motif_version_2_1 = yes; then
+-    HAVE_LIBXP=no
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_MOTIF_2_1 1
+-_ACEOF
+-
+-    { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
+-echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lXp  $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 XpCreateContext ();
+-int
+-main ()
+-{
+-return XpCreateContext ();
+-  ;
+-  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_Xp_XpCreateContext=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_Xp_XpCreateContext=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_Xp_XpCreateContext" >&5
+-echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
+-if test $ac_cv_lib_Xp_XpCreateContext = yes; then
+-  HAVE_LIBXP=yes
+-fi
+-
+-    if test ${HAVE_LIBXP} = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_LIBXP 1
+-_ACEOF
+-
+-    fi
+-  else
+-    { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
+-echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
+-if test "${emacs_cv_lesstif+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  # We put this in CFLAGS temporarily to precede other -I options
+-    # that might be in CFLAGS temporarily.
+-    # We put this in CPPFLAGS where it precedes the other -I options.
+-    OLD_CPPFLAGS=$CPPFLAGS
+-    OLD_CFLAGS=$CFLAGS
+-    CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
+-    CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
+-    cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
+-int
+-main ()
+-{
+-int x = 5;
+-  ;
+-  return 0;
+-}
+-_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
+-  emacs_cv_lesstif=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_lesstif=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
+-echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
+-    if test $emacs_cv_lesstif = yes; then
+-      # Make sure this -I option remains in CPPFLAGS after it is set
+-      # back to REAL_CPPFLAGS.
+-      # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
+-      # have those other -I options anyway.  Ultimately, having this
+-      # directory ultimately in CPPFLAGS will be enough.
+-      REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
+-      LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
+-    else
+-      CFLAGS=$OLD_CFLAGS
+-      CPPFLAGS=$OLD_CPPFLAGS
+-    fi
+-  fi
+-fi
+-
+-
+-
+-USE_TOOLKIT_SCROLL_BARS=no
+-if test "${with_toolkit_scroll_bars}" != "no"; then
+-  if test "${USE_X_TOOLKIT}" != "none"; then
+-    if test "${USE_X_TOOLKIT}" = "MOTIF"; then
+-      cat >>confdefs.h <<\_ACEOF
+-#define USE_TOOLKIT_SCROLL_BARS 1
+-_ACEOF
+-
+-      HAVE_XAW3D=no
+-      USE_TOOLKIT_SCROLL_BARS=yes
+-    elif test "${HAVE_XAW3D}" = "yes"; then
+-      cat >>confdefs.h <<\_ACEOF
+-#define USE_TOOLKIT_SCROLL_BARS 1
+-_ACEOF
+-
+-      USE_TOOLKIT_SCROLL_BARS=yes
+-    fi
+-  elif test "${HAVE_GTK}" = "yes"; then
+-    cat >>confdefs.h <<\_ACEOF
+-#define USE_TOOLKIT_SCROLL_BARS 1
+-_ACEOF
+-
+-    USE_TOOLKIT_SCROLL_BARS=yes
+-  elif test "${HAVE_NS}" = "yes"; then
+-    cat >>confdefs.h <<\_ACEOF
+-#define USE_TOOLKIT_SCROLL_BARS 1
+-_ACEOF
+-
+-    USE_TOOLKIT_SCROLL_BARS=yes
+-  fi
+-fi
+-
+-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>
+-	  #include <X11/Xresource.h>
+-int
+-main ()
+-{
+-XIMProc  callback;
+-  ;
+-  return 0;
+-}
+-_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
+-  HAVE_XIM=yes
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_XIM 1
+-_ACEOF
+-
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	HAVE_XIM=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
+-
+-if test "${with_xim}" != "no"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define USE_XIM 1
+-_ACEOF
+-
+-fi
+-
+-
+-if test "${HAVE_XIM}" != "no"; then
+-  late_CFLAGS=$CFLAGS
+-  if test "$GCC" = yes; then
+-    CFLAGS="$CFLAGS --pedantic-errors"
+-  fi
+-  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>
+-#include <X11/Xresource.h>
+-int
+-main ()
+-{
+-Display *display;
+-XrmDatabase db;
+-char *res_name;
+-char *res_class;
+-XIMProc  callback;
+-XPointer *client_data;
+-#ifndef __GNUC__
+-/* If we're not using GCC, it's probably not XFree86, and this is
+-   probably right, but we can't use something like --pedantic-errors.  */
+-extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
+-                                           char*, XIMProc, XPointer*);
+-#endif
+-(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
+-   client_data);
+-  ;
+-  return 0;
+-}
+-_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
+-  emacs_cv_arg6_star=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
+-  if test "$emacs_cv_arg6_star" = yes; then
+-    cat >>confdefs.h <<\_ACEOF
+-#define XRegisterIMInstantiateCallback_arg6 XPointer*
+-_ACEOF
+-
+-  else
+-    cat >>confdefs.h <<\_ACEOF
+-#define XRegisterIMInstantiateCallback_arg6 XPointer
+-_ACEOF
+-
+-  fi
+-  CFLAGS=$late_CFLAGS
+-fi
+-
+-### Start of font-backend (under any platform) section.
+-# (nothing here yet -- this is a placeholder)
+-### End of font-backend (under any platform) section.
+-
+-### Start of font-backend (under X11) section.
+-if test "${HAVE_X11}" = "yes"; then
+-
+-  succeeded=no
+-
+-  # 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
+-
+-
+-
+-  if test "$PKG_CONFIG" = "no" ; then
+-     HAVE_FC=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 fontconfig >= 2.2.0" >&5
+-echo $ECHO_N "checking for fontconfig >= 2.2.0... $ECHO_C" >&6; }
+-
+-        if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
+-            { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-            succeeded=yes
+-
+-            { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
+-echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
+-            FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
+-            { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
+-echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
+-
+-            { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
+-echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
+-            FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
+-            { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
+-echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
+-        else
+-            { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-            FONTCONFIG_CFLAGS=""
+-            FONTCONFIG_LIBS=""
+-            ## If we have a custom action on failure, don't print errors, but
+-            ## do set a variable so people can do so.
+-            FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.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_FC=yes
+-  else
+-     HAVE_FC=no
+-  fi
+-
+-
+-   ## Use -lXft if available, unless `--with-xft=no'.
+-   HAVE_XFT=maybe
+-    if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
+-      with_xft="no";
+-    fi
+-    if test "x${with_xft}" != "xno"; then
+-
+-
+-  succeeded=no
+-
+-  # 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
+-
+-
+-
+-  if test "$PKG_CONFIG" = "no" ; then
+-     HAVE_XFT=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 xft >= 0.13.0" >&5
+-echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
+-
+-        if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
+-            { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-            succeeded=yes
+-
+-            { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
+-echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
+-            XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
+-            { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
+-echo "${ECHO_T}$XFT_CFLAGS" >&6; }
+-
+-            { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
+-echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
+-            XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
+-            { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
+-echo "${ECHO_T}$XFT_LIBS" >&6; }
+-        else
+-            { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-            XFT_CFLAGS=""
+-            XFT_LIBS=""
+-            ## If we have a custom action on failure, don't print errors, but
+-            ## do set a variable so people can do so.
+-            XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.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
+-     :
+-  else
+-     HAVE_XFT=no
+-  fi
+-
+-      if test "$HAVE_XFT" != no; then
+-	OLD_CPPFLAGS="$CPPFLAGS"
+-	OLD_CFLAGS="$CFLAGS"
+-	OLD_LIBS="$LIBS"
+-	CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
+-	CFLAGS="$CFLAGS $XFT_CFLAGS"
+-	LIBS="$XFT_LIBS $LIBS"
+-	if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
+-echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
+-echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
+-echo $ECHO_N "checking X11/Xft/Xft.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 <X11/Xft/Xft.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 X11/Xft/Xft.h presence" >&5
+-echo $ECHO_N "checking X11/Xft/Xft.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 <X11/Xft/Xft.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: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: X11/Xft/Xft.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: X11/Xft/Xft.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
+-echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
+-echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
+-
+-fi
+-if test $ac_cv_header_X11_Xft_Xft_h = yes; then
+-  { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
+-echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lXft $XFT_LIBS $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 XftFontOpen ();
+-int
+-main ()
+-{
+-return XftFontOpen ();
+-  ;
+-  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_Xft_XftFontOpen=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_Xft_XftFontOpen=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_Xft_XftFontOpen" >&5
+-echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
+-if test $ac_cv_lib_Xft_XftFontOpen = yes; then
+-  HAVE_XFT=yes
+-fi
+-
+-fi
+-
+-
+-
+-	if test "${HAVE_XFT}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_XFT 1
+-_ACEOF
+-
+-
+-	  C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
+-	else
+-	  CPPFLAGS="$OLD_CPPFLAGS"
+-	  CFLAGS="$OLD_CFLAGS"
+-	  LIBS="$OLD_LIBS"
+-	fi                        # "${HAVE_XFT}" = "yes"
+-      fi                          # "$HAVE_XFT" != no
+-    fi                            # "x${with_xft}" != "xno"
+-
+-        if test "$HAVE_XFT" != "yes"; then
+-       HAVE_XFT=no
+-    fi
+-
+-
+-    HAVE_FREETYPE=no
+-    ## We used to allow building with FreeType and without Xft.
+-    ## However, the ftx font backend driver is not in good shape.
+-    if test "${HAVE_XFT}" = "yes"; then
+-                  HAVE_FREETYPE=yes
+-      FONTCONFIG_CFLAGS=
+-      FONTCONFIG_LIBS=
+-    fi
+-
+-    HAVE_LIBOTF=no
+-    if test "${HAVE_FREETYPE}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_FREETYPE 1
+-_ACEOF
+-
+-      if test "${with_libotf}" != "no"; then
+-
+-  succeeded=no
+-
+-  # 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
+-
+-
+-
+-  if test "$PKG_CONFIG" = "no" ; then
+-     HAVE_LIBOTF=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 libotf" >&5
+-echo $ECHO_N "checking for libotf... $ECHO_C" >&6; }
+-
+-        if $PKG_CONFIG --exists "libotf" 2>&5; then
+-            { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-            succeeded=yes
+-
+-            { echo "$as_me:$LINENO: checking LIBOTF_CFLAGS" >&5
+-echo $ECHO_N "checking LIBOTF_CFLAGS... $ECHO_C" >&6; }
+-            LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
+-            { echo "$as_me:$LINENO: result: $LIBOTF_CFLAGS" >&5
+-echo "${ECHO_T}$LIBOTF_CFLAGS" >&6; }
+-
+-            { echo "$as_me:$LINENO: checking LIBOTF_LIBS" >&5
+-echo $ECHO_N "checking LIBOTF_LIBS... $ECHO_C" >&6; }
+-            LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
+-            { echo "$as_me:$LINENO: result: $LIBOTF_LIBS" >&5
+-echo "${ECHO_T}$LIBOTF_LIBS" >&6; }
+-        else
+-            { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-            LIBOTF_CFLAGS=""
+-            LIBOTF_LIBS=""
+-            ## If we have a custom action on failure, don't print errors, but
+-            ## do set a variable so people can do so.
+-            LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
+-
+-        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_LIBOTF=yes
+-  else
+-     HAVE_LIBOTF=no
+-  fi
+-
+-	if test "$HAVE_LIBOTF" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_LIBOTF 1
+-_ACEOF
+-
+-	  { echo "$as_me:$LINENO: checking for OTF_get_variation_glyphs in -lotf" >&5
+-echo $ECHO_N "checking for OTF_get_variation_glyphs in -lotf... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lotf  $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 OTF_get_variation_glyphs ();
+-int
+-main ()
+-{
+-return OTF_get_variation_glyphs ();
+-  ;
+-  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_otf_OTF_get_variation_glyphs=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_otf_OTF_get_variation_glyphs=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_otf_OTF_get_variation_glyphs" >&5
+-echo "${ECHO_T}$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
+-if test $ac_cv_lib_otf_OTF_get_variation_glyphs = yes; then
+-  HAVE_OTF_GET_VARIATION_GLYPHS=yes
+-else
+-  HAVE_OTF_GET_VARIATION_GLYPHS=no
+-fi
+-
+-	  if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_OTF_GET_VARIATION_GLYPHS 1
+-_ACEOF
+-
+-	  fi
+-	fi
+-      fi
+-            fi
+-
+-    HAVE_M17N_FLT=no
+-    if test "${HAVE_LIBOTF}" = yes; then
+-      if test "${with_m17n_flt}" != "no"; then
+-
+-  succeeded=no
+-
+-  # 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
+-
+-
+-
+-  if test "$PKG_CONFIG" = "no" ; then
+-     HAVE_M17N_FLT=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 m17n-flt" >&5
+-echo $ECHO_N "checking for m17n-flt... $ECHO_C" >&6; }
+-
+-        if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
+-            { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-            succeeded=yes
+-
+-            { echo "$as_me:$LINENO: checking M17N_FLT_CFLAGS" >&5
+-echo $ECHO_N "checking M17N_FLT_CFLAGS... $ECHO_C" >&6; }
+-            M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
+-            { echo "$as_me:$LINENO: result: $M17N_FLT_CFLAGS" >&5
+-echo "${ECHO_T}$M17N_FLT_CFLAGS" >&6; }
+-
+-            { echo "$as_me:$LINENO: checking M17N_FLT_LIBS" >&5
+-echo $ECHO_N "checking M17N_FLT_LIBS... $ECHO_C" >&6; }
+-            M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
+-            { echo "$as_me:$LINENO: result: $M17N_FLT_LIBS" >&5
+-echo "${ECHO_T}$M17N_FLT_LIBS" >&6; }
+-        else
+-            { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-            M17N_FLT_CFLAGS=""
+-            M17N_FLT_LIBS=""
+-            ## If we have a custom action on failure, don't print errors, but
+-            ## do set a variable so people can do so.
+-            M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
+-
+-        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_M17N_FLT=yes
+-  else
+-     HAVE_M17N_FLT=no
+-  fi
+-
+-	if test "$HAVE_M17N_FLT" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_M17N_FLT 1
+-_ACEOF
+-
+-	fi
+-      fi
+-    fi
+-else
+-    HAVE_XFT=no
+-    HAVE_FREETYPE=no
+-    HAVE_LIBOTF=no
+-    HAVE_M17N_FLT=no
+-fi
+-### End of font-backend (under X11) section.
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-### Use -lXpm if available, unless `--with-xpm=no'.
+-HAVE_XPM=no
+-if test "${HAVE_X11}" = "yes"; then
+-  if test "${with_xpm}" != "no"; then
+-    if test "${ac_cv_header_X11_xpm_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
+-echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_X11_xpm_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
+-echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
+-echo $ECHO_N "checking X11/xpm.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 <X11/xpm.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 X11/xpm.h presence" >&5
+-echo $ECHO_N "checking X11/xpm.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 <X11/xpm.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: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/xpm.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: X11/xpm.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/xpm.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: X11/xpm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
+-echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_X11_xpm_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_X11_xpm_h=$ac_header_preproc
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
+-echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
+-
+-fi
+-if test $ac_cv_header_X11_xpm_h = yes; then
+-  { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
+-echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lXpm -lX11 $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 XpmReadFileToPixmap ();
+-int
+-main ()
+-{
+-return XpmReadFileToPixmap ();
+-  ;
+-  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_Xpm_XpmReadFileToPixmap=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_Xpm_XpmReadFileToPixmap=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_Xpm_XpmReadFileToPixmap" >&5
+-echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
+-if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
+-  HAVE_XPM=yes
+-fi
+-
+-fi
+-
+-
+-    if test "${HAVE_XPM}" = "yes"; then
+-      { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
+-echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $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 "X11/xpm.h"
+-#ifndef XpmReturnAllocPixels
+-no_return_alloc_pixels
+-#endif
+-
+-_ACEOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
+-  HAVE_XPM=no
+-else
+-  HAVE_XPM=yes
+-fi
+-rm -f conftest*
+-
+-
+-      if test "${HAVE_XPM}" = "yes"; then
+-	{ echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-      else
+-	{ echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-      fi
+-    fi
+-  fi
+-
+-  if test "${HAVE_XPM}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_XPM 1
+-_ACEOF
+-
+-  fi
+-fi
+-
+-### Use -ljpeg if available, unless `--with-jpeg=no'.
+-HAVE_JPEG=no
+-if test "${HAVE_X11}" = "yes"; then
+-  if test "${with_jpeg}" != "no"; then
+-            if test "${ac_cv_header_jerror_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for jerror.h" >&5
+-echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_jerror_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
+-echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
+-echo $ECHO_N "checking jerror.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 <jerror.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 jerror.h presence" >&5
+-echo $ECHO_N "checking jerror.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 <jerror.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: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: jerror.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: jerror.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: jerror.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: jerror.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for jerror.h" >&5
+-echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_jerror_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_jerror_h=$ac_header_preproc
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
+-echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
+-
+-fi
+-if test $ac_cv_header_jerror_h = yes; then
+-  { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
+-echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ljpeg  $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 jpeg_destroy_compress ();
+-int
+-main ()
+-{
+-return jpeg_destroy_compress ();
+-  ;
+-  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_jpeg_jpeg_destroy_compress=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_jpeg_jpeg_destroy_compress=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_jpeg_jpeg_destroy_compress" >&5
+-echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
+-if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
+-  HAVE_JPEG=yes
+-fi
+-
+-fi
+-
+-
+-  fi
+-
+-
+-  if test "${HAVE_JPEG}" = "yes"; then
+-    cat >>confdefs.h <<\_ACEOF
+-#define HAVE_JPEG 1
+-_ACEOF
+-
+-    cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <jpeglib.h>
+-	 version=JPEG_LIB_VERSION
+-
+-_ACEOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
+-  cat >>confdefs.h <<\_ACEOF
+-#define HAVE_JPEG 1
+-_ACEOF
+-
+-else
+-  { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
+-echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
+-        HAVE_JPEG=no
+-fi
+-rm -f conftest*
+-
+-  fi
+-fi
+-
+-### Use -lpng if available, unless `--with-png=no'.
+-HAVE_PNG=no
+-if test "${HAVE_X11}" = "yes"; then
+-  if test "${with_png}" != "no"; then
+-    # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
+-    # in /usr/include/libpng.
+-
+-
+-for ac_header in png.h libpng/png.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
+-    if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
+-      { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
+-echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lpng -lz -lm $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 png_get_channels ();
+-int
+-main ()
+-{
+-return png_get_channels ();
+-  ;
+-  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_png_png_get_channels=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_png_png_get_channels=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_png_png_get_channels" >&5
+-echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
+-if test $ac_cv_lib_png_png_get_channels = yes; then
+-  HAVE_PNG=yes
+-fi
+-
+-    fi
+-  fi
+-
+-  if test "${HAVE_PNG}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_PNG 1
+-_ACEOF
+-
+-  fi
+-fi
+-
+-### Use -ltiff if available, unless `--with-tiff=no'.
+-HAVE_TIFF=no
+-if test "${HAVE_X11}" = "yes"; then
+-  if test "${with_tiff}" != "no"; then
+-    if test "${ac_cv_header_tiffio_h+set}" = set; then
+-  { 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
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
+-echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
+-echo $ECHO_N "checking tiffio.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 <tiffio.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 tiffio.h presence" >&5
+-echo $ECHO_N "checking tiffio.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 <tiffio.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: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: tiffio.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: tiffio.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: tiffio.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: tiffio.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-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
+-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
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_gif_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_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="-lungif  $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_ungif_EGifPutExtensionLast=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	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_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
+-
+-
+-    if test "$HAVE_GIF" = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define LIBGIF -lungif
+-_ACEOF
+-
+-      ac_gif_lib_name="-lungif"
+-    fi
+-  fi
+-
+-  if test "${HAVE_GIF}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GIF 1
+-_ACEOF
+-
+-  fi
+-fi
+-
+-if test "${HAVE_X11}" = "yes"; 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_gpm_h" >&5
+-echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
+-else
+-  # Is the header compilable?
+-{ 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
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <gpm.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 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 <gpm.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: 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: 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 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_gpm_h=$ac_header_preproc
+-fi
+-{ 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_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="-lgpm  $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 Gpm_Open ();
+-int
+-main ()
+-{
+-return Gpm_Open ();
+-  ;
+-  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_gpm_Gpm_Open=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	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_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
+-
+-if test "${HAVE_GPM}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GPM 1
+-_ACEOF
+-
+-fi
+-
+-if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
+-echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
+-echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
+-echo $ECHO_N "checking malloc/malloc.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 <malloc/malloc.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 malloc/malloc.h presence" >&5
+-echo $ECHO_N "checking malloc/malloc.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 <malloc/malloc.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: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: malloc/malloc.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: malloc/malloc.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: malloc/malloc.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: malloc/malloc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
+-echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_malloc_malloc_h=$ac_header_preproc
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
+-echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
+-
+-fi
+-if test $ac_cv_header_malloc_malloc_h = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_MALLOC_MALLOC_H 1
+-_ACEOF
+-
+-fi
+-
+-
+-
+-### Use NeXTstep API to implement GUI.
+-if test "${HAVE_NS}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_NS 1
+-_ACEOF
+-
+-  if test "${NS_IMPL_COCOA}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define NS_IMPL_COCOA 1
+-_ACEOF
+-
+-    GNU_OBJC_CFLAGS=
+-  fi
+-  if test "${NS_IMPL_GNUSTEP}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define NS_IMPL_GNUSTEP 1
+-_ACEOF
+-
+-    GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
+-  fi
+-  if test "${NS_HAVE_NSINTEGER}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define NS_HAVE_NSINTEGER 1
+-_ACEOF
+-
+-  fi
+-  # We also have mouse menus.
+-  HAVE_MENUS=yes
+-fi
+-
+-
+-### Use session management (-lSM -lICE) if available
+-HAVE_X_SM=no
+-if test "${HAVE_X11}" = "yes"; then
+-  if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
+-echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
+-echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
+-echo $ECHO_N "checking X11/SM/SMlib.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 <X11/SM/SMlib.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 X11/SM/SMlib.h presence" >&5
+-echo $ECHO_N "checking X11/SM/SMlib.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 <X11/SM/SMlib.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: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: X11/SM/SMlib.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: X11/SM/SMlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
+-echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
+-echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
+-
+-fi
+-if test $ac_cv_header_X11_SM_SMlib_h = yes; then
+-  { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
+-echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lSM -lICE $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 SmcOpenConnection ();
+-int
+-main ()
+-{
+-return SmcOpenConnection ();
+-  ;
+-  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_SM_SmcOpenConnection=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_SM_SmcOpenConnection=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_SM_SmcOpenConnection" >&5
+-echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
+-if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
+-  HAVE_X_SM=yes
+-fi
+-
+-fi
+-
+-
+-
+-  if test "${HAVE_X_SM}" = "yes"; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_X_SM 1
+-_ACEOF
+-
+-    case "$LIBS" in
+-      *-lSM*) ;;
+-      *)      LIBS="-lSM -lICE $LIBS" ;;
+-    esac
+-  fi
+-fi
+-
+-# If netdb.h doesn't declare h_errno, we must declare it by hand.
+-{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
+-echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
+-if test "${emacs_cv_netdb_declares_h_errno+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 <netdb.h>
+-int
+-main ()
+-{
+-return h_errno;
+-  ;
+-  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_netdb_declares_h_errno=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_netdb_declares_h_errno=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_netdb_declares_h_errno" >&5
+-echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
+-if test $emacs_cv_netdb_declares_h_errno = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_H_ERRNO 1
+-_ACEOF
+-
+-fi
+-
+-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+-# for constant arguments.  Useless!
+-{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
+-echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
+-if test "${ac_cv_working_alloca_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 <alloca.h>
+-int
+-main ()
+-{
+-char *p = (char *) alloca (2 * sizeof (int));
+-			  if (p) return 0;
+-  ;
+-  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_working_alloca_h=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_working_alloca_h=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: $ac_cv_working_alloca_h" >&5
+-echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
+-if test $ac_cv_working_alloca_h = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_ALLOCA_H 1
+-_ACEOF
+-
+-fi
+-
+-{ echo "$as_me:$LINENO: checking for alloca" >&5
+-echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
+-if test "${ac_cv_func_alloca_works+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.  */
+-#ifdef __GNUC__
+-# define alloca __builtin_alloca
+-#else
+-# ifdef _MSC_VER
+-#  include <malloc.h>
+-#  define alloca _alloca
+-# else
+-#  ifdef HAVE_ALLOCA_H
+-#   include <alloca.h>
+-#  else
+-#   ifdef _AIX
+- #pragma alloca
+-#   else
+-#    ifndef alloca /* predefined by HP cc +Olibcalls */
+-char *alloca ();
+-#    endif
+-#   endif
+-#  endif
+-# endif
+-#endif
+-
+-int
+-main ()
+-{
+-char *p = (char *) alloca (1);
+-				    if (p) return 0;
+-  ;
+-  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_func_alloca_works=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_alloca_works=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: $ac_cv_func_alloca_works" >&5
+-echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
+-
+-if test $ac_cv_func_alloca_works = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_ALLOCA 1
+-_ACEOF
+-
+-else
+-  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+-# that cause trouble.  Some versions do not even contain alloca or
+-# contain a buggy version.  If you still want to use their alloca,
+-# use ar to extract alloca.o from them instead of compiling alloca.c.
+-
+-ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define C_ALLOCA 1
+-_ACEOF
+-
+-
+-{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+-echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
+-if test "${ac_cv_os_cray+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.  */
+-#if defined CRAY && ! defined CRAY2
+-webecray
+-#else
+-wenotbecray
+-#endif
+-
+-_ACEOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "webecray" >/dev/null 2>&1; then
+-  ac_cv_os_cray=yes
+-else
+-  ac_cv_os_cray=no
+-fi
+-rm -f conftest*
+-
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+-echo "${ECHO_T}$ac_cv_os_cray" >&6; }
+-if test $ac_cv_os_cray = yes; then
+-  for ac_func in _getb67 GETB67 getb67; 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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* Override any 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-
+-cat >>confdefs.h <<_ACEOF
+-#define CRAY_STACKSEG_END $ac_func
+-_ACEOF
+-
+-    break
+-fi
+-
+-  done
+-fi
+-
+-{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+-echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
+-if test "${ac_cv_c_stack_direction+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test "$cross_compiling" = yes; then
+-  ac_cv_c_stack_direction=0
+-else
+-  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
+-int
+-find_stack_direction ()
+-{
+-  static char *addr = 0;
+-  auto char dummy;
+-  if (addr == 0)
+-    {
+-      addr = &dummy;
+-      return find_stack_direction ();
+-    }
+-  else
+-    return (&dummy > addr) ? 1 : -1;
+-}
+-
+-int
+-main ()
+-{
+-  return find_stack_direction () < 0;
+-}
+-_ACEOF
+-rm -f 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>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (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_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_c_stack_direction=1
+-else
+-  echo "$as_me: program exited with status $ac_status" >&5
+-echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-( exit $ac_status )
+-ac_cv_c_stack_direction=-1
+-fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+-fi
+-
+-
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+-echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
+-
+-cat >>confdefs.h <<_ACEOF
+-#define STACK_DIRECTION $ac_cv_c_stack_direction
+-_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.
+-
+-{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
+-echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_m_sqrt+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lm  $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 sqrt ();
+-int
+-main ()
+-{
+-return sqrt ();
+-  ;
+-  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_m_sqrt=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_m_sqrt=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_m_sqrt" >&5
+-echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
+-if test $ac_cv_lib_m_sqrt = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBM 1
+-_ACEOF
+-
+-  LIBS="-lm $LIBS"
+-
+-fi
+-
+-
+-# Check for mail-locking functions in a "mail" library.  Probably this should
+-# have the same check as for liblockfile below.
+-
+-{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
+-echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_mail_maillock+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lmail  $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 maillock ();
+-int
+-main ()
+-{
+-return maillock ();
+-  ;
+-  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_mail_maillock=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_mail_maillock=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_mail_maillock" >&5
+-echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
+-if test $ac_cv_lib_mail_maillock = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBMAIL 1
+-_ACEOF
+-
+-  LIBS="-lmail $LIBS"
+-
+-fi
+-
+-
+-{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
+-echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-llockfile  $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 maillock ();
+-int
+-main ()
+-{
+-return maillock ();
+-  ;
+-  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_lockfile_maillock=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_lockfile_maillock=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_lockfile_maillock" >&5
+-echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
+-if test $ac_cv_lib_lockfile_maillock = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBLOCKFILE 1
+-_ACEOF
+-
+-  LIBS="-llockfile $LIBS"
+-
+-fi
+-
+-# If we have the shared liblockfile, assume we must use it for mail
+-# locking (e.g. Debian).  If we couldn't link against liblockfile
+-# (no liblockfile.a installed), ensure that we don't need to.
+-if test "$ac_cv_lib_lockfile_maillock" = no; then
+-      # Extract the first word of "liblockfile.so", so it can be a program name with args.
+-set dummy liblockfile.so; 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_liblockfile+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test -n "$liblockfile"; then
+-  ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
+-else
+-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-for as_dir in $as_dummy
+-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_liblockfile="yes"
+-    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_liblockfile" && ac_cv_prog_liblockfile="no"
+-fi
+-fi
+-liblockfile=$ac_cv_prog_liblockfile
+-if test -n "$liblockfile"; then
+-  { echo "$as_me:$LINENO: result: $liblockfile" >&5
+-echo "${ECHO_T}$liblockfile" >&6; }
+-else
+-  { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-fi
+-
+-
+-  if test $ac_cv_prog_liblockfile = yes; then
+-    { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
+-This probably means that movemail could lose mail.
+-There may be a \`development' package to install containing liblockfile." >&5
+-echo "$as_me: error: Shared liblockfile found but can't link against it.
+-This probably means that movemail could lose mail.
+-There may be a \`development' package to install containing liblockfile." >&2;}
+-   { (exit 1); exit 1; }; }
+-  else :
+-  fi
+-fi
+-
+-for ac_func in touchlock
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* Override any 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-done
+-
+-
+-for ac_header in maillock.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-for ac_func in gethostname getdomainname dup2 \
+-rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
+-random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
+-strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
+-utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
+-__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
+-sendto recvfrom getsockopt setsockopt getsockname getpeername \
+-gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
+-memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
+-cfmakeraw cfsetspeed
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* Override any 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-done
+-
+-
+-
+-for ac_header in sys/un.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
+-
+-
+-
+-
+-
+-for ac_header in $ac_header_list
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-for ac_func in $ac_func_list
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* Override any 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-done
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-{ echo "$as_me:$LINENO: checking for working mktime" >&5
+-echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
+-if test "${ac_cv_func_working_mktime+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test "$cross_compiling" = yes; then
+-  ac_cv_func_working_mktime=no
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Test program from Paul Eggert and Tony Leneis.  */
+-#ifdef TIME_WITH_SYS_TIME
+-# include <sys/time.h>
+-# include <time.h>
+-#else
+-# ifdef HAVE_SYS_TIME_H
+-#  include <sys/time.h>
+-# else
+-#  include <time.h>
+-# endif
+-#endif
+-
+-#include <limits.h>
+-#include <stdlib.h>
+-
+-#ifdef HAVE_UNISTD_H
+-# include <unistd.h>
+-#endif
+-
+-#ifndef HAVE_ALARM
+-# define alarm(X) /* empty */
+-#endif
+-
+-/* Work around redefinition to rpl_putenv by other config tests.  */
+-#undef putenv
+-
+-static time_t time_t_max;
+-static time_t time_t_min;
+-
+-/* Values we'll use to set the TZ environment variable.  */
+-static char *tz_strings[] = {
+-  (char *) 0, "TZ=GMT0", "TZ=JST-9",
+-  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
+-};
+-#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
+-
+-/* Return 0 if mktime fails to convert a date in the spring-forward gap.
+-   Based on a problem report from Andreas Jaeger.  */
+-static int
+-spring_forward_gap ()
+-{
+-  /* glibc (up to about 1998-10-07) failed this test. */
+-  struct tm tm;
+-
+-  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+-     instead of "TZ=America/Vancouver" in order to detect the bug even
+-     on systems that don't support the Olson extension, or don't have the
+-     full zoneinfo tables installed.  */
+-  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+-
+-  tm.tm_year = 98;
+-  tm.tm_mon = 3;
+-  tm.tm_mday = 5;
+-  tm.tm_hour = 2;
+-  tm.tm_min = 0;
+-  tm.tm_sec = 0;
+-  tm.tm_isdst = -1;
+-  return mktime (&tm) != (time_t) -1;
+-}
+-
+-static int
+-mktime_test1 (now)
+-     time_t now;
+-{
+-  struct tm *lt;
+-  return ! (lt = localtime (&now)) || mktime (lt) == now;
+-}
+-
+-static int
+-mktime_test (now)
+-     time_t now;
+-{
+-  return (mktime_test1 (now)
+-	  && mktime_test1 ((time_t) (time_t_max - now))
+-	  && mktime_test1 ((time_t) (time_t_min + now)));
+-}
+-
+-static int
+-irix_6_4_bug ()
+-{
+-  /* Based on code from Ariel Faigon.  */
+-  struct tm tm;
+-  tm.tm_year = 96;
+-  tm.tm_mon = 3;
+-  tm.tm_mday = 0;
+-  tm.tm_hour = 0;
+-  tm.tm_min = 0;
+-  tm.tm_sec = 0;
+-  tm.tm_isdst = -1;
+-  mktime (&tm);
+-  return tm.tm_mon == 2 && tm.tm_mday == 31;
+-}
+-
+-static int
+-bigtime_test (j)
+-     int j;
+-{
+-  struct tm tm;
+-  time_t now;
+-  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
+-  now = mktime (&tm);
+-  if (now != (time_t) -1)
+-    {
+-      struct tm *lt = localtime (&now);
+-      if (! (lt
+-	     && lt->tm_year == tm.tm_year
+-	     && lt->tm_mon == tm.tm_mon
+-	     && lt->tm_mday == tm.tm_mday
+-	     && lt->tm_hour == tm.tm_hour
+-	     && lt->tm_min == tm.tm_min
+-	     && lt->tm_sec == tm.tm_sec
+-	     && lt->tm_yday == tm.tm_yday
+-	     && lt->tm_wday == tm.tm_wday
+-	     && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
+-		  == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
+-	return 0;
+-    }
+-  return 1;
+-}
+-
+-static int
+-year_2050_test ()
+-{
+-  /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
+-     ignoring leap seconds.  */
+-  unsigned long int answer = 2527315200UL;
+-
+-  struct tm tm;
+-  time_t t;
+-  tm.tm_year = 2050 - 1900;
+-  tm.tm_mon = 2 - 1;
+-  tm.tm_mday = 1;
+-  tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+-  tm.tm_isdst = -1;
+-
+-  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+-     instead of "TZ=America/Vancouver" in order to detect the bug even
+-     on systems that don't support the Olson extension, or don't have the
+-     full zoneinfo tables installed.  */
+-  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+-
+-  t = mktime (&tm);
+-
+-  /* Check that the result is either a failure, or close enough
+-     to the correct answer that we can assume the discrepancy is
+-     due to leap seconds.  */
+-  return (t == (time_t) -1
+-	  || (0 < t && answer - 120 <= t && t <= answer + 120));
+-}
+-
+-int
+-main ()
+-{
+-  time_t t, delta;
+-  int i, j;
+-
+-  /* This test makes some buggy mktime implementations loop.
+-     Give up after 60 seconds; a mktime slower than that
+-     isn't worth using anyway.  */
+-  alarm (60);
+-
+-  for (;;)
+-    {
+-      t = (time_t_max << 1) + 1;
+-      if (t <= time_t_max)
+-	break;
+-      time_t_max = t;
+-    }
+-  time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
+-
+-  delta = time_t_max / 997; /* a suitable prime number */
+-  for (i = 0; i < N_STRINGS; i++)
+-    {
+-      if (tz_strings[i])
+-	putenv (tz_strings[i]);
+-
+-      for (t = 0; t <= time_t_max - delta; t += delta)
+-	if (! mktime_test (t))
+-	  return 1;
+-      if (! (mktime_test ((time_t) 1)
+-	     && mktime_test ((time_t) (60 * 60))
+-	     && mktime_test ((time_t) (60 * 60 * 24))))
+-	return 1;
+-
+-      for (j = 1; ; j <<= 1)
+-	if (! bigtime_test (j))
+-	  return 1;
+-	else if (INT_MAX / 2 < j)
+-	  break;
+-      if (! bigtime_test (INT_MAX))
+-	return 1;
+-    }
+-  return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
+-}
+-_ACEOF
+-rm -f 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>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (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_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_func_working_mktime=yes
+-else
+-  echo "$as_me: program exited with status $ac_status" >&5
+-echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-( exit $ac_status )
+-ac_cv_func_working_mktime=no
+-fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+-fi
+-
+-
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
+-echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
+-if test $ac_cv_func_working_mktime = no; then
+-  case " $LIBOBJS " in
+-  *" mktime.$ac_objext "* ) ;;
+-  *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
+- ;;
+-esac
+-
+-fi
+-
+-if test "$ac_cv_func_working_mktime" = no; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define BROKEN_MKTIME 1
+-_ACEOF
+-
+-fi
+-
+-ac_have_func=no # yes means we've found a way to get the load average.
+-
+-# Make sure getloadavg.c is where it belongs, at configure-time.
+-test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
+-  { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
+-echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
+-   { (exit 1); exit 1; }; }
+-
+-ac_save_LIBS=$LIBS
+-
+-# Check for getloadavg, but be sure not to touch the cache variable.
+-({ echo "$as_me:$LINENO: checking for getloadavg" >&5
+-echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
+-if test "${ac_cv_func_getloadavg+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 getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define getloadavg innocuous_getloadavg
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char getloadavg (); 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 getloadavg
+-
+-/* 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 getloadavg ();
+-/* 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_getloadavg || defined __stub___getloadavg
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return getloadavg ();
+-  ;
+-  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_func_getloadavg=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_getloadavg=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: $ac_cv_func_getloadavg" >&5
+-echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
+-if test $ac_cv_func_getloadavg = yes; then
+-  exit 0
+-else
+-  exit 1
+-fi
+-) && ac_have_func=yes
+-
+-# On HPUX9, an unprivileged user can get load averages through this function.
+-
+-for ac_func in pstat_getdynamic
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* Override any 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-done
+-
+-
+-# Solaris has libkstat which does not require root.
+-
+-{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
+-echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lkstat  $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 kstat_open ();
+-int
+-main ()
+-{
+-return kstat_open ();
+-  ;
+-  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_kstat_kstat_open=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_kstat_kstat_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_kstat_kstat_open" >&5
+-echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
+-if test $ac_cv_lib_kstat_kstat_open = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBKSTAT 1
+-_ACEOF
+-
+-  LIBS="-lkstat $LIBS"
+-
+-fi
+-
+-test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
+-
+-# Some systems with -lutil have (and need) -lkvm as well, some do not.
+-# On Solaris, -lkvm requires nlist from -lelf, so check that first
+-# to get the right answer into the cache.
+-# For kstat on solaris, we need libelf to force the definition of SVR4 below.
+-if test $ac_have_func = no; then
+-  { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
+-echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lelf  $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 elf_begin ();
+-int
+-main ()
+-{
+-return elf_begin ();
+-  ;
+-  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_elf_elf_begin=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_elf_elf_begin=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_elf_elf_begin" >&5
+-echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
+-if test $ac_cv_lib_elf_elf_begin = yes; then
+-  LIBS="-lelf $LIBS"
+-fi
+-
+-fi
+-if test $ac_have_func = no; then
+-  { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
+-echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lkvm  $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 kvm_open ();
+-int
+-main ()
+-{
+-return kvm_open ();
+-  ;
+-  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_kvm_kvm_open=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_kvm_kvm_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_kvm_kvm_open" >&5
+-echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
+-if test $ac_cv_lib_kvm_kvm_open = yes; then
+-  LIBS="-lkvm $LIBS"
+-fi
+-
+-  # Check for the 4.4BSD definition of getloadavg.
+-  { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
+-echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_util_getloadavg+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.  */
+-
+-/* 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 getloadavg ();
+-int
+-main ()
+-{
+-return getloadavg ();
+-  ;
+-  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_util_getloadavg=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_util_getloadavg=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_util_getloadavg" >&5
+-echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
+-if test $ac_cv_lib_util_getloadavg = yes; then
+-  LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
+-fi
+-
+-fi
+-
+-if test $ac_have_func = no; then
+-  # There is a commonly available library for RS/6000 AIX.
+-  # Since it is not a standard part of AIX, it might be installed locally.
+-  ac_getloadavg_LIBS=$LIBS
+-  LIBS="-L/usr/local/lib $LIBS"
+-  { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
+-echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lgetloadavg  $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 getloadavg ();
+-int
+-main ()
+-{
+-return getloadavg ();
+-  ;
+-  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_getloadavg_getloadavg=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_getloadavg_getloadavg=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_getloadavg_getloadavg" >&5
+-echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
+-if test $ac_cv_lib_getloadavg_getloadavg = yes; then
+-  LIBS="-lgetloadavg $LIBS"
+-else
+-  LIBS=$ac_getloadavg_LIBS
+-fi
+-
+-fi
+-
+-# Make sure it is really in the library, if we think we found it,
+-# otherwise set up the replacement function.
+-
+-for ac_func in getloadavg
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* Override any 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++    USE_X_TOOLKIT=none
++    if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
++      :
++    else
++      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
++       closing open displays.  This is no problem if you just use
++       one display, but if you use more than one and close one of them
++       Emacs may crash." >&5
++$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
++       closing open displays.  This is no problem if you just use
++       one display, but if you use more than one and close one of them
++       Emacs may crash." >&2;}
++      sleep 3
++    fi
++  fi
+ 
+-	eval "$as_ac_var=no"
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
++
++if test "${HAVE_GTK}" = "yes"; then
++
++      if test "$with_toolkit_scroll_bars" != no; then
++    with_toolkit_scroll_bars=yes
++  fi
++
++      HAVE_GTK_MULTIDISPLAY=no
++  for ac_func in gdk_display_open
++do :
++  ac_fn_c_check_func "$LINENO" "gdk_display_open" "ac_cv_func_gdk_display_open"
++if test "x$ac_cv_func_gdk_display_open" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_GDK_DISPLAY_OPEN 1
+ _ACEOF
++ HAVE_GTK_MULTIDISPLAY=yes
++fi
++done
+ 
+-else
+-  case " $LIBOBJS " in
+-  *" getloadavg.$ac_objext "* ) ;;
+-  *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
+- ;;
+-esac
++  if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
+ 
++$as_echo "#define HAVE_GTK_MULTIDISPLAY 1" >>confdefs.h
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define C_GETLOADAVG 1
+-_ACEOF
++  fi
+ 
+-# Figure out what our getloadavg.c needs.
+-ac_have_func=no
+-if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
+-echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
++          HAVE_GTK_FILE_SELECTION=no
++  ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
++#include <gtk/gtk.h>
++"
++if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
++  HAVE_GTK_FILE_SELECTION=yes
+ else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
+-echo $ECHO_N "checking sys/dg_sys_info.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 <sys/dg_sys_info.h>
++  HAVE_GTK_FILE_SELECTION=no
++fi
++
++  if test "$HAVE_GTK_FILE_SELECTION" = yes; then
++    for ac_func in gtk_file_selection_new
++do :
++  ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
++if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GTK_FILE_SELECTION_NEW 1
+ _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
++ HAVE_GTK_FILE_SELECTION=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_header_compiler=no
++  HAVE_GTK_FILE_SELECTION=no
+ fi
++done
+ 
+-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; }
++  fi
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
+-echo $ECHO_N "checking sys/dg_sys_info.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 <sys/dg_sys_info.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
++    HAVE_GTK_FILE_CHOOSER=no
++  ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_CHOOSER" "ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" "$ac_includes_default
++#include <gtk/gtk.h>
++"
++if test "x$ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" = x""yes; then :
++  HAVE_GTK_FILE_CHOOSER=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  HAVE_GTK_FILE_CHOOSER=no
++fi
+ 
+-  ac_header_preproc=no
++  if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
++    for ac_func in gtk_file_chooser_dialog_new
++do :
++  ac_fn_c_check_func "$LINENO" "gtk_file_chooser_dialog_new" "ac_cv_func_gtk_file_chooser_dialog_new"
++if test "x$ac_cv_func_gtk_file_chooser_dialog_new" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GTK_FILE_CHOOSER_DIALOG_NEW 1
++_ACEOF
++ HAVE_GTK_FILE_CHOOSER=yes
++else
++  HAVE_GTK_FILE_CHOOSER=no
+ fi
++done
+ 
+-rm -f conftest.err conftest.$ac_ext
+-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6; }
++  fi
+ 
+-# 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: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: sys/dg_sys_info.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: sys/dg_sys_info.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
++  if test "$HAVE_GTK_FILE_SELECTION" = yes \
++     && test "$HAVE_GTK_FILE_CHOOSER" = yes;  then
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
+-echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
++$as_echo "#define HAVE_GTK_FILE_BOTH 1" >>confdefs.h
+ 
+-fi
+-if test $ac_cv_header_sys_dg_sys_info_h = yes; then
+-  ac_have_func=yes
++  fi
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define DGUX 1
++      if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
++    HAVE_GTK_AND_PTHREAD=no
++    for ac_header in pthread.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
++if test "x$ac_cv_header_pthread_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_PTHREAD_H 1
+ _ACEOF
+ 
++fi
++
++done
+ 
+-{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
+-echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    if test "$ac_cv_header_pthread_h"; then
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
++$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
++if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ldgc  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lpthread  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -17831,1722 +8069,1417 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char dg_sys_info ();
++char pthread_self ();
+ int
+ main ()
+ {
+-return dg_sys_info ();
++return pthread_self ();
+   ;
+   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_dgc_dg_sys_info=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_pthread_pthread_self=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_dgc_dg_sys_info=no
++  ac_cv_lib_pthread_pthread_self=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core 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_dgc_dg_sys_info" >&5
+-echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
+-if test $ac_cv_lib_dgc_dg_sys_info = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBDGC 1
+-_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5
++$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; }
++if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then :
++  HAVE_GTK_AND_PTHREAD=yes
++fi
+ 
+-  LIBS="-ldgc $LIBS"
++    fi
++    if test "$HAVE_GTK_AND_PTHREAD" = yes; then
++      case "${canonical}" in
++        *-hpux*) ;;
++        *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
++      esac
+ 
+-fi
++$as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h
+ 
++    fi
++  fi
+ fi
+ 
++HAVE_DBUS=no
++if test "${with_dbus}" = "yes"; then
+ 
++  succeeded=no
+ 
+-if test "${ac_cv_header_locale_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for locale.h" >&5
+-echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_locale_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
+-echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
++  # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking locale.h usability" >&5
+-echo $ECHO_N "checking locale.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 <locale.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;;
++  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"
++    $as_echo "$as_me:${as_lineno-$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
+-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
++fi
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_header_compiler=no
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ 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 locale.h presence" >&5
+-echo $ECHO_N "checking locale.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 <locale.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
++  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
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
++$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
+ 
+-rm -f conftest.err conftest.$ac_ext
+-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6; }
++        if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++            succeeded=yes
+ 
+-# 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: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: locale.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: locale.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: locale.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: locale.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5
++$as_echo_n "checking DBUS_CFLAGS... " >&6; }
++            DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5
++$as_echo "$DBUS_CFLAGS" >&6; }
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for locale.h" >&5
+-echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_locale_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_locale_h=$ac_header_preproc
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
+-echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5
++$as_echo_n "checking DBUS_LIBS... " >&6; }
++            DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5
++$as_echo "$DBUS_LIBS" >&6; }
++        else
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "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
++        fi
+ 
+ 
+ 
+-for ac_func in setlocale
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
++     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
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
++  if test $succeeded = yes; then
++     HAVE_DBUS=yes
++  else
++     HAVE_DBUS=no
++  fi
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
++   if test "$HAVE_DBUS" = yes; then
++
++$as_echo "#define HAVE_DBUS 1" >>confdefs.h
+ 
+-#undef $ac_func
++   fi
++fi
+ 
+-/* 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
++HAVE_XAW3D=no
++if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
++  if test "$with_xaw3d" != no; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
++$as_echo_n "checking for xaw3d... " >&6; }
++    if test "${emacs_cv_xaw3d+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++#include <X11/Intrinsic.h>
++#include <X11/Xaw3d/Simple.h>
+ int
+ main ()
+ {
+-return $ac_func ();
++
+   ;
+   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
+-  eval "$as_ac_var=yes"
++if ac_fn_c_try_link "$LINENO"; then :
++  emacs_cv_xaw3d=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++  emacs_cv_xaw3d=no
+ fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ fi
+-done
+-
+-
+-# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
+-# uses stabs), but it is still SVR4.  We cannot check for <elf.h> because
+-# Irix 4.0.5F has the header but not the library.
+-if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
+-  ac_have_func=yes
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define SVR4 1
+-_ACEOF
++  else
++    emacs_cv_xaw3d=no
++  fi
++  if test $emacs_cv_xaw3d = yes; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
++$as_echo "yes; using Lucid toolkit" >&6; }
++    USE_X_TOOLKIT=LUCID
++    HAVE_XAW3D=yes
+ 
+-fi
++$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
+ 
+-if test $ac_have_func = no; then
+-  if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
+-echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
+-echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
++  else
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
++$as_echo_n "checking for libXaw... " >&6; }
++    if test "${emacs_cv_xaw+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
+-echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
+-#include <inq_stats/cpustats.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; }
++#include <X11/Intrinsic.h>
++#include <X11/Xaw/Simple.h>
++int
++main ()
++{
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
+-echo $ECHO_N "checking inq_stats/cpustats.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 <inq_stats/cpustats.h>
++  ;
++  return 0;
++}
+ _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: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: inq_stats/cpustats.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: inq_stats/cpustats.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
+-echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++if ac_fn_c_try_link "$LINENO"; then :
++  emacs_cv_xaw=yes
+ else
+-  ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
++  emacs_cv_xaw=no
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
+-echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
+-
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ fi
+-if test $ac_cv_header_inq_stats_cpustats_h = yes; then
+-  ac_have_func=yes
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define UMAX 1
+-_ACEOF
+-
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define UMAX4_3 1
+-_ACEOF
+ 
++    if test $emacs_cv_xaw = yes; then
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
++$as_echo "yes; using Lucid toolkit" >&6; }
++      USE_X_TOOLKIT=LUCID
++    elif test x"${USE_X_TOOLKIT}" = xLUCID; then
++      as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
++    else
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5
++$as_echo "no; do not use toolkit by default" >&6; }
++      USE_X_TOOLKIT=none
++    fi
++  fi
+ fi
+ 
++X_TOOLKIT_TYPE=$USE_X_TOOLKIT
+ 
+-fi
+-
+-if test $ac_have_func = no; then
+-  if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
+-echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
++if test "${USE_X_TOOLKIT}" != "none"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
++$as_echo_n "checking X11 toolkit version... " >&6; }
++  if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
+-echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
+-#include <sys/cpustats.h>
++#include <X11/Intrinsic.h>
++int
++main ()
++{
++#if XtSpecificationRelease < 6
++fail;
++#endif
++
++  ;
++  return 0;
++}
+ _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
++if ac_fn_c_try_link "$LINENO"; then :
++  emacs_cv_x11_toolkit_version_6=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_header_compiler=no
++  emacs_cv_x11_toolkit_version_6=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 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 sys/cpustats.h presence" >&5
+-echo $ECHO_N "checking sys/cpustats.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 <sys/cpustats.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
++  HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
++  if test $emacs_cv_x11_toolkit_version_6 = yes; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
++$as_echo "6 or newer" >&6; }
+ 
+-  ac_header_preproc=no
+-fi
++$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
+ 
+-rm -f conftest.err conftest.$ac_ext
+-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6; }
++  else
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
++$as_echo "before 6" >&6; }
++  fi
+ 
+-# 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: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: sys/cpustats.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: sys/cpustats.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: sys/cpustats.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: sys/cpustats.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
++  OLDLIBS="$LIBS"
++  if test x$HAVE_X11XTR6 = xyes; then
++    LIBS="-lXt -lSM -lICE $LIBS"
++  else
++    LIBS="-lXt $LIBS"
++  fi
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
++$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
++if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lXmu  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
+-echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++/* 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 XmuConvertStandardSelection ();
++int
++main ()
++{
++return XmuConvertStandardSelection ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
+ else
+-  ac_cv_header_sys_cpustats_h=$ac_header_preproc
++  ac_cv_lib_Xmu_XmuConvertStandardSelection=no
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
+-
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+-if test $ac_cv_header_sys_cpustats_h = yes; then
+-  ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
+-#define UMAX 1
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
++$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
++if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBXMU 1
+ _ACEOF
+ 
+-fi
+-
++  LIBS="-lXmu $LIBS"
+ 
+ fi
+ 
+-if test $ac_have_func = no; then
++  test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
++fi
+ 
+-for ac_header in mach/mach.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
++# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
++if test "${HAVE_X11}" = "yes"; then
++  if test "${USE_X_TOOLKIT}" != "none"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
++$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
++if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lXext  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
++
++/* 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 XShapeQueryExtension ();
++int
++main ()
++{
++return XShapeQueryExtension ();
++  ;
++  return 0;
++}
+ _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
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_Xext_XShapeQueryExtension=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_lib_Xext_XShapeQueryExtension=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
++$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
++if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBXEXT 1
++_ACEOF
++
++  LIBS="-lXext $LIBS"
+ 
+-	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; }
++  fi
++fi
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++if test "${USE_X_TOOLKIT}" = "MOTIF"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
++$as_echo_n "checking for Motif version 2.1... " >&6; }
++if test "${emacs_cv_motif_version_2_1+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <$ac_header>
++#include <Xm/Xm.h>
++int
++main ()
++{
++#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
++int x = 5;
++#else
++Motif version prior to 2.1.
++#endif
++  ;
++  return 0;
++}
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
++  emacs_cv_motif_version_2_1=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-  ac_header_preproc=no
++  emacs_cv_motif_version_2_1=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
++$as_echo "$emacs_cv_motif_version_2_1" >&6; }
++  HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
++  if test $emacs_cv_motif_version_2_1 = yes; then
++    HAVE_LIBXP=no
+ 
+-rm -f conftest.err conftest.$ac_ext
+-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6; }
++$as_echo "#define HAVE_MOTIF_2_1 1" >>confdefs.h
+ 
+-# 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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
++$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
++if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lXp  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++/* 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 XpCreateContext ();
++int
++main ()
++{
++return XpCreateContext ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_Xp_XpCreateContext=yes
+ else
+-  eval "$as_ac_Header=\$ac_header_preproc"
++  ac_cv_lib_Xp_XpCreateContext=no
+ fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
++$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
++if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
++  HAVE_LIBXP=yes
+ fi
+ 
+-done
+-
+-fi
++    if test ${HAVE_LIBXP} = yes; then
+ 
++$as_echo "#define HAVE_LIBXP 1" >>confdefs.h
+ 
+-for ac_header in nlist.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
++    fi
++  else
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
++$as_echo_n "checking for LessTif where some systems put it... " >&6; }
++if test "${emacs_cv_lesstif+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  # We put this in CFLAGS temporarily to precede other -I options
++    # that might be in CFLAGS temporarily.
++    # We put this in CPPFLAGS where it precedes the other -I options.
++    OLD_CPPFLAGS=$CPPFLAGS
++    OLD_CFLAGS=$CFLAGS
++    CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
++    CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
++#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
++int
++main ()
++{
++int x = 5;
++  ;
++  return 0;
++}
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
++  emacs_cv_lesstif=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_header_compiler=no
++  emacs_cv_lesstif=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; }
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
++$as_echo "$emacs_cv_lesstif" >&6; }
++    if test $emacs_cv_lesstif = yes; then
++      # Make sure this -I option remains in CPPFLAGS after it is set
++      # back to REAL_CPPFLAGS.
++      # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
++      # have those other -I options anyway.  Ultimately, having this
++      # directory ultimately in CPPFLAGS will be enough.
++      REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
++      LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
++    else
++      CFLAGS=$OLD_CFLAGS
++      CPPFLAGS=$OLD_CPPFLAGS
++    fi
++  fi
++fi
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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
++USE_TOOLKIT_SCROLL_BARS=no
++if test "${with_toolkit_scroll_bars}" != "no"; then
++  if test "${USE_X_TOOLKIT}" != "none"; then
++    if test "${USE_X_TOOLKIT}" = "MOTIF"; then
++      $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
+ 
+-rm -f conftest.err conftest.$ac_ext
+-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6; }
++      HAVE_XAW3D=no
++      USE_TOOLKIT_SCROLL_BARS=yes
++    elif test "${HAVE_XAW3D}" = "yes"; then
++      $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
+ 
+-# 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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++      USE_TOOLKIT_SCROLL_BARS=yes
++    fi
++  elif test "${HAVE_GTK}" = "yes"; then
++    $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
++    USE_TOOLKIT_SCROLL_BARS=yes
++  elif test "${HAVE_NS}" = "yes"; then
++    $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
+ 
++    USE_TOOLKIT_SCROLL_BARS=yes
++  fi
+ fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+- { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
+-echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
+-if test "${ac_cv_member_struct_nlist_n_un_n_name+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
++
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <nlist.h>
+ 
++	  #include <X11/Xlib.h>
++	  #include <X11/Xresource.h>
+ int
+ main ()
+ {
+-static struct nlist ac_aggr;
+-if (ac_aggr.n_un.n_name)
+-return 0;
++XIMProc  callback;
+   ;
+   return 0;
+ }
+ _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_cv_member_struct_nlist_n_un_n_name=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  HAVE_XIM=yes
++
++$as_echo "#define HAVE_XIM 1" >>confdefs.h
++
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  HAVE_XIM=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++
++if test "${with_xim}" != "no"; then
++
++$as_echo "#define USE_XIM 1" >>confdefs.h
++
++fi
++
++
++if test "${HAVE_XIM}" != "no"; then
++  late_CFLAGS=$CFLAGS
++  if test "$GCC" = yes; then
++    CFLAGS="$CFLAGS --pedantic-errors"
++  fi
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <nlist.h>
+ 
++#include <X11/Xlib.h>
++#include <X11/Xresource.h>
+ int
+ main ()
+ {
+-static struct nlist ac_aggr;
+-if (sizeof ac_aggr.n_un.n_name)
+-return 0;
++Display *display;
++XrmDatabase db;
++char *res_name;
++char *res_class;
++XIMProc  callback;
++XPointer *client_data;
++#ifndef __GNUC__
++/* If we're not using GCC, it's probably not XFree86, and this is
++   probably right, but we can't use something like --pedantic-errors.  */
++extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
++                                           char*, XIMProc, XPointer*);
++#endif
++(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
++   client_data);
+   ;
+   return 0;
+ }
+ _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;;
++if ac_fn_c_try_compile "$LINENO"; then :
++  emacs_cv_arg6_star=yes
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++    if test "$emacs_cv_arg6_star" = yes; then
++    $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
++
++  else
++    $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
++
++  fi
++  CFLAGS=$late_CFLAGS
++fi
++
++### Start of font-backend (under any platform) section.
++# (nothing here yet -- this is a placeholder)
++### End of font-backend (under any platform) section.
++
++### Start of font-backend (under X11) section.
++if test "${HAVE_X11}" = "yes"; then
++
++  succeeded=no
++
++  # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
++  $as_echo_n "(cached) " >&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"
++    $as_echo "$as_me:${as_lineno-$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
+-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_cv_member_struct_nlist_n_un_n_name=yes
++fi
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_member_struct_nlist_n_un_n_name=no
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
+-if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
+ 
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
+-_ACEOF
++  if test "$PKG_CONFIG" = "no" ; then
++     HAVE_FC=no
++  else
++     PKG_CONFIG_MIN_VERSION=0.9.0
++     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
++$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
+ 
++        if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++            succeeded=yes
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define NLIST_NAME_UNION 1
+-_ACEOF
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5
++$as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; }
++            FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5
++$as_echo "$FONTCONFIG_CFLAGS" >&6; }
+ 
+-fi
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5
++$as_echo_n "checking FONTCONFIG_LIBS... " >&6; }
++            FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5
++$as_echo "$FONTCONFIG_LIBS" >&6; }
++        else
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++            FONTCONFIG_CFLAGS=""
++            FONTCONFIG_LIBS=""
++            ## If we have a custom action on failure, don't print errors, but
++            ## do set a variable so people can do so.
++            FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
+ 
++        fi
+ 
+-fi
+ 
+-done
+ 
+-fi
+-done
++     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_FC=yes
++  else
++     HAVE_FC=no
++  fi
+ 
+-# Some definitions of getloadavg require that the program be installed setgid.
+-{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
+-echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
+-if test "${ac_cv_func_getloadavg_setgid+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 "$srcdir/$ac_config_libobj_dir/getloadavg.c"
+-#ifdef LDAV_PRIVILEGED
+-Yowza Am I SETGID yet
+-#endif
+-_ACEOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
+-  ac_cv_func_getloadavg_setgid=yes
+-else
+-  ac_cv_func_getloadavg_setgid=no
+-fi
+-rm -f conftest*
+ 
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
+-echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
+-if test $ac_cv_func_getloadavg_setgid = yes; then
+-  NEED_SETGID=true
++   ## Use -lXft if available, unless `--with-xft=no'.
++   HAVE_XFT=maybe
++    if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
++      with_xft="no";
++    fi
++    if test "x${with_xft}" != "xno"; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define GETLOADAVG_PRIVILEGED 1
+-_ACEOF
+ 
+-else
+-  NEED_SETGID=false
+-fi
++  succeeded=no
+ 
+-if test $ac_cv_func_getloadavg_setgid = yes; then
+-  { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
+-echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
+-if test "${ac_cv_group_kmem+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-   # On Solaris, /dev/kmem is a symlink.  Get info on the real file.
+-  ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
+-  # If we got an error (system does not support symlinks), try without -L.
+-  test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
+-  ac_cv_group_kmem=`echo $ac_ls_output \
+-    | sed -ne 's/[	 ][	 ]*/ /g;
+-	       s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\)  *.*/\1/;
+-	       / /s/.* //;p;'`
++  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"
++    $as_echo "$as_me:${as_lineno-$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
+-{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
+-echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
+-  KMEM_GROUP=$ac_cv_group_kmem
+-fi
+-if test "x$ac_save_LIBS" = x; then
+-  GETLOADAVG_LIBS=$LIBS
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
+ else
+-  GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+-LIBS=$ac_save_LIBS
+ 
+ 
+ 
+-{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+-echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
+-if test "${ac_cv_sys_largefile_source+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  if test "$PKG_CONFIG" = "no" ; then
++     HAVE_XFT=no
++  else
++     PKG_CONFIG_MIN_VERSION=0.9.0
++     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
++$as_echo_n "checking for xft >= 0.13.0... " >&6; }
++
++        if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++            succeeded=yes
++
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5
++$as_echo_n "checking XFT_CFLAGS... " >&6; }
++            XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5
++$as_echo "$XFT_CFLAGS" >&6; }
++
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5
++$as_echo_n "checking XFT_LIBS... " >&6; }
++            XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5
++$as_echo "$XFT_LIBS" >&6; }
++        else
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++            XFT_CFLAGS=""
++            XFT_LIBS=""
++            ## If we have a custom action on failure, don't print errors, but
++            ## do set a variable so people can do so.
++            XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.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
++     :
++  else
++     HAVE_XFT=no
++  fi
++
++      if test "$HAVE_XFT" != no; then
++	OLD_CPPFLAGS="$CPPFLAGS"
++	OLD_CFLAGS="$CFLAGS"
++	OLD_LIBS="$LIBS"
++	CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
++	CFLAGS="$CFLAGS $XFT_CFLAGS"
++	LIBS="$XFT_LIBS $LIBS"
++	ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
++if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
++$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
++if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  while :; do
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lXft $XFT_LIBS $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <stdio.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 XftFontOpen ();
+ int
+ main ()
+ {
+-return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
++return XftFontOpen ();
+   ;
+   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_sys_largefile_source=no; break
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_Xft_XftFontOpen=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
++  ac_cv_lib_Xft_XftFontOpen=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
++$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
++if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
++  HAVE_XFT=yes
++fi
+ 
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#define _LARGEFILE_SOURCE 1
+-#include <stdio.h>
+-int
+-main ()
+-{
+-return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
+-  ;
+-  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_sys_largefile_source=1; break
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ 
+-fi
++	if test "${HAVE_XFT}" = "yes"; then
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-  ac_cv_sys_largefile_source=unknown
+-  break
+-done
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
+-echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
+-case $ac_cv_sys_largefile_source in #(
+-  no | unknown) ;;
+-  *)
+-cat >>confdefs.h <<_ACEOF
+-#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+-_ACEOF
+-;;
+-esac
+-rm -f conftest*
++$as_echo "#define HAVE_XFT 1" >>confdefs.h
+ 
+-# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+-# in glibc 2.1.3, but that breaks too many other things.
+-# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+-if test $ac_cv_sys_largefile_source != unknown; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_FSEEKO 1
+-_ACEOF
++	  C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
++	else
++	  CPPFLAGS="$OLD_CPPFLAGS"
++	  CFLAGS="$OLD_CFLAGS"
++	  LIBS="$OLD_LIBS"
++	fi                        # "${HAVE_XFT}" = "yes"
++      fi                          # "$HAVE_XFT" != no
++    fi                            # "x${with_xft}" != "xno"
+ 
+-fi
++        if test "$HAVE_XFT" != "yes"; then
++       HAVE_XFT=no
++    fi
++
++
++    HAVE_FREETYPE=no
++    ## We used to allow building with FreeType and without Xft.
++    ## However, the ftx font backend driver is not in good shape.
++    if test "${HAVE_XFT}" = "yes"; then
++                  HAVE_FREETYPE=yes
++      FONTCONFIG_CFLAGS=
++      FONTCONFIG_LIBS=
++    fi
++
++    HAVE_LIBOTF=no
++    if test "${HAVE_FREETYPE}" = "yes"; then
+ 
++$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
+ 
+-# Configure getopt.
+-# getopt.m4 serial 10
++      if test "${with_libotf}" != "no"; then
+ 
+-# The getopt module assume you want GNU getopt, with getopt_long etc,
+-# rather than vanilla POSIX getopt.  This means your your code should
+-# always include <getopt.h> for the getopt prototypes.
++  succeeded=no
+ 
++  # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
++  $as_echo_n "(cached) " >&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"
++    $as_echo "$as_me:${as_lineno-$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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
+ 
+ 
++  if test "$PKG_CONFIG" = "no" ; then
++     HAVE_LIBOTF=no
++  else
++     PKG_CONFIG_MIN_VERSION=0.9.0
++     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
++$as_echo_n "checking for libotf... " >&6; }
+ 
++        if $PKG_CONFIG --exists "libotf" 2>&5; then
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++            succeeded=yes
+ 
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5
++$as_echo_n "checking LIBOTF_CFLAGS... " >&6; }
++            LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5
++$as_echo "$LIBOTF_CFLAGS" >&6; }
+ 
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5
++$as_echo_n "checking LIBOTF_LIBS... " >&6; }
++            LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5
++$as_echo "$LIBOTF_LIBS" >&6; }
++        else
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++            LIBOTF_CFLAGS=""
++            LIBOTF_LIBS=""
++            ## If we have a custom action on failure, don't print errors, but
++            ## do set a variable so people can do so.
++            LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
+ 
++        fi
+ 
+ 
+-# Prerequisites of lib/getopt*.
+ 
++     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_LIBOTF=yes
++  else
++     HAVE_LIBOTF=no
++  fi
+ 
++	if test "$HAVE_LIBOTF" = "yes"; then
+ 
+-  GETOPT_H=
++$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
+ 
+-for ac_header in getopt.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
++	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
++$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
++if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lotf  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
++
++/* 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 OTF_get_variation_glyphs ();
++int
++main ()
++{
++return OTF_get_variation_glyphs ();
++  ;
++  return 0;
++}
+ _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
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_otf_OTF_get_variation_glyphs=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_header_compiler=no
++  ac_cv_lib_otf_OTF_get_variation_glyphs=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
++$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
++if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
++  HAVE_OTF_GET_VARIATION_GLYPHS=yes
++else
++  HAVE_OTF_GET_VARIATION_GLYPHS=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; }
++	  if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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
++$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
+ 
+-  ac_header_preproc=no
+-fi
++	  fi
++	fi
++      fi
++            fi
+ 
+-rm -f conftest.err conftest.$ac_ext
+-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6; }
++    HAVE_M17N_FLT=no
++    if test "${HAVE_LIBOTF}" = yes; then
++      if test "${with_m17n_flt}" != "no"; then
+ 
+-# 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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++  succeeded=no
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
++  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"
++    $as_echo "$as_me:${as_lineno-$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
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
+ else
+-  GETOPT_H=getopt.h
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+-done
+ 
+-  if test -z "$GETOPT_H"; then
+ 
+-for ac_func in getopt_long_only
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
++  if test "$PKG_CONFIG" = "no" ; then
++     HAVE_M17N_FLT=no
++  else
++     PKG_CONFIG_MIN_VERSION=0.9.0
++     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
++$as_echo_n "checking for m17n-flt... " >&6; }
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
++        if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++            succeeded=yes
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5
++$as_echo_n "checking M17N_FLT_CFLAGS... " >&6; }
++            M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5
++$as_echo "$M17N_FLT_CFLAGS" >&6; }
++
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5
++$as_echo_n "checking M17N_FLT_LIBS... " >&6; }
++            M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5
++$as_echo "$M17N_FLT_LIBS" >&6; }
++        else
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++            M17N_FLT_CFLAGS=""
++            M17N_FLT_LIBS=""
++            ## If we have a custom action on failure, don't print errors, but
++            ## do set a variable so people can do so.
++            M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
+ 
+-#undef $ac_func
++        fi
+ 
+-/* 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 $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+ 
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  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
+-  eval "$as_ac_var=yes"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	eval "$as_ac_var=no"
+-fi
++     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
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
++  if test $succeeded = yes; then
++     HAVE_M17N_FLT=yes
++  else
++     HAVE_M17N_FLT=no
++  fi
++
++	if test "$HAVE_M17N_FLT" = "yes"; then
+ 
++$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
++
++	fi
++      fi
++    fi
+ else
+-  GETOPT_H=getopt.h
++    HAVE_XFT=no
++    HAVE_FREETYPE=no
++    HAVE_LIBOTF=no
++    HAVE_M17N_FLT=no
+ fi
+-done
++### End of font-backend (under X11) section.
++
++
++
++
++
+ 
+-  fi
+ 
+-      if test -z "$GETOPT_H"; then
+-    { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
+-echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
+-if test "${ac_cv_have_decl_optreset+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++
++
++
++### Use -lXpm if available, unless `--with-xpm=no'.
++HAVE_XPM=no
++if test "${HAVE_X11}" = "yes"; then
++  if test "${with_xpm}" != "no"; then
++    ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
++if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
++$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
++if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lXpm -lX11 $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <getopt.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 XpmReadFileToPixmap ();
+ int
+ main ()
+ {
+-#ifndef optreset
+-  (void) optreset;
+-#endif
+-
++return XpmReadFileToPixmap ();
+   ;
+   return 0;
+ }
+ _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_cv_have_decl_optreset=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_have_decl_optreset=no
++  ac_cv_lib_Xpm_XpmReadFileToPixmap=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++rm -f core 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_have_decl_optreset" >&5
+-echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
+-if test $ac_cv_have_decl_optreset = yes; then
+-  GETOPT_H=getopt.h
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
++$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
++if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
++  HAVE_XPM=yes
+ fi
+ 
+-  fi
++fi
+ 
+-      if test -z "$GETOPT_H"; then
+-    { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
+-echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
+-if test "${gl_cv_func_gnu_getopt+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test "$cross_compiling" = yes; then
+-  	 	 	 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
+-echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
+-if test "${ac_cv_have_decl_getopt_clip+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 <getopt.h>
+ 
+-int
+-main ()
+-{
+-#ifndef getopt_clip
+-  (void) getopt_clip;
++    if test "${HAVE_XPM}" = "yes"; then
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
++$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include "X11/xpm.h"
++#ifndef XpmReturnAllocPixels
++no_return_alloc_pixels
+ #endif
+ 
+-  ;
+-  return 0;
+-}
+ _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_cv_have_decl_getopt_clip=yes
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
++  HAVE_XPM=no
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_have_decl_getopt_clip=no
++  HAVE_XPM=yes
+ fi
++rm -f conftest*
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
+-echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
+-if test $ac_cv_have_decl_getopt_clip = yes; then
+-  gl_cv_func_gnu_getopt=no
+-else
+-  gl_cv_func_gnu_getopt=yes
++
++      if test "${HAVE_XPM}" = "yes"; then
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++      else
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++      fi
++    fi
++  fi
++
++  if test "${HAVE_XPM}" = "yes"; then
++
++$as_echo "#define HAVE_XPM 1" >>confdefs.h
++
++  fi
+ fi
+ 
++### Use -ljpeg if available, unless `--with-jpeg=no'.
++HAVE_JPEG=no
++if test "${HAVE_X11}" = "yes"; then
++  if test "${with_jpeg}" != "no"; then
++            ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
++if test "x$ac_cv_header_jerror_h" = x""yes; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
++$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
++if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-ljpeg  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <getopt.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 jpeg_destroy_compress ();
+ int
+ main ()
+ {
+-
+-	     char *myargv[3];
+-	     myargv[0] = "conftest";
+-	     myargv[1] = "-+";
+-	     myargv[2] = 0;
+-	     return getopt (2, myargv, "+a") != '?';
+-
++return jpeg_destroy_compress ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f 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>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (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_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  gl_cv_func_gnu_getopt=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_jpeg_jpeg_destroy_compress=yes
+ else
+-  echo "$as_me: program exited with status $ac_status" >&5
+-echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-( exit $ac_status )
+-gl_cv_func_gnu_getopt=no
++  ac_cv_lib_jpeg_jpeg_destroy_compress=no
+ fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+-
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
++$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
++if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
++  HAVE_JPEG=yes
+ fi
+-{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
+-echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
+-    if test "$gl_cv_func_gnu_getopt" = "no"; then
+-      GETOPT_H=getopt.h
+-    fi
+-  fi
+ 
++fi
+ 
+ 
+-  if test -n "$GETOPT_H"; then
++  fi
+ 
++    if test "${HAVE_JPEG}" = "yes"; then
++    $as_echo "#define HAVE_JPEG 1" >>confdefs.h
+ 
+-  GETOPT_H=getopt.h
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <jpeglib.h>
++	 version=JPEG_LIB_VERSION
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define __GETOPT_PREFIX rpl_
+ _ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
++  $as_echo "#define HAVE_JPEG 1" >>confdefs.h
+ 
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
++$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
++        HAVE_JPEG=no
++fi
++rm -f conftest*
+ 
+-
+-  :
+-  GETOPTOBJS='getopt.o getopt1.o'
+-
++  fi
+ fi
+ 
++### Use -lpng if available, unless `--with-png=no'.
++HAVE_PNG=no
++if test "${HAVE_X11}" = "yes"; then
++  if test "${with_png}" != "no"; then
++    # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
++    # in /usr/include/libpng.
++    for ac_header in png.h libpng/png.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
+ 
++fi
+ 
++done
+ 
+-{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
+-echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
+-if test "${ac_cv_func_getpgrp_void+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
++$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
++if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  # Use it with a single arg.
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lpng -lz -lm $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
++
++/* 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 png_get_channels ();
+ int
+ main ()
+ {
+-getpgrp (0);
++return png_get_channels ();
+   ;
+   return 0;
+ }
+ _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_cv_func_getpgrp_void=no
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_png_png_get_channels=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_getpgrp_void=yes
++  ac_cv_lib_png_png_get_channels=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
++$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
++if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
++  HAVE_PNG=yes
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
+-echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
+-if test $ac_cv_func_getpgrp_void = yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define GETPGRP_VOID 1
+-_ACEOF
++    fi
++  fi
+ 
+-fi
++  if test "${HAVE_PNG}" = "yes"; then
+ 
++$as_echo "#define HAVE_PNG 1" >>confdefs.h
+ 
++  fi
++fi
+ 
+-for ac_func in strftime
+-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
++### Use -ltiff if available, unless `--with-tiff=no'.
++HAVE_TIFF=no
++if test "${HAVE_X11}" = "yes"; then
++  if test "${with_tiff}" != "no"; then
++    ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
++if test "x$ac_cv_header_tiffio_h" = x""yes; then :
++  tifflibs="-lz -lm"
++      # At least one tiff package requires the jpeg library.
++      if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
++$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
++if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-ltiff $tifflibs $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -19554,73 +9487,57 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
++char TIFFGetVersion ();
+ int
+ main ()
+ {
+-return $ac_func ();
++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
+-  eval "$as_ac_var=yes"
++if ac_fn_c_try_link "$LINENO"; 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$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
++$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
++if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
++  HAVE_TIFF=yes
++fi
+ 
+-	eval "$as_ac_var=no"
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++
++  fi
++
++  if test "${HAVE_TIFF}" = "yes"; then
++
++$as_echo "#define HAVE_TIFF 1" >>confdefs.h
++
++  fi
+ fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+ 
+-else
+-  # strftime is in -lintl on SCO UNIX.
+-{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
+-echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_intl_strftime+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++### Use -lgif or -lungif if available, unless `--with-gif=no'.
++HAVE_GIF=no
++if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
++  ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
++if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
++  # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
++# Earlier versions can crash Emacs.
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
++$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
++if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lintl  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lgif  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -19629,91 +9546,51 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char strftime ();
++char EGifPutExtensionLast ();
+ int
+ main ()
+ {
+-return strftime ();
++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_intl_strftime=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_gif_EGifPutExtensionLast=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_intl_strftime=no
++  ac_cv_lib_gif_EGifPutExtensionLast=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core 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_intl_strftime" >&5
+-echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
+-if test $ac_cv_lib_intl_strftime = yes; then
+-  cat >>confdefs.h <<\_ACEOF
+-#define HAVE_STRFTIME 1
+-_ACEOF
+-
+-LIBS="-lintl $LIBS"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
++$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
++if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
++  HAVE_GIF=yes
++else
++  try_libungif=yes
+ fi
+ 
+ fi
+-done
+ 
+ 
+-# UNIX98 PTYs.
+ 
+-for ac_func in grantpt
+-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
++  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
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
++$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
++if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lungif  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -19721,95 +9598,84 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
++char EGifPutExtensionLast ();
+ int
+ main ()
+ {
+-return $ac_func ();
++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
+-  eval "$as_ac_var=yes"
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ungif_EGifPutExtensionLast=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=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
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
++$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
++if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
++  HAVE_GIF=yes
+ fi
+-done
+ 
+ 
+-# PTY-related GNU extensions.
++    if test "$HAVE_GIF" = yes; then
+ 
+-for ac_func in getpt
+-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
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
++$as_echo "#define LIBGIF -lungif" >>confdefs.h
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
++      ac_gif_lib_name="-lungif"
++    fi
++  fi
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
++  if test "${HAVE_GIF}" = "yes"; then
++
++$as_echo "#define HAVE_GIF 1" >>confdefs.h
++
++  fi
++fi
++
++if test "${HAVE_X11}" = "yes"; 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
++    as_fn_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" "$LINENO" 5
++  fi
++fi
+ 
+-#undef $ac_func
++### Use -lgpm if available, unless `--with-gpm=no'.
++HAVE_GPM=no
++if test "${with_gpm}" != "no"; then
++  ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
++if test "x$ac_cv_header_gpm_h" = x""yes; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
++$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
++if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lgpm  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -19817,80 +9683,90 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
++char Gpm_Open ();
+ int
+ main ()
+ {
+-return $ac_func ();
++return Gpm_Open ();
+   ;
+   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
+-  eval "$as_ac_var=yes"
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_gpm_Gpm_Open=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_lib_gpm_Gpm_Open=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
++$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
++if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
++  HAVE_GPM=yes
++fi
+ 
+-	eval "$as_ac_var=no"
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++
+ fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
++
++if test "${HAVE_GPM}" = "yes"; then
++
++$as_echo "#define HAVE_GPM 1" >>confdefs.h
+ 
+ fi
+-done
+ 
++ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
++if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
++
++$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h
++
++fi
++
++
++
++### Use NeXTstep API to implement GUI.
++if test "${HAVE_NS}" = "yes"; then
++
++$as_echo "#define HAVE_NS 1" >>confdefs.h
++
++  if test "${NS_IMPL_COCOA}" = "yes"; then
++
++$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
++
++    GNU_OBJC_CFLAGS=
++  fi
++  if test "${NS_IMPL_GNUSTEP}" = "yes"; then
++
++$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
++
++    GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
++  fi
++  if test "${NS_HAVE_NSINTEGER}" = "yes"; then
++
++$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
++
++  fi
++  # We also have mouse menus.
++  HAVE_MENUS=yes
++fi
+ 
+-# Check this now, so that we will NOT find the above functions in ncurses.
+-# That is because we have not set up to link ncurses in lib-src.
+-# It's better to believe a function is not available
+-# than to expect to find it in ncurses.
+ 
+-{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
+-echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++### Use session management (-lSM -lICE) if available
++HAVE_X_SM=no
++if test "${HAVE_X11}" = "yes"; then
++  ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
++if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
++$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
++if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lncurses  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lSM -lICE $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -19899,285 +9775,284 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char tparm ();
++char SmcOpenConnection ();
+ int
+ main ()
+ {
+-return tparm ();
++return SmcOpenConnection ();
+   ;
+   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_ncurses_tparm=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_SM_SmcOpenConnection=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_ncurses_tparm=no
++  ac_cv_lib_SM_SmcOpenConnection=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core 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_ncurses_tparm" >&5
+-echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
+-if test $ac_cv_lib_ncurses_tparm = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBNCURSES 1
+-_ACEOF
+-
+-  LIBS="-lncurses $LIBS"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
++$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
++if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
++  HAVE_X_SM=yes
++fi
+ 
+ fi
+ 
+ 
+-# Do we have res_init, for detecting changes in /etc/resolv.conf?
+ 
+-resolv=no
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++  if test "${HAVE_X_SM}" = "yes"; then
++
++$as_echo "#define HAVE_X_SM 1" >>confdefs.h
++
++    case "$LIBS" in
++      *-lSM*) ;;
++      *)      LIBS="-lSM -lICE $LIBS" ;;
++    esac
++  fi
++fi
++
++# If netdb.h doesn't declare h_errno, we must declare it by hand.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
++$as_echo_n "checking whether netdb declares h_errno... " >&6; }
++if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <netdb.h>
++int
++main ()
++{
++return h_errno;
++  ;
++  return 0;
++}
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  emacs_cv_netdb_declares_h_errno=yes
++else
++  emacs_cv_netdb_declares_h_errno=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
++$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
++if test $emacs_cv_netdb_declares_h_errno = yes; then
++
++$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
++
++fi
++
++# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
++# for constant arguments.  Useless!
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
++$as_echo_n "checking for working alloca.h... " >&6; }
++if test "${ac_cv_working_alloca_h+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <netinet/in.h>
+-#include <arpa/nameser.h>
+-#include <resolv.h>
++#include <alloca.h>
+ int
+ main ()
+ {
+-return res_init();
++char *p = (char *) alloca (2 * sizeof (int));
++			  if (p) return 0;
+   ;
+   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
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_working_alloca_h=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_working_alloca_h=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
++$as_echo "$ac_cv_working_alloca_h" >&6; }
++if test $ac_cv_working_alloca_h = yes; then
++
++$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+ 
+-	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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
++$as_echo_n "checking for alloca... " >&6; }
++if test "${ac_cv_func_alloca_works+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <netinet/in.h>
+-#include <arpa/nameser.h>
+-#include <resolv.h>
++#ifdef __GNUC__
++# define alloca __builtin_alloca
++#else
++# ifdef _MSC_VER
++#  include <malloc.h>
++#  define alloca _alloca
++# else
++#  ifdef HAVE_ALLOCA_H
++#   include <alloca.h>
++#  else
++#   ifdef _AIX
++ #pragma alloca
++#   else
++#    ifndef alloca /* predefined by HP cc +Olibcalls */
++char *alloca ();
++#    endif
++#   endif
++#  endif
++# endif
++#endif
++
+ int
+ main ()
+ {
+-return res_init();
++char *p = (char *) alloca (1);
++				    if (p) return 0;
+   ;
+   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
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_func_alloca_works=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	have_res_init=no
++  ac_cv_func_alloca_works=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"
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
++$as_echo "$ac_cv_func_alloca_works" >&6; }
+ 
+-if test "$have_res_init" = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_RES_INIT 1
+-_ACEOF
++if test $ac_cv_func_alloca_works = yes; then
+ 
+-fi
++$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+ 
+-# Do we need the Hesiod library to provide the support routines?
+-if test "$with_hesiod" != no ; then
+-  # Don't set $LIBS here -- see comments above.
+-  { 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
+-  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 res_send to an innocuous variant, in case <limits.h> declares res_send.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define res_send innocuous_res_send
++  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
++# that cause trouble.  Some versions do not even contain alloca or
++# contain a buggy version.  If you still want to use their alloca,
++# use ar to extract alloca.o from them instead of compiling alloca.c.
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char res_send (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
++ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+ 
+-#ifdef __STDC__
+-# include <limits.h>
++$as_echo "#define C_ALLOCA 1" >>confdefs.h
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
++$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
++if test "${ac_cv_os_cray+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#if defined CRAY && ! defined CRAY2
++webecray
+ #else
+-# include <assert.h>
++wenotbecray
+ #endif
+ 
+-#undef res_send
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "webecray" >/dev/null 2>&1; then :
++  ac_cv_os_cray=yes
++else
++  ac_cv_os_cray=no
++fi
++rm -f conftest*
+ 
+-/* 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 res_send ();
+-/* 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_res_send || defined __stub___res_send
+-choke me
+-#endif
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
++$as_echo "$ac_cv_os_cray" >&6; }
++if test $ac_cv_os_cray = yes; then
++  for ac_func in _getb67 GETB67 getb67; do
++    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define CRAY_STACKSEG_END $ac_func
++_ACEOF
++
++    break
++fi
++
++  done
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
++$as_echo_n "checking stack direction for C alloca... " >&6; }
++if test "${ac_cv_c_stack_direction+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test "$cross_compiling" = yes; then :
++  ac_cv_c_stack_direction=0
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$ac_includes_default
++int
++find_stack_direction ()
++{
++  static char *addr = 0;
++  auto char dummy;
++  if (addr == 0)
++    {
++      addr = &dummy;
++      return find_stack_direction ();
++    }
++  else
++    return (&dummy > addr) ? 1 : -1;
++}
+ 
+ int
+ main ()
+ {
+-return res_send ();
+-  ;
+-  return 0;
++  return find_stack_direction () < 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_func_res_send=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_c_stack_direction=1
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_res_send=no
++  ac_cv_c_stack_direction=-1
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ 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: $ac_cv_func_res_send" >&5
+-echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
+-if test $ac_cv_func_res_send = yes; then
+-  :
+-else
+-  { 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
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
++$as_echo "$ac_cv_c_stack_direction" >&6; }
++cat >>confdefs.h <<_ACEOF
++#define STACK_DIRECTION $ac_cv_c_stack_direction
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define __res_send innocuous___res_send
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char __res_send (); 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
++fi
++
++
++if test x"$ac_cv_func_alloca_works" != xyes; then
++   as_fn_error "a system implementation of alloca is required " "$LINENO" 5
++fi
+ 
+-#undef __res_send
++# fmod, logb, and frexp are found in -lm on most systems.
++# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
++$as_echo_n "checking for sqrt in -lm... " >&6; }
++if test "${ac_cv_lib_m_sqrt+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lm  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -20185,68 +10060,46 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char __res_send ();
+-/* 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___res_send || defined __stub_____res_send
+-choke me
+-#endif
+-
++char sqrt ();
+ int
+ main ()
+ {
+-return __res_send ();
++return sqrt ();
+   ;
+   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_func___res_send=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_m_sqrt=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func___res_send=no
++  ac_cv_lib_m_sqrt=no
+ fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
++$as_echo "$ac_cv_lib_m_sqrt" >&6; }
++if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBM 1
++_ACEOF
++
++  LIBS="-lm $LIBS"
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
+-echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
+-if test $ac_cv_func___res_send = yes; then
+-  :
+-else
+-  { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
+-echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_resolv_res_send+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++
++
++# Check for mail-locking functions in a "mail" library.  Probably this should
++# have the same check as for liblockfile below.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
++$as_echo_n "checking for maillock in -lmail... " >&6; }
++if test "${ac_cv_lib_mail_maillock+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lresolv  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lmail  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -20255,62 +10108,43 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char res_send ();
++char maillock ();
+ int
+ main ()
+ {
+-return res_send ();
++return maillock ();
+   ;
+   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_resolv_res_send=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_mail_maillock=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_resolv_res_send=no
++  ac_cv_lib_mail_maillock=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core 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_resolv_res_send" >&5
+-echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
+-if test $ac_cv_lib_resolv_res_send = yes; then
+-  resolv=yes
+-else
+-  { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
+-echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_resolv___res_send+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
++$as_echo "$ac_cv_lib_mail_maillock" >&6; }
++if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBMAIL 1
++_ACEOF
++
++  LIBS="-lmail $LIBS"
++
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
++$as_echo_n "checking for maillock in -llockfile... " >&6; }
++if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lresolv  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-llockfile  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -20319,387 +10153,458 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char __res_send ();
++char maillock ();
+ int
+ main ()
+ {
+-return __res_send ();
++return maillock ();
+   ;
+   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_resolv___res_send=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_lockfile_maillock=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_lib_lockfile_maillock=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
++$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
++if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBLOCKFILE 1
++_ACEOF
++
++  LIBS="-llockfile $LIBS"
+ 
+-	ac_cv_lib_resolv___res_send=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
++# If we have the shared liblockfile, assume we must use it for mail
++# locking (e.g. Debian).  If we couldn't link against liblockfile
++# (no liblockfile.a installed), ensure that we don't need to.
++if test "$ac_cv_lib_lockfile_maillock" = no; then
++      # Extract the first word of "liblockfile.so", so it can be a program name with args.
++set dummy liblockfile.so; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_liblockfile+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$liblockfile"; then
++  ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
++for as_dir in $as_dummy
++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_liblockfile="yes"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++  test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
+-echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
+-if test $ac_cv_lib_resolv___res_send = yes; then
+-  resolv=yes
+ fi
++liblockfile=$ac_cv_prog_liblockfile
++if test -n "$liblockfile"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
++$as_echo "$liblockfile" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++  if test $ac_cv_prog_liblockfile = yes; then
++    as_fn_error "Shared liblockfile found but can't link against it.
++This probably means that movemail could lose mail.
++There may be a \`development' package to install containing liblockfile." "$LINENO" 5
++  else :
++  fi
++fi
++for ac_func in touchlock
++do :
++  ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
++if test "x$ac_cv_func_touchlock" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_TOUCHLOCK 1
++_ACEOF
+ 
+ fi
++done
++
++for ac_header in maillock.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
++if test "x$ac_cv_header_maillock_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_MAILLOCK_H 1
++_ACEOF
+ 
+ fi
+ 
++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 setsid \
++strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
++utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
++__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
++sendto recvfrom getsockopt setsockopt getsockname getpeername \
++gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
++memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
++cfmakeraw cfsetspeed
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
+ fi
++done
+ 
+-  if test "$resolv" = yes ; then
+-    RESOLVLIB=-lresolv
+-  else
+-    RESOLVLIB=
+-  fi
+-  { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
+-echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
+-if test "${ac_cv_func_hes_getmailhost+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++
++for ac_header in sys/un.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_un_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_UN_H 1
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define hes_getmailhost innocuous_hes_getmailhost
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char hes_getmailhost (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
++fi
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
++done
+ 
+-#undef hes_getmailhost
+ 
+-/* 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 hes_getmailhost ();
+-/* 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_hes_getmailhost || defined __stub___hes_getmailhost
+-choke me
+-#endif
+ 
+-int
+-main ()
+-{
+-return hes_getmailhost ();
+-  ;
+-  return 0;
+-}
++
++
++  for ac_header in $ac_header_list
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
++"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _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_func_hes_getmailhost=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	ac_cv_func_hes_getmailhost=no
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++done
++
++
++
++
++
++
++
++
++  for ac_func in $ac_func_list
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
+-echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
+-if test $ac_cv_func_hes_getmailhost = yes; then
+-  :
++done
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
++$as_echo_n "checking for working mktime... " >&6; }
++if test "${ac_cv_func_working_mktime+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
+-echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_working_mktime=no
+ else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lhesiod $RESOLVLIB $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
++/* Test program from Paul Eggert and Tony Leneis.  */
++#ifdef TIME_WITH_SYS_TIME
++# include <sys/time.h>
++# include <time.h>
++#else
++# ifdef HAVE_SYS_TIME_H
++#  include <sys/time.h>
++# else
++#  include <time.h>
++# endif
++#endif
+ 
+-/* 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"
++#include <limits.h>
++#include <stdlib.h>
++
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
+ #endif
+-char hes_getmailhost ();
+-int
+-main ()
++
++#ifndef HAVE_ALARM
++# define alarm(X) /* empty */
++#endif
++
++/* Work around redefinition to rpl_putenv by other config tests.  */
++#undef putenv
++
++static time_t time_t_max;
++static time_t time_t_min;
++
++/* Values we'll use to set the TZ environment variable.  */
++static char *tz_strings[] = {
++  (char *) 0, "TZ=GMT0", "TZ=JST-9",
++  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
++};
++#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
++
++/* Return 0 if mktime fails to convert a date in the spring-forward gap.
++   Based on a problem report from Andreas Jaeger.  */
++static int
++spring_forward_gap ()
+ {
+-return hes_getmailhost ();
+-  ;
+-  return 0;
++  /* glibc (up to about 1998-10-07) failed this test. */
++  struct tm tm;
++
++  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
++     instead of "TZ=America/Vancouver" in order to detect the bug even
++     on systems that don't support the Olson extension, or don't have the
++     full zoneinfo tables installed.  */
++  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
++
++  tm.tm_year = 98;
++  tm.tm_mon = 3;
++  tm.tm_mday = 5;
++  tm.tm_hour = 2;
++  tm.tm_min = 0;
++  tm.tm_sec = 0;
++  tm.tm_isdst = -1;
++  return mktime (&tm) != (time_t) -1;
++}
++
++static int
++mktime_test1 (now)
++     time_t now;
++{
++  struct tm *lt;
++  return ! (lt = localtime (&now)) || mktime (lt) == now;
++}
++
++static int
++mktime_test (now)
++     time_t now;
++{
++  return (mktime_test1 (now)
++	  && mktime_test1 ((time_t) (time_t_max - now))
++	  && mktime_test1 ((time_t) (time_t_min + now)));
++}
++
++static int
++irix_6_4_bug ()
++{
++  /* Based on code from Ariel Faigon.  */
++  struct tm tm;
++  tm.tm_year = 96;
++  tm.tm_mon = 3;
++  tm.tm_mday = 0;
++  tm.tm_hour = 0;
++  tm.tm_min = 0;
++  tm.tm_sec = 0;
++  tm.tm_isdst = -1;
++  mktime (&tm);
++  return tm.tm_mon == 2 && tm.tm_mday == 31;
+ }
+-_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_hesiod_hes_getmailhost=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	ac_cv_lib_hesiod_hes_getmailhost=no
+-fi
++static int
++bigtime_test (j)
++     int j;
++{
++  struct tm tm;
++  time_t now;
++  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
++  now = mktime (&tm);
++  if (now != (time_t) -1)
++    {
++      struct tm *lt = localtime (&now);
++      if (! (lt
++	     && lt->tm_year == tm.tm_year
++	     && lt->tm_mon == tm.tm_mon
++	     && lt->tm_mday == tm.tm_mday
++	     && lt->tm_hour == tm.tm_hour
++	     && lt->tm_min == tm.tm_min
++	     && lt->tm_sec == tm.tm_sec
++	     && lt->tm_yday == tm.tm_yday
++	     && lt->tm_wday == tm.tm_wday
++	     && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
++		  == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
++	return 0;
++    }
++  return 1;
++}
+ 
+-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_hesiod_hes_getmailhost" >&5
+-echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
+-if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
++static int
++year_2050_test ()
++{
++  /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
++     ignoring leap seconds.  */
++  unsigned long int answer = 2527315200UL;
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_LIBHESIOD 1
+-_ACEOF
++  struct tm tm;
++  time_t t;
++  tm.tm_year = 2050 - 1900;
++  tm.tm_mon = 2 - 1;
++  tm.tm_mday = 1;
++  tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
++  tm.tm_isdst = -1;
+ 
+-else
+-  :
+-fi
++  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
++     instead of "TZ=America/Vancouver" in order to detect the bug even
++     on systems that don't support the Olson extension, or don't have the
++     full zoneinfo tables installed.  */
++  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+ 
+-fi
++  t = mktime (&tm);
+ 
+-fi
++  /* Check that the result is either a failure, or close enough
++     to the correct answer that we can assume the discrepancy is
++     due to leap seconds.  */
++  return (t == (time_t) -1
++	  || (0 < t && answer - 120 <= t && t <= answer + 120));
++}
+ 
+-# Do we need libresolv (due to res_init or Hesiod)?
+-if test "$resolv" = yes ; then
++int
++main ()
++{
++  time_t t, delta;
++  int i, j;
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_LIBRESOLV 1
+-_ACEOF
++  /* This test makes some buggy mktime implementations loop.
++     Give up after 60 seconds; a mktime slower than that
++     isn't worth using anyway.  */
++  alarm (60);
+ 
+-fi
++  for (;;)
++    {
++      t = (time_t_max << 1) + 1;
++      if (t <= time_t_max)
++	break;
++      time_t_max = t;
++    }
++  time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
+ 
+-# These tell us which Kerberos-related libraries to use.
+-if test "${with_kerberos}" != no; then
++  delta = time_t_max / 997; /* a suitable prime number */
++  for (i = 0; i < N_STRINGS; i++)
++    {
++      if (tz_strings[i])
++	putenv (tz_strings[i]);
+ 
+-{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
+-echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_com_err_com_err+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lcom_err  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
++      for (t = 0; t <= time_t_max - delta; t += delta)
++	if (! mktime_test (t))
++	  return 1;
++      if (! (mktime_test ((time_t) 1)
++	     && mktime_test ((time_t) (60 * 60))
++	     && mktime_test ((time_t) (60 * 60 * 24))))
++	return 1;
+ 
+-/* 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 com_err ();
+-int
+-main ()
+-{
+-return com_err ();
+-  ;
+-  return 0;
++      for (j = 1; ; j <<= 1)
++	if (! bigtime_test (j))
++	  return 1;
++	else if (INT_MAX / 2 < j)
++	  break;
++      if (! bigtime_test (INT_MAX))
++	return 1;
++    }
++  return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
+ }
+ _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_com_err_com_err=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_working_mktime=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_func_working_mktime=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
+-	ac_cv_lib_com_err_com_err=no
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
++$as_echo "$ac_cv_func_working_mktime" >&6; }
++if test $ac_cv_func_working_mktime = no; then
++  case " $LIBOBJS " in
++  *" mktime.$ac_objext "* ) ;;
++  *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
++ ;;
++esac
+ 
+-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_com_err_com_err" >&5
+-echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
+-if test $ac_cv_lib_com_err_com_err = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBCOM_ERR 1
+-_ACEOF
+ 
+-  LIBS="-lcom_err $LIBS"
++if test "$ac_cv_func_working_mktime" = no; then
++
++$as_echo "#define BROKEN_MKTIME 1" >>confdefs.h
+ 
+ fi
+ 
++ac_have_func=no # yes means we've found a way to get the load average.
+ 
+-{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
+-echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lk5crypto  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
++# Make sure getloadavg.c is where it belongs, at configure-time.
++test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
++  as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5
+ 
+-/* 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 mit_des_cbc_encrypt ();
+-int
+-main ()
+-{
+-return mit_des_cbc_encrypt ();
+-  ;
+-  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_k5crypto_mit_des_cbc_encrypt=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++ac_save_LIBS=$LIBS
+ 
+-	ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
++# Check for getloadavg, but be sure not to touch the cache variable.
++(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
++if test "x$ac_cv_func_getloadavg" = x""yes; then :
++  exit 0
++else
++  exit 1
+ fi
++) && ac_have_func=yes
+ 
+-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_k5crypto_mit_des_cbc_encrypt" >&5
+-echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
+-if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
++# On HPUX9, an unprivileged user can get load averages through this function.
++for ac_func in pstat_getdynamic
++do :
++  ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
++if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBK5CRYPTO 1
++#define HAVE_PSTAT_GETDYNAMIC 1
+ _ACEOF
+ 
+-  LIBS="-lk5crypto $LIBS"
+-
+ fi
++done
+ 
+ 
+-{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
+-echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++# Solaris has libkstat which does not require root.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
++$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
++if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lcrypto  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lkstat  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -20708,69 +10613,50 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char mit_des_cbc_encrypt ();
++char kstat_open ();
+ int
+ main ()
+ {
+-return mit_des_cbc_encrypt ();
++return kstat_open ();
+   ;
+   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_crypto_mit_des_cbc_encrypt=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_kstat_kstat_open=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_crypto_mit_des_cbc_encrypt=no
++  ac_cv_lib_kstat_kstat_open=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core 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_crypto_mit_des_cbc_encrypt" >&5
+-echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
+-if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
++$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
++if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBCRYPTO 1
++#define HAVE_LIBKSTAT 1
+ _ACEOF
+ 
+-  LIBS="-lcrypto $LIBS"
++  LIBS="-lkstat $LIBS"
+ 
+ fi
+ 
++test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
+ 
+-{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
+-echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++# Some systems with -lutil have (and need) -lkvm as well, some do not.
++# On Solaris, -lkvm requires nlist from -lelf, so check that first
++# to get the right answer into the cache.
++# For kstat on solaris, we need libelf to force the definition of SVR4 below.
++if test $ac_have_func = no; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
++$as_echo_n "checking for elf_begin in -lelf... " >&6; }
++if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lkrb5  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lelf  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -20779,70 +10665,40 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char krb5_init_context ();
++char elf_begin ();
+ int
+ main ()
+ {
+-return krb5_init_context ();
++return elf_begin ();
+   ;
+   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_krb5_krb5_init_context=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_elf_elf_begin=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_krb5_krb5_init_context=no
++  ac_cv_lib_elf_elf_begin=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core 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_krb5_krb5_init_context" >&5
+-echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
+-if test $ac_cv_lib_krb5_krb5_init_context = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBKRB5 1
+-_ACEOF
+-
+-  LIBS="-lkrb5 $LIBS"
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
++$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
++if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
++  LIBS="-lelf $LIBS"
+ fi
+ 
+-  if test "${with_kerberos5}" = no; then
+-
+-{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
+-echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++if test $ac_have_func = no; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
++$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
++if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ldes425  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lkvm  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -20851,68 +10707,39 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char des_cbc_encrypt ();
++char kvm_open ();
+ int
+ main ()
+ {
+-return des_cbc_encrypt ();
++return kvm_open ();
+   ;
+   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_des425_des_cbc_encrypt=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_kvm_kvm_open=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_des425_des_cbc_encrypt=no
++  ac_cv_lib_kvm_kvm_open=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core 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_des425_des_cbc_encrypt" >&5
+-echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
+-if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBDES425 1
+-_ACEOF
+-
+-  LIBS="-ldes425 $LIBS"
+-
+-else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
++$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
++if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
++  LIBS="-lkvm $LIBS"
++fi
+ 
+-{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
+-echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  # Check for the 4.4BSD definition of getloadavg.
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
++$as_echo_n "checking for getloadavg in -lutil... " >&6; }
++if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ldes  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lutil  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -20921,71 +10748,45 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char des_cbc_encrypt ();
++char getloadavg ();
+ int
+ main ()
+ {
+-return des_cbc_encrypt ();
++return getloadavg ();
+   ;
+   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_des_des_cbc_encrypt=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_util_getloadavg=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_des_des_cbc_encrypt=no
++  ac_cv_lib_util_getloadavg=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core 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_des_des_cbc_encrypt" >&5
+-echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
+-if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBDES 1
+-_ACEOF
+-
+-  LIBS="-ldes $LIBS"
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
++$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
++if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
++  LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
+ fi
+ 
+ fi
+ 
+-
+-{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
+-echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++if test $ac_have_func = no; then
++  # There is a commonly available library for RS/6000 AIX.
++  # Since it is not a standard part of AIX, it might be installed locally.
++  ac_getloadavg_LIBS=$LIBS
++  LIBS="-L/usr/local/lib $LIBS"
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
++$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
++if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lkrb4  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lgetloadavg  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -20994,68 +10795,70 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char krb_get_cred ();
++char getloadavg ();
+ int
+ main ()
+ {
+-return krb_get_cred ();
++return getloadavg ();
+   ;
+   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_krb4_krb_get_cred=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_getloadavg_getloadavg=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_krb4_krb_get_cred=no
++  ac_cv_lib_getloadavg_getloadavg=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core 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_krb4_krb_get_cred" >&5
+-echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
+-if test $ac_cv_lib_krb4_krb_get_cred = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
++$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
++if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
++  LIBS="-lgetloadavg $LIBS"
++else
++  LIBS=$ac_getloadavg_LIBS
++fi
++
++fi
++
++# Make sure it is really in the library, if we think we found it,
++# otherwise set up the replacement function.
++for ac_func in getloadavg
++do :
++  ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
++if test "x$ac_cv_func_getloadavg" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBKRB4 1
++#define HAVE_GETLOADAVG 1
+ _ACEOF
+ 
+-  LIBS="-lkrb4 $LIBS"
+-
+ else
++  case " $LIBOBJS " in
++  *" getloadavg.$ac_objext "* ) ;;
++  *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
++ ;;
++esac
++
++
++$as_echo "#define C_GETLOADAVG 1" >>confdefs.h
++
++# Figure out what our getloadavg.c needs.
++ac_have_func=no
++ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
++  ac_have_func=yes
++
++$as_echo "#define DGUX 1" >>confdefs.h
+ 
+-{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
+-echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
++$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
++if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lkrb  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-ldgc  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -21064,1410 +10867,795 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char krb_get_cred ();
++char dg_sys_info ();
+ int
+ main ()
+ {
+-return krb_get_cred ();
++return dg_sys_info ();
+   ;
+   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_krb_krb_get_cred=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_dgc_dg_sys_info=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_krb_krb_get_cred=no
++  ac_cv_lib_dgc_dg_sys_info=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core 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_krb_krb_get_cred" >&5
+-echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
+-if test $ac_cv_lib_krb_krb_get_cred = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
++$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
++if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBKRB 1
++#define HAVE_LIBDGC 1
+ _ACEOF
+ 
+-  LIBS="-lkrb $LIBS"
++  LIBS="-ldgc $LIBS"
+ 
+ fi
+ 
+ fi
+ 
+-  fi
+ 
+-  if test "${with_kerberos5}" != no; then
+ 
+-for ac_header in krb5.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
++if test "x$ac_cv_header_locale_h" = x""yes; then :
+ 
+-	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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
++for ac_func in setlocale
++do :
++  ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
++if test "x$ac_cv_func_setlocale" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SETLOCALE 1
+ _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
++done
+ 
+-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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
++# uses stabs), but it is still SVR4.  We cannot check for <elf.h> because
++# Irix 4.0.5F has the header but not the library.
++if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
++  ac_have_func=yes
++
++$as_echo "#define SVR4 1" >>confdefs.h
++
++fi
++
++if test $ac_have_func = no; then
++  ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
++if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
++  ac_have_func=yes
++
++$as_echo "#define UMAX 1" >>confdefs.h
++
++
++$as_echo "#define UMAX4_3 1" >>confdefs.h
++
++fi
++
++
++fi
++
++if test $ac_have_func = no; then
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
++  ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
++
+ 
+ fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++
++if test $ac_have_func = no; then
++  for ac_header in mach/mach.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
++if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_MACH_MACH_H 1
+ _ACEOF
+- { echo "$as_me:$LINENO: checking for krb5_error.text" >&5
+-echo $ECHO_N "checking for krb5_error.text... $ECHO_C" >&6; }
+-if test "${ac_cv_member_krb5_error_text+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 <krb5.h>
+ 
+-int
+-main ()
+-{
+-static krb5_error ac_aggr;
+-if (ac_aggr.text)
+-return 0;
+-  ;
+-  return 0;
+-}
++fi
++
++done
++
++fi
++
++for ac_header in nlist.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
++if test "x$ac_cv_header_nlist_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_NLIST_H 1
+ _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_cv_member_krb5_error_text=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++ ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
++"
++if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
+ 
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <krb5.h>
+ 
+-int
+-main ()
+-{
+-static krb5_error ac_aggr;
+-if (sizeof ac_aggr.text)
+-return 0;
+-  ;
+-  return 0;
+-}
++
++$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
++
++fi
++
++
++fi
++
++done
++
++fi
++done
++
++
++# Some definitions of getloadavg require that the program be installed setgid.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5
++$as_echo_n "checking whether getloadavg requires setgid... " >&6; }
++if test "${ac_cv_func_getloadavg_setgid+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
++#ifdef LDAV_PRIVILEGED
++Yowza Am I SETGID yet
++#endif
+ _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_cv_member_krb5_error_text=yes
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then :
++  ac_cv_func_getloadavg_setgid=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_func_getloadavg_setgid=no
++fi
++rm -f conftest*
+ 
+-	ac_cv_member_krb5_error_text=no
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5
++$as_echo "$ac_cv_func_getloadavg_setgid" >&6; }
++if test $ac_cv_func_getloadavg_setgid = yes; then
++  NEED_SETGID=true
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h
++
++else
++  NEED_SETGID=false
+ fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++if test $ac_cv_func_getloadavg_setgid = yes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5
++$as_echo_n "checking group of /dev/kmem... " >&6; }
++if test "${ac_cv_group_kmem+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++   # On Solaris, /dev/kmem is a symlink.  Get info on the real file.
++  ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
++  # If we got an error (system does not support symlinks), try without -L.
++  test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
++  ac_cv_group_kmem=`$as_echo "$ac_ls_output" \
++    | sed -ne 's/[	 ][	 ]*/ /g;
++	       s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\)  *.*/\1/;
++	       / /s/.* //;p;'`
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5
++$as_echo "$ac_cv_group_kmem" >&6; }
++  KMEM_GROUP=$ac_cv_group_kmem
++fi
++if test "x$ac_save_LIBS" = x; then
++  GETLOADAVG_LIBS=$LIBS
++else
++  GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"`
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text" >&5
+-echo "${ECHO_T}$ac_cv_member_krb5_error_text" >&6; }
+-if test $ac_cv_member_krb5_error_text = yes; then
++LIBS=$ac_save_LIBS
+ 
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_KRB5_ERROR_TEXT 1
+-_ACEOF
+ 
+ 
+-fi
+-{ echo "$as_me:$LINENO: checking for krb5_error.e_text" >&5
+-echo $ECHO_N "checking for krb5_error.e_text... $ECHO_C" >&6; }
+-if test "${ac_cv_member_krb5_error_e_text+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
++$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
++if test "${ac_cv_sys_largefile_source+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  while :; do
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <krb5.h>
+-
++#include <sys/types.h> /* for off_t */
++     #include <stdio.h>
+ int
+ main ()
+ {
+-static krb5_error ac_aggr;
+-if (ac_aggr.e_text)
+-return 0;
++int (*fp) (FILE *, off_t, int) = fseeko;
++     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+   ;
+   return 0;
+ }
+ _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_cv_member_krb5_error_e_text=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_sys_largefile_source=no; break
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <krb5.h>
+-
++#define _LARGEFILE_SOURCE 1
++#include <sys/types.h> /* for off_t */
++     #include <stdio.h>
+ int
+ main ()
+ {
+-static krb5_error ac_aggr;
+-if (sizeof ac_aggr.e_text)
+-return 0;
++int (*fp) (FILE *, off_t, int) = fseeko;
++     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+   ;
+   return 0;
+ }
+ _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_cv_member_krb5_error_e_text=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_member_krb5_error_e_text=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_sys_largefile_source=1; break
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  ac_cv_sys_largefile_source=unknown
++  break
++done
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_text" >&5
+-echo "${ECHO_T}$ac_cv_member_krb5_error_e_text" >&6; }
+-if test $ac_cv_member_krb5_error_e_text = yes; then
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
++$as_echo "$ac_cv_sys_largefile_source" >&6; }
++case $ac_cv_sys_largefile_source in #(
++  no | unknown) ;;
++  *)
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_KRB5_ERROR_E_TEXT 1
++#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+ _ACEOF
++;;
++esac
++rm -rf conftest*
+ 
++# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
++# in glibc 2.1.3, but that breaks too many other things.
++# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
++if test $ac_cv_sys_largefile_source != unknown; then
+ 
+-fi
++$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
+ 
+ fi
+ 
+-done
+-
+-  else
+ 
+-for ac_header in des.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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
++# Configure getopt.
++# getopt.m4 serial 10
+ 
+-	ac_header_compiler=no
+-fi
++# The getopt module assume you want GNU getopt, with getopt_long etc,
++# rather than vanilla POSIX getopt.  This means your your code should
++# always include <getopt.h> for the getopt prototypes.
+ 
+-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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+ 
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+ 
+-else
+ 
+-for ac_header in kerberosIV/des.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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; }
++# Prerequisites of lib/getopt*.
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++  GETOPT_H=
++  for ac_header in getopt.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
++if test "x$ac_cv_header_getopt_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETOPT_H 1
++_ACEOF
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  eval "$as_ac_Header=\$ac_header_preproc"
++  GETOPT_H=getopt.h
+ fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+ 
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++done
++
++  if test -z "$GETOPT_H"; then
++    for ac_func in getopt_long_only
++do :
++  ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
++if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_GETOPT_LONG_ONLY 1
+ _ACEOF
+ 
+ else
++  GETOPT_H=getopt.h
++fi
++done
+ 
+-for ac_header in kerberos/des.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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
++  fi
+ 
+-	ac_header_compiler=no
++      if test -z "$GETOPT_H"; then
++    ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
++"
++if test "x$ac_cv_have_decl_optreset" = x""yes; then :
++  GETOPT_H=getopt.h
+ 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; }
++  fi
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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
++      if test -z "$GETOPT_H"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
++$as_echo_n "checking for working GNU getopt function... " >&6; }
++if test "${gl_cv_func_gnu_getopt+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test "$cross_compiling" = yes; then :
++  	 	 	 ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h>
++"
++if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then :
++  gl_cv_func_gnu_getopt=no
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-  ac_header_preproc=no
++  gl_cv_func_gnu_getopt=yes
+ fi
+ 
+-rm -f conftest.err conftest.$ac_ext
+-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6; }
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <getopt.h>
++int
++main ()
++{
+ 
+-# 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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++	     char *myargv[3];
++	     myargv[0] = "conftest";
++	     myargv[1] = "-+";
++	     myargv[2] = 0;
++	     return getopt (2, myargv, "+a") != '?';
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  gl_cv_func_gnu_getopt=yes
+ else
+-  eval "$as_ac_Header=\$ac_header_preproc"
++  gl_cv_func_gnu_getopt=no
+ fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+ 
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5
++$as_echo "$gl_cv_func_gnu_getopt" >&6; }
++    if test "$gl_cv_func_gnu_getopt" = "no"; then
++      GETOPT_H=getopt.h
++    fi
++  fi
+ 
+-done
+ 
+-fi
+ 
+-done
++  if test -n "$GETOPT_H"; then :
++
++
++  GETOPT_H=getopt.h
++
++$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
++
++
++
++  :
++  GETOPTOBJS='getopt.o getopt1.o'
+ 
+ fi
+ 
+-done
+ 
+ 
+-for ac_header in krb.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
++$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
++if test "${ac_cv_func_getpgrp_void+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  # Use it with a single arg.
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ $ac_includes_default
+-#include <$ac_header>
++int
++main ()
++{
++getpgrp (0);
++  ;
++  return 0;
++}
+ _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
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_func_getpgrp_void=no
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_header_compiler=no
++  ac_cv_func_getpgrp_void=yes
+ 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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
++$as_echo "$ac_cv_func_getpgrp_void" >&6; }
++if test $ac_cv_func_getpgrp_void = yes; then
+ 
+-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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+ 
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++
++for ac_func in strftime
++do :
++  ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
++if test "x$ac_cv_func_strftime" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_STRFTIME 1
+ _ACEOF
+ 
+ else
+-
+-for ac_header in kerberosIV/krb.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
++  # strftime is in -lintl on SCO UNIX.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
++$as_echo_n "checking for strftime in -lintl... " >&6; }
++if test "${ac_cv_lib_intl_strftime+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lintl  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
++
++/* 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 strftime ();
++int
++main ()
++{
++return strftime ();
++  ;
++  return 0;
++}
+ _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
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_intl_strftime=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_lib_intl_strftime=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
++$as_echo "$ac_cv_lib_intl_strftime" >&6; }
++if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
++  $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
+ 
+-	ac_header_compiler=no
++LIBS="-lintl $LIBS"
+ 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; }
++fi
++done
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++
++# UNIX98 PTYs.
++for ac_func in grantpt
++do :
++  ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
++if test "x$ac_cv_func_grantpt" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GRANTPT 1
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
++
++fi
++done
++
++
++# PTY-related GNU extensions.
++for ac_func in getpt
++do :
++  ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
++if test "x$ac_cv_func_getpt" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETPT 1
+ _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
++done
+ 
+-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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++# Check this now, so that we will NOT find the above functions in ncurses.
++# That is because we have not set up to link ncurses in lib-src.
++# It's better to believe a function is not available
++# than to expect to find it in ncurses.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tparm in -lncurses" >&5
++$as_echo_n "checking for tparm in -lncurses... " >&6; }
++if test "${ac_cv_lib_ncurses_tparm+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lncurses  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++/* 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 tparm ();
++int
++main ()
++{
++return tparm ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ncurses_tparm=yes
+ else
+-  eval "$as_ac_Header=\$ac_header_preproc"
++  ac_cv_lib_ncurses_tparm=no
+ fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tparm" >&5
++$as_echo "$ac_cv_lib_ncurses_tparm" >&6; }
++if test "x$ac_cv_lib_ncurses_tparm" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_LIBNCURSES 1
+ _ACEOF
+ 
+-else
++  LIBS="-lncurses $LIBS"
+ 
+-for ac_header in kerberos/krb.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++fi
++
++
++# Do we have res_init, for detecting changes in /etc/resolv.conf?
++
++resolv=no
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <netinet/in.h>
++#include <arpa/nameser.h>
++#include <resolv.h>
++int
++main ()
++{
++return res_init();
++  ;
++  return 0;
++}
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  have_res_init=yes
++else
++  have_res_init=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++if test "$have_res_init" = no; then
++  OLIBS="$LIBS"
++  LIBS="$LIBS -lresolv"
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
++$as_echo_n "checking for res_init with -lresolv... " >&6; }
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
++#include <netinet/in.h>
++#include <arpa/nameser.h>
++#include <resolv.h>
++int
++main ()
++{
++return res_init();
++  ;
++  return 0;
++}
+ _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
++if ac_fn_c_try_link "$LINENO"; then :
++  have_res_init=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_header_compiler=no
++  have_res_init=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
++$as_echo "$have_res_init" >&6; }
++  if test "$have_res_init" = yes ; then
++    resolv=yes
++  fi
++  LIBS="$OLIBS"
+ 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; }
++if test "$have_res_init" = yes; then
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (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
++$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
+ 
+-  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; }
++# Do we need the Hesiod library to provide the support routines?
++if test "$with_hesiod" != no ; then
++  # Don't set $LIBS here -- see comments above.
++  ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
++if test "x$ac_cv_func_res_send" = x""yes; then :
+ 
+-# 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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++else
++  ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
++if test "x$ac_cv_func___res_send" = x""yes; then :
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
++$as_echo_n "checking for res_send in -lresolv... " >&6; }
++if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lresolv  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++/* 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 res_send ();
++int
++main ()
++{
++return res_send ();
++  ;
++  return 0;
++}
+ _ACEOF
+-
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_resolv_res_send=yes
++else
++  ac_cv_lib_resolv_res_send=no
+ fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
++$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
++if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
++  resolv=yes
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
++$as_echo_n "checking for __res_send in -lresolv... " >&6; }
++if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lresolv  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-done
+-
++/* 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 __res_send ();
++int
++main ()
++{
++return __res_send ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_resolv___res_send=yes
++else
++  ac_cv_lib_resolv___res_send=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
++$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
++if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
++  resolv=yes
+ fi
+ 
+-done
++fi
+ 
+ fi
+ 
+-done
++fi
+ 
++  if test "$resolv" = yes ; then
++    RESOLVLIB=-lresolv
++  else
++    RESOLVLIB=
+   fi
++  ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
++if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
+ 
+-for ac_header in com_err.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+ else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
++$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
++if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ 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 $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lhesiod $RESOLVLIB $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <$ac_header>
++
++/* 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 hes_getmailhost ();
++int
++main ()
++{
++return hes_getmailhost ();
++  ;
++  return 0;
++}
+ _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
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_hesiod_hes_getmailhost=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-  ac_header_preproc=no
++  ac_cv_lib_hesiod_hes_getmailhost=no
+ fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
++$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
++if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
+ 
+-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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  eval "$as_ac_Header=\$ac_header_preproc"
++  :
+ fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+ 
+ fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+ 
+ fi
+ 
+-done
++# Do we need libresolv (due to res_init or Hesiod)?
++if test "$resolv" = yes ; then
+ 
+-fi
++$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
+ 
+-# Solaris requires -lintl if you want strerror (which calls dgettext)
+-# to return localized messages.
++fi
+ 
+-{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
+-echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_intl_dgettext+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++# These tell us which Kerberos-related libraries to use.
++if test "${with_kerberos}" != no; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
++$as_echo_n "checking for com_err in -lcom_err... " >&6; }
++if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lintl  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lcom_err  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+@@ -22476,184 +11664,89 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char dgettext ();
++char com_err ();
+ int
+ main ()
+ {
+-return dgettext ();
++return com_err ();
+   ;
+   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_intl_dgettext=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_com_err_com_err=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_intl_dgettext=no
++  ac_cv_lib_com_err_com_err=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core 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_intl_dgettext" >&5
+-echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
+-if test $ac_cv_lib_intl_dgettext = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
++$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
++if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBINTL 1
++#define HAVE_LIBCOM_ERR 1
+ _ACEOF
+ 
+-  LIBS="-lintl $LIBS"
++  LIBS="-lcom_err $LIBS"
+ 
+ fi
+ 
+-
+-{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
+-echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
+-if test "${emacs_cv_localtime_cache+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  if test x$ac_cv_func_tzset = xyes; then
+-if test "$cross_compiling" = yes; then
+-  # If we have tzset, assume the worst when cross-compiling.
+-emacs_cv_localtime_cache=yes
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
++$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
++if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lk5crypto  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <time.h>
+-extern char **environ;
+-unset_TZ ()
+-{
+-  char **from, **to;
+-  for (to = from = environ; (*to = *from); from++)
+-    if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
+-      to++;
+-}
+-char TZ_GMT0[] = "TZ=GMT0";
+-char TZ_PST8[] = "TZ=PST8";
+-main()
+-{
+-  time_t now = time ((time_t *) 0);
+-  int hour_GMT0, hour_unset;
+-  if (putenv (TZ_GMT0) != 0)
+-    exit (1);
+-  hour_GMT0 = localtime (&now)->tm_hour;
+-  unset_TZ ();
+-  hour_unset = localtime (&now)->tm_hour;
+-  if (putenv (TZ_PST8) != 0)
+-    exit (1);
+-  if (localtime (&now)->tm_hour == hour_GMT0)
+-    exit (1);
+-  unset_TZ ();
+-  if (localtime (&now)->tm_hour != hour_unset)
+-    exit (1);
+-  exit (0);
+-}
+-_ACEOF
+-rm -f 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>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (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_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  emacs_cv_localtime_cache=no
+-else
+-  echo "$as_me: program exited with status $ac_status" >&5
+-echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-( exit $ac_status )
+-emacs_cv_localtime_cache=yes
+-fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+-fi
+-
+ 
++/* 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 mit_des_cbc_encrypt ();
++int
++main ()
++{
++return mit_des_cbc_encrypt ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
+ else
+-	# If we lack tzset, report that localtime does not cache TZ,
+-	# since we can't invalidate the cache if we don't have tzset.
+-	emacs_cv_localtime_cache=no
++  ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
+ fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
+-echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
+-if test $emacs_cv_localtime_cache = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define LOCALTIME_CACHE 1
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
++$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
++if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBK5CRYPTO 1
+ _ACEOF
+ 
+-fi
++  LIBS="-lk5crypto $LIBS"
+ 
+-if test "x$HAVE_TIMEVAL" = xyes; then
++fi
+ 
+-for ac_func in gettimeofday
+-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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
++$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
++if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcrypto  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -22661,161 +11754,90 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
++char mit_des_cbc_encrypt ();
+ int
+ main ()
+ {
+-return $ac_func ();
++return mit_des_cbc_encrypt ();
+   ;
+   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
+-  eval "$as_ac_var=yes"
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
++  ac_cv_lib_crypto_mit_des_cbc_encrypt=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+-ac_res=`eval echo '${'$as_ac_var'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-if test `eval echo '${'$as_ac_var'}'` = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
++$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
++if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_LIBCRYPTO 1
+ _ACEOF
+ 
++  LIBS="-lcrypto $LIBS"
++
+ fi
+-done
+ 
+-  if test $ac_cv_func_gettimeofday = yes; then
+-    { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
+-echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
+-if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
++$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
++if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lkrb5  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-#ifdef TIME_WITH_SYS_TIME
+-#include <sys/time.h>
+-#include <time.h>
+-#else
+-#ifdef HAVE_SYS_TIME_H
+-#include <sys/time.h>
+-#else
+-#include <time.h>
+-#endif
++/* 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 krb5_init_context ();
+ int
+ main ()
+ {
+-struct timeval time;
+-       gettimeofday (&time, 0);
++return krb5_init_context ();
+   ;
+   return 0;
+ }
+ _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
+-  emacs_cv_gettimeofday_two_arguments=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_krb5_krb5_init_context=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	emacs_cv_gettimeofday_two_arguments=no
++  ac_cv_lib_krb5_krb5_init_context=no
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
+-echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
+-    if test $emacs_cv_gettimeofday_two_arguments = no; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define GETTIMEOFDAY_ONE_ARGUMENT 1
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
++$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
++if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBKRB5 1
+ _ACEOF
+ 
+-    fi
+-  fi
++  LIBS="-lkrb5 $LIBS"
++
+ fi
+ 
+-ok_so_far=yes
+-{ 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
++  if test "${with_kerberos5}" = no; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
++$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
++if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-ldes425  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* 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 GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -22823,696 +11845,509 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-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
+-#endif
+-
++char des_cbc_encrypt ();
+ int
+ main ()
+ {
+-return socket ();
++return des_cbc_encrypt ();
+   ;
+   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_func_socket=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_des425_des_cbc_encrypt=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_func_socket=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
++  ac_cv_lib_des425_des_cbc_encrypt=no
+ fi
+-{ 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
+-  ok_so_far=no
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
++$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
++if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBDES425 1
++_ACEOF
++
++  LIBS="-ldes425 $LIBS"
+ 
+-if test $ok_so_far = yes; then
+-  if test "${ac_cv_header_netinet_in_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
+-echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_netinet_in_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
+-echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
+ else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
+-echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
++$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
++if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-ldes  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
+-#include <netinet/in.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 des_cbc_encrypt ();
++int
++main ()
++{
++return des_cbc_encrypt ();
++  ;
++  return 0;
++}
+ _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
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_des_des_cbc_encrypt=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_lib_des_des_cbc_encrypt=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
++$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
++if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBDES 1
++_ACEOF
++
++  LIBS="-ldes $LIBS"
+ 
+-	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; }
++fi
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
+-echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
++$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
++if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lkrb4  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <netinet/in.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 krb_get_cred ();
++int
++main ()
++{
++return krb_get_cred ();
++  ;
++  return 0;
++}
+ _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
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_krb4_krb_get_cred=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-  ac_header_preproc=no
++  ac_cv_lib_krb4_krb_get_cred=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
++$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
++if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBKRB4 1
++_ACEOF
+ 
+-rm -f conftest.err conftest.$ac_ext
+-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6; }
++  LIBS="-lkrb4 $LIBS"
+ 
+-# 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: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: netinet/in.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: netinet/in.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: netinet/in.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: netinet/in.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
++$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
++if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lkrb  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
+-echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_netinet_in_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++/* 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 krb_get_cred ();
++int
++main ()
++{
++return krb_get_cred ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_krb_krb_get_cred=yes
+ else
+-  ac_cv_header_netinet_in_h=$ac_header_preproc
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
+-echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
+-
++  ac_cv_lib_krb_krb_get_cred=no
+ fi
+-if test $ac_cv_header_netinet_in_h = yes; then
+-  :
+-else
+-  ok_so_far=no
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
++$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
++if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBKRB 1
++_ACEOF
+ 
++  LIBS="-lkrb $LIBS"
+ 
+ fi
+-if test $ok_so_far = yes; then
+-  if test "${ac_cv_header_arpa_inet_h+set}" = set; then
+-  { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
+-echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_arpa_inet_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
+-echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
+-echo $ECHO_N "checking arpa/inet.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 <arpa/inet.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; }
++  fi
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
+-echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++  if test "${with_kerberos5}" != no; then
++    for ac_header in krb5.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
++if test "x$ac_cv_header_krb5_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_KRB5_H 1
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <arpa/inet.h>
++ ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
++"
++if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_KRB5_ERROR_TEXT 1
+ _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
++ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
++"
++if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
+ 
+-rm -f conftest.err conftest.$ac_ext
+-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6; }
++cat >>confdefs.h <<_ACEOF
++#define HAVE_KRB5_ERROR_E_TEXT 1
++_ACEOF
+ 
+-# 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: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: arpa/inet.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: arpa/inet.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: arpa/inet.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: arpa/inet.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
+ 
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
+-echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
+-if test "${ac_cv_header_arpa_inet_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_arpa_inet_h=$ac_header_preproc
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
+-echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
+ 
+ fi
+-if test $ac_cv_header_arpa_inet_h = yes; then
+-  :
+-else
+-  ok_so_far=no
+-fi
+ 
++done
+ 
+-fi
+-if test $ok_so_far = yes; then
++  else
++    for ac_header in des.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
++if test "x$ac_cv_header_des_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_DES_H 1
++_ACEOF
++
++else
++  for ac_header in kerberosIV/des.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
++if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_KERBEROSIV_DES_H 1
++_ACEOF
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_INET_SOCKETS 1
++else
++  for ac_header in kerberos/des.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
++if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_KERBEROS_DES_H 1
+ _ACEOF
+ 
+ fi
+ 
++done
+ 
+-for ac_header in sys/ioctl.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (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
++fi
++
++done
+ 
+-	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; }
++done
+ 
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++    for ac_header in krb.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
++if test "x$ac_cv_header_krb_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_KRB_H 1
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
++
++else
++  for ac_header in kerberosIV/krb.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
++if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_KERBEROSIV_KRB_H 1
+ _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
+-