]> code.delx.au - gnu-emacs/commitdiff
upstream
authorJoakim Verona <joakim@verona.se>
Tue, 1 Nov 2011 12:25:00 +0000 (13:25 +0100)
committerJoakim Verona <joakim@verona.se>
Tue, 1 Nov 2011 12:25:00 +0000 (13:25 +0100)
1  2 
autogen/configure
configure.in
src/xdisp.c
src/xterm.c

diff --combined autogen/configure
index 979aafc60ffd93d45967bd3f159fb3d604f13d00,88a63c8b4f74567cb7165c3bc7f58bd222b061a7..b265133759ea1ef49a4740d65f06c6a0f8290858
@@@ -1,6 -1,6 +1,6 @@@
  #! /bin/sh
  # Guess values for system-dependent variables and create Makefiles.
- # Generated by GNU Autoconf 2.65 for emacs 24.0.90.
+ # Generated by GNU Autoconf 2.65 for emacs 24.0.91.
  #
  #
  # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@@ -549,8 -549,8 +549,8 @@@ MAKEFLAGS
  # Identity of this package.
  PACKAGE_NAME='emacs'
  PACKAGE_TARNAME='emacs'
- PACKAGE_VERSION='24.0.90'
- PACKAGE_STRING='emacs 24.0.90'
+ PACKAGE_VERSION='24.0.91'
+ PACKAGE_STRING='emacs 24.0.91'
  PACKAGE_BUGREPORT=''
  PACKAGE_URL=''
  
@@@ -607,55 -607,6 +607,55 @@@ SUBDIR_MAKEFILES_I
  LIB_GCC
  LD_FIRSTFLAG
  LD_SWITCH_SYSTEM_TEMACS
 +POST_ALLOC_OBJ
 +PRE_ALLOC_OBJ
 +CYGWIN_OBJ
 +RALLOC_OBJ
 +OLDXMENU_DEPS
 +LIBX_OTHER
 +LIBXMENU
 +OLDXMENU
 +OLDXMENU_TARGET
 +LIBXT_OTHER
 +TOOLKIT_LIBW
 +WIDGET_OBJ
 +XOBJ
 +XMENU_OBJ
 +FONT_OBJ
 +OTHER_FILES
 +GNU_OBJC_CFLAGS
 +ns_appsrc
 +ns_appresdir
 +ns_appbindir
 +ns_appdir
 +S_FILE
 +M_FILE
 +X_TOOLKIT_TYPE
 +C_SWITCH_X_SYSTEM
 +C_SWITCH_X_SITE
 +LD_SWITCH_X_SITE
 +gameuser
 +gamedir
 +bitmapdir
 +archlibdir
 +etcdir
 +x_default_search_path
 +lisppath
 +locallisppath
 +lispdir
 +srcdir
 +canonical
 +configuration
 +version
 +KRB4LIB
 +DESLIB
 +KRB5LIB
 +CRYPTOLIB
 +COM_ERRLIB
 +LIBRESOLV
 +LIBHESIOD
 +TERMCAP_OBJ
 +LIBS_TERMCAP
  LIBGNU_LTLIBDEPS
  LIBGNU_LIBDEPS
  gltests_WITNESS
@@@ -663,8 -614,12 +663,8 @@@ gl_GNULIB_ENABLED_verify_FALS
  gl_GNULIB_ENABLED_verify_TRUE
  gl_GNULIB_ENABLED_strtoull_FALSE
  gl_GNULIB_ENABLED_strtoull_TRUE
 -gl_GNULIB_ENABLED_strtoll_FALSE
 -gl_GNULIB_ENABLED_strtoll_TRUE
  gl_GNULIB_ENABLED_stat_FALSE
  gl_GNULIB_ENABLED_stat_TRUE
 -gl_GNULIB_ENABLED_sigprocmask_FALSE
 -gl_GNULIB_ENABLED_sigprocmask_TRUE
  gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
  gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
  gl_GNULIB_ENABLED_dosname_FALSE
@@@ -714,11 -669,14 +714,11 @@@ REPLACE_FPURG
  REPLACE_FPRINTF
  REPLACE_FOPEN
  REPLACE_FFLUSH
 -REPLACE_FDOPEN
  REPLACE_FCLOSE
  REPLACE_DPRINTF
  HAVE_VDPRINTF
  HAVE_VASPRINTF
  HAVE_RENAMEAT
 -HAVE_POPEN
 -HAVE_PCLOSE
  HAVE_FTELLO
  HAVE_FSEEKO
  HAVE_DPRINTF
@@@ -756,6 -714,7 +756,6 @@@ GNULIB_PRINTF_POSI
  GNULIB_PRINTF
  GNULIB_POPEN
  GNULIB_PERROR
 -GNULIB_PCLOSE
  GNULIB_OBSTACK_PRINTF_POSIX
  GNULIB_OBSTACK_PRINTF
  GNULIB_GETS
@@@ -780,6 -739,7 +780,6 @@@ GNULIB_FOPE
  GNULIB_FGETS
  GNULIB_FGETC
  GNULIB_FFLUSH
 -GNULIB_FDOPEN
  GNULIB_FCLOSE
  GNULIB_DPRINTF
  NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
@@@ -798,6 -758,25 +798,6 @@@ GL_GENERATE_STDARG_H_TRU
  STDARG_H
  NEXT_AS_FIRST_DIRECTIVE_STDARG_H
  NEXT_STDARG_H
 -NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
 -NEXT_SIGNAL_H
 -REPLACE_RAISE
 -REPLACE_PTHREAD_SIGMASK
 -HAVE_SIGHANDLER_T
 -HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
 -HAVE_STRUCT_SIGACTION_SA_SIGACTION
 -HAVE_SIGACTION
 -HAVE_SIGINFO_T
 -HAVE_SIGSET_T
 -HAVE_RAISE
 -HAVE_PTHREAD_SIGMASK
 -HAVE_POSIX_SIGNALBLOCKING
 -GNULIB_SIGACTION
 -GNULIB_SIGPROCMASK
 -GNULIB_SIGNAL_H_SIGPIPE
 -GNULIB_RAISE
 -GNULIB_PTHREAD_SIGMASK
 -LIB_PTHREAD_SIGMASK
  REPLACE_TIMEGM
  REPLACE_NANOSLEEP
  REPLACE_MKTIME
@@@ -842,6 -821,7 +842,6 @@@ GNULIB_LSTA
  GNULIB_LCHMOD
  GNULIB_FUTIMENS
  GNULIB_FSTATAT
 -GNULIB_FSTAT
  GNULIB_FCHMODAT
  NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
  NEXT_INTTYPES_H
@@@ -995,6 -975,7 +995,6 @@@ HAVE_DECL_GETUSERSHEL
  HAVE_DECL_GETPAGESIZE
  HAVE_DECL_GETLOGIN_R
  HAVE_DECL_GETDOMAINNAME
 -HAVE_DECL_FDATASYNC
  HAVE_DECL_FCHDIR
  HAVE_DECL_ENVIRON
  HAVE_USLEEP
@@@ -1019,6 -1000,7 +1019,6 @@@ HAVE_GETGROUP
  HAVE_GETDTABLESIZE
  HAVE_FTRUNCATE
  HAVE_FSYNC
 -HAVE_FDATASYNC
  HAVE_FCHOWNAT
  HAVE_FCHDIR
  HAVE_FACCESSAT
@@@ -1061,6 -1043,7 +1061,6 @@@ GNULIB_GETDOMAINNAM
  GNULIB_GETCWD
  GNULIB_FTRUNCATE
  GNULIB_FSYNC
 -GNULIB_FDATASYNC
  GNULIB_FCHOWNAT
  GNULIB_FCHDIR
  GNULIB_FACCESSAT
@@@ -1068,14 -1051,65 +1068,14 @@@ GNULIB_EUIDACCES
  GNULIB_ENVIRON
  GNULIB_DUP3
  GNULIB_DUP2
 -GNULIB_DUP
  GNULIB_CLOSE
  GNULIB_CHOWN
 -GNULIB_CHDIR
  GL_GENERATE_ALLOCA_H_FALSE
  GL_GENERATE_ALLOCA_H_TRUE
  ALLOCA_H
  ALLOCA
  GL_COND_LIBTOOL_FALSE
  GL_COND_LIBTOOL_TRUE
 -POST_ALLOC_OBJ
 -PRE_ALLOC_OBJ
 -CYGWIN_OBJ
 -RALLOC_OBJ
 -OLDXMENU_DEPS
 -LIBX_OTHER
 -LIBXMENU
 -OLDXMENU
 -OLDXMENU_TARGET
 -LIBXT_OTHER
 -TOOLKIT_LIBW
 -WIDGET_OBJ
 -XOBJ
 -XMENU_OBJ
 -FONT_OBJ
 -OTHER_FILES
 -GNU_OBJC_CFLAGS
 -ns_appsrc
 -ns_appresdir
 -ns_appbindir
 -ns_appdir
 -S_FILE
 -M_FILE
 -X_TOOLKIT_TYPE
 -C_SWITCH_X_SYSTEM
 -C_SWITCH_X_SITE
 -LD_SWITCH_X_SITE
 -gameuser
 -gamedir
 -bitmapdir
 -archlibdir
 -etcdir
 -x_default_search_path
 -lisppath
 -locallisppath
 -lispdir
 -srcdir
 -canonical
 -configuration
 -version
 -KRB4LIB
 -DESLIB
 -KRB5LIB
 -CRYPTOLIB
 -COM_ERRLIB
 -LIBRESOLV
 -LIBHESIOD
 -TERMCAP_OBJ
 -LIBS_TERMCAP
  BLESSMAIL_TARGET
  LIBS_MAIL
  liblockfile
@@@ -1103,8 -1137,12 +1103,8 @@@ LIBXTR
  LIBGNUTLS_LIBS
  LIBGNUTLS_CFLAGS
  LIBSELINUX_LIBS
 -SETTINGS_LIBS
 -SETTINGS_CFLAGS
  GCONF_LIBS
  GCONF_CFLAGS
 -GSETTINGS_LIBS
 -GSETTINGS_CFLAGS
  DBUS_OBJ
  DBUS_LIBS
  DBUS_CFLAGS
@@@ -1133,9 -1171,9 +1133,9 @@@ ALSA_LIB
  ALSA_CFLAGS
  PKG_CONFIG
  LIBSOUND
 -CRT_DIR
  START_FILES
  LIB_MATH
 +CRT_DIR
  LIBS_SYSTEM
  C_SWITCH_SYSTEM
  UNEXEC_OBJ
@@@ -1274,6 -1312,7 +1274,6 @@@ with_n
  with_gpm
  with_dbus
  with_gconf
 -with_gsettings
  with_selinux
  with_gnutls
  with_makeinfo
@@@ -1845,7 -1884,7 +1845,7 @@@ if test "$ac_init_help" = "long"; the
    # 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 24.0.90 to adapt to many kinds of systems.
