Restore deprecation warnings, except for older libpng.
[bpt/emacs.git] / configure.in
index 19fa655..4df1284 100644 (file)
@@ -38,9 +38,10 @@ dnl (autoconf) Installation Directory Variables
 dnl See also epaths.h below.
 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}:${lispdir}:${datadir}/emacs/${version}/leim'
+lisppath='${locallisppath}:${standardlisppath}'
 etcdir='${datadir}/emacs/${version}/etc'
 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
 docdir='${datadir}/emacs/${version}/etc'
@@ -230,11 +231,6 @@ AC_ARG_ENABLE(ns-self-contained,
    EN_NS_SELF_CONTAINED=$enableval,
    EN_NS_SELF_CONTAINED=yes)
 
-AC_ARG_ENABLE(asserts,
-[AS_HELP_STRING([--enable-asserts], [compile code with asserts enabled])],
-      USE_XASSERTS=$enableval,
-      USE_XASSERTS=no)
-
 AC_ARG_ENABLE(locallisppath,
 [AS_HELP_STRING([--enable-locallisppath=PATH],
                 [directories Emacs should search for lisp files specific
@@ -251,7 +247,7 @@ AC_ARG_ENABLE(checking,
                 enable only specific categories of checks.
                 Categories are: all,yes,no.
                 Flags are: stringbytes, stringoverrun, stringfreelist,
-                xmallocoverrun, conslist])],
+                xmallocoverrun, conslist, glyphs])],
 [ac_checking_flags="${enableval}"],[])
 IFS="${IFS=    }"; ac_save_IFS="$IFS"; IFS="$IFS,"
 for check in $ac_checking_flags
@@ -264,19 +260,22 @@ do
                        ac_gc_check_string_overrun= ;
                        ac_gc_check_string_free_list= ;
                        ac_xmalloc_overrun= ;
-                       ac_gc_check_cons_list= ;;
+                       ac_gc_check_cons_list= ;
+                       ac_glyphs_debug= ;;
        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_gc_check_cons_list=1 ;
+                       ac_glyphs_debug=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 ;;
        *)      AC_MSG_ERROR(unknown check category $check) ;;
        esac
 done
@@ -284,7 +283,7 @@ IFS="$ac_save_IFS"
 
 if test x$ac_enable_checking != x ; then
   AC_DEFINE(ENABLE_CHECKING, 1,
-[Enable expensive run-time checking of data types?])
+[Define to 1 if expensive run-time data type and consistency checks are enabled.])
 fi
 if test x$ac_gc_check_stringbytes != x ; then
   AC_DEFINE(GC_CHECK_STRING_BYTES, 1,
@@ -308,14 +307,18 @@ if test x$ac_gc_check_cons_list != x ; then
   AC_DEFINE(GC_CHECK_CONS_LIST, 1,
 [Define this to check for errors in cons list.])
 fi
+if test x$ac_glyphs_debug != x ; then
+  AC_DEFINE(GLYPH_DEBUG, 1,
+[Define this to enable glyphs debugging code.])
+fi
 
-AC_ARG_ENABLE(use-lisp-union-type,
-[AS_HELP_STRING([--enable-use-lisp-union-type],
-                [use a union for the Lisp_Object data type.
-               This is only useful for development for catching certain types of bugs.])],
+AC_ARG_ENABLE(check-lisp-object-type,
+[AS_HELP_STRING([--enable-check-lisp-object-type],
+                [enable compile time checks for the Lisp_Object data type.
+               This is useful for development for catching certain types of bugs.])],
 if test "${enableval}" != "no"; then
-   AC_DEFINE(USE_LISP_UNION_TYPE, 1,
-   [Define this to use a lisp union for the Lisp_Object data type.])
+   AC_DEFINE(CHECK_LISP_OBJECT_TYPE, 1,
+   [Define this to enable compile time checks for the Lisp_Object data type.])
 fi)
 
 
@@ -572,7 +575,9 @@ gl_EARLY
 
 AC_ARG_ENABLE([gcc-warnings],
   [AS_HELP_STRING([--enable-gcc-warnings],
-                  [turn on lots of GCC warnings (for developers)])],
+                  [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.])],
   [case $enableval in
      yes|no) ;;
      *)      AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
@@ -581,6 +586,32 @@ AC_ARG_ENABLE([gcc-warnings],
   [gl_gcc_warnings=no]
 )
 
+AC_ARG_ENABLE(link-time-optimization,
+[AS_HELP_STRING([--enable-link-time-optimization],
+                [build emacs with link-time optimization.
+                 This is supported only for GCC since 4.5.0.])],
+if test "${enableval}" != "no"; then
+   AC_MSG_CHECKING([whether link-time optimization is supported])
+   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"
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+       [ac_lto_supported=yes], [ac_lto_supported=no])
+      CFLAGS="$old_CFLAGS"
+   fi
+   AC_MSG_RESULT([$ac_lto_supported])
+   if test "$ac_lto_supported" = "yes"; then
+      CFLAGS="$CFLAGS $LTO"
+   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.
@@ -631,16 +662,19 @@ else
   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 getenv etc.
