]> code.delx.au - gnu-emacs/commitdiff
upstream
authorJoakim Verona <joakim@verona.se>
Mon, 30 Jul 2012 22:00:41 +0000 (00:00 +0200)
committerJoakim Verona <joakim@verona.se>
Mon, 30 Jul 2012 22:00:41 +0000 (00:00 +0200)
1  2 
autogen/configure
configure.ac
src/Makefile.in
src/keyboard.c
src/lisp.h
src/xdisp.c

diff --combined autogen/configure
index 3e2ab80aa309dd456aaea33689bca1d0264ef7d7,b52d3157b100fccf391d6a16880d2eaf2f1a805d..795a30ac8210cb39b46da22a24c7b524a3a60e09
@@@ -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,21 -614,19 +663,21 @@@ 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
 +<<<<<<< TREE
 +=======
 +gl_GNULIB_ENABLED_sigprocmask_FALSE
 +gl_GNULIB_ENABLED_sigprocmask_TRUE
  gl_GNULIB_ENABLED_pathmax_FALSE
  gl_GNULIB_ENABLED_pathmax_TRUE
 +>>>>>>> MERGE-SOURCE
  gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
  gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
  gl_GNULIB_ENABLED_dosname_FALSE
  gl_GNULIB_ENABLED_dosname_TRUE
  LTLIBINTL
  LIBINTL
 -WINDOWS_64_BIT_OFF_T
  HAVE_UNISTD_H
  NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
  NEXT_UNISTD_H
@@@ -686,9 -635,6 +686,9 @@@ SYS_TIME_H_DEFINES_STRUCT_TIMESPE
  TIME_H_DEFINES_STRUCT_TIMESPEC
  NEXT_AS_FIRST_DIRECTIVE_TIME_H
  NEXT_TIME_H
 +WINDOWS_64_BIT_OFF_T
 +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
 +NEXT_SYS_TYPES_H
  WINDOWS_64_BIT_ST_SIZE
  NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
  NEXT_SYS_STAT_H
@@@ -725,11 -671,14 +725,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
@@@ -767,6 -716,7 +767,6 @@@ GNULIB_PRINTF_POSI
  GNULIB_PRINTF
  GNULIB_POPEN
  GNULIB_PERROR
 -GNULIB_PCLOSE
  GNULIB_OBSTACK_PRINTF_POSIX
  GNULIB_OBSTACK_PRINTF
  GNULIB_GETLINE
@@@ -790,6 -740,7 +790,6 @@@ GNULIB_FOPE
  GNULIB_FGETS
  GNULIB_FGETC
  GNULIB_FFLUSH
 -GNULIB_FDOPEN
  GNULIB_FCLOSE
  GNULIB_DPRINTF
  NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
@@@ -808,8 -759,6 +808,8 @@@ GL_GENERATE_STDARG_H_TRU
  STDARG_H
  NEXT_AS_FIRST_DIRECTIVE_STDARG_H
  NEXT_STDARG_H
 +<<<<<<< TREE
 +=======
  GL_GENERATE_STDALIGN_H_FALSE
  GL_GENERATE_STDALIGN_H_TRUE
  STDALIGN_H
@@@ -832,7 -781,14 +832,7 @@@ GNULIB_SIGPROCMAS
  GNULIB_SIGNAL_H_SIGPIPE
  GNULIB_RAISE
  GNULIB_PTHREAD_SIGMASK
 -HAVE_SYS_SELECT_H
 -NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
 -NEXT_SYS_SELECT_H
 -REPLACE_SELECT
 -REPLACE_PSELECT
 -HAVE_PSELECT
 -GNULIB_SELECT
 -GNULIB_PSELECT
 +>>>>>>> MERGE-SOURCE
  REPLACE_TIMEGM
  REPLACE_NANOSLEEP
  REPLACE_MKTIME
@@@ -877,6 -833,7 +877,6 @@@ GNULIB_LSTA
  GNULIB_LCHMOD
  GNULIB_FUTIMENS
  GNULIB_FSTATAT
 -GNULIB_FSTAT
  GNULIB_FCHMODAT
  NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
  NEXT_INTTYPES_H
@@@ -922,6 -879,15 +922,6 @@@ HAVE_INTTYPES_
  HAVE_WCHAR_H
  HAVE_UNSIGNED_LONG_LONG_INT
  HAVE_LONG_LONG_INT
 -HAVE_WINSOCK2_H
 -NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
 -NEXT_SYS_TIME_H
 -REPLACE_STRUCT_TIMEVAL
 -REPLACE_GETTIMEOFDAY
 -HAVE_SYS_TIME_H
 -HAVE_STRUCT_TIMEVAL
 -HAVE_GETTIMEOFDAY
 -GNULIB_GETTIMEOFDAY
  GNULIB_GL_UNISTD_H_GETOPT
  GETOPT_H
  HAVE_GETOPT_H
@@@ -1043,6 -1009,7 +1043,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
@@@ -1068,6 -1035,7 +1068,6 @@@ HAVE_GETGROUP
  HAVE_GETDTABLESIZE
  HAVE_FTRUNCATE
  HAVE_FSYNC
 -HAVE_FDATASYNC
  HAVE_FCHOWNAT
  HAVE_FCHDIR
  HAVE_FACCESSAT
@@@ -1111,6 -1079,7 +1111,6 @@@ GNULIB_GETDOMAINNAM
  GNULIB_GETCWD
  GNULIB_FTRUNCATE
  GNULIB_FSYNC
 -GNULIB_FDATASYNC
  GNULIB_FCHOWNAT
  GNULIB_FCHDIR
  GNULIB_FACCESSAT
@@@ -1118,16 -1087,17 +1118,16 @@@ GNULIB_EUIDACCES
  GNULIB_ENVIRON
  GNULIB_DUP3
  GNULIB_DUP2
 -GNULIB_DUP
  GNULIB_CLOSE
  GNULIB_CHOWN
 -GNULIB_CHDIR
 -LIB_CLOCK_GETTIME
  GL_GENERATE_ALLOCA_H_FALSE
  GL_GENERATE_ALLOCA_H_TRUE
  ALLOCA_H
  ALLOCA
  GL_COND_LIBTOOL_FALSE
  GL_COND_LIBTOOL_TRUE
 +<<<<<<< TREE
 +=======
  POST_ALLOC_OBJ
  PRE_ALLOC_OBJ
  CYGWIN_OBJ
@@@ -1162,6 -1132,7 +1162,6 @@@ etcdi
  x_default_search_path
  lisppath
  locallisppath
 -standardlisppath
  leimdir
  lispdir
  srcdir
@@@ -1177,7 -1148,6 +1177,7 @@@ LIBRESOL
  LIBHESIOD
  TERMCAP_OBJ
  LIBS_TERMCAP
 +>>>>>>> MERGE-SOURCE
  BLESSMAIL_TARGET
  LIBS_MAIL
  liblockfile
@@@ -1205,8 -1175,12 +1205,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
@@@ -1236,14 -1210,9 +1236,14 @@@ ALSA_LIB
  ALSA_CFLAGS
  LIBSOUND
  PKG_CONFIG
 +<<<<<<< TREE
 +LIBSOUND
 +=======
  CRT_DIR
 +>>>>>>> MERGE-SOURCE
  START_FILES
  LIB_MATH
 +CRT_DIR
  LIBS_SYSTEM
  C_SWITCH_SYSTEM
  UNEXEC_OBJ
@@@ -1291,6 -1260,7 +1291,6 @@@ build_cp
  build
  PROFILING_CFLAGS
  GZIP_INFO
 -cache_file
  am__untar
  am__tar
  AMTAR
@@@ -1386,6 -1356,7 +1386,6 @@@ with_n
  with_gpm
  with_dbus
  with_gconf
 -with_gsettings
  with_selinux
  with_gnutls
  with_makeinfo
@@@ -1395,7 -1366,6 +1395,7 @@@ with_crt_di
  with_gameuser
  with_gnustep_conf
  enable_ns_self_contained
 +enable_asserts
  enable_locallisppath
  enable_checking
  enable_check_lisp_object_type
@@@ -1404,6 -1374,7 +1404,6 @@@ enable_autodepen
  enable_dependency_tracking
  enable_largefile
  enable_gcc_warnings
 -enable_link_time_optimization
  with_x
  '
        ac_precious_vars='build_alias
@@@ -2041,13 -2012,6 +2041,13 @@@ Optional Features
    --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
    --disable-ns-self-contained
                            disable self contained build under NeXTstep
 +  --enable-asserts        compile code with asserts enabled
 +<<<<<<< TREE
 +  --enable-maintainer-mode
 +                          enable make rules and dependencies not useful (and
 +                          sometimes confusing) to the casual installer
 +=======
 +>>>>>>> MERGE-SOURCE
    --enable-locallisppath=PATH
                            directories Emacs should search for lisp files
                            specific to this site
                            enable expensive run-time checks. With LIST, enable
                            only specific categories of checks. Categories are:
                            all,yes,no. Flags are: stringbytes, stringoverrun,
 -                          stringfreelist, xmallocoverrun, conslist, glyphs
 +                          stringfreelist, xmallocoverrun, conslist
    --enable-check-lisp-object-type
                            enable compile time checks for the Lisp_Object data
                            type. This is useful for development for catching
    --disable-dependency-tracking  speeds up one-time build
    --enable-dependency-tracking   do not reject slow dependency extractors
    --disable-largefile     omit support for large files
 -  --enable-gcc-warnings   turn on lots of GCC warnings. This is intended for
 -                          developers, and may generate false alarms when used
 -                          with older or non-GNU development tools.
 -  --enable-link-time-optimization
 -                          build emacs with link-time optimization. This is
 -                          supported only for GCC since 4.5.0.
 +  --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
  
  Optional Packages:
    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
                            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
@@@ -2684,68 -2654,6 +2684,68 @@@ $as_echo "$ac_res" >&6; 
  
  } # ac_fn_c_check_func
  
 +<<<<<<< TREE
 +<<<<<<< TREE
 +=======
 +# 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
 +
 +=======
 +>>>>>>> MERGE-SOURCE
  # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
  # -------------------------------------------
  # Tests whether TYPE exists after having included INCLUDES, setting cache
@@@ -2800,7 -2708,6 +2800,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
@@@ -2978,60 -2885,6 +2978,60 @@@ 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.
@@@ -3315,9 -3168,6 +3315,9 @@@ $as_echo "$as_me: creating cache $cache
    >$cache_file
  fi
  
 +as_fn_append ac_header_list " sys/select.h"
 +as_fn_append ac_header_list " sys/time.h"
 +as_fn_append ac_header_list " utime.h"
  as_fn_append ac_header_list " linux/version.h"
  as_fn_append ac_header_list " sys/systeminfo.h"
  as_fn_append ac_header_list " stdio_ext.h"
@@@ -3338,80 -3188,34 +3338,80 @@@ as_fn_append ac_header_list " sys/param
  as_fn_append ac_header_list " pthread.h"
  as_fn_append ac_header_list " malloc/malloc.h"
  as_fn_append ac_header_list " maillock.h"
 +as_fn_append ac_func_list " gethostname"
 +as_fn_append ac_func_list " rename"
 +as_fn_append ac_func_list " closedir"
 +as_fn_append ac_func_list " mkdir"
 +as_fn_append ac_func_list " rmdir"
 +as_fn_append ac_func_list " getrusage"
 +as_fn_append ac_func_list " get_current_dir_name"
 +as_fn_append ac_func_list " random"
 +as_fn_append ac_func_list " lrand48"
 +as_fn_append ac_func_list " logb"
 +as_fn_append ac_func_list " frexp"
 +as_fn_append ac_func_list " fmod"
 +as_fn_append ac_func_list " rint"
 +as_fn_append ac_func_list " cbrt"
 +as_fn_append ac_func_list " setsid"
 +as_fn_append ac_func_list " strerror"
 +as_fn_append ac_func_list " fpathconf"
 +as_fn_append ac_func_list " select"
 +as_fn_append ac_func_list " euidaccess"
 +as_fn_append ac_func_list " getpagesize"
 +as_fn_append ac_func_list " setlocale"
 +as_fn_append ac_func_list " utimes"
 +as_fn_append ac_func_list " getrlimit"
 +as_fn_append ac_func_list " setrlimit"
 +as_fn_append ac_func_list " setpgid"
 +as_fn_append ac_func_list " getcwd"
 +as_fn_append ac_func_list " getwd"
 +as_fn_append ac_func_list " shutdown"
 +as_fn_append ac_func_list " getaddrinfo"
 +as_fn_append ac_func_list " __fpending"
 +as_fn_append ac_func_list " strsignal"
 +as_fn_append ac_func_list " setitimer"
 +as_fn_append ac_func_list " sendto"
 +as_fn_append ac_func_list " recvfrom"
 +as_fn_append ac_func_list " getsockname"
 +as_fn_append ac_func_list " getpeername"
 +as_fn_append ac_func_list " getifaddrs"
 +as_fn_append ac_func_list " freeifaddrs"
 +as_fn_append ac_func_list " gai_strerror"
 +as_fn_append ac_func_list " mkstemp"
 +as_fn_append ac_func_list " getline"
 +as_fn_append ac_func_list " getdelim"
 +as_fn_append ac_func_list " fsync"
 +as_fn_append ac_func_list " sync"
 +as_fn_append ac_func_list " difftime"
 +as_fn_append ac_func_list " posix_memalign"
 +as_fn_append ac_func_list " getpwent"
 +as_fn_append ac_func_list " endpwent"
 +as_fn_append ac_func_list " getgrent"
 +as_fn_append ac_func_list " endgrent"
 +as_fn_append ac_func_list " touchlock"
 +as_fn_append ac_func_list " cfmakeraw"
 +as_fn_append ac_func_list " cfsetspeed"
 +as_fn_append ac_func_list " copysign"
 +as_fn_append ac_func_list " __executable_start"
  as_fn_append ac_header_list " sys/un.h"
 +as_fn_append ac_func_list " grantpt"
 +as_fn_append ac_func_list " getpt"
  as_fn_append ac_func_list " tzset"
 +as_fn_append ac_func_list " snprintf"
  as_fn_append ac_func_list " readlinkat"
  gl_getopt_required=GNU
  as_fn_append ac_header_list " getopt.h"
 -as_fn_append ac_func_list " gettimeofday"
 -as_fn_append ac_func_list " nanotime"
 -as_fn_append ac_header_list " sys/time.h"
  as_fn_append ac_header_list " wchar.h"
  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_header_list " sys/select.h"
 -as_fn_append ac_func_list " pselect"
 -as_fn_append ac_func_list " pthread_sigmask"
  as_fn_append ac_func_list " readlink"
  as_fn_append ac_func_list " strtoimax"
  as_fn_append ac_func_list " strtoumax"
  as_fn_append ac_func_list " symlink"
  as_fn_append ac_header_list " sys/stat.h"
  as_fn_append ac_func_list " localtime_r"
 -as_fn_append ac_header_list " utime.h"
 -as_fn_append ac_func_list " futimes"
 -as_fn_append ac_func_list " futimesat"
 -as_fn_append ac_func_list " futimens"
 -as_fn_append ac_func_list " utimensat"
 -as_fn_append ac_func_list " lutimes"
  # Check that the precious variables saved in the cache have kept the same
  # value.
  ac_cache_corrupted=false
@@@ -3990,9 -3794,10 +3990,9 @@@ am__tar='${AMTAR} chof - "$$tardir"'; a
  
  lispdir='${datadir}/emacs/${version}/lisp'
  leimdir='${datadir}/emacs/${version}/leim'
 -standardlisppath='${lispdir}:${leimdir}'
  locallisppath='${datadir}/emacs/${version}/site-lisp:'\
  '${datadir}/emacs/site-lisp'
 -lisppath='${locallisppath}:${standardlisppath}'
 +lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
  etcdir='${datadir}/emacs/${version}/etc'
  archlibdir='${libexecdir}/emacs/${version}/${configuration}'
  docdir='${datadir}/emacs/${version}/etc'
@@@ -4305,6 -4110,14 +4305,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;
@@@ -4332,6 -4145,9 +4332,6 @@@ els
  fi
  
  
 -## Makefile.in needs the cache file name.
 -
 -
  ## This is an option because I do not know if all info/man support
  ## compressed files, nor how to test if they do so.
  
  fi
  
  
 +# Check whether --enable-asserts was given.
 +if test "${enable_asserts+set}" = set; then :
 +  enableval=$enable_asserts; USE_XASSERTS=$enableval
 +else
 +  USE_XASSERTS=no
 +fi
 +
 +
  # Check whether --enable-locallisppath was given.
  if test "${enable_locallisppath+set}" = set; then :
    enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
                        ac_gc_check_string_overrun= ;
                        ac_gc_check_string_free_list= ;
                        ac_xmalloc_overrun= ;
 -                      ac_gc_check_cons_list= ;
 -                      ac_glyphs_debug= ;;
 +                      ac_gc_check_cons_list= ;;
        all)            ac_enable_checking=1 ;
                        ac_gc_check_stringbytes=1 ;
                        ac_gc_check_string_overrun=1 ;
                        ac_gc_check_string_free_list=1 ;
                        ac_xmalloc_overrun=1 ;
 -                      ac_gc_check_cons_list=1 ;
 -                      ac_glyphs_debug=1 ;;
 +                      ac_gc_check_cons_list=1 ;;
        # these enable particular checks
        stringbytes)    ac_gc_check_stringbytes=1 ;;
        stringoverrun)  ac_gc_check_string_overrun=1 ;;
        stringfreelist) ac_gc_check_string_free_list=1 ;;
        xmallocoverrun) ac_xmalloc_overrun=1 ;;
        conslist)       ac_gc_check_cons_list=1 ;;
 -      glyphs)         ac_glyphs_debug=1 ;;
        *)      as_fn_error "unknown check category $check" "$LINENO" 5 ;;
        esac
  done
@@@ -4480,6 -4291,11 +4480,6 @@@ if test x$ac_gc_check_cons_list != x ; 
  
  $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
  
 -fi
 -if test x$ac_glyphs_debug != x ; then
 -
 -$as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
 -
  fi
  
  # Check whether --enable-check-lisp-object-type was given.
@@@ -4705,7 -4521,7 +4705,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 alloca-opt:
    # Code from module allocator:
 -  # Code from module c-ctype:
 -  # Code from module c-strcase:
    # Code from module careadlinkat:
 -  # Code from module clock-time:
    # Code from module crypto/md5:
    # Code from module crypto/sha1:
    # Code from module crypto/sha256:
    # Code from module crypto/sha512:
    # Code from module dosname:
    # Code from module dtoastr:
 -  # Code from module dtotimespec:
    # Code from module dup2:
+   # Code from module environ:
    # Code from module extensions:
  
    # Code from module filemode:
    # Code from module getopt-gnu:
    # Code from module getopt-posix:
    # Code from module gettext-h:
 -  # Code from module gettime:
 -  # Code from module gettimeofday:
    # Code from module ignore-value:
    # Code from module include_next:
    # Code from module intprops:
    # Code from module manywarnings:
    # Code from module mktime:
    # Code from module multiarch:
 +<<<<<<< TREE
 +=======
    # Code from module nocrash:
    # Code from module pathmax:
 -  # Code from module pselect:
    # 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 stat-time:
    # Code from module stdalign:
    # Code from module stdarg:
  
    # 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:
 -  # Code from module sys_select:
    # Code from module sys_stat:
 -  # Code from module sys_time:
 +  # Code from module sys_types:
    # Code from module time:
    # Code from module time_r:
 -  # Code from module timespec:
 -  # Code from module timespec-add:
 -  # Code from module timespec-sub:
    # Code from module u64:
    # Code from module unistd:
 -  # Code from module utimens:
    # Code from module verify:
    # Code from module warnings:
  
@@@ -7201,6 -7026,49 +7202,6 @@@ els
  fi
  
  
 -# Check whether --enable-link-time-optimization was given.
 -if test "${enable_link_time_optimization+set}" = set; then :
 -  enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
 -   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
 -$as_echo_n "checking whether link-time optimization is supported... " >&6; }
 -   ac_lto_supported=no
 -   if test x$GCC = xyes; then
 -      CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
 -      if test x$CPUS != x; then
 -               LTO="-flto=$CPUS"
 -      else
 -       LTO="-flto"
 -      fi
 -      old_CFLAGS=$CFLAGS
 -      CFLAGS="$CFLAGS $LTO"
 -      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -
 -int
 -main ()
 -{
 -
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  ac_lto_supported=yes
 -else
 -  ac_lto_supported=no
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -      CFLAGS="$old_CFLAGS"
 -   fi
 -   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
 -$as_echo "$ac_lto_supported" >&6; }
 -   if test "$ac_lto_supported" = "yes"; then
 -      CFLAGS="$CFLAGS $LTO"
 -   fi
 -fi
 -fi
 -
 -
  # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
  # ------------------------------------------------
  # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
    nw="$nw -Wsign-conversion"        # Too many warnings for now
    nw="$nw -Woverlength-strings"     # Not a problem these days
    nw="$nw -Wtraditional-conversion" # Too many warnings for now
 -  nw="$nw -Wunreachable-code"       # so buggy that it's now silently ignored
    nw="$nw -Wpadded"                 # Our structs are not padded
 -  nw="$nw -Wredundant-decls"        # we regularly (re)declare functions
 +  nw="$nw -Wredundant-decls"        # We regularly (re)declare getenv etc.
    nw="$nw -Wlogical-op"             # any use of fwrite provokes this
 -  nw="$nw -Wformat-nonliteral"      # we do this a lot
 +  nw="$nw -Wformat-nonliteral"      # Emacs does this a lot
    nw="$nw -Wvla"                    # warnings in gettext.h
    nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
    nw="$nw -Wswitch-enum"            # Too many warnings for now
    nw="$nw -Wswitch-default"         # Too many warnings for now
 -  nw="$nw -Wfloat-equal"            # warns about high-quality code
 -  nw="$nw -Winline"                 # OK to ignore 'inline'
 -  nw="$nw -Wsync-nand"              # irrelevant here, and provokes ObjC warning
 -  nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
 +  nw="$nw -Wfloat-equal"            # e.g., ftoastr.c
 +  nw="$nw -Winline"                 # e.g., dispnew.c's inlining of row_equal_p
  
    # Emacs doesn't care about shadowing; see
    # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
    # The following lines should be removable at some point.
    nw="$nw -Wstack-protector"
    nw="$nw -Wstrict-overflow"
 +  nw="$nw -Wsuggest-attribute=const"
    nw="$nw -Wsuggest-attribute=pure"
  
  