+ \`configure' configures emacs 24.0.91 to adapt to many kinds of systems.
  
  Usage: $0 [OPTION]... [VAR=VALUE]...
  
  
  if test -n "$ac_init_help"; then
    case $ac_init_help in
-      short | recursive ) echo "Configuration of emacs 24.0.90:";;
+      short | recursive ) echo "Configuration of emacs 24.0.91:";;
     esac
    cat <<\_ACEOF
  
@@@ -1930,8 -1969,8 +1930,8 @@@ Optional Features
    --disable-ns-self-contained
                            disable self contained build under NeXTstep
    --enable-asserts        compile code with asserts enabled
 -  --disable-maintainer-mode
 -                          disable make rules and dependencies not useful (and
 +  --enable-maintainer-mode
 +                          enable make rules and dependencies not useful (and
                            sometimes confusing) to the casual installer
    --enable-locallisppath=PATH
                            directories Emacs should search for lisp files
@@@ -1990,6 -2029,7 +1990,6 @@@ Optional Packages
                            console
    --without-dbus          don't compile with D-Bus support
    --without-gconf         don't compile with GConf support
 -  --without-gsettings     don't compile with GSettings support
    --without-selinux       don't compile with SELinux support
    --without-gnutls        don't use -lgnutls for SSL/TLS support
    --without-makeinfo      don't require makeinfo for building manuals
  test -n "$ac_init_help" && exit $ac_status
  if $ac_init_version; then
    cat <<\_ACEOF
- emacs configure 24.0.90
+ emacs configure 24.0.91
  generated by GNU Autoconf 2.65
  
  Copyright (C) 2009 Free Software Foundation, Inc.
@@@ -2444,63 -2484,6 +2444,63 @@@ $as_echo "$ac_res" >&6; 
  
  } # ac_fn_c_check_header_preproc
  
 +# 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
@@@ -2568,8 -2551,6 +2568,8 @@@ $as_echo "$ac_res" >&6; 
  
  } # ac_fn_c_check_func
  
 +<<<<<<< TREE
 +=======
  # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
  # ----------------------------------------------------
  # Tries to find if the field MEMBER exists in type AGGR, after including
@@@ -2681,7 -2662,6 +2681,7 @@@ $as_echo "$ac_res" >&6; 
  
  } # ac_fn_c_check_type
  
 +>>>>>>> MERGE-SOURCE
  # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
  # --------------------------------------------
  # Tries to find the compile-time value of EXPR in a program that includes
@@@ -2859,65 -2839,11 +2859,65 @@@ rm -f conftest.va
    as_fn_set_status $ac_retval
  
  } # ac_fn_c_compute_int
 +
 +# 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 24.0.90, which was
+ It was created by emacs $as_me 24.0.91, which was
  generated by GNU Autoconf 2.65.  Invocation command line was
  
    $ $0 $@
@@@ -3207,6 -3133,7 +3207,6 @@@ as_fn_append ac_header_list " stdint.h
  as_fn_append ac_header_list " inttypes.h"
  as_fn_append ac_func_list " lstat"
  as_fn_append ac_func_list " alarm"
 -as_fn_append ac_func_list " pthread_sigmask"
  as_fn_append ac_func_list " readlink"
  as_fn_append ac_header_list " sys/socket.h"
  as_fn_append ac_func_list " tzset"
  
  # Define the identity of the package.
   PACKAGE='emacs'
-  VERSION='24.0.90'
+  VERSION='24.0.91'
  
  
  cat >>confdefs.h <<_ACEOF
@@@ -4108,6 -4035,14 +4108,6 @@@ els
  fi
  
  
 -# Check whether --with-gsettings was given.
 -if test "${with_gsettings+set}" = set; then :
 -  withval=$with_gsettings;
 -else
 -     with_gsettings=yes
 -fi
 -
 -
  # Check whether --with-selinux was given.
  if test "${with_selinux+set}" = set; then :
    withval=$with_selinux;
@@@ -4571,7 -4506,7 +4571,7 @@@ case "${canonical}" i
    ## Silicon Graphics machines
    ## Iris 4D
    mips-sgi-irix6.5 )
 -    opsys=irix6-5
 +    machine=iris4d opsys=irix6-5
      # Without defining _LANGUAGE_C, things get masked out in the headers
      # so that, for instance, grepping for `free' in stdlib.h fails and
      # AC_HEADER_STD_C fails.   (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
    # Code from module lstat:
    # Code from module mktime:
    # Code from module multiarch:
 +<<<<<<< TREE
 +=======
    # Code from module nocrash:
    # Code from module pthread_sigmask:
 +>>>>>>> MERGE-SOURCE
    # Code from module readlink:
 -  # Code from module signal-h:
 +<<<<<<< TREE
 +=======
 +  # Code from module signal:
    # Code from module sigprocmask:
    # Code from module snippet/_Noreturn:
    # Code from module snippet/arg-nonnull:
    # Code from module snippet/c++defs:
    # Code from module snippet/warn-on-use:
 +>>>>>>> MERGE-SOURCE
    # Code from module socklen:
    # Code from module ssize_t:
    # Code from module stat:
    # Code from module stdio:
    # Code from module stdlib:
    # Code from module strftime:
 -  # Code from module strtoimax:
 -  # Code from module strtoll:
    # Code from module strtoull:
    # Code from module strtoumax:
    # Code from module symlink:
  
  # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
  
 -# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
 -
  
  # Check whether --enable-largefile was given.
  if test "${enable_largefile+set}" = set; then :
  
  
  
 -LIB_MATH=-lm
 -LIB_STANDARD=
 -START_FILES=
 +## If user specified a crt-dir, use that unconditionally.
 +if test "X$CRT_DIR" = "X"; then
  
 -case $opsys in
 -  cygwin )
 -    LIB_MATH=
 -    START_FILES='pre-crt0.o'
 -    ;;
 -  darwin )
 -    ## Adding -lm confuses the dynamic linker, so omit it.
 -    LIB_MATH=
 -    START_FILES='pre-crt0.o'
 -    ;;
 -  freebsd )
 -    LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
 -    START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
 -    ;;
 -  gnu-linux | gnu-kfreebsd )
 -    LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
 -    START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
 -    ;;
 -  hpux10-20 | hpux11 )
 -    LIB_STANDARD=-lc
 -    START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
 +  case "$canonical" in
 +    x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
 +    ## On x86-64 and s390x GNU/Linux distributions, the standard library
 +    ## can be in a variety of places.  We only try /usr/lib64 and /usr/lib.
 +    ## For anything else (eg /usr/lib32), it is up the user to specify
 +    ## the location (bug#5655).
 +    ## Test for crtn.o, not just the directory, because sometimes the
 +    ## directory exists but does not have the relevant files (bug#1287).
 +    ## FIXME better to test for binary compatibility somehow.
 +    test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
      ;;
 -    netbsd | openbsd )
 -    LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
 -    START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
 -    ;;
 -esac
 -
 -
 -
  
 -crt_files=
 +    powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
 +  esac
  
 -for file in x $LIB_STANDARD $START_FILES; do
 -  case "$file" in
 -    *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;;
 +  case "$opsys" in
 +    hpux10-20) CRT_DIR=/lib ;;
    esac
 -done
  
 -if test "x$crt_files" != x; then
 +  ## Default is /usr/lib.
 +  test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
 +
 +  ## If we're using gcc, try to determine it automatically by asking
 +  ## gcc.  [If this doesn't work, CRT_DIR will remain at the
 +  ## system-dependent default from above.]
 +  if test "x${GCC}" = xyes; then
 +     crt_file=`$CC --print-file-name=crt1.o 2>/dev/null`
 +     case "$crt_file" in
 +       */*)
 +         CRT_DIR=`$as_dirname -- "$crt_file" ||
 +$as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 +       X"$crt_file" : 'X\(//\)[^/]' \| \
 +       X"$crt_file" : 'X\(//\)$' \| \
 +       X"$crt_file" : 'X\(/\)' \| . 2>/dev/null ||
 +$as_echo X"$crt_file" |
 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 +          s//\1/
 +          q
 +        }
 +        /^X\(\/\/\)[^/].*/{
 +          s//\1/
 +          q
 +        }
 +        /^X\(\/\/\)$/{
 +          s//\1/
 +          q
 +        }
 +        /^X\(\/\).*/{
 +          s//\1/
 +          q
 +        }
 +        s/.*/./; q'`
 +         ;;
 +     esac
 +  fi
 +
 +else
 +
 +  ## Some platforms don't use any of these files, so it is not
 +  ## appropriate to put this test outside the if block.
 +  test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
 +    as_fn_error "crt*.o not found in specified location." "$LINENO" 5
 +
 +fi
 +
 +
 +
 +LIB_MATH=-lm
 +LIB_STANDARD=
 +START_FILES=
 +
 +case $opsys in
 +  cygwin )
 +    LIB_MATH=
 +    START_FILES='pre-crt0.o'
 +    ;;
 +  darwin )
 +    ## Adding -lm confuses the dynamic linker, so omit it.
 +    LIB_MATH=
 +    START_FILES='pre-crt0.o'
 +    ;;
 +  freebsd )
 +    LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
 +    START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
 +    ;;
 +  gnu-linux | gnu-kfreebsd )
 +    LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
 +    START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
 +    ;;
 +  hpux10-20 | hpux11 )
 +    LIB_STANDARD=-lc
 +    START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
 +    ;;
 +    netbsd | openbsd )
 +    LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
 +    START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
 +    ;;
 +esac
 +
 +
 +
 +
 +<<<<<<< TREE
 +=======
 +crt_files=
 +
 +for file in x $LIB_STANDARD $START_FILES; do
 +  case "$file" in
 +    *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;;
 +  esac
 +done
 +
 +if test "x$crt_files" != x; then
  
    ## If user specified a crt-dir, use that unconditionally.
    crt_gcc=no
@@@ -8327,7 -8188,6 +8327,7 @@@ case $opsys i
  esac
  
  
 +>>>>>>> MERGE-SOURCE
  
  
  
@@@ -8869,8 -8729,6 +8869,8 @@@ $as_echo "#define NO_MATHERR 1" >>confd
  
  fi
  
 +<<<<<<< TREE
 +=======
  for ac_header in sys/socket.h
  do :
    ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
  
  done
  
 +>>>>>>> MERGE-SOURCE
  for ac_header in net/if.h
  do :
    ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
  
  done
  
 +<<<<<<< TREE
 +=======
  for ac_header in ifaddrs.h
  do :
    ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
@@@ -8947,7 -8802,6 +8947,7 @@@ _ACEO
  fi
  done
  
 +>>>>>>> MERGE-SOURCE
  
  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
@@@ -9029,8 -8883,6 +9029,8 @@@ _ACEO
  
  
  fi
 +<<<<<<< TREE
 +=======
  ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
  #if HAVE_SYS_SOCKET_H
  #include <sys/socket.h>
@@@ -9047,7 -8899,6 +9047,7 @@@ _ACEO
  
  
  fi
 +>>>>>>> MERGE-SOURCE
  
  
  
  fi
  
  
 +<<<<<<< TREE
 +=======
  HAVE_GSETTINGS=no
  if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
  
@@@ -11608,7 -11457,6 +11608,7 @@@ $as_echo "#define HAVE_GSETTINGS 1" >>c
     fi
  fi
  
 +>>>>>>> MERGE-SOURCE
  HAVE_GCONF=no
  if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
  
@@@ -11709,7 -11557,17 +11709,7 @@@ $as_echo "no" >&6; 
  
  $as_echo "#define HAVE_GCONF 1" >>confdefs.h
  
 -            SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
 -      SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
 -   fi
 -fi
 -
 -if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
 -    SAVE_CFLAGS="$CFLAGS"
 -    SAVE_LDFLAGS="$LDFLAGS"
 -    CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
 -    LDFLAGS="$SETTINGS_LIBS $LDFLAGS"
 -    for ac_func in g_type_init
 +            for ac_func in g_type_init
  do :
    ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
  if test "x$ac_cv_func_g_type_init" = x""yes; then :
@@@ -11720,9 -11578,13 +11720,9 @@@ _ACEO
  fi
  done
  
 -    CFLAGS="$SAVE_CFLAGS"
 -    LDFLAGS="$SAVE_LDFLAGS"
 +   fi
  fi
  
 -
 -
 -
  HAVE_LIBSELINUX=no
  LIBSELINUX_LIBS=
  if test "${with_selinux}" = "yes"; then
  
  
  ### Use libxml (-lxml2) if available
 -HAVE_LIBXML2=no
  if test "${with_xml2}" != "no"; then
    ### I'm not sure what the version number should be, so I just guessed.
  
@@@ -14345,9 -14208,6 +14345,9 @@@ $as_echo "#define GETPGRP_VOID 1" >>con
  fi
  
  
 +<<<<<<< TREE
 +# Configure gnulib.
 +=======
  # UNIX98 PTYs.
  for ac_func in grantpt
  do :
  
  
  # Configure gnulib here, now that we know LIBS.
 +>>>>>>> MERGE-SOURCE
  
  
  
@@@ -16612,8 -16471,10 +16612,8 @@@ $as_echo "#define HAVE_C99_STRTOLD 1" >
    fi
  
  
 -  GNULIB_CHDIR=0;
    GNULIB_CHOWN=0;
    GNULIB_CLOSE=0;
 -  GNULIB_DUP=0;
    GNULIB_DUP2=0;
    GNULIB_DUP3=0;
    GNULIB_ENVIRON=0;
    GNULIB_FACCESSAT=0;
    GNULIB_FCHDIR=0;
    GNULIB_FCHOWNAT=0;
 -  GNULIB_FDATASYNC=0;
    GNULIB_FSYNC=0;
    GNULIB_FTRUNCATE=0;
    GNULIB_GETCWD=0;
    HAVE_FACCESSAT=1;
    HAVE_FCHDIR=1;
    HAVE_FCHOWNAT=1;
 -  HAVE_FDATASYNC=1;
    HAVE_FSYNC=1;
    HAVE_FTRUNCATE=1;
    HAVE_GETDTABLESIZE=1;
    HAVE_USLEEP=1;
    HAVE_DECL_ENVIRON=1;
    HAVE_DECL_FCHDIR=1;
 -  HAVE_DECL_FDATASYNC=1;
    HAVE_DECL_GETDOMAINNAME=1;
    HAVE_DECL_GETLOGIN_R=1;
    HAVE_DECL_GETPAGESIZE=1;
@@@ -16997,9 -16861,9 +16997,9 @@@ _ACEO
                     ;;
                 esac
  
 -               gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'getopt.h|{
 -                   s|.*"\(.*'"${gl_dirsep_regex}"'getopt.h\)".*|\1|
 -                   s|^/[^/]|//&|
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'getopt.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'getopt.h\)".*#\1#
 +                   s#^/[^/]#//&#
                     p
                     q
                   }'
