summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>1999-03-26 23:15:48 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>1999-03-26 23:15:48 +0000
commitc41fd18724a777eba5a6889440f0e649df568f7e (patch)
tree49ffa2bb64ccc6b8139c4ab1662f406a2860571e /m4
parent713ffb902d58e4eb48b523a8f8840821298dd289 (diff)
downloadATCD-c41fd18724a777eba5a6889440f0e649df568f7e.tar.gz
* m4/acinclude.m4:
Added support for converting warnings to errors for Sun C++. * m4/threads.m4: Added test to check if `-Kthread' compiler flag enables thread support. SCO UnixWare 7 uses this flag.
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