@@@ -7963,7 -7833,9 +7964,7 @@@ $as_echo "no" >&6; 
  fi
  
  
 -
 -if test $opsys = gnu-linux; then
 -  # Extract the first word of "paxctl", so it can be a program name with args.
 +# Extract the first word of "paxctl", so it can be a program name with args.
  set dummy paxctl; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
@@@ -8003,7 -7875,7 +8004,7 @@@ $as_echo "no" >&6; 
  fi
  
  
 -fi
 +
  
  ## Need makeinfo >= 4.7 (?) to build the manuals.
  # Extract the first word of "makeinfo", so it can be a program name with args.
  
  # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
  
 -# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
 +
 +
 +## If user specified a crt-dir, use that unconditionally.
 +if test "X$CRT_DIR" = "X"; then
 +
 +  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
 +    ;;
 +
 +    powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
 +  esac
 +
 +  case "$opsys" in
 +    hpux10-20) CRT_DIR=/lib ;;
 +  esac
 +
 +  ## 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
  
  
  
  
  
  
 +<<<<<<< TREE
 +<<<<<<< TREE
 +=======
 +=======
  cat >>confdefs.h <<_ACEOF
  #define SYSTEM_TYPE "$SYSTEM_TYPE"
  _ACEOF
  
  
 +>>>>>>> MERGE-SOURCE
  crt_files=
  
  for file in x $LIB_STANDARD $START_FILES; do
@@@ -8513,9 -8312,9 +8514,9 @@@ case $opsys i
  esac
  
  
 -pre_PKG_CONFIG_CFLAGS=$CFLAGS
 -pre_PKG_CONFIG_LIBS=$LIBS
 -
 +<<<<<<< TREE
 +>>>>>>> MERGE-SOURCE
 +=======
  # Extract the first word of "pkg-config", so it can be a program name with args.
  set dummy pkg-config; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  
  
  
 +>>>>>>> MERGE-SOURCE
  
  
  
@@@ -8677,9 -8475,9 +8678,9 @@@ $as_echo "no" >&6; 
  
    if test $HAVE_ALSA = yes; then
      SAVE_CFLAGS="$CFLAGS"
 -    SAVE_LIBS="$LIBS"
 +    SAVE_LDFLAGS="$LDFLAGS"
      CFLAGS="$ALSA_CFLAGS $CFLAGS"
 -    LIBS="$ALSA_LIBS $LIBS"
 +    LDFLAGS="$ALSA_LIBS $LDFLAGS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <asoundlib.h>
@@@ -8722,7 -8520,7 +8723,7 @@@ rm -f core conftest.err conftest.$ac_ob
      fi
  
      CFLAGS="$SAVE_CFLAGS"
 -    LIBS="$SAVE_LIBS"
 +    LDFLAGS="$SAVE_LDFLAGS"
      LIBSOUND="$LIBSOUND $ALSA_LIBS"
      CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
  
  
  
  
 +
 +
 +
 +
 +
 +
  
  
  
@@@ -8942,51 -8734,8 +8943,51 @@@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>
  fi
  
  
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
 -$as_echo_n "checking for speed_t... " >&6; }
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
 +$as_echo_n "checking for struct utimbuf... " >&6; }
 +if test "${emacs_cv_struct_utimbuf+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat 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
 +#ifdef HAVE_UTIME_H
 +#include <utime.h>
 +#endif
 +int
 +main ()
 +{
 +static struct utimbuf x; x.actime = x.modtime;
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  emacs_cv_struct_utimbuf=yes
 +else
 +  emacs_cv_struct_utimbuf=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
 +$as_echo "$emacs_cv_struct_utimbuf" >&6; }
 +if test $emacs_cv_struct_utimbuf = yes; then
 +
 +$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
 +
 +fi
 +
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
 +$as_echo_n "checking for speed_t... " >&6; }
  if test "${emacs_cv_speed_t+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
@@@ -9016,47 -8765,6 +9017,47 @@@ $as_echo "#define HAVE_SPEED_T 1" >>con
  
  fi
  
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
 +$as_echo_n "checking for struct timeval... " >&6; }
 +if test "${emacs_cv_struct_timeval+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat 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 ()
 +{
 +static struct timeval x; x.tv_sec = x.tv_usec;
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  emacs_cv_struct_timeval=yes
 +else
 +  emacs_cv_struct_timeval=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
 +$as_echo "$emacs_cv_struct_timeval" >&6; }
 +HAVE_TIMEVAL=$emacs_cv_struct_timeval
 +if test $emacs_cv_struct_timeval = yes; then
 +
 +$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
 +
 +fi
 +
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
  $as_echo_n "checking for struct exception... " >&6; }
  if test "${emacs_cv_struct_exception+set}" = set; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
  $as_echo "$emacs_cv_struct_exception" >&6; }
  HAVE_EXCEPTION=$emacs_cv_struct_exception
 -if test $emacs_cv_struct_exception != yes || test $opsys = darwin; then
 +if test $emacs_cv_struct_exception != yes; then
  
  $as_echo "#define NO_MATHERR 1" >>confdefs.h
  
  fi
  
 +<<<<<<< TREE
 +<<<<<<< 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"
 +if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_SYS_SOCKET_H 1
 +_ACEOF
 +
 +fi
 +
 +done
 +=======
  
  
 +>>>>>>> MERGE-SOURCE
  
 +>>>>>>> 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
  
  done
  
 +<<<<<<< TREE
 +for ac_func in getifaddrs freeifaddrs
 +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
 +
 +>>>>>>> MERGE-SOURCE
 +=======
 +>>>>>>> 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
@@@ -9257,8 -8929,6 +9258,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>
@@@ -9275,41 -8945,9 +9276,10 @@@ _ACEO
  
  
  fi
 +>>>>>>> MERGE-SOURCE
  
  
  
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for  __attribute__ ((__aligned__ (expr)))" >&5
- $as_echo_n "checking for  __attribute__ ((__aligned__ (expr)))... " >&6; }
- if test "${emacs_cv_attribute_aligned+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- char __attribute__ ((__aligned__ (1 << 3))) c;
- int
- main ()
- {
-   ;
-   return 0;
- }
- _ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
-   emacs_cv_attribute_aligned=yes
- else
-   emacs_cv_attribute_aligned=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5
- $as_echo "$emacs_cv_attribute_aligned" >&6; }
- if test $emacs_cv_attribute_aligned = yes; then
- $as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h
- fi
  
  DEPFLAGS=
  MKDEPDIR=":"
@@@ -9964,7 -9602,7 +9934,7 @@@ $as_echo "#define DOUG_LEA_MALLOC 1" >>
    ## Use mmap directly for allocating larger buffers.
    ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
    ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
 -  ## Does the AC_FUNC_MMAP test below make this check unnecessary?
 +  ## Does the AC_FUNC_MMAP test below make this check unecessary?
    case "$opsys" in
      gnu*) REL_ALLOC=no ;;
    esac
@@@ -10258,9 -9896,15 +10228,9 @@@ LIB_PTHREAD
  
  
  if test "$ac_cv_header_pthread_h"; then
 -        if test "$GMALLOC_OBJ" = gmalloc.o; then
 -    emacs_pthread_function=pthread_atfork
 -  else
 -    emacs_pthread_function=pthread_self
 -  fi
 -  as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
 -$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
 -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
 +$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
 +if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@@ -10274,27 -9918,29 +10244,27 @@@ cat confdefs.h - <<_ACEOF >conftest.$ac
  #ifdef __cplusplus
  extern "C"
  #endif
 -char $emacs_pthread_function ();
 +char pthread_self ();
  int
  main ()
  {
 -return $emacs_pthread_function ();
 +return pthread_self ();
    ;
    return 0;
  }
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
 -  eval "$as_ac_Lib=yes"
 +  ac_cv_lib_pthread_pthread_self=yes
  else
 -  eval "$as_ac_Lib=no"
 +  ac_cv_lib_pthread_pthread_self=no
  fi
  rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  LIBS=$ac_check_lib_save_LIBS
  fi
 -eval ac_res=\$$as_ac_Lib
 -             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
 -eval as_val=\$$as_ac_Lib
 -   if test "x$as_val" = x""yes; then :
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5
 +$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; }
 +if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then :
    HAVE_PTHREAD=yes
  fi
  
  fi
  
  
 +<<<<<<< TREE
 +=======
  HAVE_GSETTINGS=no
  if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
  
@@@ -11126,7 -10770,6 +11096,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
  
@@@ -11183,7 -10826,17 +11153,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_LIBS="$LIBS"
 -    CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
 -    LIBS="$SETTINGS_LIBS $LIBS"
 -    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 :
@@@ -11194,9 -10847,13 +11164,9 @@@ _ACEO
  fi
  done
  
 -    CFLAGS="$SAVE_CFLAGS"
 -    LIBS="$SAVE_LIBS"
 +   fi
  fi
  
 -
 -
 -
  HAVE_LIBSELINUX=no
  LIBSELINUX_LIBS=
  if test "${with_selinux}" = "yes"; then
@@@ -11566,7 -11223,7 +11536,7 @@@ _ACEO
  fi
  
    test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
 -  fi
 +fi
  
  
  LIBXMU=-lXmu
@@@ -12516,7 -12173,7 +12486,7 @@@ eval as_val=\$$as_ac_Heade
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 - break
 +
  fi
  
  done
  $as_echo "#define HAVE_PNG 1" >>confdefs.h
  
      LIBPNG="-lpng -lz -lm"
 -
 -    ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
 -      # include <libpng/png.h>
 -      #else
 -      # include <png.h>
 -      #endif
 -
 -"
 -if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
 -
 -else
 -
 -$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
 -
 -fi
 -
    fi
  fi
  
  
  
  ### 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.
  
  
  
  
 -for ac_func in gethostname \
 -closedir getrusage get_current_dir_name \
 -lrand48 logb frexp fmod cbrt setsid \
 -fpathconf select euidaccess getpagesize setlocale \
 -utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \
 -__fpending strsignal setitimer \
 -sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
 -gai_strerror mkstemp getline getdelim fsync sync \
 -difftime posix_memalign \
 -getpwent endpwent getgrent endgrent \
 -touchlock \
 -cfmakeraw cfsetspeed copysign __executable_start
 +
 +
 +
 +  for ac_func in $ac_func_list
  do :
    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
  done
  
  
 -if test $opsys != unixware; then
 -  for ac_func in getwd
 -do :
 -  ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
 -if test "x$ac_cv_func_getwd" = x""yes; then :
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_GETWD 1
 -_ACEOF
  
 -fi
 -done
  
 -fi
  
 -## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
 -## has a broken `rint' in some library versions including math library
 -## version number A.09.05.
 -## You can fix the math library by installing patch number PHSS_4630.
 -## But we can fix it more reliably for Emacs by just not using rint.
 -## We also skip HAVE_RANDOM - see comments in src/s/hpux10-20.h.
 -case $opsys in
 -   hpux*) : ;;
 -   *) for ac_func in random rint
 -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
 - ;;
 -esac
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
  $as_echo_n "checking for __builtin_unwind_init... " >&6; }
@@@ -13585,17 -13193,30 +13555,17 @@@ $as_echo "#define GETPGRP_VOID 1" >>con
  fi
  
  
 +<<<<<<< TREE
 +# Configure gnulib.
 +=======
  # 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.
  
  
  # Do we have res_init, for detecting changes in /etc/resolv.conf?
 -# On Darwin, res_init appears not to be useful: see bug#562 and
 -# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
  resolv=no
 -
 -if test $opsys != darwin; then
 -
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <netinet/in.h>
  #include <arpa/nameser.h>
  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
 +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
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <netinet/in.h>
  #include <arpa/nameser.h>
  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 "$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"
 +  if test "$have_res_init" = yes ; then
 +    resolv=yes
    fi
 +  LIBS="$OLIBS"
 +fi
  
 -  if test "$have_res_init" = yes; then
 +if test "$have_res_init" = yes; then
  
  $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
  
 -  fi
  fi
 +
  # Do we need the Hesiod library to provide the support routines?
  LIBHESIOD=
  if test "$with_hesiod" != no ; then
  
  
  # Do we need libresolv (due to res_init or Hesiod)?
 -if test "$resolv" = yes && test $opsys != darwin; then
 +if test "$resolv" = yes ; then
  
  $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
  
  
  
  
 -  for ac_func in $ac_func_list
 -do :
 -  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
 -eval as_val=\$$as_ac_var
 -   if test "x$as_val" = x""yes; then :
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
 -
 -fi
 -done
 -
 -
 -
 -
  { $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 :
@@@ -14595,63 -14237,6 +14565,63 @@@ $as_echo "#define LOCALTIME_CACHE 1" >>
  
  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 :
@@@ -14931,8 -14516,16 +14901,8 @@@ $as_echo "#define HAVE_WORKING_FORK 1" 
  fi
  
  
 -for ac_func in snprintf
 -do :
 -  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
 -if test "x$ac_cv_func_snprintf" = x""yes; then :
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_SNPRINTF 1
 -_ACEOF
  
 -fi
 -done
 +
  
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
@@@ -15036,20 -14629,89 +15006,20 @@@ $as_echo "#define __restrict_arr __rest
  fi
  
  
 -
 -$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
 -
 -
 -## Note: PTYs are broken on darwin <6.  Use at your own risk.
 -
 -$as_echo "#define HAVE_PTYS 1" >>confdefs.h
 -
 -
 -
 -$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
 -
 -
 -
 -
 -
 -case $opsys in
 -  aix4-2)
 -        if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
 -      $as_echo "#define NO_EDITRES 1" >>confdefs.h
 -
 -    fi
 -    ;;
 -
 -  hpux*)
 -            $as_echo "#define NO_EDITRES 1" >>confdefs.h
 -
 -    ;;
 -esac
 -
 -
  case $opsys in
    darwin | gnu | hpux* | *bsd )
  
  $as_echo "#define NO_TERMIO 1" >>confdefs.h
  
 -    ;;
 -
 -  irix6-5 | sol2* | unixware )
 -
 -$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
 -
 -    ;;
 +  ;;
  esac
  
 -
  case $opsys in
 -      hpux* | irix6-5 | openbsd | sol2* | unixware )
 +  hpux* | irix6-5 | openbsd | sol2* | unixware )
  
  $as_echo "#define BROKEN_SIGIO 1" >>confdefs.h
  
 -    ;;
 -
 -  aix4-2)
 -
 -$as_echo "#define BROKEN_FIONREAD 1" >>confdefs.h
 -
 -
 -$as_echo "#define BROKEN_SIGAIO 1" >>confdefs.h
 -
 -
 -$as_echo "#define BROKEN_SIGPOLL 1" >>confdefs.h
 -
 -
 -$as_echo "#define BROKEN_SIGPTY 1" >>confdefs.h
 -
 -
 -
 -$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
 -
 -    ;;
 -
 -  freebsd)
 -
 -$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
 -
 -    ;;
 -
 -      darwin)
 -
 -$as_echo "#define NO_ABORT 1" >>confdefs.h
 -
 -    ;;
 +  ;;
  esac
  
  case $opsys in
@@@ -15061,9 -14723,605 +15031,611 @@@ $as_echo "#define HAVE_PROCFS 1" >>conf
  esac
  
  case $opsys in
++<<<<<<< TREE
 +   gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;;
 +
 +   hpux11)
++=======
+   darwin | freebsd | netbsd | openbsd )
+ $as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
+   ;;
+ esac
+ case $opsys in
+   netbsd | openbsd) sound_device="/dev/audio" ;;
+   *) sound_device="/dev/dsp" ;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+ #define DEFAULT_SOUND_DEVICE "$sound_device"
+ _ACEOF
+ case $opsys in
+   darwin | gnu-linux | gnu-kfreebsd )
+ $as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
+   ;;
+ esac
+ case $opsys in
+   cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
+ $as_echo "#define NARROWPROTO 1" >>confdefs.h
+   ;;
+ esac
+ case $opsys in
+   aix4-2 )
+     $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++) " >>confdefs.h
+             $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\"); " >>confdefs.h
+     $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd)); " >>confdefs.h
+     ;;
+   cygwin )
+     $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h
+         $as_echo "#define PTY_OPEN  do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0) " >>confdefs.h
+     $as_echo "#define PTY_NAME_SPRINTF  " >>confdefs.h
+     $as_echo "#define PTY_TTY_NAME_SPRINTF  " >>confdefs.h
+     ;;
+   darwin )
+     $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h
+         $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
+                 $as_echo "#define PTY_OPEN  do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0) " >>confdefs.h
+     $as_echo "#define PTY_NAME_SPRINTF  " >>confdefs.h
+     $as_echo "#define PTY_TTY_NAME_SPRINTF  " >>confdefs.h
+     ;;
+   gnu | freebsd | netbsd | openbsd )
+     $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
+     ;;
+   gnu-linux | gnu-kfreebsd )
+         if test "x$ac_cv_func_grantpt" = xyes; then
+ $as_echo "#define UNIX98_PTYS 1" >>confdefs.h
+       $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h
+                   $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); sigunblock (sigmask (SIGCHLD)); } " >>confdefs.h
+             if test "x$ac_cv_func_getpt" = xyes; then
+         $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
+         $as_echo "#define PTY_NAME_SPRINTF  " >>confdefs.h
+       else
+         $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h
+       fi
+     else
+       $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
+     fi
+     ;;
+   hpux*)
+     $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
+     $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i); " >>confdefs.h
+     $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i); " >>confdefs.h
+     ;;
+   irix6-5 )
+                                             $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
+         $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
+     $as_echo "#define PTY_OPEN  { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); } " >>confdefs.h
+         $as_echo "#define PTY_NAME_SPRINTF  " >>confdefs.h
+         $as_echo "#define PTY_TTY_NAME_SPRINTF  " >>confdefs.h
+     ;;
+   sol2* )
+                             $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h
+     ;;
+   unixware )
+         $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal(\"could not grant slave pty\"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h
+     ;;
+ esac
+ case $opsys in
+   sol2* | unixware )
+             $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
+     $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h
+ $as_echo "#define SETUP_SLAVE_PTY if (ioctl (xforkin, I_PUSH, \"ptem\") == -1) fatal (\"ioctl I_PUSH ptem\"); if (ioctl (xforkin, I_PUSH, \"ldterm\") == -1) fatal (\"ioctl I_PUSH ldterm\"); if (ioctl (xforkin, I_PUSH, \"ttcompat\") == -1) fatal (\"ioctl I_PUSH ttcompat\");" >>confdefs.h
+     ;;
+ esac
+ case $opsys in
+       aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd )
+     $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
+     ;;
+       gnu-linux | gnu-kfreebsd )
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
+ $as_echo_n "checking for signals via characters... " >&6; }
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <linux/version.h>
+ #if LINUX_VERSION_CODE < 0x20400
+ # error "Linux version too old"
+ #endif
+ int
+ main ()
+ {
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_cpp "$LINENO"; then :
+   emacs_signals_via_chars=yes
+ else
+   emacs_signals_via_chars=no
+ fi
+ rm -f conftest.err conftest.$ac_ext
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
+ $as_echo "$emacs_signals_via_chars" >&6; }
+     test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
+     ;;
+ esac
+ case $opsys in
+   cygwin | darwin | freebsd | netbsd | openbsd )
+     $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)" >>confdefs.h
+     ;;
+   unixware)
+     $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)" >>confdefs.h
+     ;;
+   gnu | gnu-linux | gnu-kfreebsd )
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of pending output formalism" >&5
+ $as_echo_n "checking for style of pending output formalism... " >&6; }
+             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <stdio.h>
+ #if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM)
+ # error "stdio definitions not found"
+ #endif
+ int
+ main ()
+ {
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_cpp "$LINENO"; then :
+   emacs_pending_output=new
+ else
+   emacs_pending_output=unknown
+ fi
+ rm -f conftest.err conftest.$ac_ext
+       if test $emacs_pending_output = unknown; then
+         case $opsys in
+           gnu-linux | gnu-kfreebsd)
+             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <stdio.h>
+ #ifndef __UCLIBC__
+ # error "not using uclibc"
+ #endif
+ int
+ main ()
+ {
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_cpp "$LINENO"; then :
+   emacs_pending_output=uclibc
+ else
+   emacs_pending_output=old
+ fi
+ rm -f conftest.err conftest.$ac_ext
+             ;;
+         esac
+       fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_pending_output" >&5
+ $as_echo "$emacs_pending_output" >&6; }
+       case $emacs_pending_output in
+         new)
+                     $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)" >>confdefs.h
+           ;;
+         uclibc)
+                     $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufpos - (FILE)->__bufstart)" >>confdefs.h
+           ;;
+         old)
+                     $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->_pptr - (FILE)->_pbase)" >>confdefs.h
+           ;;
+       esac
+     ;;
+ esac
+ case $opsys in
+   gnu)
+         $as_echo "#define DATA_START ({ extern int data_start; (char *) &data_start; })" >>confdefs.h
+     ;;
+   hpux*)
+         $as_echo "#define DATA_START 0x40000000" >>confdefs.h
+     $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
+     ;;
+   irix6-5)
+     $as_echo "#define DATA_START 0x10000000" >>confdefs.h
+     $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
+     ;;
+ esac
+ case $opsys in
+   darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
+  ;;
+   gnu | freebsd | netbsd | openbsd )
+ $as_echo "#define TABDLY OXTABS" >>confdefs.h
+     $as_echo "#define TAB3 OXTABS" >>confdefs.h
+     ;;
+   gnu-linux | gnu-kfreebsd )
+             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifndef __i386__
+ # error "not i386"
+ #endif
+ int
+ main ()
+ {
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_cpp "$LINENO"; then :
+   $as_echo "#define ULIMIT_BREAK_VALUE (32*1024*1024)" >>confdefs.h
+ fi
+ rm -f conftest.err conftest.$ac_ext
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifndef __ia64__
+ # error "not ia64"
+ #endif
+ int
+ main ()
+ {
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_cpp "$LINENO"; then :
+ $as_echo "#define GC_MARK_SECONDARY_STACK() do { extern void *__libc_ia64_register_backing_store_base; __builtin_ia64_flushrs (); mark_memory (__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (0)" >>confdefs.h
+ fi
+ rm -f conftest.err conftest.$ac_ext
+     ;;
+   hpux*)
+ $as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
+     ;;
+   irix6-5)
+         $as_echo "#define ULIMIT_BREAK_VALUE 0x14000000" >>confdefs.h
+     ;;
+ esac
+ case $opsys in
+   aix4-2 | hpux* | unixware)
+             $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
+     ;;
+           gnu-linux | gnu-kfreebsd )
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #if defined __i386__ || defined __sparc__ || defined __mc68000__ \
+   || defined __alpha__ || defined __mips__ || defined __s390__ \
+   || defined __arm__ || defined __powerpc__ || defined __amd64__ \
+   || defined __ia64__ || defined __sh__
+ /* ok */
+ #else
+ # error "setjmp not known to work on this arch"
+ #endif
+ int
+ main ()
+ {
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_cpp "$LINENO"; then :
+   $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
+ else
+   $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
+ fi
+ rm -f conftest.err conftest.$ac_ext
+     ;;
+ esac
+ if test x$GCC = xyes; then
+       $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
+ else
+   case $opsys in
+         freebsd | netbsd | openbsd | irix6-5 | sol2* )
+       $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
+       ;;
+   esac
+ fi
+ case $opsys in
+   hpux* | sol2* )
+ $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
+     ;;
+ esac
+ case $opsys in
+   aix4-2)
+     opsysfile=
+     $as_echo "#define USG /**/" >>confdefs.h
+     $as_echo "#define USG5 /**/" >>confdefs.h
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifndef _AIX
+ # error "_AIX not defined"
+ #endif
+ int
+ main ()
+ {
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_cpp "$LINENO"; then :
+ else
+ $as_echo "#define _AIX /**/" >>confdefs.h
+ fi
+ rm -f conftest.err conftest.$ac_ext
+     ;;
+   cygwin)
+     opsysfile=
+ $as_echo "#define CYGWIN 1" >>confdefs.h
+     ;;
+   darwin)
+         $as_echo "#define BSD4_2 /**/" >>confdefs.h
+     $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h
+ $as_echo "#define DARWIN_OS /**/" >>confdefs.h
+     ;;
+   freebsd)
+     opsysfile=
+     $as_echo "#define BSD4_2 /**/" >>confdefs.h
+ $as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h
+     ;;
+   gnu | netbsd | openbsd )
+     $as_echo "#define BSD4_2 /**/" >>confdefs.h
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifndef BSD_SYSTEM
+ # error "BSD_SYSTEM not defined"
+ #endif
+ int
+ main ()
+ {
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_cpp "$LINENO"; then :
+ else
+   $as_echo "#define BSD_SYSTEM 43" >>confdefs.h
+ fi
+ rm -f conftest.err conftest.$ac_ext
+     ;;
+   gnu-linux | gnu-kfreebsd )
+     opsysfile=
+     $as_echo "#define USG /**/" >>confdefs.h
+ $as_echo "#define GNU_LINUX /**/" >>confdefs.h
+     ;;
+   hpux*)
+     $as_echo "#define USG /**/" >>confdefs.h
+     $as_echo "#define USG5 /**/" >>confdefs.h
+ $as_echo "#define HPUX /**/" >>confdefs.h
+     ;;
+   irix6-5)
+     $as_echo "#define USG /**/" >>confdefs.h
+     $as_echo "#define USG5 /**/" >>confdefs.h
+ $as_echo "#define IRIX6_5 /**/" >>confdefs.h
+     ;;
+   sol2*)
+     opsysfile="s/usg5-4-common.h"
+     $as_echo "#define USG /**/" >>confdefs.h
+     $as_echo "#define USG5 /**/" >>confdefs.h
+ $as_echo "#define SOLARIS2 /**/" >>confdefs.h
+     ;;
+   unixware)
+     opsysfile="s/usg5-4-common.h"
+     $as_echo "#define USG /**/" >>confdefs.h
+     $as_echo "#define USG5 /**/" >>confdefs.h
+     ;;
+ esac
+ case $opsys in
+           cygwin)
+ $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
+     ;;
+   gnu) opsysfile= ;;
+   hpux11)
++>>>>>>> MERGE-SOURCE
  
  $as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h
  
  $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
  
  
 -    opsysfile="s/hpux10-20.h"
 -    ;;
 -
 -  irix6-5)
 -
 -$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
 -
 -
 -$as_echo "#define SETPGRP_RELEASES_CTTY 1" >>confdefs.h
 -
 -    ;;
 +     opsysfile="s/hpux10-20.h"
 +   ;;
  
 -  openbsd) opsysfile="s/netbsd.h" ;;
 +   openbsd) opsysfile="s/netbsd.h" ;;
  
 -  sol2-10)
 +   sol2-10)
  
  $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
  
 -    opsysfile="s/sol2-6.h"
 -    ;;
 +     opsysfile="s/sol2-6.h"
 +   ;;
  esac
  
  # Set up the CFLAGS for real compilation, so we can substitute it.