@@@ -17088,7 -16952,7 +17088,7 @@@ int *p = &optreset; return optreset
    return 0;
  }
  _ACEOF
 -if ac_fn_c_try_link "$LINENO"; then :
 +if ac_fn_c_try_compile "$LINENO"; then :
    gl_optind_min=1
  else
    cat confdefs.h - <<_ACEOF >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_exeext conftest.$ac_ext
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
                  gl_save_CPPFLAGS=$CPPFLAGS
          CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
  main ()
  {
    {
 -    static char program[] = "program";
 -    static char a[] = "-a";
 -    static char foo[] = "foo";
 -    static char bar[] = "bar";
 -    char *argv[] = { program, a, foo, bar, NULL };
 +    int argc = 0;
 +    char *argv[10];
      int c;
  
 +    argv[argc++] = "program";
 +    argv[argc++] = "-a";
 +    argv[argc++] = "foo";
 +    argv[argc++] = "bar";
 +    argv[argc] = NULL;
      optind = OPTIND_MIN;
      opterr = 0;
  
 -    c = getopt (4, argv, "ab");
 +    c = getopt (argc, argv, "ab");
      if (!(c == 'a'))
        return 1;
 -    c = getopt (4, argv, "ab");
 +    c = getopt (argc, argv, "ab");
      if (!(c == -1))
        return 2;
      if (!(optind == 2))
    }
    /* Some internal state exists at this point.  */
    {
 -    static char program[] = "program";
 -    static char donald[] = "donald";
 -    static char p[] = "-p";
 -    static char billy[] = "billy";
 -    static char duck[] = "duck";
 -    static char a[] = "-a";
 -    static char bar[] = "bar";
 -    char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
 +    int argc = 0;
 +    char *argv[10];
      int c;
  
 +    argv[argc++] = "program";
 +    argv[argc++] = "donald";
 +    argv[argc++] = "-p";
 +    argv[argc++] = "billy";
 +    argv[argc++] = "duck";
 +    argv[argc++] = "-a";
 +    argv[argc++] = "bar";
 +    argv[argc] = NULL;
      optind = OPTIND_MIN;
      opterr = 0;
  
 -    c = getopt (7, argv, "+abp:q:");
 +    c = getopt (argc, argv, "+abp:q:");
      if (!(c == -1))
        return 4;
      if (!(strcmp (argv[0], "program") == 0))
    }
    /* Detect MacOS 10.5, AIX 7.1 bug.  */
    {
 -    static char program[] = "program";
 -    static char ab[] = "-ab";
 -    char *argv[3] = { program, ab, NULL };
 +    char *argv[3] = { "program", "-ab", NULL };
      optind = OPTIND_MIN;
      opterr = 0;
      if (getopt (2, argv, "ab:") != 'a')
@@@ -17387,19 -17250,22 +17387,19 @@@ main (
                  and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
                  OSF/1 5.1, Solaris 10.  */
               {
 -               static char conftest[] = "conftest";
 -               static char plus[] = "-+";
 -               char *argv[3] = { conftest, plus, NULL };
 +               char *myargv[3];
 +               myargv[0] = "conftest";
 +               myargv[1] = "-+";
 +               myargv[2] = 0;
                 opterr = 0;
 -               if (getopt (2, argv, "+a") != '?')
 +               if (getopt (2, myargv, "+a") != '?')
                   result |= 1;
               }
               /* This code succeeds on glibc 2.8, mingw,
                  and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
                  IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
               {
 -               static char program[] = "program";
 -               static char p[] = "-p";
 -               static char foo[] = "foo";
 -               static char bar[] = "bar";
 -               char *argv[] = { program, p, foo, bar, NULL };
 +               char *argv[] = { "program", "-p", "foo", "bar", NULL };
  
                 optind = 1;
                 if (getopt (4, argv, "p::") != 'p')
               }
               /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
               {
 -               static char program[] = "program";
 -               static char foo[] = "foo";
 -               static char p[] = "-p";
 -               char *argv[] = { program, foo, p, NULL };
 +               char *argv[] = { "program", "foo", "-p", NULL };
                 optind = 0;
                 if (getopt (3, argv, "-p") != 1)
                   result |= 16;
               }
               /* This code fails on glibc 2.11.  */
               {
 -               static char program[] = "program";
 -               static char b[] = "-b";
 -               static char a[] = "-a";
 -               char *argv[] = { program, b, a, NULL };
 +               char *argv[] = { "program", "-b", "-a", NULL };
                 optind = opterr = 0;
                 if (getopt (3, argv, "+:a:b") != 'b')
                   result |= 64;
                 else if (getopt (3, argv, "+:a:b") != ':')
                   result |= 64;
               }
 -             /* This code dumps core on glibc 2.14.  */
 -             {
 -               static char program[] = "program";
 -               static char w[] = "-W";
 -               static char dummy[] = "dummy";
 -               char *argv[] = { program, w, dummy, NULL };
 -               optind = opterr = 1;
 -               if (getopt (3, argv, "W;") != 'W')
 -                 result |= 128;
 -             }
               return result;
  
    ;
@@@ -17736,9 -17618,9 +17736,9 @@@ _ACEO
                     ;;
                 esac
  
 -               gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stdint.h|{
 -                   s|.*"\(.*'"${gl_dirsep_regex}"'stdint.h\)".*|\1|
 -                   s|^/[^/]|//&|
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdint.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'stdint.h\)".*#\1#
 +                   s#^/[^/]#//&#
                     p
                     q
                   }'
@@@ -18368,6 -18250,10 +18368,6 @@@ _ACEO
  
  
  
 -          if test $BITSIZEOF_WINT_T -lt 32; then
 -    BITSIZEOF_WINT_T=32
 -  fi
 -
      STDINT_H=stdint.h
    fi
  
@@@ -18443,9 -18329,9 +18443,9 @@@ _ACEO
                     ;;
                 esac
  
 -               gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'inttypes.h|{
 -                   s|.*"\(.*'"${gl_dirsep_regex}"'inttypes.h\)".*|\1|
 -                   s|^/[^/]|//&|
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'inttypes.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'inttypes.h\)".*#\1#
 +                   s#^/[^/]#//&#
                     p
                     q
                   }'
@@@ -18486,6 -18372,7 +18486,6 @@@ $as_echo "#define GL_TRIGGER_STDC_LIMIT
  
  
       GNULIB_FCHMODAT=0;
 -  GNULIB_FSTAT=0;
    GNULIB_FSTATAT=0;
    GNULIB_FUTIMENS=0;
    GNULIB_LCHMOD=0;
  
  
  
 +<<<<<<< TREE
 +=======
    GNULIB_PTHREAD_SIGMASK=0;
 -  GNULIB_RAISE=0;
    GNULIB_SIGNAL_H_SIGPIPE=0;
    GNULIB_SIGPROCMASK=0;
    GNULIB_SIGACTION=0;
      HAVE_POSIX_SIGNALBLOCKING=1;
    HAVE_PTHREAD_SIGMASK=1;
 -  HAVE_RAISE=1;
    HAVE_SIGSET_T=1;
    HAVE_SIGINFO_T=1;
    HAVE_SIGACTION=1;
  
    HAVE_SIGHANDLER_T=1;
    REPLACE_PTHREAD_SIGMASK=0;
 -  REPLACE_RAISE=0;
  
  
  
  
  
  
 +>>>>>>> MERGE-SOURCE
  
  
     if test $ac_cv_header_sys_socket_h = no; then
@@@ -18787,6 -18674,7 +18787,6 @@@ $as_echo "#define HAVE_WCHAR_T 1" >>con
  
    GNULIB_DPRINTF=0;
    GNULIB_FCLOSE=0;
 -  GNULIB_FDOPEN=0;
    GNULIB_FFLUSH=0;
    GNULIB_FGETC=0;
    GNULIB_FGETS=0;
    GNULIB_GETS=0;
    GNULIB_OBSTACK_PRINTF=0;
    GNULIB_OBSTACK_PRINTF_POSIX=0;
 -  GNULIB_PCLOSE=0;
    GNULIB_PERROR=0;
    GNULIB_POPEN=0;
    GNULIB_PRINTF=0;
    HAVE_DPRINTF=1;
    HAVE_FSEEKO=1;
    HAVE_FTELLO=1;
 -  HAVE_PCLOSE=1;
 -  HAVE_POPEN=1;
    HAVE_RENAMEAT=1;
    HAVE_VASPRINTF=1;
    HAVE_VDPRINTF=1;
    REPLACE_DPRINTF=0;
    REPLACE_FCLOSE=0;
 -  REPLACE_FDOPEN=0;
    REPLACE_FFLUSH=0;
    REPLACE_FOPEN=0;
    REPLACE_FPRINTF=0;
  
  
  
 +<<<<<<< TREE
 +=======
  
  
  ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
@@@ -19014,7 -18904,6 +19014,7 @@@ _ACEO
  
  
  
 +>>>>>>> MERGE-SOURCE
  ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
  if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
    ac_have_decl=1
  
  
  
 -ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
 -if test "x$ac_cv_type_mode_t" = x""yes; then :
 -
 -else
 -
 -cat >>confdefs.h <<_ACEOF
 -#define mode_t int
 -_ACEOF
 -
 -fi
 -
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
  $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
  if test "${ac_cv_c_restrict+set}" = set; then :
@@@ -19258,9 -19158,9 +19258,9 @@@ _ACEO
                     ;;
                 esac
  
 -               gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'time.h|{
 -                   s|.*"\(.*'"${gl_dirsep_regex}"'time.h\)".*|\1|
 -                   s|^/[^/]|//&|
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'time.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'time.h\)".*#\1#
 +                   s#^/[^/]#//&#
                     p
                     q
                   }'
@@@ -19288,8 -19188,6 +19288,8 @@@ $as_echo "$gl_cv_next_time_h" >&6; 
  
  
  
 +
 +
  ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default"
  if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
    ac_have_decl=1
@@@ -19494,6 -19392,7 +19494,6 @@@ if test $HAVE_DUP2 = 0 || test $REPLACE
  
    gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
  
 -
  fi
  
  
    HAVE_SYS_LOADAVG_H=0
  fi
  ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
 -    # include <sys/loadavg.h>
 -    #endif
 -    #include <stdlib.h>
 +   # include <sys/loadavg.h>
 +   #endif
 +   #include <stdlib.h>
  "
  if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
  
  
  
  
 +<<<<<<< TREE
 +=======
    LIB_PTHREAD_SIGMASK=
  
  
  
  
  
 +>>>>>>> MERGE-SOURCE
  
    if test $ac_cv_func_readlink = no; then
      HAVE_READLINK=0
  
  
  
 +<<<<<<< TREE
 +=======
  
  
  
