]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Detect whether -library=... works.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 22 Jan 2007 05:54:12 +0000 (05:54 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 22 Jan 2007 05:54:12 +0000 (05:54 +0000)
git-svn-id: https://svn.dealii.org/trunk@14360 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure

index e8fd24508b164831def8736062cac43b12e174b3..e1cf03edb0f546921bb1219e0f1f0f613cd0d2fa 100644 (file)
@@ -9,7 +9,7 @@ dnl    In doc/Makefile some information on the kind of documentation
 dnl    is stored.
 dnl
 dnl
-dnl Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+dnl Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
 dnl
 dnl $Id$
 
@@ -689,14 +689,31 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl
           ;;
   
       sun_workshop | sun_forte)
+
           CXXFLAGSG="$CXXFLAGS -DDEBUG -w"
           CXXFLAGSO="$CXXFLAGS -w"
           CXXFLAGSPIC="-KPIC"
           LDFLAGSPIC="-G"
-          AC_MSG_ERROR([deal.II is known not to work with SUN Compilers!
-       If you intend to port it, please remove this message
-       from aclocal.m4 and call autoconf and configure.])
-          ;;
+
+         dnl See if the flag -library=stlport4 is available, and if so use it
+         CXXFLAGS="$CXXFLAGSG -library=stlport4"
+         AC_MSG_CHECKING(whether -library=stlport4 works)
+         AC_TRY_COMPILE(
+            [
+#             include <iostream>
+           ],
+            [ 
+             std::cout << std::endl;
+            ],
+            [
+              AC_MSG_RESULT(no)
+            ],
+            [
+              AC_MSG_RESULT(yes)
+              CXXFLAGSG="$CXXFLAGSG -library=stlport4"
+              CXXFLAGSO="$CXXFLAGSO -library=stlport4"
+            ])
+         ;;
   
       portland_group)
          dnl Suppress warnings:
index 27420506b52c53f14684c2368508d93f55cb6119..3deebc86f9f25fc5e567eff881934c2a5a922960 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 14184 .
+# From configure.in Revision: 14318 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59 for deal.II 5.3.pre.
 #
@@ -3135,8 +3135,9 @@ echo "${ECHO_T}C++ compiler is Compaq-cxx" >&6
             GXX_VERSION_DETAILED=$GXX_VERSION
           else
 
-                       is_sun_cc="`($CXX -V 2>&1) | grep 'Sun WorkShop'`"
-            if test "x$is_sun_cc" != "x" ; then
+                       is_sun_cc_1="`($CXX -V 2>&1) | grep 'Sun WorkShop'`"
+            is_sun_cc_2="`($CXX -V 2>&1) | grep 'Sun C++'`"
+            if test "x$is_sun_cc_1$is_sun_cc_2" != "x" ; then
               echo "$as_me:$LINENO: result: C++ compiler is Sun Workshop compiler" >&5
 echo "${ECHO_T}C++ compiler is Sun Workshop compiler" >&6
               GXX_VERSION=sun_workshop
@@ -3559,20 +3560,73 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
           ;;
 
       sun_workshop | sun_forte)
+
           CXXFLAGSG="$CXXFLAGS -DDEBUG -w"
           CXXFLAGSO="$CXXFLAGS -w"
           CXXFLAGSPIC="-KPIC"
           LDFLAGSPIC="-G"
-          { { echo "$as_me:$LINENO: error: Attention! deal.II is not known to work with SUN Compilers!
-       If you intend to port it" >&5
-echo "$as_me: error: Attention! deal.II is not known to work with SUN Compilers!
-       If you intend to port it" >&2;}
-   { (exit please remove this message
-       from aclocal.m4 and call autoconf and configure. If you do not understand
-       this); exit please remove this message
-       from aclocal.m4 and call autoconf and configure. If you do not understand
-       this; }; }
-          ;;
+
+                 CXXFLAGS="$CXXFLAGSG -library=stlport4"
+         echo "$as_me:$LINENO: checking whether -library=stlport4 works" >&5
+echo $ECHO_N "checking whether -library=stlport4 works... $ECHO_C" >&6
+         cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#             include <iostream>
+
+int
+main ()
+{
+
+             std::cout << std::endl;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+              echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+              echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+              CXXFLAGSG="$CXXFLAGSG -library=stlport4"
+              CXXFLAGSO="$CXXFLAGSO -library=stlport4"
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+         ;;
 
       portland_group)
                                                                                                                          CXXFLAGSG="$CXXFLAGS -DDEBUG -g --display_error_number --diag_suppress 111 --diag_suppress 177 --diag_suppress 175 --diag_suppress 284"
@@ -14007,7 +14061,7 @@ if test "x$darwin_shared_lib" = "xyes" ; then
     echo "     WARNING: The installed compiler version seems to be "
     echo "     WARNING: the Apple gcc3.3, build 1666, which does not"
     echo "     WARNING: work properly for building dynamics libs"
-    echo "     WARNING: Please install Apples november 2004 patch"
+    echo "     WARNING: Please install Apples November 2004 patch"
     echo "     WARNING: for the gcc, which can be found on:"
     echo "     WARNING: http://www.apple.com/developer"
   fi

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.