diff --git a/aclocal.m4 b/aclocal.m4 index 29eccef6b..d5a376e16 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,5 +1,5 @@ sinclude(/home/casc/software/autoconfig/macros/casc_libs_and_headers.m4) -sinclude(/home/casc/software/autoconfig/macros/casc_mpi.m4) +sinclude(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 b974289c2..a81c6198a 100755 --- a/configure +++ b/configure @@ -12,11 +12,46 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help - --with-CC=ARG manually set C compiler to ARG" + --with-CC=ARG manually set C compiler to ARG" ac_help="$ac_help - --with-CXX=ARG manually set C++ compiler to ARG" + --with-CXX=ARG manually set C++ compiler to ARG" ac_help="$ac_help - --with-f77=ARG manually set f77 compiler to ARG" + --with-f77=ARG manually set f77 compiler to ARG" +ac_help="$ac_help + --with-CFLAGS=ARG manually set c compiler flags" +ac_help="$ac_help + --with-CXXFLAGS=ARG manually set c++ compiler flags" +ac_help="$ac_help + --with-F77FLAGS=ARG manually set f77 compiler flags" +ac_help="$ac_help + --with-mpi-include=DIR mpi.h is in DIR" +ac_help="$ac_help + --with-mpi-libs=LIBS LIBS is space-separated list of library names + needed for MPI, e.g. \"nsl socket mpi\"" +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\"" +ac_help="$ac_help + --with-mpi-flags=FLAGS FLAGS is a space seperated list of whatever + flags other than -l and -L are needed to link with + MPI libraries-- Does not de-activate auto search + for other MPI information" +ac_help="$ac_help + --with-purify assign gcc if not already set by user and + prepends "purify" to compile/link line" +ac_help="$ac_help + --with-cegdb assign gcc and -g and link in -lcegdb and include cegdb.h" +ac_help="$ac_help + --with-gdb assign gcc and -g and link in -lgdb and include + gdb.h" +ac_help="$ac_help + --without-MPI do not use MPI" +ac_help="$ac_help + --with-dmalloc use dmalloc package" +ac_help="$ac_help + --with-pthreads use pthreads" ac_help="$ac_help --with-mpi-include=DIR mpi.h is in DIR" ac_help="$ac_help @@ -24,21 +59,12 @@ ac_help="$ac_help needed for MPI, e.g. \"nsl socket mpi\"" 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\"" + DIRS is space-separated list of directories + containing the libraries specified by + \`--with-mpi-libs', e.g \"/usr/lib /usr/local/mpi/lib\"" 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-purify use purify-- finds mpi for use with non MPICH compiler" -ac_help="$ac_help - --without-MPI do not use MPI" -ac_help="$ac_help - --with-dmalloc use dmalloc package" -ac_help="$ac_help - --with-pthreads use pthreads" + --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 --enable-opt Sets up compiler flags for optimization" ac_help="$ac_help @@ -558,7 +584,7 @@ fi echo $ac_n "checking the hostname""... $ac_c" 1>&6 -echo "configure:562: checking the hostname" >&5 +echo "configure:588: checking the hostname" >&5 casc_hostname=hostname HOSTNAME="`$casc_hostname`" @@ -572,7 +598,7 @@ echo "configure:562: checking the hostname" >&5 echo $ac_n "checking the architecture""... $ac_c" 1>&6 -echo "configure:576: checking the architecture" >&5 +echo "configure:602: checking the architecture" >&5 if test -z "$ARCH"; then @@ -620,7 +646,6 @@ unset F77 casc_user_chose_compilers=no casc_user_chose_mpi=no casc_using_pthreads=no -casc_using_purify=no # Check whether --with-CC or --without-CC was given. if test "${with_CC+set}" = set; then @@ -646,6 +671,28 @@ if test "${with_F77+set}" = set; then fi +# Check whether --with-CFLAGS or --without-CFLAGS was given. +if test "${with_CFLAGS+set}" = set; then + withval="$with_CFLAGS" + CFLAGS=$withval +fi + + +# Check whether --with-CXXFLAGS or --without-CXXFLAGS was given. +if test "${with_CXXFLAGS+set}" = set; then + withval="$with_CXXFLAGS" + CXXFLAGS=$withval +fi + + +# Check whether --with-F77FLAGS or --without-F77FLAGS was given. +if test "${with_F77FLAGS+set}" = set; then + withval="$with_F77FLAGS" + F77FLAGS=$withval +fi + + + # Check whether --with-mpi-include or --without-mpi-include was given. if test "${with_mpi_include+set}" = set; then withval="$with_mpi_include" @@ -673,7 +720,6 @@ if test "${with_mpi_lib_dirs+set}" = set; then fi - # Check whether --with-mpi-flags or --without-mpi-flags was given. if test "${with_mpi_flags+set}" = set; then withval="$with_mpi_flags" @@ -685,19 +731,453 @@ fi # Check whether --with-purify or --without-purify was given. if test "${with_purify+set}" = set; then withval="$with_purify" - casc_using_purify=yes - casc_user_chose_compilers=yes - casc_user_chose_mpi=yes - CC=gcc - MPIINCLUDE="$MPIINCLUDE -I/usr/local/mpi/mpich/lib/solaris/ch_p4 -I/usr/local/mpi/mpich/include" - MPILIBS="$MPILIBS -lpmpich -lmpich -lsocket -lnsl -lpthread" - MPILIBDIRS="-L/usr/local/mpi/mpich/lib/solaris/ch_p4 $MPILIBDIRS" + if test "$casc_user_chose_compilers" = "no" + then + CC=gcc + CXX=g++ + CFLAGS="$CFLAGS -g" + CXXFLAGS="$CXXFLAGS -g" + casc_user_chose_compilers=yes + fi + CC="purify $CC" + CXX="purify $CXX" +fi + + + + +# Check whether --with-cegdb or --without-cegdb was given. +if test "${with_cegdb+set}" = set; then + withval="$with_cegdb" + CC=gcc + CXX=g++ + casc_users_chose_compilers=yes + CFLAGS="$CFLAGS -g" + CXXFLAGS="$CXXFLAGS -g" + + for casc_dir in '' /home/casc/include ; do + if test -n "$casc_dir"; then + casc_header=$casc_dir/cegdb.h + else + casc_header=cegdb.h + fi + + ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 +echo "configure:768: 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:773: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # 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:794: \"$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 + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + 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:811: \"$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 + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + 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:828: \"$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 + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +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:859: \"$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 + if test -n "$casc_dir"; then + INCLUDES="$INCLUDES -I$casc_dir" + fi + casc_header_found=yes + + # 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 cegdb in -lcegdb""... $ac_c" 1>&6 +echo "configure:887: 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 +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 + 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 + LDLIBS="$LDLIBS -lcegdb" + casc_lib_found=yes + +else + echo "$ac_t""no" 1>&6 + +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:931: 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 +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 + 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 + LDLIBDIRS="-L$casc_lib_dir $LDLIBDIRS" + LDLIBS="$LDLIBS -lcegdb" + 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 + + + + + + + break +else + echo "$ac_t""no" 1>&6 +fi + + + done + + + + unset casc_header_found fi +# Check whether --with-gdb or --without-gdb was given. +if test "${with_gdb+set}" = set; then + withval="$with_gdb" + CC=gcc + CXX=g++ + casc_users_chose_compilers=yes + CFLAGS="$CFLAGS -g" + CXXFLAGS="$CXXFLAGS -g" + + for casc_dir in '' /usr/local/include /usr/include ; do + if test -n "$casc_dir"; then + casc_header=$casc_dir/gdb.h + else + casc_header=gdb.h + fi + + ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 +echo "configure:1025: 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:1035: \"$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 + if test -n "$casc_dir"; then + INCLUDES="$INCLUDES -I$casc_dir" + fi + casc_header_found=yes + + # 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 gdb in -lgdb""... $ac_c" 1>&6 +echo "configure:1063: 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 +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 + 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 + LDLIBS="$LDLIBS -lgdb" + casc_lib_found=yes + +else + echo "$ac_t""no" 1>&6 + +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:1107: 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 +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 + 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 + LDLIBDIRS="-L$casc_lib_dir $LDLIBDIRS" + LDLIBS="$LDLIBS -lgdb" + 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 + + + + + + + break +else + echo "$ac_t""no" 1>&6 +fi + + + done + + + + unset casc_header_found + +fi + + # Check whether --with-MPI or --without-MPI was given. @@ -729,7 +1209,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:733: checking for malloc in -ldmalloc" >&5 +echo "configure:1213: 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 @@ -737,7 +1217,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:1232: \"$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 @@ -774,7 +1254,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:778: checking for malloc in -ldmalloc" >&5 +echo "configure:1258: 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 @@ -782,7 +1262,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:1277: \"$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 @@ -846,7 +1326,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:850: checking for pthread_create in -lpthread" >&5 +echo "configure:1330: 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 @@ -854,7 +1334,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:1349: \"$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 @@ -893,7 +1373,7 @@ else echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:897: checking for pthread_create in -lpthreads" >&5 +echo "configure:1377: 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 @@ -901,7 +1381,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:1396: \"$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 @@ -958,7 +1438,7 @@ 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:962: checking for $ac_word" >&5 +echo "configure:1442: 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 @@ -987,6 +1467,9 @@ fi +if test -z "$CC" +then + case $HOSTNAME in sasn100 ) @@ -997,7 +1480,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:1001: checking for $ac_word" >&5 +echo "configure:1484: 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 @@ -1031,7 +1514,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:1035: checking for $ac_word" >&5 +echo "configure:1518: 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 @@ -1065,7 +1548,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:1069: checking for $ac_word" >&5 +echo "configure:1552: 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 @@ -1100,87 +1583,7 @@ done then if test "$casc_using_mpi" = "yes" then - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1105: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # 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:1126: \"$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 - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - 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:1143: \"$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 - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - 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:1160: \"$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 - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - - + for casc_dir in '' /opt/intel/tflop/TF98_2.4.1/tflops/cougar/include ; do if test -n "$casc_dir"; then casc_header=$casc_dir/mpi.h @@ -1190,17 +1593,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 -echo "configure:1194: checking for $casc_header" >&5 +echo "configure:1597: 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:1204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1607: \"$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* @@ -1242,7 +1645,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:1246: checking for main in -lmpi" >&5 +echo "configure:1649: 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 @@ -1250,14 +1653,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:1664: \"$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 @@ -1282,7 +1685,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:1286: checking for main in -lmpi" >&5 +echo "configure:1689: 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 @@ -1290,14 +1693,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:1704: \"$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 @@ -1392,7 +1795,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:1396: checking for $ac_word" >&5 +echo "configure:1799: 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 @@ -1426,7 +1829,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:1430: checking for $ac_word" >&5 +echo "configure:1833: 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 @@ -1460,7 +1863,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:1464: checking for $ac_word" >&5 +echo "configure:1867: 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 @@ -1503,7 +1906,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:1507: checking for main in -lmpi" >&5 +echo "configure:1910: 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 @@ -1511,14 +1914,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:1925: \"$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 @@ -1543,7 +1946,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:1547: checking for main in -lmpi" >&5 +echo "configure:1950: 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 @@ -1551,14 +1954,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: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 @@ -1645,7 +2048,7 @@ unset ac_cv_lib_$ac_lib_var ;; esac - +fi if test -z "$CC" then @@ -1662,7 +2065,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:1666: checking for $ac_word" >&5 +echo "configure:2069: 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 @@ -1696,7 +2099,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:1700: checking for $ac_word" >&5 +echo "configure:2103: 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 @@ -1730,7 +2133,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:1734: checking for $ac_word" >&5 +echo "configure:2137: 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 @@ -1765,7 +2168,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:1769: checking for $ac_word" >&5 +echo "configure:2172: 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 @@ -1799,7 +2202,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:1803: checking for $ac_word" >&5 +echo "configure:2206: 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 @@ -1833,7 +2236,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:1837: checking for $ac_word" >&5 +echo "configure:2240: 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 @@ -1915,7 +2318,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:1919: checking for $ac_word" >&5 +echo "configure:2322: 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 @@ -1949,7 +2352,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:1953: checking for $ac_word" >&5 +echo "configure:2356: 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 @@ -1983,7 +2386,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:1987: checking for $ac_word" >&5 +echo "configure:2390: 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 @@ -2018,7 +2421,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:2022: checking for $ac_word" >&5 +echo "configure:2425: 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 @@ -2052,7 +2455,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:2056: checking for $ac_word" >&5 +echo "configure:2459: 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 @@ -2086,7 +2489,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:2090: checking for $ac_word" >&5 +echo "configure:2493: 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 @@ -2133,17 +2536,17 @@ done ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 -echo "configure:2137: checking for $casc_header" >&5 +echo "configure:2540: 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:2147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2550: \"$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* @@ -2185,7 +2588,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:2189: checking for main in -lrt" >&5 +echo "configure:2592: 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 @@ -2193,14 +2596,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:2607: \"$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 @@ -2225,7 +2628,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:2229: checking for main in -lrt" >&5 +echo "configure:2632: 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 @@ -2233,14 +2636,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:2647: \"$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 @@ -2288,7 +2691,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:2292: checking for main in -lmpi" >&5 +echo "configure:2695: 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 @@ -2296,14 +2699,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:2710: \"$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 @@ -2341,7 +2744,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:2345: checking for main in -lmpi" >&5 +echo "configure:2748: 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 @@ -2349,14 +2752,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:2763: \"$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 @@ -2381,7 +2784,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:2385: checking for main in -lmpi" >&5 +echo "configure:2788: 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 @@ -2389,14 +2792,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:2803: \"$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 @@ -2536,7 +2939,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:2540: checking for $ac_word" >&5 +echo "configure:2943: 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 @@ -2570,7 +2973,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:2574: checking for $ac_word" >&5 +echo "configure:2977: 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 @@ -2604,7 +3007,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:2608: checking for $ac_word" >&5 +echo "configure:3011: 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 @@ -2639,7 +3042,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:2643: checking for $ac_word" >&5 +echo "configure:3046: 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 @@ -2673,7 +3076,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:2677: checking for $ac_word" >&5 +echo "configure:3080: 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 @@ -2707,7 +3110,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:2711: checking for $ac_word" >&5 +echo "configure:3114: 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 @@ -2745,7 +3148,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:2749: checking for $ac_word" >&5 +echo "configure:3152: 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 @@ -2779,7 +3182,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:2783: checking for $ac_word" >&5 +echo "configure:3186: 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 @@ -2813,7 +3216,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:2817: checking for $ac_word" >&5 +echo "configure:3220: 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 @@ -2848,7 +3251,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:2852: checking for $ac_word" >&5 +echo "configure:3255: 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 @@ -2882,7 +3285,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:2886: checking for $ac_word" >&5 +echo "configure:3289: 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 @@ -2916,7 +3319,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:2920: checking for $ac_word" >&5 +echo "configure:3323: 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 @@ -2999,7 +3402,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:3406: 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 @@ -3033,7 +3436,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:3037: checking for $ac_word" >&5 +echo "configure:3440: 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 @@ -3067,7 +3470,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:3071: checking for $ac_word" >&5 +echo "configure:3474: 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 @@ -3102,7 +3505,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:3509: 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 @@ -3136,7 +3539,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:3140: checking for $ac_word" >&5 +echo "configure:3543: 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 @@ -3170,7 +3573,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:3174: checking for $ac_word" >&5 +echo "configure:3577: 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 @@ -3206,7 +3609,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:3210: checking for $ac_word" >&5 +echo "configure:3613: 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 @@ -3243,7 +3646,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:3650: 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 @@ -3280,7 +3683,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:3284: checking for $ac_word" >&5 +echo "configure:3687: 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 @@ -3328,17 +3731,17 @@ done ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 -echo "configure:3332: checking for $casc_header" >&5 +echo "configure:3735: 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:3342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3745: \"$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* @@ -3380,7 +3783,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:3384: checking for main in -lmpi" >&5 +echo "configure:3787: 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 @@ -3388,14 +3791,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:3802: \"$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 @@ -3420,7 +3823,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:3424: checking for main in -lmpi" >&5 +echo "configure:3827: 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 @@ -3428,14 +3831,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:3842: \"$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 @@ -3534,7 +3937,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:3538: checking for $ac_word" >&5 +echo "configure:3941: 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 @@ -3568,7 +3971,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:3572: checking for $ac_word" >&5 +echo "configure:3975: 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 @@ -3602,7 +4005,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:3606: checking for $ac_word" >&5 +echo "configure:4009: 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 @@ -3637,7 +4040,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:3641: checking for $ac_word" >&5 +echo "configure:4044: 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 @@ -3671,7 +4074,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:3675: checking for $ac_word" >&5 +echo "configure:4078: 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 @@ -3705,7 +4108,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:3709: checking for $ac_word" >&5 +echo "configure:4112: 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 @@ -3741,7 +4144,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:3745: checking for $ac_word" >&5 +echo "configure:4148: 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 @@ -3778,7 +4181,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:3782: checking for $ac_word" >&5 +echo "configure:4185: 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 @@ -3815,7 +4218,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:3819: checking for $ac_word" >&5 +echo "configure:4222: 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 @@ -3864,17 +4267,17 @@ done ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 -echo "configure:3868: checking for $casc_header" >&5 +echo "configure:4271: 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:3878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4281: \"$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* @@ -3916,7 +4319,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:3920: checking for main in -lmpi" >&5 +echo "configure:4323: 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 @@ -3924,14 +4327,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:4338: \"$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 @@ -3956,7 +4359,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:3960: checking for main in -lmpi" >&5 +echo "configure:4363: 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 @@ -3964,14 +4367,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:4378: \"$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 @@ -4078,7 +4481,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:4082: checking how to run the C preprocessor" >&5 +echo "configure:4485: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -4093,13 +4496,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:4103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4506: \"$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 : @@ -4110,13 +4513,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:4120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4523: \"$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 : @@ -4127,13 +4530,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:4137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4540: \"$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 : @@ -4158,7 +4561,7 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:4162: checking how to run the C++ preprocessor" >&5 +echo "configure:4565: 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 @@ -4171,12 +4574,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:4180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4583: \"$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 : @@ -4206,7 +4609,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:4210: checking for $ac_word" >&5 +echo "configure:4613: 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 @@ -4239,7 +4642,531 @@ done +if test "$casc_user_chose_compilers" = "yes" && + test "$casc_using_mpi" = "yes" && + test "$casc_user_chose_mpi" = "no" +then + + casc_find_mpi_cache_used=yes + + echo $ac_n "checking for MPI""... $ac_c" 1>&6 +echo "configure:4655: checking for MPI" >&5 + if eval "test \"`echo '$''{'casc_cv_mpi_include'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + casc_find_mpi_cache_used=no +fi + + if eval "test \"`echo '$''{'casc_cv_mpi_libs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + casc_find_mpi_cache_used=no +fi + + if eval "test \"`echo '$''{'casc_cv_mpi_lib_dirs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + casc_find_mpi_cache_used=no +fi + + if eval "test \"`echo '$''{'casc_cv_mpi_flags'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + casc_find_mpi_cache_used=no +fi + + echo "$ac_t""" 1>&6 + + if test "$casc_find_mpi_cache_used" = "yes"; then + echo $ac_n "checking for location of mpi.h""... $ac_c" 1>&6 +echo "configure:4684: 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:4689: 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:4694: 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:4699: checking for other MPI-related flags" >&5 + MPIFLAGS=$casc_cv_mpi_flags + echo "$ac_t"""\(cached\) $MPIFLAGS"" 1>&6 + else + + + + casc_user_chose_mpi=no + # Check whether --with-mpi-include or --without-mpi-include was given. +if test "${with_mpi_include+set}" = set; then + withval="$with_mpi_include" + for mpi_dir in $withval; do + MPIINCLUDE="$MPIINCLUDE -I$withval" + done; casc_user_chose_mpi=yes +fi + + + # Check whether --with-mpi-libs or --without-mpi-libs was given. +if test "${with_mpi_libs+set}" = set; then + withval="$with_mpi_libs" + for mpi_lib in $withval; do + MPILIBS="$MPILIBS -l$mpi_lib" + done; casc_user_chose_mpi=yes +fi + + + + # 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" + for mpi_lib_dir in $withval; do + MPILIBDIRS="-L$mpi_lib_dir $MPILIBDIRS" + done; casc_user_chose_mpi=yes +fi + + + + # Check whether --with-mpi-flags or --without-mpi-flags was given. +if test "${with_mpi_flags+set}" = set; then + withval="$with_mpi_flags" + MPIFLAGS=$withval +fi + + + for ac_prog in mpcc mpicc tmcc hcc +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:4748: 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 + if test -n "$MPICC"; then + ac_cv_prog_MPICC="$MPICC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_MPICC="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +MPICC="$ac_cv_prog_MPICC" +if test -n "$MPICC"; then + echo "$ac_t""$MPICC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$MPICC" && break +done + + + if test -z "$MPICC"; then + echo "configure: warning: no acceptable mpicc found in \$PATH" 1>&2 + CASC_SET_MPI + if test -z "$MPILIBS"; then + echo "configure: warning: MPI not found - must set manually using --with flags" 1>&2 + fi + + + else + + + echo $ac_n "checking for location of mpi.h""... $ac_c" 1>&6 +echo "configure:4790: checking for location of mpi.h" >&5 + + cat > mpconftest.c << EOF +#include "mpi.h" + +main(int argc, char **argv) +{ + int rank, size; + MPI_Init(&argc, &argv); + MPI_Comm_size(MPI_COMM_WORLD, &size); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Finalize(); + return 0; +} +EOF + + casc_mplibs= + casc_mplibdirs= + casc_flags= + casc_lmpi_exists=no + + + for casc_command in "$MPICC -show"\ + "$MPICC -v"\ + "$MPICC -#"\ + "$MPICC"; do + + casc_this_output=`$casc_command mpconftest.c -o mpconftest 2>&1` + + xlc_p=`echo $casc_this_output | grep xlcentry` + if test -n "$xlc_p"; then + casc_this_output=`echo $casc_this_output | sed 's/,/ /g'` + fi + + lmpi_p=`echo $casc_this_output | grep "\-lmpi"` + if test -n "$lmpi_p"; then + casc_lmpi_exists=yes + fi + + casc_mpoutput="$casc_mpoutput $casc_this_output" + casc_this_output= + + done + + rm -rf mpconftest* + + echo "main() {}" > cc_conftest.c + cc_output=`${CC-cc} -v -o cc_conftest cc_conftest.c 2>&1` + xlc_p=`echo $cc_output | grep xlcentry` + if test -n "$xlc_p"; then + casc_compiler_is_xlc=yes + fi + rm -rf cc_conftest* + + if test "$casc_lmpi_exists" = "no"; then + casc_mplibs="-lmpi" + else + casc_mplibs= + fi + + casc_want_arg= + + + for casc_arg in $casc_mpoutput; do + + casc_old_want_arg=$casc_want_arg + casc_want_arg= + + if test -n "$casc_old_want_arg"; then + case "$casc_arg" in + -*) + casc_old_want_arg= + ;; + esac + fi + + case "$casc_old_want_arg" in + '') + case $casc_arg in + /*.a) + exists=false + for f in $casc_flags; do + if test x$casc_arg = x$f; then + exists=true + fi + done + if $exists; then + casc_arg= + else + casc_flags="$casc_flags $casc_arg" + fi + ;; + -binitfini:poe_remote_main) + exists=false + for f in $casc_flags; do + if test x$casc_arg = x$f; then + exists=true + fi + done + if $exists; then + casc_arg= + else + casc_flags="$casc_flags $casc_arg" + fi + ;; + -lang*) + casc_arg= + ;; + -[lLR]) + casc_want_arg=$casc_arg + casc_arg= + ;; + -[lLR]*) + exists=false + for f in $casc_flags; do + if test x$casc_arg = x$f; then + exists=true + fi + done + if $exists; then + casc_arg= + else + casc_flags="$casc_flags $casc_arg" + fi + ;; + -u) + casc_want_arg=$casc_arg + casc_arg= + ;; + -Y) + casc_want_arg=$casc_arg + casc_arg= + ;; + -I) + casc_want_arg=$casc_arg + casc_arg= + ;; + -I*) + exists=false + for f in $casc_flags; do + if test x$casc_arg = x$f; then + exists=true + fi + done + if $exists; then + casc_arg= + else + casc_flags="$casc_flags $casc_arg" + fi + ;; + *) + casc_arg= + ;; + esac + + ;; + -[lLRI]) + casc_arg="casc_old_want_arg $casc_arg" + ;; + -u) + casc_arg="-u $casc_arg" + ;; + -Y) + casc_arg=`echo $casc_arg | sed -e 's%^P,%%'` + SAVE_IFS=$IFS + IFS=: + casc_list= + for casc_elt in $casc_arg; do + casc_list="$casc_list -L$casc_elt" + done + IFS=$SAVE_IFS + casc_arg="$casc_list" + ;; + esac + + if test -n "$casc_arg"; then + case $casc_arg in + -I*) + + if test -z "$MPIINCLUDE"; then + casc_cppflags="$casc_cppflags $casc_arg" + casc_include_dir=`echo "$casc_arg" | sed 's/-I//g'` + + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$casc_cppflags" + + 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:4979: 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:4989: \"$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="$casc_cppflags" +else + echo "$ac_t""no" 1>&6 +fi + + + CPPFLAGS="$SAVE_CPPFLAGS" + + else + casc_arg= + fi + ;; + -[LR]*) + + casc_mplibdirs="$casc_mplibdirs $casc_arg" + ;; + -l* | /*) + + casc_mplibs="$casc_mplibs $casc_arg" + ;; + -binitfini:poe_remote_main) + if test "$casc_compiler_is_xlc" = "yes"; then + casc_mpflags="$casc_mpflags $casc_arg" + fi + ;; + *) + casc_mpflags="$casc_mpflags $casc_arg" + ;; + esac + + LIBS_SAVE=$LIBS + LIBS="$MPIINCLUDE $casc_mpflags $casc_mplibdirs $casc_mplibs" + + if test -n "`echo $LIBS | grep '\-R/'`"; then + LIBS=`echo $LIBS | sed 's/-R\//-R \//'` + fi + + + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + casc_result=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + + LIBS=$LIBS_SAVE + + if test "$casc_result" = yes; then + casc_result= + break + fi + fi + done + + MPILIBS=$casc_mplibs + MPILIBDIRS=$casc_mplibdirs + MPIFLAGS="$MPIFLAGS $casc_mpflags" + + + + if test -n "`echo $MPILIBS | grep pmpich`" && + test -z "`echo $MPILIBS | grep pthread`"; then + 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 + rm -rf conftest* + MPILIBS="$MPILIBS -lpthread" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + LIBS=$LIBS_SAVE + fi + + + + echo "$ac_t""$MPIINCLUDE" 1>&6 + echo $ac_n "checking for MPI library directories""... $ac_c" 1>&6 +echo "configure:5119: 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:5122: 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:5125: checking for other MPI-related flags" >&5 + echo "$ac_t""$MPIFLAGS" 1>&6 + fi + + + if eval "test \"`echo '$''{'casc_cv_mpi_include'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + casc_cv_mpi_include=$MPIINCLUDE +fi + + if eval "test \"`echo '$''{'casc_cv_mpi_lib_dirs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + casc_cv_mpi_lib_dirs=$MPILIBDIRS +fi + + if eval "test \"`echo '$''{'casc_cv_mpi_libs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + casc_cv_mpi_libs=$MPILIBS +fi + + if eval "test \"`echo '$''{'casc_cv_mpi_flags'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + casc_cv_mpi_flags=$MPIFLAGS +fi + + fi + + + + + + + +fi + + + + + +if test "$casc_user_chose_compilers" = "no" +then + casc_opt=yes casc_debug=no casc_both=no @@ -4284,177 +5211,7 @@ fi - - - -if test "$OPTCHOICE" = "g" -then - - for casc_dir in '' /home/casc/include ; do - if test -n "$casc_dir"; then - casc_header=$casc_dir/cegdb.h - else - casc_header=cegdb.h - fi - - ac_safe=`echo "$casc_header" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $casc_header""... $ac_c" 1>&6 -echo "configure:4303: 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:4313: \"$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 - if test -n "$casc_dir"; then - INCLUDES="$INCLUDES -I$casc_dir" - fi - casc_header_found=yes - - # 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 cegdb in -lcegdb""... $ac_c" 1>&6 -echo "configure:4341: 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 -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 - 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 - LDLIBS="$LDLIBS -lcegdb" - casc_lib_found=yes - -else - echo "$ac_t""no" 1>&6 - -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:4385: 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 -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 - 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 - LDLIBDIRS="-L$casc_lib_dir $LDLIBDIRS" - LDLIBS="$LDLIBS -lcegdb" - 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 - - - - - - - break -else - echo "$ac_t""no" 1>&6 -fi - - - done - - - - unset casc_header_found - -fi - @@ -4465,7 +5222,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:4469: checking for main in -lm" >&5 +echo "configure:5226: 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 @@ -4473,14 +5230,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:5241: \"$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 @@ -4505,7 +5262,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:4509: checking for main in -lm" >&5 +echo "configure:5266: 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 @@ -4513,14 +5270,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:5281: \"$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 @@ -4576,6 +5333,10 @@ unset ac_cv_lib_$ac_lib_var + + + + @@ -4761,7 +5522,6 @@ s%@RANLIB@%$RANLIB%g s%@CC@%$CC%g s%@CXX@%$CXX%g s%@F77@%$F77%g -s%@CPP@%$CPP%g s%@COPT@%$COPT%g s%@CDEBUG@%$CDEBUG%g s%@CXXOPT@%$CXXOPT%g @@ -4770,17 +5530,20 @@ s%@FOPT@%$FOPT%g s%@FDEBUG@%$FDEBUG%g s%@CXXCPP@%$CXXCPP%g s%@FPP@%$FPP%g +s%@MPICC@%$MPICC%g +s%@MPIINCLUDE@%$MPIINCLUDE%g +s%@MPILIBDIRS@%$MPILIBDIRS%g +s%@MPILIBS@%$MPILIBS%g +s%@MPIFLAGS@%$MPIFLAGS%g s%@OPTCHOICE@%$OPTCHOICE%g s%@INCLUDES@%$INCLUDES%g s%@LIBDIRS@%$LIBDIRS%g -s%@MPIINCLUDE@%$MPIINCLUDE%g -s%@MPILIBS@%$MPILIBS%g -s%@MPILIBDIRS@%$MPILIBDIRS%g -s%@MPIFLAGS@%$MPIFLAGS%g s%@HYPREDEFS@%$HYPREDEFS%g s%@TIMERDEFS@%$TIMERDEFS%g s%@LDLIBS@%$LDLIBS%g s%@LDLIBDIRS@%$LDLIBDIRS%g +s%@F77FLAGS@%$F77FLAGS%g +s%@PREPEND@%$PREPEND%g CEOF EOF diff --git a/configure.in b/configure.in index af1160399..6f55c857a 100644 --- a/configure.in +++ b/configure.in @@ -49,30 +49,43 @@ unset F77 casc_user_chose_compilers=no casc_user_chose_mpi=no casc_using_pthreads=no -casc_using_purify=no AC_ARG_WITH(CC, - [ --with-CC=ARG manually set C compiler to ARG], + [ --with-CC=ARG manually set C compiler to ARG], CC=$withval casc_user_chose_compilers=yes) AC_ARG_WITH(CXX, - [ --with-CXX=ARG manually set C++ compiler to ARG], + [ --with-CXX=ARG manually set C++ compiler to ARG], CXX=$withval casc_user_chose_compilers=yes) AC_ARG_WITH(F77, - [ --with-f77=ARG manually set f77 compiler to ARG], + [ --with-f77=ARG manually set f77 compiler to ARG], F77=$withval casc_user_chose_compilers=yes) -AC_ARG_WITH(mpi-include, [ --with-mpi-include=DIR mpi.h is in DIR], +AC_ARG_WITH(CFLAGS, + [ --with-CFLAGS=ARG manually set c compiler flags], + CFLAGS=$withval) + +AC_ARG_WITH(CXXFLAGS, + [ --with-CXXFLAGS=ARG manually set c++ compiler flags], + CXXFLAGS=$withval) + +AC_ARG_WITH(F77FLAGS, + [ --with-F77FLAGS=ARG manually set f77 compiler flags], + F77FLAGS=$withval) + + +AC_ARG_WITH(mpi-include, + [ --with-mpi-include=DIR mpi.h is in DIR], for mpi_dir in $withval; do MPIINCLUDE="$MPIINCLUDE -I$withval" done; casc_user_chose_mpi=yes) AC_ARG_WITH(mpi-libs, -[ --with-mpi-libs=LIBS LIBS is space-separated list of library names +[ --with-mpi-libs=LIBS LIBS is space-separated list of library names needed for MPI, e.g. \"nsl socket mpi\"], for mpi_lib in $withval; do MPILIBS="$MPILIBS -l$mpi_lib" @@ -80,34 +93,60 @@ AC_ARG_WITH(mpi-libs, AC_ARG_WITH(mpi-lib-dirs, [ --with-mpi-lib-dirs=DIRS - DIRS is space-separated list of directories + DIRS is space-separated list of directories containing the libraries specified by \`--with-mpi-libs', e.g \"/usr/lib /usr/local/mpi/lib\"], for mpi_lib_dir in $withval; do MPILIBDIRS="-L$mpi_lib_dir $MPILIBDIRS" done; casc_user_chose_mpi=yes) - AC_ARG_WITH(mpi-flags, -[ --with-mpi-flags=FLAGS FLAGS is space-separated list of - whatever flags other than -l and -L are needed - to link with mpi libraries], - MPIFLAGS=$withval) +[ --with-mpi-flags=FLAGS FLAGS is a space seperated list of whatever + flags other than -l and -L are needed to link with + MPI libraries-- Does not de-activate auto search + for other MPI information], + MPIFLAGS=$withval) AC_ARG_WITH(purify, - [ --with-purify use purify-- finds mpi for use with non MPICH compiler], - casc_using_purify=yes - casc_user_chose_compilers=yes - casc_user_chose_mpi=yes - CC=gcc - MPIINCLUDE="$MPIINCLUDE -I/usr/local/mpi/mpich/lib/solaris/ch_p4 -I/usr/local/mpi/mpich/include" - MPILIBS="$MPILIBS -lpmpich -lmpich -lsocket -lnsl -lpthread" - MPILIBDIRS="-L/usr/local/mpi/mpich/lib/solaris/ch_p4 $MPILIBDIRS" - -) + [ --with-purify assign gcc if not already set by user and + prepends "purify" to compile/link line], + if test "$casc_user_chose_compilers" = "no" + then + CC=gcc + CXX=g++ + CFLAGS="$CFLAGS -g" + CXXFLAGS="$CXXFLAGS -g" + casc_user_chose_compilers=yes + fi + PREPEND=purify) + +AC_ARG_WITH(cegdb, + [ --with-cegdb assign gcc and -g and link in -lcegdb and include cegdb.h], + CC=gcc + CXX=g++ + casc_users_chose_compilers=yes + CFLAGS="$CFLAGS -g" + CXXFLAGS="$CXXFLAGS -g" + CASC_CHECK_HEADER(cegdb.h, /home/casc/include, + CASC_ADD_LIB(cegdb, cegdb, /home/casc/lib, LD) + )) + + +AC_ARG_WITH(gdb, + [ --with-gdb assign gcc and -g and link in -lgdb and include + gdb.h], + CC=gcc + CXX=g++ + casc_users_chose_compilers=yes + CFLAGS="$CFLAGS -g" + CXXFLAGS="$CXXFLAGS -g" + CASC_CHECK_HEADER(gdb.h, /usr/local/include /usr/include, + CASC_ADD_LIB(gdb, gdb, /usr/local/lib /usr/lib, LD) + )) + dnl ********************************************************************* dnl * If the user has specified any other command line options (without-MPI, dnl * with-pthreads, with-dmalloc etc.) then this section identifies the @@ -168,6 +207,9 @@ dnl * flags are set as needed. The supported platforms are IRIX, DEC alpha, dnl * sun/solaris, IBM rs6000, Intel ??, and SGI ??. dnl ********************************************************************* +if test -z "$CC" +then + case $HOSTNAME in sasn100 ) @@ -232,7 +274,7 @@ case $HOSTNAME in ;; esac - +fi if test -z "$CC" then @@ -481,6 +523,17 @@ AC_PROG_CPP AC_PROG_CXXCPP CASC_PROG_FPP + +if test "$casc_user_chose_compilers" = "yes" && + test "$casc_using_mpi" = "yes" && + test "$casc_user_chose_mpi" = "no" +then + HYPRE_FIND_MPI +fi + + + + dnl ********************************************************************* dnl * This macro uses the values assigned to CASC_SET_COPT and dnl * CASC_SET_CDEBUG (and C++ and Fortan counterparts) to set either @@ -489,24 +542,11 @@ dnl * on the command line. If neither is selected then all selected dnl * flags remain on. dnl ********************************************************************* -CASC_OPT_DEBUG_CHOICES - - -dnl ********************************************************************* -dnl * When debugging was chosen, look for debugging libraries and headers, -dnl * if they are available. Note that if neither debug or opt is chosen -dnl * or if both debug and opt are chosen OPTCHOICE is set to O. -dnl * adds -l flags to LDLIBS, adds -L flags to LDLIBDIRS, if necessary -dnl ********************************************************************* - -if test "$OPTCHOICE" = "g" +if test "$casc_user_chose_compilers" = "no" then - CASC_CHECK_HEADER(cegdb.h, /home/casc/include, - CASC_ADD_LIB(cegdb, cegdb, /home/casc/lib, LD) - ) + CASC_OPT_DEBUG_CHOICES fi - dnl ********************************************************************* dnl * Add flags to LIBS and LIBDIRS dnl * Note: CASC_ADD_LIB calls should be placed in the order you want the @@ -536,6 +576,10 @@ AC_SUBST(LDLIBS) AC_SUBST(LDLIBDIRS) AC_SUBST(ARCH) AC_SUBST(RANLIB) +AC_SUBST(CFLAGS) +AC_SUBST(CXXFLAGS) +AC_SUBST(F77FLAGS) +AC_SUBST(PREPEND) dnl ********************************************************************* dnl * Use CASC_CONFIG_OUTPUT_LIST with AC_OUTPUT if you want to handle the diff --git a/hypre_macros.m4 b/hypre_macros.m4 index 3325b17ff..bfb81d62c 100644 --- a/hypre_macros.m4 +++ b/hypre_macros.m4 @@ -125,6 +125,475 @@ AC_DEFUN(HYPRE_ADD_LIB, ])dnl +dnl ******************************************************************** +dnl * HYPRE_FIND_MPI will determine the libraries, directories, and other +dnl * flags needed to compile and link programs with MPI function calls. +dnl * This macro runs tests on the script found by the CASC_PROG_MPICC +dnl * macro. If there is no such mpicc-type script in the PATH +dnl * then this macro will not work. +dnl * +dnl * One may question why these settings would need to be determined if +dnl * there already is mpicc available, and that is a valid question. I +dnl * can think of a couple of reasons one may want to use these settings +dnl * rather than using mpicc directly. First, these settings allow you +dnl * to choose the C compiler you wish to use rather than using whatever +dnl * compiler is written into mpicc. Also, the settings determined by +dnl * this macro should also work with C++ and Fortran compilers, so you +dnl * won't need to have mpiCC and mpif77 alongside mpicc. This is +dnl * especially helpful on systems that don't have mpiCC. The advantage +dnl * of this macro over CASC_SET_MPI is that this one doesn't require +dnl * a test of the machine type and thus will hopefully work on unknown +dnl * architectures. The main disadvantage is that it relies on mpicc. +dnl * +dnl * --with-mpi-include, --with-mpi-libs, and --with-mpi-lib-dirs can be +dnl * used to manually override the automatic test, just as with +dnl * CASC_SET_MPI. If any one of these three options are used, the +dnl * automatic test will not be run, so it is best to call all three +dnl * whenever one is called. In addition, the option --with-mpi-flags is +dnl * available here to set any other flags that may be needed, but it +dnl * does not override the automatic test. Flags set by --with-mpi-flags +dnl * will be added to the variable MPIFLAGS. This way, if the macro, for +dnl * whatever reason, leaves off a necessary flag, the flag can be added +dnl * to MPIFLAGS without eliminating anything else. The other variables +dnl * set are MPIINCLUDE, MPILIBS, and MPILIBDIRS, just as in +dnl * CASC_SET_MPI. This macro also incorporates CASC_SET_MPI as a backup +dnl * plan, where if there is no mpicc, it will use the settings +dnl * determined by architecture name in CASC_SET_MPI +dnl ******************************************************************** + +AC_DEFUN(HYPRE_FIND_MPI, +[ + + casc_find_mpi_cache_used=yes + + AC_MSG_CHECKING(for MPI) + AC_CACHE_VAL(casc_cv_mpi_include, casc_find_mpi_cache_used=no) + AC_CACHE_VAL(casc_cv_mpi_libs, casc_find_mpi_cache_used=no) + AC_CACHE_VAL(casc_cv_mpi_lib_dirs, casc_find_mpi_cache_used=no) + AC_CACHE_VAL(casc_cv_mpi_flags, casc_find_mpi_cache_used=no) + AC_MSG_RESULT( ) + + if test "$casc_find_mpi_cache_used" = "yes"; then + AC_MSG_CHECKING(for location of mpi.h) + MPIINCLUDE=$casc_cv_mpi_include + AC_MSG_RESULT("\(cached\) $MPIINCLUDE") + + AC_MSG_CHECKING(for MPI library directories) + MPILIBDIRS=$casc_cv_mpi_lib_dirs + AC_MSG_RESULT("\(cached\) $MPILIBDIRS") + + AC_MSG_CHECKING(for MPI libraries) + MPILIBS=$casc_cv_mpi_libs + AC_MSG_RESULT("\(cached\) $MPILIBS") + + AC_MSG_CHECKING(for other MPI-related flags) + MPIFLAGS=$casc_cv_mpi_flags + AC_MSG_RESULT("\(cached\) $MPIFLAGS") + else + + + dnl * Set up user options. If user uses any of the fist three options, + dnl * then automatic tests are not run. + + casc_user_chose_mpi=no + AC_ARG_WITH(mpi-include, [ --with-mpi-include=DIR mpi.h is in DIR], + for mpi_dir in $withval; do + MPIINCLUDE="$MPIINCLUDE -I$withval" + done; casc_user_chose_mpi=yes) + + AC_ARG_WITH(mpi-libs, +[ --with-mpi-libs=LIBS LIBS is space-separated list of library names + needed for MPI, e.g. \"nsl socket mpi\"], + for mpi_lib in $withval; do + MPILIBS="$MPILIBS -l$mpi_lib" + done; casc_user_chose_mpi=yes) + + + AC_ARG_WITH(mpi-lib-dirs, +[ --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\"], + for mpi_lib_dir in $withval; do + MPILIBDIRS="-L$mpi_lib_dir $MPILIBDIRS" + done; casc_user_chose_mpi=yes) + + dnl * --with-mpi-flags only adds to automatic selections, + dnl * does not override + + AC_ARG_WITH(mpi-flags, +[ --with-mpi-flags=FLAGS FLAGS is space-separated list of whatever flags other + than -l and -L are needed to link with mpi libraries], + MPIFLAGS=$withval) + + AC_CHECK_PROGS(MPICC, mpcc mpicc tmcc hcc) + + if test -z "$MPICC"; then + AC_MSG_WARN([no acceptable mpicc found in \$PATH]) + CASC_SET_MPI + if test -z "$MPILIBS"; then + AC_MSG_WARN([MPI not found - must set manually using --with flags]) + fi + + dnl * When $MPICC is there, run the automatic test + dnl * here begins the hairy stuff + + else + + changequote(, )dnl + + AC_MSG_CHECKING(for location of mpi.h) + + dnl * Create a minimal MPI program. It will be compiled using + dnl * $CC with verbose output. + cat > mpconftest.c << EOF +#include "mpi.h" + +main(int argc, char **argv) +{ + int rank, size; + MPI_Init(&argc, &argv); + MPI_Comm_size(MPI_COMM_WORLD, &size); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Finalize(); + return 0; +} +EOF + + casc_mplibs= + casc_mplibdirs= + casc_flags= + casc_lmpi_exists=no + + dnl * These are various ways to produce verbose output from $MPICC + dnl * All of their outputs are stuffed into variable + dnl * $casc_mpoutput + + for casc_command in "$MPICC -show"\ + "$MPICC -v"\ + "$MPICC -#"\ + "$MPICC"; do + + casc_this_output=`$casc_command mpconftest.c -o mpconftest 2>&1` + + dnl * If $MPICC uses xlc, then commas must be removed from output + xlc_p=`echo $casc_this_output | grep xlcentry` + if test -n "$xlc_p"; then + casc_this_output=`echo $casc_this_output | sed 's/,/ /g'` + fi + + dnl * Turn on flag once -lmpi is found in output + lmpi_p=`echo $casc_this_output | grep "\-lmpi"` + if test -n "$lmpi_p"; then + casc_lmpi_exists=yes + fi + + casc_mpoutput="$casc_mpoutput $casc_this_output" + casc_this_output= + + done + + rm -rf mpconftest* + + dnl * little test to identify $CC as IBM's xlc + echo "main() {}" > cc_conftest.c + cc_output=`${CC-cc} -v -o cc_conftest cc_conftest.c 2>&1` + xlc_p=`echo $cc_output | grep xlcentry` + if test -n "$xlc_p"; then + casc_compiler_is_xlc=yes + fi + rm -rf cc_conftest* + + dnl * $MPICC might not produce '-lmpi', but we still need it. + dnl * Add -lmpi to $casc_mplibs if it was never found + if test "$casc_lmpi_exists" = "no"; then + casc_mplibs="-lmpi" + else + casc_mplibs= + fi + + casc_want_arg= + + dnl * Loop through every word in output to find possible flags. + dnl * If the word is the absolute path of a library, it is added + dnl * to $casc_flags. Any "-llib", "-L/dir", "-R/dir" and + dnl * "-I/dir" is kept. If '-l', '-L', '-R', '-I', '-u', or '-Y' + dnl * appears alone, then the next word is checked. If the next + dnl * word is another flag beginning with '-', then the first + dnl * word is discarded. If the next word is anything else, then + dnl * the two words are coupled in the $casc_arg variable. + dnl * "-binitfini:poe_remote_main" is a flag needed especially + dnl * for IBM MPI, and it is always kept if it is found. + dnl * Any other word is discarded. Also, after a word is found + dnl * and kept once, it is discarded if it appears again + + for casc_arg in $casc_mpoutput; do + + casc_old_want_arg=$casc_want_arg + casc_want_arg= + + if test -n "$casc_old_want_arg"; then + case "$casc_arg" in + -*) + casc_old_want_arg= + ;; + esac + fi + + case "$casc_old_want_arg" in + '') + case $casc_arg in + /*.a) + exists=false + for f in $casc_flags; do + if test x$casc_arg = x$f; then + exists=true + fi + done + if $exists; then + casc_arg= + else + casc_flags="$casc_flags $casc_arg" + fi + ;; + -binitfini:poe_remote_main) + exists=false + for f in $casc_flags; do + if test x$casc_arg = x$f; then + exists=true + fi + done + if $exists; then + casc_arg= + else + casc_flags="$casc_flags $casc_arg" + fi + ;; + -lang*) + casc_arg= + ;; + -[lLR]) + casc_want_arg=$casc_arg + casc_arg= + ;; + -[lLR]*) + exists=false + for f in $casc_flags; do + if test x$casc_arg = x$f; then + exists=true + fi + done + if $exists; then + casc_arg= + else + casc_flags="$casc_flags $casc_arg" + fi + ;; + -u) + casc_want_arg=$casc_arg + casc_arg= + ;; + -Y) + casc_want_arg=$casc_arg + casc_arg= + ;; + -I) + casc_want_arg=$casc_arg + casc_arg= + ;; + -I*) + exists=false + for f in $casc_flags; do + if test x$casc_arg = x$f; then + exists=true + fi + done + if $exists; then + casc_arg= + else + casc_flags="$casc_flags $casc_arg" + fi + ;; + *) + casc_arg= + ;; + esac + + ;; + -[lLRI]) + casc_arg="casc_old_want_arg $casc_arg" + ;; + -u) + casc_arg="-u $casc_arg" + ;; + -Y) + casc_arg=`echo $casc_arg | sed -e 's%^P,%%'` + SAVE_IFS=$IFS + IFS=: + casc_list= + for casc_elt in $casc_arg; do + casc_list="$casc_list -L$casc_elt" + done + IFS=$SAVE_IFS + casc_arg="$casc_list" + ;; + esac + + dnl * Still inside the big for loop, we separate each flag + dnl * into includes, libdirs, libs, flags + if test -n "$casc_arg"; then + case $casc_arg in + -I*) + + dnl * if the directory given in this flag contains mpi.h + dnl * then the flag is assigned to $MPIINCLUDE + if test -z "$MPIINCLUDE"; then + casc_cppflags="$casc_cppflags $casc_arg" + casc_include_dir=`echo "$casc_arg" | sed 's/-I//g'` + + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$casc_cppflags" + changequote([, ])dnl + + unset ac_cv_header_mpi_h + AC_CHECK_HEADER(mpi.h, + MPIINCLUDE="$casc_cppflags") + + changequote(, )dnl + CPPFLAGS="$SAVE_CPPFLAGS" + + else + casc_arg= + fi + ;; + -[LR]*) + + dnl * These are the lib directory flags + casc_mplibdirs="$casc_mplibdirs $casc_arg" + ;; + -l* | /*) + + dnl * These are the libraries + casc_mplibs="$casc_mplibs $casc_arg" + ;; + -binitfini:poe_remote_main) + if test "$casc_compiler_is_xlc" = "yes"; then + casc_mpflags="$casc_mpflags $casc_arg" + fi + ;; + *) + dnl * any other flag that has been kept goes here + casc_mpflags="$casc_mpflags $casc_arg" + ;; + esac + + dnl * Upcoming test needs $LIBS to contain the flags + dnl * we've found + LIBS_SAVE=$LIBS + LIBS="$MPIINCLUDE $casc_mpflags $casc_mplibdirs $casc_mplibs" + + if test -n "`echo $LIBS | grep '\-R/'`"; then + LIBS=`echo $LIBS | sed 's/-R\//-R \//'` + fi + + changequote([, ])dnl + + + dnl * Test to see if flags found up to this point are + dnl * sufficient to compile and link test program. If not, + dnl * the loop keeps going to the next word + AC_TRY_LINK( + ifelse(AC_LANG, CPLUSPLUS, + +[#ifdef __cplusplus +extern "C" +#endif +])dnl +[#include "mpi.h" +], [int rank, size; + int argc; + char **argv; + MPI_Init(&argc, &argv); + MPI_Comm_size(MPI_COMM_WORLD, &size); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Finalize(); +], + casc_result=yes) + + LIBS=$LIBS_SAVE + + if test "$casc_result" = yes; then + casc_result= + break + fi + fi + done + + dnl * After loop is done, set variables to be substituted + MPILIBS=$casc_mplibs + MPILIBDIRS=$casc_mplibdirs + MPIFLAGS="$MPIFLAGS $casc_mpflags" + + dnl * IBM MPI uses /usr/lpp/ppe.poe/libc.a instead of /lib/libc.a + dnl * so we need to make sure that -L/lib is not part of the + dnl * linking line when we use IBM MPI. This only appears in + dnl * configure when CASC_FIND_MPI is called first. + ifdef([AC_PROVIDE_CASC_FIND_F77LIBS], + if test -n "`echo $F77LIBFLAGS | grep '\-L/lib '`"; then + if test -n "`echo $F77LIBFLAGS | grep xlf`"; then + F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/-L\/lib //g'` + fi + fi + ) + + if test -n "`echo $MPILIBS | grep pmpich`" && + test -z "`echo $MPILIBS | grep pthread`"; then + LIBS_SAVE=$LIBS + LIBS="$MPIINCLUDE $MPIFLAGS $MPILIBDIRS $MPILIBS -lpthread" + AC_TRY_LINK( + ifelse(AC_LANG, CPLUSPLUS, + +[#ifdef __cplusplus +extern "C" +#endif +])dnl +[#include "mpi.h" +], [int rank, size; + int argc; + char **argv; + MPI_Init(&argc, &argv); + MPI_Comm_size(MPI_COMM_WORLD, &size); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Finalize(); +], + MPILIBS="$MPILIBS -lpthread") + LIBS=$LIBS_SAVE + fi + + + + AC_MSG_RESULT($MPIINCLUDE) + AC_MSG_CHECKING(for MPI library directories) + AC_MSG_RESULT($MPILIBDIRS) + AC_MSG_CHECKING(for MPI libraries) + AC_MSG_RESULT($MPILIBS) + AC_MSG_CHECKING(for other MPI-related flags) + AC_MSG_RESULT($MPIFLAGS) + fi + + + AC_CACHE_VAL(casc_cv_mpi_include, casc_cv_mpi_include=$MPIINCLUDE) + AC_CACHE_VAL(casc_cv_mpi_lib_dirs, casc_cv_mpi_lib_dirs=$MPILIBDIRS) + AC_CACHE_VAL(casc_cv_mpi_libs, casc_cv_mpi_libs=$MPILIBS) + AC_CACHE_VAL(casc_cv_mpi_flags, casc_cv_mpi_flags=$MPIFLAGS) + fi + + AC_SUBST(MPIINCLUDE) + AC_SUBST(MPILIBDIRS) + AC_SUBST(MPILIBS) + AC_SUBST(MPIFLAGS) + +])dnl