@@@ -20810,9 -20704,9 +20810,9 @@@ _ACEO
                     ;;
                 esac
  
 -               gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'signal.h|{
 -                   s|.*"\(.*'"${gl_dirsep_regex}"'signal.h\)".*|\1|
 -                   s|^/[^/]|//&|
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'signal.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'signal.h\)".*#\1#
 +                   s#^/[^/]#//&#
                     p
                     q
                   }'
  
  
  
 +>>>>>>> MERGE-SOURCE
     ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
  /* <sys/types.h> is not needed according to POSIX, but the
     <sys/socket.h> in i386-unknown-freebsd4.10 and
@@@ -21055,9 -20948,9 +21055,9 @@@ _ACEO
                     ;;
                 esac
  
 -               gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stdarg.h|{
 -                   s|.*"\(.*'"${gl_dirsep_regex}"'stdarg.h\)".*|\1|
 -                   s|^/[^/]|//&|
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdarg.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'stdarg.h\)".*#\1#
 +                   s#^/[^/]#//&#
                     p
                     q
                   }'
@@@ -21255,9 -21148,9 +21255,9 @@@ _ACEO
                     ;;
                 esac
  
 -               gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stddef.h|{
 -                   s|.*"\(.*'"${gl_dirsep_regex}"'stddef.h\)".*|\1|
 -                   s|^/[^/]|//&|
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stddef.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'stddef.h\)".*#\1#
 +                   s#^/[^/]#//&#
                     p
                     q
                   }'
@@@ -21325,9 -21218,9 +21325,9 @@@ _ACEO
                     ;;
                 esac
  
 -               gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stdio.h|{
 -                   s|.*"\(.*'"${gl_dirsep_regex}"'stdio.h\)".*|\1|
 -                   s|^/[^/]|//&|
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdio.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'stdio.h\)".*#\1#
 +                   s#^/[^/]#//&#
                     p
                     q
                   }'
@@@ -21417,9 -21310,9 +21417,9 @@@ _ACEO
                     ;;
                 esac
  
 -               gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stdlib.h|{
 -                   s|.*"\(.*'"${gl_dirsep_regex}"'stdlib.h\)".*|\1|
 -                   s|^/[^/]|//&|
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdlib.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'stdlib.h\)".*#\1#
 +                   s#^/[^/]#//&#
                     p
                     q
                   }'
@@@ -21466,8 -21359,6 +21466,8 @@@ $as_echo "#define my_strftime nstrftime
  
  
  
 +<<<<<<< TREE
 +=======
  
    if test "$ac_cv_have_decl_strtoimax" != yes; then
      HAVE_DECL_STRTOIMAX=0
  
  
  
 +>>>>>>> MERGE-SOURCE
    if test "$ac_cv_have_decl_strtoumax" != yes; then
      HAVE_DECL_STRTOUMAX=0
    fi
@@@ -21677,9 -21567,9 +21677,9 @@@ _ACEO
                     ;;
                 esac
  
 -               gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'sys/stat.h|{
 -                   s|.*"\(.*'"${gl_dirsep_regex}"'sys/stat.h\)".*|\1|
 -                   s|^/[^/]|//&|
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'sys/stat.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'sys/stat.h\)".*#\1#
 +                   s#^/[^/]#//&#
                     p
                     q
                   }'
@@@ -21709,6 -21599,8 +21709,6 @@@ $as_echo "$gl_cv_next_sys_stat_h" >&6; 
  
  
  
 -
 -
        ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
       #include <sys/stat.h>
  "
@@@ -21855,9 -21747,9 +21855,9 @@@ _ACEO
                     ;;
                 esac
  
 -               gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'unistd.h|{
 -                   s|.*"\(.*'"${gl_dirsep_regex}"'unistd.h\)".*|\1|
 -                   s|^/[^/]|//&|
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'unistd.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'unistd.h\)".*#\1#
 +                   s#^/[^/]#//&#
                     p
                     q
                   }'
@@@ -21899,7 -21791,9 +21899,7 @@@ $as_echo "$gl_cv_next_unistd_h" >&6; 
  
    gl_gnulib_enabled_dosname=false
    gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
 -  gl_gnulib_enabled_sigprocmask=false
    gl_gnulib_enabled_stat=false
 -  gl_gnulib_enabled_strtoll=false
    gl_gnulib_enabled_strtoull=false
    gl_gnulib_enabled_verify=false
    func_gl_gnulib_m4code_dosname ()
        gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
      fi
    }
 +<<<<<<< TREE
 +=======
    func_gl_gnulib_m4code_sigprocmask ()
    {
      if ! $gl_gnulib_enabled_sigprocmask; then
@@@ -21946,7 -21838,9 +21946,7 @@@ if test $HAVE_POSIX_SIGNALBLOCKING = 0
  
    gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
  
 -
 -
 -
 +  :
  fi
  
  
        gl_gnulib_enabled_sigprocmask=true
      fi
    }
 +>>>>>>> MERGE-SOURCE
    func_gl_gnulib_m4code_stat ()
    {
      if ! $gl_gnulib_enabled_stat; then
        if test $REPLACE_STAT = 1; then
          func_gl_gnulib_m4code_dosname
        fi
 +<<<<<<< TREE
 +      if $condition; then
 +=======
        if test $REPLACE_STAT = 1; then
 +>>>>>>> MERGE-SOURCE
          func_gl_gnulib_m4code_verify
        fi
      fi
    }
 +<<<<<<< TREE
 +=======
    func_gl_gnulib_m4code_strtoll ()
    {
      if ! $gl_gnulib_enabled_strtoll; then
        gl_gnulib_enabled_strtoll=true
      fi
    }
 +>>>>>>> MERGE-SOURCE
    func_gl_gnulib_m4code_strtoull ()
    {
      if ! $gl_gnulib_enabled_strtoull; then
    if test $REPLACE_LSTAT = 1; then
      func_gl_gnulib_m4code_stat
    fi
 -  if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
 -    func_gl_gnulib_m4code_sigprocmask
 -  fi
    if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
      func_gl_gnulib_m4code_stat
    fi
 +<<<<<<< TREE
 +  if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then
 +=======
    if test $ac_cv_func_strtoimax = no; then
      func_gl_gnulib_m4code_verify
    fi
      func_gl_gnulib_m4code_strtoll
    fi
    if test $ac_cv_func_strtoumax = no; then
 +>>>>>>> MERGE-SOURCE
      func_gl_gnulib_m4code_verify
    fi
    if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
    gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
  fi
  
 -   if $gl_gnulib_enabled_sigprocmask; then
 -  gl_GNULIB_ENABLED_sigprocmask_TRUE=
 -  gl_GNULIB_ENABLED_sigprocmask_FALSE='#'
 -else
 -  gl_GNULIB_ENABLED_sigprocmask_TRUE='#'
 -  gl_GNULIB_ENABLED_sigprocmask_FALSE=
 -fi
 -
     if $gl_gnulib_enabled_stat; then
    gl_GNULIB_ENABLED_stat_TRUE=
    gl_GNULIB_ENABLED_stat_FALSE='#'
    gl_GNULIB_ENABLED_stat_FALSE=
  fi
  
 -   if $gl_gnulib_enabled_strtoll; then
 -  gl_GNULIB_ENABLED_strtoll_TRUE=
 -  gl_GNULIB_ENABLED_strtoll_FALSE='#'
 -else
 -  gl_GNULIB_ENABLED_strtoll_TRUE='#'
 -  gl_GNULIB_ENABLED_strtoll_FALSE=
 -fi
 -
     if $gl_gnulib_enabled_strtoull; then
    gl_GNULIB_ENABLED_strtoull_TRUE=
    gl_GNULIB_ENABLED_strtoull_FALSE='#'
  
  
  
 +# 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
 +
 +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
 +
 +fi
 +done
 +
 +
 +# 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.
 +# Also we need tputs and friends to be able to build at all.
 +have_tputs_et_al=true
 +{ $as_echo "$as_me:${as_lineno-$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
 +  ac_func_search_save_LIBS=$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 tputs ();
 +int
 +main ()
 +{
 +return tputs ();
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +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
 +  if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_search_tputs=$ac_res
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext
 +  if test "${ac_cv_search_tputs+set}" = set; then :
 +  break
 +fi
 +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:${as_lineno-$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"
 +
 +else
 +  have_tputs_et_al=false
 +fi
 +
 +if test "$have_tputs_et_al" != true; then
 +  as_fn_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." "$LINENO" 5
 +fi
 +# Must define this when any termcap library is found.
 +
 +$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
 +
 +## FIXME This was the cpp logic, but I am not sure it is right.
 +## The above test has not necessarily found libncurses.
 +HAVE_LIBNCURSES=yes
 +
 +## Use terminfo instead of termcap?
 +## Note only system files NOT using terminfo are:
 +## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
 +## darwin|gnu without ncurses.
 +TERMINFO=no
 +LIBS_TERMCAP=
 +case "$opsys" in
 +  ## cygwin: Fewer environment variables to go wrong, more terminal types.
 +  ## hpux10-20: Use the system provided termcap(3) library.
 +  ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
 +  ##  is necessary.  Otherwise Emacs dumps core when run -nw.
 +  aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
 +
 +  ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
 +  ##  The ncurses library has been moved out of the System framework in
 +  ##  Mac OS X 10.2.  So if configure detects it, set the command-line
 +  ##  option to use it.
 +  darwin|gnu*)
 +    ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
 +    if test "x$HAVE_LIBNCURSES" = "xyes"; then
 +      TERMINFO=yes
 +      LIBS_TERMCAP="-lncurses"
 +    fi
 +    ;;
 +
 +  freebsd)
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
 +$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
 +    if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <osreldate.h>
 +int
 +main ()
 +{
 +#if __FreeBSD_version < 400000
 +fail;
 +#endif
 +
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  emacs_cv_freebsd_terminfo=yes
 +else
 +  emacs_cv_freebsd_terminfo=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_freebsd_terminfo" >&5
 +$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
 +
 +    if test $emacs_cv_freebsd_terminfo = yes; then
 +      TERMINFO=yes
 +      LIBS_TERMCAP="-lncurses"
 +    else
 +      LIBS_TERMCAP="-ltermcap"
 +    fi
 +    ;;
 +
 +  netbsd)
 +    if test $ac_cv_search_tputs = -lterminfo; then
 +      TERMINFO=yes
 +      LIBS_TERMCAP="-lterminfo"
 +    else
 +      LIBS_TERMCAP="-ltermcap"
 +    fi
 +    ;;
 +
 +esac
 +
 +case "$opsys" in
 +  ## hpux: Make sure we get select from libc rather than from libcurses
 +  ##  because libcurses on HPUX 10.10 has a broken version of select.
 +  ##  We used to use -lc -lcurses, but this may be cleaner.
 +  hpux*) LIBS_TERMCAP="-ltermcap" ;;
 +
 +  openbsd) LIBS_TERMCAP="-lncurses" ;;
 +
 +  ## Must use system termcap, if we use any termcap.  It does special things.
 +  sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
 +esac
 +
 +TERMCAP_OBJ=tparam.o
 +if test $TERMINFO = yes; then
 +
 +$as_echo "#define TERMINFO 1" >>confdefs.h
 +
 +
 +  ## Default used to be -ltermcap.  Add a case above if need something else.
 +  test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses"
 +
 +  TERMCAP_OBJ=terminfo.o
 +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
 +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.  */
 +#include <netinet/in.h>
 +#include <arpa/nameser.h>
 +#include <resolv.h>
 +int
 +main ()
 +{
 +return res_init();
 +  ;
 +  return 0;
 +}
 +_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
 +  { $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
 +
 +if test "$have_res_init" = yes; then
 +
 +$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
 +
 +fi
 +
 +# Do we need the Hesiod library to provide the support routines?
 +LIBHESIOD=
 +if test "$with_hesiod" != no ; then
 +  # Don't set $LIBS here -- see comments above.  FIXME which comments?
 +  ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
 +if test "x$ac_cv_func_res_send" = x""yes; then :
 +
 +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 :
 +
 +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.  */
 +
 +/* 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.  */
 +
 +/* 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
 +
 +fi
 +
 +fi
 +
 +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 :
 +
 +else
 +  { $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
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lhesiod $RESOLVLIB $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 hes_getmailhost ();
 +int
 +main ()
 +{
 +return hes_getmailhost ();
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_hesiod_hes_getmailhost=yes
 +else
 +  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 :
 +  hesiod=yes
 +else
 +  :
 +fi
 +
 +fi
 +
 +
 +  if test x"$hesiod" = xyes; then
 +
 +$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
 +
 +    LIBHESIOD=-lhesiod
 +  fi
 +fi
 +
 +
 +# Do we need libresolv (due to res_init or Hesiod)?
 +if test "$resolv" = yes ; then
 +
 +$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
 +
 +  LIBRESOLV=-lresolv
 +else
 +  LIBRESOLV=
 +fi
 +
 +
 +# These tell us which Kerberos-related libraries to use.
 +COM_ERRLIB=
 +CRYPTOLIB=
 +KRB5LIB=
 +DESLIB=
 +KRB4LIB=
 +
 +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="-lcom_err  $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 com_err ();
 +int
 +main ()
 +{
 +return com_err ();
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_com_err_com_err=yes
 +else
 +  ac_cv_lib_com_err_com_err=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_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 :
 +  have_com_err=yes
 +else
 +  have_com_err=no
 +fi
 +
 +  if test $have_com_err = yes; then
 +    COM_ERRLIB=-lcom_err
 +    LIBS="$COM_ERRLIB $LIBS"
 +
 +$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
 +
 +  fi
 +  { $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
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lcrypto  $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 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_crypto_mit_des_cbc_encrypt=yes
 +else
 +  ac_cv_lib_crypto_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
 +{ $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 :
 +  have_crypto=yes
 +else
 +  have_crypto=no
 +fi
 +
 +  if test $have_crypto = yes; then
 +    CRYPTOLIB=-lcrypto
 +    LIBS="$CRYPTOLIB $LIBS"
 +
 +$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
 +
 +  fi
 +  { $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
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lk5crypto  $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 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
 +  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
 +{ $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 :
 +  have_k5crypto=yes
 +else
 +  have_k5crypto=no
 +fi
 +
 +  if test $have_k5crypto = yes; then
 +    CRYPTOLIB=-lk5crypto
 +    LIBS="$CRYPTOLIB $LIBS"
 +
 +$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
 +
 +  fi
 +  { $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
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lkrb5  $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 krb5_init_context ();
 +int
 +main ()
 +{
 +return krb5_init_context ();
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_krb5_krb5_init_context=yes
 +else
 +  ac_cv_lib_krb5_krb5_init_context=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_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 :
 +  have_krb5=yes
 +else
 +  have_krb5=no
 +fi
 +
 +  if test $have_krb5=yes; then
 +    KRB5LIB=-lkrb5
 +    LIBS="$KRB5LIB $LIBS"
 +
 +$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
 +
 +  fi
 +    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
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-ldes425  $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 des_cbc_encrypt ();
 +int
 +main ()
 +{
 +return des_cbc_encrypt ();
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_des425_des_cbc_encrypt=yes
 +else
 +  ac_cv_lib_des425_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_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 :
 +  have_des425=yes
 +else
 +  have_des425=no
 +fi
 +
 +    if test $have_des425 = yes; then
 +      DESLIB=-ldes425
 +      LIBS="$DESLIB $LIBS"
 +
 +$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
 +
 +    else
 +      { $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.  */
 +
 +/* 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
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_des_des_cbc_encrypt=yes
 +else
 +  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 :
 +  have_des=yes
 +else
 +  have_des=no
 +fi
 +
 +      if test $have_des = yes; then
 +        DESLIB=-ldes
 +        LIBS="$DESLIB $LIBS"
 +
 +$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
 +
 +      fi
 +    fi
 +    { $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.  */
 +
 +/* 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_krb4_krb_get_cred=yes
 +else
 +  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 :
 +  have_krb4=yes
 +else
 +  have_krb4=no
 +fi
 +
 +    if test $have_krb4 = yes; then
 +      KRB4LIB=-lkrb4
 +      LIBS="$KRB4LIB $LIBS"
 +
 +$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
 +
 +    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.  */
 +
 +/* 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_lib_krb_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_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 :
 +  have_krb=yes
 +else
 +  have_krb=no
 +fi
 +
 +      if test $have_krb = yes; then
 +        KRB4LIB=-lkrb
 +        LIBS="$KRB4LIB $LIBS"
 +
 +$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
 +
 +      fi
 +    fi
 +  fi
 +
 +  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
 + 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
 +
 +
 +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 :
 +
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_KRB5_ERROR_E_TEXT 1
 +_ACEOF
 +
 +
 +fi
 +
 +fi
 +
 +done
 +
 +  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
 +
 +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
 +
 +fi
 +
 +done
 +
 +fi
 +
 +done
 +
 +    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
 +
 +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
 +
 +else
 +  for ac_header in kerberos/krb.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
 +if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_KERBEROS_KRB_H 1
 +_ACEOF
 +
 +fi
 +
 +done
 +
 +fi
 +
 +done
 +
 +fi
 +
 +done
 +
 +  fi
 +  for ac_header in com_err.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
 +if test "x$ac_cv_header_com_err_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_COM_ERR_H 1
 +_ACEOF
 +
 +fi
 +
 +done
 +
 +fi
 +
 +
 +
 +
 +
 +
 +
 +# Solaris requires -lintl if you want strerror (which calls dgettext)
 +# to return localized messages.
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
 +$as_echo_n "checking for dgettext in -lintl... " >&6; }
 +if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lintl  $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 dgettext ();
 +int
 +main ()
 +{
 +return dgettext ();
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_intl_dgettext=yes
 +else
 +  ac_cv_lib_intl_dgettext=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_dgettext" >&5
 +$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
 +if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBINTL 1
 +_ACEOF
 +
 +  LIBS="-lintl $LIBS"
 +
 +fi
 +
 +
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
 +$as_echo_n "checking whether localtime caches TZ... " >&6; }
 +if test "${emacs_cv_localtime_cache+set}" = set; then :
 +  $as_echo_n "(cached) " >&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
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <time.h>
 +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;
 +  unsetenv("TZ");
 +  hour_unset = localtime (&now)->tm_hour;
 +  if (putenv (TZ_PST8) != 0)
 +    exit (1);
 +  if (localtime (&now)->tm_hour == hour_GMT0)
 +    exit (1);
 +  unsetenv("TZ");
 +  if (localtime (&now)->tm_hour != hour_unset)
 +    exit (1);
 +  exit (0);
 +}
 +_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  emacs_cv_localtime_cache=no
 +else
 +  emacs_cv_localtime_cache=yes
 +fi
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +fi
 +
 +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
 +fi
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
 +$as_echo "$emacs_cv_localtime_cache" >&6; }
 +if test $emacs_cv_localtime_cache = yes; then
 +
 +$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
 +
 +fi
 +
 +if test "x$HAVE_TIMEVAL" = xyes; then
 +  for ac_func in gettimeofday
 +do :
 +  ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
 +if test "x$ac_cv_func_gettimeofday" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_GETTIMEOFDAY 1
 +_ACEOF
 +
 +fi
 +done
 +
 +  if test $ac_cv_func_gettimeofday = yes; then
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
 +$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
 +if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  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
 +#endif
 +int
 +main ()
 +{
 +struct timeval time;
 +       gettimeofday (&time, 0);
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  emacs_cv_gettimeofday_two_arguments=yes
 +else
 +  emacs_cv_gettimeofday_two_arguments=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
 +$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
 +    if test $emacs_cv_gettimeofday_two_arguments = no; then
 +
 +$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
 +
 +    fi
 +  fi
 +fi
 +
 +ok_so_far=yes
 +ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
 +if test "x$ac_cv_func_socket" = x""yes; then :
 +
 +else
 +  ok_so_far=no
 +fi
 +
 +if test $ok_so_far = yes; then
 +  ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
 +if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
 +
 +else
 +  ok_so_far=no
 +fi
 +
 +
 +fi
 +if test $ok_so_far = yes; then
 +  ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
 +if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
 +
 +else
 +  ok_so_far=no
 +fi
 +
 +
 +fi
 +if test $ok_so_far = yes; then
 +
 +$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
 +
 +fi
 +
 +if test -f /usr/lpp/X11/bin/smt.exp; then
 +
 +$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
 +
 +fi
 +
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
 +$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
 +if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
 +
 +$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
 +
 +else
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 +$as_echo "no" >&6; }
 +fi
 +
 +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
 +if test "x$ac_cv_type_pid_t" = x""yes; then :
 +
 +else
 +
 +cat >>confdefs.h <<_ACEOF
 +#define pid_t int
 +_ACEOF
 +
 +fi
 +
 +for ac_header in vfork.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
 +if test "x$ac_cv_header_vfork_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_VFORK_H 1
 +_ACEOF
 +
 +fi
 +
 +done
 +
 +for ac_func in fork vfork
 +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 "x$ac_cv_func_fork" = xyes; then
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
 +$as_echo_n "checking for working fork... " >&6; }
 +if test "${ac_cv_func_fork_works+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  if test "$cross_compiling" = yes; then :
 +  ac_cv_func_fork_works=cross
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +$ac_includes_default
 +int
 +main ()
 +{
 +
 +        /* By Ruediger Kuhlmann. */
 +        return fork () < 0;
 +
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  ac_cv_func_fork_works=yes
 +else
 +  ac_cv_func_fork_works=no
 +fi
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +fi
 +
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
 +$as_echo "$ac_cv_func_fork_works" >&6; }
 +
 +else
 +  ac_cv_func_fork_works=$ac_cv_func_fork
 +fi
 +if test "x$ac_cv_func_fork_works" = xcross; then
 +  case $host in
 +    *-*-amigaos* | *-*-msdosdjgpp*)
 +      # Override, as these systems have only a dummy fork() stub
 +      ac_cv_func_fork_works=no
 +      ;;
 +    *)
 +      ac_cv_func_fork_works=yes
 +      ;;
 +  esac
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
 +$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
 +fi
 +ac_cv_func_vfork_works=$ac_cv_func_vfork
 +if test "x$ac_cv_func_vfork" = xyes; then
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
 +$as_echo_n "checking for working vfork... " >&6; }
 +if test "${ac_cv_func_vfork_works+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  if test "$cross_compiling" = yes; then :
 +  ac_cv_func_vfork_works=cross
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +/* Thanks to Paul Eggert for this test.  */
 +$ac_includes_default
 +#include <sys/wait.h>
 +#ifdef HAVE_VFORK_H
 +# include <vfork.h>
 +#endif
 +/* On some sparc systems, changes by the child to local and incoming
 +   argument registers are propagated back to the parent.  The compiler
 +   is told about this with #include <vfork.h>, but some compilers
 +   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
 +   static variable whose address is put into a register that is
 +   clobbered by the vfork.  */
 +static void
 +#ifdef __cplusplus
 +sparc_address_test (int arg)
 +# else
 +sparc_address_test (arg) int arg;
 +#endif
 +{
 +  static pid_t child;
 +  if (!child) {
 +    child = vfork ();
 +    if (child < 0) {
 +      perror ("vfork");
 +      _exit(2);
 +    }
 +    if (!child) {
 +      arg = getpid();
 +      write(-1, "", 0);
 +      _exit (arg);
 +    }
 +  }
 +}
 +
 +int
 +main ()
 +{
 +  pid_t parent = getpid ();
 +  pid_t child;
 +
 +  sparc_address_test (0);
 +
 +  child = vfork ();
 +
 +  if (child == 0) {
 +    /* Here is another test for sparc vfork register problems.  This
 +       test uses lots of local variables, at least as many local
 +       variables as main has allocated so far including compiler
 +       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
 +       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
 +       reuse the register of parent for one of the local variables,
 +       since it will think that parent can't possibly be used any more
 +       in this routine.  Assigning to the local variable will thus
 +       munge parent in the parent process.  */
 +    pid_t
 +      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
 +      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
 +    /* Convince the compiler that p..p7 are live; otherwise, it might
 +       use the same hardware register for all 8 local variables.  */
 +    if (p != p1 || p != p2 || p != p3 || p != p4
 +      || p != p5 || p != p6 || p != p7)
 +      _exit(1);
 +
 +    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
 +       from child file descriptors.  If the child closes a descriptor
 +       before it execs or exits, this munges the parent's descriptor
 +       as well.  Test for this by closing stdout in the child.  */
 +    _exit(close(fileno(stdout)) != 0);
 +  } else {
 +    int status;
 +    struct stat st;
 +
 +    while (wait(&status) != child)
 +      ;
 +    return (
 +       /* Was there some problem with vforking?  */
 +       child < 0
 +
 +       /* Did the child fail?  (This shouldn't happen.)  */
 +       || status
 +
 +       /* Did the vfork/compiler bug occur?  */
 +       || parent != getpid()
 +
 +       /* Did the file descriptor bug occur?  */
 +       || fstat(fileno(stdout), &st) != 0
 +       );
 +  }
 +}
 +_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  ac_cv_func_vfork_works=yes
 +else
 +  ac_cv_func_vfork_works=no
 +fi
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +fi
 +
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
 +$as_echo "$ac_cv_func_vfork_works" >&6; }
 +
 +fi;
 +if test "x$ac_cv_func_fork_works" = xcross; then
 +  ac_cv_func_vfork_works=$ac_cv_func_vfork
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
 +$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
 +fi
 +
 +if test "x$ac_cv_func_vfork_works" = xyes; then
 +
 +$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
 +
 +else
 +
 +$as_echo "#define vfork fork" >>confdefs.h
 +
 +fi
 +if test "x$ac_cv_func_fork_works" = xyes; then
 +
 +$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
 +
 +fi
 +
 +
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
 +$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
 +if test "${emacs_cv_langinfo_codeset+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <langinfo.h>
 +int
 +main ()
 +{
 +char* cs = nl_langinfo(CODESET);
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  emacs_cv_langinfo_codeset=yes
 +else
 +  emacs_cv_langinfo_codeset=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_langinfo_codeset" >&5
 +$as_echo "$emacs_cv_langinfo_codeset" >&6; }
 +if test $emacs_cv_langinfo_codeset = yes; then
 +
 +$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
 +
 +fi
 +
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
 +$as_echo_n "checking for mbstate_t... " >&6; }
 +if test "${ac_cv_type_mbstate_t+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +$ac_includes_default
 +#         include <wchar.h>
 +int
 +main ()
 +{
 +mbstate_t x; return sizeof x;
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_type_mbstate_t=yes
 +else
 +  ac_cv_type_mbstate_t=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
 +$as_echo "$ac_cv_type_mbstate_t" >&6; }
 +   if test $ac_cv_type_mbstate_t = yes; then
 +
 +$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
 +
 +   else
 +
 +$as_echo "#define mbstate_t int" >>confdefs.h
 +
 +   fi
 +
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
 +$as_echo_n "checking for C restricted array declarations... " >&6; }
 +if test "${emacs_cv_c_restrict_arr+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +void fred (int x[__restrict]);
 +int
 +main ()
 +{
 +
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  emacs_cv_c_restrict_arr=yes
 +else
 +  emacs_cv_c_restrict_arr=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
 +$as_echo "$emacs_cv_c_restrict_arr" >&6; }
 +if test "$emacs_cv_c_restrict_arr" = yes; then
 +
 +$as_echo "#define __restrict_arr __restrict" >>confdefs.h
 +
 +fi
 +
 +
 +
 +# Set up the CFLAGS for real compilation, so we can substitute it.
 +CFLAGS="$REAL_CFLAGS"
 +CPPFLAGS="$REAL_CPPFLAGS"
 +
 +## Hack to detect a buggy GCC version.
 +if test "x$GCC" = xyes \
 +   && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
 +   && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
 +   && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
 +   as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
 +fi
 +
 +version=$PACKAGE_VERSION
 +
 +### Specify what sort of things we'll be editing into Makefile and config.h.
 +### Use configuration here uncanonicalized to avoid exceeding size limits.
 +
 +
 +## Unused?
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
 +## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
 +## end of LIBX_BASE, but nothing ever set it.
 +
 +
 +
 +
 +## Used in lwlib/Makefile.in.
 +
 +if test -n "${machfile}"; then
 +  M_FILE="\$(srcdir)/${machfile}"
 +else
 +  M_FILE=
 +fi
 +S_FILE="\$(srcdir)/${opsysfile}"
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +cat >>confdefs.h <<_ACEOF
 +#define EMACS_CONFIGURATION "${canonical}"
 +_ACEOF
 +
 +
 +cat >>confdefs.h <<_ACEOF
 +#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
 +_ACEOF
 +
 +if test -n "$machfile"; then
 +
 +cat >>confdefs.h <<_ACEOF
 +#define config_machfile "${machfile}"
 +_ACEOF
 +
 +fi
 +
 +cat >>confdefs.h <<_ACEOF
 +#define config_opsysfile "${opsysfile}"
 +_ACEOF
 +
 +
 +XMENU_OBJ=
 +XOBJ=
 +FONT_OBJ=
 +if test "${HAVE_X_WINDOWS}" = "yes" ; then
 +
 +$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
 +
 +  XMENU_OBJ=xmenu.o
 +  XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
 +  FONT_OBJ=xfont.o
 +  if test "$HAVE_XFT" = "yes"; then
 +    FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
 +  elif test "$HAVE_FREETYPE" = "yes"; then
 +    FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
 +  fi
 +
 +fi
 +
 +
 +
 +
 +WIDGET_OBJ=
 +MOTIF_LIBW=
 +if test "${USE_X_TOOLKIT}" != "none" ; then
 +  WIDGET_OBJ=widget.o
 +
 +$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
 +
 +  if test "${USE_X_TOOLKIT}" = "LUCID"; then
 +
 +$as_echo "#define USE_LUCID 1" >>confdefs.h
 +
 +  elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
 +
 +$as_echo "#define USE_MOTIF 1" >>confdefs.h
 +
 +    MOTIF_LIBW=-lXm
 +    case "$opsys" in
 +      gnu-linux)
 +        ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
 +        MOTIF_LIBW="$MOTIF_LIBW -lXpm"
 +        ;;
 +
 +      unixware)
 +        ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
 +        ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
 +        MOTIF_LIBW="MOTIF_LIBW -lXimp"
 +        ;;
 +
 +      aix4-2)
 +        ## olson@mcs.anl.gov says -li18n is needed by -lXm.
 +        MOTIF_LIBW="$MOTIF_LIBW -li18n"
 +        ;;
 +    esac
 +    MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
 +  fi
 +fi
 +
 +
 +TOOLKIT_LIBW=
 +case "$USE_X_TOOLKIT" in
 +  MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
 +  LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
 +  none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS -lXcomposite" ;;
 +esac
 +
 +
 +if test "$USE_X_TOOLKIT" = "none"; then
 +  LIBXT_OTHER="\$(LIBXSM)"
 +  OLDXMENU_TARGET="really-oldXMenu"
 +else
 +  LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
 +  OLDXMENU_TARGET="really-lwlib"
 +fi
 +
 +
 +## The X Menu stuff is present in the X10 distribution, but missing
 +## from X11.  If we have X10, just use the installed library;
 +## otherwise, use our own copy.
 +if test "${HAVE_X11}" = "yes" ; then
 +
 +$as_echo "#define HAVE_X11 1" >>confdefs.h
 +
 +
 +  if test "$USE_X_TOOLKIT" = "none"; then
 +    OLDXMENU="\${oldXMenudir}/libXMenu11.a"
 +  else
 +    OLDXMENU="\${lwlibdir}/liblw.a"
 +  fi
 +  LIBXMENU="\$(OLDXMENU)"
 +  LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
 +  OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
 +else
 +  ## For a syntactically valid Makefile; not actually used for anything.
 +  ## See comments in src/Makefile.in.
 +  OLDXMENU=nothing
 +  ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
 +  if test "${HAVE_X_WINDOWS}" = "yes"; then
 +    LIBXMENU="-lXMenu"
 +  else
 +    LIBXMENU=
 +  fi
 +  LIBX_OTHER=
 +  OLDXMENU_DEPS=
 +fi
 +
 +if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
 +  OLDXMENU_TARGET=
 +  OLDXMENU=nothing
 +  LIBXMENU=
 +  OLDXMENU_DEPS=
 +fi
 +
 +
 +
 +
 +
 +
 +
 +if test "${HAVE_MENUS}" = "yes" ; then
 +
 +$as_echo "#define HAVE_MENUS 1" >>confdefs.h
 +
 +fi
 +
 +if test "${GNU_MALLOC}" = "yes" ; then
 +
 +$as_echo "#define GNU_MALLOC 1" >>confdefs.h
 +
 +fi
 +
 +RALLOC_OBJ=
 +if test "${REL_ALLOC}" = "yes" ; then
 +
 +$as_echo "#define REL_ALLOC 1" >>confdefs.h
 +
 +
 +  test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
 +fi
 +
 +
 +if test "$opsys" = "cygwin"; then
 +  CYGWIN_OBJ="sheap.o"
 +  ## Cygwin differs because of its unexec().
 +  PRE_ALLOC_OBJ=
 +  POST_ALLOC_OBJ=lastfile.o
 +else
 +  CYGWIN_OBJ=
 +  PRE_ALLOC_OBJ=lastfile.o
 +  POST_ALLOC_OBJ=
 +fi
 +
 +
 +
 +
 +
  case "$opsys" in
    aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
  
       libs_nsgui=
       headerpad_extra=690
     fi
 -   LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
 +   LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
  
     ## This is here because src/Makefile.in did some extra fiddling around
     ## with LD_SWITCH_SYSTEM.  The cpp logic was:
