From d4e18c056c85e33eeab9caba20e80b6018ba6714 Mon Sep 17 00:00:00 2001
From: Wolfgang Bangerth <bangerth@math.tamu.edu>
Date: Wed, 14 Jun 2000 12:06:31 +0000
Subject: [PATCH] Remove -ansi when in MT mode.

git-svn-id: https://svn.dealii.org/trunk@3014 0785d39b-7218-0410-832d-ea1e28bc413d
---
 deal.II/configure                | 28 +++++++++++++++-------------
 deal.II/configure.in             |  4 ++++
 deal.II/doc/news/2000/c-3-0.html |  4 +++-
 3 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/deal.II/configure b/deal.II/configure
index 5a6e883471..2a7861f050 100755
--- a/deal.II/configure
+++ b/deal.II/configure
@@ -1275,6 +1275,8 @@ rm -f conftest*
 
   CXXFLAGSG="$CXXFLAGSG -D__USE_MALLOC"
   CXXFLAGSO="$CXXFLAGSO -D__USE_MALLOC"
+
+  CXXFLAGSG="`echo $CXXFLAGS | perl -pi -e 's/-ansi//g;'"
 fi
 
 
@@ -1289,7 +1291,7 @@ fi
 
 if test $withmultithreading != no ; then
   echo $ac_n "checking for ACE""... $ac_c" 1>&6
-echo "configure:1293: checking for ACE" >&5
+echo "configure:1295: checking for ACE" >&5
   if test -d $withmultithreading ; then
     echo "$ac_t""found" 1>&6
   else
@@ -1375,7 +1377,7 @@ else
 fi
 
 echo $ac_n "checking for kdoc""... $ac_c" 1>&6
-echo "configure:1379: checking for kdoc" >&5
+echo "configure:1381: checking for kdoc" >&5
 if test -r $kdocdir/kdoc ; then
   echo "$ac_t""found" 1>&6
 else
@@ -1404,7 +1406,7 @@ if test "$docxx" = to-be-determined ; then
   # Extract the first word of ""doc++"", so it can be a program name with args.
 set dummy "doc++"; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1408: checking for $ac_word" >&5
+echo "configure:1410: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_docxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1438,7 +1440,7 @@ fi
 
 else
   echo $ac_n "checking for doc++""... $ac_c" 1>&6
-echo "configure:1442: checking for doc++" >&5
+echo "configure:1444: checking for doc++" >&5
   if test -x "$docxx" ; then
     echo "$ac_t""yes" 1>&6
   else
@@ -1453,7 +1455,7 @@ fi
 
 
   echo $ac_n "checking whether getrusage is properly declared""... $ac_c" 1>&6
-echo "configure:1457: checking whether getrusage is properly declared" >&5
+echo "configure:1459: checking whether getrusage is properly declared" >&5
   ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -1463,7 +1465,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
 
 
   cat > conftest.$ac_ext <<EOF
-#line 1467 "configure"
+#line 1469 "configure"
 #include "confdefs.h"
 
 #include <sys/resource.h>
@@ -1475,7 +1477,7 @@ int main() {
     
 ; return 0; }
 EOF
-if { (eval echo configure:1479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 	echo "$ac_t"""yes"" 1>&6
@@ -1507,17 +1509,17 @@ esac
 
 
 echo $ac_n "checking for consistency of CXXFLAGSG flags""... $ac_c" 1>&6
-echo "configure:1511: checking for consistency of CXXFLAGSG flags" >&5
+echo "configure:1513: checking for consistency of CXXFLAGSG flags" >&5
 CXXFLAGS="$CXXFLAGSG"
 cat > conftest.$ac_ext <<EOF
-#line 1514 "configure"
+#line 1516 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:1521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     echo "$ac_t""yes" 1>&6
@@ -1534,17 +1536,17 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6
-echo "configure:1538: checking for consistency of CXXFLAGSO flags" >&5
+echo "configure:1540: checking for consistency of CXXFLAGSO flags" >&5
 CXXFLAGS="$CXXFLAGSO"
 cat > conftest.$ac_ext <<EOF
-#line 1541 "configure"
+#line 1543 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:1548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     echo "$ac_t""yes" 1>&6
diff --git a/deal.II/configure.in b/deal.II/configure.in
index affa2380c6..147d09fa81 100644
--- a/deal.II/configure.in
+++ b/deal.II/configure.in
@@ -152,12 +152,16 @@ dnl Adjust compiler parameters if multithreading is desired:
 dnl - Use the right -threads/-pthread/-mthread option
 dnl - Set preprocessor directives if necessary
 dnl - __USE_MALLOC tells gcc to use thread safe STL allocators
+dnl - remove -ansi from compiler flags again, since ACE yields hundreds of
+dnl   error messages with this flag
 if test $enablemultithreading = yes ; then
   DEAL_II_GET_THREAD_FLAGS
   DEAL_II_THREAD_CPPFLAGS
 
   CXXFLAGSG="$CXXFLAGSG -D__USE_MALLOC"
   CXXFLAGSO="$CXXFLAGSO -D__USE_MALLOC"
+
+  CXXFLAGSG="`echo $CXXFLAGS | perl -pi -e 's/-ansi//g;'"
 fi
 
 
diff --git a/deal.II/doc/news/2000/c-3-0.html b/deal.II/doc/news/2000/c-3-0.html
index c74ac44232..9e3de626a1 100644
--- a/deal.II/doc/news/2000/c-3-0.html
+++ b/deal.II/doc/news/2000/c-3-0.html
@@ -17,7 +17,9 @@
        New: the <code class="program">configure</code> script now
        enforces the compiler flags <code>-ansi -pedantic</code> when
        compiling in debug mode. This should force us to write more
-       standard compliant code.
+       standard compliant code. (Since the ACE library is not
+       standards conforming, the <code>-ansi</code> flag is not used
+       when multithreadinf is required.)
        <br>
        (WB 2000/06/14)
        </p>
-- 
2.39.5