summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/acinclude.m420
-rw-r--r--m4/threads.m426
2 files changed, 40 insertions, 6 deletions
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index 4b84ebf1d73..a8db6bad648 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -77,18 +77,26 @@ 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.
- TEMPCXXFLAGS=""
+dnl Other "treat warnings as errors" flags for other compilers should
+dnl be added if possible.
+ save_CXXFLAGS="$CXXFLAGS"
+
if test -n "$GXX"; then
- TEMPCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Werror"
+ else
+ case $target in
+ *solaris*)
+ if test "$CXX" = CC; then
+ CXXFLAGS="$CXXFLAGS -xwe"
+ fi
+ ;;
+ *) ;;
+ esac
fi
$1
- if test -n "$TEMPCXXFLAGS"; then
- CXXFLAGS="$TEMPCXXFLAGS"
- fi
-
+ CXXFLAGS="$save_CXXFLAGS"
])
dnl Wrapper around AC_CACHE_VAL used to ensure "ACTION-IF" commands are run
diff --git a/m4/threads.m4 b/m4/threads.m4
index d88b4fface7..468065ec9e8 100644
--- a/m4/threads.m4
+++ b/m4/threads.m4
@@ -176,6 +176,32 @@ dnl Check if compiler accepts specific flag to enable threads
])
fi dnl test "$ace_cv_feature_thread_flag_set" = no
+
+ if test "$ace_cv_feature_thread_flag_set" = no; then
+
+ CXXFLAGS="$CXXFLAGS -Kthread"
+ CFLAGS="$CXXFLAGS -Kthread"
+
+ ACE_CACHE_CHECK(if compiler can use -Kthread flag,
+ ace_cv_feature_has_kthread_flag,
+ [
+ ACE_CHECK_THREAD_FLAGS(
+ [
+ ace_cv_feature_has_kthread_flag=yes
+ ],
+ [
+ ace_cv_feature_has_kthread_flag=no
+ ])
+ ],
+ [
+ ace_cv_feature_thread_flag_set=yes
+ ],
+ [
+ CXXFLAGS="$save_CXXFLAGS"
+ CFLAGS="$save_CFLAGS"
+ ])
+
+ fi dnl test "$ace_cv_feature_thread_flag_set" = no
],
[
dnl Do nothing