@@@ -24282,6 -22423,7 +24282,6 @@@ echo "  Does Emacs use imagemagick
  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 GSettings?                               ${HAVE_GSETTINGS}"
  echo "  Does Emacs use -lselinux?                               ${HAVE_LIBSELINUX}"
  echo "  Does Emacs use -lgnutls (2.6.x or higher)?              ${HAVE_GNUTLS}"
  echo "  Does Emacs use -lxml2?                                  ${HAVE_LIBXML2}"
@@@ -24496,24 -22638,18 +24496,24 @@@ if test -z "${gl_GNULIB_ENABLED_be453ce
    as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
  fi
 +<<<<<<< TREE
 +=======
  if test -z "${gl_GNULIB_ENABLED_sigprocmask_TRUE}" && test -z "${gl_GNULIB_ENABLED_sigprocmask_FALSE}"; then
    as_fn_error "conditional \"gl_GNULIB_ENABLED_sigprocmask\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
  fi
 +>>>>>>> MERGE-SOURCE
  if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
    as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
  fi
 +<<<<<<< TREE
 +=======
  if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
    as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
  fi
 +>>>>>>> MERGE-SOURCE
  if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
    as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@@ -24962,7 -23098,7 +24962,7 @@@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wr
  # 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 24.0.90, which was
