Merge from emacs-23
[bpt/emacs.git] / configure
index 34d6806..e63b74b 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for emacs 23.1.50.
+# Generated by GNU Autoconf 2.62 for emacs 24.0.50.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -594,8 +594,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='emacs'
 PACKAGE_TARNAME='emacs'
 # Identity of this package.
 PACKAGE_NAME='emacs'
 PACKAGE_TARNAME='emacs'
-PACKAGE_VERSION='23.1.50'
-PACKAGE_STRING='emacs 23.1.50'
+PACKAGE_VERSION='24.0.50'
+PACKAGE_STRING='emacs 24.0.50'
 PACKAGE_BUGREPORT=''
 
 ac_unique_file="src/lisp.h"
 PACKAGE_BUGREPORT=''
 
 ac_unique_file="src/lisp.h"
@@ -716,6 +716,8 @@ GTK_CFLAGS
 GTK_LIBS
 DBUS_CFLAGS
 DBUS_LIBS
 GTK_LIBS
 DBUS_CFLAGS
 DBUS_LIBS
+GCONF_CFLAGS
+GCONF_LIBS
 FONTCONFIG_CFLAGS
 FONTCONFIG_LIBS
 XFT_CFLAGS
 FONTCONFIG_CFLAGS
 FONTCONFIG_LIBS
 XFT_CFLAGS
@@ -726,14 +728,28 @@ M17N_FLT_CFLAGS
 M17N_FLT_LIBS
 FREETYPE_CFLAGS
 FREETYPE_LIBS
 M17N_FLT_LIBS
 FREETYPE_CFLAGS
 FREETYPE_LIBS
+LIBXPM
+LIBJPEG
+LIBPNG
+LIBTIFF
+LIBGIF
+LIBGPM
 ALLOCA
 liblockfile
 ALLOCA
 liblockfile
+LIBS_MAIL
 LIBOBJS
 NEED_SETGID
 KMEM_GROUP
 GETLOADAVG_LIBS
 GETOPT_H
 GETOPTOBJS
 LIBOBJS
 NEED_SETGID
 KMEM_GROUP
 GETLOADAVG_LIBS
 GETOPT_H
 GETOPTOBJS
+LIBHESIOD
+LIBRESOLV
+COM_ERRLIB
+CRYPTOLIB
+KRB5LIB
+DESLIB
+KRB4LIB
 version
 configuration
 canonical
 version
 configuration
 canonical
@@ -764,6 +780,7 @@ GNUSTEP_SYSTEM_HEADERS
 GNUSTEP_SYSTEM_LIBRARIES
 GNU_OBJC_CFLAGS
 LIB_SRC_EXTRA_INSTALLABLES
 GNUSTEP_SYSTEM_LIBRARIES
 GNU_OBJC_CFLAGS
 LIB_SRC_EXTRA_INSTALLABLES
+OTHER_FILES
 LTLIBOBJS'
 ac_subst_files=''
 ac_user_opts='
 LTLIBOBJS'
 ac_subst_files=''
 ac_user_opts='
@@ -772,6 +789,9 @@ with_pop
 with_kerberos
 with_kerberos5
 with_hesiod
 with_kerberos
 with_kerberos5
 with_hesiod
+with_mmdf
+with_mail_unlink
+with_mailhost
 with_sound
 with_sync_input
 with_x_toolkit
 with_sound
 with_sync_input
 with_x_toolkit
@@ -790,6 +810,7 @@ with_xim
 with_ns
 with_gpm
 with_dbus
 with_ns
 with_gpm
 with_dbus
+with_gconf
 with_makeinfo
 with_gtk
 with_gcc
 with_makeinfo
 with_gtk
 with_gcc
@@ -801,6 +822,7 @@ enable_maintainer_mode
 enable_locallisppath
 enable_checking
 enable_profiling
 enable_locallisppath
 enable_checking
 enable_profiling
+enable_autodepend
 enable_largefile
 with_x
 '
 enable_largefile
 with_x
 '