@@@ -15122,6 -15389,7 +15694,6 @@@ version=$PACKAGE_VERSIO
  
  
  
 -
  
  
  ## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
  
  
  
 -# Configure gnulib.  Although this does not affect CFLAGS or LIBS permanently.
 -# it temporarily reverts them to their pre-pkg-config values,
 -# because gnulib needs to work with both src (which uses the
 -# pkg-config stuff) and lib-src (which does not).  For example, gnulib
 -# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
 -# and it therefore needs to run in an environment where LIBS does not
 -# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
 -# for some package unrelated to lib-src.
 -SAVE_CFLAGS=$CFLAGS
 -SAVE_LIBS=$LIBS
 -CFLAGS=$pre_PKG_CONFIG_CFLAGS
 -LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
 +# Configure gnulib here, now that we know LIBS.
 +>>>>>>> MERGE-SOURCE
  
  
  
@@@ -15841,8 -16119,10 +16413,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;
    UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
  
  
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
+ $as_echo_n "checking if environ is properly declared... " >&6; }
+   if test "${gt_cv_var_environ_declaration+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #if HAVE_UNISTD_H
+      #include <unistd.h>
+      #endif
+      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
+      #include <stdlib.h>
+            extern struct { int foo; } environ;
+ int
+ main ()
+ {
+ environ.foo = 1;
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+   gt_cv_var_environ_declaration=no
+ else
+   gt_cv_var_environ_declaration=yes
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
+ $as_echo "$gt_cv_var_environ_declaration" >&6; }
+   if test $gt_cv_var_environ_declaration = yes; then
+ $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
+   fi
+   if test $gt_cv_var_environ_declaration != yes; then
+     HAVE_DECL_ENVIRON=0
+   fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
  $as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
  if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
                 esac
                                               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  
 +<<<<<<< TREE
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'getopt.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'getopt.h\)".*#\1#
 +                   s#^/[^/]#//&#
 +=======
                 gl_header_literal_regex=`echo 'getopt.h' \
                                          | sed -e "$gl_make_literal_regex_sed"`
                 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
                     s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
                     s|^/[^/]|//&|
 +>>>>>>> MERGE-SOURCE
                     p
                     q
                   }'
  
    fi
  
 -          if test -z "$gl_replace_getopt"; then
 +                    if test -z "$gl_replace_getopt"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
  $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
  if test "${gl_cv_func_getopt_posix+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
  
 -                                                if test $cross_compiling = no; then
 -                              if test "$cross_compiling" = yes; then :
 -  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 -as_fn_error "cannot run test program while cross compiling
 -See \`config.log' for more details." "$LINENO" 5; }
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +                                                                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -
  #include <unistd.h>
 -#include <stdlib.h>
 -#include <string.h>
 -
  int
  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 c;
 -
 -  c = getopt (4, argv, "ab");
 -  if (!(c == 'a'))
 -    return 1;
 -  c = getopt (4, argv, "ab");
 -  if (!(c == -1))
 -    return 2;
 -  if (!(optind == 2))
 -    return 3;
 +int *p = &optreset; return optreset;
 +  ;
    return 0;
  }
 -
  _ACEOF
 -if ac_fn_c_try_run "$LINENO"; then :
 -  gl_cv_func_getopt_posix=maybe
 -else
 -  gl_cv_func_getopt_posix=no
 -fi
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 -  conftest.$ac_objext conftest.beam conftest.$ac_ext
 -fi
 -
 -          if test $gl_cv_func_getopt_posix = maybe; then
 -                                    if test "$cross_compiling" = yes; then :
 -  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 -as_fn_error "cannot run test program while cross compiling
 -See \`config.log' for more details." "$LINENO" 5; }
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  gl_optind_min=1
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -
 -#include <unistd.h>
 -#include <stdlib.h>
 -#include <string.h>
 -
 +#include <getopt.h>
  int
  main ()
  {
 -  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 c;
 -
 -  c = getopt (7, argv, "+abp:q:");
 -  if (!(c == -1))
 -    return 4;
 -  if (!(strcmp (argv[0], "program") == 0))
 -    return 5;
 -  if (!(strcmp (argv[1], "donald") == 0))
 -    return 6;
 -  if (!(strcmp (argv[2], "-p") == 0))
 -    return 7;
 -  if (!(strcmp (argv[3], "billy") == 0))
 -    return 8;
 -  if (!(strcmp (argv[4], "duck") == 0))
 -    return 9;
 -  if (!(strcmp (argv[5], "-a") == 0))
 -    return 10;
 -  if (!(strcmp (argv[6], "bar") == 0))
 -    return 11;
 -  if (!(optind == 1))
 -    return 12;
 +return !getopt_clip;
 +  ;
    return 0;
  }
 -
  _ACEOF
 -if ac_fn_c_try_run "$LINENO"; then :
 -  gl_cv_func_getopt_posix=maybe
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  gl_optind_min=1
  else
 -  gl_cv_func_getopt_posix=no
 +  gl_optind_min=0
  fi
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 -  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +
 +                gl_save_CPPFLAGS=$CPPFLAGS
 +        CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
 +        if test "$cross_compiling" = yes; then :
 +  case "$host_os" in
 +             mingw*)         gl_cv_func_getopt_posix="guessing no";;
 +             darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
 +             *)              gl_cv_func_getopt_posix="guessing yes";;
 +           esac
  
 -          fi
 -          if test $gl_cv_func_getopt_posix = maybe; then
 -                        if test "$cross_compiling" = yes; then :
 -  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 -as_fn_error "cannot run test program while cross compiling
 -See \`config.log' for more details." "$LINENO" 5; }
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  int
  main ()
  {
 -  static char program[] = "program";
 -  static char ab[] = "-ab";
 -  char *argv[3] = { program, ab, NULL };
 -  if (getopt (2, argv, "ab:") != 'a')
 -    return 13;
 -  if (getopt (2, argv, "ab:") != '?')
 -    return 14;
 -  if (optopt != 'b')
 -    return 15;
 -  if (optind != 2)
 -    return 16;
 +  {
 +    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 (argc, argv, "ab");
 +    if (!(c == 'a'))
 +      return 1;
 +    c = getopt (argc, argv, "ab");
 +    if (!(c == -1))
 +      return 2;
 +    if (!(optind == 2))
 +      return 3;
 +  }
 +  /* Some internal state exists at this point.  */
 +  {
 +    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 (argc, argv, "+abp:q:");
 +    if (!(c == -1))
 +      return 4;
 +    if (!(strcmp (argv[0], "program") == 0))
 +      return 5;
 +    if (!(strcmp (argv[1], "donald") == 0))
 +      return 6;
 +    if (!(strcmp (argv[2], "-p") == 0))
 +      return 7;
 +    if (!(strcmp (argv[3], "billy") == 0))
 +      return 8;
 +    if (!(strcmp (argv[4], "duck") == 0))
 +      return 9;
 +    if (!(strcmp (argv[5], "-a") == 0))
 +      return 10;
 +    if (!(strcmp (argv[6], "bar") == 0))
 +      return 11;
 +    if (!(optind == 1))
 +      return 12;
 +  }
 +  /* Detect MacOS 10.5, AIX 7.1 bug.  */
 +  {
 +    char *argv[3] = { "program", "-ab", NULL };
 +    optind = OPTIND_MIN;
 +    opterr = 0;
 +    if (getopt (2, argv, "ab:") != 'a')
 +      return 13;
 +    if (getopt (2, argv, "ab:") != '?')
 +      return 14;
 +    if (optopt != 'b')
 +      return 15;
 +    if (optind != 2)
 +      return 16;
 +  }
 +
    return 0;
  }
  
@@@ -16469,7 -16802,13 +17092,7 @@@ rm -f core *.core core.conftest.* gmon.
    conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
  
 -          fi
 -        else
 -          case "$host_os" in
 -            darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
 -            *)                       gl_cv_func_getopt_posix="guessing yes";;
 -          esac
 -        fi
 +        CPPFLAGS=$gl_save_CPPFLAGS
  
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
         POSIXLY_CORRECT=1
         export POSIXLY_CORRECT
         if test "$cross_compiling" = yes; then :
 -           gl_cv_func_getopt_gnu="guessing no"
 +           case $host_os:$ac_cv_have_decl_optreset in
 +           *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
 +           *:yes)               gl_cv_func_getopt_gnu=no;;
 +           *)                   gl_cv_func_getopt_gnu=yes;;
 +         esac
  
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  
  #include <stdlib.h>
  #if defined __MACH__ && defined __APPLE__
 -/* Avoid a crash on Mac OS X.  */
 +/* Avoid a crash on MacOS X.  */
  #include <mach/mach.h>
  #include <mach/mach_error.h>
  #include <mach/thread_status.h>
@@@ -16635,22 -16970,25 +17258,22 @@@ main (
               nocrash_init();
  
               /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
 -                and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
 +                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 Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
 +                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;
                 else if (getopt (3, argv, "-p") != 'p')
 -                 result |= 16;
 +                 result |= 32;
               }
               /* 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 |= 32;
 +                 result |= 64;
                 else if (getopt (3, argv, "+:a:b") != ':')
 -                 result |= 32;
 -             }
 -             /* 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 |= 64;
               }
               return result;
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
  $as_echo "$gl_cv_func_getopt_gnu" >&6; }
 -    if test "$gl_cv_func_getopt_gnu" != yes; then
 +    if test "$gl_cv_func_getopt_gnu" = "no"; then
        gl_replace_getopt=yes
 -    else
 -      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
 -$as_echo_n "checking for working GNU getopt_long function... " >&6; }
 -if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  if test "$cross_compiling" = yes; then :
 -              case "$host_os" in
 -              openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
 -              *)        gl_cv_func_getopt_long_gnu="guessing yes";;
 -            esac
 -
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <getopt.h>
 -                #include <stddef.h>
 -                #include <string.h>
 +    fi
 +  fi
  
 -int
 -main ()
 -{
 -static const struct option long_options[] =
 -                  {
 -                    { "xtremely-",no_argument,       NULL, 1003 },
 -                    { "xtra",     no_argument,       NULL, 1001 },
 -                    { "xtreme",   no_argument,       NULL, 1002 },
 -                    { "xtremely", no_argument,       NULL, 1003 },
 -                    { NULL,       0,                 NULL, 0 }
 -                  };
 -                /* This code fails on OpenBSD 5.0.  */
 -                {
 -                  static char program[] = "program";
 -                  static char xtremel[] = "--xtremel";
 -                  char *argv[] = { program, xtremel, NULL };
 -                  int option_index;
 -                  optind = 1; opterr = 0;
 -                  if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
 -                    return 1;
 -                }
 -                return 0;
  
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_run "$LINENO"; then :
 -  gl_cv_func_getopt_long_gnu=yes
 -else
 -  gl_cv_func_getopt_long_gnu=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: $gl_cv_func_getopt_long_gnu" >&5
 -$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
 -      case "$gl_cv_func_getopt_long_gnu" in
 -        *yes) ;;
 -        *) gl_replace_getopt=yes ;;
 -      esac
 -    fi
 -  fi
  
 +    REPLACE_GETOPT=0
  
  
 +  if test -n "$gl_replace_getopt"; then :
  
 +      REPLACE_GETOPT=1
  
 +fi
  
 -    REPLACE_GETOPT=0
 -    if test -n "$gl_replace_getopt"; then
 -      REPLACE_GETOPT=1
 -    fi
  
    if test $REPLACE_GETOPT = 1; then
  
@@@ -16745,6 -17158,262 +17368,6 @@@ cat >>confdefs.h <<_ACEO
  _ACEOF
  
  
 -
 -
 -
 -
 -
 -
 -{ $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 :
 -  $as_echo_n "(cached) " >&6
 -else
 -  ac_cv_c_restrict=no
 -   # The order here caters to the fact that C++ does not require restrict.
 -   for ac_kw in __restrict __restrict__ _Restrict restrict; do
 -     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -typedef int * int_ptr;
 -      int foo (int_ptr $ac_kw ip) {
 -      return ip[0];
 -       }
 -int
 -main ()
 -{
 -int s[1];
 -      int * $ac_kw t = s;
 -      t[0] = 0;
 -      return foo(t)
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  ac_cv_c_restrict=$ac_kw
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -     test "$ac_cv_c_restrict" != no && break
 -   done
 -
 -fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
 -$as_echo "$ac_cv_c_restrict" >&6; }
 -
 - case $ac_cv_c_restrict in
 -   restrict) ;;
 -   no) $as_echo "#define restrict /**/" >>confdefs.h
 - ;;
 -   *)  cat >>confdefs.h <<_ACEOF
 -#define restrict $ac_cv_c_restrict
 -_ACEOF
 - ;;
 - esac
 -
 -
 -  GNULIB_GETTIMEOFDAY=0;
 -    HAVE_GETTIMEOFDAY=1;
 -  HAVE_STRUCT_TIMEVAL=1;
 -  HAVE_SYS_TIME_H=1;
 -  REPLACE_GETTIMEOFDAY=0;
 -  REPLACE_STRUCT_TIMEVAL=0;
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -     if test $gl_cv_have_include_next = yes; then
 -       gl_cv_next_sys_time_h='<'sys/time.h'>'
 -     else
 -       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
 -$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
 -if test "${gl_cv_next_sys_time_h+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -
 -             if test $ac_cv_header_sys_time_h = yes; then
 -
 -
 -               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <sys/time.h>
 -
 -_ACEOF
 -                                                                                                                        case "$host_os" in
 -                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
 -                 *)    gl_absname_cpp="$ac_cpp" ;;
 -               esac
 -
 -               case "$host_os" in
 -                 mingw*)
 -                                                                                                                                     gl_dirsep_regex='[/\\]'
 -                   ;;
 -                 *)
 -                   gl_dirsep_regex='\/'
 -                   ;;
 -               esac
 -                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 -
 -               gl_header_literal_regex=`echo 'sys/time.h' \
 -                                        | sed -e "$gl_make_literal_regex_sed"`
 -               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 -                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 -                   s|^/[^/]|//&|
 -                   p
 -                   q
 -                 }'
 -                                                            gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
 -                      sed -n "$gl_absolute_header_sed"`'"'
 -          else
 -               gl_cv_next_sys_time_h='<'sys/time.h'>'
 -             fi
 -
 -
 -fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
 -$as_echo "$gl_cv_next_sys_time_h" >&6; }
 -     fi
 -     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
 -
 -     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
 -       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
 -       gl_next_as_first_directive='<'sys/time.h'>'
 -     else
 -       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
 -       gl_next_as_first_directive=$gl_cv_next_sys_time_h
 -     fi
 -     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
 -
 -
 -
 -
 -
 -  if test $ac_cv_header_sys_time_h != yes; then
 -    HAVE_SYS_TIME_H=0
 -  fi
 -
 -
 -
 -
 -
 -  if test $ac_cv_header_sys_socket_h != yes; then
 -                    for ac_header in winsock2.h
 -do :
 -  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
 -if test "x$ac_cv_header_winsock2_h" = x""yes; then :
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_WINSOCK2_H 1
 -_ACEOF
 -
 -fi
 -
 -done
 -
 -  fi
 -  if test "$ac_cv_header_winsock2_h" = yes; then
 -    HAVE_WINSOCK2_H=1
 -    UNISTD_H_HAVE_WINSOCK2_H=1
 -    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
 -  else
 -    HAVE_WINSOCK2_H=0
 -  fi
 -
 -
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
 -$as_echo_n "checking for struct timeval... " >&6; }
 -if test "${gl_cv_sys_struct_timeval+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#if HAVE_SYS_TIME_H
 -             #include <sys/time.h>
 -            #endif
 -            #include <time.h>
 -            #if HAVE_WINSOCK2_H
 -            # include <winsock2.h>
 -            #endif
 -
 -int
 -main ()
 -{
 -static struct timeval x; x.tv_sec = x.tv_usec;
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  gl_cv_sys_struct_timeval=yes
 -else
 -  gl_cv_sys_struct_timeval=no
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -
 -fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
 -$as_echo "$gl_cv_sys_struct_timeval" >&6; }
 -  if test $gl_cv_sys_struct_timeval != yes; then
 -    HAVE_STRUCT_TIMEVAL=0
 -  else
 -                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
 -$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
 -if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#if HAVE_SYS_TIME_H
 -               #include <sys/time.h>
 -              #endif
 -              #include <time.h>
 -              #if HAVE_WINSOCK2_H
 -              # include <winsock2.h>
 -              #endif
 -
 -int
 -main ()
 -{
 -static struct timeval x;
 -              typedef int verify_tv_sec_type[
 -                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
 -              ];
 -
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  gl_cv_sys_struct_timeval_tv_sec=yes
 -else
 -  gl_cv_sys_struct_timeval_tv_sec=no
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -
 -fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
 -$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
 -    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
 -      REPLACE_STRUCT_TIMEVAL=1
 -    fi
 -  fi
 -
 -
 -
 -
 -
 -
 -
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
  $as_echo_n "checking for unsigned long long int... " >&6; }
  if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
                 esac
                                               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  
 +<<<<<<< TREE
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdint.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'stdint.h\)".*#\1#
 +                   s#^/[^/]#//&#
 +=======
                 gl_header_literal_regex=`echo 'stdint.h' \
                                          | sed -e "$gl_make_literal_regex_sed"`
                 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
                     s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
                     s|^/[^/]|//&|
 +>>>>>>> MERGE-SOURCE
                     p
                     q
                   }'
@@@ -17623,6 -18286,10 +18246,6 @@@ _ACEO
  
  
  
 -          if test $BITSIZEOF_WINT_T -lt 32; then
 -    BITSIZEOF_WINT_T=32
 -  fi
 -
      STDINT_H=stdint.h
    fi
  
                 esac
                                               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  
 +<<<<<<< TREE
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'inttypes.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'inttypes.h\)".*#\1#
 +                   s#^/[^/]#//&#
 +=======
                 gl_header_literal_regex=`echo 'inttypes.h' \
                                          | sed -e "$gl_make_literal_regex_sed"`
                 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
                     s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
                     s|^/[^/]|//&|
 +>>>>>>> MERGE-SOURCE
                     p
                     q
                   }'