+ This file was extended by emacs $as_me 24.0.91, which was
  generated by GNU Autoconf 2.65.  Invocation command line was
  
    CONFIG_FILES    = $CONFIG_FILES
@@@ -25028,7 -23164,7 +25028,7 @@@ _ACEO
  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
  ac_cs_version="\\
- emacs config.status 24.0.90
+ emacs config.status 24.0.91
  configured by $0, generated by GNU Autoconf 2.65,
    with options \\"\$ac_cs_config\\"
  
diff --combined configure.in
index 14eec4835d5b82a43e5195b55fa262a1d3dfd58c,54fba2553bbc41d257219607d166857062bd9b1b..db3e2b7ade1058ebcddff6cccba9599efac5f48b
@@@ -22,7 -22,7 +22,7 @@@ dnl  You should have received a copy o
  dnl  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
  
  AC_PREREQ(2.65)
- AC_INIT(emacs, 24.0.90)
+ AC_INIT(emacs, 24.0.91)
  AC_CONFIG_HEADER(src/config.h:src/config.in)
  AC_CONFIG_SRCDIR(src/lisp.h)
  AC_CONFIG_AUX_DIR(build-aux)
@@@ -177,8 -177,6 +177,8 @@@ OPTION_DEFAULT_ON([gsettings],[don't co
  OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support])
  OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
  
 +OPTION_DEFAULT_OFF([xwidgets],[enable use of some gtk widgets it Emacs buffers])
 +
  ## For the times when you want to build Emacs but don't have
  ## a suitable makeinfo, and can live without the manuals.
  dnl http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01844.html
@@@ -1997,54 -1995,6 +1997,54 @@@ if test "${HAVE_GTK}" = "yes"; the
  
  fi
  
 +
 +HAVE_XWIDGETS=no
 +HAVE_WEBKIT=no
 +HAVE_GOOCANVAS=no
 +HAVE_CLUTTER=no
 +if test "${with_xwidgets}" != "no"; then
 +   echo "xwidgets enabled, checking webkit, and others"
 +   HAVE_XWIDGETS=yes
 +   AC_DEFINE(HAVE_XWIDGETS, 1, [Define to 1 if you have xwidgets support.])        
 +#xwidgets
 +#TODO
 +# - enable only if gtk/gtk3 enabled
 +# - webkit, goocanvas, clutter
 +# - only webkit_osr is good so remove plain webkit laterish
 +
 +#webkit version for gtk3. 
 +  WEBKIT_REQUIRED=1.4.0
 +  WEBKIT_MODULES="webkitgtk-3.0 >= $WEBKIT_REQUIRED"
 +
 +  if test "${with_gtk3}" = "yes"; then
 +    PKG_CHECK_MODULES(WEBKIT, $WEBKIT_MODULES, HAVE_WEBKIT=yes, HAVE_WEBKIT=no)
 +    if test $HAVE_WEBKIT = yes; then
 +        AC_DEFINE(HAVE_WEBKIT_OSR, 1, [Define to 1 if you have webkit_osr support.])     
 +    fi
 +  fi
 +
 +  if test "${with_xwdemo}"  = "yes"; then
 +#clutter and goocanvas are just proof of concept so disable for now  
 +  CLUTTER_REQUIRED=1.0.0   
 +  CLUTTER_MODULES="clutter-gtk-1.0 >= $CLUTTER_REQUIRED"
 +
 +  PKG_CHECK_MODULES(CLUTTER, $CLUTTER_MODULES, HAVE_CLUTTER=yes, HAVE_CLUTTER=no)
 +  if test $HAVE_CLUTTER = yes;  then
 +     AC_DEFINE(HAVE_CLUTTER, 1, [Define to 1 if you have clutter support.])
 +  fi
 +
 +
 +  GOOCANVAS_REQUIRED=1.4.0
 +  GOOCANVAS_MODULES="goocanvasgtk-3.0 >= $GOOCANVAS_REQUIRED"
 +
 +  PKG_CHECK_MODULES(GOOCANVAS, $GOOCANVAS_MODULES, HAVE_GOOCANVAS=yes, HAVE_GOOCANVAS=no)
 +  if test $HAVE_GOOCANVAS = yes; then
 +     AC_DEFINE(HAVE_GOOCANVAS, 1, [Define to 1 if you have goocanvas support.])
 +  fi
 +  fi
 +fi
 +
 +
  dnl D-Bus has been tested under GNU/Linux only.  Must be adapted for
  dnl other platforms.  Support for higher D-Bus versions than 1.0 is
  dnl also not configured.
@@@ -3316,7 -3266,7 +3316,7 @@@ TOOLKIT_LIBW
  case "$USE_X_TOOLKIT" in
    MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
    LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
 -  none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
 +  none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS -lXcomposite" ;;
  esac
  AC_SUBST(TOOLKIT_LIBW)
  
@@@ -3779,11 -3729,6 +3779,11 @@@ echo "  Does Emacs use -lotf
  echo "  Does Emacs use -lxft?                                   ${HAVE_XFT}"
  
  echo "  Does Emacs use toolkit scroll bars?                     ${USE_TOOLKIT_SCROLL_BARS}"
 +
 +echo "  Does Emacs support Xwidgets?                            ${HAVE_XWIDGETS}"
 +echo "       Does xwidgets support webkit(requires gtk3)?       ${HAVE_WEBKIT}"
 +echo "       Does xwidgets support clutter(demo code)?          ${HAVE_CLUTTER}"
 +echo "       Does xwidgets support goocanvas(demo code)?        ${HAVE_GOOCANVAS}"
  echo
  
  if test $USE_XASSERTS = yes; then