@@ -1366,7 +1388,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures emacs 23.1.50 to adapt to many kinds of systems.
+\`configure' configures emacs 24.0.50 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1440,7 +1462,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of emacs 23.1.50:";;
+     short | recursive ) echo "Configuration of emacs 24.0.50:";;
    esac
   cat <<\_ACEOF
 
    esac
   cat <<\_ACEOF
 
@@ -1464,6 +1486,9 @@ Optional Features:
                           stringfreelist, xmallocoverrun, conslist
   --enable-profiling      build emacs with profiling support. This might not
                           work on all platforms
                           stringfreelist, xmallocoverrun, conslist
   --enable-profiling      build emacs with profiling support. This might not
                           work on all platforms
+  --enable-autodepend     automatically generate dependencies to .h-files.
+                          Requires GNU Make and Gcc. Enabled if GNU Make and
+                          Gcc is found
   --disable-largefile     omit support for large files
 
 Optional Packages:
   --disable-largefile     omit support for large files
 
 Optional Packages:
@@ -1473,10 +1498,14 @@ Optional Packages:
   --with-kerberos         support Kerberos-authenticated POP
   --with-kerberos5        support Kerberos version 5 authenticated POP
   --with-hesiod           support Hesiod to get the POP server host
   --with-kerberos         support Kerberos-authenticated POP
   --with-kerberos5        support Kerberos version 5 authenticated POP
   --with-hesiod           support Hesiod to get the POP server host
+  --with-mmdf             support MMDF mailboxes
+  --with-mail-unlink      unlink, rather than empty, mail spool after reading
+  --with-mailhost=HOSTNAME
+                          string giving default POP mail host
   --without-sound         don't compile with sound support
   --without-sync-input    process async input synchronously
   --without-sound         don't compile with sound support
   --without-sync-input    process async input synchronously
-  --with-x-toolkit=KIT    use an X toolkit (KIT one of: yes, lucid, athena,
-                          motif, gtk, no)
+  --with-x-toolkit=KIT    use an X toolkit (KIT one of: yes or gtk, lucid or
+                          athena, motif, no)
   --without-xpm           don't compile with XPM image support
   --without-jpeg          don't compile with JPEG image support
   --without-tiff          don't compile with TIFF image support
   --without-xpm           don't compile with XPM image support
   --without-jpeg          don't compile with JPEG image support
   --without-tiff          don't compile with TIFF image support
@@ -1494,6 +1523,7 @@ Optional Packages:
   --without-gpm           don't use -lgpm for mouse support on a GNU/Linux
                           console
   --without-dbus          don't compile with D-Bus support
   --without-gpm           don't use -lgpm for mouse support on a GNU/Linux
                           console
   --without-dbus          don't compile with D-Bus support
+  --without-gconf         don't compile with GConf support
   --without-makeinfo      don't require makeinfo for building manuals
 
   --with-pkg-config-prog=PATH
   --without-makeinfo      don't require makeinfo for building manuals
 
   --with-pkg-config-prog=PATH
@@ -1579,7 +1609,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-emacs configure 23.1.50
+emacs configure 24.0.50
 generated by GNU Autoconf 2.62
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 generated by GNU Autoconf 2.62
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1593,7 +1623,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 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.50, which was
+It was created by emacs $as_me 24.0.50, which was
 generated by GNU Autoconf 2.62.  Invocation command line was
 
   $ $0 $@
 generated by GNU Autoconf 2.62.  Invocation command line was
 
   $ $0 $@
@@ -2062,6 +2092,49 @@ _ACEOF
 fi
 
 
 fi
 
 
+# Check whether --with-mmdf was given.
+if test "${with_mmdf+set}" = set; then
+  withval=$with_mmdf;
+else
+      with_mmdf=no
+fi
+
+if test "$with_mmdf" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define MAIL_USE_MMDF 1
+_ACEOF
+
+fi
+
+
+# Check whether --with-mail-unlink was given.
+if test "${with_mail_unlink+set}" = set; then
+  withval=$with_mail_unlink;
+else
+      with_mail_unlink=no
+fi
+
+if test "$with_mail_unlink" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define MAIL_UNLINK_SPOOL 1
+_ACEOF
+
+fi
+
+
+# Check whether --with-mailhost was given.
+if test "${with_mailhost+set}" = set; then
+  withval=$with_mailhost;
+cat >>confdefs.h <<_ACEOF
+#define MAILHOST "$withval"
+_ACEOF
+
+fi
+
+
+
 # Check whether --with-sound was given.
 if test "${with_sound+set}" = set; then
   withval=$with_sound;
 # Check whether --with-sound was given.
 if test "${with_sound+set}" = set; then
   withval=$with_sound;
@@ -2235,6 +2308,14 @@ else
 fi
 
 
 fi
 
 
+# Check whether --with-gconf was given.
+if test "${with_gconf+set}" = set; then
+  withval=$with_gconf;
+else
+     with_gconf=yes
+fi
+
+
 ## For the times when you want to build Emacs but don't have
 ## a suitable makeinfo, and can live without the manuals.
 
 ## For the times when you want to build Emacs but don't have
 ## a suitable makeinfo, and can live without the manuals.
 
@@ -2423,6 +2504,14 @@ else
    PROFILING_LDFLAGS=
 fi
 
    PROFILING_LDFLAGS=
 fi
 
+# Check whether --enable-autodepend was given.
+if test "${enable_autodepend+set}" = set; then
+  enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
+else
+  ac_enable_autodepend=yes
+fi
+
+
 #### Make srcdir absolute, if it isn't already.  It's important to
 #### avoid running the path through pwd unnecessarily, since pwd can
 #### give you automounter prefixes, which can go away.  We do all this
 #### Make srcdir absolute, if it isn't already.  It's important to
 #### avoid running the path through pwd unnecessarily, since pwd can
 #### give you automounter prefixes, which can go away.  We do all this
@@ -2706,6 +2795,7 @@ _ACEOF
     case "${canonical}" in
       i[3456]86-* )  machine=intel386 ;;
       powerpc-* )    machine=macppc ;;
     case "${canonical}" in
       i[3456]86-* )  machine=intel386 ;;
       powerpc-* )    machine=macppc ;;
+      x86_64-* )     machine=amdx86-64 ;;
       * )            unported=yes ;;
     esac
     opsys=darwin
       * )            unported=yes ;;
     esac
     opsys=darwin
@@ -2828,15 +2918,6 @@ _ACEOF
     esac
   ;;
 
     esac
   ;;
 
-  ## Vaxen.
-  vax-dec-* )
-    machine=vax
-    case "${canonical}" in
-      *-vms* )                                                 opsys=vms ;;
-      * )                                              unported=yes
-    esac
-  ;;
-
   ## IA-64
   ia64*-*-linux* )
     machine=ia64 opsys=gnu-linux
   ## IA-64
   ia64*-*-linux* )
     machine=ia64 opsys=gnu-linux
@@ -4879,6 +4960,62 @@ CFLAGS="$SAVE_CFLAGS"
 unset has_option
 unset SAVE_CFLAGS
 
 unset has_option
 unset SAVE_CFLAGS
 
+### Use -Wdeclaration-after-statement if the compiler supports it
+{ $as_echo "$as_me:$LINENO: checking whether gcc understands -Wdeclaration-after-statement" >&5
+$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; }
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+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 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$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
+  $as_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
+  has_option=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       has_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+if test $has_option = yes; then
+   C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
+fi
+{ $as_echo "$as_me:$LINENO: result: $has_option" >&5
+$as_echo "$has_option" >&6; }
+CFLAGS="$SAVE_CFLAGS"
+unset has_option
+unset SAVE_CFLAGS
+
 #### Some other nice autoconf tests.
 
 { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
 #### Some other nice autoconf tests.
 
 { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
@@ -5531,11 +5668,11 @@ fi
 ## pre-built, and not deleted by the normal clean rules.  makeinfo is
 ## therefore in the category of "special tools" not normally required, which
 ## configure does not have to check for (eg autoconf itself).
 ## pre-built, and not deleted by the normal clean rules.  makeinfo is
 ## therefore in the category of "special tools" not normally required, which
 ## configure does not have to check for (eg autoconf itself).
-## In a CVS checkout on the other hand, the manuals are not included.
-## So makeinfo is a requirement to build from CVS, and configure
+## In a Bazaar checkout on the other hand, the manuals are not included.
+## So makeinfo is a requirement to build from Bazaar, and configure
 ## should test for it as it does for any other build requirement.
 ## We use the presence of $srcdir/info/emacs to distinguish a release,
 ## should test for it as it does for any other build requirement.
 ## We use the presence of $srcdir/info/emacs to distinguish a release,
-## with pre-built manuals, from a CVS checkout.
+## with pre-built manuals, from a Bazaar checkout.
 if test "$MAKEINFO" = "no"; then
   if test "x${with_makeinfo}" = "xno"; then
     MAKEINFO=off
 if test "$MAKEINFO" = "no"; then
   if test "x${with_makeinfo}" = "xno"; then
     MAKEINFO=off
@@ -5659,10 +5796,7 @@ configure___ c_switch_machine=C_SWITCH_MACHINE
 #define LIB_X11_LIB -lX11
 #endif
 
 #define LIB_X11_LIB -lX11
 #endif
 
-#ifndef LIBX11_SYSTEM
-#define LIBX11_SYSTEM
-#endif
-configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
+configure___ LIBX=LIB_X11_LIB
 
 #ifdef UNEXEC
 configure___ unexec=UNEXEC
 
 #ifdef UNEXEC
 configure___ unexec=UNEXEC
@@ -6594,9 +6728,9 @@ 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 \
 
 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 \
+  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/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
-  sys/utsname.h pwd.h
+  sys/utsname.h pwd.h utmp.h
 do
 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 do
 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -9131,6 +9265,80 @@ $as_echo "no" >&6; }
 fi
 
 
 fi
 
 
+if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
+   { $as_echo "$as_me:$LINENO: checking whether we are using GNU Make" >&5
+$as_echo_n "checking whether we are using GNU Make... " >&6; }
+   HAVE_GNU_MAKE=no
+   testval=`make --version 2>/dev/null | grep 'GNU Make'`
+   if test "x$testval" != x; then
+      HAVE_GNU_MAKE=yes
+   else
+      ac_enable_autodepend=no
+   fi
+   { $as_echo "$as_me:$LINENO: result: $HAVE_GNU_MAKE" >&5
+$as_echo "$HAVE_GNU_MAKE" >&6; }
+   if test $HAVE_GNU_MAKE = yes; then
+      { $as_echo "$as_me:$LINENO: checking whether gcc understands -MMD -MF" >&5
+$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
+      SAVE_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -MMD -MF deps.d"
+      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 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$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
+  $as_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
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_enable_autodepend=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CFLAGS="$SAVE_CFLAGS"
+      test -f deps.d || ac_enable_autodepend=no
+      rm -rf deps.d
+      { $as_echo "$as_me:$LINENO: result: $ac_enable_autodepend" >&5
+$as_echo "$ac_enable_autodepend" >&6; }
+   fi
+   if test $ac_enable_autodepend = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define AUTO_DEPEND 1
+_ACEOF
+
+   fi
+fi
+
 { $as_echo "$as_me:$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 "$as_me:$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
@@ -11180,7 +11388,7 @@ fi
 
 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
 HAVE_RSVG=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 "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
   if test "${with_rsvg}" != "no"; then
     RSVG_REQUIRED=2.11.0
     RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
   if test "${with_rsvg}" != "no"; then
     RSVG_REQUIRED=2.11.0
     RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
@@ -12331,11 +12539,217 @@ $as_echo "no" >&6; }
   fi
 
    if test "$HAVE_DBUS" = yes; then
   fi
 
    if test "$HAVE_DBUS" = yes; then
+     LIBS="$LIBS $DBUS_LIBS"
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_DBUS 1
 _ACEOF
 
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_DBUS 1
 _ACEOF
 
+
+for ac_func in dbus_watch_get_unix_fd
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; 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.  */
+/* 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$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
+  $as_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 && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+   fi
+fi
+
+HAVE_GCONF=no
+if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "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:$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:$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:$LINENO: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+  if test "$PKG_CONFIG" = "no" ; then
+     HAVE_GCONF=no
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        { $as_echo "$as_me:$LINENO: checking for gconf-2.0 >= 2.13" >&5
+$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
+
+        if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
+            { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+            succeeded=yes
+
+            { $as_echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5
+$as_echo_n "checking GCONF_CFLAGS... " >&6; }
+            GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
+            { $as_echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5
+$as_echo "$GCONF_CFLAGS" >&6; }
+
+            { $as_echo "$as_me:$LINENO: checking GCONF_LIBS" >&5
+$as_echo_n "checking GCONF_LIBS... " >&6; }
+            GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
+            { $as_echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5
+$as_echo "$GCONF_LIBS" >&6; }
+        else
+            { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+            GCONF_CFLAGS=""
+            GCONF_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
+
+        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_GCONF=yes
+  else
+     HAVE_GCONF=no
+  fi
+
+   if test "$HAVE_GCONF" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GCONF 1
+_ACEOF
+
    fi
 fi
 
    fi
 fi
 
@@ -13298,24 +13712,97 @@ $as_echo "no" >&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
+     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
+
+      ## Because xftfont.c uses XRenderQueryExtension, we also
+      ## need to link to -lXrender.
+      HAVE_XRENDER=no
+      { $as_echo "$as_me:$LINENO: checking for XRenderQueryExtension in -lXrender" >&5
+$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
+if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXrender  $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 XRenderQueryExtension ();
+int
+main ()
+{
+return XRenderQueryExtension ();
+  ;
+  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$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
+  $as_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 && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_Xrender_XRenderQueryExtension=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_Xrender_XRenderQueryExtension=no
+fi
 
 
-  if test $succeeded = yes; then
-     :
-  else
-     HAVE_XFT=no
-  fi
+rm -rf conftest.dSYM
+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
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
+$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
+if test $ac_cv_lib_Xrender_XRenderQueryExtension = yes; then
+  HAVE_XRENDER=yes
+fi
 
 
-      if test "$HAVE_XFT" != no; then
+      if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
        OLD_CPPFLAGS="$CPPFLAGS"
        OLD_CFLAGS="$CFLAGS"
        OLD_LIBS="$LIBS"
        CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
        CFLAGS="$CFLAGS $XFT_CFLAGS"
        OLD_CPPFLAGS="$CPPFLAGS"
        OLD_CFLAGS="$CFLAGS"
        OLD_LIBS="$LIBS"
        CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
        CFLAGS="$CFLAGS $XFT_CFLAGS"
+       XFT_LIBS="-lXrender $XFT_LIBS"
        LIBS="$XFT_LIBS $LIBS"
        if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
   { $as_echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
        LIBS="$XFT_LIBS $LIBS"
        if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
   { $as_echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
@@ -13863,6 +14350,7 @@ fi
 
 ### Use -lXpm if available, unless `--with-xpm=no'.
 HAVE_XPM=no
 
 ### Use -lXpm if available, unless `--with-xpm=no'.
 HAVE_XPM=no
