diff configure @ 4932:8b63e21b0436

fix compile issues with gcc 4 -------------------- ChangeLog entries follow: -------------------- ChangeLog addition: 2010-01-24 Ben Wing <ben@xemacs.org> * aclocal.m4 (XE_SHLIB_STUFF): Use -export-all-symbols instead of -export-dynamic on PE targets (Cygwin and MinGW). * configure.ac (XE_EXPAND_VARIABLE): * configure.ac (TAB): Create variable XEMACS_CC_GPP to check whether we're running g++. Don't just check for an executable called `g++' -- it might be called g++-4 or whatever. Instead, check for either named `g++*' or claiming to be g++ when called with --version. Rewrite code do use the variable. Add -fno-strict-aliasing to optimization flags when GCC and optimized, and in all cases with g++, since under these circumstances strict aliasing is otherwise assumed, and XEmacs can't easily be made to respect its restrictions. * configure: Regenerate. lib-src/ChangeLog addition: 2010-01-24 Ben Wing <ben@xemacs.org> * fakemail.c (args_size): * fakemail.c (parse_header): * ootags.c (C_entries): Fix warnings about possible use of uninitialized vars. lwlib/ChangeLog addition: 2010-01-24 Ben Wing <ben@xemacs.org> * xlwgauge.c (GaugeResize): * xlwgauge.c (GaugeSize): Fix warnings about possible use of uninitialized vars. modules/ChangeLog addition: 2010-01-24 Ben Wing <ben@xemacs.org> * postgresql/postgresql.c (CHECK_LIVE_CONNECTION): * postgresql/postgresql.c (print_pgconn): * postgresql/postgresql.c (Fpq_connectdb): * postgresql/postgresql.c (Fpq_connect_start): * postgresql/postgresql.c (Fpq_exec): * postgresql/postgresql.c (Fpq_get_result): Fix g++ 4.3 complaints about implicit conversions of string literals (const char *) to char *. src/ChangeLog addition: 2010-01-24 Ben Wing <ben@xemacs.org> * chartab.c (decode_char_table_range): * extents.c (extent_fragment_update): * objects-msw.c (initialize_font_instance): * process.c (Fgetenv): * redisplay-output.c (get_next_display_block): Fix warnings about possible use of uninitialized vars. * compiler.h: * compiler.h (REGISTER): * event-stream.c (is_scrollbar_event): * window.c (window_scrollbar_width): * window.c (window_scrollbar_height): * window.c (window_left_window_gutter_width): * window.c (window_right_window_gutter_width): Add USED_IF_SCROLLBARS. Use it to fix warnings about unused vars when --with-scrollbars=no. * config.h.in: Change comment to explain better why DECLARE_INLINE_HEADER is needed. * dialog-msw.c: * emacs.c (SHEBANG_EXE_PROGNAME_LENGTH): * emacs.c (main_1): * event-msw.c (struct mswin_message_debug): * event-msw.c (debug_output_mswin_message): * font-mgr.c: * font-mgr.c (Ffc_config_filename): * glyphs-msw.c (struct): * glyphs-msw.c (bitmap_table): * glyphs-x.c (update_widget_face): * intl-win32.c (struct lang_to_string): * intl-win32.c (lang_to_string_table): * nas.c: * objects-xlike-inc.c: * objects-xlike-inc.c (xft_find_charset_font): * syswindows.h: * win32.c (mswindows_output_last_error): Fix g++ 4.3 complaints about implicit conversions of string literals (const char *) to char *. * lisp.h: G++ 4.3 needs #include <limits> to avoid errors about min/max. * lisp.h (disabled_assert_with_message): Use disabled_assert* whenever asserts are disabled. Rewrite disabled_assert* to avoid complaints about unused vars by pretending to use the vars but casting them to (void). Remove code that defined assert() weirdly if DEBUG_XEMACS but not USE_ASSERTIONS -- configure sets USE_ASSERTIONS automatically when DEBUG_XEMACS, and if the user has forced it off, then so be it. * lisp.h (SYMBOL_KEYWORD): Put some of the combined `extern Lisp_Object's back under the file they are declared in. Cosmetic fix. * number.h: Remove `extern Lisp_Object' decls that duplicate lisp.h, since they have different C vs. C++ linkage.
author Ben Wing <ben@xemacs.org>
date Sun, 24 Jan 2010 22:04:58 -0600
parents 6c0bb4d2c23a
children 349f01075eb7
line wrap: on
line diff
--- a/configure	Thu Jan 21 00:46:37 2010 -0600
+++ b/configure	Sun Jan 24 22:04:58 2010 -0600
@@ -1,12 +1,14 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for XEmacs 21.5.
+# Generated by GNU Autoconf 2.65 for XEmacs 21.5.
 #
 # Report bugs to <xemacs-beta@xemacs.org>.
 #