diff --combined src/xdisp.c
index c3a924d10d4ae5bd43cc01e1b55a80a93e378507,33c5fc0d23015826960dde90af0d278269d3543b..4362d2dc7a9a7d6e39aa6e33f7671196119d454d
@@@ -313,9 -313,7 +313,9 @@@ along with GNU Emacs.  If not, see <htt
  #endif
  
  #include "font.h"
 -
 +#ifdef HAVE_XWIDGETS
 +#include "xwidget.h"
 +#endif
  #ifndef FRAME_X_OUTPUT
  #define FRAME_X_OUTPUT(f) ((f)->output_data.x)
  #endif
@@@ -885,9 -883,6 +885,9 @@@ static int next_element_from_c_string (
  static int next_element_from_buffer (struct it *);
  static int next_element_from_composition (struct it *);
  static int next_element_from_image (struct it *);
 +#ifdef HAVE_XWIDGETS
 +static int next_element_from_xwidget(struct it *);
 +#endif
  static int next_element_from_stretch (struct it *);
  static void load_overlay_strings (struct it *, EMACS_INT);
  static int init_from_display_pos (struct it *, struct window *,
@@@ -4320,9 -4315,6 +4320,9 @@@ handle_display_spec (struct it *it, Lis
    if (CONSP (spec)
        /* Simple specerties.  */
        && !EQ (XCAR (spec), Qimage)
 +#ifdef HAVE_XWIDGETS
 +      && !EQ (XCAR (spec), Qxwidget)
 +#endif
        && !EQ (XCAR (spec), Qspace)
        && !EQ (XCAR (spec), Qwhen)
        && !EQ (XCAR (spec), Qslice)
@@@ -4741,11 -4733,7 +4741,11 @@@ handle_single_display_spec (struct it *
               || ((it ? FRAME_WINDOW_P (it->f) : frame_window_p)
                 && valid_image_p (value))
  #endif /* not HAVE_WINDOW_SYSTEM */
 -             || (CONSP (value) && EQ (XCAR (value), Qspace)));
 +             || (CONSP (value) && EQ (XCAR (value), Qspace))
 +#ifdef HAVE_XWIDGETS
 +             || XWIDGETP(value)
 +#endif
 +             );
  
    if (valid_p && !display_replaced_p)
      {
          *position = it->position = start_pos;
          retval = 1 + (it->area == TEXT_AREA);
        }
 +#ifdef HAVE_XWIDGETS
 +      else if (XWIDGETP(value))
 +      {
 +          //printf("handle_single_display_spec: im an xwidget!!\n");
 +          it->what = IT_XWIDGET;
 +          it->method = GET_FROM_XWIDGET;
 +          it->position = start_pos;
 +        it->object = NILP (object) ? it->w->buffer : object;
 +        *position = start_pos;
 +
 +          it->xwidget = lookup_xwidget(value);
 +      }
 +#endif      
  #ifdef HAVE_WINDOW_SYSTEM
        else
        {
@@@ -5547,11 -5522,6 +5547,11 @@@ push_it (struct it *it, struct text_po
      case GET_FROM_STRETCH:
        p->u.stretch.object = it->object;
        break;
 +#ifdef HAVE_XWIDGETS
 +    case GET_FROM_XWIDGET:
 +      p->u.xwidget.object = it->object;
 +      break;
 +#endif      
      }
    p->position = position ? *position : it->position;
    p->current = it->current;
@@@ -5644,11 -5614,6 +5644,11 @@@ pop_it (struct it *it
        it->object = p->u.image.object;
        it->slice = p->u.image.slice;
        break;
 +#ifdef HAVE_XWIDGETS
 +    case GET_FROM_XWIDGET:
 +      it->object = p->u.xwidget.object;
 +      break;
 +#endif
      case GET_FROM_STRETCH:
        it->object = p->u.stretch.object;
        break;
@@@ -6289,9 -6254,6 +6289,9 @@@ static int (* get_next_element[NUM_IT_M
    next_element_from_c_string,
    next_element_from_image,
    next_element_from_stretch
 +#ifdef HAVE_XWIDGETS
 +  ,next_element_from_xwidget
 +#endif  
  };
  
  #define GET_NEXT_DISPLAY_ELEMENT(it) (*get_next_element[(it)->method]) (it)
@@@ -7093,9 -7055,6 +7093,9 @@@ set_iterator_to_next (struct it *it, in
  
      case GET_FROM_IMAGE:
      case GET_FROM_STRETCH:
 +#ifdef HAVE_XWIDGETS
 +    case GET_FROM_XWIDGET:
 +
        /* The position etc with which we have to proceed are on
         the stack.  The position may be at the end of a string,
           if the `display' property takes up the whole string.  */
        if (it->method == GET_FROM_STRING)
        goto consider_string_end;
        break;
 -
 +#endif
      default:
        /* There are no other methods defined, so this should be a bug.  */
        abort ();
@@@ -7521,19 -7480,6 +7521,19 @@@ next_element_from_image (struct it *it
    return 1;
  }
  
 +#ifdef HAVE_XWIDGETS
 +/* im not sure about this FIXME JAVE*/
 +static int
 +next_element_from_xwidget (struct it *it)
 +{
 +  it->what = IT_XWIDGET;
 +  //assert_valid_xwidget_id(it->xwidget_id,"next_element_from_xwidget");
 +  //this is shaky because why do we set "what" if we dont set the other parts??
 +  //printf("xwidget_id %d: in next_element_from_xwidget: FIXME \n", it->xwidget_id);
 +  return 1;
 +}
 +#endif
 +
  
  /* Fill iterator IT with next display element from a stretch glyph
     property.  IT->object is the value of the text property.  Value is
@@@ -13064,13 -13010,6 +13064,13 @@@ redisplay_internal (void
              *w->desired_matrix->method = 0;
              debug_method_add (w, "optimization 1");
  #endif
 +#if HAVE_XWIDGETS
 +              //debug optimization movement issue
 +              //w->desired_matrix->no_scrolling_p = 1;
 +              //*w->desired_matrix->method = 0;
 +              //debug_method_add (w, "optimization 1");
 +#endif
 +
  #ifdef HAVE_WINDOW_SYSTEM
              update_window_fringes (w, 0);
  #endif
@@@ -14890,8 -14829,6 +14890,6 @@@ try_cursor_movement (Lisp_Object window
                 bidi-reordered rows.  */
              while (MATRIX_ROW_CONTINUATION_LINE_P (row))
                {
-                 xassert (row->enabled_p);
-                 --row;
                  /* If we hit the beginning of the displayed portion
                     without finding the first row of a continued
                     line, give up.  */
                      rc = CURSOR_MOVEMENT_MUST_SCROLL;
                      break;
                    }
+                 xassert (row->enabled_p);
+                 --row;
                }
            }
          if (must_scroll)
@@@ -15961,8 -15899,6 +15960,8 @@@ try_window (Lisp_Object window, struct 
    /* Initialize iterator and info to start at POS.  */
    start_display (&it, w, pos);
  
 +
 +  
    /* Display all lines of W.  */
    while (it.current_y < it.last_visible_y)
      {
        if (fonts_changed_p && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE))
        return 0;
      }
 +#ifdef HAVE_XWIDGETS_xxx
 + //currently this is needed to detect xwidget movement reliably. or probably not.
 +  printf("try_window\n");
 +    return 0;
 +#endif
  
    /* Don't let the cursor end in the scroll margins.  */
    if ((flags & TRY_WINDOW_CHECK_MARGINS)
@@@ -16069,13 -16000,6 +16068,13 @@@ try_window_reusing_current_matrix (stru
      return 0;
  #endif
  
 +#ifdef HAVE_XWIDGETS_xxx
 + //currently this is needed to detect xwidget movement reliably. or probably not.
 +  printf("try_window_reusing_current_matrix\n");
 +    return 0;
 +#endif
 +
 +
    if (/* This function doesn't handle terminal frames.  */
        !FRAME_WINDOW_P (f)
        /* Don't try to reuse the display if windows have been split
@@@ -16843,13 -16767,6 +16842,13 @@@ try_window_id (struct window *w
      return 0;
  #endif
  
 +#ifdef HAVE_XWIDGETS_xxx
 +  //maybe needed for proper xwidget movement
 +    printf("try_window_id\n");
 +    return -1;
 +#endif
 +
 +  
    /* This is handy for debugging.  */
  #if 0
  #define GIVE_UP(X)                                            \
@@@ -17673,29 -17590,6 +17672,29 @@@ dump_glyph (struct glyph_row *row, stru
               glyph->left_box_line_p,
               glyph->right_box_line_p);
      }
 +#ifdef HAVE_XWIDGETS  
 +  else if (glyph->type == XWIDGET_GLYPH)
 +    {
 +      fprintf (stderr,
 +             "  %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n",
 +             glyph - row->glyphs[TEXT_AREA],
 +             'X',
 +             glyph->charpos,
 +             (BUFFERP (glyph->object)
 +              ? 'B'
 +              : (STRINGP (glyph->object)
 +                 ? 'S'
 +                 : '-')),
 +             glyph->pixel_width,
 +             glyph->u.xwidget,
 +             '.',
 +             glyph->face_id,
 +             glyph->left_box_line_p,
 +             glyph->right_box_line_p);
 +
 +      //      printf("dump xwidget glyph\n");
 +    }
 +#endif  
  }
  
  
@@@ -21900,13 -21794,6 +21899,13 @@@ calc_pixel_width_or_height (double *res
  
              return OK_PIXELS (width_p ? img->width : img->height);
            }
 +#ifdef HAVE_XWIDGETS
 +        if (FRAME_WINDOW_P (it->f) && valid_xwidget_p (prop))
 +          {
 +              printf("calc_pixel_width_or_height: return dummy size FIXME\n");
 +              return OK_PIXELS (width_p ? 100 : 100);
 +            }
 +#endif          
  #endif
          if (EQ (car, Qplus) || EQ (car, Qminus))
            {
@@@ -22403,20 -22290,7 +22402,20 @@@ fill_image_glyph_string (struct glyph_s
    s->ybase += s->first_glyph->voffset;
  }
  
 -
 +#ifdef HAVE_XWIDGETS
 +static void
 +fill_xwidget_glyph_string (struct glyph_string *s)
 +{
 +  xassert (s->first_glyph->type == XWIDGET_GLYPH);
 +  printf("fill_xwidget_glyph_string: width:%d \n",s->first_glyph->pixel_width);
 +  s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id);
 +  s->font = s->face->font;
 +  s->width = s->first_glyph->pixel_width;
 +  s->ybase += s->first_glyph->voffset;
 +  s->xwidget = s->first_glyph->u.xwidget;
 +  //assert_valid_xwidget_id ( s->xwidget, "fill_xwidget_glyph_string");
 +}
 +#endif
  /* Fill glyph string S from a sequence of stretch glyphs.
  
     START is the index of the first glyph to consider,
@@@ -22748,21 -22622,6 +22747,21 @@@ compute_overhangs_and_x (struct glyph_s
         }                                                              \
       while (0)
  
 +#ifdef HAVE_XWIDGETS
 +#define BUILD_XWIDGET_GLYPH_STRING(START, END, HEAD, TAIL, HL, X, LAST_X) \
 +     do                                                                       \
 +       { \
 +         printf("BUILD_XWIDGET_GLYPH_STRING\n");                                                      \
 +       s = (struct glyph_string *) alloca (sizeof *s);                \
 +       INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL);          \
 +       fill_xwidget_glyph_string (s);                                 \
 +       append_glyph_string (&HEAD, &TAIL, s);                         \
 +       ++START;                                                       \
 +         s->x = (X);                                                  \
 +       }                                                              \
 +     while (0)
 +#endif
 +
  
  /* Add a glyph string for a sequence of character glyphs to the list
     of strings between HEAD and TAIL.  START is the index of the first
              BUILD_IMAGE_GLYPH_STRING (START, END, HEAD, TAIL,         \
                                        HL, X, LAST_X);                 \
              break;                                                    \
 +            case XWIDGET_GLYPH:                                         \
 +              BUILD_XWIDGET_GLYPH_STRING (START, END, HEAD, TAIL,       \
 +                                          HL, X, LAST_X);               \
 +              break;                                                    \
 +                                                                        \
                                                                        \
            case GLYPHLESS_GLYPH:                                       \
              BUILD_GLYPHLESS_GLYPH_STRING (START, END, HEAD, TAIL,     \
@@@ -23533,89 -23387,6 +23532,89 @@@ produce_image_glyph (struct it *it
      }
  }
  
 +#ifdef HAVE_XWIDGETS
 +static void
 +produce_xwidget_glyph (struct it *it)
 +{
 +  struct xwidget* xw;
 +  struct face *face;
 +  int glyph_ascent, crop;
 +  printf("produce_xwidget_glyph:\n");
 +  xassert (it->what == IT_XWIDGET);
 +
 +  face = FACE_FROM_ID (it->f, it->face_id);
 +  xassert (face);
 +  /* Make sure X resources of the face is loaded.  */
 +  PREPARE_FACE_FOR_DISPLAY (it->f, face);
 +
 +  xw = it->xwidget;
 +  it->ascent = it->phys_ascent = glyph_ascent = xw->height/2;
 +  it->descent = xw->height/2;
 +  it->phys_descent = it->descent;
 +  it->pixel_width = xw->width;
 +  /* It's quite possible for images to have an ascent greater than
 +     their height, so don't get confused in that case.  */
 +  if (it->descent < 0)
 +    it->descent = 0;
 +
 +  it->nglyphs = 1;
 +
 +  if (face->box != FACE_NO_BOX)
 +    {
 +      if (face->box_line_width > 0)
 +      {
 +          it->ascent += face->box_line_width;
 +          it->descent += face->box_line_width;
 +      }
 +
 +      if (it->start_of_box_run_p)
 +      it->pixel_width += eabs (face->box_line_width);
 +      it->pixel_width += eabs (face->box_line_width);
 +    }
 +
 +  take_vertical_position_into_account (it);
 +
 +  /* Automatically crop wide image glyphs at right edge so we can
 +     draw the cursor on same display row.  */
 +  if ((crop = it->pixel_width - (it->last_visible_x - it->current_x), crop > 0)
 +      && (it->hpos == 0 || it->pixel_width > it->last_visible_x / 4))
 +    {
 +      it->pixel_width -= crop;
 +    }
 +
 +  if (it->glyph_row)
 +    {
 +      struct glyph *glyph;
 +      enum glyph_row_area area = it->area;
 +
 +      glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
 +      if (glyph < it->glyph_row->glyphs[area + 1])
 +      {
 +        glyph->charpos = CHARPOS (it->position);
 +        glyph->object = it->object;
 +        glyph->pixel_width = it->pixel_width;
 +        glyph->ascent = glyph_ascent;
 +        glyph->descent = it->descent;
 +        glyph->voffset = it->voffset;
 +        glyph->type = XWIDGET_GLYPH;
 +
 +        glyph->multibyte_p = it->multibyte_p;
 +        glyph->left_box_line_p = it->start_of_box_run_p;
 +        glyph->right_box_line_p = it->end_of_box_run_p;
 +        glyph->overlaps_vertically_p = 0;
 +          glyph->padding_p = 0;
 +        glyph->glyph_not_available_p = 0;
 +        glyph->face_id = it->face_id;
 +          glyph->u.xwidget = it->xwidget;
 +          //assert_valid_xwidget_id(glyph->u.xwidget_id,"produce_xwidget_glyph");
 +        glyph->font_type = FONT_TYPE_UNKNOWN;
 +        ++it->glyph_row->used[area];
 +      }
 +      else
 +      IT_EXPAND_MATRIX_WIDTH (it, area);
 +    }
 +}
 +#endif
  
  /* Append a stretch glyph to IT->glyph_row.  OBJECT is the source
     of the glyph, WIDTH and HEIGHT are the width and height of the
@@@ -24840,10 -24611,7 +24839,10 @@@ x_produce_glyphs (struct it *it
      produce_image_glyph (it);
    else if (it->what == IT_STRETCH)
      produce_stretch_glyph (it);
 -
 +#ifdef HAVE_XWIDGETS
 +  else if (it->what == IT_XWIDGET)
 +    produce_xwidget_glyph (it);
 +#endif
   done:
    /* Accumulate dimensions.  Note: can't assume that it->descent > 0
       because this isn't true for images with `:ascent 100'.  */
@@@ -25204,13 -24972,6 +25203,13 @@@ get_window_cursor_type (struct window *
    /* Use normal cursor if not blinked off.  */
    if (!w->cursor_off_p)
      {
 +
 +#ifdef HAVE_XWIDGETS      
 +      if (glyph != NULL && glyph->type == XWIDGET_GLYPH){
 +        //printf("attempt xwidget cursor avoidance in get_window_cursor_type\n");
 +        return NO_CURSOR;
 +      }
 +#endif      
        if (glyph != NULL && glyph->type == IMAGE_GLYPH)
        {
          if (cursor_type == FILLED_BOX_CURSOR)
diff --combined src/xterm.c
index 128a274ff108f79426aebbd910a759b8f6ba04c9,fb77faa75fef755974001f0d15f81b9e164d518e..49a21d683d46875ccd42f6316497f61c9d1fab00
@@@ -62,9 -62,6 +62,9 @@@ along with GNU Emacs.  If not, see <htt
  #include "coding.h"
  #include "frame.h"
  #include "dispextern.h"
 +#ifdef HAVE_XWIDGETS
 +#include "xwidget.h"
 +#endif
  #include "fontset.h"
  #include "termhooks.h"
  #include "termopts.h"
@@@ -96,6 -93,9 +96,9 @@@
  
  #ifdef USE_GTK
  #include "gtkutil.h"
+ #ifdef HAVE_GTK3
+ #include <X11/Xproto.h>
+ #endif
  #endif
  
  #ifdef USE_LUCID
@@@ -346,7 -346,7 +349,7 @@@ static void x_scroll_bar_report_motion 
                                          enum scroll_bar_part *,
                                          Lisp_Object *, Lisp_Object *,
                                          Time *);
- static void x_handle_net_wm_state (struct frame *, XPropertyEvent *);
+ static int x_handle_net_wm_state (struct frame *, XPropertyEvent *);
  static void x_check_fullscreen (struct frame *);
  static void x_check_expected_move (struct frame *, int, int);
  static void x_sync_with_move (struct frame *, int, int, int);
@@@ -2717,13 -2717,7 +2720,13 @@@ x_draw_glyph_string (struct glyph_strin
      case IMAGE_GLYPH:
        x_draw_image_glyph_string (s);
        break;
 -
 +#ifdef HAVE_XWIDGETS
 +    case XWIDGET_GLYPH:
 +      //erase xwidget background
 +      //x_draw_glyph_string_background (s, 0);
 +      x_draw_xwidget_glyph_string (s);
 +      break;
 +#endif
      case STRETCH_GLYPH:
        x_draw_stretch_glyph_string (s);
        break;
@@@ -6122,7 -6116,19 +6125,19 @@@ handle_one_xevent (struct x_display_inf
        last_user_time = event.xproperty.time;
        f = x_top_window_to_frame (dpyinfo, event.xproperty.window);
        if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state)
-         x_handle_net_wm_state (f, &event.xproperty);
+         if (x_handle_net_wm_state (f, &event.xproperty) && f->iconified)
+           {
+             /* Gnome shell does not iconify us when C-z is pressed.  It hides
+                the frame.  So if our state says we aren't hidden anymore,
+                treat is as deiconfied.  */
+             if (! f->async_iconified)
+               SET_FRAME_GARBAGED (f);
+             f->async_visible = 1;
+             f->async_iconified = 0;
+             f->output_data.x->has_been_visible = 1;
+             inev.ie.kind = DEICONIFY_EVENT;
+             XSETFRAME (inev.ie.frame_or_window, f);
+           }
  
        x_handle_property_notify (&event.xproperty);
        xft_settings_event (dpyinfo, &event);
@@@ -7303,12 -7309,7 +7318,12 @@@ x_draw_bar_cursor (struct window *w, st
    cursor_glyph = get_phys_cursor_glyph (w);
    if (cursor_glyph == NULL)
      return;
 -
 +#ifdef HAVE_XWIDGETS  
 +  if (cursor_glyph->type == XWIDGET_GLYPH){
 +    printf("tried avoiding xwidget cursor\n");
 +    return; //experimental avoidance of cursor on xwidget
 +  }
 +#endif  
    /* If on an image, draw like a normal cursor.  That's usually better
       visible than drawing a bar, esp. if the image is large so that
       the bar might not be in the window.  */
@@@ -7871,6 -7872,15 +7886,15 @@@ static void x_error_quitter (Display *
  static int
  x_error_handler (Display *display, XErrorEvent *event)
  {
+ #ifdef HAVE_GTK3
+   if (event->error_code == BadMatch
+       && event->request_code == X_SetInputFocus
+       && event->minor_code == 0)
+     {
+       return 0;
+     }
+ #endif
    if (x_error_message)
      x_error_catcher (display, event);
    else
@@@ -8429,9 -8439,11 +8453,11 @@@ x_set_sticky (struct frame *f, Lisp_Obj
  
  /* Return the current _NET_WM_STATE.
     SIZE_STATE is set to one of the FULLSCREEN_* values.
-    STICKY is set to 1 if the sticky state is set, 0 if not.  */
+    STICKY is set to 1 if the sticky state is set, 0 if not.
  
- static void
+    Return non-zero if we are not hidden, zero if we are.  */
+ static int
  get_current_wm_state (struct frame *f,
                        Window window,
                        int *size_state,
  {
    Atom actual_type;
    unsigned long actual_size, bytes_remaining;
-   int i, rc, actual_format;
+   int i, rc, actual_format, is_hidden = 0;
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
    long max_len = 65536;
    Display *dpy = FRAME_X_DISPLAY (f);
        if (tmp_data) XFree (tmp_data);
        x_uncatch_errors ();
        UNBLOCK_INPUT;
-       return;
+       return ! f->iconified;
      }
  
    x_uncatch_errors ();
    for (i = 0; i < actual_size; ++i)
      {
        Atom a = ((Atom*)tmp_data)[i];
-       if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
+       if (a == dpyinfo->Xatom_net_wm_state_hidden)
+         is_hidden = 1;
+       else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
          {
            if (*size_state == FULLSCREEN_HEIGHT)
              *size_state = FULLSCREEN_MAXIMIZED;
  
    if (tmp_data) XFree (tmp_data);
    UNBLOCK_INPUT;
+   return ! is_hidden;
  }
  
  /* Do fullscreen as specified in extended window manager hints */
@@@ -8502,7 -8517,7 +8531,7 @@@ do_ewmh_fullscreen (struct frame *f
    int have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state);
    int cur, dummy;
  
-   get_current_wm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy);
+   (void)get_current_wm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy);
  
    /* Some window managers don't say they support _NET_WM_STATE, but they do say
       they support _NET_WM_STATE_FULLSCREEN.  Try that also.  */
@@@ -8577,14 -8592,14 +8606,14 @@@ XTfullscreen_hook (FRAME_PTR f
  }
  
  
- static void
+ static int
  x_handle_net_wm_state (struct frame *f, XPropertyEvent *event)
  {
    int value = FULLSCREEN_NONE;
    Lisp_Object lval;
    int sticky = 0;
+   int not_hidden = get_current_wm_state (f, event->window, &value, &sticky);
  
-   get_current_wm_state (f, event->window, &value, &sticky);
    lval = Qnil;
    switch (value)
      {
  
    store_frame_param (f, Qfullscreen, lval);
    store_frame_param (f, Qsticky, sticky ? Qt : Qnil);
+   return not_hidden;
  }
  
  /* Check if we need to resize the frame due to a fullscreen request.
@@@ -9287,7 -9304,7 +9318,7 @@@ x_iconify_frame (struct frame *f
    if (!NILP (type))
      x_bitmap_icon (f, type);
  
- #ifdef USE_GTK
+ #if defined (USE_GTK)
    if (FRAME_GTK_OUTER_WIDGET (f))
      {
        if (! FRAME_VISIBLE_P (f))
@@@ -9933,11 -9950,7 +9964,11 @@@ x_term_init (Lisp_Object display_name, 
             https://bugzilla.gnome.org/show_bug.cgi?id=563627.  */
          id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
                                    | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
 +#ifdef HAVE_CLUTTER
 +        gtk_clutter_init (&argc, &argv2);
 +#else
          gtk_init (&argc, &argv2);
 +#endif
          g_log_remove_handler ("GLib", id);
  
          /* gtk_init does set_locale.  We must fix locale after calling it.  */
        { "_NET_WM_STATE_MAXIMIZED_VERT",
          &dpyinfo->Xatom_net_wm_state_maximized_vert },
        { "_NET_WM_STATE_STICKY", &dpyinfo->Xatom_net_wm_state_sticky },
+       { "_NET_WM_STATE_HIDDEN", &dpyinfo->Xatom_net_wm_state_hidden },
        { "_NET_WM_WINDOW_TYPE", &dpyinfo->Xatom_net_window_type },
        { "_NET_WM_WINDOW_TYPE_TOOLTIP",
          &dpyinfo->Xatom_net_window_type_tooltip },