diff --git a/aclocal.m4 b/aclocal.m4 index d5a376e16..27e36c681 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,5 +1,6 @@ sinclude(/home/casc/software/autoconfig/macros/casc_libs_and_headers.m4) -sinclude(casc_mpi.m4) +sinclude(/home/casc/software/autoconfig/macros/casc_specific_libs.m4) +sinclude(/home/casc/software/autoconfig/macros/casc_mpi.m4) sinclude(/home/casc/software/autoconfig/macros/casc_fortran.m4) sinclude(/home/casc/software/autoconfig/macros/casc_opt_debug.m4) sinclude(/home/casc/software/autoconfig/macros/casc_misc.m4) diff --git a/configure b/configure index d4e97fb77..4d3e7e514 100755 --- a/configure +++ b/configure @@ -52,6 +52,8 @@ ac_help="$ac_help --with-dmalloc use dmalloc package" ac_help="$ac_help --with-pthreads use pthreads" +ac_help="$ac_help + --with-petsc use petsc" ac_help="$ac_help --with-mpi-include=DIR mpi.h is in DIR" ac_help="$ac_help @@ -65,6 +67,23 @@ ac_help="$ac_help ac_help="$ac_help --with-mpi-flags=FLAGS FLAGS is space-separated list of whatever flags other than -l and -L are needed to link with mpi libraries" +ac_help="$ac_help + --with--dir=DIR is installed in directory DIR + --without--dir do not look for " +ac_help="$ac_help + --with-PETSC-dir=DIR PETSC is installed in directory DIR + --without-PETSC-dir do not look for PETSC" +ac_help="$ac_help + --with-petsc-include=DIRS DIRS is space-separates list of include directories" +ac_help="$ac_help + --with-petsc-libs=LIBS LIBS is space-separated list of library names + needed for PETSc, e.g. \"petscvec petscmat"\" +ac_help="$ac_help + --with-petsc-lib-dirs=DIRS + DIRS is space-separated list of directories + containing the libraries specified by + \`--with-petsc-libs', e.g. + \"/usr/lib /usr/local/petsc/lib\"" ac_help="$ac_help --enable-opt Sets up compiler flags for optimization" ac_help="$ac_help @@ -577,7 +596,7 @@ fi echo $ac_n "checking the hostname""... $ac_c" 1>&6 -echo "configure:581: checking the hostname" >&5 +echo "configure:600: checking the hostname" >&5 casc_hostname=hostname HOSTNAME="`$casc_hostname`" @@ -591,7 +610,7 @@ echo "configure:581: checking the hostname" >&5 echo $ac_n "checking the architecture""... $ac_c" 1>&6 -echo "configure:595: checking the architecture" >&5 +echo "configure:614: checking the architecture" >&5 if test -z "$ARCH"; then @@ -639,6 +658,7 @@ unset F77 casc_user_chose_compilers=no casc_user_chose_mpi=no casc_using_pthreads=no +casc_using_petsc=no # Check whether --with-CC or --without-CC was given. if test "${with_CC+set}" = set; then @@ -756,12 +776,12 @@ if test "${with_cegdb+set}" = set; then ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 -echo "configure:760: checking for $casc_header" >&5 +echo "configure:780: checking for $casc_header" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:765: checking how to run the C preprocessor" >&5 +echo "configure:785: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -776,13 +796,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -793,13 +813,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -810,13 +830,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -842,12 +862,12 @@ echo "$ac_t""$CPP" 1>&6 s%@CPP@%$CPP%g cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -875,7 +895,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then # check for the library from first argument. If linking is successful # the first time, the job is done, otherwise loop through DIRECTORY-LIST echo $ac_n "checking for cegdb in -lcegdb""... $ac_c" 1>&6 -echo "configure:879: checking for cegdb in -lcegdb" >&5 +echo "configure:899: checking for cegdb in -lcegdb" >&5 ac_lib_var=`echo cegdb'_'cegdb | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -883,7 +903,7 @@ else ac_save_LIBS="$LIBS" LIBS="$LDLIBDIRS $LDLIBS $LIBS -lcegdb" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:918: \"$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 @@ -919,7 +939,7 @@ unset ac_cv_lib_$ac_lib_var for casc_lib_dir in /home/casc/lib; do echo $ac_n "checking for cegdb in -lcegdb""... $ac_c" 1>&6 -echo "configure:923: checking for cegdb in -lcegdb" >&5 +echo "configure:943: checking for cegdb in -lcegdb" >&5 ac_lib_var=`echo cegdb'_'cegdb | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -927,7 +947,7 @@ else ac_save_LIBS="$LIBS" LIBS="-L$casc_lib_dir $LDLIBDIRS $LDLIBS -lcegdb $LIBS -lcegdb" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:962: \"$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 @@ -1013,17 +1033,17 @@ if test "${with_gdb+set}" = set; then ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 -echo "configure:1017: checking for $casc_header" >&5 +echo "configure:1037: checking for $casc_header" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1051,7 +1071,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then # check for the library from first argument. If linking is successful # the first time, the job is done, otherwise loop through DIRECTORY-LIST echo $ac_n "checking for gdb in -lgdb""... $ac_c" 1>&6 -echo "configure:1055: checking for gdb in -lgdb" >&5 +echo "configure:1075: checking for gdb in -lgdb" >&5 ac_lib_var=`echo gdb'_'gdb | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1059,7 +1079,7 @@ else ac_save_LIBS="$LIBS" LIBS="$LDLIBDIRS $LDLIBS $LIBS -lgdb" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1094: \"$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 @@ -1095,7 +1115,7 @@ unset ac_cv_lib_$ac_lib_var for casc_lib_dir in /usr/local/lib /usr/lib; do echo $ac_n "checking for gdb in -lgdb""... $ac_c" 1>&6 -echo "configure:1099: checking for gdb in -lgdb" >&5 +echo "configure:1119: checking for gdb in -lgdb" >&5 ac_lib_var=`echo gdb'_'gdb | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1103,7 +1123,7 @@ else ac_save_LIBS="$LIBS" LIBS="-L$casc_lib_dir $LDLIBDIRS $LDLIBS -lgdb $LIBS -lgdb" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1138: \"$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 @@ -1201,7 +1221,7 @@ if test "${with_dmalloc+set}" = set; then # check for the library from first argument. If linking is successful # the first time, the job is done, otherwise loop through DIRECTORY-LIST echo $ac_n "checking for malloc in -ldmalloc""... $ac_c" 1>&6 -echo "configure:1205: checking for malloc in -ldmalloc" >&5 +echo "configure:1225: checking for malloc in -ldmalloc" >&5 ac_lib_var=`echo dmalloc'_'malloc | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1209,7 +1229,7 @@ else ac_save_LIBS="$LIBS" LIBS="$LDLIBDIRS $LDLIBS $LIBS -ldmalloc" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1244: \"$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 @@ -1246,7 +1266,7 @@ unset ac_cv_lib_$ac_lib_var for casc_lib_dir in /home/casc/lib /usr/local/lib; do echo $ac_n "checking for malloc in -ldmalloc""... $ac_c" 1>&6 -echo "configure:1250: checking for malloc in -ldmalloc" >&5 +echo "configure:1270: checking for malloc in -ldmalloc" >&5 ac_lib_var=`echo dmalloc'_'malloc | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1254,7 +1274,7 @@ else ac_save_LIBS="$LIBS" LIBS="-L$casc_lib_dir $LDLIBDIRS $LDLIBS -ldmalloc $LIBS -ldmalloc" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1289: \"$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 @@ -1318,7 +1338,7 @@ if test "${with_pthreads+set}" = set; then then casc_using_pthreads=yes echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:1322: checking for pthread_create in -lpthread" >&5 +echo "configure:1342: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1326,7 +1346,7 @@ else ac_save_LIBS="$LIBS" LIBS=" $LIBS -lpthread" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1361: \"$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 @@ -1365,7 +1385,7 @@ else echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:1369: checking for pthread_create in -lpthreads" >&5 +echo "configure:1389: checking for pthread_create in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1373,7 +1393,7 @@ else ac_save_LIBS="$LIBS" LIBS=" $LIBS -lpthreads" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1408: \"$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 @@ -1427,10 +1447,21 @@ fi +# Check whether --with-petsc or --without-petsc was given. +if test "${with_petsc+set}" = set; then + withval="$with_petsc" + if test "$withval" != "no" + then + casc_using_patsc=yes + fi + +fi + + # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1434: checking for $ac_word" >&5 +echo "configure:1465: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1472,7 +1503,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1476: checking for $ac_word" >&5 +echo "configure:1507: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1506,7 +1537,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1510: checking for $ac_word" >&5 +echo "configure:1541: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1540,7 +1571,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1544: checking for $ac_word" >&5 +echo "configure:1575: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1585,17 +1616,17 @@ done ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 -echo "configure:1589: checking for $casc_header" >&5 +echo "configure:1620: checking for $casc_header" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1637,7 +1668,7 @@ fi # check for the library from first argument. If linking is successful # the first time, the job is done, otherwise loop through DIRECTORY-LIST echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:1641: checking for main in -lmpi" >&5 +echo "configure:1672: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'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 @@ -1645,14 +1676,14 @@ else ac_save_LIBS="$LIBS" LIBS="$MPILIBDIRS $MPILIBS $LIBS -lmpi" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1687: \"$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 @@ -1677,7 +1708,7 @@ unset ac_cv_lib_$ac_lib_var for casc_lib_dir in /opt/intel/tflop/TF98_2.4.1/tflops/cougar/lib/puma; do echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:1681: checking for main in -lmpi" >&5 +echo "configure:1712: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'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 @@ -1685,14 +1716,14 @@ else ac_save_LIBS="$LIBS" LIBS="-L$casc_lib_dir $MPILIBDIRS $MPILIBS -lmpi $LIBS -lmpi" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1727: \"$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 @@ -1787,7 +1818,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1791: checking for $ac_word" >&5 +echo "configure:1822: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1821,7 +1852,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1825: checking for $ac_word" >&5 +echo "configure:1856: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1855,7 +1886,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1859: checking for $ac_word" >&5 +echo "configure:1890: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1898,7 +1929,7 @@ done # check for the library from first argument. If linking is successful # the first time, the job is done, otherwise loop through DIRECTORY-LIST echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:1902: checking for main in -lmpi" >&5 +echo "configure:1933: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'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 @@ -1906,14 +1937,14 @@ else ac_save_LIBS="$LIBS" LIBS="$MPILIBDIRS $MPILIBS $LIBS -lmpi" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1948: \"$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 @@ -1938,7 +1969,7 @@ unset ac_cv_lib_$ac_lib_var for casc_lib_dir in /usr/lib; do echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:1942: checking for main in -lmpi" >&5 +echo "configure:1973: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'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 @@ -1946,14 +1977,14 @@ else ac_save_LIBS="$LIBS" LIBS="-L$casc_lib_dir $MPILIBDIRS $MPILIBS -lmpi $LIBS -lmpi" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1988: \"$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 @@ -2057,7 +2088,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2061: checking for $ac_word" >&5 +echo "configure:2092: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2091,7 +2122,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2095: checking for $ac_word" >&5 +echo "configure:2126: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2125,7 +2156,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2129: checking for $ac_word" >&5 +echo "configure:2160: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2160,7 +2191,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2164: checking for $ac_word" >&5 +echo "configure:2195: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2194,7 +2225,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2198: checking for $ac_word" >&5 +echo "configure:2229: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2228,7 +2259,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2232: checking for $ac_word" >&5 +echo "configure:2263: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2310,7 +2341,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2314: checking for $ac_word" >&5 +echo "configure:2345: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2344,7 +2375,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2348: checking for $ac_word" >&5 +echo "configure:2379: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2378,7 +2409,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2382: checking for $ac_word" >&5 +echo "configure:2413: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2413,7 +2444,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2417: checking for $ac_word" >&5 +echo "configure:2448: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2447,7 +2478,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2451: checking for $ac_word" >&5 +echo "configure:2482: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2481,7 +2512,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2485: checking for $ac_word" >&5 +echo "configure:2516: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2528,17 +2559,17 @@ done ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 -echo "configure:2532: checking for $casc_header" >&5 +echo "configure:2563: checking for $casc_header" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2580,7 +2611,7 @@ fi # check for the library from first argument. If linking is successful # the first time, the job is done, otherwise loop through DIRECTORY-LIST echo $ac_n "checking for main in -lrt""... $ac_c" 1>&6 -echo "configure:2584: checking for main in -lrt" >&5 +echo "configure:2615: checking for main in -lrt" >&5 ac_lib_var=`echo rt'_'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 @@ -2588,14 +2619,14 @@ else ac_save_LIBS="$LIBS" LIBS="$LIBDIRS $LIBS $LIBS -lrt" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2630: \"$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 @@ -2620,7 +2651,7 @@ unset ac_cv_lib_$ac_lib_var for casc_lib_dir in /usr/lib; do echo $ac_n "checking for main in -lrt""... $ac_c" 1>&6 -echo "configure:2624: checking for main in -lrt" >&5 +echo "configure:2655: checking for main in -lrt" >&5 ac_lib_var=`echo rt'_'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 @@ -2628,14 +2659,14 @@ else ac_save_LIBS="$LIBS" LIBS="-L$casc_lib_dir $LIBDIRS $LIBS -lrt $LIBS -lrt" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2670: \"$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 @@ -2683,7 +2714,7 @@ unset ac_cv_lib_$ac_lib_var for casc_lib_dir in /usr/opt/MPI170/lib; do echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:2687: checking for main in -lmpi" >&5 +echo "configure:2718: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'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 @@ -2691,14 +2722,14 @@ else ac_save_LIBS="$LIBS" LIBS="-L$casc_lib_dir $MPILIBDIRS $MPILIBS -lmpi $LIBS -lmpi" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2733: \"$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 @@ -2736,7 +2767,7 @@ unset ac_cv_lib_$ac_lib_var # check for the library from first argument. If linking is successful # the first time, the job is done, otherwise loop through DIRECTORY-LIST echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:2740: checking for main in -lmpi" >&5 +echo "configure:2771: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'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 @@ -2744,14 +2775,14 @@ else ac_save_LIBS="$LIBS" LIBS="$MPILIBDIRS $MPILIBS $LIBS -lmpi" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2786: \"$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 @@ -2776,7 +2807,7 @@ unset ac_cv_lib_$ac_lib_var for casc_lib_dir in /usr/lib; do echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:2780: checking for main in -lmpi" >&5 +echo "configure:2811: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'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 @@ -2784,14 +2815,14 @@ else ac_save_LIBS="$LIBS" LIBS="-L$casc_lib_dir $MPILIBDIRS $MPILIBS -lmpi $LIBS -lmpi" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2826: \"$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 @@ -2931,7 +2962,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2935: checking for $ac_word" >&5 +echo "configure:2966: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2965,7 +2996,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2969: checking for $ac_word" >&5 +echo "configure:3000: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2999,7 +3030,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3003: checking for $ac_word" >&5 +echo "configure:3034: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3034,7 +3065,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3038: checking for $ac_word" >&5 +echo "configure:3069: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3068,7 +3099,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3072: checking for $ac_word" >&5 +echo "configure:3103: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3102,7 +3133,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3106: checking for $ac_word" >&5 +echo "configure:3137: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3140,7 +3171,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3144: checking for $ac_word" >&5 +echo "configure:3175: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3174,7 +3205,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3178: checking for $ac_word" >&5 +echo "configure:3209: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3208,7 +3239,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3212: checking for $ac_word" >&5 +echo "configure:3243: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3243,7 +3274,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3247: checking for $ac_word" >&5 +echo "configure:3278: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3277,7 +3308,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3281: checking for $ac_word" >&5 +echo "configure:3312: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3311,7 +3342,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3315: checking for $ac_word" >&5 +echo "configure:3346: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3394,7 +3425,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3398: checking for $ac_word" >&5 +echo "configure:3429: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3428,7 +3459,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3432: checking for $ac_word" >&5 +echo "configure:3463: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3462,7 +3493,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3466: checking for $ac_word" >&5 +echo "configure:3497: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3497,7 +3528,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3501: checking for $ac_word" >&5 +echo "configure:3532: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3531,7 +3562,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3535: checking for $ac_word" >&5 +echo "configure:3566: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3565,7 +3596,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3569: checking for $ac_word" >&5 +echo "configure:3600: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3601,7 +3632,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3605: checking for $ac_word" >&5 +echo "configure:3636: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3638,7 +3669,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3642: checking for $ac_word" >&5 +echo "configure:3673: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3675,7 +3706,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3679: checking for $ac_word" >&5 +echo "configure:3710: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3723,17 +3754,17 @@ done ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 -echo "configure:3727: checking for $casc_header" >&5 +echo "configure:3758: checking for $casc_header" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3775,7 +3806,7 @@ fi # check for the library from first argument. If linking is successful # the first time, the job is done, otherwise loop through DIRECTORY-LIST echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:3779: checking for main in -lmpi" >&5 +echo "configure:3810: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'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 @@ -3783,14 +3814,14 @@ else ac_save_LIBS="$LIBS" LIBS="$MPILIBDIRS $MPILIBS $LIBS -lmpi" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3825: \"$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 @@ -3815,7 +3846,7 @@ unset ac_cv_lib_$ac_lib_var for casc_lib_dir in /usr/local/mpi/lib; do echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:3819: checking for main in -lmpi" >&5 +echo "configure:3850: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'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 @@ -3823,14 +3854,14 @@ else ac_save_LIBS="$LIBS" LIBS="-L$casc_lib_dir $MPILIBDIRS $MPILIBS -lmpi $LIBS -lmpi" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3865: \"$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 @@ -3929,7 +3960,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3933: checking for $ac_word" >&5 +echo "configure:3964: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3963,7 +3994,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3967: checking for $ac_word" >&5 +echo "configure:3998: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3997,7 +4028,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4001: checking for $ac_word" >&5 +echo "configure:4032: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4032,7 +4063,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4036: checking for $ac_word" >&5 +echo "configure:4067: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4066,7 +4097,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4070: checking for $ac_word" >&5 +echo "configure:4101: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4100,7 +4131,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4104: checking for $ac_word" >&5 +echo "configure:4135: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4136,7 +4167,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4140: checking for $ac_word" >&5 +echo "configure:4171: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4173,7 +4204,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4177: checking for $ac_word" >&5 +echo "configure:4208: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4210,7 +4241,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4214: checking for $ac_word" >&5 +echo "configure:4245: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4259,17 +4290,17 @@ done ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 -echo "configure:4263: checking for $casc_header" >&5 +echo "configure:4294: checking for $casc_header" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4311,7 +4342,7 @@ fi # check for the library from first argument. If linking is successful # the first time, the job is done, otherwise loop through DIRECTORY-LIST echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:4315: checking for main in -lmpi" >&5 +echo "configure:4346: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'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 @@ -4319,14 +4350,14 @@ else ac_save_LIBS="$LIBS" LIBS="$MPILIBDIRS $MPILIBS $LIBS -lmpi" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4361: \"$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 @@ -4351,7 +4382,7 @@ unset ac_cv_lib_$ac_lib_var for casc_lib_dir in /usr/local/mpi/lib; do echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:4355: checking for main in -lmpi" >&5 +echo "configure:4386: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'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 @@ -4359,14 +4390,14 @@ else ac_save_LIBS="$LIBS" LIBS="-L$casc_lib_dir $MPILIBDIRS $MPILIBS -lmpi $LIBS -lmpi" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4401: \"$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 @@ -4473,7 +4504,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:4477: checking how to run the C preprocessor" >&5 +echo "configure:4508: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -4488,13 +4519,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -4505,13 +4536,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -4522,13 +4553,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -4553,7 +4584,7 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:4557: checking how to run the C++ preprocessor" >&5 +echo "configure:4588: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4566,12 +4597,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -4601,7 +4632,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4605: checking for $ac_word" >&5 +echo "configure:4636: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4639,11 +4670,50 @@ if test "$casc_user_chose_compilers" = "yes" && test "$casc_user_chose_mpi" = "no" then + echo $ac_n "checking the architecture""... $ac_c" 1>&6 +echo "configure:4675: checking the architecture" >&5 + + if test -z "$ARCH"; then + + casc_tarch_dir= + for casc_dir in $srcdir $srcdir/.. $srcdir/../.. $srcdir/config; do + if test -f $casc_dir/tarch; then + casc_tarch_dir=$casc_dir + casc_tarch=$casc_tarch_dir/tarch + break + fi + done + + if test -z "$casc_tarch_dir"; then + echo "configure: warning: cannot find tarch" 1>&2 + ARCH=$HOSTTYPE + else + ARCH="`$casc_tarch`" + + if test -z "$ARCH" || test "$ARCH" = "unknown"; then + ARCH=$HOSTTYPE + fi + fi + + if test -z "$ARCH"; then + ARCH=unknown + echo "configure: warning: architecture is unknown" 1>&2 + else + echo "$ac_t""$ARCH" 1>&6 + fi + else + echo "$ac_t""$ARCH" 1>&6 + fi + + + + + casc_find_mpi_cache_used=yes echo $ac_n "checking for MPI""... $ac_c" 1>&6 -echo "configure:4647: checking for MPI" >&5 +echo "configure:4717: checking for MPI" >&5 if eval "test \"`echo '$''{'casc_cv_mpi_include'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4672,22 +4742,22 @@ fi if test "$casc_find_mpi_cache_used" = "yes"; then echo $ac_n "checking for location of mpi.h""... $ac_c" 1>&6 -echo "configure:4676: checking for location of mpi.h" >&5 +echo "configure:4746: checking for location of mpi.h" >&5 MPIINCLUDE=$casc_cv_mpi_include echo "$ac_t"""\(cached\) $MPIINCLUDE"" 1>&6 echo $ac_n "checking for MPI library directories""... $ac_c" 1>&6 -echo "configure:4681: checking for MPI library directories" >&5 +echo "configure:4751: checking for MPI library directories" >&5 MPILIBDIRS=$casc_cv_mpi_lib_dirs echo "$ac_t"""\(cached\) $MPILIBDIRS"" 1>&6 echo $ac_n "checking for MPI libraries""... $ac_c" 1>&6 -echo "configure:4686: checking for MPI libraries" >&5 +echo "configure:4756: checking for MPI libraries" >&5 MPILIBS=$casc_cv_mpi_libs echo "$ac_t"""\(cached\) $MPILIBS"" 1>&6 echo $ac_n "checking for other MPI-related flags""... $ac_c" 1>&6 -echo "configure:4691: checking for other MPI-related flags" >&5 +echo "configure:4761: checking for other MPI-related flags" >&5 MPIFLAGS=$casc_cv_mpi_flags echo "$ac_t"""\(cached\) $MPIFLAGS"" 1>&6 else @@ -4736,7 +4806,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4740: checking for $ac_word" >&5 +echo "configure:4810: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MPICC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4768,7 +4838,416 @@ done if test -z "$MPICC"; then echo "configure: warning: no acceptable mpicc found in \$PATH" 1>&2 - CASC_SET_MPI + + + ac_help="$ac_help + --with-mpi-include=DIR mpi.h is in DIR" +# Check whether --with-mpi-include or --without-mpi-include was given. +if test "${with_mpi_include+set}" = set; then + withval="$with_mpi_include" + casc_mpi_include_dir=$withval +fi + + + ac_help="$ac_help + --with-mpi-libs=LIBS LIBS is space-separated list of library names + needed for MPI, e.g. \"nsl socket mpi\"" +# Check whether --with-mpi-libs or --without-mpi-libs was given. +if test "${with_mpi_libs+set}" = set; then + withval="$with_mpi_libs" + casc_mpi_libs=$withval +fi + + + ac_help="$ac_help + --with-mpi-lib-dirs=DIRS + DIRS is space-separated list of directories + containing the libraries specified by + \`--with-mpi-libs', e.g \"/usr/lib /usr/local/mpi/lib\"" +# Check whether --with-mpi-lib-dirs or --without-mpi-lib-dirs was given. +if test "${with_mpi_lib_dirs+set}" = set; then + withval="$with_mpi_lib_dirs" + casc_mpi_lib_dirs=$withval +fi + + + + if test -z "$casc_mpi_libs"; then + + + case $ARCH in + + sun4 | solaris) + case $F77 in + *g77) + if test -z "$casc_mpi_include_dir"; then + casc_mpi_include_dir=/usr/local/mpi/lam/h + fi + + if test -z "$casc_mpi_lib_dirs"; then + casc_mpi_lib_dirs="/usr/local/mpi/lam/lib" + fi + + casc_mpi_libs="socket mpi trillium args tstdio t";; + + *) + + if test -z "$casc_mpi_include_dir"; then + MPIINCLUDE="-I/usr/local/mpi/mpich/include \ + -I/usr/local/mpi/mpich/lib/solaris/ch_p4" + fi + + if test -z "$casc_mpi_lib_dirs"; then + casc_mpi_lib_dirs="/usr/local/mpi/mpich/lib/solaris/ch_p4 \ + /usr/lib" + fi + + casc_mpi_libs="nsl socket mpi";; + esac + + if test -z "$MPIINCLUDE"; then + ac_safe=`echo "$casc_mpi_include_dir/mpi.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $casc_mpi_include_dir/mpi.h""... $ac_c" 1>&6 +echo "configure:4912: checking for $casc_mpi_include_dir/mpi.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + MPIINCLUDE="-I$casc_mpi_include_dir" +else + echo "$ac_t""no" 1>&6 +fi + + fi + ;; + + alpha) + if test -z "$casc_mpi_include_dir"; then + casc_mpi_include_dir=/usr/local/mpi/include + fi + ac_safe=`echo "$casc_mpi_include_dir/mpi.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $casc_mpi_include_dir/mpi.h""... $ac_c" 1>&6 +echo "configure:4952: checking for $casc_mpi_include_dir/mpi.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + MPIINCLUDE="-I$casc_mpi_include_dir" +else + echo "$ac_t""no" 1>&6 +fi + + + if test -z "$casc_mpi_lib_dirs"; then + casc_mpi_lib_dirs="/usr/local/mpi/lib/alpha/ch_shmem \ + /usr/local/lib" + fi + + casc_mpi_libs="mpich gs";; + + rs6000) + if test -z "$casc_mpi_include_dir"; then + casc_mpi_include_dir=/usr/lpp/ppe.poe/include + fi + ac_safe=`echo "$casc_mpi_include_dir/mpi.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $casc_mpi_include_dir/mpi.h""... $ac_c" 1>&6 +echo "configure:4997: checking for $casc_mpi_include_dir/mpi.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:5007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + MPIINCLUDE="-I$casc_mpi_include_dir" +else + echo "$ac_t""no" 1>&6 +fi + + + if test -z "$casc_mpi_lib_dirs"; then + casc_mpi_lib_dirs=/usr/lpp/ppe.poe/lib + fi + + casc_mpi_libs=mpi + + MPIFLAGS="-binitfini:poe_remote_main";; + + IRIX64 | iris4d) + if test -z "$casc_mpi_include_dir"; then + casc_mpi_include_dir=/usr/local/mpi/include + fi + ac_safe=`echo "$casc_mpi_include_dir/mpi.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $casc_mpi_include_dir/mpi.h""... $ac_c" 1>&6 +echo "configure:5043: checking for $casc_mpi_include_dir/mpi.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:5053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + MPIINCLUDE="-I$casc_mpi_include_dir" +else + echo "$ac_t""no" 1>&6 +fi + + + if test -z "$casc_mpi_lib_dirs"; then + casc_mpi_lib_dirs=/usr/local/mpi/lib/IRIX64/ch_p4 + fi + + casc_mpi_libs=mpi;; + + *) +echo "configure: warning: trying naive MPI settings - can use --with flags to change" 1>&2 + if test -z "$casc_mpi_include_dir"; then + casc_mpi_include_dir=/usr/local/mpi/include + fi + ac_safe=`echo "$casc_mpi_include_dir/mpi.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $casc_mpi_include_dir/mpi.h""... $ac_c" 1>&6 +echo "configure:5088: checking for $casc_mpi_include_dir/mpi.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:5098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + MPIINCLUDE="-I$casc_mpi_include_dir" +else + echo "$ac_t""no" 1>&6 +fi + + + if test -z "$casc_mpi_lib_dirs"; then + casc_mpi_lib_dirs=/usr/local/mpi/lib + fi + casc_mpi_libs=mpi ;; + esac + + for casc_lib in $casc_mpi_libs; do + + # define some macros to hopefully improve readability + + + + # check for the library from first argument. If linking is successful + # the first time, the job is done, otherwise loop through DIRECTORY-LIST + echo $ac_n "checking for main in -l$casc_lib""... $ac_c" 1>&6 +echo "configure:5135: checking for main in -l$casc_lib" >&5 +ac_lib_var=`echo $casc_lib'_'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 +else + ac_save_LIBS="$LIBS" +LIBS="$MPILIBDIRS $MPILIBS $LIBS -l$casc_lib" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + MPILIBS="$MPILIBS -l$casc_lib" + casc_lib_found=yes + +else + echo "$ac_t""no" 1>&6 + +unset ac_cv_lib_$ac_lib_var + for casc_lib_dir in $casc_mpi_lib_dirs; do + + echo $ac_n "checking for main in -l$casc_lib""... $ac_c" 1>&6 +echo "configure:5175: checking for main in -l$casc_lib" >&5 +ac_lib_var=`echo $casc_lib'_'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 +else + ac_save_LIBS="$LIBS" +LIBS="-L$casc_lib_dir $MPILIBDIRS $MPILIBS -l$casc_lib $LIBS -l$casc_lib" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + MPILIBDIRS="-L$casc_lib_dir $MPILIBDIRS" + MPILIBS="$MPILIBS -l$casc_lib" + casc_lib_found=yes + + break + +else + echo "$ac_t""no" 1>&6 +fi +unset ac_cv_lib_$ac_lib_var + + done + +fi +unset ac_cv_lib_$ac_lib_var + + # ACTION-IF-NOT_FOUND for when the library is found nowhere + + + unset casc_lib_found + + + + + + done + + else + if test -n "$casc_mpi_include_dir"; then + MPIINCLUDE="-I$casc_mpi_include_dir" + else + MPIINCLUDE= + fi + + if test -n "$casc_mpi_lib_dirs"; then + for casc_lib_dir in $casc_mpi_lib_dirs; do + MPILIBDIRS="-L$casc_lib_dir $MPILIBDIRS" + done + else + MPILIBDIRS= + fi + + for casc_lib in $casc_mpi_libs; do + MPILIBS="$MPILIBS -l$casc_lib" + done + fi + if test -z "$MPILIBS"; then echo "configure: warning: MPI not found - must set manually using --with flags" 1>&2 fi @@ -4778,7 +5257,7 @@ done echo $ac_n "checking for location of mpi.h""... $ac_c" 1>&6 -echo "configure:4782: checking for location of mpi.h" >&5 +echo "configure:5261: checking for location of mpi.h" >&5 cat > mpconftest.c << EOF #include "mpi.h" @@ -4967,17 +5446,17 @@ EOF unset ac_cv_header_mpi_h ac_safe=`echo "mpi.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for mpi.h""... $ac_c" 1>&6 -echo "configure:4971: checking for mpi.h" >&5 +echo "configure:5450: checking for mpi.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5033,7 +5512,7 @@ fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* casc_result=yes else @@ -5077,7 +5556,7 @@ rm -f conftest* LIBS_SAVE=$LIBS LIBS="$MPIINCLUDE $MPIFLAGS $MPILIBDIRS $MPILIBS -lpthread" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* MPILIBS="$MPILIBS -lpthread" else @@ -5107,13 +5586,13 @@ rm -f conftest* echo "$ac_t""$MPIINCLUDE" 1>&6 echo $ac_n "checking for MPI library directories""... $ac_c" 1>&6 -echo "configure:5111: checking for MPI library directories" >&5 +echo "configure:5590: checking for MPI library directories" >&5 echo "$ac_t""$MPILIBDIRS" 1>&6 echo $ac_n "checking for MPI libraries""... $ac_c" 1>&6 -echo "configure:5114: checking for MPI libraries" >&5 +echo "configure:5593: checking for MPI libraries" >&5 echo "$ac_t""$MPILIBS" 1>&6 echo $ac_n "checking for other MPI-related flags""... $ac_c" 1>&6 -echo "configure:5117: checking for other MPI-related flags" >&5 +echo "configure:5596: checking for other MPI-related flags" >&5 echo "$ac_t""$MPIFLAGS" 1>&6 fi @@ -5152,6 +5631,228 @@ fi fi +if test "$casc_using_petsc" = "yes" +then + + echo $ac_n "checking for directory""... $ac_c" 1>&6 +echo "configure:5639: checking for directory" >&5 + + casc_result= + casc_env__dir=$_DIR + _DIR= + + # Check whether --with--dir or --without--dir was given. +if test "${with__dir+set}" = set; then + withval="$with__dir" + if test "$withval" = "no"; then + casc_result="configuring without " + _DIR= + fi + +fi + + + + if test "$with__dir" != "no"; then + + if test -d "$with__dir"; then + + + + casc_result="$with__dir" + _DIR="$casc_result" + + + fi + + if test -z "$casc_result"; then + + if test -d "$casc_env__dir"; then + + + + casc_result="$casc_env__dir" + _DIR="$casc_result" + + + fi + fi + + + + if test -z "$casc_result"; then + _DIR= + + casc_result="none" + fi + fi + + + if test "$casc_result" = "none"; then + + if test -n "$casc_env__dir"; then + + casc_result="$casc_env__dir" + _DIR="$casc_result" + fi + fi + + echo "$ac_t""$casc_result" 1>&6 + + + + + echo $ac_n "checking for PETSC directory""... $ac_c" 1>&6 +echo "configure:5707: checking for PETSC directory" >&5 + + casc_result= + casc_env_PETSC_dir=$PETSC_DIR + PETSC_DIR= + + # Check whether --with-PETSC-dir or --without-PETSC-dir was given. +if test "${with_PETSC_dir+set}" = set; then + withval="$with_PETSC_dir" + if test "$withval" = "no"; then + casc_result="configuring without PETSC" + PETSC_DIR= + fi + +fi + + + + if test "$with_PETSC_dir" != "no"; then + + if test -d "$with_PETSC_dir"; then + + if test -f $with_PETSC_dir/include/petsc.h; then + + casc_result="$with_PETSC_dir" + PETSC_DIR="$casc_result" + + fi + fi + + if test -z "$casc_result"; then + + if test -d "$casc_env_PETSC_dir"; then + + if test -f $casc_env_PETSC_dir/include/petsc.h; then + + casc_result="$casc_env_PETSC_dir" + PETSC_DIR="$casc_result" + + fi + fi + fi + + + + if test -z "$casc_result"; then + PETSC_DIR= + + for casc_dir in /usr/local/petsc /usr/local/apps/petsc \ + /home/casc/petsc-2.0.22; do + + if test -d "$casc_dir"; then + + if test -f $casc_dir/include/petsc.h; then + + PETSC_DIR=$casc_dir + + break + + fi + fi + done + + if test -z "$PETSC_DIR"; then + casc_result="none" + + else + casc_result="$PETSC_DIR" + fi + + fi + fi + + + if test "$casc_result" = "none"; then + + if test -n "$casc_env_PETSC_dir"; then + + casc_result="$casc_env_PETSC_dir" + PETSC_DIR="$casc_result" + fi + fi + + echo "$ac_t""$casc_result" 1>&6 + + + + casc_user_chose_petscinc=no + # Check whether --with-petsc-include or --without-petsc-include was given. +if test "${with_petsc_include+set}" = set; then + withval="$with_petsc_include" + for petsc_inc in $withval; do + PETSCINCLUDE="$PETSCINCLUDE -I$petsc_inc" + done; casc_user_chose_petscinc=yes +fi + + + casc_user_chose_petsclibs=no + # Check whether --with-petsc-libs or --without-petsc-libs was given. +if test "${with_petsc_libs+set}" = set; then + withval="$with_petsc_libs" + for petsc_lib in $withval; do + PETSCLIBS="$PETSCLIBS -l$petsc_lib" + done; casc_user_chose_petsclibs=yes +fi + + + casc_user_chose_petsclibdirs=no + # Check whether --with-petsc-lib-dirs or --without-petsc-lib-dirs was given. +if test "${with_petsc_lib_dirs+set}" = set; then + withval="$with_petsc_lib_dirs" + for petsc_lib_dir in $withval; do + PETSCLIBDIRS="$PETSCLIBDIRS -L$petsc_lib_dir" + done; casc_user_chose_petsclibdirs=yes +fi + + + if test -z "$PETSC_DIR"; then + echo "configure: warning: PETSC not found - must set manually using --with-PETSC-dir" 1>&2 + cat >> confdefs.h <<\EOF +#define LACKS_PETSC 1 +EOF + + have_PETSC=no + else + cat >> confdefs.h <<\EOF +#define HAVE_PETSC 1 +EOF + + have_PETSC=yes + + echo $ac_n "checking for PETSc libraries""... $ac_c" 1>&6 +echo "configure:5839: checking for PETSc libraries" >&5 + + if test "$casc_user_chose_petsclibs" = "no"; then + PETSCLIBS="-lpetscvec -lpetscts -lpetscsys -lpetscsnes -lpetscsles \ + -lpetscmat -lpetscgvec -lpetscfortran -lpetsccontrib \ + -lmpiuni" + fi + if test "$casc_user_chose_petsclibdirs" = "no"; then + PETSCLIBDIRS="-L$PETSC_DIR/lib/lib$OPTCHOICE/$ARCH" + fi + if test "$casc_user_chose_petscinc" = "no"; then + PETSCINCLUDE="-I$PETSC_DIR -I$PETSC_DIR/include -I$PETSC_DIR/src/vec \ + -I$PETSC_DIR/src/vec -I$PETSC_DIR/bmake/$ARCH" + fi + + fi + +fi CC="$PREPEND $CC" @@ -5214,7 +5915,7 @@ fi # check for the library from first argument. If linking is successful # the first time, the job is done, otherwise loop through DIRECTORY-LIST echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5218: checking for main in -lm" >&5 +echo "configure:5919: checking for main in -lm" >&5 ac_lib_var=`echo m'_'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 @@ -5222,14 +5923,14 @@ else ac_save_LIBS="$LIBS" LIBS="$LIBDIRS $LIBS $LIBS -lm" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5934: \"$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 @@ -5254,7 +5955,7 @@ unset ac_cv_lib_$ac_lib_var for casc_lib_dir in /usr/lib /usr/ccs/lib; do echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5258: checking for main in -lm" >&5 +echo "configure:5959: checking for main in -lm" >&5 ac_lib_var=`echo m'_'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 @@ -5262,14 +5963,14 @@ else ac_save_LIBS="$LIBS" LIBS="-L$casc_lib_dir $LIBDIRS $LIBS -lm $LIBS -lm" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5974: \"$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 @@ -5328,6 +6029,11 @@ unset ac_cv_lib_$ac_lib_var + + + + + @@ -5481,6 +6187,8 @@ s%@MPIINCLUDE@%$MPIINCLUDE%g s%@MPILIBDIRS@%$MPILIBDIRS%g s%@MPILIBS@%$MPILIBS%g s%@MPIFLAGS@%$MPIFLAGS%g +s%@_DIR@%$_DIR%g +s%@PETSC_DIR@%$PETSC_DIR%g s%@OPTCHOICE@%$OPTCHOICE%g s%@INCLUDES@%$INCLUDES%g s%@LIBDIRS@%$LIBDIRS%g @@ -5490,6 +6198,11 @@ s%@LDLIBS@%$LDLIBS%g s%@LDLIBDIRS@%$LDLIBDIRS%g s%@F77FLAGS@%$F77FLAGS%g s%@PREPEND@%$PREPEND%g +s%@HAVE_PETSC@%$HAVE_PETSC%g +s%@LACKS_PETSC@%$LACKS_PETSC%g +s%@PETSCLIBS@%$PETSCLIBS%g +s%@PETSCLIBDIRS@%$PETSCLIBDIRS%g +s%@PETSCINCLUDE@%$PETSCINCLUDE%g CEOF EOF diff --git a/configure.in b/configure.in index 979353f32..ef8009fc3 100644 --- a/configure.in +++ b/configure.in @@ -52,6 +52,7 @@ unset F77 casc_user_chose_compilers=no casc_user_chose_mpi=no casc_using_pthreads=no +casc_using_petsc=no AC_ARG_WITH(CC, [ --with-CC=ARG manually set C compiler to ARG], @@ -197,6 +198,14 @@ AC_ARG_WITH(pthreads, ) +AC_ARG_WITH(petsc, + [ --with-petsc use petsc], + if test "$withval" != "no" + then + casc_using_patsc=yes + fi +) + AC_PROG_RANLIB dnl ********************************************************************* @@ -534,6 +543,10 @@ then HYPRE_FIND_MPI fi +if test "$casc_using_petsc" = "yes" +then + CASC_FIND_PETSC +fi CC="$PREPEND $CC" @@ -583,6 +596,11 @@ AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(F77FLAGS) AC_SUBST(PREPEND) +AC_SUBST(HAVE_PETSC) +AC_SUBST(LACKS_PETSC) +AC_SUBST(PETSCLIBS) +AC_SUBST(PETSCLIBDIRS) +AC_SUBST(PETSCINCLUDE) dnl ********************************************************************* dnl * Use CASC_CONFIG_OUTPUT_LIST with AC_OUTPUT if you want to handle the