+LIBXPM=
 if test "${HAVE_X11}" = "yes"; then
   if test "${with_xpm}" != "no"; then
     if test "${ac_cv_header_X11_xpm_h+set}" = set; then
 if test "${HAVE_X11}" = "yes"; then
   if test "${with_xpm}" != "no"; then
     if test "${ac_cv_header_X11_xpm_h+set}" = set; then
@@ -14105,11 +14593,14 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_XPM 1
 _ACEOF
 
 #define HAVE_XPM 1
 _ACEOF
 
+    LIBXPM=-lXpm
   fi
 fi
 
   fi
 fi
 
+
 ### Use -ljpeg if available, unless `--with-jpeg=no'.
 HAVE_JPEG=no
 ### Use -ljpeg if available, unless `--with-jpeg=no'.
 HAVE_JPEG=no
+LIBJPEG=
 if test "${HAVE_X11}" = "yes"; then
   if test "${with_jpeg}" != "no"; then
             if test "${ac_cv_header_jerror_h+set}" = set; then
 if test "${HAVE_X11}" = "yes"; then
   if test "${with_jpeg}" != "no"; then
             if test "${ac_cv_header_jerror_h+set}" = set; then
 rm -f conftest*
 
   fi
 rm -f conftest*
 
   fi
+  if test "${HAVE_JPEG}" = "yes"; then
+    LIBJPEG=-ljpeg
+  fi
 fi
 
 fi
 
