diff configure.in @ 1123:37bdd24225ef

[xemacs-hg @ 2002-11-27 07:15:02 by ben] bug fixes, profiling debugging improvements configure.in: Check for GCC version and only use -Wpacked in v3. .cvsignore: Add .idb, .ilk for MS Windows VC++. cl-macs.el: Document better. cmdloop.el: Removed. Remove nonworking breakpoint-on-error now that debug-on-error works as documented. help.el: Extract out with-displaying-help-buffer into a more general mechanism. lib-complete.el: Support thunks in find-library-source-path. startup.el: Don't catch errors when noninteractive, because that makes stack traces from stack-trace-on-error useless. .cvsignore: Windows shit. alloc.c: Better redisplay-related assert. elhash.c: Comment change. eval.c: Don't generate large warning strings (e.g. backtraces) when they will be discarded. Implement debug-on-error as documented -- it will enter the debugger and crash when an uncaught signal happens noninteractively and we are --debug. Better redisplay-related asserts. frame-msw.c, frame.c, lisp.h, redisplay.c, scrollbar-gtk.c, scrollbar-x.c, signal.c, sysdep.c: Fix up documentation related to QUIT (which CANNOT garbage-collect under any circumstances), and to redisplay critical sections. lread.c: Add load-ignore-out-of-date-elc-files, load-always-display-messages, load-show-full-path-in-messages for more robust package compilation and debugging. profile.c: Overhaul profile code. Change format to include call count and be extensible for further info. Remove call-count-profile-table. Add set-profiling-info. See related profile.el changes (which SHOULD ABSOLUTELY be in the core! Get rid of xemacs-devel and xemacs-base packages *yesterday*!).
author ben
date Wed, 27 Nov 2002 07:15:36 +0000
parents b3fcaf7cb856
children 2e45c3beb9dc
line wrap: on
line diff
--- a/configure.in	Tue Nov 26 22:52:59 2002 +0000
+++ b/configure.in	Wed Nov 27 07:15:36 2002 +0000
@@ -1675,6 +1675,20 @@
 fi
 CFLAGS="$xe_save_CFLAGS"
 
+dnl Determine GCC version.
+if test "$GCC" = "yes"; then
+AC_TRY_RUN([int main () {
+#if __GNUC__ >= 3
+return 11;
+#else
+return 0;
+#endif
+}], [],
+[case "$conftest_rc" in
+  11) echo "You appear to be using GCC version 3 or above."; __GCC3=yes ;;
+esac])
+fi
+
 dnl Figure out what C preprocessor to use.
 
 dnl On Sun systems, people sometimes set up the variable CPP
@@ -1945,7 +1959,7 @@
 if test "$cflags_specified" = "no"; then
   dnl Following values of CFLAGS are known to work well.
   dnl Should we take debugging options into consideration?
-  if   test "$GCC" = "yes"; then
+  if test "$GCC" = "yes"; then
     CFLAGS="-g -O3"
     dnl I'm not convinced this is a good idea any more. -sb
     dnl test "$opsys $machine" = "linux intel386" && \
@@ -1971,14 +1985,17 @@
 
 if test "$cflags_warning_specified" = "no"; then
   dnl Following warning flags are known to work well.
-  if   test "$GCC" = "yes"; then
+  if test "$GCC" = "yes"; then
     cflags_warning="-Wall -Wno-switch -Winline -Wmissing-prototypes"
     dnl Yuck, bad compares have been worth at least 3 crashes!
     cflags_warning="$cflags_warning -Wsign-compare"
     dnl NOTE: The following three, as well as -Wmissing-declarations and
     dnl -Weffc++ below, have been recently added.  If you are getting
     dnl grief from them, please notify ben@xemacs.org!
-    cflags_warning="$cflags_warning -Wundef -Wstrict-prototypes -Wpacked"
+    cflags_warning="$cflags_warning -Wundef -Wstrict-prototypes"
+    if test "$__GCC3" = "yes"; then
+      cflags_warning="$cflags_warning -Wpacked"
+    fi
     dnl With g++, -Wshadow produces five zillion utterly random warnings --
     dnl a local var named `buffer' conflicts with `struct buffer' for
     dnl example.  Even with gcc, -Wshadow is questionable because of its