+#
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
-# Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+#
 #
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
@@ -573,7 +575,8 @@
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
 
 # Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -1986,7 +1989,7 @@
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   YACC        The `Yet Another C Compiler' implementation to use. Defaults to
@@ -2063,7 +2066,7 @@
 if $ac_init_version; then
   cat <<\_ACEOF
 XEmacs configure 21.5
-generated by GNU Autoconf 2.64
+generated by GNU Autoconf 2.65
 
 Copyright (C) 2009 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
@@ -2156,7 +2159,7 @@
 	ac_retval=1
 fi
   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  return $ac_retval
+  as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
 
@@ -2193,7 +2196,7 @@
     ac_retval=1
 fi
   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  return $ac_retval
+  as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
 
@@ -2328,7 +2331,7 @@
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  return $ac_retval
+  as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
 
@@ -2405,7 +2408,7 @@
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  return $ac_retval
+  as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
 
@@ -2800,7 +2803,7 @@
 
   fi
   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  return $ac_retval
+  as_fn_set_status $ac_retval
 
 } # ac_fn_c_compute_int
 cat >config.log <<_ACEOF
@@ -2808,7 +2811,7 @@
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by XEmacs $as_me 21.5, which was
-generated by GNU Autoconf 2.64.  Invocation command line was
+generated by GNU Autoconf 2.65.  Invocation command line was
 
   $ $0 $@
 
@@ -3061,7 +3064,7 @@
 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
 do
   test "x$ac_site_file" = xNONE && continue
-  if test -r "$ac_site_file"; then
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
@@ -3070,9 +3073,9 @@
 done
 
 if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
 $as_echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
@@ -6295,32 +6298,30 @@
 ... rest of stderr output deleted ...
          10q' conftest.err >conftest.er1
     cat conftest.er1 >&5
-    rm -f conftest.er1 conftest.err
-  fi
+  fi
+  rm -f conftest.er1 conftest.err
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 done
 
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
+
+int
+main ()
+{
 
   ;
   return 0;
 }
 _ACEOF
 ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
 
 # The possible output files:
@@ -6382,10 +6383,10 @@
 else
   ac_file=''
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
 if test -z "$ac_file"; then :
-  $as_echo "$as_me: failed program was:" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
@@ -6393,51 +6394,18 @@
 { as_fn_set_status 77
 as_fn_error "C compiler cannot create executables
 See \`config.log' for more details." "$LINENO" 5; }; }
-fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
 ac_exeext=$ac_cv_exeext
 
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
-    fi
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
 ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
 $as_echo_n "checking for suffix of executables... " >&6; }
 if { { ac_try="$ac_link"
@@ -6470,13 +6438,72 @@
 as_fn_error "cannot compute suffix of executables: cannot compile and link
 See \`config.log' for more details." "$LINENO" 5; }
 fi
-rm -f conftest$ac_cv_exeext
+rm -f conftest conftest$ac_cv_exeext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
 $as_echo "$ac_cv_exeext" >&6; }
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
 $as_echo_n "checking for suffix of object files... " >&6; }
 if test "${ac_cv_objext+set}" = set; then :
@@ -7535,8 +7562,8 @@
 ... rest of stderr output deleted ...
          10q' conftest.err >conftest.er1
     cat conftest.er1 >&5
-    rm -f conftest.er1 conftest.err
-  fi
+  fi
+  rm -f conftest.er1 conftest.err
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 done
@@ -8083,8 +8110,8 @@
 ... rest of stderr output deleted ...
          10q' conftest.err >conftest.er1
     cat conftest.er1 >&5
-    rm -f conftest.er1 conftest.err
-  fi
+  fi
+  rm -f conftest.er1 conftest.err
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 done
@@ -8631,8 +8658,8 @@
 ... rest of stderr output deleted ...
          10q' conftest.err >conftest.er1
     cat conftest.er1 >&5
-    rm -f conftest.er1 conftest.err
-  fi
+  fi
+  rm -f conftest.er1 conftest.err
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 done
@@ -8908,6 +8935,24 @@
 : ${XEMACS_CC:="$CC"}
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using g++" >&5
+$as_echo_n "checking whether we are using g++... " >&6; }
+
+XEMACS_CC_GPP=no
+case "$XEMACS_CC" in
+  *g++* ) XEMACS_CC_GPP=yes ;;
+esac
+
+if test "$XEMACS_CC_GPP" = "no" -a "$GCC" = "yes"; then
+  case "`$XEMACS_CC --version`" in
+    g++* ) XEMACS_CC_GPP=yes ;;
+  esac
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XEMACS_CC_GPP" >&5
+$as_echo "$XEMACS_CC_GPP" >&6; }
+
+
 test -n "$CPP" -a -d "$CPP" && CPP=
 
 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
@@ -9436,26 +9481,15 @@
 
 xemacs_cc_cc_mismatch=no
 if test "$CC" != "$XEMACS_CC"; then
-  case "$XEMACS_CC" in
-  *g++* )
-    if test "$GCC" != "yes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: CC and g++ are mismatched; XE_CFLAGS may be wrong" >&5
+  if test "$XEMACS_CC_GPP" = "yes" -a "$GCC" != "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: CC and g++ are mismatched; XE_CFLAGS may be wrong" >&5
 $as_echo "$as_me: WARNING: CC and g++ are mismatched; XE_CFLAGS may be wrong" >&2;}
-      xemacs_cc_cc_mismatch=yes
-    fi
-    ;;
-  esac
-  if test -n "$GCC"; then
-    case $XEMACS_CC in
-    *g++* )
-      # it's as expected, do nothing
-      ;;
-    * )
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong" >&5
+    xemacs_cc_cc_mismatch=yes
+  fi
+  if test -n "$GCC" -a "$XEMACS_CC_GPP" != "yes" ; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong" >&5
 $as_echo "$as_me: WARNING: gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong" >&2;}
-      xemacs_cc_cc_mismatch=yes
-      ;;
-    esac
+    xemacs_cc_cc_mismatch=yes
   fi
   fi
 
@@ -9478,10 +9512,10 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for preferred optimization flags" >&5
 $as_echo_n "checking for preferred optimization flags... " >&6; }
-if test "$with_optimization" = "yes" ; then
-  if test "$cflags_optimization_specified" = "no"; then
+if test "$cflags_optimization_specified" = "no"; then
+  if test "$with_optimization" = "yes" ; then
             if test "$GCC" = "yes"; then
-      with_cflags_optimization="-O3"
+                                    with_cflags_optimization="-O3 -fno-strict-aliasing"
     elif test "$__SUNPRO_C" = "yes"; then
       case "$opsys" in
         sol2    ) with_cflags_optimization="-xO4" ;;
@@ -9494,9 +9528,9 @@
       with_cflags_optimization="-O3 -Ob2"
         else
       with_cflags_optimization="-O" ;    fi
-  fi
-else
-  with_cflags_optimization=
+  elif test "$XEMACS_CC_GPP" = "yes" ; then
+                with_cflags_optimization="-fno-strict-aliasing"
+  fi
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_cflags_optimization}" >&5
@@ -9539,7 +9573,7 @@
     test "$__GCC" -ge 3 && with_cflags_warning="$with_cflags_warning -Wpacked"
             test "$have_glibc" != "yes" && \
       with_cflags_warning="$with_cflags_warning -Wpointer-arith"
-                                        if test "$with_xemacs_compiler" = "g++"; then
+                                        if test "$XEMACS_CC_GPP" = "yes"; then
       xe_cflags_warning="$with_cflags_warning -Weffc++"
     elif test "$__GCC" -ge 3; then
       xe_cflags_warning="$with_cflags_warning -Wunused-parameter"
@@ -13882,7 +13916,7 @@
 
 
 
-if test "$with_xemacs_compiler" = "g++"; then
+if test "$XEMACS_CC_GPP" = "yes"; then
   LIBSTDCPP=-lstdc++
 else
   LIBSTDCPP=
@@ -14554,10 +14588,17 @@
 fi # End of if cc_produces_so = no
 
 
-if test "$xe_gnu_ld" = yes; then
-  if test "$ld_shlibs" = yes; then
+if test "$xe_gnu_ld" = yes -a "$ld_shlibs" = yes; then
+  case "$xehost_os" in
+  *cygwin* | *mingw* )
+    # -export-all-symbols is the PE equivalent of ELF-specific -export-dynamic
+    ld_dynamic_link_flags="${wl}-export-all-symbols"
+    ;;
+
+  *)
     ld_dynamic_link_flags="${wl}-export-dynamic"
-  fi
+    ;;
+  esac
 fi
 
 if test -z "$ld_dynamic_link_flags"; then
@@ -20646,41 +20687,41 @@
 					      $as_echo "#define USE_SYSTEM_MALLOC 1" >>confdefs.h
 
 fi
-test "$GCC"                = "yes" && $as_echo "#define USE_GCC 1" >>confdefs.h
-
-test "$with_xemacs_compiler" = "g++" && $as_echo "#define USE_GPLUSPLUS 1" >>confdefs.h
+test "$GCC"                  = "yes" && $as_echo "#define USE_GCC 1" >>confdefs.h
+
+test "$XEMACS_CC_GPP"        = "yes" && $as_echo "#define USE_GPLUSPLUS 1" >>confdefs.h
 
 test "$with_external_widget" = "yes" && $as_echo "#define EXTERNAL_WIDGET 1" >>confdefs.h
 
-test "$with_kkcc"        = "yes" && $as_echo "#define USE_KKCC 1" >>confdefs.h
-
-test "$with_newgc"       = "yes" && $as_echo "#define NEW_GC 1" >>confdefs.h
-
-test "$have_vdb_posix"     = "yes" && $as_echo "#define VDB_POSIX 1" >>confdefs.h
-
-test "$have_vdb_fake"      = "yes" && $as_echo "#define VDB_FAKE 1" >>confdefs.h
-
-test "$with_quick_build" = "yes" && $as_echo "#define QUICK_BUILD 1" >>confdefs.h
-
-test "$with_purify"        = "yes" && $as_echo "#define PURIFY 1" >>confdefs.h
-
-test "$with_quantify"      = "yes" && $as_echo "#define QUANTIFY 1" >>confdefs.h
-
-test "$with_valgrind"      = "yes" && $as_echo "#define USE_VALGRIND 1" >>confdefs.h
-
-test "$with_pop"           = "yes" && $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
-
-test "$with_kerberos"      = "yes" && $as_echo "#define KERBEROS 1" >>confdefs.h
-
-test "$with_hesiod"        = "yes" && $as_echo "#define HESIOD 1" >>confdefs.h
-
-test "$with_union_type"  = "yes" && $as_echo "#define USE_UNION_TYPE 1" >>confdefs.h
-
-test "$with_pdump"       = "yes" && $as_echo "#define PDUMP 1" >>confdefs.h
-
-test "$with_dump_in_exec" = "yes" && $as_echo "#define DUMP_IN_EXEC 1" >>confdefs.h
-
-test "$with_ipv6_cname"    = "yes" && $as_echo "#define IPV6_CANONICALIZE 1" >>confdefs.h
+test "$with_kkcc"            = "yes" && $as_echo "#define USE_KKCC 1" >>confdefs.h
+
+test "$with_newgc"           = "yes" && $as_echo "#define NEW_GC 1" >>confdefs.h
+
+test "$have_vdb_posix"       = "yes" && $as_echo "#define VDB_POSIX 1" >>confdefs.h
+
+test "$have_vdb_fake"        = "yes" && $as_echo "#define VDB_FAKE 1" >>confdefs.h
+
+test "$with_quick_build"     = "yes" && $as_echo "#define QUICK_BUILD 1" >>confdefs.h
+
+test "$with_purify"          = "yes" && $as_echo "#define PURIFY 1" >>confdefs.h
+
+test "$with_quantify"        = "yes" && $as_echo "#define QUANTIFY 1" >>confdefs.h
+
+test "$with_valgrind"        = "yes" && $as_echo "#define USE_VALGRIND 1" >>confdefs.h
+
+test "$with_pop"             = "yes" && $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
+
+test "$with_kerberos"        = "yes" && $as_echo "#define KERBEROS 1" >>confdefs.h
+
+test "$with_hesiod"          = "yes" && $as_echo "#define HESIOD 1" >>confdefs.h
+
+test "$with_union_type"      = "yes" && $as_echo "#define USE_UNION_TYPE 1" >>confdefs.h
+
+test "$with_pdump"           = "yes" && $as_echo "#define PDUMP 1" >>confdefs.h
+
+test "$with_dump_in_exec"    = "yes" && $as_echo "#define DUMP_IN_EXEC 1" >>confdefs.h
+
+test "$with_ipv6_cname"      = "yes" && $as_echo "#define IPV6_CANONICALIZE 1" >>confdefs.h
 
 
 
@@ -21531,7 +21572,7 @@
 # values after options handling.
 ac_log="
 This file was extended by XEmacs $as_me 21.5, which was
-generated by GNU Autoconf 2.64.  Invocation command line was
+generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -21571,6 +21612,7 @@
 
   -h, --help       print this help, then exit
   -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
   -q, --quiet, --silent
                    do not print progress messages
   -d, --debug      don't remove temporary files
@@ -21593,10 +21635,11 @@
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
 XEmacs config.status 21.5
-configured by $0, generated by GNU Autoconf 2.64,
-  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.65,
+  with options \\"\$ac_cs_config\\"
 
 Copyright (C) 2009 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
@@ -21632,6 +21675,8 @@
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
     $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
   --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
@@ -21826,7 +21871,7 @@
 t delim
 :nl
 h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
 t more1
 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
 p
@@ -21840,7 +21885,7 @@
 t nl
 :delim
 h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
 t more2
 s/["\\]/\\&/g; s/^/"/; s/$/"/
 p