+
 ### Use -lpng if available, unless `--with-png=no'.
 HAVE_PNG=no
 ### Use -lpng if available, unless `--with-png=no'.
 HAVE_PNG=no
+LIBPNG=
 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
 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
@@ -14577,11 +15073,14 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_PNG 1
 _ACEOF
 
 #define HAVE_PNG 1
 _ACEOF
 
+    LIBPNG="-lpng -lz -lm"
   fi
 fi
 
   fi
 fi
 
+
 ### Use -ltiff if available, unless `--with-tiff=no'.
 HAVE_TIFF=no
 ### Use -ltiff if available, unless `--with-tiff=no'.
 HAVE_TIFF=no
+LIBTIFF=
 if test "${HAVE_X11}" = "yes"; then
   if test "${with_tiff}" != "no"; then
     if test "${ac_cv_header_tiffio_h+set}" = set; then
 if test "${HAVE_X11}" = "yes"; then
   if test "${with_tiff}" != "no"; then
     if test "${ac_cv_header_tiffio_h+set}" = set; then
@@ -14795,11 +15294,14 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_TIFF 1
 _ACEOF
 
 #define HAVE_TIFF 1
 _ACEOF
 
+        LIBTIFF=-ltiff
   fi
 fi
 
   fi
 fi
 
