]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Detect MIPSpro f77 compiler.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 29 Jan 2001 11:43:10 +0000 (11:43 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 29 Jan 2001 11:43:10 +0000 (11:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@3820 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/configure
deal.II/configure.in

index 019ea201d9c0b4fe5dc1e74af659adb83a03ac96..15a2f2a5c686ffc8c676cc45e61b0fcd94d0710e 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# From configure.in Revision: 1.47 
+# From configure.in Revision: 1.49 
 
 
 
@@ -1686,9 +1686,14 @@ if test "x$F77" != "x" ; then
   else
 
         if test -n "`echo $F77_VERSION_STRING | grep \"XL Fortran for AIX\"`" ; then
-                  F77_VERSION=AIXF77
+
+            F77_VERSION=AIXF77
       echo "$ac_t""compiler is AIX Fortran77" 1>&6
+      F77FLAGSG="$FFLAGS -g"
+      F77FLAGSO="$FFLAGS -O3 -w"
+      F77LDFLAGS="-lxlf90"  
 
+                  
     else
 
                   F77_VERSION_STRING=`($F77 -V 2>&1)`
@@ -1707,8 +1712,27 @@ if test "x$F77" != "x" ; then
 
       else
 
-               F77_VERSION=
-       echo "$ac_t""compiler is unkown. no flags set!" 1>&6
+                       F77_VERSION_STRING=`($F77 -version 2>&1)`
+       if test -n "`echo $F77_VERSION_STRING | grep MIPSpro`" ; then
+         echo "$ac_t""compiler is MIPSpro f77" 1>&6
+         F77_VERSION="MIPSproF77"
+         F77FLAGSG="$FFLAGS -ansi -g"
+         F77FLAGSO="$FFLAGS -O3 -woffall"
+         F77LDFLAGS="-lftn"
+
+                 if test $enableshared = yes ; then
+           F77FLAGSG="$F77FLAGSG -shared -KPIC"
+           F77FLAGSO="$F77FLAGSO -shared -KPIC"
+          else
+           F77FLAGSG="$F77FLAGSG -non_shared"
+           F77FLAGSO="$F77FLAGSO -non_shared"
+         fi
+
+        else
+
+                   F77_VERSION=
+         echo "$ac_t""compiler is unkown. no flags set!" 1>&6
+        fi
       fi
     fi
   fi
@@ -1722,7 +1746,7 @@ fi
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1726: checking for $ac_word" >&5
+echo "configure:1750: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1775,7 +1799,7 @@ if test "$enablemultithreading" = yes ; then
   if test "$GXX" = yes ; then
     
   echo $ac_n "checking for platform specific thread flags""... $ac_c" 1>&6
-echo "configure:1779: checking for platform specific thread flags" >&5
+echo "configure:1803: checking for platform specific thread flags" >&5
   
   for i in threads mt pthread pthreads mthreads Kthread kthread invalid_last_entry; do
     CXXFLAGS="$CXXFLAGSG -$i"
@@ -1811,7 +1835,7 @@ echo "configure:1779: checking for platform specific thread flags" >&5
 
     
   echo $ac_n "checking for platform specific multi-threading defines""... $ac_c" 1>&6
-echo "configure:1815: checking for platform specific multi-threading defines" >&5
+echo "configure:1839: checking for platform specific multi-threading defines" >&5
   ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -1820,7 +1844,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
 cross_compiling=$ac_cv_prog_cxx_cross
 
   cat > conftest.$ac_ext <<EOF
-#line 1824 "configure"
+#line 1848 "configure"
 #include "confdefs.h"
 
 #if !defined (_REENTRANT) && !defined (_THREAD_SAFE)
@@ -1834,7 +1858,7 @@ int main() {
    
 ; return 0; }
 EOF
-if { (eval echo configure:1838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
        echo "$ac_t"""not necessary"" 1>&6
@@ -1886,7 +1910,7 @@ fi
 
 if test "$withmultithreading" != no ; then
   echo $ac_n "checking for ACE""... $ac_c" 1>&6
-echo "configure:1890: checking for ACE" >&5
+echo "configure:1914: checking for ACE" >&5
   if test -d "$withmultithreading" ; then
     echo "$ac_t""found" 1>&6
   else
@@ -1906,7 +1930,7 @@ if test "${with_blas+set}" = set; then
   withval="$with_blas"
   if test "$withval" != no ; then
     echo $ac_n "checking for BLAS""... $ac_c" 1>&6
-echo "configure:1910: checking for BLAS" >&5
+echo "configure:1934: checking for BLAS" >&5
     if test -r "$withval" ; then
       echo "$ac_t""found" 1>&6
     else
@@ -1922,7 +1946,7 @@ EOF
   
 else
   echo $ac_n "checking for main in -lblas""... $ac_c" 1>&6
-echo "configure:1926: checking for main in -lblas" >&5
+echo "configure:1950: checking for main in -lblas" >&5
 ac_lib_var=`echo blas'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1930,14 +1954,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lblas  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1934 "configure"
+#line 1958 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1969,7 +1993,7 @@ if test "${with_lapack+set}" = set; then
   withval="$with_lapack"
   if test "$withval" != no ; then
     echo $ac_n "checking for LAPACK""... $ac_c" 1>&6
-echo "configure:1973: checking for LAPACK" >&5
+echo "configure:1997: checking for LAPACK" >&5
     if test -r "$withval" ; then
       echo "$ac_t""found" 1>&6
     else
@@ -1985,7 +2009,7 @@ EOF
   
 else
   echo $ac_n "checking for dgels_ in -llapack""... $ac_c" 1>&6
-echo "configure:1989: checking for dgels_ in -llapack" >&5
+echo "configure:2013: checking for dgels_ in -llapack" >&5
 ac_lib_var=`echo lapack'_'dgels_ | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1993,7 +2017,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-llapack  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1997 "configure"
+#line 2021 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2007,7 +2031,7 @@ int main() {
 dgels_()
 ; return 0; }
 EOF
-if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2074,7 +2098,7 @@ else
 fi
 
 echo $ac_n "checking for kdoc""... $ac_c" 1>&6
-echo "configure:2078: checking for kdoc" >&5
+echo "configure:2102: checking for kdoc" >&5
 if test "$kdocdir" != ${DEAL2_DIR}/contrib/kdoc/bin ; then
   if test -r $kdocdir/kdoc ; then
     echo "$ac_t""found" 1>&6
@@ -2110,7 +2134,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:2114: checking for $ac_word" >&5
+echo "configure:2138: 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
@@ -2144,7 +2168,7 @@ fi
 
 else
   echo $ac_n "checking for doc++""... $ac_c" 1>&6
-echo "configure:2148: checking for doc++" >&5
+echo "configure:2172: checking for doc++" >&5
   if test -x "$docxx" ; then
     echo "$ac_t""yes" 1>&6
   else
@@ -2159,7 +2183,7 @@ fi
 
 
   echo $ac_n "checking whether getrusage is properly declared""... $ac_c" 1>&6
-echo "configure:2163: checking whether getrusage is properly declared" >&5
+echo "configure:2187: 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'
@@ -2168,7 +2192,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
 cross_compiling=$ac_cv_prog_cxx_cross
 
   cat > conftest.$ac_ext <<EOF
-#line 2172 "configure"
+#line 2196 "configure"
 #include "confdefs.h"
 
 #include <sys/resource.h>
@@ -2180,7 +2204,7 @@ int main() {
     
 ; return 0; }
 EOF
-if { (eval echo configure:2184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
        echo "$ac_t"""yes"" 1>&6
@@ -2198,7 +2222,7 @@ fi
 rm -f conftest*
 
     echo $ac_n "checking whether isnan is declared with debug flags""... $ac_c" 1>&6
-echo "configure:2202: checking whether isnan is declared with debug flags" >&5
+echo "configure:2226: checking whether isnan is declared with debug flags" >&5
   ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -2209,7 +2233,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
   CXXFLAGS=$CXXFLAGSG
   deal_II_isnan_flag=""
   cat > conftest.$ac_ext <<EOF
-#line 2213 "configure"
+#line 2237 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -2221,7 +2245,7 @@ int main() {
     
 ; return 0; }
 EOF
-if { (eval echo configure:2225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
        echo "$ac_t"""yes"" 1>&6
@@ -2237,7 +2261,7 @@ rm -f conftest*
 
   if test "x$deal_II_isnan_flag" = "x" ; then
             cat > conftest.$ac_ext <<EOF
-#line 2241 "configure"
+#line 2265 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -2249,7 +2273,7 @@ int main() {
       
 ; return 0; }
 EOF
-if { (eval echo configure:2253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
          echo "$ac_t"""yes"" 1>&6
@@ -2269,7 +2293,7 @@ rm -f conftest*
     for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do 
       CXXFLAGS="$CXXFLAGSG $testflag"
       cat > conftest.$ac_ext <<EOF
-#line 2273 "configure"
+#line 2297 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -2281,7 +2305,7 @@ int main() {
        
 ; return 0; }
 EOF
-if { (eval echo configure:2285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
                          deal_II_isnan_flag="-DHAVE_ISNAN $testflag"
@@ -2294,7 +2318,7 @@ fi
 rm -f conftest*
 
                         cat > conftest.$ac_ext <<EOF
-#line 2298 "configure"
+#line 2322 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -2306,7 +2330,7 @@ int main() {
        
 ; return 0; }
 EOF
-if { (eval echo configure:2310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
                          deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag"
@@ -2328,7 +2352,7 @@ rm -f conftest*
   fi
 
     echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6
-echo "configure:2332: checking whether isnan is declared with optimized flags" >&5
+echo "configure:2356: checking whether isnan is declared with optimized flags" >&5
   ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -2339,7 +2363,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
   CXXFLAGS=$CXXFLAGSO
   deal_II_isnan_flag=""
   cat > conftest.$ac_ext <<EOF
-#line 2343 "configure"
+#line 2367 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -2351,7 +2375,7 @@ int main() {
     
 ; return 0; }
 EOF
-if { (eval echo configure:2355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
        echo "$ac_t"""yes"" 1>&6
@@ -2367,7 +2391,7 @@ rm -f conftest*
 
   if test "x$deal_II_isnan_flag" = "x" ; then
             cat > conftest.$ac_ext <<EOF
-#line 2371 "configure"
+#line 2395 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -2379,7 +2403,7 @@ int main() {
       
 ; return 0; }
 EOF
-if { (eval echo configure:2383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
          echo "$ac_t"""yes"" 1>&6
@@ -2399,7 +2423,7 @@ rm -f conftest*
     for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do 
       CXXFLAGS="$CXXFLAGSO $testflag"
       cat > conftest.$ac_ext <<EOF
-#line 2403 "configure"
+#line 2427 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -2411,7 +2435,7 @@ int main() {
        
 ; return 0; }
 EOF
-if { (eval echo configure:2415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
                          deal_II_isnan_flag="-DHAVE_ISNAN $testflag"
@@ -2424,7 +2448,7 @@ fi
 rm -f conftest*
 
                         cat > conftest.$ac_ext <<EOF
-#line 2428 "configure"
+#line 2452 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -2436,7 +2460,7 @@ int main() {
        
 ; return 0; }
 EOF
-if { (eval echo configure:2440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
                          deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag"
@@ -2471,16 +2495,16 @@ cross_compiling=$ac_cv_prog_cxx_cross
 
 CXXFLAGS="$CXXFLAGSG"
 echo $ac_n "checking for consistency of CXXFLAGSG flags""... $ac_c" 1>&6
-echo "configure:2475: checking for consistency of CXXFLAGSG flags" >&5
+echo "configure:2499: checking for consistency of CXXFLAGSG flags" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2477 "configure"
+#line 2501 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:2484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     echo "$ac_t""yes" 1>&6
@@ -2498,16 +2522,16 @@ rm -f conftest*
 
 CXXFLAGS="$CXXFLAGSO"
 echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6
-echo "configure:2502: checking for consistency of CXXFLAGSO flags" >&5
+echo "configure:2526: checking for consistency of CXXFLAGSO flags" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2504 "configure"
+#line 2528 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:2511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     echo "$ac_t""yes" 1>&6
index e8a13ffcbcdf23699705437dd8c9b6529207356c..c1bfe5ede288583162e0185d6679d7ae083c2612 100644 (file)
@@ -404,10 +404,17 @@ if test "x$F77" != "x" ; then
 
     dnl No GNU g77 version, something else. Try to find out what it is:
     if test -n "`echo $F77_VERSION_STRING | grep \"XL Fortran for AIX\"`" ; then
-      dnl This is the "XL Fortran for AIX" compiler, but we have no set
-      dnl of reasonable compiler flags for it, so sorry!
+
+      dnl This is the "XL Fortran for AIX" compiler
       F77_VERSION=AIXF77
       AC_MSG_RESULT(compiler is AIX Fortran77)
+      F77FLAGSG="$FFLAGS -g"
+      F77FLAGSO="$FFLAGS -O3 -w"
+      F77LDFLAGS="-lxlf90"  
+
+      dnl Note: presently, we don't support shared libs on AIX, so we don't need
+      dnl to set -PIC or the like for this compiler (nonetheless, I couldn't find
+      dnl the right name of that flag anyway)
 
     else
 
@@ -431,9 +438,31 @@ if test "x$F77" != "x" ; then
 
       else
 
-       dnl Now, this is a hard case, we have no more clues...
-        F77_VERSION=
-       AC_MSG_RESULT(compiler is unkown. no flags set!)
+       dnl If we can detect IRIX's f77 somehow, then the following flags might
+       dnl be appropriate:
+        F77_VERSION_STRING=`($F77 -version 2>&1)`
+       if test -n "`echo $F77_VERSION_STRING | grep MIPSpro`" ; then
+         AC_MSG_RESULT(compiler is MIPSpro f77)
+         F77_VERSION="MIPSproF77"
+         F77FLAGSG="$FFLAGS -ansi -g"
+         F77FLAGSO="$FFLAGS -O3 -woffall"
+         F77LDFLAGS="-lftn"
+
+         dnl If necessary, add shared lib flags
+         if test $enableshared = yes ; then
+           F77FLAGSG="$F77FLAGSG -shared -KPIC"
+           F77FLAGSO="$F77FLAGSO -shared -KPIC"
+          else
+           F77FLAGSG="$F77FLAGSG -non_shared"
+           F77FLAGSO="$F77FLAGSO -non_shared"
+         fi
+
+        else
+
+         dnl Now, this is a hard case, we have no more clues...
+          F77_VERSION=
+         AC_MSG_RESULT(compiler is unkown. no flags set!)
+        fi
       fi
     fi
   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.