+  nw="$nw -Wredundant-decls"        # we regularly (re)declare functions
   nw="$nw -Wlogical-op"             # any use of fwrite provokes this
-  nw="$nw -Wformat-nonliteral"      # Emacs does this a lot
+  nw="$nw -Wformat-nonliteral"      # we do 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"            # e.g., ftoastr.c
-  nw="$nw -Winline"                 # e.g., dispnew.c's inlining of row_equal_p
+  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
 
   # Emacs doesn't care about shadowing; see
   # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
@@ -699,9 +733,11 @@ AC_PATH_PROG(INSTALL_INFO, install-info, :,
   $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin)
 dnl Don't use GZIP, which is used by gzip for additional parameters.
 AC_PATH_PROG(GZIP_PROG, gzip)
-AC_PATH_PROG(PAXCTL, paxctl,,
-  [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
 
+if test $opsys = gnu-linux; then
+  AC_PATH_PROG(PAXCTL, paxctl,,
+    [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
+fi
 
 ## Need makeinfo >= 4.7 (?) to build the manuals.
 AC_PATH_PROG(MAKEINFO, makeinfo, no)
@@ -1069,6 +1105,13 @@ case $opsys in
 esac
 
 
+# Configure gnulib before invoking PKG_CHECK_MODULES, as the latter might
+# for example add -lrt to RSVG_LIBS, which would then cause gnulib to
+# incorrectly conclude that -lrt is not needed to link clock_gettime.
+gl_ASSERT_NO_GNULIB_POSIXCHECK
+gl_ASSERT_NO_GNULIB_TESTS
+gl_INIT
+
 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 
 dnl This function definition taken from Gnome 2.0
@@ -1179,7 +1222,6 @@ fi
 
 dnl checks for header files
 AC_CHECK_HEADERS_ONCE(
-  sys/select.h sys/time.h utime.h
   linux/version.h sys/systeminfo.h
   stdio_ext.h fcntl.h coff.h pty.h
   sys/vlimit.h sys/resource.h
@@ -1211,26 +1253,6 @@ if test $ac_cv_have_decl_sys_siglist != yes; then
 fi
 AC_HEADER_SYS_WAIT
 
-dnl Some systems have utime.h but don't declare the struct anyplace.
-AC_CACHE_CHECK(for struct utimbuf, emacs_cv_struct_utimbuf,
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#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]], [[static struct utimbuf x; x.actime = x.modtime;]])],
-  emacs_cv_struct_utimbuf=yes, emacs_cv_struct_utimbuf=no))
-if test $emacs_cv_struct_utimbuf = yes; then
-  AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, [Define to 1 if `struct utimbuf' is declared by <utime.h>.])
-fi
-
 dnl Check for speed_t typedef.
 AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t,
   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <termios.h>]], [[speed_t x = 1;]])],
@@ -1240,23 +1262,6 @@ if test $emacs_cv_speed_t = yes; then
           [Define to 1 if `speed_t' is declared by <termios.h>.])
 fi
 
-AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval,
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#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]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
-  emacs_cv_struct_timeval=yes, emacs_cv_struct_timeval=no))
-HAVE_TIMEVAL=$emacs_cv_struct_timeval
-if test $emacs_cv_struct_timeval = yes; then
-  AC_DEFINE(HAVE_TIMEVAL, 1, [Define to 1 if `struct timeval' is declared by <sys/time.h>.])
-fi
-
 AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception,
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]],
 [[static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;]])],
@@ -2445,7 +2450,7 @@ if test "${HAVE_X11}" = "yes"; then
   if test "${with_png}" != "no"; then
     # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
     # in /usr/include/libpng.
-    AC_CHECK_HEADERS(png.h libpng/png.h)
+    AC_CHECK_HEADERS(png.h libpng/png.h, break)
     if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
       AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm)
     fi
@@ -2454,6 +2459,19 @@ if test "${HAVE_X11}" = "yes"; then
   if test "${HAVE_PNG}" = "yes"; then
     AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
     LIBPNG="-lpng -lz -lm"
+
+    AC_CHECK_DECL(png_longjmp,
+      [],
+      [AC_DEFINE(PNG_DEPRECATED, [],
+        [Define to empty to suppress deprecation warnings when building
+         with --enable-gcc-warnings and with libpng versions before 1.5,
+         which lack png_longjmp.])],
+      [[#ifdef HAVE_LIBPNG_PNG_H
+       # include <libpng/png.h>
+       #else
+       # include <png.h>
+       #endif
+      ]])
   fi
 fi
 AC_SUBST(LIBPNG)
@@ -2690,11 +2708,11 @@ esac
 AC_SUBST(BLESSMAIL_TARGET)
 
 
-AC_CHECK_FUNCS_ONCE(gethostname \
+AC_CHECK_FUNCS(gethostname \
 rename closedir mkdir rmdir getrusage get_current_dir_name \
-random lrand48 logb frexp fmod rint cbrt setsid \
+lrand48 logb frexp fmod cbrt setsid \
 strerror fpathconf select euidaccess getpagesize setlocale \
-utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
+utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \
 __fpending strsignal setitimer \
 sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
 gai_strerror mkstemp getline getdelim fsync sync \
@@ -2703,6 +2721,22 @@ getpwent endpwent getgrent endgrent \
 touchlock \
 cfmakeraw cfsetspeed copysign __executable_start)
 
+dnl getwd appears to be buggy on SVR4.2, so we don't use it.
+if test $opsys != unixware; then
+  AC_CHECK_FUNCS(getwd)
+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*) : ;;
+   *) AC_CHECK_FUNCS(random rint) ;;
+esac
+
 dnl Cannot use AC_CHECK_FUNCS
 AC_CACHE_CHECK([for __builtin_unwind_init],
               emacs_cv_func___builtin_unwind_init,
@@ -2721,10 +2755,10 @@ AC_FUNC_FSEEKO
 AC_FUNC_GETPGRP
 
 # UNIX98 PTYs.
-AC_CHECK_FUNCS_ONCE(grantpt)
+AC_CHECK_FUNCS(grantpt)
 
 # PTY-related GNU extensions.
-AC_CHECK_FUNCS_ONCE(getpt)
+AC_CHECK_FUNCS(getpt)
 
 # 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.
@@ -2839,33 +2873,40 @@ AC_SUBST(TERMCAP_OBJ)
 
 
 # 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
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>
+
+if test $opsys != darwin; then
+
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>
 #include <arpa/nameser.h>
 #include <resolv.h>]],
     [[return res_init();]])],
     have_res_init=yes, have_res_init=no)
-if test "$have_res_init" = no; then
-  OLIBS="$LIBS"
-  LIBS="$LIBS -lresolv"
-  AC_MSG_CHECKING(for res_init with -lresolv)
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>
+  if test "$have_res_init" = no; then
+    OLIBS="$LIBS"
+    LIBS="$LIBS -lresolv"
+    AC_MSG_CHECKING(for res_init with -lresolv)
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>
 #include <arpa/nameser.h>
 #include <resolv.h>]],
-    [[return res_init();]])],
-    have_res_init=yes, have_res_init=no)
-  AC_MSG_RESULT($have_res_init)
-  if test "$have_res_init" = yes ; then
-    resolv=yes
+      [[return res_init();]])],
+      have_res_init=yes, have_res_init=no)
+    AC_MSG_RESULT($have_res_init)
+    if test "$have_res_init" = yes ; then
+      resolv=yes
+    fi
+    LIBS="$OLIBS"
   fi
-  LIBS="$OLIBS"
-fi
 
-if test "$have_res_init" = yes; then
-  AC_DEFINE(HAVE_RES_INIT, 1, [Define to 1 if res_init is available.])
-fi
+  if test "$have_res_init" = yes; then
+    AC_DEFINE(HAVE_RES_INIT, 1, [Define to 1 if res_init is available.])
+  fi
+fi                              dnl !darwin
 
 # Do we need the Hesiod library to provide the support routines?
+dnl FIXME?  Should we be skipping this on Darwin too?
 LIBHESIOD=
 if test "$with_hesiod" != no ; then
   # Don't set $LIBS here -- see comments above.  FIXME which comments?
@@ -2889,7 +2930,7 @@ fi
 AC_SUBST(LIBHESIOD)
 
 # Do we need libresolv (due to res_init or Hesiod)?
-if test "$resolv" = yes ; then
+if test "$resolv" = yes && test $opsys != darwin; then
   AC_DEFINE(HAVE_LIBRESOLV, 1,
             [Define to 1 if you have the resolv library (-lresolv).])
   LIBRESOLV=-lresolv
@@ -2981,7 +3022,7 @@ AC_SUBST(KRB5LIB)
 AC_SUBST(DESLIB)
 AC_SUBST(KRB4LIB)
 
-AC_CHECK_FUNCS_ONCE(tzset)
+AC_CHECK_FUNCS(tzset)
 AC_MSG_CHECKING(whether localtime caches TZ)
 AC_CACHE_VAL(emacs_cv_localtime_cache,
 [if test x$ac_cv_func_tzset = xyes; then
@@ -3019,33 +3060,6 @@ if test $emacs_cv_localtime_cache = yes; then
            [Define to 1 if localtime caches TZ.])
 fi
 
-if test "x$HAVE_TIMEVAL" = xyes; then
-  AC_CHECK_FUNCS(gettimeofday)
-  if test $ac_cv_func_gettimeofday = yes; then
-    AC_CACHE_CHECK(whether gettimeofday can accept two arguments,
-                  emacs_cv_gettimeofday_two_arguments,
-    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#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]],
-      [[struct timeval time;
-       gettimeofday (&time, 0);]])],
-      emacs_cv_gettimeofday_two_arguments=yes,
-      emacs_cv_gettimeofday_two_arguments=no)])
-    if test $emacs_cv_gettimeofday_two_arguments = no; then
-      AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT, 1,
-               [Define to 1 if gettimeofday accepts only one argument.])
-    fi
-  fi
-fi
-
 ok_so_far=yes
 AC_CHECK_FUNC(socket, , ok_so_far=no)
 if test $ok_so_far = yes; then
@@ -3075,7 +3089,7 @@ fi
 
 AC_FUNC_FORK
 
-AC_CHECK_FUNCS_ONCE(snprintf)
+AC_CHECK_FUNCS(snprintf)
 
 dnl Adapted from Haible's version.
 AC_CACHE_CHECK([for nl_langinfo and CODESET], emacs_cv_langinfo_codeset,
@@ -3118,7 +3132,7 @@ case $opsys in
 esac
 
 dnl SIGIO exists, but the feature doesn't work in the way Emacs needs.
-dnl See eg <http://article.gmane.org/gmane.os.openbsd.ports/46831>. 
+dnl See eg <http://article.gmane.org/gmane.os.openbsd.ports/46831>.
 case $opsys in
   hpux* | irix6-5 | openbsd | sol2* | unixware )
     AC_DEFINE(BROKEN_SIGIO, 1, [Define if SIGIO should not be used.])
@@ -3126,8 +3140,37 @@ case $opsys in
 esac
 
 case $opsys in
-  gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;;
-  openbsd) opsysfile="s/netbsd.h" ;;
+  gnu-* | sol2-10 )
+    dnl FIXME Can't we test if this exists (eg /proc/$$)?
+    AC_DEFINE(HAVE_PROCFS, 1, [Define if you have the /proc filesystem.])
+  ;;
+esac
+
+case $opsys in
+   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.
+     dnl Defining BROKEN_SA_RESTART is not the same as undef'ing SA_RESTART.
+     AC_DEFINE(BROKEN_SA_RESTART, 1, [Define if SA_RESTART should only
+       be used in batch mode.])
+     dnl It works to open the pty's tty in the parent (Emacs), then
+     dnl close and reopen it in the child.
+     AC_DEFINE(USG_SUBTTY_WORKS, 1, [Define for USG systems where it
+       works to open a pty's tty in the parent process, then close and
+       reopen it in the child.])
+
+     opsysfile="s/hpux10-20.h"
+   ;;
+
+   openbsd) opsysfile="s/netbsd.h" ;;
+
+   sol2-10)
+     AC_DEFINE(_STRUCTURED_PROC, 1, [Needed for system_process_attributes
+       on Solaris.])
+     opsysfile="s/sol2-6.h"
+   ;;
 esac
 
 # Set up the CFLAGS for real compilation, so we can substitute it.
@@ -3161,6 +3204,7 @@ AC_SUBST(mandir)
 AC_SUBST(infodir)
 AC_SUBST(lispdir)
 AC_SUBST(leimdir)
+AC_SUBST(standardlisppath)
 AC_SUBST(locallisppath)
 AC_SUBST(lisppath)
 AC_SUBST(x_default_search_path)
@@ -3349,11 +3393,6 @@ AC_SUBST(CYGWIN_OBJ)
 AC_SUBST(PRE_ALLOC_OBJ)
 AC_SUBST(POST_ALLOC_OBJ)
 
-# Configure gnulib here, now that we know LIBS.
-gl_ASSERT_NO_GNULIB_POSIXCHECK
-gl_ASSERT_NO_GNULIB_TESTS
-gl_INIT
-
 case "$opsys" in
   aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
 
@@ -3571,13 +3610,6 @@ AH_BOTTOM([
 #include <string.h>
 #include <stdlib.h>
 
-#if defined __GNUC__ && (__GNUC__ > 2 \
-                         || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
-#define NO_RETURN      __attribute__ ((__noreturn__))
-#else
-#define NO_RETURN      /* nothing */
-#endif
-
 #if __GNUC__ >= 3  /* On GCC 3.0 we might get a warning.  */
 #define NO_INLINE __attribute__((noinline))
 #else
@@ -3639,7 +3671,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}
@@ -3690,11 +3722,6 @@ if test -n "${EMACSDOC}"; then
    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