+
 ### Use -lgif or -lungif if available, unless `--with-gif=no'.
 HAVE_GIF=no
 ### Use -lgif or -lungif if available, unless `--with-gif=no'.
 HAVE_GIF=no
+LIBGIF=
 if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
   if test "${ac_cv_header_gif_lib_h+set}" = set; then
   { $as_echo "$as_me:$LINENO: checking for gif_lib.h" >&5
 if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
   if test "${ac_cv_header_gif_lib_h+set}" = set; then
   { $as_echo "$as_me:$LINENO: checking for gif_lib.h" >&5
@@ -14999,7 +15501,7 @@ $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
 if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
   HAVE_GIF=yes
 else
 if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
   HAVE_GIF=yes
 else
-  try_libungif=yes
+  HAVE_GIF=maybe
 fi
 
 fi
 fi
 
 fi
 
 
   if test "$HAVE_GIF" = yes; then
 
 
   if test "$HAVE_GIF" = yes; then
-      ac_gif_lib_name="-lgif"
-  fi
-
+    LIBGIF=-lgif
+  elif test "$HAVE_GIF" = maybe; then
 # If gif_lib.h but no libgif, try libungif.
 # If gif_lib.h but no libgif, try libungif.
-  if test x"$try_libungif" = xyes; then
     { $as_echo "$as_me:$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 "$as_me:$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 "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
 if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
   HAVE_GIF=yes
 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
 if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
   HAVE_GIF=yes
+else
+  HAVE_GIF=no
 fi
 
 fi
 
-
-    if test "$HAVE_GIF" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define LIBGIF -lungif
-_ACEOF
-
-      ac_gif_lib_name="-lungif"
-    fi
+    test "$HAVE_GIF" = yes && LIBGIF=-lungif
   fi
 
   if test "${HAVE_GIF}" = "yes"; then
   fi
 
   if test "${HAVE_GIF}" = "yes"; then
@@ -15101,6 +15595,7 @@ _ACEOF
   fi
 fi
 
   fi
 fi
 
+
 if test "${HAVE_X11}" = "yes"; then
   MISSING=""
   WITH_NO=""
 if test "${HAVE_X11}" = "yes"; then
   MISSING=""
   WITH_NO=""
@@ -15134,6 +15629,7 @@ fi
 
 ### Use -lgpm if available, unless `--with-gpm=no'.
 HAVE_GPM=no
 
 ### Use -lgpm if available, unless `--with-gpm=no'.
 HAVE_GPM=no
+LIBGPM=
 if test "${with_gpm}" != "no"; then
   if test "${ac_cv_header_gpm_h+set}" = set; then
   { $as_echo "$as_me:$LINENO: checking for gpm.h" >&5
 if test "${with_gpm}" != "no"; then
   if test "${ac_cv_header_gpm_h+set}" = set; then
   { $as_echo "$as_me:$LINENO: checking for gpm.h" >&5
 fi
 
 
 fi
 
 
-fi
 
 
-if test "${HAVE_GPM}" = "yes"; then
+  if test "${HAVE_GPM}" = "yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_GPM 1
 _ACEOF
 
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_GPM 1
 _ACEOF
 
+    LIBGPM=-lgpm
+  fi
 fi
 
 fi
 
+
 if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
   { $as_echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
 $as_echo_n "checking for malloc/malloc.h... " >&6; }
 if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
   { $as_echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
 $as_echo_n "checking for malloc/malloc.h... " >&6; }
@@ -15514,6 +16012,7 @@ _ACEOF
   fi
   # We also have mouse menus.
   HAVE_MENUS=yes
   fi
   # We also have mouse menus.
   HAVE_MENUS=yes
+  OTHER_FILES=ns-app
 fi
 
 
 fi
 
 
@@ -16261,7 +16760,6 @@ fi
 
 # Check for mail-locking functions in a "mail" library.  Probably this should
 # have the same check as for liblockfile below.
 
 # Check for mail-locking functions in a "mail" library.  Probably this should
 # have the same check as for liblockfile below.
-
 { $as_echo "$as_me:$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 "$as_me:$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 "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
 $as_echo "$ac_cv_lib_mail_maillock" >&6; }
 if test $ac_cv_lib_mail_maillock = yes; then
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
 $as_echo "$ac_cv_lib_mail_maillock" >&6; }
 if test $ac_cv_lib_mail_maillock = yes; then
-  cat >>confdefs.h <<_ACEOF
+  have_mail=yes
+else
+  have_mail=no
+fi
+
+if test $have_mail = yes; then
+  LIBS_MAIL=-lmail
+  LIBS="$LIBS_MAIL $LIBS"
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIBMAIL 1
 _ACEOF
 
 #define HAVE_LIBMAIL 1
 _ACEOF
 
-  LIBS="-lmail $LIBS"
-
+else
+  LIBS_MAIL=
 fi
 fi
-
-
 { $as_echo "$as_me:$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 "$as_me:$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 "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
 if test $ac_cv_lib_lockfile_maillock = yes; then
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
 if test $ac_cv_lib_lockfile_maillock = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBLOCKFILE 1
-_ACEOF
+  have_lockfile=yes
+else
+  have_lockfile=no
+fi
 
 
-  LIBS="-llockfile $LIBS"
+if test $have_lockfile = yes; then
+   LIBS_MAIL=-llockfile
+   LIBS="$LIBS_MAIL $LIBS"
 
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBLOCKFILE 1
+_ACEOF
 
 
+else
 # 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 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:$LINENO: checking for $ac_word" >&5
       # 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:$LINENO: checking for $ac_word" >&5
@@ -16462,7 +16972,6 @@ $as_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; }; }
 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
 
   fi
 fi
 
@@ -16780,6 +17289,7 @@ done
 
 
 
 
 
 
+
 
 
 for ac_func in gethostname getdomainname dup2 \
 
 
 for ac_func in gethostname getdomainname dup2 \
@@ -20545,14 +21055,14 @@ done
 # 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.
 # 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:$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
+# Also we need tputs and frieds to be able to build at all.
+have_tputs_et_al=true
+{ $as_echo "$as_me:$LINENO: checking for library containing tputs" >&5
+$as_echo_n "checking for library containing tputs... " >&6; }
+if test "${ac_cv_search_tputs+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lncurses  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -20566,16 +21076,23 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #ifdef __cplusplus
 extern "C"
 #endif
-char tparm ();
+char tputs ();
 int
 main ()
 {
 int
 main ()
 {
-return tparm ();
+return tputs ();
   ;
   return 0;
 }
 _ACEOF
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+for ac_lib in '' ncurses terminfo termcap; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -20596,29 +21113,52 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_ncurses_tparm=yes
+  ac_cv_search_tputs=$ac_res
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_ncurses_tparm=no
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+      conftest$ac_exeext
+  if test "${ac_cv_search_tputs+set}" = set; then
+  break
 fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
-$as_echo "$ac_cv_lib_ncurses_tparm" >&6; }
-if test $ac_cv_lib_ncurses_tparm = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNCURSES 1
-_ACEOF
+done
+if test "${ac_cv_search_tputs+set}" = set; then
+  :
+else
+  ac_cv_search_tputs=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_tputs" >&5
+$as_echo "$ac_cv_search_tputs" >&6; }
+ac_res=$ac_cv_search_tputs
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
 
-  LIBS="-lncurses $LIBS"
+else
+  have_tputs_et_al=false
+fi
 
 
+if test "$have_tputs_et_al" != true; then
+  { { $as_echo "$as_me:$LINENO: error: I couldn't find termcap functions (tputs and friends).
+Maybe some development libraries/packages are missing?  Try installing
+libncurses-dev(el), libterminfo-dev(el) or similar." >&5
+$as_echo "$as_me: error: I couldn't find termcap functions (tputs and friends).
+Maybe some development libraries/packages are missing?  Try installing
+libncurses-dev(el), libterminfo-dev(el) or similar." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 fi
+# Must define this when any termcap library is found.
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBNCURSES 1
+_ACEOF
 
 
 # Do we have res_init, for detecting changes in /etc/resolv.conf?
 
 
 # Do we have res_init, for detecting changes in /etc/resolv.conf?
@@ -20744,8 +21284,9 @@ _ACEOF
 fi
 
 # Do we need the Hesiod library to provide the support routines?
 fi
 
 # Do we need the Hesiod library to provide the support routines?
+LIBHESIOD=
 if test "$with_hesiod" != no ; then
 if test "$with_hesiod" != no ; then
-  # Don't set $LIBS here -- see comments above.
+  # Don't set $LIBS here -- see comments above.  FIXME which comments?
   { $as_echo "$as_me:$LINENO: checking for res_send" >&5
 $as_echo_n "checking for res_send... " >&6; }
 if test "${ac_cv_func_res_send+set}" = set; then
   { $as_echo "$as_me:$LINENO: checking for res_send" >&5
 $as_echo_n "checking for res_send... " >&6; }
 if test "${ac_cv_func_res_send+set}" = set; then
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
 if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
 if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBHESIOD 1
-_ACEOF
-
+  hesiod=yes
 else
   :
 fi
 
 fi
 
 else
   :
 fi
 
 fi
 
+
+  if test x"$hesiod" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBHESIOD 1
+_ACEOF
+
+    LIBHESIOD=-lhesiod
+  fi
 fi
 
 fi
 
+
 # Do we need libresolv (due to res_init or Hesiod)?
 if test "$resolv" = yes ; then
 
 # Do we need libresolv (due to res_init or Hesiod)?
 if test "$resolv" = yes ; then
 
@@ -21244,12 +21791,21 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIBRESOLV 1
 _ACEOF
 
 #define HAVE_LIBRESOLV 1
 _ACEOF
 
+  LIBRESOLV=-lresolv
+else
+  LIBRESOLV=
 fi
 
 fi
 
+
 # These tell us which Kerberos-related libraries to use.
 # These tell us which Kerberos-related libraries to use.
-if test "${with_kerberos}" != no; then
+COM_ERRLIB=
+CRYPTOLIB=
+KRB5LIB=
+DESLIB=
+KRB4LIB=
 
 
-{ $as_echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
+if test "${with_kerberos}" != no; then
+  { $as_echo "$as_me:$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
 $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
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
 $as_echo "$ac_cv_lib_com_err_com_err" >&6; }
 if test $ac_cv_lib_com_err_com_err = yes; then
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
 $as_echo "$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"
-
+  have_com_err=yes
+else
+  have_com_err=no
 fi
 
 fi
 
+  if test $have_com_err = yes; then
+    COM_ERRLIB=-lcom_err
+    LIBS="$COM_ERRLIB $LIBS"
 
 
-{ $as_echo "$as_me:$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
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBCOM_ERR 1
+_ACEOF
+
+  fi
+  { $as_echo "$as_me:$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
   ac_check_lib_save_LIBS=$LIBS
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lk5crypto  $LIBS"
+LIBS="-lcrypto  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21374,12 +21935,12 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
+  ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
+       ac_cv_lib_crypto_mit_des_cbc_encrypt=no
 fi
 
 rm -rf conftest.dSYM
 fi
 
 rm -rf conftest.dSYM
@@ -21387,25 +21948,30 @@ 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
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
-if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBK5CRYPTO 1
-_ACEOF
-
-  LIBS="-lk5crypto $LIBS"
-
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
+$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
+if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
+  have_crypto=yes
+else
+  have_crypto=no
 fi
 
 fi
 
+  if test $have_crypto = yes; then
+    CRYPTOLIB=-lcrypto
+    LIBS="$CRYPTOLIB $LIBS"
 
 
-{ $as_echo "$as_me:$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
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBCRYPTO 1
+_ACEOF
+
+  fi
+  { $as_echo "$as_me:$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
   ac_check_lib_save_LIBS=$LIBS
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto  $LIBS"
+LIBS="-lk5crypto  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21449,12 +22015,12 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
+  ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   $as_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_k5crypto_mit_des_cbc_encrypt=no
 fi
 
 rm -rf conftest.dSYM
 fi
 
 rm -rf conftest.dSYM
@@ -21462,19 +22028,24 @@ 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
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
-$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
-if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBCRYPTO 1
-_ACEOF
-
-  LIBS="-lcrypto $LIBS"
-
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
+$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
+if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
+  have_k5crypto=yes
+else
+  have_k5crypto=no
 fi
 
 fi
 
+  if test $have_k5crypto = yes; then
+    CRYPTOLIB=-lk5crypto
+    LIBS="$CRYPTOLIB $LIBS"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBK5CRYPTO 1
+_ACEOF
 
 
-{ $as_echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
+  fi
+  { $as_echo "$as_me:$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
 $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
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
 if test $ac_cv_lib_krb5_krb5_init_context = yes; then
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
 $as_echo "$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"
-
+  have_krb5=yes
+else
+  have_krb5=no
 fi
 
 fi
 
-  if test "${with_kerberos5}" = no; then
+  if test $have_krb5=yes; then
+    KRB5LIB=-lkrb5
+    LIBS="$KRB5LIB $LIBS"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBKRB5 1
+_ACEOF
 
 
-{ $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
+  fi
+    if test "${with_kerberos5}" = no; then
+    { $as_echo "$as_me:$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
 $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
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
 if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
 $as_echo "$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
+  have_des425=yes
+else
+  have_des425=no
+fi
 
 
-  LIBS="-ldes425 $LIBS"
+    if test $have_des425 = yes; then
+      DESLIB=-ldes425
+      LIBS="$DESLIB $LIBS"
 
 
-else
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBDES425 1
+_ACEOF
 
 
-{ $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
+    else
+      { $as_echo "$as_me:$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
 $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
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
 if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
 $as_echo "$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"
-
+  have_des=yes
+else
+  have_des=no
 fi
 
 fi
 
-fi
+      if test $have_des = yes; then
+        DESLIB=-ldes
+        LIBS="$DESLIB $LIBS"
 
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBDES 1
+_ACEOF
 
 
-{ $as_echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
+      fi
+    fi
+    { $as_echo "$as_me:$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
 $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
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
 if test $ac_cv_lib_krb4_krb_get_cred = yes; then
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
 if test $ac_cv_lib_krb4_krb_get_cred = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBKRB4 1
-_ACEOF
+  have_krb4=yes
+else
+  have_krb4=no
+fi
 
 
-  LIBS="-lkrb4 $LIBS"
+    if test $have_krb4 = yes; then
+      KRB4LIB=-lkrb4
+      LIBS="$KRB4LIB $LIBS"
 
 
-else
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBKRB4 1
+_ACEOF
 
 
-{ $as_echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
+    else
+      { $as_echo "$as_me:$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
 $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
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
 if test $ac_cv_lib_krb_krb_get_cred = yes; then
 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
 if test $ac_cv_lib_krb_krb_get_cred = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBKRB 1
-_ACEOF
-
-  LIBS="-lkrb $LIBS"
-
+  have_krb=yes
+else
+  have_krb=no
 fi
 
 fi
 
-fi
+      if test $have_krb = yes; then
+        KRB4LIB=-lkrb
+        LIBS="$KRB4LIB $LIBS"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBKRB 1
+_ACEOF
 
 
+      fi
+    fi
   fi
 
   if test "${with_kerberos5}" != no; then
   fi
 
   if test "${with_kerberos5}" != no; then
@@ -23232,6 +23829,12 @@ done
 
 fi
 
 
 fi
 
+
+
+
+
+
+
 # Solaris requires -lintl if you want strerror (which calls dgettext)
 # to return localized messages.
 
 # Solaris requires -lintl if you want strerror (which calls dgettext)
 # to return localized messages.
 
@@ -25139,6 +25742,10 @@ if test x"${version}" = x; then
 $as_echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
    { (exit 1); exit 1; }; }
 fi
 $as_echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test x"${version}" != x"$PACKAGE_VERSION"; then
+  { $as_echo "$as_me:$LINENO: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/lisp/version.el'." >&5
+$as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/lisp/version.el'." >&2;}
+fi
 
 ### Specify what sort of things we'll be editing into Makefile and config.h.
 ### Use configuration here uncanonicalized to avoid exceeding size limits.
 
 ### Specify what sort of things we'll be editing into Makefile and config.h.
 ### Use configuration here uncanonicalized to avoid exceeding size limits.
@@ -25183,6 +25790,7 @@ fi
 
 
 
 
 
 
+
 
 
 cat >>confdefs.h <<_ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
@@ -25322,11 +25930,12 @@ echo "  Does Emacs use -lXaw3d?                                 ${HAVE_XAW3D}"
 echo "  Does Emacs use -lXpm?                                   ${HAVE_XPM}"
 echo "  Does Emacs use -ljpeg?                                  ${HAVE_JPEG}"
 echo "  Does Emacs use -ltiff?                                  ${HAVE_TIFF}"
 echo "  Does Emacs use -lXpm?                                   ${HAVE_XPM}"
 echo "  Does Emacs use -ljpeg?                                  ${HAVE_JPEG}"
 echo "  Does Emacs use -ltiff?                                  ${HAVE_TIFF}"
-echo "  Does Emacs use a gif library?                           ${HAVE_GIF} $ac_gif_lib_name"
+echo "  Does Emacs use a gif library?                           ${HAVE_GIF} $LIBGIF"
 echo "  Does Emacs use -lpng?                                   ${HAVE_PNG}"
 echo "  Does Emacs use -lrsvg-2?                                ${HAVE_RSVG}"
 echo "  Does Emacs use -lgpm?                                   ${HAVE_GPM}"
 echo "  Does Emacs use -ldbus?                                  ${HAVE_DBUS}"
 echo "  Does Emacs use -lpng?                                   ${HAVE_PNG}"
 echo "  Does Emacs use -lrsvg-2?                                ${HAVE_RSVG}"
 echo "  Does Emacs use -lgpm?                                   ${HAVE_GPM}"
 echo "  Does Emacs use -ldbus?                                  ${HAVE_DBUS}"
+echo "  Does Emacs use -lgconf?                                 ${HAVE_GCONF}"
 
 echo "  Does Emacs use -lfreetype?                              ${HAVE_FREETYPE}"
 echo "  Does Emacs use -lm17n-flt?                              ${HAVE_M17N_FLT}"
 
 echo "  Does Emacs use -lfreetype?                              ${HAVE_FREETYPE}"
 echo "  Does Emacs use -lm17n-flt?                              ${HAVE_M17N_FLT}"
 
 echo
 
 
 echo
 
-if test "$USE_X_TOOLKIT" = GTK; then
-  case "$canonical" in
-  *cygwin*)
-    echo "There are known problems with Emacs and Gtk+ on cygwin, so you
-  will probably get a crash on startup.  If this happens, please use another
-  toolkit for Emacs.  See etc/PROBLEMS for more information."
-  ;;
-  esac
-fi
-
 if test "$HAVE_NS" = "yes"; then
    echo
    echo "You must run \"make install\" in order to test the built application.
 if test "$HAVE_NS" = "yes"; then
    echo
    echo "You must run \"make install\" in order to test the built application.
@@ -25835,7 +26434,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by emacs $as_me 23.1.50, which was
+This file was extended by emacs $as_me 24.0.50, which was
 generated by GNU Autoconf 2.62.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
 generated by GNU Autoconf 2.62.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -25888,7 +26487,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-emacs config.status 23.1.50
+emacs config.status 24.0.50
 configured by $0, generated by GNU Autoconf 2.62,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
 configured by $0, generated by GNU Autoconf 2.62,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -26664,7 +27263,7 @@ echo creating lib-src/Makefile
   sed -e '1,/start of cpp stuff/d'\
       -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
       < Makefile.c > junk.c
   sed -e '1,/start of cpp stuff/d'\
       -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
       < Makefile.c > junk.c
-  $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
+  $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
       sed -e 's/^ /    /' -e '/^#/d' -e '/^[   \f]*$/d' > junk2.c
   cat junk1.c junk2.c > Makefile.new
   rm -f junk.c junk1.c junk2.c
       sed -e 's/^ /    /' -e '/^#/d' -e '/^[   \f]*$/d' > junk2.c
   cat junk1.c junk2.c > Makefile.new
   rm -f junk.c junk1.c junk2.c
@@ -26680,7 +27279,7 @@ echo creating src/Makefile
   sed -e '1,/start of cpp stuff/d'\
       -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
       < Makefile.c > junk.c
   sed -e '1,/start of cpp stuff/d'\
       -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
       < Makefile.c > junk.c
-  $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
+  $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
       sed -e 's/^ /    /' -e '/^#/d' -e '/^[   \f]*$/d' > junk2.c
   cat junk1.c junk2.c > Makefile.new
   rm -f junk.c junk1.c junk2.c
       sed -e 's/^ /    /' -e '/^#/d' -e '/^[   \f]*$/d' > junk2.c
   cat junk1.c junk2.c > Makefile.new
   rm -f junk.c junk1.c junk2.c