From 3759870c171027d172762e5ec99a5443ec39334d Mon Sep 17 00:00:00 2001 From: Ossama Othman Date: Sun, 23 Jan 2000 04:28:09 +0000 Subject: ChangeLogTag:Sat Jan 22 21:10:49 2000 Ossama Othman --- m4/acinclude.m4 | 28 +++++++++++++++------------- m4/compiler.m4 | 12 ++++++++++++ 2 files changed, 27 insertions(+), 13 deletions(-) (limited to 'm4') diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index 31f78750487..24d4c278725 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -169,15 +169,16 @@ dnl Run given test(s) with warnings converted to errors dnl Usage: ACE_CONVERT_WARNINGS_TO_ERRORS(TEST-BLOCK) AC_DEFUN(ACE_CONVERT_WARNINGS_TO_ERRORS, dnl [ -dnl If we are using GNU C++, add the "-Werror" compiler flag to the -dnl current set of flags so that compiler warnings become errors. We -dnl do this to cause certain tests to fail when they are supposed to -dnl fail. Some of the tests pass because the GNU C++ compiler issues -dnl warnings instead of errors when errors should occur. -dnl Other "treat warnings as errors" flags for other compilers should -dnl be added if possible. - ace_pre_warning_CXXFLAGS="$CXXFLAGS" +dnl $WERROR is set in the ACE_SET_COMPILER_FLAGS macro. + AC_REQUIRE([ACE_SET_COMPILER_FLAGS])dnl + +dnl Some tests may pass because the compiler issues warnings +dnl instead of errors when errors should occur. This macro converts +dnl warnings to errors when executing the action/test passed to this +dnl macro so that action/test fails when it is supposed to fail; at +dnl least that is the idea. + ace_pre_warning_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $WERROR" $1 @@ -295,11 +296,12 @@ dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) $3 ], [ -dnl Some compilers don't like the "struct" but we need the struct for some -dnl platforms to resolve ambiguities between functions and structures with -dnl with the same name. So, we try the same test but without "struct" if -dnl the above test with "struct" fails. If both tests fail, then we can -dnl be reasonably sure that we don't have the structure we are testing for. +dnl Some compilers don't like the "struct" but we need the struct for +dnl some platforms to resolve ambiguities between functions and +dnl structures with with the same name. So, we try the same test but +dnl without "struct" if the above test with "struct" fails. If both +dnl tests fail, then we can be reasonably sure that we don't have the +dnl structure we are testing for. AC_TRY_COMPILE( [ #include <$2> diff --git a/m4/compiler.m4 b/m4/compiler.m4 index c7f2568c82a..226dccafbab 100644 --- a/m4/compiler.m4 +++ b/m4/compiler.m4 @@ -34,6 +34,18 @@ AC_DEFUN(ACE_SET_COMPILER_FLAGS, dnl AC_REQUIRE([AC_PROG_CXXCPP]) AC_REQUIRE([AC_LANG_CPLUSPLUS]) + if test -n "$GXX"; then +dnl Temporarily change M4 quotes to prevent "regex []" from being eaten +changequote(, )dnl + if $GXX --version | egrep -v '^2\.[0-7]' > /dev/null; then +changequote([, ])dnl + : # Do nothing + else + AC_DEFINE(ACE_HAS_GNUG_PRE_2_8)dnl + AC_DEFINE(ACE_HAS_GNUC_BROKEN_TEMPLATE_INLINE_FUNCTIONS)dnl + fi + fi + dnl Compiler Flag Key dnl CXXFLAGS - C++ flags to use during the configure script run and dnl during ACE compilation. The user may set this prior to -- cgit v1.2.1