comparison 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
comparison
equal deleted inserted replaced
1122:7abc2b15a990 1123:37bdd24225ef
1673 CC=gcc 1673 CC=gcc
1674 AC_PROG_CC 1674 AC_PROG_CC
1675 fi 1675 fi
1676 CFLAGS="$xe_save_CFLAGS" 1676 CFLAGS="$xe_save_CFLAGS"
1677 1677
1678 dnl Determine GCC version.
1679 if test "$GCC" = "yes"; then
1680 AC_TRY_RUN([int main () {
1681 #if __GNUC__ >= 3
1682 return 11;
1683 #else
1684 return 0;
1685 #endif
1686 }], [],
1687 [case "$conftest_rc" in
1688 11) echo "You appear to be using GCC version 3 or above."; __GCC3=yes ;;
1689 esac])
1690 fi
1691
1678 dnl Figure out what C preprocessor to use. 1692 dnl Figure out what C preprocessor to use.
1679 1693
1680 dnl On Sun systems, people sometimes set up the variable CPP 1694 dnl On Sun systems, people sometimes set up the variable CPP
1681 dnl with a value that is a directory, not an executable at all. 1695 dnl with a value that is a directory, not an executable at all.
1682 dnl Detect that case, and ignore that value. 1696 dnl Detect that case, and ignore that value.
1943 dnl Calculate value of CFLAGS: 1957 dnl Calculate value of CFLAGS:
1944 dnl Use either command line flag, environment var, or autodetection 1958 dnl Use either command line flag, environment var, or autodetection
1945 if test "$cflags_specified" = "no"; then 1959 if test "$cflags_specified" = "no"; then
1946 dnl Following values of CFLAGS are known to work well. 1960 dnl Following values of CFLAGS are known to work well.
1947 dnl Should we take debugging options into consideration? 1961 dnl Should we take debugging options into consideration?
1948 if test "$GCC" = "yes"; then 1962 if test "$GCC" = "yes"; then
1949 CFLAGS="-g -O3" 1963 CFLAGS="-g -O3"
1950 dnl I'm not convinced this is a good idea any more. -sb 1964 dnl I'm not convinced this is a good idea any more. -sb
1951 dnl test "$opsys $machine" = "linux intel386" && \ 1965 dnl test "$opsys $machine" = "linux intel386" && \
1952 dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2" 1966 dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
1953 elif test "$__SUNPRO_C" = "yes"; then 1967 elif test "$__SUNPRO_C" = "yes"; then
1969 dnl the other flags because we really really want the warnings to be seen 1983 dnl the other flags because we really really want the warnings to be seen
1970 dnl by everyone. 1984 dnl by everyone.
1971 1985
1972 if test "$cflags_warning_specified" = "no"; then 1986 if test "$cflags_warning_specified" = "no"; then
1973 dnl Following warning flags are known to work well. 1987 dnl Following warning flags are known to work well.
1974 if test "$GCC" = "yes"; then 1988 if test "$GCC" = "yes"; then
1975 cflags_warning="-Wall -Wno-switch -Winline -Wmissing-prototypes" 1989 cflags_warning="-Wall -Wno-switch -Winline -Wmissing-prototypes"
1976 dnl Yuck, bad compares have been worth at least 3 crashes! 1990 dnl Yuck, bad compares have been worth at least 3 crashes!
1977 cflags_warning="$cflags_warning -Wsign-compare" 1991 cflags_warning="$cflags_warning -Wsign-compare"
1978 dnl NOTE: The following three, as well as -Wmissing-declarations and 1992 dnl NOTE: The following three, as well as -Wmissing-declarations and
1979 dnl -Weffc++ below, have been recently added. If you are getting 1993 dnl -Weffc++ below, have been recently added. If you are getting
1980 dnl grief from them, please notify ben@xemacs.org! 1994 dnl grief from them, please notify ben@xemacs.org!
1981 cflags_warning="$cflags_warning -Wundef -Wstrict-prototypes -Wpacked" 1995 cflags_warning="$cflags_warning -Wundef -Wstrict-prototypes"
1996 if test "$__GCC3" = "yes"; then
1997 cflags_warning="$cflags_warning -Wpacked"
1998 fi
1982 dnl With g++, -Wshadow produces five zillion utterly random warnings -- 1999 dnl With g++, -Wshadow produces five zillion utterly random warnings --
1983 dnl a local var named `buffer' conflicts with `struct buffer' for 2000 dnl a local var named `buffer' conflicts with `struct buffer' for
1984 dnl example. Even with gcc, -Wshadow is questionable because of its 2001 dnl example. Even with gcc, -Wshadow is questionable because of its
1985 dnl complaints about parameters with the same names as global functions. 2002 dnl complaints about parameters with the same names as global functions.
1986 if test "$xemacs_compiler" != "g++"; then 2003 if test "$xemacs_compiler" != "g++"; then