@@@ -17791,6 -18452,7 +18414,6 @@@ $as_echo "$gl_cv_type_off_t_64" >&6; 
  
  
       GNULIB_FCHMODAT=0;
 -  GNULIB_FSTAT=0;
    GNULIB_FSTATAT=0;
    GNULIB_FUTIMENS=0;
    GNULIB_LCHMOD=0;
  
  
  
 -  GNULIB_PSELECT=0;
 -  GNULIB_SELECT=0;
 -    HAVE_PSELECT=1;
 -  REPLACE_PSELECT=0;
 -  REPLACE_SELECT=0;
 +<<<<<<< TREE
  
  
 +<<<<<<< TREE
 +=======
 +=======
 +>>>>>>> MERGE-SOURCE
 +  GNULIB_PTHREAD_SIGMASK=0;
 +  GNULIB_SIGNAL_H_SIGPIPE=0;
 +  GNULIB_SIGPROCMASK=0;
 +  GNULIB_SIGACTION=0;
 +    HAVE_POSIX_SIGNALBLOCKING=1;
 +  HAVE_PTHREAD_SIGMASK=1;
 +  HAVE_SIGSET_T=1;
 +  HAVE_SIGINFO_T=1;
 +  HAVE_SIGACTION=1;
 +  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
  
 +  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
  
 +  HAVE_SIGHANDLER_T=1;
 +  REPLACE_PTHREAD_SIGMASK=0;
  
  
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
 -$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
 -if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
  
 -                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <sys/select.h>
 -int
 -main ()
 -{
 -struct timeval b;
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  gl_cv_header_sys_select_h_selfcontained=yes
 -else
 -  gl_cv_header_sys_select_h_selfcontained=no
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
 -        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <sys/select.h>
 -int
 -main ()
 -{
 -int memset; int bzero;
 -  ;
 -  return 0;
 -}
  
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <sys/select.h>
 -int
 -main ()
 -{
  
 -                  #undef memset
 -                  #define memset nonexistent_memset
 -                  extern
 -                  #ifdef __cplusplus
 -                  "C"
 -                  #endif
 -                  void *memset (void *, int, unsigned long);
 -                  #undef bzero
 -                  #define bzero nonexistent_bzero
 -                  extern
 -                  #ifdef __cplusplus
 -                  "C"
 -                  #endif
 -                  void bzero (void *, unsigned long);
 -                  fd_set fds;
 -                  FD_ZERO (&fds);
  
 -  ;
 -  return 0;
 -}
 +  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
 +      #include <signal.h>
 +      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
 +      #include <sys/types.h>
 +
 +"
 +if test "x$ac_cv_type_sigset_t" = x""yes; then :
  
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_SIGSET_T 1
  _ACEOF
 -if ac_fn_c_try_link "$LINENO"; then :
  
 +gl_cv_type_sigset_t=yes
  else
 -  gl_cv_header_sys_select_h_selfcontained=no
 -fi
 -rm -f core conftest.err conftest.$ac_objext \
 -    conftest$ac_exeext conftest.$ac_ext
 -
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -      fi
 -
 -fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
 -$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -     if test $gl_cv_have_include_next = yes; then
 -       gl_cv_next_sys_select_h='<'sys/select.h'>'
 -     else
 -       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
 -$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
 -if test "${gl_cv_next_sys_select_h+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -
 -             if test $ac_cv_header_sys_select_h = yes; then
 -
 -
 -               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <sys/select.h>
 -
 -_ACEOF
 -                                                                                                                        case "$host_os" in
 -                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
 -                 *)    gl_absname_cpp="$ac_cpp" ;;
 -               esac
 -
 -               case "$host_os" in
 -                 mingw*)
 -                                                                                                                                     gl_dirsep_regex='[/\\]'
 -                   ;;
 -                 *)
 -                   gl_dirsep_regex='\/'
 -                   ;;
 -               esac
 -                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 -
 -               gl_header_literal_regex=`echo 'sys/select.h' \
 -                                        | sed -e "$gl_make_literal_regex_sed"`
 -               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 -                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 -                   s|^/[^/]|//&|
 -                   p
 -                   q
 -                 }'
 -                                                            gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
 -                      sed -n "$gl_absolute_header_sed"`'"'
 -          else
 -               gl_cv_next_sys_select_h='<'sys/select.h'>'
 -             fi
 -
 -
 -fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
 -$as_echo "$gl_cv_next_sys_select_h" >&6; }
 -     fi
 -     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
 -
 -     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
 -       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
 -       gl_next_as_first_directive='<'sys/select.h'>'
 -     else
 -       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
 -       gl_next_as_first_directive=$gl_cv_next_sys_select_h
 -     fi
 -     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
 -
 -
 -
 -
 -  if test $ac_cv_header_sys_select_h = yes; then
 -    HAVE_SYS_SELECT_H=1
 -  else
 -    HAVE_SYS_SELECT_H=0
 -  fi
 -
 -
 -
 -
 -
 -  if test $ac_cv_header_sys_socket_h != yes; then
 -                    for ac_header in winsock2.h
 -do :
 -  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
 -if test "x$ac_cv_header_winsock2_h" = x""yes; then :
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_WINSOCK2_H 1
 -_ACEOF
 -
 -fi
 -
 -done
 -
 -  fi
 -  if test "$ac_cv_header_winsock2_h" = yes; then
 -    HAVE_WINSOCK2_H=1
 -    UNISTD_H_HAVE_WINSOCK2_H=1
 -    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
 -  else
 -    HAVE_WINSOCK2_H=0
 -  fi
 -
 -
 -
 -
 -
 -
 -
 -
 -  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_STRUCT_SIGACTION_SA_SIGACTION=1;
 -
 -  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
 -
 -  HAVE_SIGHANDLER_T=1;
 -  REPLACE_PTHREAD_SIGMASK=0;
 -  REPLACE_RAISE=0;
 -
 -
 -
 -
 -
 -
 -  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
 -      #include <signal.h>
 -      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
 -      #include <sys/types.h>
 -
 -"
 -if test "x$ac_cv_type_sigset_t" = x""yes; then :
 -
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_SIGSET_T 1
 -_ACEOF
 -
 -gl_cv_type_sigset_t=yes
 -else
 -  gl_cv_type_sigset_t=no
 +  gl_cv_type_sigset_t=no
  fi
  
    if test $gl_cv_type_sigset_t != yes; then
  
  
  
 +<<<<<<< TREE
 +>>>>>>> MERGE-SOURCE
 +
 +
 +=======
 +>>>>>>> MERGE-SOURCE
     if test $ac_cv_header_sys_socket_h = no; then
                           for ac_header in ws2tcpip.h
  do :
@@@ -18105,6 -18962,7 +18728,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_GETLINE=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
 +<<<<<<< TREE
 +=======
 +
 +
 +=======
 +>>>>>>> MERGE-SOURCE
  ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
  if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
    ac_have_decl=1
@@@ -18334,7 -19189,6 +18957,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
  
  
  
 +<<<<<<< TREE
 +=======
  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 :
  
  
  
  
 +
 +
 +
 +
 +
 +
 +>>>>>>> MERGE-SOURCE
 +{ $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 :
 +  $as_echo_n "(cached) " >&6
 +else
 +  ac_cv_c_restrict=no
 +   # The order here caters to the fact that C++ does not require restrict.
 +   for ac_kw in __restrict __restrict__ _Restrict restrict; do
 +     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +typedef int * int_ptr;
 +      int foo (int_ptr $ac_kw ip) {
 +      return ip[0];
 +       }
 +int
 +main ()
 +{
 +int s[1];
 +      int * $ac_kw t = s;
 +      t[0] = 0;
 +      return foo(t)
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_cv_c_restrict=$ac_kw
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +     test "$ac_cv_c_restrict" != no && break
 +   done
 +
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
 +$as_echo "$ac_cv_c_restrict" >&6; }
 +
 + case $ac_cv_c_restrict in
 +   restrict) ;;
 +   no) $as_echo "#define restrict /**/" >>confdefs.h
 + ;;
 +   *)  cat >>confdefs.h <<_ACEOF
 +#define restrict $ac_cv_c_restrict
 +_ACEOF
 + ;;
 + esac
 +
 +
 +
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
  $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
  if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
                 esac
                                               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  
 +<<<<<<< TREE
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'time.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'time.h\)".*#\1#
 +                   s#^/[^/]#//&#
 +=======
                 gl_header_literal_regex=`echo 'time.h' \
                                          | sed -e "$gl_make_literal_regex_sed"`
                 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
                     s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
                     s|^/[^/]|//&|
 +>>>>>>> MERGE-SOURCE
                     p
                     q
                   }'
@@@ -18639,46 -19430,227 +19262,46 @@@ $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
 +else
 +  ac_have_decl=0
 +fi
  
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_DECL_LOCALTIME_R $ac_have_decl
 +_ACEOF
  
  
  
  
 -
 -
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
 -$as_echo_n "checking whether the utimes function works... " >&6; }
 -if test "${gl_cv_func_working_utimes+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -
 -  if test "$cross_compiling" = yes; then :
 -  gl_cv_func_working_utimes=no
 +   if false; then
 +  GL_COND_LIBTOOL_TRUE=
 +  GL_COND_LIBTOOL_FALSE='#'
  else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 +  GL_COND_LIBTOOL_TRUE='#'
 +  GL_COND_LIBTOOL_FALSE=
 +fi
  
 -#include <sys/types.h>
 -#include <sys/stat.h>
 -#include <fcntl.h>
 -#include <sys/time.h>
 -#include <time.h>
 -#include <unistd.h>
 -#include <stdlib.h>
 -#include <stdio.h>
 -#include <utime.h>
 +  gl_cond_libtool=false
 +  gl_libdeps=
 +  gl_ltlibdeps=
 +  gl_m4_base='m4'
  
 -static int
 -inorder (time_t a, time_t b, time_t c)
 -{
 -  return a <= b && b <= c;
 -}
  
 -int
 -main ()
 -{
 -  int result = 0;
 -  char const *file = "conftest.utimes";
 -  static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
  
 -  /* Test whether utimes() essentially works.  */
 -  {
 -    struct stat sbuf;
 -    FILE *f = fopen (file, "w");
 -    if (f == NULL)
 -      result |= 1;
 -    else if (fclose (f) != 0)
 -      result |= 1;
 -    else if (utimes (file, timeval) != 0)
 -      result |= 2;
 -    else if (lstat (file, &sbuf) != 0)
 -      result |= 1;
 -    else if (!(sbuf.st_atime == timeval[0].tv_sec
 -               && sbuf.st_mtime == timeval[1].tv_sec))
 -      result |= 4;
 -    if (unlink (file) != 0)
 -      result |= 1;
 -  }
  
 -  /* Test whether utimes() with a NULL argument sets the file's timestamp
 -     to the current time.  Use 'fstat' as well as 'time' to
 -     determine the "current" time, to accommodate NFS file systems
 -     if there is a time skew between the host and the NFS server.  */
 -  {
 -    int fd = open (file, O_WRONLY|O_CREAT, 0644);
 -    if (fd < 0)
 -      result |= 1;
 -    else
 -      {
 -        time_t t0, t2;
 -        struct stat st0, st1, st2;
 -        if (time (&t0) == (time_t) -1)
 -          result |= 1;
 -        else if (fstat (fd, &st0) != 0)
 -          result |= 1;
 -        else if (utimes (file, timeval) != 0)
 -          result |= 2;
 -        else if (utimes (file, NULL) != 0)
 -          result |= 8;
 -        else if (fstat (fd, &st1) != 0)
 -          result |= 1;
 -        else if (write (fd, "\n", 1) != 1)
 -          result |= 1;
 -        else if (fstat (fd, &st2) != 0)
 -          result |= 1;
 -        else if (time (&t2) == (time_t) -1)
 -          result |= 1;
 -        else
 -          {
 -            int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
 -            int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
 -            if (! (st1.st_atime == st1.st_mtime))
 -              result |= 16;
 -            if (! (m_ok_POSIX || m_ok_NFS))
 -              result |= 32;
 -          }
 -        if (close (fd) != 0)
 -          result |= 1;
 -      }
 -    if (unlink (file) != 0)
 -      result |= 1;
 -  }
  
 -  /* Test whether utimes() with a NULL argument works on read-only files.  */
 -  {
 -    int fd = open (file, O_WRONLY|O_CREAT, 0444);
 -    if (fd < 0)
 -      result |= 1;
 -    else if (close (fd) != 0)
 -      result |= 1;
 -    else if (utimes (file, NULL) != 0)
 -      result |= 64;
 -    if (unlink (file) != 0)
 -      result |= 1;
 -  }
  
 -  return result;
 -}
  
 -_ACEOF
 -if ac_fn_c_try_run "$LINENO"; then :
 -  gl_cv_func_working_utimes=yes
 -else
 -  gl_cv_func_working_utimes=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: $gl_cv_func_working_utimes" >&5
 -$as_echo "$gl_cv_func_working_utimes" >&6; }
  
 -  if test $gl_cv_func_working_utimes = yes; then
 +  gl_source_base='lib'
  
 -$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
  
 -  fi
 -
 -
 -
 -
 -
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
 -$as_echo_n "checking for struct utimbuf... " >&6; }
 -if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#if HAVE_SYS_TIME_H
 -             #include <sys/time.h>
 -            #endif
 -            #include <time.h>
 -            #ifdef HAVE_UTIME_H
 -             #include <utime.h>
 -            #endif
 -
 -int
 -main ()
 -{
 -static struct utimbuf x; x.actime = x.modtime;
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  gl_cv_sys_struct_utimbuf=yes
 -else
 -  gl_cv_sys_struct_utimbuf=no
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
 -$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
 -
 -  if test $gl_cv_sys_struct_utimbuf = yes; then
 -
 -$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
 -
 -  fi
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -   if false; then
 -  GL_COND_LIBTOOL_TRUE=
 -  GL_COND_LIBTOOL_FALSE='#'
 -else
 -  GL_COND_LIBTOOL_TRUE='#'
 -  GL_COND_LIBTOOL_FALSE=
 -fi
 -
 -  gl_cond_libtool=false
 -  gl_libdeps=
 -  gl_ltlibdeps=
 -  gl_m4_base='m4'
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -  gl_source_base='lib'
 -
 -
 -  if test $ac_cv_func_alloca_works = no; then
 -    :
 +  if test $ac_cv_func_alloca_works = no; then
 +    :
    fi
  
    # Define an additional variable used in the Makefile substitution.
  
  
  
 -  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
 -  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
 -
 -  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
 -  # programs in the package would end up linked with that potentially-shared
 -  # library, inducing unnecessary run-time overhead.
 -  LIB_CLOCK_GETTIME=
 -
 -  gl_saved_libs=$LIBS
 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
 -$as_echo_n "checking for library containing clock_gettime... " >&6; }
 -if test "${ac_cv_search_clock_gettime+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 clock_gettime ();
 -int
 -main ()
 -{
 -return clock_gettime ();
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -for ac_lib in '' rt posix4; 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_clock_gettime=$ac_res
 -fi
 -rm -f core conftest.err conftest.$ac_objext \
 -    conftest$ac_exeext
 -  if test "${ac_cv_search_clock_gettime+set}" = set; then :
 -  break
 -fi
 -done
 -if test "${ac_cv_search_clock_gettime+set}" = set; then :
 -
 -else
 -  ac_cv_search_clock_gettime=no
 -fi
 -rm conftest.$ac_ext
 -LIBS=$ac_func_search_save_LIBS
 -fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
 -$as_echo "$ac_cv_search_clock_gettime" >&6; }
 -ac_res=$ac_cv_search_clock_gettime
 -if test "$ac_res" != no; then :
 -  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 -  test "$ac_cv_search_clock_gettime" = "none required" ||
 -                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
 -fi
 -
 -    for ac_func in clock_gettime clock_settime
 -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
 -
 -  LIBS=$gl_saved_libs
 -
 -
 -
 -
    :
  
  
@@@ -18846,6 -19902,7 +19469,6 @@@ if test $HAVE_DUP2 = 0 || test $REPLACE
  
    gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
  
 -
  fi
  
  
  
  
  
+           GNULIB_ENVIRON=1
  # Persuade glibc <stdlib.h> to declare getloadavg().
  
  
  gl_save_LIBS=$LIBS
  
 -# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
 +# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,
  # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
  HAVE_GETLOADAVG=1
  ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
    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 :
  
@@@ -19271,6 -20340,8 +19906,6 @@@ if test $HAVE_GETLOADAVG = 0; the
  
  # Figure out what our getloadavg.c needs.
  
 -
 -
  # On HPUX9, an unprivileged user can get load averages this way.
  if test $gl_func_getloadavg_done = no; then
    for ac_func in pstat_getdynamic
  
  
  
 -
      REPLACE_GETOPT=0
 -    if test -n "$gl_replace_getopt"; then
 +
 +
 +  if test -n "$gl_replace_getopt"; then :
 +
        REPLACE_GETOPT=1
 -    fi
 +
 +fi
 +
  
    if test $REPLACE_GETOPT = 1; then
  
  
  
  
 +  if test $ac_cv_func_lstat = yes; then
  
 -
 -
 -
 -
 -  gl_gettimeofday_timezone=void
 -  if test $ac_cv_func_gettimeofday != yes; then
 -    HAVE_GETTIMEOFDAY=0
 +    case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
 +      *no)
 +        REPLACE_LSTAT=1
 +        ;;
 +    esac
    else
 +    HAVE_LSTAT=0
 +  fi
  
 +if test $REPLACE_LSTAT = 1; then
  
  
 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
 -$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
 -if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  if test "$cross_compiling" = yes; then :
 -  # When cross-compiling:
 -      case "$host_os" in
 -                # Guess all is fine on glibc systems.
 -        *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
 -                # If we don't know, assume the worst.
 -        *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
 -      esac
 -
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <string.h>
 -          #include <sys/time.h>
 -          #include <time.h>
 -          #include <stdlib.h>
  
 -int
 -main ()
 -{
  
 -          time_t t = 0;
 -          struct tm *lt;
 -          struct tm saved_lt;
 -          struct timeval tv;
 -          lt = localtime (&t);
 -          saved_lt = *lt;
 -          gettimeofday (&tv, NULL);
 -          return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
  
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_run "$LINENO"; then :
 -  gl_cv_func_gettimeofday_clobber=no
 -else
 -  gl_cv_func_gettimeofday_clobber=yes
 -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: $gl_cv_func_gettimeofday_clobber" >&5
 -$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
  
 - case "$gl_cv_func_gettimeofday_clobber" in
 -   *yes)
 -     REPLACE_GETTIMEOFDAY=1
  
 +  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
  
 -$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
  
  
 -$as_echo "#define localtime rpl_localtime" >>confdefs.h
 +  :
  
 +fi
  
  
 -$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
  
 -     ;;
 - esac
  
 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
 -$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
 -if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <sys/time.h>
 -              struct timeval c;
 -              int gettimeofday (struct timeval *restrict, void *restrict);
  
 -int
 -main ()
 -{
 -/* glibc uses struct timezone * rather than the POSIX void *
 -                 if _GNU_SOURCE is defined.  However, since the only portable
 -                 use of gettimeofday uses NULL as the second parameter, and
 -                 since the glibc definition is actually more typesafe, it is
 -                 not worth wrapping this to get a compliant signature.  */
 -              int (*f) (struct timeval *restrict, void *restrict)
 -                = gettimeofday;
 -              int x = f (&c, 0);
 -              return !(x | c.tv_sec | c.tv_usec);
 +          GNULIB_LSTAT=1
  
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  gl_cv_func_gettimeofday_posix_signature=yes
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <sys/time.h>
 -int gettimeofday (struct timeval *restrict, struct timezone *restrict);
  
 -int
 -main ()
 -{
  
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  gl_cv_func_gettimeofday_posix_signature=almost
 -else
 -  gl_cv_func_gettimeofday_posix_signature=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
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
 -$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
 -    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
 -      gl_gettimeofday_timezone='struct timezone'
 -    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
 -      REPLACE_GETTIMEOFDAY=1
 -    fi
 -        if test $REPLACE_STRUCT_TIMEVAL = 1; then
 -      REPLACE_GETTIMEOFDAY=1
 -    fi
  
 -  fi
  
 -cat >>confdefs.h <<_ACEOF
 -#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
 -_ACEOF
  
  
 -if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
  
  
  
  
 +  if test $APPLE_UNIVERSAL_BUILD = 1; then
 +    # A universal build on Apple MacOS X platforms.
 +    # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
 +    # But we need a configuration result that is valid in both modes.
 +    gl_cv_func_working_mktime=no
 +  fi
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
 +$as_echo_n "checking for working mktime... " >&6; }
 +if test "${gl_cv_func_working_mktime+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  if test "$cross_compiling" = yes; then :
 +  gl_cv_func_working_mktime=no
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +/* Test program from Paul Eggert and Tony Leneis.  */
 +#include <limits.h>
 +#include <stdlib.h>
 +#include <time.h>
  
 +#ifdef HAVE_UNISTD_H
 +# include <unistd.h>
 +#endif
  
 +#ifndef HAVE_ALARM
 +# define alarm(X) /* empty */
 +#endif
  
 +/* Work around redefinition to rpl_putenv by other config tests.  */
 +#undef putenv
  
 -  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
 +static time_t time_t_max;
 +static time_t time_t_min;
  
 -
 -  for ac_header in sys/timeb.h
 -do :
 -  ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
 -if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_SYS_TIMEB_H 1
 -_ACEOF
 -
 -fi
 -
 -done
 -
 -  for ac_func in _ftime
 -do :
 -  ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
 -if test "x$ac_cv_func__ftime" = x""yes; then :
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE__FTIME 1
 -_ACEOF
 -
 -fi
 -done
 -
 -
 -fi
 -
 -
 -
 -
 -
 -          GNULIB_GETTIMEOFDAY=1
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -  if test $ac_cv_func_lstat = yes; then
 -
 -    case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
 -      *no)
 -        REPLACE_LSTAT=1
 -        ;;
 -    esac
 -  else
 -    HAVE_LSTAT=0
 -  fi
 -
 -if test $REPLACE_LSTAT = 1; then
 -
 -
 -
 -
 -
 -
 -
 -
 -  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
 -
 -
 -
 -  :
 -
 -fi
 -
 -
 -
 -
 -
 -          GNULIB_LSTAT=1
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -  if test $APPLE_UNIVERSAL_BUILD = 1; then
 -    # A universal build on Apple Mac OS X platforms.
 -    # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
 -    # But we need a configuration result that is valid in both modes.
 -    gl_cv_func_working_mktime=no
 -  fi
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
 -$as_echo_n "checking for working mktime... " >&6; }
 -if test "${gl_cv_func_working_mktime+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  if test "$cross_compiling" = yes; then :
 -  gl_cv_func_working_mktime=no
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -/* Test program from Paul Eggert and Tony Leneis.  */
 -#include <limits.h>
 -#include <stdlib.h>
 -#include <time.h>
 -
 -#ifdef HAVE_UNISTD_H
 -# include <unistd.h>
 -#endif
 -
 -#ifndef HAVE_ALARM
 -# define alarm(X) /* empty */
 -#endif
 -
 -/* Work around redefinition to rpl_putenv by other config tests.  */
 -#undef putenv
 -
 -static time_t time_t_max;
 -static time_t time_t_min;
 -
 -/* Values we'll use to set the TZ environment variable.  */
 -static char *tz_strings[] = {
 -  (char *) 0, "TZ=GMT0", "TZ=JST-9",
 -  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
 -};
 -#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
 +/* Values we'll use to set the TZ environment variable.  */
 +static char *tz_strings[] = {
 +  (char *) 0, "TZ=GMT0", "TZ=JST-9",
 +  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
 +};
 +#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
  
  /* Return 0 if mktime fails to convert a date in the spring-forward gap.
     Based on a problem report from Andreas Jaeger.  */
@@@ -19712,20 -20985,23 +20347,20 @@@ main (
        if (tz_strings[i])
          putenv (tz_strings[i]);
  
 -      for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
 +      for (t = 0; t <= time_t_max - delta; t += delta)
          if (! mktime_test (t))
            result |= 1;
 -      if ((result & 2) == 0
 -          && ! (mktime_test ((time_t) 1)
 -                && mktime_test ((time_t) (60 * 60))
 -                && mktime_test ((time_t) (60 * 60 * 24))))
 +      if (! (mktime_test ((time_t) 1)
 +             && mktime_test ((time_t) (60 * 60))
 +             && mktime_test ((time_t) (60 * 60 * 24))))
          result |= 2;
  
 -      for (j = 1; (result & 4) == 0; j <<= 1)
 -        {
 -          if (! bigtime_test (j))
 -            result |= 4;
 -          if (INT_MAX / 2 < j)
 -            break;
 -        }
 -      if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
 +      for (j = 1; ; j <<= 1)
 +        if (! bigtime_test (j))
 +          result |= 4;
 +        else if (INT_MAX / 2 < j)
 +          break;
 +      if (! bigtime_test (INT_MAX))
          result |= 8;
      }
    if (! irix_6_4_bug ())
  
  
  
 +<<<<<<< TREE
 +<<<<<<< TREE
 +=======
 +=======
  
  
 -
 -  if test $ac_cv_func_pselect = yes; then
 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
 -$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
 -if test "${gl_cv_sig_pselect+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <sys/select.h>
 -
 -int
 -main ()
 -{
 -int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
 -                          struct timespec const *restrict,
 -                          sigset_t const *restrict) = pselect;
 -                return !p;
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_link "$LINENO"; then :
 -  gl_cv_sig_pselect=yes
 -else
 -  gl_cv_sig_pselect=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: $gl_cv_sig_pselect" >&5
 -$as_echo "$gl_cv_sig_pselect" >&6; }
 -  fi
 -
 -  if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
 -    REPLACE_PSELECT=1
 -  fi
 -
 -if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
 -
 -
 -
 -
 -
 -
 -
 -
 -  gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
 -
 -fi
 -
 -
 -
 -
 -
 -          GNULIB_PSELECT=1
 -
 -
 -
 -
 -
 -
 -
 -
 -
 +>>>>>>> MERGE-SOURCE
    LIB_PTHREAD_SIGMASK=
  
  
  
  
  
 +>>>>>>> MERGE-SOURCE
  
    if test $ac_cv_func_readlink = no; then
      HAVE_READLINK=0
  
  
  
 +<<<<<<< TREE
 +=======
  
  
  
                 esac
                                               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  
 +<<<<<<< TREE
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'signal.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'signal.h\)".*#\1#
 +                   s#^/[^/]#//&#
 +=======
                 gl_header_literal_regex=`echo 'signal.h' \
                                          | sed -e "$gl_make_literal_regex_sed"`
                 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
                     s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
                     s|^/[^/]|//&|
 +>>>>>>> MERGE-SOURCE
                     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
@@@ -20351,101 -21677,241 +20986,101 @@@ $as_echo "#define ssize_t int" >>confde
    fi
  
  
 -
 -
 -
 -
 -  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
 -     #include <sys/stat.h>
 -"
 -if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
 -
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
 -_ACEOF
 -
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
 -$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
 -if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
 +$as_echo_n "checking for working stdalign.h... " >&6; }
 +if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 +#include <stdalign.h>
 +            #include <stddef.h>
 +
 +            /* Test that alignof yields a result consistent with offsetof.
 +               This catches GCC bug 52023
 +               <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
 +            #ifdef __cplusplus
 +               template <class t> struct alignof_helper { char a; t b; };
 +            # define ao(type) offsetof (alignof_helper<type>, b)
 +            #else
 +            # define ao(type) offsetof (struct { char a; type b; }, b)
 +            #endif
 +            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
 +            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
 +            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
  
 -            #include <sys/types.h>
 -            #include <sys/stat.h>
 -            #if HAVE_SYS_TIME_H
 -            # include <sys/time.h>
 +            /* Test _Alignas only on platforms where gnulib can help.  */
 +            #if \
 +                (__GNUC__ || __IBMC__ || __IBMCPP__ \
 +                 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
 +              int alignas (8) alignas_int = 1;
 +              char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
              #endif
 -            #include <time.h>
 -            struct timespec ts;
 -            struct stat st;
  
  int
  main ()
  {
  
 -            st.st_atim = ts;
 -
    ;
    return 0;
  }
  _ACEOF
  if ac_fn_c_try_compile "$LINENO"; then :
 -  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
 +  gl_cv_header_working_stdalign_h=yes
  else
 -  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
 +  gl_cv_header_working_stdalign_h=no
  fi
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
 -$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
 -     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
 -
 -$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
 -
 -     fi
 -else
 -  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
 -        #include <sys/stat.h>
 -"
 -if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
 +$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
  
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
 -_ACEOF
 +  if test $gl_cv_header_working_stdalign_h = yes; then
 +    STDALIGN_H=''
 +  else
 +    STDALIGN_H='stdalign.h'
 +  fi
  
  
 +   if test -n "$STDALIGN_H"; then
 +  GL_GENERATE_STDALIGN_H_TRUE=
 +  GL_GENERATE_STDALIGN_H_FALSE='#'
  else
 -  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
 -           #include <sys/stat.h>
 -"
 -if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
 +  GL_GENERATE_STDALIGN_H_TRUE='#'
 +  GL_GENERATE_STDALIGN_H_FALSE=
 +fi
  
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
 -_ACEOF
  
  
 +  STDARG_H=''
 +  NEXT_STDARG_H='<stdarg.h>'
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
 +$as_echo_n "checking for va_copy... " >&6; }
 +  if test "${gl_cv_func_va_copy+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
  else
 -  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
 -              #include <sys/stat.h>
 -"
 -if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
 -
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
 -_ACEOF
  
 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <stdarg.h>
 +int
 +main ()
 +{
  
 -fi
 -
 -fi
 +#ifndef va_copy
 +void (*func) (va_list, va_list) = va_copy;
 +#endif
  
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  gl_cv_func_va_copy=yes
 +else
 +  gl_cv_func_va_copy=no
  fi
 -
 -fi
 -
 -
 -
 -
 -
 -
 -  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
 -     #include <sys/stat.h>
 -"
 -if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
 -
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
 -_ACEOF
 -
 -
 -else
 -  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
 -        #include <sys/stat.h>
 -"
 -if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
 -
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
 -_ACEOF
 -
 -
 -else
 -  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
 -          #include <sys/stat.h>
 -"
 -if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
 -
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
 -_ACEOF
 -
 -
 -fi
 -
 -fi
 -
 -fi
 -
 -
 -
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
 -$as_echo_n "checking for working stdalign.h... " >&6; }
 -if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <stdalign.h>
 -            #include <stddef.h>
 -
 -            /* Test that alignof yields a result consistent with offsetof.
 -               This catches GCC bug 52023
 -               <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
 -            #ifdef __cplusplus
 -               template <class t> struct alignof_helper { char a; t b; };
 -            # define ao(type) offsetof (alignof_helper<type>, b)
 -            #else
 -            # define ao(type) offsetof (struct { char a; type b; }, b)
 -            #endif
 -            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
 -            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
 -            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
 -
 -            /* Test _Alignas only on platforms where gnulib can help.  */
 -            #if \
 -                (__GNUC__ || __IBMC__ || __IBMCPP__ \
 -                 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
 -              int alignas (8) alignas_int = 1;
 -              char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
 -            #endif
 -
 -int
 -main ()
 -{
 -
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  gl_cv_header_working_stdalign_h=yes
 -else
 -  gl_cv_header_working_stdalign_h=no
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
 -$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
 -
 -  if test $gl_cv_header_working_stdalign_h = yes; then
 -    STDALIGN_H=''
 -  else
 -    STDALIGN_H='stdalign.h'
 -  fi
 -
 -
 -   if test -n "$STDALIGN_H"; then
 -  GL_GENERATE_STDALIGN_H_TRUE=
 -  GL_GENERATE_STDALIGN_H_FALSE='#'
 -else
 -  GL_GENERATE_STDALIGN_H_TRUE='#'
 -  GL_GENERATE_STDALIGN_H_FALSE=
 -fi
 -
 -
 -
 -  STDARG_H=''
 -  NEXT_STDARG_H='<stdarg.h>'
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
 -$as_echo_n "checking for va_copy... " >&6; }
 -  if test "${gl_cv_func_va_copy+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -
 -    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <stdarg.h>
 -int
 -main ()
 -{
 -
 -#ifndef va_copy
 -void (*func) (va_list, va_list) = va_copy;
 -#endif
 -
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  gl_cv_func_va_copy=yes
 -else
 -  gl_cv_func_va_copy=no
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
  
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
                 esac
                                               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  
 +<<<<<<< TREE
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdarg.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'stdarg.h\)".*#\1#
 +                   s#^/[^/]#//&#
 +=======
                 gl_header_literal_regex=`echo 'stdarg.h' \
                                          | sed -e "$gl_make_literal_regex_sed"`
                 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
                     s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
                     s|^/[^/]|//&|
 +>>>>>>> MERGE-SOURCE
                     p
                     q
                   }'
                 esac
                                               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  
 +<<<<<<< TREE
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stddef.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'stddef.h\)".*#\1#
 +                   s#^/[^/]#//&#
 +=======
                 gl_header_literal_regex=`echo 'stddef.h' \
                                          | sed -e "$gl_make_literal_regex_sed"`
                 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
                     s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
                     s|^/[^/]|//&|
 +>>>>>>> MERGE-SOURCE
                     p
                     q
                   }'
                 esac
                                               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  
 +<<<<<<< TREE
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdio.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'stdio.h\)".*#\1#
 +                   s#^/[^/]#//&#
 +=======
                 gl_header_literal_regex=`echo 'stdio.h' \
                                          | sed -e "$gl_make_literal_regex_sed"`
                 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
                     s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
                     s|^/[^/]|//&|
 +>>>>>>> MERGE-SOURCE
                     p
                     q
                   }'
@@@ -20831,7 -22279,21 +21466,7 @@@ $as_echo "$gl_cv_next_stdio_h" >&6; 
  
  
        GNULIB_FSCANF=1
 -
 -
 -cat >>confdefs.h <<_ACEOF
 -#define GNULIB_FSCANF 1
 -_ACEOF
 -
 -
    GNULIB_SCANF=1
 -
 -
 -cat >>confdefs.h <<_ACEOF
 -#define GNULIB_SCANF 1
 -_ACEOF
 -
 -
    GNULIB_FGETC=1
    GNULIB_GETC=1
    GNULIB_GETCHAR=1
                 esac
                                               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  
 +<<<<<<< TREE
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdlib.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'stdlib.h\)".*#\1#
 +                   s#^/[^/]#//&#
 +=======
                 gl_header_literal_regex=`echo 'stdlib.h' \
                                          | sed -e "$gl_make_literal_regex_sed"`
                 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
                     s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
                     s|^/[^/]|//&|
 +>>>>>>> MERGE-SOURCE
                     p
                     q
                   }'
@@@ -20950,8 -22406,6 +21585,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
  
  
  
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
 -$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
 -if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -
 -                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <sys/select.h>
 -int
 -main ()
 -{
 -struct timeval b;
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  gl_cv_header_sys_select_h_selfcontained=yes
 -else
 -  gl_cv_header_sys_select_h_selfcontained=no
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
 -        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <sys/select.h>
 -int
 -main ()
 -{
 -int memset; int bzero;
 -  ;
 -  return 0;
 -}
 -
 -_ACEOF
 -if ac_fn_c_try_compile "$LINENO"; then :
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <sys/select.h>
 -int
 -main ()
 -{
 -
 -                  #undef memset
 -                  #define memset nonexistent_memset
 -                  extern
 -                  #ifdef __cplusplus
 -                  "C"
 -                  #endif
 -                  void *memset (void *, int, unsigned long);
 -                  #undef bzero
 -                  #define bzero nonexistent_bzero
 -                  extern
 -                  #ifdef __cplusplus
 -                  "C"
 -                  #endif
 -                  void bzero (void *, unsigned long);
 -                  fd_set fds;
 -                  FD_ZERO (&fds);
 -
 -  ;
 -  return 0;
 -}
  
 -_ACEOF
 -if ac_fn_c_try_link "$LINENO"; then :
  
 -else
 -  gl_cv_header_sys_select_h_selfcontained=no
 -fi
 -rm -f core conftest.err conftest.$ac_objext \
 -    conftest$ac_exeext conftest.$ac_ext
  
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -      fi
  
 -fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
 -$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
  
  
  
  
  
       if test $gl_cv_have_include_next = yes; then
 -       gl_cv_next_sys_select_h='<'sys/select.h'>'
 +       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
       else
 -       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
 -$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
 -if test "${gl_cv_next_sys_select_h+set}" = set; then :
 +       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
 +$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
 +if test "${gl_cv_next_sys_stat_h+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
  
 -             if test $ac_cv_header_sys_select_h = yes; then
 +             if test $ac_cv_header_sys_stat_h = yes; then
  
  
                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -#include <sys/select.h>
 +#include <sys/stat.h>
  
  _ACEOF
                                                                                                                          case "$host_os" in
                 esac
                                               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  
 -               gl_header_literal_regex=`echo 'sys/select.h' \
 +<<<<<<< TREE
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'sys/stat.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'sys/stat.h\)".*#\1#
 +                   s#^/[^/]#//&#
 +=======
 +               gl_header_literal_regex=`echo 'sys/stat.h' \
                                          | sed -e "$gl_make_literal_regex_sed"`
                 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
                     s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
                     s|^/[^/]|//&|
 +>>>>>>> MERGE-SOURCE
                     p
                     q
                   }'
 -                                                            gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
 +                                                            gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
                        sed -n "$gl_absolute_header_sed"`'"'
            else
 -               gl_cv_next_sys_select_h='<'sys/select.h'>'
 +               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
               fi
  
  
  fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
 -$as_echo "$gl_cv_next_sys_select_h" >&6; }
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
 +$as_echo "$gl_cv_next_sys_stat_h" >&6; }
       fi
 -     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
 +     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
  
       if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
         # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
 -       gl_next_as_first_directive='<'sys/select.h'>'
 +       gl_next_as_first_directive='<'sys/stat.h'>'
       else
         # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
 -       gl_next_as_first_directive=$gl_cv_next_sys_select_h
 +       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
       fi
 -     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
 -
 -
 +     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
  
  
 -  if test $ac_cv_header_sys_select_h = yes; then
 -    HAVE_SYS_SELECT_H=1
 -  else
 -    HAVE_SYS_SELECT_H=0
 -  fi
  
  
  
 +<<<<<<< TREE
 +=======
  
  
 -  if test $ac_cv_header_sys_socket_h != yes; then
 -                    for ac_header in winsock2.h
 -do :
 -  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
 -if test "x$ac_cv_header_winsock2_h" = x""yes; then :
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_WINSOCK2_H 1
 -_ACEOF
  
 -fi
  
 -done
  
 -  fi
 -  if test "$ac_cv_header_winsock2_h" = yes; then
 -    HAVE_WINSOCK2_H=1
 -    UNISTD_H_HAVE_WINSOCK2_H=1
 -    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
 -  else
 -    HAVE_WINSOCK2_H=0
 -  fi
  
 +  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
  
 +$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
  
 +  fi
  
 +>>>>>>> MERGE-SOURCE
 +      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
 +     #include <sys/stat.h>
 +"
 +if test "x$ac_cv_type_nlink_t" = x""yes; then :
  
 +else
  
 +$as_echo "#define nlink_t int" >>confdefs.h
  
 +fi
  
  
  
  
  
       if test $gl_cv_have_include_next = yes; then
 -       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
 +       gl_cv_next_sys_types_h='<'sys/types.h'>'
       else
 -       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
 -$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
 -if test "${gl_cv_next_sys_stat_h+set}" = set; then :
 +       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
 +$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
 +if test "${gl_cv_next_sys_types_h+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
  
 -             if test $ac_cv_header_sys_stat_h = yes; then
 -
 -
                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -#include <sys/stat.h>
 +#include <sys/types.h>
  
  _ACEOF
                                                                                                                          case "$host_os" in
                 esac
                                               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  
 -               gl_header_literal_regex=`echo 'sys/stat.h' \
 +               gl_header_literal_regex=`echo 'sys/types.h' \
                                          | sed -e "$gl_make_literal_regex_sed"`
                 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
                     s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
                     p
                     q
                   }'
 -                                                            gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
 +                                                            gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
                        sed -n "$gl_absolute_header_sed"`'"'
 -          else
 -               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
 -             fi
  
  
  fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
 -$as_echo "$gl_cv_next_sys_stat_h" >&6; }
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
 +$as_echo "$gl_cv_next_sys_types_h" >&6; }
       fi
 -     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
 +     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
  
       if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
         # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
 -       gl_next_as_first_directive='<'sys/stat.h'>'
 +       gl_next_as_first_directive='<'sys/types.h'>'
       else
         # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
 -       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
 +       gl_next_as_first_directive=$gl_cv_next_sys_types_h
       fi
 -     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
 -
 +     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
  
  
  
  
  
  
 -  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
  
 -$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
  
 -  fi
  
 -      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
 -     #include <sys/stat.h>
 -"
 -if test "x$ac_cv_type_nlink_t" = x""yes; then :
  
 -else
  
 -$as_echo "#define nlink_t int" >>confdefs.h
  
 -fi
  
  
  
  
  
  
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -
 -      ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
 -"
 -if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
 -  ac_have_decl=1
 -else
 -  ac_have_decl=0
 -fi
 -
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_LOCALTIME_R $ac_have_decl
 -_ACEOF
 -
    if test $ac_cv_have_decl_localtime_r = no; then
      HAVE_DECL_LOCALTIME_R=0
    fi
  
  
  
 -
 -
 -
  
  
       if test $gl_cv_have_include_next = yes; then
                 esac
                                               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
  
 +<<<<<<< TREE
 +               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'unistd.h#{
 +                   s#.*"\(.*'"${gl_dirsep_regex}"'unistd.h\)".*#\1#
 +                   s#^/[^/]#//&#
 +=======
                 gl_header_literal_regex=`echo 'unistd.h' \
                                          | sed -e "$gl_make_literal_regex_sed"`
                 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
                     s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
                     s|^/[^/]|//&|
 +>>>>>>> MERGE-SOURCE
                     p
                     q
                   }'
@@@ -21578,14 -23152,74 +22213,14 @@@ $as_echo "$gl_cv_next_unistd_h" >&6; 
  
  
  
 -
 -
 -
 -
 -
 -
 -  if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
 -                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
 -$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
 -if test "${gl_cv_func_futimesat_works+set}" = set; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  touch conftest.file
 -       if test "$cross_compiling" = yes; then :
 -  case "$host_os" in
 -                   # Guess yes on glibc systems.
 -           *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
 -                   # If we don't know, assume the worst.
 -           *)      gl_cv_func_futimesat_works="guessing no" ;;
 -         esac
 -
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -
 -#include <stddef.h>
 -#include <sys/times.h>
 -#include <fcntl.h>
 -
 -int
 -main ()
 -{
 -    int fd = open ("conftest.file", O_RDWR);
 -          if (fd < 0) return 1;
 -          if (futimesat (fd, NULL, NULL)) return 2;
 -
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_c_try_run "$LINENO"; then :
 -  gl_cv_func_futimesat_works=yes
 -else
 -  gl_cv_func_futimesat_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
 -
 -      rm -f conftest.file
 -fi
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
 -$as_echo "$gl_cv_func_futimesat_works" >&6; }
 -    case "$gl_cv_func_futimesat_works" in
 -      *yes) ;;
 -      *)
 -
 -$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
 -
 -        ;;
 -    esac
 -  fi
 -
    gl_gnulib_enabled_dosname=false
    gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
 +<<<<<<< TREE
 +=======
    gl_gnulib_enabled_pathmax=false
 +  gl_gnulib_enabled_sigprocmask=false
 +>>>>>>> MERGE-SOURCE
    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
 +<<<<<<< TREE
 +=======
 +=======
    func_gl_gnulib_m4code_pathmax ()
    {
      if ! $gl_gnulib_enabled_pathmax; then
        gl_gnulib_enabled_pathmax=true
      fi
    }
 +>>>>>>> MERGE-SOURCE
 +  func_gl_gnulib_m4code_sigprocmask ()
 +  {
 +    if ! $gl_gnulib_enabled_sigprocmask; then
 +
 +
 +
 +  if test $gl_cv_type_sigset_t = yes; then
 +    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
 +if test "x$ac_cv_func_sigprocmask" = x""yes; then :
 +  gl_cv_func_sigprocmask=1
 +fi
 +
 +  fi
 +  if test -z "$gl_cv_func_sigprocmask"; then
 +    HAVE_POSIX_SIGNALBLOCKING=0
 +  fi
 +
 +if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
 +
 +
 +
 +
 +
 +
 +
 +
 +  gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
 +
 +  :
 +fi
 +
 +
 +
 +
 +
 +          GNULIB_SIGPROCMASK=1
 +
 +
 +
 +
 +
 +      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
 +<<<<<<< TREE
 +>>>>>>> MERGE-SOURCE
 +=======
          func_gl_gnulib_m4code_pathmax
        fi
        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
@@@ -21832,1815 -23407,66 +22467,1815 @@@ if test "x$ac_cv_func_strtoll" = x""yes
  _ACEOF
  
  fi
 -done
 +done
 +
 +    if test $ac_cv_func_strtoll = no; then
 +      HAVE_STRTOLL=0
 +    fi
 +  fi
 +
 +if test $HAVE_STRTOLL = 0; then
 +
 +
 +
 +
 +
 +
 +
 +
 +  gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
 +
 +
 +  :
 +
 +fi
 +
 +
 +
 +
 +
 +          GNULIB_STRTOLL=1
 +
 +
 +
 +
 +
 +      gl_gnulib_enabled_strtoll=true
 +    fi
 +  }
 +>>>>>>> MERGE-SOURCE
 +  func_gl_gnulib_m4code_strtoull ()
 +  {
 +    if ! $gl_gnulib_enabled_strtoull; then
 +
 +
 +
 +  if test "$ac_cv_type_unsigned_long_long_int" = yes; then
 +    for ac_func in strtoull
 +do :
 +  ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
 +if test "x$ac_cv_func_strtoull" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRTOULL 1
 +_ACEOF
 +
 +fi
 +done
 +
 +    if test $ac_cv_func_strtoull = no; then
 +      HAVE_STRTOULL=0
 +    fi
 +  fi
 +
 +if test $HAVE_STRTOULL = 0; then
 +
 +
 +
 +
 +
 +
 +
 +
 +  gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
 +
 +
 +  :
 +
 +fi
 +
 +
 +
 +
 +
 +          GNULIB_STRTOULL=1
 +
 +
 +
 +
 +
 +      gl_gnulib_enabled_strtoull=true
 +    fi
 +  }
 +  func_gl_gnulib_m4code_verify ()
 +  {
 +    if ! $gl_gnulib_enabled_verify; then
 +      gl_gnulib_enabled_verify=true
 +    fi
 +  }
 +  if test $REPLACE_GETOPT = 1; then
 +    func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
 +  fi
 +  if test $REPLACE_LSTAT = 1; then
 +    func_gl_gnulib_m4code_dosname
 +  fi
 +  if test $REPLACE_LSTAT = 1; then
 +    func_gl_gnulib_m4code_stat
 +  fi
 +  if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
 +    func_gl_gnulib_m4code_stat
 +  fi
 +<<<<<<< TREE
 +<<<<<<< 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
 +  if test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then
 +=======
 +  if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
 +>>>>>>> MERGE-SOURCE
 +    func_gl_gnulib_m4code_strtoll
 +  fi
 +<<<<<<< TREE
 +  if test $ac_cv_func_strtoumax = no; then
 +>>>>>>> MERGE-SOURCE
 +=======
 +  if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; 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
 +    func_gl_gnulib_m4code_strtoull
 +  fi
 +  if test $ac_cv_func_strtoumax = no; then
 +    func_gl_gnulib_m4code_verify
 +  fi
 +
 +   if $gl_gnulib_enabled_dosname; then
 +  gl_GNULIB_ENABLED_dosname_TRUE=
 +  gl_GNULIB_ENABLED_dosname_FALSE='#'
 +else
 +  gl_GNULIB_ENABLED_dosname_TRUE='#'
 +  gl_GNULIB_ENABLED_dosname_FALSE=
 +fi
 +
 +   if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
 +  gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
 +  gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
 +else
 +  gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
 +  gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
 +fi
 +
 +<<<<<<< TREE
 +=======
 +   if $gl_gnulib_enabled_pathmax; then
 +  gl_GNULIB_ENABLED_pathmax_TRUE=
 +  gl_GNULIB_ENABLED_pathmax_FALSE='#'
 +else
 +  gl_GNULIB_ENABLED_pathmax_TRUE='#'
 +  gl_GNULIB_ENABLED_pathmax_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
 +
 +>>>>>>> MERGE-SOURCE
 +   if $gl_gnulib_enabled_stat; then
 +  gl_GNULIB_ENABLED_stat_TRUE=
 +  gl_GNULIB_ENABLED_stat_FALSE='#'
 +else
 +  gl_GNULIB_ENABLED_stat_TRUE='#'
 +  gl_GNULIB_ENABLED_stat_FALSE=
 +fi
 +
 +   if $gl_gnulib_enabled_strtoull; then
 +  gl_GNULIB_ENABLED_strtoull_TRUE=
 +  gl_GNULIB_ENABLED_strtoull_FALSE='#'
 +else
 +  gl_GNULIB_ENABLED_strtoull_TRUE='#'
 +  gl_GNULIB_ENABLED_strtoull_FALSE=
 +fi
 +
 +   if $gl_gnulib_enabled_verify; then
 +  gl_GNULIB_ENABLED_verify_TRUE=
 +  gl_GNULIB_ENABLED_verify_FALSE='#'
 +else
 +  gl_GNULIB_ENABLED_verify_TRUE='#'
 +  gl_GNULIB_ENABLED_verify_FALSE=
 +fi
 +
 +  # End of code from modules
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +  gltests_libdeps=
 +  gltests_ltlibdeps=
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +  gl_source_base='tests'
 +  gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
 +
 +  gl_module_indicator_condition=$gltests_WITNESS
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +  LIBGNU_LIBDEPS="$gl_libdeps"
 +
 +  LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
 +
 +
 +
 +# 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
  
 -    if test $ac_cv_func_strtoll = no; then
 -      HAVE_STRTOLL=0
 -    fi
 -  fi
 +version=$PACKAGE_VERSION
  
 -if test $HAVE_STRTOLL = 0; then
 +### Specify what sort of things we'll be editing into Makefile and config.h.
 +### Use configuration here uncanonicalized to avoid exceeding size limits.
  
  
 +## Unused?
  
  
  
  
  
  
 -  gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
  
  
 -  :
  
 -fi
  
  
  
  
  
 -          GNULIB_STRTOLL=1
  
  
  
  
  
 -      gl_gnulib_enabled_strtoll=true
 -    fi
 -  }
 -  func_gl_gnulib_m4code_strtoull ()
 -  {
 -    if ! $gl_gnulib_enabled_strtoull; then
 +
 +## 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.
  
  
  
 -  if test "$ac_cv_type_unsigned_long_long_int" = yes; then
 -    for ac_func in strtoull
 -do :
 -  ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
 -if test "x$ac_cv_func_strtoull" = x""yes; then :
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRTOULL 1
 -_ACEOF
  
 +## Used in lwlib/Makefile.in.
 +
 +if test -n "${machfile}"; then
 +  M_FILE="\$(srcdir)/${machfile}"
 +else
 +  M_FILE=
  fi
 -done
 +S_FILE="\$(srcdir)/${opsysfile}"
  
 -    if test $ac_cv_func_strtoull = no; then
 -      HAVE_STRTOULL=0
 -    fi
 -  fi
  
 -if test $HAVE_STRTOULL = 0; then
  
  
  
  
  
  
 -  gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
 +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
  
 -          GNULIB_STRTOULL=1
 +  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
  
  
  
  
 -      gl_gnulib_enabled_strtoull=true
 -    fi
 -  }
 -  func_gl_gnulib_m4code_verify ()
 -  {
 -    if ! $gl_gnulib_enabled_verify; then
 -      gl_gnulib_enabled_verify=true
 -    fi
 -  }
 -  if test $REPLACE_GETOPT = 1; then
 -    func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
 -  fi
 -  if test $REPLACE_LSTAT = 1; then
 -    func_gl_gnulib_m4code_dosname
 -  fi
 -  if test $REPLACE_LSTAT = 1; then
 -    func_gl_gnulib_m4code_stat
 -  fi
 -  if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
 -    func_gl_gnulib_m4code_stat
 -  fi
 -  if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
 -    func_gl_gnulib_m4code_strtoll
 -  fi
 -  if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
 -    func_gl_gnulib_m4code_verify
 -  fi
 -  if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
 -    func_gl_gnulib_m4code_strtoull
 -  fi
 -  if test $ac_cv_func_strtoumax = no; then
 -    func_gl_gnulib_m4code_verify
 -  fi
 +WIDGET_OBJ=
 +MOTIF_LIBW=
 +if test "${USE_X_TOOLKIT}" != "none" ; then
 +  WIDGET_OBJ=widget.o
  
 -   if $gl_gnulib_enabled_dosname; then
 -  gl_GNULIB_ENABLED_dosname_TRUE=
 -  gl_GNULIB_ENABLED_dosname_FALSE='#'
 -else
 -  gl_GNULIB_ENABLED_dosname_TRUE='#'
 -  gl_GNULIB_ENABLED_dosname_FALSE=
 -fi
 +$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
  
 -   if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
 -  gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
 -  gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
 -else
 -  gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
 -  gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
 -fi
 +  if test "${USE_X_TOOLKIT}" = "LUCID"; then
  
 -   if $gl_gnulib_enabled_pathmax; then
 -  gl_GNULIB_ENABLED_pathmax_TRUE=
 -  gl_GNULIB_ENABLED_pathmax_FALSE='#'
 -else
 -  gl_GNULIB_ENABLED_pathmax_TRUE='#'
 -  gl_GNULIB_ENABLED_pathmax_FALSE=
 -fi
 +$as_echo "#define USE_LUCID 1" >>confdefs.h
  
 -   if $gl_gnulib_enabled_stat; then
 -  gl_GNULIB_ENABLED_stat_TRUE=
 -  gl_GNULIB_ENABLED_stat_FALSE='#'
 -else
 -  gl_GNULIB_ENABLED_stat_TRUE='#'
 -  gl_GNULIB_ENABLED_stat_FALSE=
 -fi
 +  elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
  
 -   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
 +$as_echo "#define USE_MOTIF 1" >>confdefs.h
  
 -   if $gl_gnulib_enabled_strtoull; then
 -  gl_GNULIB_ENABLED_strtoull_TRUE=
 -  gl_GNULIB_ENABLED_strtoull_FALSE='#'
 -else
 -  gl_GNULIB_ENABLED_strtoull_TRUE='#'
 -  gl_GNULIB_ENABLED_strtoull_FALSE=
 -fi
 +    MOTIF_LIBW=-lXm
 +    case "$opsys" in
 +      gnu-linux)
 +        ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
 +        MOTIF_LIBW="$MOTIF_LIBW -lXpm"
 +        ;;
  
 -   if $gl_gnulib_enabled_verify; then
 -  gl_GNULIB_ENABLED_verify_TRUE=
 -  gl_GNULIB_ENABLED_verify_FALSE='#'
 -else
 -  gl_GNULIB_ENABLED_verify_TRUE='#'
 -  gl_GNULIB_ENABLED_verify_FALSE=
 -fi
 +      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"
 +        ;;
  
 -  # End of code from modules
 +      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
  
  
 -  gltests_libdeps=
 -  gltests_ltlibdeps=
 +  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
  
 -  gl_source_base='tests'
 -  gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
 +$as_echo "#define HAVE_MENUS 1" >>confdefs.h
  
 -  gl_module_indicator_condition=$gltests_WITNESS
 +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
  
 -  LIBGNU_LIBDEPS="$gl_libdeps"
  
 -  LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
  
  
 -CFLAGS=$SAVE_CFLAGS
 -LIBS=$SAVE_LIBS
  
  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:
  #### It makes printing result more understandable as using GTK sets
  #### toolkit_scroll_bars to yes by default.
  if test "${HAVE_GTK}" = "yes"; then
 -  if test "${with_gtk3}" = "yes"; then
 -    USE_X_TOOLKIT=GTK3
 -  else
 -    USE_X_TOOLKIT=GTK
 -  fi
 +  USE_X_TOOLKIT=GTK
  fi
  
  echo "
  Configured for \`${canonical}'.
  
    Where should the build process find the source code?    ${srcdir}
-   What operating system file should Emacs use?            ${opsysfile-none}
+   What operating system file should Emacs use?            ${opsysfile:-none}
    What compiler should emacs be built with?               ${CC} ${CFLAGS}
    Should Emacs use the GNU version of malloc?             ${GNU_MALLOC}${GNU_MALLOC_reason}
    Should Emacs use a relocating allocator for buffers?    ${REL_ALLOC}
@@@ -24016,6 -23818,7 +24651,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?                                ${HAVE_GNUTLS}"
  echo "  Does Emacs use -lxml2?                                  ${HAVE_LIBXML2}"
@@@ -24035,11 -23838,6 +24670,11 @@@ if test -n "${EMACSDOC}"; the
     echo "  Environment variable EMACSDOC set to:                   $EMACSDOC"
  fi
  
 +if test $USE_XASSERTS = yes; then
 +   echo "  Compiling with asserts turned on."
 +   CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
 +fi
 +
  echo
  
  if test "$HAVE_NS" = "yes"; then
@@@ -24258,31 -24056,18 +24893,31 @@@ 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
 +<<<<<<< TREE
 +=======
 +=======
  if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
    as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
  fi
 +>>>>>>> MERGE-SOURCE
 +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
@@@ -25711,4 -25496,3 +26346,4 @@@ if test -n "$ac_unrecognized_opts" && t
  $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
  fi
  
 +
diff --combined configure.ac
index 2b47decb177d9839068f6aea1d49370b94c08d6e,402524f436dfce6579e139b3142d4ce0a92c265a..5ff5f6b8318b5de189e2f71734b20383780a3b18
@@@ -179,8 -179,6 +179,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
@@@ -1300,19 -1298,6 +1300,6 @@@ AC_CHECK_MEMBERS([struct ifreq.ifr_flag
  dnl Check for endianness.
  dnl AC_C_BIGENDIAN is done by gnulib.
  
- AC_CACHE_CHECK([for  __attribute__ ((__aligned__ (expr)))],
-   [emacs_cv_attribute_aligned],
-   [AC_COMPILE_IFELSE(
-      [AC_LANG_PROGRAM(
-       [[char __attribute__ ((__aligned__ (1 << 3))) c;]],
-       [[]])],
-      [emacs_cv_attribute_aligned=yes],
-      [emacs_cv_attribute_aligned=no])])
- if test $emacs_cv_attribute_aligned = yes; then
-   AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1,
-     [Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works.])
- fi
  dnl check for Make feature
  dnl AC_PROG_MAKE_SET is done by Automake.
  
@@@ -1957,65 -1942,6 +1944,65 @@@ if test "${HAVE_GTK}" = "yes"; the
                 gtk_window_set_has_resize_grip)
  fi
  
 +
 +HAVE_XWIDGETS=no
 +HAVE_WEBKIT=no
 +HAVE_GOOCANVAS=no
 +HAVE_CLUTTER=no
 +HAVE_GIR=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
 +
 +  GIR_REQUIRED=1.32.1
 +  GIR_MODULES="gobject-introspection-1.0 >= $GIR_REQUIRED"
 +  PKG_CHECK_MODULES(GIR, $GIR_MODULES, HAVE_GIR=yes, HAVE_GIR=no)
 +  if test $HAVE_GIR = yes; then
 +     AC_DEFINE(HAVE_GIR, 1, [Define to 1 if you have GIR support.])
 +  fi
 +
 +  
 +fi
 +
 +
  dnl D-Bus has been tested under GNU/Linux only.  Must be adapted for
  dnl other platforms.
  HAVE_DBUS=no
  fi                              dnl GCC?
  
  
- dnl Used in xfaces.c.
+ case $opsys in
+   sol2* | unixware )
+     dnl setjmp and longjmp can safely replace _setjmp and _longjmp,
+     dnl but they will run more slowly.
+     AC_DEFINE(_setjmp, setjmp, [Some platforms redefine this.])
+     AC_DEFINE(_longjmp, longjmp, [Some platforms redefine this.])
+     dnl TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
+     dnl subprocesses the usual way.  But TIOCSIGNAL does work for PTYs,
+     dnl and this is all we need.
+     AC_DEFINE(TIOCSIGSEND, TIOCSIGNAL, [Some platforms redefine this.])
+     ;;
+ esac
  case $opsys in
    hpux* | sol2* )
+     dnl Used in xfaces.c.
      AC_DEFINE(XOS_NEEDS_TIME_H, 1, [Compensate for a bug in Xos.h on
        some systems, where it requires time.h.])
      ;;
+   netbsd | openbsd )
+     dnl Greg A. Woods <woods@weird.com> says we must include signal.h
+     dnl before syssignal.h is included, to work around interface conflicts
+     dnl that are handled with CPP __RENAME() macro in signal.h.
+     AC_DEFINE(SIGNAL_H_AHB, 1, [Define if AH_BOTTOM should include signal.h.])
+     ;;
  esac
  
  
@@@ -3724,6 -3671,7 +3732,7 @@@ AH_TEMPLATE(USG5, [Define if the syste
  
  case $opsys in
    aix4-2)
+     opsysfile=
      AC_DEFINE(USG, [])
      AC_DEFINE(USG5, [])
      dnl This symbol should be defined on AIX Version 3  ???????
      ;;
  
    freebsd)
+     opsysfile=
      AC_DEFINE(BSD4_2, [])
      dnl Hack to avoid calling AC_PREPROC_IFELSE multiple times.
      dnl Would not be needed with autoconf >= 2.67, where the
      ;;
  
    gnu-linux | gnu-kfreebsd )
+     opsysfile=
      AC_DEFINE(USG, [])
      AC_DEFINE(GNU_LINUX, [], [Define if ths system is compatible with GNU/Linux.])
      ;;
      ;;
  
    sol2*)
+     opsysfile="s/usg5-4-common.h"
      AC_DEFINE(USG, [])
      AC_DEFINE(USG5, [])
      AC_DEFINE(SOLARIS2, [], [Define if the system is Solaris.])
      ;;
  
    unixware)
+     opsysfile="s/usg5-4-common.h"
      AC_DEFINE(USG, [])
      AC_DEFINE(USG5, [])
      ;;
@@@ -3810,8 -3762,6 +3823,6 @@@ case $opsys i
  
    gnu) opsysfile= ;;
  
-   gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;;
    hpux11)
      dnl See comments in sysdep.c:sys_signal.
      dnl SA_RESTART resets the timeout of `select' on hpux11.
        should not call setpgrp.])
      ;;
  
