summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2000-01-23 04:28:09 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2000-01-23 04:28:09 +0000
commit3759870c171027d172762e5ec99a5443ec39334d (patch)
treeebecfea30f927621f57b8ad0de40dd950f2e43bd /m4
parent913e6cf5142d46ee82d321208472c3c5e3c6f308 (diff)
downloadATCD-3759870c171027d172762e5ec99a5443ec39334d.tar.gz
ChangeLogTag:Sat Jan 22 21:10:49 2000 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'm4')
-rw-r--r--m4/acinclude.m428
-rw-r--r--m4/compiler.m412
2 files changed, 27 insertions, 13 deletions
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