From: Wolfgang Bangerth Date: Mon, 29 Jan 2001 11:43:10 +0000 (+0000) Subject: Detect MIPSpro f77 compiler. X-Git-Tag: v8.0.0~19767 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=387b902df2174fedaeed025b5270819700869344;p=dealii.git Detect MIPSpro f77 compiler. git-svn-id: https://svn.dealii.org/trunk@3820 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/configure b/deal.II/configure index 019ea201d9..15a2f2a5c6 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -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 <&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 <&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 <&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 < @@ -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 < @@ -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 < @@ -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 < @@ -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 < @@ -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 < @@ -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 < @@ -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 < @@ -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 < @@ -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 <&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 <&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 diff --git a/deal.II/configure.in b/deal.II/configure.in index e8a13ffcbc..c1bfe5ede2 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -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