>>>> "Jerry" == Jerry James
<james(a)xemacs.org> writes:
Jerry> No! I'm only getting -Wdeclaration-after-statement while
Jerry> compiling in lib-src. The compilation in lwlib and src
Jerry> uses the CFLAGS reported in Installation. What's going on
Jerry> here?
--with-xemacs-compiler support. There's an xe_cflags_warning variable
that you need to propagate those options to. It needs to be in that.
Since g++ won't need it, you can just duplicate it in the place where
you're setting with_cflags_warning.
Something like this:
@@ -2327,8 +2325,12 @@
dnl some very ugly code changes.
if test "$with_xemacs_compiler" = "g++"; then
xe_cflags_warning="$with_cflags_warning -Weffc++"
- elif test "$__GCC3" = "yes"; then
+ elif test "$__GCC" -ge 3; then
xe_cflags_warning="$with_cflags_warning -Wunused-parameter"
+ if test "$__GCC" -gt 3 || test "$__GCC_MINOR" -ge 4; then
+ with_cflags_warning="$with_cflags_warning
-Wdeclaration-after-statement"
+ xe_cflags_warning="$with_cflags_warning
-Wdeclaration-after-statement"
+ fi
fi
with_cflags_warning="$with_cflags_warning -Wshadow
-Wmissing-declarations"
with_cflags_warning="$with_cflags_warning -Wmissing-prototypes
-Wstrict-prototypes"
Urk. Note those last two lines are getting lost, too.
xe_cflags_warning versions probably should be added somewhere in the
above.
What do you think about redesigning the logic so that if with_compiler
!= with_xemacs_compiler two separate runs of the tests are done, with
their own values of __GCC and __GCC_MINOR?
--
School of Systems and Information Engineering
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.