-   openbsd) opsysfile="s/netbsd.h" ;;
+   netbsd | openbsd ) opsysfile= ;;
  
    sol2-10)
      AC_DEFINE(_STRUCTURED_PROC, 1, [Needed for system_process_attributes
@@@ -3971,7 -3921,7 +3982,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)
  
@@@ -4248,102 -4198,7 +4259,7 @@@ along with GNU Emacs.  If not, see <htt
  #define EMACS_CONFIG_H
  ])dnl
  
- AH_BOTTOM([
- /* On AIX 3 this must be included before any other include file.  */
- #include <alloca.h>
- #if ! HAVE_ALLOCA
- # error "alloca not available on this machine"
- #endif
- /* This silences a few compilation warnings on FreeBSD.  */
- #ifdef BSD_SYSTEM_AHB
- #undef BSD_SYSTEM_AHB
- #undef BSD_SYSTEM
- #if __FreeBSD__ == 1
- #define BSD_SYSTEM 199103
- #elif __FreeBSD__ == 2
- #define BSD_SYSTEM 199306
- #elif __FreeBSD__ >= 3
- #define BSD_SYSTEM 199506
- #endif
- #endif
- /* Define AMPERSAND_FULL_NAME if you use the convention
-    that & in the full name stands for the login id.  */
- /* Turned on June 1996 supposing nobody will mind it.  */
- #define AMPERSAND_FULL_NAME
- /* `subprocesses' should be defined if you want to
-    have code for asynchronous subprocesses
-    (as used in M-x compile and M-x shell).
-    Only MSDOS does not support this (it overrides
-    this in its config_opsysfile below).  */
- #define subprocesses
- /* Include the os dependent file.  */
- #ifdef config_opsysfile
- # include config_opsysfile
- #endif
- /* Mac OS X / GNUstep need a bit more pure memory.  Of the existing knobs,
-    SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems.  */
- #ifdef HAVE_NS
- #if defined NS_IMPL_GNUSTEP
- #  define SYSTEM_PURESIZE_EXTRA 30000
- #elif defined DARWIN_OS
- #  define SYSTEM_PURESIZE_EXTRA 200000
- #endif
- #endif
- #ifdef emacs /* Don't do this for lib-src.  */
- /* Tell regex.c to use a type compatible with Emacs.  */
- #define RE_TRANSLATE_TYPE Lisp_Object
- #define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C)
- #ifdef make_number
- /* If make_number is a macro, use it.  */
- #define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0)))
- #else
- /* If make_number is a function, avoid it.  */
- #define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0))
- #endif
- #endif
- #include <string.h>
- #include <stdlib.h>
- #if __GNUC__ >= 3  /* On GCC 3.0 we might get a warning.  */
- #define NO_INLINE __attribute__((noinline))
- #else
- #define NO_INLINE
- #endif
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
- #define EXTERNALLY_VISIBLE __attribute__((externally_visible))
- #else
- #define EXTERNALLY_VISIBLE
- #endif
- #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
- # define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
- #else
- # define ATTRIBUTE_FORMAT(spec) /* empty */
- #endif
- #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
- # define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
-    ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
- #else
- # define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
-    ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
- #endif
- #define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
- /* Some versions of GNU/Linux define noinline in their headers.  */
- #ifdef noinline
- #undef noinline
- #endif
+ AH_BOTTOM([#include <conf_post.h>
  
  #endif /* EMACS_CONFIG_H */
  
@@@ -4370,7 -4225,7 +4286,7 @@@ echo 
  Configured for \`${canonical}'.
  
    Where should the build process find the source code?    ${srcdir}
-   What operating system file should Emacs use?            ${opsysfile-none}
+   What operating system file should Emacs use?            ${opsysfile:-none}
    What compiler should emacs be built with?               ${CC} ${CFLAGS}
    Should Emacs use the GNU version of malloc?             ${GNU_MALLOC}${GNU_MALLOC_reason}
    Should Emacs use a relocating allocator for buffers?    ${REL_ALLOC}
@@@ -4412,12 -4267,6 +4328,12 @@@ 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 gobject introspection?       ${HAVE_GIR}"
 +echo "       Does xwidgets support clutter(demo code)?          ${HAVE_CLUTTER}"
 +echo "       Does xwidgets support goocanvas(demo code)?        ${HAVE_GOOCANVAS}"
  echo
  
  if test -n "${EMACSDATA}"; then
@@@ -4514,7 -4363,7 +4430,7 @@@ dnl by configure.  This also explains t
  dnl the use of force in the `epaths-force' rule in Makefile.in.
  AC_CONFIG_COMMANDS([epaths], [
  echo creating src/epaths.h
- ${MAKE-make} epaths-force
+ ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
  ], [GCC="$GCC" CPPFLAGS="$CPPFLAGS"])
  
  AC_CONFIG_COMMANDS([gdbinit], [
diff --combined src/Makefile.in
index 9d835f4cd8c9a6e87ae0d16d54fe07d01e3ee1e6,1ea7d162b14581c8329e1b99cfc3f088a915f91d..c7fd697e48c18c94c1fc507941292672a0b3a467
@@@ -57,7 -57,7 +57,7 @@@ lispdir = ../lis
  
  # Configuration files for .o files to depend on.
  S_FILE = @S_FILE@
- config_h = config.h $(S_FILE)
+ config_h = config.h conf_post.h $(S_FILE)
  
  bootstrap_exe = $(abs_builddir)/bootstrap-emacs$(EXEEXT)
  
@@@ -234,15 -234,6 +234,15 @@@ CFLAGS_SOUND= @CFLAGS_SOUND
  RSVG_LIBS= @RSVG_LIBS@
  RSVG_CFLAGS= @RSVG_CFLAGS@
  
 +CLUTTER_LIBS= @CLUTTER_LIBS@
 +CLUTTER_CFLAGS= @CLUTTER_CFLAGS@
 +
 +WEBKIT_LIBS= @WEBKIT_LIBS@
 +WEBKIT_CFLAGS= @WEBKIT_CFLAGS@
 +
 +GIR_LIBS= @GIR_LIBS@
 +GIR_CFLAGS= @GIR_CFLAGS@
 +
  IMAGEMAGICK_LIBS= @IMAGEMAGICK_LIBS@
  IMAGEMAGICK_CFLAGS= @IMAGEMAGICK_CFLAGS@
  
@@@ -318,7 -309,6 +318,7 @@@ ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I
    $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
    $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \
    $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \
 +  $(WEBKIT_CFLAGS) $(CLUTTER_CFLAGS) $(GIR_CFLAGS) \
    $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \
    $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) $(PROFILING_CFLAGS) \
    $(LIBGNUTLS_CFLAGS) \
@@@ -349,11 -339,9 +349,11 @@@ base_obj = dispnew.o frame.o scroll.o x
        process.o gnutls.o callproc.o \
        region-cache.o sound.o atimer.o \
        doprnt.o intervals.o textprop.o composite.o xml.o \
 +      xwidget.o \
        $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ)
  obj = $(base_obj) $(NS_OBJC_OBJ)
  
 +xwidget.o: xwidget.c xwidget.h
  ## Object files used on some machine or other.
  ## These go in the DOC file on all machines in case they are needed.
  ## Some of them have no DOC entries, but it does no harm to have them
@@@ -395,8 -383,7 +395,8 @@@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OB
  ## duplicated symbols.  If the standard libraries were compiled
  ## with GCC, we might need LIB_GCC again after them.
  LIBES = $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \
 -   $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_CLOCK_GETTIME) $(DBUS_LIBS) \
 +   $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(DBUS_LIBS) \
 +   $(WEBKIT_LIBS) $(CLUTTER_LIBS) $(GIR_LIBS) \
     $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
     $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \
     $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
     $(LIB_GCC) $(LIB_MATH) $(LIB_STANDARD) $(LIB_GCC)
  
  all: emacs$(EXEEXT) $(OTHER_FILES)
+ .PHONY: all
  
  $(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT)
        cd $(leimdir) && $(MAKE) $(MFLAGS) leim-list.el EMACS=$(bootstrap_exe)
@@@ -509,6 -497,8 +510,8 @@@ doc.o: buildobj.
  ## If HAVE_NS, some ns-specific rules (for OTHER_FILES) are inserted here.
  @ns_frag@
  
+ .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
+ .PHONY: versioclean extraclean frc
  
  mostlyclean:
        rm -f temacs$(EXEEXT) core *.core \#* *.o libXMenu11.a liblw.a
diff --combined src/keyboard.c
index bfbfdf2b984c0aade5c080c8b503043d70e6656f,d8533b796c328cf88972685ccf1d365057ef3434..3b30f4c1b2ddb74b681d2df83a9bdb3ee4930c0b
@@@ -328,9 -328,6 +328,9 @@@ static Lisp_Object Qsave_session
  #ifdef HAVE_DBUS
  static Lisp_Object Qdbus_event;
  #endif
 +#ifdef HAVE_XWIDGETS
 +Lisp_Object Qxwidget_event;
 +#endif
  static Lisp_Object Qconfig_changed_event;
  
  /* Lisp_Object Qmouse_movement; - also an event header */
@@@ -2188,14 -2185,7 +2188,7 @@@ show_help_echo (Lisp_Object help, Lisp_
    if (!NILP (help) && !STRINGP (help))
      {
        if (FUNCTIONP (help))
-       {
-         Lisp_Object args[4];
-         args[0] = help;
-         args[1] = window;
-         args[2] = object;
-         args[3] = pos;
-         help = safe_call (4, args);
-       }
+       help = safe_call (4, help, window, object, pos);
        else
        help = safe_eval (help);
  
@@@ -4043,13 -4033,6 +4036,13 @@@ kbd_buffer_get_event (KBOARD **kbp
          obj = make_lispy_event (event);
          kbd_fetch_ptr = event + 1;
        }
 +#endif
 +#ifdef HAVE_XWIDGETS      
 +      else if (event->kind == XWIDGET_EVENT)
 +      {
 +        obj = make_lispy_event (event);
 +        kbd_fetch_ptr = event + 1;
 +      }
  #endif
        else if (event->kind == CONFIG_CHANGED_EVENT)
        {
@@@ -5336,7 -5319,7 +5329,7 @@@ make_lispy_event (struct input_event *e
  {
    int i;
  
-   switch (SWITCH_ENUM_CAST (event->kind))
+   switch (event->kind)
      {
        /* A simple keystroke.  */
      case ASCII_KEYSTROKE_EVENT:
        return Fcons (Qdbus_event, event->arg);
        }
  #endif /* HAVE_DBUS */
 -
 +#ifdef HAVE_XWIDGETS
 +    case XWIDGET_EVENT:
 +      {
 +        printf("cool, an xwidget event arrived in make_lispy_event!\n");
 +        return  Fcons (Qxwidget_event,event->arg);
 +      }
 +#endif
      case CONFIG_CHANGED_EVENT:
        return Fcons (Qconfig_changed_event,
                        Fcons (event->arg,
@@@ -11477,10 -11454,6 +11470,10 @@@ syms_of_keyboard (void
    DEFSYM (Qdbus_event, "dbus-event");
  #endif
  
 +#ifdef HAVE_XWIDGETS
 +  Qxwidget_event = intern ("xwidget-event");
 +  staticpro (&Qxwidget_event);
 +#endif
    DEFSYM (QCenable, ":enable");
    DEFSYM (QCvisible, ":visible");
    DEFSYM (QChelp, ":help");
diff --combined src/lisp.h
index e371e0a8049d04dc7990227eab96f2cbef90dd08,2d9359abacf1f483d6b366bb3a802bd61e484f6c..3fe5cc911dfa16b20e87f620b709213122c36405
@@@ -20,6 -20,7 +20,7 @@@ along with GNU Emacs.  If not, see <htt
  #ifndef EMACS_LISP_H
  #define EMACS_LISP_H
  
+ #include <stdalign.h>
  #include <stdarg.h>
  #include <stddef.h>
  #include <inttypes.h>
  
  #include <intprops.h>
  
- /* Use the configure flag --enable-checking[=LIST] to enable various
-    types of run time checks for Lisp objects.  */
- #ifdef GC_CHECK_CONS_LIST
- extern void check_cons_list (void);
- #define CHECK_CONS_LIST() check_cons_list ()
- #else
- #define CHECK_CONS_LIST() ((void) 0)
- #endif
- /* Temporarily disable wider-than-pointer integers until they're tested more.
-    Build with CFLAGS='-DWIDE_EMACS_INT' to try them out.  */
- /* #undef WIDE_EMACS_INT */
+ /* The ubiquitous max and min macros.  */
+ #undef min
+ #undef max
+ #define max(a, b) ((a) > (b) ? (a) : (b))
+ #define min(a, b) ((a) < (b) ? (a) : (b))
  
  /* EMACS_INT - signed integer wide enough to hold an Emacs value
     EMACS_INT_MAX - maximum value of EMACS_INT; can be used in #if
@@@ -64,12 -57,6 +57,6 @@@ typedef unsigned int EMACS_UINT
  # endif
  #endif
  
- /* If an enum type is not used, the enum symbols are not put into the
-    executable so the debugger cannot see them on many systems, e.g.,
-    GCC 4.7.1 + GDB 7.4.1 + GNU/Linux.  Work around this problem by
-    explicitly using the names in the integer constant expression EXPR.  */
- #define PUBLISH_TO_GDB(expr) extern int (*gdb_dummy (int))[(expr) || 1]
  /* Number of bits in some machine integer types.  */
  enum
    {
@@@ -157,49 -144,46 +144,46 @@@ extern int suppress_checking EXTERNALLY
     on the few static Lisp_Objects used: all the defsubr as well
     as the two special buffers buffer_defaults and buffer_local_symbols.  */
  
- /* First, try and define DECL_ALIGN(type,var) which declares a static
-    variable VAR of type TYPE with the added requirement that it be
-    TYPEBITS-aligned.  */
- /* Number of bits in a Lisp_Object tag.  This can be used in #if,
-    and for GDB's sake also as a regular symbol.  */
- enum { GCTYPEBITS = 3 };
- PUBLISH_TO_GDB (GCTYPEBITS);
+ enum Lisp_Bits
+   {
+     /* Number of bits in a Lisp_Object tag.  This can be used in #if,
+        and for GDB's sake also as a regular symbol.  */
+     GCTYPEBITS =
  #define GCTYPEBITS 3
+       GCTYPEBITS,
+     /* 2**GCTYPEBITS.  This must also be a macro that expands to a
+        literal integer constant, for MSVC.  */
+     GCALIGNMENT =
+ #define GCALIGNMENT 8
+       GCALIGNMENT,
  
- /* Number of bits in a Lisp_Object value, not counting the tag.  */
- enum { VALBITS = BITS_PER_EMACS_INT - GCTYPEBITS };
+     /* Number of bits in a Lisp_Object value, not counting the tag.  */
+     VALBITS = BITS_PER_EMACS_INT - GCTYPEBITS,
+     /* Number of bits in a Lisp fixnum tag.  */
+     INTTYPEBITS = GCTYPEBITS - 1,
+     /* Number of bits in a Lisp fixnum value, not counting the tag.  */
+     FIXNUM_BITS = VALBITS + 1
+   };
+ #if GCALIGNMENT != 1 << GCTYPEBITS
+ # error "GCALIGNMENT and GCTYPEBITS are inconsistent"
+ #endif
  
  /* The maximum value that can be stored in a EMACS_INT, assuming all
     bits other than the type bits contribute to a nonnegative signed value.
     This can be used in #if, e.g., '#if VAL_MAX < UINTPTR_MAX' below.  */
  #define VAL_MAX (EMACS_INT_MAX >> (GCTYPEBITS - 1))
  
- #ifndef NO_DECL_ALIGN
- # ifndef DECL_ALIGN
- #  if HAVE_ATTRIBUTE_ALIGNED
- #   define DECL_ALIGN(type, var) \
-      type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var
- #  elif defined(_MSC_VER)
- #   define ALIGN_GCTYPEBITS 8
- #   if (1 << GCTYPEBITS) != ALIGN_GCTYPEBITS
- #    error ALIGN_GCTYPEBITS is wrong!
- #   endif
- #   define DECL_ALIGN(type, var) \
-      type __declspec(align(ALIGN_GCTYPEBITS)) var
- #  else
-      /* What directives do other compilers use?  */
- #  endif
- # endif
- #endif
  /* Unless otherwise specified, use USE_LSB_TAG on systems where:  */
  #ifndef USE_LSB_TAG
  /* 1.  We know malloc returns a multiple of 8.  */
  # if (defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ \
        || defined DARWIN_OS || defined __sun)
  /* 2.  We can specify multiple-of-8 alignment on static variables.  */
- #  ifdef DECL_ALIGN
+ #  ifdef alignas
  /* 3.  Pointers-as-ints exceed VAL_MAX.
     On hosts where pointers-as-ints do not exceed VAL_MAX, USE_LSB_TAG is:
      a. unnecessary, because the top bits of an EMACS_INT are unused, and
  #  endif
  # endif
  #endif
- /* USE_LSB_TAG can be used in #if; default it to 0 and make it visible
-    to GDB.  */
  #ifdef USE_LSB_TAG
  # undef USE_LSB_TAG
- enum { USE_LSB_TAG = 1 };
- PUBLISH_TO_GDB (USE_LSB_TAG);
+ enum enum_USE_LSB_TAG { USE_LSB_TAG = 1 };
  # define USE_LSB_TAG 1
  #else
- enum { USE_LSB_TAG = 0 };
- PUBLISH_TO_GDB (USE_LSB_TAG);
+ enum enum_USE_LSB_TAG { USE_LSB_TAG = 0 };
  # define USE_LSB_TAG 0
  #endif
  
- /* If we cannot use 8-byte alignment, make DECL_ALIGN a no-op.  */
- #ifndef DECL_ALIGN
+ #ifndef alignas
+ # define alignas(alignment) /* empty */
  # if USE_LSB_TAG
- #  error "USE_LSB_TAG used without defining DECL_ALIGN"
+ #  error "USE_LSB_TAG requires alignas"
  # endif
- # define DECL_ALIGN(type, var) type var
  #endif
  
  
  
  /* Lisp integers use 2 tags, to give them one extra bit, thus
     extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1.  */
- enum { INTTYPEBITS = GCTYPEBITS - 1 };
- enum { FIXNUM_BITS = VALBITS + 1 };
- #define INTMASK (EMACS_INT_MAX >> (INTTYPEBITS - 1))
- #define LISP_INT_TAG Lisp_Int0
+ static EMACS_INT const INTMASK = EMACS_INT_MAX >> (INTTYPEBITS - 1);
  #define case_Lisp_Int case Lisp_Int0: case Lisp_Int1
- #define LISP_INT1_TAG (USE_LSB_TAG ? 1 << INTTYPEBITS : 1)
- #define LISP_STRING_TAG (5 - LISP_INT1_TAG)
- #define LISP_INT_TAG_P(x) (((x) & ~LISP_INT1_TAG) == 0)
+ #define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0)
  
  /* Stolen from GDB.  The only known compiler that doesn't support
     enums in bitfields is MSVC.  */
@@@ -261,7 -235,7 +235,7 @@@ enum Lisp_Typ
    {
      /* Integer.  XINT (obj) is the integer value.  */
      Lisp_Int0 = 0,
-     Lisp_Int1 = LISP_INT1_TAG,
+     Lisp_Int1 = USE_LSB_TAG ? 1 << INTTYPEBITS : 1,
  
      /* Symbol.  XSYMBOL (object) points to a struct Lisp_Symbol.  */
      Lisp_Symbol = 2,
  
      /* String.  XSTRING (object) points to a struct Lisp_String.
         The length of the string, and its contents, are stored therein.  */
-     Lisp_String = LISP_STRING_TAG,
+     Lisp_String = USE_LSB_TAG ? 1 : 1 << INTTYPEBITS,
  
      /* Vector of Lisp objects, or something resembling it.
         XVECTOR (object) points to a struct Lisp_Vector, which contains
@@@ -335,9 -309,9 +309,9 @@@ LISP_MAKE_RVALUE (Lisp_Object o
  }
  
  #define LISP_INITIALLY_ZERO {0}
- #undef CHECK_LISP_OBJECT_TYPE
- enum { CHECK_LISP_OBJECT_TYPE = 1 };
  
+ #undef CHECK_LISP_OBJECT_TYPE
+ enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = 1 };
  #else /* CHECK_LISP_OBJECT_TYPE */
  
  /* If a struct type is not wanted, define Lisp_Object as just a number.  */
@@@ -347,17 -321,16 +321,16 @@@ typedef EMACS_INT Lisp_Object
  #define XIL(i) (i)
  #define LISP_MAKE_RVALUE(o) (0+(o))
  #define LISP_INITIALLY_ZERO 0
- enum { CHECK_LISP_OBJECT_TYPE = 0 };
+ enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = 0 };
  #endif /* CHECK_LISP_OBJECT_TYPE */
- PUBLISH_TO_GDB (CHECK_LISP_OBJECT_TYPE);
  
  /* In the size word of a vector, this bit means the vector has been marked.  */
  
- #define ARRAY_MARK_FLAG PTRDIFF_MIN
+ static ptrdiff_t const ARRAY_MARK_FLAG = PTRDIFF_MIN;
  
  /* In the size word of a struct Lisp_Vector, this bit means it's really
     some other vector-like object.  */
- #define PSEUDOVECTOR_FLAG (PTRDIFF_MAX - PTRDIFF_MAX / 2)
+ static ptrdiff_t const PSEUDOVECTOR_FLAG = PTRDIFF_MAX - PTRDIFF_MAX / 2;
  
  /* In a pseudovector, the size field actually contains a word with one
     PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to
@@@ -380,11 -353,6 +353,11 @@@ enum pvec_typ
    PVEC_WINDOW_CONFIGURATION,
    PVEC_SUBR,
    PVEC_OTHER,
 +#ifdef HAVE_XWIDGETS
 +  PVEC_XWIDGET,
 +  PVEC_XWIDGET_VIEW,
 +#endif
 +
    /* These last 4 are special because we OR them in fns.c:internal_equal,
       so they have to use a disjoint bit pattern:
       if (!(size & (PVEC_COMPILED | PVEC_CHAR_TABLE
    PVEC_SUB_CHAR_TABLE         = 0x30,
    PVEC_FONT                   = 0x40
  };
- PUBLISH_TO_GDB ((enum pvec_type) 0);  /* This also publishes PVEC_*.  */
  
- /* For convenience, we also store the number of elements in these bits.
-    Note that this size is not necessarily the memory-footprint size, but
-    only the number of Lisp_Object fields (that need to be traced by the GC).
-    The distinction is used e.g. by Lisp_Process which places extra
-    non-Lisp_Object fields at the end of the structure.  */
- enum
+ /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers
+    which were stored in a Lisp_Object.  */
+ #ifndef DATA_SEG_BITS
+ # define DATA_SEG_BITS 0
+ #endif
+ enum { gdb_DATA_SEG_BITS = DATA_SEG_BITS };
+ #undef DATA_SEG_BITS
+ enum More_Lisp_Bits
    {
+     DATA_SEG_BITS = gdb_DATA_SEG_BITS,
+     /* For convenience, we also store the number of elements in these bits.
+        Note that this size is not necessarily the memory-footprint size, but
+        only the number of Lisp_Object fields (that need to be traced by GC).
+        The distinction is used, e.g., by Lisp_Process, which places extra
+        non-Lisp_Object fields at the end of the structure.  */
      PSEUDOVECTOR_SIZE_BITS = 16,
      PSEUDOVECTOR_SIZE_MASK = (1 << PSEUDOVECTOR_SIZE_BITS) - 1,
-     PVEC_TYPE_MASK = 0x0fff << PSEUDOVECTOR_SIZE_BITS
-   };
- /* Number of bits to put in each character in the internal representation
-    of bool vectors.  This should not vary across implementations.  */
- enum { BOOL_VECTOR_BITS_PER_CHAR = 8 };
+     PVEC_TYPE_MASK = 0x0fff << PSEUDOVECTOR_SIZE_BITS,
  
- /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers
-    which were stored in a Lisp_Object.  It is not needed in #if, so
-    for GDB's sake change it from a macro to a regular symbol.  */
- #ifdef DATA_SEG_BITS
- enum { gdb_DATA_SEG_BITS = DATA_SEG_BITS };
- # undef DATA_SEG_BITS
- enum { DATA_SEG_BITS = gdb_DATA_SEG_BITS };
- #else
- enum { DATA_SEG_BITS = 0 };
- #endif
- PUBLISH_TO_GDB (DATA_SEG_BITS);
+     /* Number of bits to put in each character in the internal representation
+        of bool vectors.  This should not vary across implementations.  */
+     BOOL_VECTOR_BITS_PER_CHAR = 8
+   };
  \f
  /* These macros extract various sorts of values from a Lisp_Object.
   For example, if tem is a Lisp_Object whose type is Lisp_Cons,
  
  #if USE_LSB_TAG
  
- #define VALMASK (-1 << GCTYPEBITS)
- #define TYPEMASK ((1 << GCTYPEBITS) - 1)
+ enum lsb_bits
+   {
+     TYPEMASK = (1 << GCTYPEBITS) - 1,
+     VALMASK = ~ TYPEMASK
+   };
  #define XTYPE(a) ((enum Lisp_Type) (XLI (a) & TYPEMASK))
  #define XINT(a) (XLI (a) >> INTTYPEBITS)
  #define XUINT(a) ((EMACS_UINT) XLI (a) >> INTTYPEBITS)
  
  #else  /* not USE_LSB_TAG */
  
- #define VALMASK VAL_MAX
+ static EMACS_INT const VALMASK = VAL_MAX;
  
  #define XTYPE(a) ((enum Lisp_Type) ((EMACS_UINT) XLI (a) >> VALBITS))
  
  #define EQ(x, y) (XHASH (x) == XHASH (y))
  
  /* Largest and smallest representable fixnum values.  These are the C
-    values.  */
+    values.  They are macros for use in static initializers, and
+    constants for visibility to GDB.  */
+ static EMACS_INT const MOST_POSITIVE_FIXNUM =
  #define MOST_POSITIVE_FIXNUM (EMACS_INT_MAX >> INTTYPEBITS)
+       MOST_POSITIVE_FIXNUM;
+ static EMACS_INT const MOST_NEGATIVE_FIXNUM =
  #define MOST_NEGATIVE_FIXNUM (-1 - MOST_POSITIVE_FIXNUM)
+       MOST_NEGATIVE_FIXNUM;
  
  /* Value is non-zero if I doesn't fit into a Lisp fixnum.  It is
     written this way so that it also works if I is of unsigned
@@@ -666,21 -639,12 +644,12 @@@ struct Lisp_Con
    {
      /* Please do not use the names of these elements in code other
         than the core lisp implementation.  Use XCAR and XCDR below.  */
- #ifdef HIDE_LISP_IMPLEMENTATION
-     Lisp_Object car_;
-     union
-     {
-       Lisp_Object cdr_;
-       struct Lisp_Cons *chain;
-     } u;
- #else
      Lisp_Object car;
      union
      {
        Lisp_Object cdr;
        struct Lisp_Cons *chain;
      } u;
- #endif
    };
  
  /* Take the car or cdr of something known to be a cons cell.  */
     fields are not accessible as lvalues.  (What if we want to switch to
     a copying collector someday?  Cached cons cell field addresses may be
     invalidated at arbitrary points.)  */
- #ifdef HIDE_LISP_IMPLEMENTATION
- #define XCAR_AS_LVALUE(c) (XCONS ((c))->car_)
- #define XCDR_AS_LVALUE(c) (XCONS ((c))->u.cdr_)
- #else
  #define XCAR_AS_LVALUE(c) (XCONS ((c))->car)
  #define XCDR_AS_LVALUE(c) (XCONS ((c))->u.cdr)
- #endif
  
  /* Use these from normal code.  */
  #define XCAR(c)       LISP_MAKE_RVALUE (XCAR_AS_LVALUE (c))
@@@ -757,10 -716,15 +721,15 @@@ extern ptrdiff_t string_bytes (struct L
     Although the actual size limit (see STRING_BYTES_MAX in alloc.c)
     may be a bit smaller than STRING_BYTES_BOUND, calculating it here
     would expose alloc.c internal details that we'd rather keep
-    private.  The cast to ptrdiff_t ensures that STRING_BYTES_BOUND is
-    signed.  */
+    private.
+    This is a macro for use in static initializers, and a constant for
+    visibility to GDB.  The cast to ptrdiff_t ensures that
+    the macro is signed.  */
+ static ptrdiff_t const STRING_BYTES_BOUND =
  #define STRING_BYTES_BOUND  \
-   min (MOST_POSITIVE_FIXNUM, (ptrdiff_t) min (SIZE_MAX, PTRDIFF_MAX) - 1)
+   ((ptrdiff_t) min (MOST_POSITIVE_FIXNUM, min (SIZE_MAX, PTRDIFF_MAX) - 1))
+       STRING_BYTES_BOUND;
  
  /* Mark STR as a unibyte string.  */
  #define STRING_SET_UNIBYTE(STR)  \
@@@ -869,16 -833,6 +838,6 @@@ struct Lisp_Vecto
     of a char-table, and there's no way to access it directly from
     Emacs Lisp program.  */
  
- /* This is the number of slots that every char table must have.  This
-    counts the ordinary slots and the top, defalt, parent, and purpose
-    slots.  */
- #define CHAR_TABLE_STANDARD_SLOTS (VECSIZE (struct Lisp_Char_Table) - 1)
- /* Return the number of "extra" slots in the char table CT.  */
- #define CHAR_TABLE_EXTRA_SLOTS(CT)    \
-   (((CT)->header.size & PSEUDOVECTOR_SIZE_MASK) - CHAR_TABLE_STANDARD_SLOTS)
  #ifdef __GNUC__
  
  #define CHAR_TABLE_REF_ASCII(CT, IDX)                                 \
     ? XSUB_CHAR_TABLE (XCHAR_TABLE (CT)->ascii)->contents[IDX] = VAL   \
     : char_table_set (CT, IDX, VAL))
  
- #define CHARTAB_SIZE_BITS_0 6
- #define CHARTAB_SIZE_BITS_1 4
- #define CHARTAB_SIZE_BITS_2 5
- #define CHARTAB_SIZE_BITS_3 7
+ enum CHARTAB_SIZE_BITS
+   {
+     CHARTAB_SIZE_BITS_0 = 6,
+     CHARTAB_SIZE_BITS_1 = 4,
+     CHARTAB_SIZE_BITS_2 = 5,
+     CHARTAB_SIZE_BITS_3 = 7
+   };
  
  extern const int chartab_size[4];
  
@@@ -1042,6 -999,19 +1004,19 @@@ struct Lisp_Sub
      const char *doc;
    };
  
+ /* This is the number of slots that every char table must have.  This
+    counts the ordinary slots and the top, defalt, parent, and purpose
+    slots.  */
+ enum CHAR_TABLE_STANDARD_SLOTS
+   {
+     CHAR_TABLE_STANDARD_SLOTS = VECSIZE (struct Lisp_Char_Table) - 1
+   };
+ /* Return the number of "extra" slots in the char table CT.  */
+ #define CHAR_TABLE_EXTRA_SLOTS(CT)    \
+   (((CT)->header.size & PSEUDOVECTOR_SIZE_MASK) - CHAR_TABLE_STANDARD_SLOTS)
  \f
  /***********************************************************************
                               Symbols
@@@ -1269,7 -1239,7 +1244,7 @@@ struct Lisp_Hash_Tabl
  
  /* Default size for hash tables if not specified.  */
  
- #define DEFAULT_HASH_SIZE 65
+ enum DEFAULT_HASH_SIZE { DEFAULT_HASH_SIZE = 65 };
  
  /* Default threshold specifying when to resize a hash table.  The
     value gives the ratio of current entries in the hash table and the
@@@ -1509,23 -1479,13 +1484,13 @@@ struct Lisp_Floa
    {
      union
      {
- #ifdef HIDE_LISP_IMPLEMENTATION
-       double data_;
- #else
        double data;
- #endif
        struct Lisp_Float *chain;
      } u;
    };
  
- #ifdef HIDE_LISP_IMPLEMENTATION
- #define XFLOAT_DATA(f)        (0 ? XFLOAT (f)->u.data_ : XFLOAT (f)->u.data_)
- #else
- #define XFLOAT_DATA(f)        (0 ? XFLOAT (f)->u.data :  XFLOAT (f)->u.data)
- /* This should be used only in alloc.c, which always disables
-    HIDE_LISP_IMPLEMENTATION.  */
- #define XFLOAT_INIT(f,n) (XFLOAT (f)->u.data = (n))
- #endif
+ #define XFLOAT_DATA(f) (0 ? XFLOAT (f)->u.data :  XFLOAT (f)->u.data)
+ #define XFLOAT_INIT(f, n) (XFLOAT (f)->u.data = (n))
  
  /* A character, declared with the following typedef, is a member
     of some character set associated with the current buffer.  */
@@@ -1536,31 -1496,38 +1501,38 @@@ typedef unsigned char UCHAR
  
  /* Meanings of slots in a Lisp_Compiled:  */
  
- #define COMPILED_ARGLIST 0
- #define COMPILED_BYTECODE 1
- #define COMPILED_CONSTANTS 2
- #define COMPILED_STACK_DEPTH 3
- #define COMPILED_DOC_STRING 4
- #define COMPILED_INTERACTIVE 5
+ enum Lisp_Compiled
+   {
+     COMPILED_ARGLIST = 0,
+     COMPILED_BYTECODE = 1,
+     COMPILED_CONSTANTS = 2,
+     COMPILED_STACK_DEPTH = 3,
+     COMPILED_DOC_STRING = 4,
+     COMPILED_INTERACTIVE = 5
+   };
  
  /* Flag bits in a character.  These also get used in termhooks.h.
     Richard Stallman <rms@gnu.ai.mit.edu> thinks that MULE
     (MUlti-Lingual Emacs) might need 22 bits for the character value
     itself, so we probably shouldn't use any bits lower than 0x0400000.  */
- #define CHAR_ALT   (0x0400000)
- #define CHAR_SUPER (0x0800000)
- #define CHAR_HYPER (0x1000000)
- #define CHAR_SHIFT (0x2000000)
- #define CHAR_CTL   (0x4000000)
- #define CHAR_META  (0x8000000)
- #define CHAR_MODIFIER_MASK \
-   (CHAR_ALT | CHAR_SUPER | CHAR_HYPER  | CHAR_SHIFT | CHAR_CTL | CHAR_META)
+ enum char_bits
+   {
+     CHAR_ALT = 0x0400000,
+     CHAR_SUPER = 0x0800000,
+     CHAR_HYPER = 0x1000000,
+     CHAR_SHIFT = 0x2000000,
+     CHAR_CTL = 0x4000000,
+     CHAR_META = 0x8000000,
+     CHAR_MODIFIER_MASK =
+       CHAR_ALT | CHAR_SUPER | CHAR_HYPER | CHAR_SHIFT | CHAR_CTL | CHAR_META,
+     /* Actually, the current Emacs uses 22 bits for the character value
+        itself.  */
+     CHARACTERBITS = 22
+   };
  
  
- /* Actually, the current Emacs uses 22 bits for the character value
-    itself.  */
- #define CHARACTERBITS 22
  
  \f
  /* The glyph datatype, used to represent characters on the display.
@@@ -1617,9 -1584,6 +1589,6 @@@ typedef struct 
                   (XINT (gc) >> CHARACTERBITS));                       \
      }                                                                 \
    while (0)
- /* The ID of the mode line highlighting face.  */
- #define GLYPH_MODE_LINE_FACE 1
  \f
  /* Structure to hold mouse highlight data.  This is here because other
     header files need it for defining struct x_output etc.  */
@@@ -1894,7 -1858,7 +1863,7 @@@ typedef struct 
  #ifdef _MSC_VER
  #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc)   \
     Lisp_Object fnname DEFUN_ARGS_ ## maxargs ;                                \
-    static DECL_ALIGN (struct Lisp_Subr, sname) =                      \
+    static struct Lisp_Subr alignas (GCALIGNMENT) sname =              \
     { (PVEC_SUBR << PSEUDOVECTOR_SIZE_BITS)                            \
       | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)),              \
        { (Lisp_Object (__cdecl *)(void))fnname },                        \
  #else  /* not _MSC_VER */
  #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc)   \
     Lisp_Object fnname DEFUN_ARGS_ ## maxargs ;                                \
-    static DECL_ALIGN (struct Lisp_Subr, sname) =                      \
+    static struct Lisp_Subr alignas (GCALIGNMENT) sname =              \
       { PVEC_SUBR << PSEUDOVECTOR_SIZE_BITS,                           \
        { .a ## maxargs = fnname },                                     \
         minargs, maxargs, lname, intspec, 0};                          \
     is how we define the symbol for function `name' at start-up time.  */
  extern void defsubr (struct Lisp_Subr *);
  
- #define MANY -2
- #define UNEVALLED -1
+ enum maxargs
+   {
+     MANY = -2,
+     UNEVALLED = -1
+   };
  
  extern void defvar_lisp (struct Lisp_Objfwd *, const char *, Lisp_Object *);
  extern void defvar_lisp_nopro (struct Lisp_Objfwd *, const char *, Lisp_Object *);
@@@ -2655,6 -2622,8 +2627,8 @@@ extern Lisp_Object list3 (Lisp_Object, 
  extern Lisp_Object list4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
  extern Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
                          Lisp_Object);
+ enum constype {CONSTYPE_HEAP, CONSTYPE_PURE};
+ extern Lisp_Object listn (enum constype, ptrdiff_t, Lisp_Object, ...);
  extern _Noreturn void string_overflow (void);
  extern Lisp_Object make_string (const char *, ptrdiff_t);
  extern Lisp_Object make_formatted_string (char *, const char *, ...)
@@@ -2724,6 -2693,11 +2698,11 @@@ extern void init_alloc (void)
  extern void syms_of_alloc (void);
  extern struct buffer * allocate_buffer (void);
  extern int valid_lisp_object_p (Lisp_Object);
+ #ifdef GC_CHECK_CONS_LIST
+ extern void check_cons_list (void);
+ #else
+ #define check_cons_list() ((void) 0)
+ #endif
  
  #ifdef REL_ALLOC
  /* Defined in ralloc.c */
@@@ -2766,7 -2740,7 +2745,7 @@@ extern void print_error_message (Lisp_O
                                 Lisp_Object);
  extern Lisp_Object internal_with_output_to_temp_buffer
          (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object);
- #define FLOAT_TO_STRING_BUFSIZE 350
+ enum FLOAT_TO_STRING_BUFSIZE { FLOAT_TO_STRING_BUFSIZE = 350 };
  extern int float_to_string (char *, double);
  extern void syms_of_print (void);
  
@@@ -2871,7 -2845,7 +2850,7 @@@ extern _Noreturn void verror (const cha
    ATTRIBUTE_FORMAT_PRINTF (1, 0);
  extern Lisp_Object un_autoload (Lisp_Object);
  extern void init_eval_once (void);
- extern Lisp_Object safe_call (ptrdiff_t, Lisp_Object *);
+ extern Lisp_Object safe_call (ptrdiff_t, Lisp_Object, ...);
  extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object);
  extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object);
  extern void init_eval (void);
@@@ -3330,7 -3304,7 +3309,7 @@@ extern void init_system_name (void)
     in addition to a device separator.  Set the path separator
     to '/', and don't test for a device separator in IS_ANY_SEP.  */
  
- #define DIRECTORY_SEP '/'
+ static char const DIRECTORY_SEP = '/';
  #ifndef IS_DIRECTORY_SEP
  #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)
  #endif
  #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))
  #endif
  
- #define SWITCH_ENUM_CAST(x) (x)
  /* Use this to suppress gcc's warnings.  */
  #ifdef lint
  
  # define lint_assume(cond) ((void) (0 && (cond)))
  #endif
  
- /* The ubiquitous min and max macros.  */
- #ifdef max
- #undef max
- #undef min
- #endif
- #define min(a, b)     ((a) < (b) ? (a) : (b))
- #define max(a, b)     ((a) > (b) ? (a) : (b))
  /* We used to use `abs', but that clashes with system headers on some
     platforms, and using a name reserved by Standard C is a bad idea
     anyway.  */
  /* SAFE_ALLOCA normally allocates memory on the stack, but if size is
     larger than MAX_ALLOCA, use xmalloc to avoid overflowing the stack.  */
  
- #define MAX_ALLOCA 16*1024
+ enum MAX_ALLOCA { MAX_ALLOCA = 16*1024 };
  
  extern Lisp_Object safe_alloca_unwind (Lisp_Object);
  
diff --combined src/xdisp.c
index 6a9d2d3ac4c93ca1dbd1d77618b7c25fd1db57bd,e9bf472696d18a2919b5ca615a079425df47926a..57a8c9d21a365c68135ff9a61a424896569dfb07
@@@ -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
@@@ -897,9 -895,6 +897,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 *, ptrdiff_t);
  static int init_from_display_pos (struct it *, struct window *,
@@@ -2408,16 -2403,12 +2408,12 @@@ safe_eval_handler (Lisp_Object arg
    return Qnil;
  }
  
/* Evaluate SEXPR and return the result, or nil if something went
+ /* Call function FUNC with the rest of NARGS - 1 arguments
   following.  Return the result, or nil if something went
     wrong.  Prevent redisplay during the evaluation.  */
  
- /* Call function ARGS[0] with arguments ARGS[1] to ARGS[NARGS - 1].
-    Return the result, or nil if something went wrong.  Prevent
-    redisplay during the evaluation.  */
  Lisp_Object
- safe_call (ptrdiff_t nargs, Lisp_Object *args)
+ safe_call (ptrdiff_t nargs, Lisp_Object func, ...)
  {
    Lisp_Object val;
  
      val = Qnil;
    else
      {
+       va_list ap;
+       ptrdiff_t i;
        ptrdiff_t count = SPECPDL_INDEX ();
        struct gcpro gcpro1;
+       Lisp_Object *args = alloca (nargs * sizeof (Lisp_Object));
+       args[0] = func;
+       va_start (ap, func);
+       for (i = 1; i < nargs; i++)
+       args[i] = va_arg (ap, Lisp_Object);
+       va_end (ap);
  
        GCPRO1 (args[0]);
        gcpro1.nvars = nargs;
  Lisp_Object
  safe_call1 (Lisp_Object fn, Lisp_Object arg)
  {
-   Lisp_Object args[2];
-   args[0] = fn;
-   args[1] = arg;
-   return safe_call (2, args);
+   return safe_call (2, fn, arg);
  }
  
  static Lisp_Object Qeval;
@@@ -2463,17 -2460,13 +2465,13 @@@ safe_eval (Lisp_Object sexpr
    return safe_call1 (Qeval, sexpr);
  }
  
- /* Call function FN with one argument ARG.
+ /* Call function FN with two arguments ARG1 and ARG2.
     Return the result, or nil if something went wrong.  */
  
  Lisp_Object
  safe_call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2)
  {
-   Lisp_Object args[3];
-   args[0] = fn;
-   args[1] = arg1;
-   args[2] = arg2;
-   return safe_call (3, args);
+   return safe_call (3, fn, arg1, arg2);
  }
  
  
@@@ -2741,7 -2734,11 +2739,11 @@@ init_iterator (struct it *it, struct wi
       frames when the fringes are turned off.  But leave the dimensions
       zero for tooltip frames, as these glyphs look ugly there and also
       sabotage calculations of tooltip dimensions in x-show-tip.  */
-   if (!(FRAMEP (tip_frame) && it->f == XFRAME (tip_frame)))
+ #ifdef HAVE_WINDOW_SYSTEM
+   if (!(FRAME_WINDOW_P (it->f)
+       && FRAMEP (tip_frame)
+       && it->f == XFRAME (tip_frame)))
+ #endif
      {
        if (it->line_wrap == TRUNCATE)
        {
@@@ -4446,9 -4443,6 +4448,9 @@@ handle_display_spec (struct it *it, Lis
    if (CONSP (spec)
        /* Simple specifications.  */
        && !EQ (XCAR (spec), Qimage)
 +#ifdef HAVE_XWIDGETS
 +      && !EQ (XCAR (spec), Qxwidget)
 +#endif
        && !EQ (XCAR (spec), Qspace)
        && !EQ (XCAR (spec), Qwhen)
        && !EQ (XCAR (spec), Qslice)
@@@ -4887,11 -4881,7 +4889,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
        {
@@@ -5710,11 -5687,6 +5712,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;
@@@ -5808,11 -5780,6 +5810,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;
@@@ -6460,9 -6427,6 +6462,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)
@@@ -7292,9 -7256,6 +7294,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 ();
@@@ -7720,19 -7681,6 +7722,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
@@@ -13329,13 -13277,6 +13331,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
@@@ -16309,8 -16250,6 +16311,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)
@@@ -16417,13 -16351,6 +16419,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
@@@ -17204,13 -17131,6 +17206,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)                                            \
@@@ -18034,29 -17954,6 +18036,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  
  }
  
  
@@@ -20517,7 -20414,7 +20519,7 @@@ display_mode_element (struct it *it, in
  
    depth++;
  
-   switch (SWITCH_ENUM_CAST (XTYPE (elt)))
+   switch (XTYPE (elt))
      {
      case Lisp_String:
        {
@@@ -22428,13 -22325,6 +22430,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))
            {
@@@ -22939,20 -22829,7 +22941,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)
 +{
 +  eassert (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,
@@@ -23284,21 -23161,6 +23286,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
     to allocate glyph strings (because draw_glyphs can be called
     asynchronously).  */
  
 -#define BUILD_GLYPH_STRINGS(START, END, HEAD, TAIL, HL, X, LAST_X)    \
 +#define BUILD_GLYPH_STRINGS_1(START, END, HEAD, TAIL, HL, X, LAST_X)  \
    do                                                                  \
      {                                                                 \
        HEAD = TAIL = NULL;                                             \
            case IMAGE_GLYPH:                                           \
              BUILD_IMAGE_GLYPH_STRING (START, END, HEAD, TAIL,         \
                                        HL, X, LAST_X);                 \
 -            break;                                                    \
 -                                                                      \
 +            break;
 +              
 +#define BUILD_GLYPH_STRINGS_XW(START, END, HEAD, TAIL, HL, X, LAST_X) \
 +            case XWIDGET_GLYPH:                                         \
 +              BUILD_XWIDGET_GLYPH_STRING (START, END, HEAD, TAIL,       \
 +                                          HL, X, LAST_X);               \
 +              break;
 +
 +#define BUILD_GLYPH_STRINGS_2(START, END, HEAD, TAIL, HL, X, LAST_X)  \
            case GLYPHLESS_GLYPH:                                       \
              BUILD_GLYPHLESS_GLYPH_STRING (START, END, HEAD, TAIL,     \
                                            HL, X, LAST_X);             \
      } while (0)
  
  
 +#ifdef HAVE_XWIDGETS
 +#define BUILD_GLYPH_STRINGS(START, END, HEAD, TAIL, HL, X, LAST_X)    \
 +BUILD_GLYPH_STRINGS_1(START, END, HEAD, TAIL, HL, X, LAST_X)  \
 +BUILD_GLYPH_STRINGS_XW(START, END, HEAD, TAIL, HL, X, LAST_X) \
 +BUILD_GLYPH_STRINGS_2(START, END, HEAD, TAIL, HL, X, LAST_X)
 +#else
 +#define BUILD_GLYPH_STRINGS(START, END, HEAD, TAIL, HL, X, LAST_X)    \
 +BUILD_GLYPH_STRINGS_1(START, END, HEAD, TAIL, HL, X, LAST_X)  \
 +BUILD_GLYPH_STRINGS_2(START, END, HEAD, TAIL, HL, X, LAST_X)
 +#endif 
 +
 +        
  /* Draw glyphs between START and END in AREA of ROW on window W,
     starting at x-position X.  X is relative to AREA in W.  HL is a
     face-override with the following meaning:
@@@ -24082,89 -23925,6 +24084,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");
 +  eassert (it->what == IT_XWIDGET);
 +
 +  face = FACE_FROM_ID (it->f, it->face_id);
 +  eassert (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
@@@ -25485,10 -25245,7 +25487,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'.  */
@@@ -25855,13 -25612,6 +25857,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)
@@@ -29184,14 -28934,14 +29186,14 @@@ and is used only on frames for which n
  \(see `modify-frame-parameters').  */);
    Vicon_title_format
      = Vframe_title_format
-     = pure_cons (intern_c_string ("multiple-frames"),
-                pure_cons (build_pure_c_string ("%b"),
-                           pure_cons (pure_cons (empty_unibyte_string,
-                                                 pure_cons (intern_c_string ("invocation-name"),
-                                                            pure_cons (build_pure_c_string ("@"),
-                                                                       pure_cons (intern_c_string ("system-name"),
-                                                                                  Qnil)))),
-                                      Qnil)));
+     = listn (CONSTYPE_PURE, 3,
+            intern_c_string ("multiple-frames"),
+            build_pure_c_string ("%b"),
+            listn (CONSTYPE_PURE, 4,
+                   empty_unibyte_string,
+                   intern_c_string ("invocation-name"),
+                   build_pure_c_string ("@"),
+                   intern_c_string ("system-name")));
  
    DEFVAR_LISP ("message-log-max", Vmessage_log_max,
      doc: /* Maximum number of lines to keep in the message log buffer.