summaryrefslogtreecommitdiff
path: root/m4/threads.m4
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>1999-12-06 17:15:04 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>1999-12-06 17:15:04 +0000
commit2c49691ced1c1f3cf862429b8290271d04145fda (patch)
treefd47494d1d5d9e0562d4247638d08ff80aa1cf3b /m4/threads.m4
parent9c12998ac7832bdf69f9ad4e7439c0549f463666 (diff)
downloadATCD-2c49691ced1c1f3cf862429b8290271d04145fda.tar.gz
ChangeLogTag:Mon Dec 6 11:06:43 1999 Ossama Othman <othman@cs.wustl.edu>
Diffstat (limited to 'm4/threads.m4')
-rw-r--r--m4/threads.m421
1 files changed, 11 insertions, 10 deletions
diff --git a/m4/threads.m4 b/m4/threads.m4
index 8a8d778b9bb..373c50b978b 100644
--- a/m4/threads.m4
+++ b/m4/threads.m4
@@ -257,12 +257,12 @@ AC_DEFUN(ACE_SEARCH_THREAD_FLAGS, dnl
ACE_CACHE_CHECK(for compiler thread flag,
ace_cv_thread_flag_search,
[
- ace_save_CXXFLAGS="$CXXFLAGS"
- ace_save_CFLAGS="$CFLAGS"
+ ifelse(AC_LANG, [CPLUSPLUS],
+ [ace_save_CXXFLAGS="$CXXFLAGS"],[ace_save_CFLAGS="$CFLAGS"])
for i in $1; do
- CXXFLAGS="$CXXFLAGS -$i"
- CFLAGS="$CFLAGS -$i"
+ ifelse(AC_LANG, [CPLUSPLUS],
+ [CXXFLAGS="$CXXFLAGS -$i"],[CFLAGS="$CFLAGS -$i"])
ACE_CHECK_THREAD_FLAGS(
[
@@ -276,20 +276,21 @@ AC_DEFUN(ACE_SEARCH_THREAD_FLAGS, dnl
])
dnl Reset the flags for the next flag check.
- CXXFLAGS="$ace_save_CXXFLAGS"
- CFLAGS="$ace_save_CFLAGS"
+ ifelse(AC_LANG, [CPLUSPLUS],
+ [CXXFLAGS="$ace_save_CXXFLAGS"],[CFLAGS="$ace_save_CFLAGS"])
done
dnl Reset the flags to a consistent state.
dnl This prevents duplicate flags from being added to
dnl the C/CXXFLAGS variable.
- CXXFLAGS="$ace_save_CXXFLAGS"
- CFLAGS="$ace_save_CFLAGS"
+ ifelse(AC_LANG, [CPLUSPLUS],
+ [CXXFLAGS="$ace_save_CXXFLAGS"],[CFLAGS="$ace_save_CFLAGS"])
],
[
dnl Add the found/cached thread flag to the C/CXXFLAGS variables
- CXXFLAGS="$CXXFLAGS $ace_cv_thread_flag_search"
- CFLAGS="$CFLAGS $ace_cv_thread_flag_search"
+ ifelse(AC_LANG, [CPLUSPLUS],
+ [CXXFLAGS="$CXXFLAGS $ace_cv_thread_flag_search"],
+ [CFLAGS="$CFLAGS $ace_cv_thread_flag_search"])
$2
],