#! /bin/sh /usr/share/dpatch/dpatch-run ## 13_upstream_patchlevel1.dpatch by Adam Powell ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Converted .diff.gz patch level 1 stuff into a .dpatch file. if [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 fi case "$1" in -patch) patch -f --no-backup-if-mismatch -p1 < $0;; -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1;; esac exit 0 --- mpich-1.2.7.orig/KnownBugs +++ mpich-1.2.7/KnownBugs @@ -1,6 +1,6 @@ This is a partial list of the known bugs and problems in MPICH. -Current as of Release 1.2.6 +Current as of Release 1.2.7 General: ======== --- mpich-1.2.7.orig/Makefile.in +++ mpich-1.2.7/Makefile.in @@ -20,7 +20,6 @@ FMPILIBNAME = f@MPILIBNAME@ AR = @AR@ -ARCMD = @ARNAME@ RANLIB = @RANLIB@ ### End User configurable options ### @@ -195,21 +194,35 @@ for lib in lib${MPILIBNAME}.a libp${MPILIBNAME}.a \ lib${FMPILIBNAME}.a ; do \ if [ -s $$lib ] ; then \ - ${top_srcdir}/util/makesharedlib -exceptobjs="farg.o farg90.o initf.o" -lib=$$lib -kind=@SHAREDKIND@ ; \ + ${top_srcdir}/util/makesharedlib -exceptobjs="farg.o _farg.o farg90.o _farg90.o initf.o _initf.o" \ + -lib=$$lib -kind=@SHAREDKIND@ ; \ fi ; \ done ; \ if [ $(NOF77) = 0 ] ; then \ if [ "@FLIBNAME@" != "@MPILIBNAME@" ] ; then \ - ${top_srcdir}/util/makesharedlib -exceptobjs="farg.o farg90.o initf.o" -lib=lib@FLIBNAME@.a -kind=@SHAREDKIND@ ; \ - ${ARCMD} x lib@FLIBNAME@.a farg.o initf.o 2>/dev/null ; \ - ${AR} lib@FLIBNAME@farg.a farg.o initf.o ; \ + ${top_srcdir}/util/makesharedlib -exceptobjs="farg.o _farg.o farg90.o _farg90.o initf.o _initf.o" \ + -lib=lib@FLIBNAME@.a -kind=@SHAREDKIND@ ; \ + ${AR} x lib@FLIBNAME@.a farg.o initf.o 2>/dev/null ; \ + ${AR} cr lib@FLIBNAME@farg.a farg.o initf.o ; \ rm -f farg.o initf.o ; \ + if test "@HAS_WEAK_SYMBOLS@" = 0 ; then \ + ${AR} x libp${MPILIBNAME}.a _initf.o 2>/dev/null ; \ + ${AR} cr lib@FLIBNAME@farg.a _initf.o ; \ + rm -f _initf.o ; \ + fi; \ else \ - ${ARCMD} x lib${MPILIBNAME}.a farg.o initf.o 2>/dev/null ; \ + ${AR} x lib${MPILIBNAME}.a farg.o initf.o 2>/dev/null ; \ if [ -s farg.o -a -s initf.o ] ; then \ - ${AR} lib${MPILIBNAME}farg.a farg.o initf.o ; \ + ${AR} cr lib${MPILIBNAME}farg.a farg.o initf.o ; \ rm -f farg.o initf.o ; \ fi ;\ + if test "@HAS_WEAK_SYMBOLS@" = 0 ; then \ + ${AR} x libp${MPILIBNAME}.a _initf.o 2>/dev/null ; \ + if test -s _initf.o ; then \ + ${AR} cr lib@FLIBNAME@farg.a _initf.o ; \ + rm -f _initf.o ; \ + fi; \ + fi; \ fi ; \ fi ; \ ) @@ -347,6 +360,7 @@ CXXFLAGS="" ; export CXXFLAGS ; \ CXX="g++" ; export CXX ; \ CC="@CC@" ; export CC ; \ + AR="$(ARCMD)" ; export AR ; \ ldir=`echo $(libdir) | sed -e 's%$(MPIR_HOME)/%%g'` ; \ if ${top_srcdir}/${CPP_DIR}/configure --with-mpich=.. \ --with-libopt=" " \ @@ -574,7 +588,7 @@ (cd util && rm -f chkmachine chkserv Makefile ) ; \ (cd util/machines && \ rm -f machines.IRIX* machines.sun* machines.solaris* \ - machines.cray* machines.CRAY* machines.LINUX machines.rs6000 \ + machines.cray* machines.CRAY* machines.LINUX machines.rs600 \ machines.alpha machines.hp* ) ; fi -rm -f util/mympiinstall* util/mpichlib.conf -if [ -d mpid/server -a -s mpid/server/Makefile ] ; then \ --- mpich-1.2.7.orig/README +++ mpich-1.2.7/README @@ -1,15 +1,17 @@ Portable MPI Model Implementation - Version 1.2.7, June, 2005 + Version 1.2.7p1, November, 2005 David Ashton Anthony Chan Bill Gropp Rob Latham Rusty Lusk + Neill Miller Rob Ross Rajeev Thakur + Brian Toonen Mathematics and Computer Science Division Argonne National Laboratory @@ -21,8 +23,7 @@ area of parallel I/O. This is only a bug fix release. All new work is in MPICH2, available at -www.mcs.anl.gov/mpi/mpich2 . In fact, this may be the last release -of MPICH1. +www.mcs.anl.gov/mpi/mpich2 . The installation and user's manuals have been combined as of the 1.2.3. release; in addition, device-specific versions are available, @@ -60,6 +61,8 @@ Systems on which we test frequently and which MPICH is known to run include Linux for IA32 (several flavors) +Linux for IA64 +Linux for Alpha Solaris (both 32 bit and 64 bit) MPICH has also been built on @@ -154,9 +157,7 @@ Reporting Bugs: -If you have trouble, first try MPICH2 (www.mcs.anl.gov/mpi/mpich2) . - -If you need to use MPICH1, check the installation and user manuals (in +If you have trouble, first check the installation and user manuals (in mpich/doc/) . Next, check the on-line bug list at http://www.mcs.anl.gov/mpi/mpich . Finally, if you are still having problems, send --- mpich-1.2.7.orig/aclocal.m4 +++ mpich-1.2.7/aclocal.m4 @@ -1712,9 +1712,9 @@ if test -z "$USERAR" ; then case $1 in intelnx|paragon|i860) AR="ar860 crl" ; ARNAME="ar860" ; ARARGS="crl" ;; - cm5) AR="ar cr" ; ARNAME="ar" ; ARARGS="cr" + cm5) AR="ar" ; ARNAME="ar" ; ARARGS="cr" ;; - meiko|solaris) AR="ar cr" ; ARNAME="ar" ; ARARGS="cr" + meiko|solaris) AR="ar" ; ARNAME="ar" ; ARARGS="cr" ;; ncube) AR="nar cr" ; ARNAME="nar" ; ARARGS="cr" ;; *) @@ -1725,7 +1725,7 @@ ARNAME="ar" fi if test -z "$AR" ; then - AR="$ARNAME cr$ARLOCAL" ; ARARGS="cr$ARLOCAL" + AR="$ARNAME" ; ARARGS="cr$ARLOCAL" fi ])dnl dnl -------------------------------------------------------- @@ -2590,7 +2590,7 @@ AC_MSG_RESULT(no) print_error "Error in creating test object for ranlib!" else - arcmd='$AR foo.a conftest.o >conftest.out 2>&1' + arcmd='$AR cr foo.a conftest.o >conftest.out 2>&1' eval $arcmd ranlibtest='$RANLIB foo.a >>conftest.out 2>&1' if eval $ranlibtest ; then @@ -2662,7 +2662,7 @@ dnl Build the library compileonly='${CC-cc} -c $CFLAGS conftest1.c >conftest.out 2>&1' if eval $compileonly ; then - arcmd='$AR libfoo.a conftest1.o >conftest.out 2>&1' + arcmd='$AR cr libfoo.a conftest1.o >conftest.out 2>&1' eval $arcmd ranlibtest='$RANLIB libfoo.a >>conftest.out 2>&1' if eval $ranlibtest ; then --- mpich-1.2.7.orig/buildmsg +++ mpich-1.2.7/buildmsg @@ -10,7 +10,7 @@ romio-maint@mcs.anl.gov With any bug report, please send - The version of MPICH (e.g., 1.2.6) + The version of MPICH (e.g., 1.2.7) The output of running your program with the -mpiversion argument (e.g., mpirun -np 1 a.out -mpiversion) --- mpich-1.2.7.orig/configure +++ mpich-1.2.7/configure @@ -1889,6 +1889,71 @@ # we've identified the proper compiler etc, we'll try this # ranlib below; if it fails, we'll replace it with ':' # +# Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +if test -z "$ac_echo_n" ; then +ac_echo_n=yes +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi +ac_echo_test=`echo foo 1>&1` +if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." +fi + +fi +if test -z "$ac_echo_test" -a 1 = 1 ; then +echo $ac_n "checking for $ac_word""... $ac_c" +else +echo $ac_n "checking for $ac_word""... $ac_c" 1>&1 +fi +ac_prog_where="" +if test -n "$AR"; then + ac_pg_AR="$AR" # Let the user override the test. +else + ac_first_char=`expr "ar" : "\(.\)"` + # Use ac_word instead of ar in case the command has options on it. + if test "$ac_first_char" = "/" -a -x "$ac_word" ; then + ac_pg_AR="" + ac_prog_where=ar + else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_pg_AR="" + ac_prog_where=$ac_dir/$ac_word + break + fi + done + IFS="$ac_save_ifs" + fi +fi;AR="$ac_pg_AR" +if test -n "$ac_prog_where" ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then +echo "$ac_t""found $ac_prog_where ($AR)" +else +echo "$ac_t""found $ac_prog_where ($AR)" 1>&1 +fi + +else + if test -z "$ac_echo_test" -a 1 = 1 ; then +echo "$ac_t""no" +else +echo "$ac_t""no" 1>&1 +fi +fi + if test -z "$RANLIB" ; then if test -z "$RANLIB"; then # Extract the first word of `ranlib', so it can be a program name with args. @@ -1912,8 +1977,8 @@ # Problem: Using the ar_local option can cause low performance; not using it # can cause failures. Should we try to get disk space, and pick default # based on a guess about the available space? -AR="ar cr$AR_LOCAL" -ARCMD="ar" +# Back when systems had small disks, we let AR be "ar crl" where "l" +# was defined as "local" (don't use /tmp for intermediate files) # CPRP is the version of cp that accepts -r and -p arguments. # See CRAY below CPRP="cp" @@ -5389,9 +5454,9 @@ if test -z "$USERAR" ; then case $CARCH in intelnx|paragon|i860) AR="ar860 crl" ; ARNAME="ar860" ; ARARGS="crl" ;; - cm5) AR="ar cr" ; ARNAME="ar" ; ARARGS="cr" + cm5) AR="ar" ; ARNAME="ar" ; ARARGS="cr" ;; - meiko|solaris) AR="ar cr" ; ARNAME="ar" ; ARARGS="cr" + meiko|solaris) AR="ar" ; ARNAME="ar" ; ARARGS="cr" ;; ncube) AR="nar cr" ; ARNAME="nar" ; ARARGS="cr" ;; *) @@ -5478,10 +5543,9 @@ ARNAME="ar" fi if test -z "$AR" ; then - AR="$ARNAME cr$ARLOCAL" ; ARARGS="cr$ARLOCAL" + AR="$ARNAME" ; ARARGS="cr$ARLOCAL" fi - # # Check to see if the compilers work at all (you'd be surprised!) if test -z "$ac_echo_n" ; then @@ -13692,7 +13756,7 @@ fi print_error "Error in creating test object for ranlib!" else - arcmd='$AR foo.a conftest.o >conftest.out 2>&1' + arcmd='$AR cr foo.a conftest.o >conftest.out 2>&1' eval $arcmd ranlibtest='$RANLIB foo.a >>conftest.out 2>&1' if eval $ranlibtest ; then @@ -13794,7 +13858,7 @@ fi compileonly='${CC-cc} -c $CFLAGS conftest1.c >conftest.out 2>&1' if eval $compileonly ; then - arcmd='$AR libfoo.a conftest1.o >conftest.out 2>&1' + arcmd='$AR cr libfoo.a conftest1.o >conftest.out 2>&1' eval $arcmd ranlibtest='$RANLIB libfoo.a >>conftest.out 2>&1' if eval $ranlibtest ; then @@ -13831,6 +13895,9 @@ # path) # Remove any arguments from the string AR ARTEST=`expr "$AR" : "\(.*\) "` +if test -z "$ARTEST" ; then + ARTEST=$AR +fi # Extract the first word of "$ARTEST", so it can be a program name with args. set dummy $ARTEST; ac_word=$2 if test -z "$ac_echo_n" ; then @@ -16164,9 +16231,9 @@ ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.c -o conftest $LIBS 1>&2 2>&2' fi if eval $ac_compile ; then - # Create the library (AR includes the cr options) + # Create the library rm -f lib$MPILIBNAME.a - ${AR} lib$MPILIBNAME.a conftest.o + ${AR} cr lib$MPILIBNAME.a conftest.o ${RANLIB} lib$MPILIBNAME.a rm -f conftest* # create the main program @@ -16844,7 +16911,6 @@ includebuild_dir='$includebuild_dir' sysconfdir='$sysconfdir' GXXTRIAL='$GXXTRIAL' -ARNAME='$ARNAME' HAVE_NO_C_CONST='$HAVE_NO_C_CONST' EXEEXT='$EXEEXT' CPP='$CPP' @@ -16981,7 +17047,7 @@ echo creating $file rm -f $file echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file -cat $top_srcdir/${file}.in | sed -e " + sed -e " $prsub $extrasub s%@CASE_SENSITIVE@%$CASE_SENSITIVE%g @@ -17015,7 +17081,6 @@ s%@includebuild_dir@%$includebuild_dir%g s%@sysconfdir@%$sysconfdir%g s%@GXXTRIAL@%$GXXTRIAL%g -s%@ARNAME@%$ARNAME%g s%@HAVE_NO_C_CONST@%$HAVE_NO_C_CONST%g s%@EXEEXT@%$EXEEXT%g s%@CPP@%$CPP%g @@ -17023,7 +17088,7 @@ s%@CXXENABLE@%$CXXENABLE%g s%@CC_SHARED_OPT@%$CC_SHARED_OPT%g s%@CC_SHARED_OPT_FOR_TV@%$CC_SHARED_OPT_FOR_TV%g -s%@CXXFLAGS_FOR_SHARED@%$CXXFLAGS_FOR_SHARED%g" | sed -e " +s%@CXXFLAGS_FOR_SHARED@%$CXXFLAGS_FOR_SHARED%g s%@SHAREDKIND@%$SHAREDKIND%g s%@SHAREDKIND_FOR_TV@%$SHAREDKIND_FOR_TV%g s%@MPI_STATUS_SIZE@%$MPI_STATUS_SIZE%g @@ -17065,7 +17130,7 @@ s%@DEFAULT_MACHINE@%$DEFAULT_MACHINE%g s%@DEVCFLAGS@%$DEVCFLAGS%g s%@DEVCFILES@%$DEVCFILES%g -s%@DEVOFILES@%$DEVOFILES%g" | sed -e " +s%@DEVOFILES@%$DEVOFILES%g s%@DEV_DEFS@%$DEV_DEFS%g s%@DEVICE@%$DEVICE%g s%@DEVICE_MAKE_INCLUDE@%$DEVICE_MAKE_INCLUDE%g @@ -17107,7 +17172,7 @@ s%@NEWTESTDIRS@%$NEWTESTDIRS%g s%@OPTFLAGS@%$OPTFLAGS%g s%@OPTFLAGSC@%$OPTFLAGSC%g -s%@OPTFLAGSF@%$OPTFLAGSF%g" | sed -e " +s%@OPTFLAGSF@%$OPTFLAGSF%g s%@P4_ARCH@%$P4_ARCH%g s%@P4_DIR@%$P4_DIR%g s%@RHS_COMMAND@%$RHS_COMMAND%g @@ -17126,7 +17191,7 @@ s%@MPE_OPTS@%$MPE_OPTS%g s%@MPI_INTRA@%$MPI_INTRA%g s%@LIBS@%$LIBS%g -s%@DEFS@%-DHAVE_CONFIG_H%" >> $file +s%@DEFS@%-DHAVE_CONFIG_H%" $top_srcdir/${file}.in >> $file fi; done CONFIG_HEADERS=${CONFIG_HEADERS-"mpichconf.h"} --- mpich-1.2.7.orig/configure.in +++ mpich-1.2.7/configure.in @@ -1564,6 +1564,7 @@ # we've identified the proper compiler etc, we'll try this # ranlib below; if it fails, we'll replace it with ':' # +PAC_PROGRAM_CHECK(AR,ar) if test -z "$RANLIB" ; then AC_PROG_RANLIB fi @@ -1571,8 +1572,8 @@ # Problem: Using the ar_local option can cause low performance; not using it # can cause failures. Should we try to get disk space, and pick default # based on a guess about the available space? -AR="ar cr$AR_LOCAL" -ARCMD="ar" +# Back when systems had small disks, we let AR be "ar crl" where "l" +# was defined as "local" (don't use /tmp for intermediate files) # CPRP is the version of cp that accepts -r and -p arguments. # See CRAY below CPRP="cp" @@ -1993,7 +1994,6 @@ fi # PAC_GET_AR($CARCH) -AC_SUBST(ARNAME) # # Check to see if the compilers work at all (you'd be surprised!) AC_COMPILE_CHECK([whether compiler works],,,compile_check=yes,compile_check=no) @@ -3210,6 +3210,9 @@ # path) # Remove any arguments from the string AR ARTEST=`expr "$AR" : "\(.*\) "` +if test -z "$ARTEST" ; then + ARTEST=$AR +fi PAC_PROGRAM_CHECK(ARFOUND,$ARTEST,1,,ARLOC) if test -z "$ARLOC" ; then # Check for /usr/ccs/bin/ar ; Solaris likes to hide anything remotely @@ -3503,9 +3506,9 @@ ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.c -o conftest $LIBS 1>&AC_FD_CC 2>&AC_FD_CC' fi if eval $ac_compile ; then - # Create the library (AR includes the cr options) + # Create the library rm -f lib$MPILIBNAME.a - ${AR} lib$MPILIBNAME.a conftest.o + ${AR} cr lib$MPILIBNAME.a conftest.o ${RANLIB} lib$MPILIBNAME.a rm -f conftest* # create the main program --- mpich-1.2.7.orig/www.index +++ mpich-1.2.7/www.index @@ -26,11 +26,11 @@ man:+MPI_Sendrecv_replace++MPI_Sendrecv_replace++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Sendrecv_replace.html#MPI_Sendrecv_replace man:+MPI_Ssend++MPI_Ssend++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Ssend.html#MPI_Ssend man:+MPI_Ssend_init++MPI_Ssend_init++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Ssend_init.html#MPI_Ssend_init -man:+MPI_Start++MPI_Start++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Start.html#MPI_Start man:+MPI_Startall++MPI_Startall++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Startall.html#MPI_Startall -man:+MPI_Test++MPI_Test++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Test.html#MPI_Test +man:+MPI_Start++MPI_Start++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Start.html#MPI_Start man:+MPI_Testall++MPI_Testall++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Testall.html#MPI_Testall man:+MPI_Testany++MPI_Testany++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Testany.html#MPI_Testany +man:+MPI_Test++MPI_Test++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Test.html#MPI_Test man:+MPI_Test_cancelled++MPI_Test_cancelled++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Test_cancelled.html#MPI_Test_cancelled man:+MPI_Testsome++MPI_Testsome++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Testsome.html#MPI_Testsome man:+MPI_Type_commit++MPI_Type_commit++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Type_commit.html#MPI_Type_commit @@ -46,9 +46,9 @@ man:+MPI_Type_ub++MPI_Type_ub++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Type_ub.html#MPI_Type_ub man:+MPI_Type_vector++MPI_Type_vector++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Type_vector.html#MPI_Type_vector man:+MPI_Unpack++MPI_Unpack++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Unpack.html#MPI_Unpack -man:+MPI_Wait++MPI_Wait++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Wait.html#MPI_Wait man:+MPI_Waitall++MPI_Waitall++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Waitall.html#MPI_Waitall man:+MPI_Waitany++MPI_Waitany++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Waitany.html#MPI_Waitany +man:+MPI_Wait++MPI_Wait++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Wait.html#MPI_Wait man:+MPI_Waitsome++MPI_Waitsome++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Waitsome.html#MPI_Waitsome man:+MPI_Abort++MPI_Abort++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Abort.html#MPI_Abort man:+MPI_Error_class++MPI_Error_class++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Error_class.html#MPI_Error_class @@ -69,6 +69,7 @@ man:+MPI_Attr_delete++MPI_Attr_delete++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Attr_delete.html#MPI_Attr_delete man:+MPI_Attr_get++MPI_Attr_get++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Attr_get.html#MPI_Attr_get man:+MPI_Attr_put++MPI_Attr_put++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Attr_put.html#MPI_Attr_put +man:+MPI_Comm_compare++MPI_Comm_compare++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Comm_compare.html#MPI_Comm_compare man:+MPI_Comm_create++MPI_Comm_create++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Comm_create.html#MPI_Comm_create man:+MPI_Comm_dup++MPI_Comm_dup++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Comm_dup.html#MPI_Comm_dup man:+MPI_Comm_free++MPI_Comm_free++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Comm_free.html#MPI_Comm_free @@ -81,8 +82,8 @@ man:+MPI_Comm_size++MPI_Comm_size++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Comm_size.html#MPI_Comm_size man:+MPI_Comm_split++MPI_Comm_split++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Comm_split.html#MPI_Comm_split man:+MPI_Comm_test_inter++MPI_Comm_test_inter++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Comm_test_inter.html#MPI_Comm_test_inter -man:+MPI_Comm_compare++MPI_Comm_compare++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Comm_compare.html#MPI_Comm_compare man:+MPI_DUP_FN++MPI_DUP_FN++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_DUP_FN.html#MPI_DUP_FN +man:+MPI_Group_compare++MPI_Group_compare++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Group_compare.html#MPI_Group_compare man:+MPI_Group_difference++MPI_Group_difference++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Group_difference.html#MPI_Group_difference man:+MPI_Group_excl++MPI_Group_excl++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Group_excl.html#MPI_Group_excl man:+MPI_Group_free++MPI_Group_free++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Group_free.html#MPI_Group_free @@ -94,11 +95,10 @@ man:+MPI_Group_size++MPI_Group_size++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Group_size.html#MPI_Group_size man:+MPI_Group_translate_ranks++MPI_Group_translate_ranks++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Group_translate_ranks.html#MPI_Group_translate_ranks man:+MPI_Group_union++MPI_Group_union++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Group_union.html#MPI_Group_union -man:+MPI_Group_compare++MPI_Group_compare++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Group_compare.html#MPI_Group_compare man:+MPI_Intercomm_create++MPI_Intercomm_create++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Intercomm_create.html#MPI_Intercomm_create man:+MPI_Intercomm_merge++MPI_Intercomm_merge++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Intercomm_merge.html#MPI_Intercomm_merge -man:+MPI_Keyval_free++MPI_Keyval_free++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Keyval_free.html#MPI_Keyval_free man:+MPI_Keyval_create++MPI_Keyval_create++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Keyval_create.html#MPI_Keyval_create +man:+MPI_Keyval_free++MPI_Keyval_free++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Keyval_free.html#MPI_Keyval_free man:+MPI_NULL_COPY_FN++MPI_NULL_COPY_FN++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_NULL_COPY_FN.html#MPI_NULL_COPY_FN man:+MPI_NULL_DELETE_FN++MPI_NULL_DELETE_FN++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_NULL_DELETE_FN.html#MPI_NULL_DELETE_FN man:+MPI_Allgather++MPI_Allgather++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Allgather.html#MPI_Allgather @@ -119,18 +119,18 @@ man:+MPI_Scatterv++MPI_Scatterv++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Scatterv.html#MPI_Scatterv man:+MPI_Cart_coords++MPI_Cart_coords++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Cart_coords.html#MPI_Cart_coords man:+MPI_Cart_create++MPI_Cart_create++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Cart_create.html#MPI_Cart_create +man:+MPI_Cartdim_get++MPI_Cartdim_get++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Cartdim_get.html#MPI_Cartdim_get man:+MPI_Cart_get++MPI_Cart_get++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Cart_get.html#MPI_Cart_get man:+MPI_Cart_map++MPI_Cart_map++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Cart_map.html#MPI_Cart_map man:+MPI_Cart_rank++MPI_Cart_rank++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Cart_rank.html#MPI_Cart_rank man:+MPI_Cart_shift++MPI_Cart_shift++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Cart_shift.html#MPI_Cart_shift man:+MPI_Cart_sub++MPI_Cart_sub++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Cart_sub.html#MPI_Cart_sub -man:+MPI_Cartdim_get++MPI_Cartdim_get++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Cartdim_get.html#MPI_Cartdim_get man:+MPI_Dims_create++MPI_Dims_create++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Dims_create.html#MPI_Dims_create +man:+MPI_Graph_create++MPI_Graph_create++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Graph_create.html#MPI_Graph_create +man:+MPI_Graphdims_get++MPI_Graphdims_get++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Graphdims_get.html#MPI_Graphdims_get man:+MPI_Graph_get++MPI_Graph_get++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Graph_get.html#MPI_Graph_get man:+MPI_Graph_map++MPI_Graph_map++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Graph_map.html#MPI_Graph_map man:+MPI_Graph_neighbors++MPI_Graph_neighbors++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Graph_neighbors.html#MPI_Graph_neighbors -man:+MPI_Graph_create++MPI_Graph_create++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Graph_create.html#MPI_Graph_create -man:+MPI_Graphdims_get++MPI_Graphdims_get++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Graphdims_get.html#MPI_Graphdims_get man:+MPI_Graph_neighbors_count++MPI_Graph_neighbors_count++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Graph_neighbors_count.html#MPI_Graph_neighbors_count man:+MPI_Topo_test++MPI_Topo_test++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Topo_test.html#MPI_Topo_test man:+MPI_Pcontrol++MPI_Pcontrol++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Pcontrol.html#MPI_Pcontrol @@ -154,24 +154,24 @@ man:+MPIO_Request_f2c++MPIO_Request_f2c++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPIO_Request_f2c.html#MPIO_Request_f2c man:+MPIO_Test++MPIO_Test++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPIO_Test.html#MPIO_Test man:+MPIO_Wait++MPIO_Wait++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPIO_Wait.html#MPIO_Wait -man:+MPI_File_iread++MPI_File_iread++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_iread.html#MPI_File_iread man:+MPI_File_iread_at++MPI_File_iread_at++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_iread_at.html#MPI_File_iread_at +man:+MPI_File_iread++MPI_File_iread++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_iread.html#MPI_File_iread man:+MPI_File_iread_shared++MPI_File_iread_shared++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_iread_shared.html#MPI_File_iread_shared -man:+MPI_File_iwrite++MPI_File_iwrite++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_iwrite.html#MPI_File_iwrite man:+MPI_File_iwrite_at++MPI_File_iwrite_at++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_iwrite_at.html#MPI_File_iwrite_at +man:+MPI_File_iwrite++MPI_File_iwrite++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_iwrite.html#MPI_File_iwrite man:+MPI_File_iwrite_shared++MPI_File_iwrite_shared++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_iwrite_shared.html#MPI_File_iwrite_shared man:+MPI_File_open++MPI_File_open++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_open.html#MPI_File_open man:+MPI_File_preallocate++MPI_File_preallocate++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_preallocate.html#MPI_File_preallocate man:+MPI_File_read_at_all_begin++MPI_File_read_at_all_begin++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_at_all_begin.html#MPI_File_read_at_all_begin man:+MPI_File_read_at_all_end++MPI_File_read_at_all_end++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_at_all_end.html#MPI_File_read_at_all_end -man:+MPI_File_read++MPI_File_read++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read.html#MPI_File_read -man:+MPI_File_read_all++MPI_File_read_all++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_all.html#MPI_File_read_all man:+MPI_File_read_all_begin++MPI_File_read_all_begin++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_all_begin.html#MPI_File_read_all_begin +man:+MPI_File_read_all++MPI_File_read_all++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_all.html#MPI_File_read_all man:+MPI_File_read_all_end++MPI_File_read_all_end++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_all_end.html#MPI_File_read_all_end -man:+MPI_File_read_at++MPI_File_read_at++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_at.html#MPI_File_read_at man:+MPI_File_read_at_all++MPI_File_read_at_all++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_at_all.html#MPI_File_read_at_all -man:+MPI_File_read_ordered++MPI_File_read_ordered++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_ordered.html#MPI_File_read_ordered +man:+MPI_File_read_at++MPI_File_read_at++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_at.html#MPI_File_read_at +man:+MPI_File_read++MPI_File_read++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read.html#MPI_File_read man:+MPI_File_read_ordered_begin++MPI_File_read_ordered_begin++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_ordered_begin.html#MPI_File_read_ordered_begin +man:+MPI_File_read_ordered++MPI_File_read_ordered++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_ordered.html#MPI_File_read_ordered man:+MPI_File_read_ordered_end++MPI_File_read_ordered_end++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_ordered_end.html#MPI_File_read_ordered_end man:+MPI_File_read_shared++MPI_File_read_shared++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_read_shared.html#MPI_File_read_shared man:+MPI_Register_datarep++MPI_Register_datarep++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Register_datarep.html#MPI_Register_datarep @@ -184,14 +184,14 @@ man:+MPI_File_set_view++MPI_File_set_view++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_set_view.html#MPI_File_set_view man:+MPI_File_write_at_all_begin++MPI_File_write_at_all_begin++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_at_all_begin.html#MPI_File_write_at_all_begin man:+MPI_File_write_at_all_end++MPI_File_write_at_all_end++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_at_all_end.html#MPI_File_write_at_all_end -man:+MPI_File_write++MPI_File_write++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write.html#MPI_File_write -man:+MPI_File_write_all++MPI_File_write_all++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_all.html#MPI_File_write_all man:+MPI_File_write_all_begin++MPI_File_write_all_begin++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_all_begin.html#MPI_File_write_all_begin +man:+MPI_File_write_all++MPI_File_write_all++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_all.html#MPI_File_write_all man:+MPI_File_write_all_end++MPI_File_write_all_end++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_all_end.html#MPI_File_write_all_end -man:+MPI_File_write_at++MPI_File_write_at++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_at.html#MPI_File_write_at man:+MPI_File_write_at_all++MPI_File_write_at_all++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_at_all.html#MPI_File_write_at_all -man:+MPI_File_write_ordered++MPI_File_write_ordered++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_ordered.html#MPI_File_write_ordered +man:+MPI_File_write_at++MPI_File_write_at++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_at.html#MPI_File_write_at +man:+MPI_File_write++MPI_File_write++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write.html#MPI_File_write man:+MPI_File_write_ordered_begin++MPI_File_write_ordered_begin++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_ordered_begin.html#MPI_File_write_ordered_begin +man:+MPI_File_write_ordered++MPI_File_write_ordered++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_ordered.html#MPI_File_write_ordered man:+MPI_File_write_ordered_end++MPI_File_write_ordered_end++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_ordered_end.html#MPI_File_write_ordered_end man:+MPI_File_write_shared++MPI_File_write_shared++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_File_write_shared.html#MPI_File_write_shared man:+MPI_Info_c2f++MPI_Info_c2f++++man+http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Info_c2f.html#MPI_Info_c2f --- mpich-1.2.7.orig/www/index.html +++ mpich-1.2.7/www/index.html @@ -4,20 +4,20 @@

Web pages for MPI and MPE

MPI Commands

- - - -
  • Jumpshots +
  • chp4_servs
  • mpiCC
  • mpireconfig
  • MPI -
  • mpicc +
  • cleanipcs +
  • mpif77
  • mpirun
  • chp4_servs -
  • mpif77 +
  • Jumpshots +
  • mpif90
  • tstmachines
  • cleanipcs -
  • mpif90 +
  • mpicc +
  • MPI
  • mpiCC
  • mpiman @@ -26,31 +26,15 @@

    MPI Routines

    - - - - - + - + - - - - - + + + + +
  • Constants -
  • MPI_File_open -
  • MPI_Initialized -
  • MPIO_Request_c2f -
  • MPI_File_preallocate -
  • MPI_Int2handle -
  • MPIO_Request_f2c -
  • MPI_File_read -
  • MPI_Intercomm_create -
  • MPIO_Test
  • MPI_File_read_all -
  • MPI_Intercomm_merge -
  • MPIO_Wait -
  • MPI_File_read_all_begin
  • MPI_Iprobe
  • MPI_Abort -
  • MPI_File_read_all_end +
  • MPI_File_read_at_all_begin
  • MPI_Irecv
  • MPI_Address -
  • MPI_File_read_at +
  • MPI_File_read_at_all_end
  • MPI_Irsend
  • MPI_Allgather @@ -58,23 +42,23 @@
  • MPI_Isend
  • MPI_Allgatherv -
  • MPI_File_read_at_all_begin +
  • MPI_File_read_at
  • MPI_Issend
  • MPI_Allreduce -
  • MPI_File_read_at_all_end +
  • MPI_File_read
  • MPI_Keyval_create
  • MPI_Alltoall -
  • MPI_File_read_ordered +
  • MPI_File_read_ordered_begin
  • MPI_Keyval_free
  • MPI_Alltoallv -
  • MPI_File_read_ordered_begin +
  • MPI_File_read_ordered_end
  • MPI_NULL_COPY_FN
  • MPI_Attr_delete -
  • MPI_File_read_ordered_end +
  • MPI_File_read_ordered
  • MPI_NULL_DELETE_FN
  • MPI_Attr_get @@ -87,326 +71,342 @@
  • MPI_Barrier
  • MPI_File_seek_shared -
  • MPI_Pack +
  • MPIO_Request_c2f
  • MPI_Bcast
  • MPI_File_set_atomicity -
  • MPI_Pack_size +
  • MPIO_Request_f2c
  • MPI_Bsend
  • MPI_File_set_errhandler -
  • MPI_Pcontrol +
  • MPIO_Test
  • MPI_Bsend_init
  • MPI_File_set_info -
  • MPI_Probe +
  • MPIO_Wait
  • MPI_Buffer_attach
  • MPI_File_set_size -
  • MPI_Recv +
  • MPI_Pack
  • MPI_Buffer_detach
  • MPI_File_set_view -
  • MPI_Recv_init -
  • MPI_CHAR -
  • MPI_File_sync -
  • MPI_Reduce +
  • MPI_Pack_size
  • MPI_Cancel -
  • MPI_File_write -
  • MPI_Reduce_scatter +
  • MPI_File_sync +
  • MPI_Pcontrol
  • MPI_Cart_coords -
  • MPI_File_write_all -
  • MPI_Register_datarep +
  • MPI_File_write_all_begin +
  • MPI_Probe
  • MPI_Cart_create -
  • MPI_File_write_all_begin -
  • MPI_Request_c2f +
  • MPI_File_write_all_end +
  • MPI_Recv +
  • MPI_Cartdim_get +
  • MPI_File_write_all +
  • MPI_Recv_init
  • MPI_Cart_get -
  • MPI_File_write_all_end -
  • MPI_Request_free +
  • MPI_File_write_at_all_begin +
  • MPI_Reduce
  • MPI_Cart_map -
  • MPI_File_write_at -
  • MPI_Rsend +
  • MPI_File_write_at_all_end +
  • MPI_Reduce_scatter
  • MPI_Cart_rank
  • MPI_File_write_at_all -
  • MPI_Rsend_init +
  • MPI_Register_datarep
  • MPI_Cart_shift -
  • MPI_File_write_at_all_begin -
  • MPI_Scan +
  • MPI_File_write_at +
  • MPI_Request_c2f
  • MPI_Cart_sub -
  • MPI_File_write_at_all_end -
  • MPI_Scatter +
  • MPI_File_write +
  • MPI_Request_free
  • MPI_Cartdim_get -
  • MPI_File_write_ordered -
  • MPI_Scatterv +
  • MPI_CHAR +
  • MPI_File_write_ordered_begin +
  • MPI_Rsend
  • MPI_Comm_compare -
  • MPI_File_write_ordered_begin -
  • MPI_Send +
  • MPI_File_write_ordered_end +
  • MPI_Rsend_init
  • MPI_Comm_create -
  • MPI_File_write_ordered_end -
  • MPI_Send_init +
  • MPI_File_write_ordered +
  • MPI_Scan
  • MPI_Comm_dup
  • MPI_File_write_shared -
  • MPI_Sendrecv +
  • MPI_Scatter
  • MPI_Comm_free -
  • MPI_Finalize -
  • MPI_Sendrecv_replace +
  • MPI_Finalized +
  • MPI_Scatterv
  • MPI_Comm_get_name -
  • MPI_Finalized -
  • MPI_Ssend +
  • MPI_Finalize +
  • MPI_Send
  • MPI_Comm_group
  • MPI_Gather -
  • MPI_Ssend_init +
  • MPI_Send_init
  • MPI_Comm_rank
  • MPI_Gatherv -
  • MPI_Start +
  • MPI_Sendrecv
  • MPI_Comm_remote_group
  • MPI_Get_count -
  • MPI_Startall +
  • MPI_Sendrecv_replace
  • MPI_Comm_remote_size
  • MPI_Get_elements -
  • MPI_Status_c2f +
  • MPI_Ssend
  • MPI_Comm_set_name
  • MPI_Get_processor_name -
  • MPI_Status_set_cancelled +
  • MPI_Ssend_init
  • MPI_Comm_size
  • MPI_Get_version -
  • MPI_Status_set_elements +
  • MPI_Startall
  • MPI_Comm_split
  • MPI_Graph_create -
  • MPI_Test +
  • MPI_Start
  • MPI_Comm_test_inter +
  • MPI_Graphdims_get +
  • MPI_Status_c2f +
  • MPI_Dims_create
  • MPI_Graph_get -
  • MPI_Test_cancelled +
  • MPI_Status_set_cancelled
  • MPI_DUP_FN
  • MPI_Graph_map -
  • MPI_Testall -
  • MPI_Dims_create -
  • MPI_Graph_neighbors -
  • MPI_Testany +
  • MPI_Status_set_elements
  • MPI_Errhandler_create
  • MPI_Graph_neighbors_count -
  • MPI_Testsome +
  • MPI_Testall
  • MPI_Errhandler_free -
  • MPI_Graphdims_get -
  • MPI_Topo_test +
  • MPI_Graph_neighbors +
  • MPI_Testany
  • MPI_Errhandler_get
  • MPI_Group_compare -
  • MPI_Type_commit +
  • MPI_Test_cancelled
  • MPI_Errhandler_set
  • MPI_Group_difference -
  • MPI_Type_contiguous +
  • MPI_Test
  • MPI_Error_class
  • MPI_Group_excl -
  • MPI_Type_create_darray +
  • MPI_Testsome
  • MPI_Error_string
  • MPI_Group_free -
  • MPI_Type_create_indexed_block +
  • MPI_Topo_test
  • MPI_File_c2f
  • MPI_Group_incl -
  • MPI_Type_create_subarray +
  • MPI_Type_commit
  • MPI_File_close
  • MPI_Group_intersection -
  • MPI_Type_extent +
  • MPI_Type_contiguous
  • MPI_File_delete
  • MPI_Group_range_excl -
  • MPI_Type_free +
  • MPI_Type_create_darray
  • MPI_File_f2c
  • MPI_Group_range_incl -
  • MPI_Type_get_contents +
  • MPI_Type_create_indexed_block
  • MPI_File_get_amode
  • MPI_Group_rank -
  • MPI_Type_get_envelope +
  • MPI_Type_create_subarray
  • MPI_File_get_atomicity
  • MPI_Group_size -
  • MPI_Type_hindexed +
  • MPI_Type_extent
  • MPI_File_get_byte_offset
  • MPI_Group_translate_ranks -
  • MPI_Type_hvector +
  • MPI_Type_free
  • MPI_File_get_errhandler
  • MPI_Group_union -
  • MPI_Type_indexed +
  • MPI_Type_get_contents
  • MPI_File_get_group
  • MPI_Ibsend -
  • MPI_Type_lb +
  • MPI_Type_get_envelope
  • MPI_File_get_info
  • MPI_Info_c2f -
  • MPI_Type_size +
  • MPI_Type_hindexed
  • MPI_File_get_position
  • MPI_Info_create -
  • MPI_Type_struct +
  • MPI_Type_hvector
  • MPI_File_get_position_shared
  • MPI_Info_delete -
  • MPI_Type_ub +
  • MPI_Type_indexed
  • MPI_File_get_size
  • MPI_Info_dup -
  • MPI_Type_vector +
  • MPI_Type_lb
  • MPI_File_get_type_extent
  • MPI_Info_f2c -
  • MPI_Unpack +
  • MPI_Type_size
  • MPI_File_get_view
  • MPI_Info_free -
  • MPI_Wait +
  • MPI_Type_struct
  • MPI_File_iread +
  • MPI_File_iread_at
  • MPI_Info_get -
  • MPI_Waitall +
  • MPI_Type_ub
  • MPI_File_iread_at +
  • MPI_File_iread
  • MPI_Info_get_nkeys -
  • MPI_Waitany +
  • MPI_Type_vector
  • MPI_File_iread_shared
  • MPI_Info_get_nthkey -
  • MPI_Waitsome +
  • MPI_Unpack
  • MPI_File_iwrite +
  • MPI_File_iwrite_at
  • MPI_Info_get_valuelen -
  • MPI_Wtick +
  • MPI_Waitall
  • MPI_File_iwrite_at +
  • MPI_File_iwrite
  • MPI_Info_set -
  • MPI_Wtime +
  • MPI_Waitany
  • MPI_File_iwrite_shared
  • MPI_Init -
  • MPI_Wait +
  • MPI_File_open +
  • MPI_Initialized +
  • MPI_Waitsome +
  • MPI_File_preallocate
  • MPI_Init_thread +
  • MPI_Wtick +
  • MPI_File_read_all_begin +
  • MPI_Int2handle +
  • MPI_Wtime +
  • MPI_File_read_all_end +
  • MPI_Intercomm_create +
  • MPI_File_read_all +
  • MPI_Intercomm_merge
  • MPE Routines

    - - - - - - - - - + - - +
  • CLOG_Finalize -
  • MPE_CaptureFile -
  • MPE_Iget_mouse_press -
  • CLOG_Init +
  • CLOG_commtype
  • MPE_Close_graphics -
  • MPE_Init_log +
  • MPE_Initialized_logging
  • CLOG_Output +
  • CLOG_cput
  • MPE_Comm_global_rank -
  • MPE_Initialized_logging +
  • MPE_Init_log
  • CLOG_commtype +
  • CLOG_csync
  • MPE_Counter_create -
  • MPE_Line_thickness +
  • MPE_IO_Stdout_to_file
  • CLOG_cput +
  • CLOG_Finalize
  • MPE_Counter_free -
  • MPE_Log_event +
  • MPE_Line_thickness
  • CLOG_csync +
  • CLOG_get_new_event
  • MPE_Counter_nxtval -
  • MPE_Log_get_event_number +
  • MPE_Log_event
  • CLOG_get_new_event +
  • CLOG_get_new_state
  • MPE_Decomp1d -
  • MPE_Log_receive +
  • MPE_Log_get_event_number
  • CLOG_get_new_state +
  • CLOG_init_buffers
  • MPE_Describe_event -
  • MPE_Log_send +
  • MPE_Log_receive
  • CLOG_init_buffers +
  • CLOG_Init
  • MPE_Describe_state -
  • MPE_Make_color_array +
  • MPE_Log_send
  • CLOG_mergelogs
  • MPE_Draw_circle -
  • MPE_Num_colors +
  • MPE_Make_color_array
  • CLOG_mergend
  • MPE_Draw_line -
  • MPE_Open_graphics +
  • MPE_Num_colors
  • CLOG_msgtype
  • MPE_Draw_logic -
  • MPE_Print_datatype_pack_action +
  • MPE_Open_graphics
  • CLOG_newbuff
  • MPE_Draw_point -
  • MPE_Print_datatype_unpack_action +
  • MPE_Print_datatype_pack_action
  • CLOG_nodebuffer2disk
  • MPE_Draw_points +
  • MPE_Print_datatype_unpack_action +
  • CLOG_Output +
  • MPE_Draw_string
  • MPE_ReturnTags
  • CLOG_procbuf -
  • MPE_Draw_string +
  • MPE_Fill_circle
  • MPE_Seq_begin
  • CLOG_reclen -
  • MPE_Fill_circle +
  • MPE_Fill_rectangle
  • MPE_Seq_end
  • CLOG_rectype -
  • MPE_Fill_rectangle +
  • MPE_Finish_log
  • MPE_Start_log
  • CLOG_reinit_buff -
  • MPE_Finish_log +
  • MPE_Get_mouse_press
  • MPE_Stop_log
  • CLOG_treesetup
  • MPE_GetTags
  • MPE_TagsEnd
  • MPE -
  • MPE_Get_mouse_press +
  • MPE_Add_RGB_color +
  • MPE
  • MPE_Update
  • MPE_Add_RGB_color -
  • MPE_IO_Stdout_to_file -
  • MPE_CaptureFile
  • MPE_Iget_mouse_press
  • MPE_Close_graphics +
  • MPE_Initialized_logging +
  • --- mpich-1.2.7.orig/www/www1/index.html +++ mpich-1.2.7/www/www1/index.html @@ -3,14 +3,14 @@

    MPICH Commands

    -
  • Jumpshots -
  • MPI
  • chp4_servs
  • cleanipcs -
  • mpiCC +
  • Jumpshots
  • mpicc +
  • mpiCC
  • mpif77
  • mpif90 +
  • MPI
  • mpiman
  • mpireconfig
  • mpirun --- mpich-1.2.7.orig/www/www3/MPI_File_iread.html +++ mpich-1.2.7/www/www3/MPI_File_iread.html @@ -12,8 +12,8 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -int MPI_File_iread(MPI_File mpi_fh, void *buf, int count, - MPI_Datatype datatype, MPIO_Request *request) +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iread_args

    Input Parameters

    fh
    file handle (handle) --- mpich-1.2.7.orig/www/www3/MPI_File_iread_at.html +++ mpich-1.2.7/www/www3/MPI_File_iread_at.html @@ -11,9 +11,9 @@
     #ifdef HAVE_MPI_GREQUEST
     #include "mpiu_greq.h"
    -int MPI_File_iread_at(MPI_File mpi_fh, MPI_Offset offset, void *buf,
    -                      int count, MPI_Datatype datatype, 
    -                      MPIO_Request *request)
    +
    +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO)
    +typedef struct iread_at_args
     

    Input Parameters

    fh
    file handle (handle) --- mpich-1.2.7.orig/www/www3/MPI_File_iread_shared.html +++ mpich-1.2.7/www/www3/MPI_File_iread_shared.html @@ -12,8 +12,8 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -int MPI_File_iread_shared(MPI_File mpi_fh, void *buf, int count, - MPI_Datatype datatype, MPIO_Request *request) +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iread_shared_args

    Input Parameters

    fh
    file handle (handle) --- mpich-1.2.7.orig/www/www3/MPI_File_iwrite.html +++ mpich-1.2.7/www/www3/MPI_File_iwrite.html @@ -12,8 +12,8 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -int MPI_File_iwrite(MPI_File mpi_fh, void *buf, int count, - MPI_Datatype datatype, MPIO_Request *request) +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iwrite_args

    Input Parameters

    fh
    file handle (handle) --- mpich-1.2.7.orig/www/www3/MPI_File_iwrite_at.html +++ mpich-1.2.7/www/www3/MPI_File_iwrite_at.html @@ -12,9 +12,8 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -int MPI_File_iwrite_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, - int count, MPI_Datatype datatype, - MPIO_Request *request) +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iwrite_at_args

    Input Parameters

    fh
    file handle (handle) --- mpich-1.2.7.orig/www/www3/MPI_File_iwrite_shared.html +++ mpich-1.2.7/www/www3/MPI_File_iwrite_shared.html @@ -12,8 +12,8 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -int MPI_File_iwrite_shared(MPI_File mpi_fh, void *buf, int count, - MPI_Datatype datatype, MPIO_Request *request) +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iwrite_shared_args

    Input Parameters

    fh
    file handle (handle) --- mpich-1.2.7.orig/www/www3/index.html +++ mpich-1.2.7/www/www3/index.html @@ -4,35 +4,19 @@

    MPI Routines

    - - - - - + - + - - - - - + + + + +
  • Constants -
  • MPI_File_iwrite_shared -
  • MPI_Init -
  • MPIO_Request_c2f -
  • MPI_File_open -
  • MPI_Init_thread -
  • MPIO_Request_f2c -
  • MPI_File_preallocate -
  • MPI_Initialized -
  • MPIO_Test -
  • MPI_File_read -
  • MPI_Int2handle -
  • MPIO_Wait -
  • MPI_File_read_all +
  • MPI_File_read_all_end
  • MPI_Intercomm_create
  • MPI_Abort -
  • MPI_File_read_all_begin +
  • MPI_File_read_all
  • MPI_Intercomm_merge
  • MPI_Address -
  • MPI_File_read_all_end +
  • MPI_File_read_at_all_begin
  • MPI_Iprobe
  • MPI_Allgather -
  • MPI_File_read_at +
  • MPI_File_read_at_all_end
  • MPI_Irecv
  • MPI_Allgatherv @@ -40,23 +24,23 @@
  • MPI_Irsend
  • MPI_Allreduce -
  • MPI_File_read_at_all_begin +
  • MPI_File_read_at
  • MPI_Isend
  • MPI_Alltoall -
  • MPI_File_read_at_all_end +
  • MPI_File_read
  • MPI_Issend
  • MPI_Alltoallv -
  • MPI_File_read_ordered +
  • MPI_File_read_ordered_begin
  • MPI_Keyval_create
  • MPI_Attr_delete -
  • MPI_File_read_ordered_begin +
  • MPI_File_read_ordered_end
  • MPI_Keyval_free
  • MPI_Attr_get -
  • MPI_File_read_ordered_end +
  • MPI_File_read_ordered
  • MPI_NULL_COPY_FN
  • MPI_Attr_put @@ -73,225 +57,241 @@
  • MPI_Bsend
  • MPI_File_set_atomicity -
  • MPI_Pack +
  • MPIO_Request_c2f
  • MPI_Bsend_init
  • MPI_File_set_errhandler -
  • MPI_Pack_size +
  • MPIO_Request_f2c
  • MPI_Buffer_attach
  • MPI_File_set_info -
  • MPI_Pcontrol +
  • MPIO_Test
  • MPI_Buffer_detach
  • MPI_File_set_size -
  • MPI_Probe -
  • MPI_CHAR -
  • MPI_File_set_view -
  • MPI_Recv +
  • MPIO_Wait
  • MPI_Cancel -
  • MPI_File_sync -
  • MPI_Recv_init +
  • MPI_File_set_view +
  • MPI_Pack
  • MPI_Cart_coords -
  • MPI_File_write -
  • MPI_Reduce +
  • MPI_File_sync +
  • MPI_Pack_size
  • MPI_Cart_create -
  • MPI_File_write_all -
  • MPI_Reduce_scatter +
  • MPI_File_write_all_begin +
  • MPI_Pcontrol +
  • MPI_Cartdim_get +
  • MPI_File_write_all_end +
  • MPI_Probe
  • MPI_Cart_get -
  • MPI_File_write_all_begin -
  • MPI_Register_datarep +
  • MPI_File_write_all +
  • MPI_Recv
  • MPI_Cart_map -
  • MPI_File_write_all_end -
  • MPI_Request_c2f +
  • MPI_File_write_at_all_begin +
  • MPI_Recv_init
  • MPI_Cart_rank -
  • MPI_File_write_at -
  • MPI_Request_free +
  • MPI_File_write_at_all_end +
  • MPI_Reduce
  • MPI_Cart_shift
  • MPI_File_write_at_all -
  • MPI_Rsend +
  • MPI_Reduce_scatter
  • MPI_Cart_sub -
  • MPI_File_write_at_all_begin -
  • MPI_Rsend_init +
  • MPI_File_write_at +
  • MPI_Register_datarep
  • MPI_Cartdim_get -
  • MPI_File_write_at_all_end -
  • MPI_Scan +
  • MPI_CHAR +
  • MPI_File_write +
  • MPI_Request_c2f
  • MPI_Comm_compare -
  • MPI_File_write_ordered -
  • MPI_Scatter +
  • MPI_File_write_ordered_begin +
  • MPI_Request_free
  • MPI_Comm_create -
  • MPI_File_write_ordered_begin -
  • MPI_Scatterv +
  • MPI_File_write_ordered_end +
  • MPI_Rsend
  • MPI_Comm_dup -
  • MPI_File_write_ordered_end -
  • MPI_Send +
  • MPI_File_write_ordered +
  • MPI_Rsend_init
  • MPI_Comm_free
  • MPI_File_write_shared -
  • MPI_Send_init +
  • MPI_Scan
  • MPI_Comm_get_name -
  • MPI_Finalize -
  • MPI_Sendrecv +
  • MPI_Finalized +
  • MPI_Scatter
  • MPI_Comm_group -
  • MPI_Finalized -
  • MPI_Sendrecv_replace +
  • MPI_Finalize +
  • MPI_Scatterv
  • MPI_Comm_rank
  • MPI_Gather -
  • MPI_Ssend +
  • MPI_Send
  • MPI_Comm_remote_group
  • MPI_Gatherv -
  • MPI_Ssend_init +
  • MPI_Send_init
  • MPI_Comm_remote_size
  • MPI_Get_count -
  • MPI_Start +
  • MPI_Sendrecv
  • MPI_Comm_set_name
  • MPI_Get_elements -
  • MPI_Startall +
  • MPI_Sendrecv_replace
  • MPI_Comm_size
  • MPI_Get_processor_name -
  • MPI_Status_c2f +
  • MPI_Ssend
  • MPI_Comm_split
  • MPI_Get_version -
  • MPI_Status_set_cancelled +
  • MPI_Ssend_init
  • MPI_Comm_test_inter
  • MPI_Graph_create -
  • MPI_Status_set_elements +
  • MPI_Startall +
  • MPI_Dims_create +
  • MPI_Graphdims_get +
  • MPI_Start
  • MPI_DUP_FN
  • MPI_Graph_get -
  • MPI_Test -
  • MPI_Dims_create -
  • MPI_Graph_map -
  • MPI_Test_cancelled +
  • MPI_Status_c2f
  • MPI_Errhandler_create -
  • MPI_Graph_neighbors -
  • MPI_Testall +
  • MPI_Graph_map +
  • MPI_Status_set_cancelled
  • MPI_Errhandler_free
  • MPI_Graph_neighbors_count -
  • MPI_Testany +
  • MPI_Status_set_elements
  • MPI_Errhandler_get -
  • MPI_Graphdims_get -
  • MPI_Testsome +
  • MPI_Graph_neighbors +
  • MPI_Testall
  • MPI_Errhandler_set
  • MPI_Group_compare -
  • MPI_Topo_test +
  • MPI_Testany
  • MPI_Error_class
  • MPI_Group_difference -
  • MPI_Type_commit +
  • MPI_Test_cancelled
  • MPI_Error_string
  • MPI_Group_excl -
  • MPI_Type_contiguous +
  • MPI_Test
  • MPI_File_c2f
  • MPI_Group_free -
  • MPI_Type_create_darray +
  • MPI_Testsome
  • MPI_File_close
  • MPI_Group_incl -
  • MPI_Type_create_subarray +
  • MPI_Topo_test
  • MPI_File_delete
  • MPI_Group_intersection -
  • MPI_Type_extent +
  • MPI_Type_commit
  • MPI_File_f2c
  • MPI_Group_range_excl -
  • MPI_Type_free +
  • MPI_Type_contiguous
  • MPI_File_get_amode
  • MPI_Group_range_incl -
  • MPI_Type_get_contents +
  • MPI_Type_create_darray
  • MPI_File_get_atomicity
  • MPI_Group_rank -
  • MPI_Type_get_envelope +
  • MPI_Type_create_subarray
  • MPI_File_get_byte_offset
  • MPI_Group_size -
  • MPI_Type_hvector +
  • MPI_Type_extent
  • MPI_File_get_errhandler
  • MPI_Group_translate_ranks -
  • MPI_Type_lb +
  • MPI_Type_free
  • MPI_File_get_group
  • MPI_Group_union -
  • MPI_Type_size +
  • MPI_Type_get_contents
  • MPI_File_get_info
  • MPI_Ibsend -
  • MPI_Type_struct +
  • MPI_Type_get_envelope
  • MPI_File_get_position
  • MPI_Info_c2f -
  • MPI_Type_ub +
  • MPI_Type_hvector
  • MPI_File_get_position_shared
  • MPI_Info_create -
  • MPI_Type_vector +
  • MPI_Type_lb
  • MPI_File_get_size
  • MPI_Info_delete -
  • MPI_Unpack +
  • MPI_Type_size
  • MPI_File_get_type_extent
  • MPI_Info_dup -
  • MPI_Wait +
  • MPI_Type_struct
  • MPI_File_get_view
  • MPI_Info_f2c -
  • MPI_Waitall +
  • MPI_Type_ub
  • MPI_File_iread +
  • MPI_File_iread_at
  • MPI_Info_free -
  • MPI_Waitany +
  • MPI_Type_vector
  • MPI_File_iread_at +
  • MPI_File_iread
  • MPI_Info_get -
  • MPI_Waitsome +
  • MPI_Unpack
  • MPI_File_iread_shared
  • MPI_Info_get_nkeys -
  • MPI_Wtick +
  • MPI_Waitall
  • MPI_File_iwrite +
  • MPI_File_iwrite_at
  • MPI_Info_get_nthkey -
  • MPI_Wtime +
  • MPI_Waitany
  • MPI_File_iwrite_at +
  • MPI_File_iwrite
  • MPI_Info_get_valuelen -
  • MPI_Wait +
  • MPI_File_iwrite_shared
  • MPI_Info_set +
  • MPI_Waitsome +
  • MPI_File_open +
  • MPI_Init +
  • MPI_Wtick +
  • MPI_File_preallocate +
  • MPI_Initialized +
  • MPI_Wtime +
  • MPI_File_read_all_begin +
  • MPI_Init_thread +
  • MPI_File_read_all_end +
  • MPI_Int2handle
  • --- mpich-1.2.7.orig/www/www4/index.html +++ mpich-1.2.7/www/www4/index.html @@ -4,92 +4,92 @@

    MPE Routines

    - - - - - - - - - + - - +
  • CLOG_Finalize -
  • MPE_CaptureFile -
  • MPE_Iget_mouse_press -
  • CLOG_Init +
  • CLOG_commtype
  • MPE_Close_graphics -
  • MPE_Init_log +
  • MPE_Initialized_logging
  • CLOG_Output +
  • CLOG_cput
  • MPE_Comm_global_rank -
  • MPE_Initialized_logging +
  • MPE_Init_log
  • CLOG_commtype +
  • CLOG_csync
  • MPE_Counter_create -
  • MPE_Line_thickness +
  • MPE_IO_Stdout_to_file
  • CLOG_cput +
  • CLOG_Finalize
  • MPE_Counter_free -
  • MPE_Log_event +
  • MPE_Line_thickness
  • CLOG_csync +
  • CLOG_get_new_event
  • MPE_Counter_nxtval -
  • MPE_Log_get_event_number +
  • MPE_Log_event
  • CLOG_get_new_event +
  • CLOG_get_new_state
  • MPE_Decomp1d -
  • MPE_Log_receive +
  • MPE_Log_get_event_number
  • CLOG_get_new_state +
  • CLOG_init_buffers
  • MPE_Describe_event -
  • MPE_Log_send +
  • MPE_Log_receive
  • CLOG_init_buffers +
  • CLOG_Init
  • MPE_Describe_state -
  • MPE_Make_color_array +
  • MPE_Log_send
  • CLOG_mergelogs
  • MPE_Draw_circle -
  • MPE_Num_colors +
  • MPE_Make_color_array
  • CLOG_mergend
  • MPE_Draw_line -
  • MPE_Open_graphics +
  • MPE_Num_colors
  • CLOG_msgtype
  • MPE_Draw_logic -
  • MPE_Print_datatype_pack_action +
  • MPE_Open_graphics
  • CLOG_newbuff
  • MPE_Draw_point -
  • MPE_Print_datatype_unpack_action +
  • MPE_Print_datatype_pack_action
  • CLOG_nodebuffer2disk
  • MPE_Draw_points +
  • MPE_Print_datatype_unpack_action +
  • CLOG_Output +
  • MPE_Draw_string
  • MPE_ReturnTags
  • CLOG_procbuf -
  • MPE_Draw_string +
  • MPE_Fill_circle
  • MPE_Seq_begin
  • CLOG_reclen -
  • MPE_Fill_circle +
  • MPE_Fill_rectangle
  • MPE_Seq_end
  • CLOG_rectype -
  • MPE_Fill_rectangle +
  • MPE_Finish_log
  • MPE_Start_log
  • CLOG_reinit_buff -
  • MPE_Finish_log +
  • MPE_Get_mouse_press
  • MPE_Stop_log
  • CLOG_treesetup
  • MPE_GetTags
  • MPE_TagsEnd
  • MPE -
  • MPE_Get_mouse_press +
  • MPE_Add_RGB_color +
  • MPE
  • MPE_Update
  • MPE_Add_RGB_color -
  • MPE_IO_Stdout_to_file -
  • MPE_CaptureFile
  • MPE_Iget_mouse_press
  • MPE_Close_graphics +
  • MPE_Initialized_logging +
  • --- mpich-1.2.7.orig/examples/perftest/aclocal.m4 +++ mpich-1.2.7/examples/perftest/aclocal.m4 @@ -878,7 +878,34 @@ EOF ac_link2='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest1.c conftest2.c $LIBS >conftest.out 2>&1' if eval $ac_link2 ; then - pac_cv_prog_c_weak_symbols="pragma weak" + # The gcc 3.4.x compiler accepts the pragma weak, but does not + # correctly implement it on systems where the loader doesn't + # support weak symbols (e.g., cygwin). This is a bug in gcc, but it + # it is one that *we* have to detect. + rm -f conftest* + cat >>conftest1.c <>conftest2.c <> config.log + echo "Failed program was" >> config.log + cat conftest1.c >>config.log + cat conftest2.c >>config.log + if test -s conftest.out ; then cat conftest.out >> config.log ; fi + has_pragma_weak=0 + pragma_extra_message="pragma weak accepted but does not work (probably creates two non-weak entries)" + fi else echo "$ac_link2" >>config.log echo "Failed program was" >>config.log @@ -1089,6 +1116,8 @@ dnl here are some possible choices dnl Solaris cc dnl -fd -v -Xc +dnl -Xc is strict ANSI (some version) and does not allow "long long", for +dnl example dnl IRIX dnl -ansi -DEBUG:trap_uninitialized=ON:varargs_interface_check=ON:verbose_runtime=ON dnl @@ -1299,6 +1328,7 @@ ac_cv_prog_cc_globals_work,[ AC_REQUIRE([AC_PROG_RANLIB]) ac_cv_prog_cc_globals_work=no +rm -f libconftest.a echo 'extern int a; int a;' > conftest1.c echo 'extern int a; int main( ){ return a; }' > conftest2.c if ${CC-cc} $CFLAGS -c conftest1.c >conftest.out 2>&1 ; then @@ -1308,6 +1338,17 @@ # Success! C works ac_cv_prog_cc_globals_work=yes else + echo "Error linking program with uninitialized global" >&AC_FD_CC + echo "Programs were:" >&AC_FD_CC + echo "conftest1.c:" >&AC_FD_CC + cat conftest1.c >&AC_FD_CC + echo "conftest2.c:" >&AC_FD_CC + cat conftest2.c >&AC_FD_CC + echo "and link line was:" >&AC_FD_CC + echo "${CC-cc} $CFLAGS -o conftest conftest2.c $LDFLAGS libconftest.a" >&AC_FD_CC + echo "with output:" >&AC_FD_CC + cat conftest.out >&AC_FD_CC + # Failure! Do we need -fno-common? ${CC-cc} $CFLAGS -fno-common -c conftest1.c >> conftest.out 2>&1 rm -f libconftest.a @@ -1318,7 +1359,9 @@ CFLAGS="$CFLAGS -fno-common" elif test -n "$RANLIB" ; then # Try again, with ranlib changed to ranlib -c - ${RANLIB} -c libconftest.a + # (send output to /dev/null incase this ranlib + # doesn't know -c) + ${RANLIB} -c libconftest.a >/dev/null 2>&1 if ${CC-cc} $CFLAGS -o conftest conftest2.c $LDFLAGS libconftest.a >> conftest.out 2>&1 ; then RANLIB="$RANLIB -c" #else @@ -1577,6 +1620,13 @@ fprintf(f, "%d\n", sizeof(a) + sizeof(b)); exit(0); }],AC_CV_NAME=`cat conftestval`,AC_CV_NAME=0,ifelse([$4],,,AC_CV_NAME=$4))]) +if test "X$AC_CV_NAME" = "X" ; then + # We have a problem. The test returned a zero status, but no output, + # or we're cross-compiling (or think we are) and have no value for + # this object + : +fi +rm -f conftestval AC_MSG_RESULT($AC_CV_NAME) dnl AC_DEFINE_UNQUOTED(AC_TYPE_NAME,$AC_CV_NAME) undefine([AC_TYPE_NAME])undefine([AC_CV_NAME]) @@ -2301,6 +2351,7 @@ dnl+ \-\-with\-mpich[=path] - MPICH. 'path' is the location of MPICH commands dnl. \-\-with\-ibmmpi - IBM MPI dnl. \-\-with\-lammpi[=path] - LAM/MPI +dnl. \-\-with\-mpichnt - MPICH NT dnl- \-\-with\-sgimpi - SGI MPI dnl If no type is selected, and a default ("mpich", "ibmmpi", or "sgimpi") dnl is given, that type is used as if '--with-' was given. @@ -2311,6 +2362,13 @@ dnl programs that may need to be run before and after running MPI programs. dnl For example, 'MPIBOOT' may start demons necessary to run MPI programs and dnl 'MPIUNBOOT' will stop those demons. +dnl +dnl The two forms of the compilers are to allow for tests of the compiler +dnl when the MPI version of the compiler creates executables that cannot +dnl be run on the local system (for example, the IBM SP, where executables +dnl created with mpcc will not run locally, but executables created +dnl with xlc may be used to discover properties of the compiler, such as +dnl the size of data types). dnl dnl See also: dnl PAC_LANG_PUSH_COMPILERS, PAC_LIB_MPI @@ -2347,6 +2405,11 @@ if test "$ac_mpi_type" = "unknown" -a "$pac_lib_mpi_is_building" = "yes" ; then ac_mpi_type="mpich" fi +# Set defaults +MPIRUN_NP="-np " +MPIEXEC_N="-n " +AC_SUBST(MPIRUN_NP) +AC_SUBST(MPIEXEC_N) case $ac_mpi_type in mpich) dnl @@ -2375,6 +2438,7 @@ TESTCXX=${CXX-CC} CXX="$MPICXX" # We may want to restrict this to the path containing mpirun + AC_PATH_PROG(MPIEXEC,mpiexec) AC_PATH_PROG(MPIRUN,mpirun) AC_PATH_PROG(MPIBOOT,mpichboot) AC_PATH_PROG(MPIUNBOOT,mpichstop) @@ -2438,6 +2502,11 @@ ;; ibmmpi) + AC_CHECK_PROGS(MPCC,mpcc) + AC_CHECK_PROGS(MPXLF,mpxlf) + if test -z "$MPCC" -o -z "$MPXLF" ; then + AC_MSG_ERROR([Could not find IBM MPI compilation scripts. Either mpcc or mpxlf is missing]) + fi TESTCC=${CC-xlC}; TESTF77=${F77-xlf}; CC=mpcc; F77=mpxlf # There is no mpxlf90, but the options langlvl and free can # select the F90 version of xlf @@ -2534,7 +2603,11 @@ ac_ext=$pac_cv_f90_ext ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&AC_FD_CC' ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$pac_cv_prog_f90_cross +dnl cross_compiling no longer maintained by autoconf as part of the +dnl AC_LANG changes. If we set it here, a later AC_LANG may not +dnl restore it (in the case where one compiler claims to be a cross compiler +dnl and another does not) +dnl cross_compiling=$pac_cv_prog_f90_cross ]) dnl dnl This is an addition for AC_TRY_COMPILE, but for f90. If the current @@ -2846,7 +2919,7 @@ # ifc - An older Intel compiler AC_DEFUN(PAC_PROG_F90,[ if test -z "$F90" ; then - AC_CHECK_PROGS(F90,f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 fc ifc efc) + AC_CHECK_PROGS(F90,f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 gfortran ifc efc) test -z "$F90" && AC_MSG_WARN([no acceptable Fortran 90 compiler found in \$PATH]) fi if test -n "$F90" ; then @@ -2906,7 +2979,11 @@ ac_ext=$pac_cv_f90_ext ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&AC_FD_CC' ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$pac_cv_prog_f90_cross +dnl cross_compiling no longer maintained by autoconf as part of the +dnl AC_LANG changes. If we set it here, a later AC_LANG may not +dnl restore it (in the case where one compiler claims to be a cross compiler +dnl and another does not) +dnl cross_compiling=$pac_cv_prog_f90_cross # Include a Fortran 90 construction to distinguish between Fortran 77 # and Fortran 90 compilers. cat >conftest.$ac_ext < conftest2.f <&AC_FD_CC ; then + # We include $FFLAGS on the link line because this is + # the way in which most of the configure tests run. In particular, + # many users are used to using FFLAGS (and CFLAGS) to select + # different instruction sets, such as 64-bit with -xarch=v9 for + # Solaris. + if ${F77} ${FFLAGS} -o conftest conftest.o conftest1.o $LDFLAGS 2>&AC_FD_CC ; then AC_MSG_RESULT([Use Fortran to link programs]) - elif ${CC} -o conftest conftest.o conftest1.o $LDFLAGS $FLIBS 2>&AC_FD_CC ; then + elif ${CC} ${CFLAGS} -o conftest conftest.o conftest1.o $LDFLAGS $FLIBS 2>&AC_FD_CC ; then AC_MSG_RESULT([Use C with FLIBS to link programs]) F77LINKER="$CC" F77_LDFLAGS="$F77_LDFLAGS $FLIBS" @@ -4298,10 +4399,9 @@ pac_cv_prog_f77_new_char_decl,[ AC_LANG_SAVE AC_LANG_FORTRAN77 -AC_TRY_COMPILE(,[ - character (len=10) s -],pac_cv_prog_f77_new_char_decl="yes", -pac_cv_prog_f77_new_char_decl="no") +AC_COMPILE_IFLESE([AC_LANG_PROGRAM(,[ character (len=10) s])], + pac_cv_prog_f77_new_char_decl="yes", + pac_cv_prog_f77_new_char_decl="no") AC_LANG_RESTORE ]) if test "$pac_cv_prog_f77_new_char_decl" = "yes" ; then --- mpich-1.2.7.orig/examples/perftest/Makefile.in +++ mpich-1.2.7/examples/perftest/Makefile.in @@ -83,13 +83,18 @@ HAVE_ROMIO = @HAVE_ROMIO@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ +MPCC = @MPCC@ MPIBOOT = @MPIBOOT@ MPICC = @MPICC@ MPICXX = @MPICXX@ +MPIEXEC = @MPIEXEC@ +MPIEXEC_N = @MPIEXEC_N@ MPIF77 = @MPIF77@ MPIF90 = @MPIF90@ MPIRUN = @MPIRUN@ +MPIRUN_NP = @MPIRUN_NP@ MPIUNBOOT = @MPIUNBOOT@ +MPXLF = @MPXLF@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ RANLIB_AFTER_INSTALL = @RANLIB_AFTER_INSTALL@ --- mpich-1.2.7.orig/examples/perftest/configure +++ mpich-1.2.7/examples/perftest/configure @@ -1125,6 +1125,11 @@ if test "$ac_mpi_type" = "unknown" -a "$pac_lib_mpi_is_building" = "yes" ; then ac_mpi_type="mpich" fi +# Set defaults +MPIRUN_NP="-np " +MPIEXEC_N="-n " + + case $ac_mpi_type in mpich) if test "X$pac_lib_mpi_is_building" != "Xyes" ; then @@ -1140,7 +1145,7 @@ # Extract the first word of "mpicc", so it can be a program name with args. set dummy mpicc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1144: checking for $ac_word" >&5 +echo "configure:1149: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MPICC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1177,7 +1182,7 @@ # Extract the first word of "mpif77", so it can be a program name with args. set dummy mpif77; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1181: checking for $ac_word" >&5 +echo "configure:1186: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MPIF77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1214,7 +1219,7 @@ # Extract the first word of "mpif90", so it can be a program name with args. set dummy mpif90; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1218: checking for $ac_word" >&5 +echo "configure:1223: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MPIF90'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1251,7 +1256,7 @@ # Extract the first word of "mpiCC", so it can be a program name with args. set dummy mpiCC; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1255: checking for $ac_word" >&5 +echo "configure:1260: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MPICXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1286,10 +1291,45 @@ TESTCXX=${CXX-CC} CXX="$MPICXX" # We may want to restrict this to the path containing mpirun + # Extract the first word of "mpiexec", so it can be a program name with args. +set dummy mpiexec; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1298: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MPIEXEC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MPIEXEC" in + /*) + ac_cv_path_MPIEXEC="$MPIEXEC" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_MPIEXEC="$MPIEXEC" # Let the user override the test with a dos path. + ;; + *) + 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_path_MPIEXEC="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +MPIEXEC="$ac_cv_path_MPIEXEC" +if test -n "$MPIEXEC"; then + echo "$ac_t""$MPIEXEC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + # Extract the first word of "mpirun", so it can be a program name with args. set dummy mpirun; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1293: checking for $ac_word" >&5 +echo "configure:1333: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MPIRUN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1324,7 +1364,7 @@ # Extract the first word of "mpichboot", so it can be a program name with args. set dummy mpichboot; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1328: checking for $ac_word" >&5 +echo "configure:1368: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MPIBOOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1359,7 +1399,7 @@ # Extract the first word of "mpichstop", so it can be a program name with args. set dummy mpichstop; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1363: checking for $ac_word" >&5 +echo "configure:1403: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MPIUNBOOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1407,7 +1447,7 @@ save_LDFLAGS="$LDFLAGS" LDFLAGS="$save_LDFLAGS -L$with_mpichnt/lib" echo $ac_n "checking for MPI_Init in -lmpich""... $ac_c" 1>&6 -echo "configure:1411: checking for MPI_Init in -lmpich" >&5 +echo "configure:1451: checking for MPI_Init in -lmpich" >&5 ac_lib_var=`echo mpich'_'MPI_Init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1415,7 +1455,7 @@ ac_save_LIBS="$LIBS" LIBS="-lmpich $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1470: \"$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 @@ -1449,7 +1489,7 @@ if test "$found" = "no" ; then echo $ac_n "checking for MPI_Init in -lmpich2""... $ac_c" 1>&6 -echo "configure:1453: checking for MPI_Init in -lmpich2" >&5 +echo "configure:1493: checking for MPI_Init in -lmpich2" >&5 ac_lib_var=`echo mpich2'_'MPI_Init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1457,7 +1497,7 @@ ac_save_LIBS="$LIBS" LIBS="-lmpich2 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1512: \"$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 @@ -1509,7 +1549,7 @@ # Extract the first word of "mpicc", so it can be a program name with args. set dummy mpicc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1513: checking for $ac_word" >&5 +echo "configure:1553: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MPICC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1546,7 +1586,7 @@ # Extract the first word of "mpif77", so it can be a program name with args. set dummy mpif77; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1550: checking for $ac_word" >&5 +echo "configure:1590: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MPIF77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1583,7 +1623,7 @@ # Extract the first word of "mpif90", so it can be a program name with args. set dummy mpif90; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1587: checking for $ac_word" >&5 +echo "configure:1627: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MPIF90'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1620,7 +1660,7 @@ # Extract the first word of "mpiCC", so it can be a program name with args. set dummy mpiCC; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1624: checking for $ac_word" >&5 +echo "configure:1664: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MPICXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1662,6 +1702,77 @@ ;; ibmmpi) + for ac_prog in mpcc +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:1711: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_MPCC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$MPCC"; then + ac_cv_prog_MPCC="$MPCC" # 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_MPCC="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +MPCC="$ac_cv_prog_MPCC" +if test -n "$MPCC"; then + echo "$ac_t""$MPCC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$MPCC" && break +done + + for ac_prog in mpxlf +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:1745: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_MPXLF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$MPXLF"; then + ac_cv_prog_MPXLF="$MPXLF" # 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_MPXLF="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +MPXLF="$ac_cv_prog_MPXLF" +if test -n "$MPXLF"; then + echo "$ac_t""$MPXLF" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$MPXLF" && break +done + + if test -z "$MPCC" -o -z "$MPXLF" ; then + { echo "configure: error: Could not find IBM MPI compilation scripts. Either mpcc or mpxlf is missing" 1>&2; exit 1; } + fi TESTCC=${CC-xlC}; TESTF77=${F77-xlf}; CC=mpcc; F77=mpxlf # There is no mpxlf90, but the options langlvl and free can # select the F90 version of xlf @@ -1673,7 +1784,7 @@ TESTCC=${CC:=cc}; TESTF77=${F77:=f77}; TESTCXX=${CXX:=CC}; TESTF90=${F90:=f90} echo $ac_n "checking for MPI_Init in -lmpi""... $ac_c" 1>&6 -echo "configure:1677: checking for MPI_Init in -lmpi" >&5 +echo "configure:1788: checking for MPI_Init in -lmpi" >&5 ac_lib_var=`echo mpi'_'MPI_Init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1681,7 +1792,7 @@ ac_save_LIBS="$LIBS" LIBS="-lmpi $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1807: \"$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 @@ -1736,7 +1847,7 @@ # 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:1740: checking for $ac_word" >&5 +echo "configure:1851: 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 @@ -1767,7 +1878,7 @@ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1882: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1778,12 +1889,12 @@ cat > conftest.$ac_ext << EOF -#line 1782 "configure" +#line 1893 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1809,12 +1920,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1813: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1924: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether the C compiler sets its return status correctly""... $ac_c" 1>&6 -echo "configure:1818: checking whether the C compiler sets its return status correctly" >&5 +echo "configure:1929: checking whether the C compiler sets its return status correctly" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1824,14 +1935,14 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* notbroken=no else @@ -1848,7 +1959,7 @@ fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1852: checking whether we are using GNU C" >&5 +echo "configure:1963: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1857,7 +1968,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1880,7 +1991,7 @@ # 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:1884: checking for $ac_word" >&5 +echo "configure:1995: 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 @@ -1913,7 +2024,7 @@ fi echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1917: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works" >&5 +echo "configure:2028: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works" >&5 ac_ext=f ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' @@ -1926,7 +2037,7 @@ end EOF -if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_f77_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1952,12 +2063,12 @@ { echo "configure: error: installation or configuration problem: Fortran 77 compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1956: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2067: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_f77_cross" 1>&6 cross_compiling=$ac_cv_prog_f77_cross echo $ac_n "checking whether we are using GNU Fortran 77""... $ac_c" 1>&6 -echo "configure:1961: checking whether we are using GNU Fortran 77" >&5 +echo "configure:2072: checking whether we are using GNU Fortran 77" >&5 if eval "test \"`echo '$''{'ac_cv_prog_g77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1966,7 +2077,7 @@ yes #endif EOF -if { ac_try='$F77 -E conftest.fpp'; { (eval echo configure:1970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='$F77 -E conftest.fpp'; { (eval echo configure:2081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_g77=yes else ac_cv_prog_g77=no @@ -1981,7 +2092,7 @@ ac_save_FFLAGS="$FFLAGS" FFLAGS= echo $ac_n "checking whether $F77 accepts -g""... $ac_c" 1>&6 -echo "configure:1985: checking whether $F77 accepts -g" >&5 +echo "configure:2096: checking whether $F77 accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_f77_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2018,7 +2129,7 @@ # 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:2133: 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 @@ -2050,7 +2161,7 @@ echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2054: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:2165: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2061,12 +2172,12 @@ cat > conftest.$ac_ext << EOF -#line 2065 "configure" +#line 2176 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2092,12 +2203,12 @@ { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2096: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2207: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:2101: checking whether we are using GNU C++" >&5 +echo "configure:2212: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2106,7 +2217,7 @@ yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -2125,7 +2236,7 @@ ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:2129: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:2240: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2160,12 +2271,12 @@ if test "$enable_f90" != no ; then if test -z "$F90" ; then - for ac_prog in f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 fc ifc efc + for ac_prog in f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 gfortran ifc efc 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:2169: checking for $ac_word" >&5 +echo "configure:2280: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_F90'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2198,14 +2309,14 @@ fi if test -n "$F90" ; then echo $ac_n "checking for extension for Fortran 90 programs""... $ac_c" 1>&6 -echo "configure:2202: checking for extension for Fortran 90 programs" >&5 +echo "configure:2313: checking for extension for Fortran 90 programs" >&5 pac_cv_f90_ext="f90" cat > conftest.$pac_cv_f90_ext <&5; (eval $ac_compile) 2>&5; } ; then +if { (eval echo configure:2320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } ; then echo "$ac_t""f90" 1>&6 else rm -f conftest* @@ -2214,14 +2325,14 @@ program conftest end EOF - if { (eval echo configure:2218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } ; then + if { (eval echo configure:2329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } ; then echo "$ac_t""f" 1>&6 else echo "$ac_t""unknown!" 1>&6 fi fi echo $ac_n "checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2225: checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) works" >&5 +echo "configure:2336: checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) works" >&5 # We cannot use _LANG_FORTRAN90 here because we will usually be executing this # test in the context of _PROG_F90, which is a require on _LANG_FORTRAN90. @@ -2229,7 +2340,6 @@ ac_ext=$pac_cv_f90_ext ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&5' ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$pac_cv_prog_f90_cross # Include a Fortran 90 construction to distinguish between Fortran 77 # and Fortran 90 compilers. cat >conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeect} ; then +if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeect} ; then pac_cv_prog_f90_works="yes" if (./conftest; exit) 2>/dev/null ; then pac_cv_prog_f90_cross="no" @@ -2264,9 +2374,8 @@ echo "configure: warning: installation or configuration problem: Fortran 90 compiler cannot create executables." 1>&2 fi echo $ac_n "checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2268: checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2378: checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$pac_cv_prog_f90_cross" 1>&6 -cross_compiling=$pac_cv_prog_f90_cross fi ac_f90ext=$pac_cv_f90_ext @@ -2313,7 +2422,7 @@ # 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:2317: checking for $ac_word" >&5 +echo "configure:2426: 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 +2453,7 @@ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2348: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2457: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2355,12 +2464,12 @@ cat > conftest.$ac_ext << EOF -#line 2359 "configure" +#line 2468 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2386,12 +2495,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2390: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2499: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether the C compiler sets its return status correctly""... $ac_c" 1>&6 -echo "configure:2395: checking whether the C compiler sets its return status correctly" >&5 +echo "configure:2504: checking whether the C compiler sets its return status correctly" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2401,14 +2510,14 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* notbroken=no else @@ -2425,7 +2534,7 @@ fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2429: checking whether we are using GNU C" >&5 +echo "configure:2538: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2434,7 +2543,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2455,7 +2564,7 @@ # 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:2459: checking for $ac_word" >&5 +echo "configure:2568: 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 @@ -2488,7 +2597,7 @@ fi echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2492: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works" >&5 +echo "configure:2601: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works" >&5 ac_ext=f ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' @@ -2501,7 +2610,7 @@ end EOF -if { (eval echo configure:2505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_f77_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2527,12 +2636,12 @@ { echo "configure: error: installation or configuration problem: Fortran 77 compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2531: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2640: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_f77_cross" 1>&6 cross_compiling=$ac_cv_prog_f77_cross echo $ac_n "checking whether we are using GNU Fortran 77""... $ac_c" 1>&6 -echo "configure:2536: checking whether we are using GNU Fortran 77" >&5 +echo "configure:2645: checking whether we are using GNU Fortran 77" >&5 if eval "test \"`echo '$''{'ac_cv_prog_g77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2541,7 +2650,7 @@ yes #endif EOF -if { ac_try='$F77 -E conftest.fpp'; { (eval echo configure:2545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='$F77 -E conftest.fpp'; { (eval echo configure:2654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_g77=yes else ac_cv_prog_g77=no @@ -2556,7 +2665,7 @@ ac_save_FFLAGS="$FFLAGS" FFLAGS= echo $ac_n "checking whether $F77 accepts -g""... $ac_c" 1>&6 -echo "configure:2560: checking whether $F77 accepts -g" >&5 +echo "configure:2669: checking whether $F77 accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_f77_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2597,7 +2706,7 @@ # 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:2601: checking for $ac_word" >&5 +echo "configure:2710: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2630,7 +2739,7 @@ echo $ac_n "checking whether clock skew breaks make""... $ac_c" 1>&6 -echo "configure:2634: checking whether clock skew breaks make" >&5 +echo "configure:2743: checking whether clock skew breaks make" >&5 if eval "test \"`echo '$''{'pac_cv_prog_make_found_clock_skew'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2659,7 +2768,7 @@ echo $ac_n "checking whether make supports include""... $ac_c" 1>&6 -echo "configure:2663: checking whether make supports include" >&5 +echo "configure:2772: checking whether make supports include" >&5 if eval "test \"`echo '$''{'pac_cv_prog_make_include'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2692,7 +2801,7 @@ echo $ac_n "checking whether make allows comments in actions""... $ac_c" 1>&6 -echo "configure:2696: checking whether make allows comments in actions" >&5 +echo "configure:2805: checking whether make allows comments in actions" >&5 if eval "test \"`echo '$''{'pac_cv_prog_make_allows_comments'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2726,7 +2835,7 @@ echo $ac_n "checking for virtual path format""... $ac_c" 1>&6 -echo "configure:2730: checking for virtual path format" >&5 +echo "configure:2839: checking for virtual path format" >&5 if eval "test \"`echo '$''{'pac_cv_prog_make_vpath'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2775,7 +2884,7 @@ echo $ac_n "checking whether make sets CFLAGS""... $ac_c" 1>&6 -echo "configure:2779: checking whether make sets CFLAGS" >&5 +echo "configure:2888: checking whether make sets CFLAGS" >&5 if eval "test \"`echo '$''{'pac_cv_prog_make_set_cflags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2806,7 +2915,7 @@ if test "$pac_cv_prog_make_echos_dir" = "no" ; then echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:2810: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:2919: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2843,7 +2952,7 @@ # 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:2847: checking for $ac_word" >&5 +echo "configure:2956: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GRAPHICS_PGM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2886,7 +2995,7 @@ pac_save_prog_f90_cross="$pac_cv_prog_f90_cross" if test "X$CPP" = "X" ; then echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2890: checking how to run the C preprocessor" >&5 +echo "configure:2999: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2901,13 +3010,13 @@ # 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:2911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` if test -z "$ac_err"; then : @@ -2918,13 +3027,13 @@ 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:2928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` if test -z "$ac_err"; then : @@ -2935,13 +3044,13 @@ 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:2945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` if test -z "$ac_err"; then : @@ -2987,20 +3096,20 @@ # not just through cpp. TESTCPP="${TESTCC-cc} -E" ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" - if { (eval echo configure:2991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then + if { (eval echo configure:3100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then pac_cv_prog_TESTCPP="$TESTCPP" fi if test "X$pac_cv_prog_TESTCPP" = "X" ; then TESTCPP="${TESTCC-cc} -E -traditional-cpp" ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" - if { (eval echo configure:2997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then + if { (eval echo configure:3106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then pac_cv_prog_TESTCPP="$TESTCPP" fi fi if test "X$pac_cv_prog_TESTCPP" = "X" ; then TESTCPP="${TESTCC-cc} -nologo -E" ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" - if { (eval echo configure:3004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then + if { (eval echo configure:3113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then pac_cv_prog_TESTCPP="$TESTCPP" fi fi @@ -3008,7 +3117,7 @@ # Extract the first word of "cpp", so it can be a program name with args. set dummy cpp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3012: checking for $ac_word" >&5 +echo "configure:3121: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TESTCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3068,12 +3177,12 @@ else cat > conftest.$ac_ext << EOF -#line 3072 "configure" +#line 3181 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -3113,7 +3222,7 @@ end EOF -if { (eval echo configure:3117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_f77_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -3148,12 +3257,12 @@ cat > conftest.$ac_ext << EOF -#line 3152 "configure" +#line 3261 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -3182,7 +3291,6 @@ ac_ext=$pac_cv_f90_ext ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&5' ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$pac_cv_prog_f90_cross if test "$pac_cross_compiling" = "yes" ; then ac_cv_prog_f90_cross=yes @@ -3225,7 +3333,7 @@ for copt in "-O4 -Ofast" "-Ofast" "-fast" "-O3" "-xO3" "-O" ; do echo $ac_n "checking whether C compiler accepts option $copt""... $ac_c" 1>&6 -echo "configure:3229: checking whether C compiler accepts option $copt" >&5 +echo "configure:3337: checking whether C compiler accepts option $copt" >&5 save_CFLAGS="$CFLAGS" CFLAGS="$copt $CFLAGS" rm -f conftest.out @@ -3236,7 +3344,7 @@ if diff -b conftest.out conftest.bas >/dev/null 2>&1 ; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking whether routines compiled with $copt can be linked with ones compiled without $copt""... $ac_c" 1>&6 -echo "configure:3240: checking whether routines compiled with $copt can be linked with ones compiled without $copt" >&5 +echo "configure:3348: checking whether routines compiled with $copt can be linked with ones compiled without $copt" >&5 rm -f conftest.out rm -f conftest.bas if ${CC-cc} -c $save_CFLAGS $CPPFLAGS conftest2.c >conftest2.out 2>&1 ; then @@ -3304,7 +3412,7 @@ "-funroll-loops" ; do echo $ac_n "checking whether C compiler accepts option $copt""... $ac_c" 1>&6 -echo "configure:3308: checking whether C compiler accepts option $copt" >&5 +echo "configure:3416: checking whether C compiler accepts option $copt" >&5 save_CFLAGS="$CFLAGS" CFLAGS="$copt $CFLAGS" rm -f conftest.out @@ -3315,7 +3423,7 @@ if diff -b conftest.out conftest.bas >/dev/null 2>&1 ; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking whether routines compiled with $copt can be linked with ones compiled without $copt""... $ac_c" 1>&6 -echo "configure:3319: checking whether routines compiled with $copt can be linked with ones compiled without $copt" >&5 +echo "configure:3427: checking whether routines compiled with $copt can be linked with ones compiled without $copt" >&5 rm -f conftest.out rm -f conftest.bas if ${CC-cc} -c $save_CFLAGS $CPPFLAGS conftest2.c >conftest2.out 2>&1 ; then @@ -3385,14 +3493,14 @@ echo $ac_n "checking for library containing fabs""... $ac_c" 1>&6 -echo "configure:3389: checking for library containing fabs" >&5 +echo "configure:3497: checking for library containing fabs" >&5 if eval "test \"`echo '$''{'ac_cv_search_fabs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_fabs="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_fabs="none required" else @@ -3414,7 +3522,7 @@ test "$ac_cv_search_fabs" = "no" && for i in m; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_fabs="-l$i" break @@ -3460,14 +3568,14 @@ # Look for MPILIB first if it is defined echo $ac_n "checking for library containing MPI_Init""... $ac_c" 1>&6 -echo "configure:3464: checking for library containing MPI_Init" >&5 +echo "configure:3572: checking for library containing MPI_Init" >&5 if eval "test \"`echo '$''{'ac_cv_search_MPI_Init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_MPI_Init="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_MPI_Init="none required" else @@ -3489,7 +3597,7 @@ test "$ac_cv_search_MPI_Init" = "no" && for i in $MPILIB mpi mpich mpich2; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_MPI_Init="-l$i" break @@ -3525,7 +3633,7 @@ fi ac_safe=`echo "mpi.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for mpi.h""... $ac_c" 1>&6 -echo "configure:3529: checking for mpi.h" >&5 +echo "configure:3637: 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 @@ -3533,12 +3641,12 @@ pac_found_header=no if test "$CPP" != "/lib/cpp" ; then cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3553,13 +3661,13 @@ # If cpp failed, see if the compiler accepts the header. if test "$pac_found_header" != "yes" ; then cat >conftest.c< int conftest() {return 0;} EOF ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' - if { (eval echo configure:3563: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then + if { (eval echo configure:3671: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then pac_found_header=yes else echo "configure: failed program was:" >&5 @@ -3600,12 +3708,12 @@ for ac_func in MPI_Put MPI_Get do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3604: checking for $ac_func" >&5 +echo "configure:3712: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3653,12 +3761,12 @@ done echo $ac_n "checking for MPI_Alloc_mem""... $ac_c" 1>&6 -echo "configure:3657: checking for MPI_Alloc_mem" >&5 +echo "configure:3765: checking for MPI_Alloc_mem" >&5 if eval "test \"`echo '$''{'ac_cv_func_MPI_Alloc_mem'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_MPI_Alloc_mem=yes" else @@ -3704,14 +3812,14 @@ if test "$found_alloc" != 1 -a "$ac_cv_func_MPI_Put" = "yes" ; then echo $ac_n "checking for library containing shmalloc""... $ac_c" 1>&6 -echo "configure:3708: checking for library containing shmalloc" >&5 +echo "configure:3816: checking for library containing shmalloc" >&5 if eval "test \"`echo '$''{'ac_cv_search_shmalloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_shmalloc="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_shmalloc="none required" else @@ -3733,7 +3841,7 @@ test "$ac_cv_search_shmalloc" = "no" && for i in sma; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_shmalloc="-l$i" break @@ -3771,12 +3879,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3775: checking for ANSI C header files" >&5 +echo "configure:3883: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3784,7 +3892,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3801,7 +3909,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3819,7 +3927,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3840,7 +3948,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3851,7 +3959,7 @@ exit (0); } EOF -if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3878,7 +3986,7 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3882: checking for $ac_hdr" >&5 +echo "configure:3990: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3886,12 +3994,12 @@ pac_found_header=no if test "$CPP" != "/lib/cpp" ; then cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3906,13 +4014,13 @@ # If cpp failed, see if the compiler accepts the header. if test "$pac_found_header" != "yes" ; then cat >conftest.c< int conftest() {return 0;} EOF ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' - if { (eval echo configure:3916: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then + if { (eval echo configure:4024: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then pac_found_header=yes else echo "configure: failed program was:" >&5 @@ -3942,12 +4050,12 @@ echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3946: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4054: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3956,7 +4064,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3977,12 +4085,12 @@ fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3981: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4089: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3990,7 +4098,7 @@ struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4011,12 +4119,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4015: checking for working const" >&5 +echo "configure:4123: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4088,20 +4196,20 @@ if test $use_restrict = "yes" ; then echo $ac_n "checking for restrict""... $ac_c" 1>&6 -echo "configure:4092: checking for restrict" >&5 +echo "configure:4200: checking for restrict" >&5 if eval "test \"`echo '$''{'pac_cv_c_restrict'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* pac_cv_c_restrict="restrict" else @@ -4113,14 +4221,14 @@ rm -f conftest* if test "$pac_cv_c_restrict" = "no" ; then cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* pac_cv_c_restrict="_Restrict" else @@ -4133,14 +4241,14 @@ fi if test "$pac_cv_c_restrict" = "no" ; then cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* pac_cv_c_restrict="__restrict" else @@ -4174,16 +4282,16 @@ fi echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:4178: checking for long long" >&5 +echo "configure:4286: checking for long long" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_long_long="yes" else @@ -4388,13 +4496,18 @@ s%@CXX@%$CXX%g s%@F77@%$F77%g s%@F90@%$F90%g +s%@MPIRUN_NP@%$MPIRUN_NP%g +s%@MPIEXEC_N@%$MPIEXEC_N%g s%@MPICC@%$MPICC%g s%@MPIF77@%$MPIF77%g s%@MPIF90@%$MPIF90%g s%@MPICXX@%$MPICXX%g +s%@MPIEXEC@%$MPIEXEC%g s%@MPIRUN@%$MPIRUN%g s%@MPIBOOT@%$MPIBOOT%g s%@MPIUNBOOT@%$MPIUNBOOT%g +s%@MPCC@%$MPCC%g +s%@MPXLF@%$MPXLF%g s%@FOPTIONS@%$FOPTIONS%g s%@MAKE@%$MAKE%g s%@VPATH@%$VPATH%g --- mpich-1.2.7.orig/examples/perftest/config/confdb/aclangf90.m4 +++ mpich-1.2.7/examples/perftest/config/confdb/aclangf90.m4 @@ -194,7 +194,7 @@ _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOLS(F90, [m4_default([$1], - [f95 f90 pgf90 ifort epcf90 fort xlf95 xlf90 xlf lf95 pathf90 g95 fc ifc efc])]) + [f95 f90 pgf90 ifort epcf90 fort xlf95 xlf90 xlf lf95 pathf90 g95 gfortran ifc efc])]) # Once we find the compiler, confirm the extension AC_MSG_CHECKING([that $ac_ext works as the extension for Fortran 90 program]) @@ -1056,11 +1056,11 @@ program main integer a a = 1 - call t1(a) + call t1_2(a) end EOF cat > conftest2.f <conftest.$ac_ext <>conftest1.c <>conftest2.c <> config.log + echo "Failed program was" >> config.log + cat conftest1.c >>config.log + cat conftest2.c >>config.log + if test -s conftest.out ; then cat conftest.out >> config.log ; fi + has_pragma_weak=0 + pragma_extra_message="pragma weak accepted but does not work (probably creates two non-weak entries)" + fi else echo "$ac_link2" >>config.log echo "Failed program was" >>config.log @@ -962,6 +989,8 @@ dnl here are some possible choices dnl Solaris cc dnl -fd -v -Xc +dnl -Xc is strict ANSI (some version) and does not allow "long long", for +dnl example dnl IRIX dnl -ansi -DEBUG:trap_uninitialized=ON:varargs_interface_check=ON:verbose_runtime=ON dnl @@ -1172,6 +1201,7 @@ ac_cv_prog_cc_globals_work,[ AC_REQUIRE([AC_PROG_RANLIB]) ac_cv_prog_cc_globals_work=no +rm -f libconftest.a echo 'extern int a; int a;' > conftest1.c echo 'extern int a; int main( ){ return a; }' > conftest2.c if ${CC-cc} $CFLAGS -c conftest1.c >conftest.out 2>&1 ; then @@ -1181,6 +1211,17 @@ # Success! C works ac_cv_prog_cc_globals_work=yes else + echo "Error linking program with uninitialized global" >&AC_FD_CC + echo "Programs were:" >&AC_FD_CC + echo "conftest1.c:" >&AC_FD_CC + cat conftest1.c >&AC_FD_CC + echo "conftest2.c:" >&AC_FD_CC + cat conftest2.c >&AC_FD_CC + echo "and link line was:" >&AC_FD_CC + echo "${CC-cc} $CFLAGS -o conftest conftest2.c $LDFLAGS libconftest.a" >&AC_FD_CC + echo "with output:" >&AC_FD_CC + cat conftest.out >&AC_FD_CC + # Failure! Do we need -fno-common? ${CC-cc} $CFLAGS -fno-common -c conftest1.c >> conftest.out 2>&1 rm -f libconftest.a @@ -1191,7 +1232,9 @@ CFLAGS="$CFLAGS -fno-common" elif test -n "$RANLIB" ; then # Try again, with ranlib changed to ranlib -c - ${RANLIB} -c libconftest.a + # (send output to /dev/null incase this ranlib + # doesn't know -c) + ${RANLIB} -c libconftest.a >/dev/null 2>&1 if ${CC-cc} $CFLAGS -o conftest conftest2.c $LDFLAGS libconftest.a >> conftest.out 2>&1 ; then RANLIB="$RANLIB -c" #else @@ -1450,6 +1493,13 @@ fprintf(f, "%d\n", sizeof(a) + sizeof(b)); exit(0); }],AC_CV_NAME=`cat conftestval`,AC_CV_NAME=0,ifelse([$4],,,AC_CV_NAME=$4))]) +if test "X$AC_CV_NAME" = "X" ; then + # We have a problem. The test returned a zero status, but no output, + # or we're cross-compiling (or think we are) and have no value for + # this object + : +fi +rm -f conftestval AC_MSG_RESULT($AC_CV_NAME) dnl AC_DEFINE_UNQUOTED(AC_TYPE_NAME,$AC_CV_NAME) undefine([AC_TYPE_NAME])undefine([AC_CV_NAME]) --- mpich-1.2.7.orig/examples/perftest/config/confdb/aclocal_csharp.m4 +++ mpich-1.2.7/examples/perftest/config/confdb/aclocal_csharp.m4 @@ -23,7 +23,11 @@ ac_ext=$pac_cv_csharp_ext ac_compile='${CSHARP-csc} -c $CSFLAGS conftest.$ac_ext 1>&AC_FD_CC' ac_link='${CSHARP-csc} -o conftest${ac_exeext} $CSFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$pac_cv_prog_csharp_cross +dnl cross_compiling no longer maintained by autoconf as part of the +dnl AC_LANG changes. If we set it here, a later AC_LANG may not +dnl restore it (in the case where one compiler claims to be a cross compiler +dnl and another does not) +dnl cross_compiling=$pac_cv_prog_csharp_cross ]) AC_DEFUN(PAC_PROG_CSHARP,[ if test -z "$CSHARP" ; then --- mpich-1.2.7.orig/examples/perftest/config/confdb/aclocal_f77.m4 +++ mpich-1.2.7/examples/perftest/config/confdb/aclocal_f77.m4 @@ -124,11 +124,15 @@ *) AC_MSG_WARN([Unknown Fortran naming scheme]) ;; esac AC_SUBST(F77_NAME_MANGLE) +# Get the standard call definition +# FIXME: This should use F77_STDCALL, not STDCALL (non-conforming name) if test "X$pac_cv_test_stdcall" = "X" ; then - AC_DEFINE(STDCALL,,[Define calling convention]) + F77_STDCALL="" else - AC_DEFINE(STDCALL,__stdcall,[Define calling convention]) + F77_STDCALL="__stdcall" fi +# +AC_DEFINE_UNQUOTED(STDCALL,$F77_STDCALL,[Define calling convention]) ],[$1]) ]) dnl @@ -335,10 +339,9 @@ pac_cv_prog_f77_exclaim_comments,[ AC_LANG_SAVE AC_LANG_FORTRAN77 -AC_TRY_COMPILE(,[ -! This is a comment -],pac_cv_prog_f77_exclaim_comments="yes", -pac_cv_prog_f77_exclaim_comments="no") +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[! This is a comment])], + pac_cv_prog_f77_exclaim_comments="yes", + pac_cv_prog_f77_exclaim_comments="no") AC_LANG_RESTORE ]) if test "$pac_cv_prog_f77_exclaim_comments" = "yes" ; then @@ -723,6 +726,13 @@ continue fi ;; + 7) # gfortran won't find getarg if it is marked as external + FXX_MODULE="" + F77_GETARGDECL="intrinsic GETARG" + F77_GETARG="call GETARG(i,s)" + F77_IARGC="IARGC()" + MSG="intrinsic GETARG and IARGC" + ;; *) # exit from while loop FXX_MODULE="" F77_GETARGDECL="" @@ -854,8 +864,11 @@ ac_fcompileforlib='${F77-f77} -c $FFLAGS conftest1.f 1>&AC_FD_CC' if AC_TRY_EVAL(ac_fcompileforlib) && test -s conftest1.o ; then if test ! -d conftest ; then mkdir conftest2 ; fi - dnl Use arcmd incase AR is defined as "ar cr" - AC_TRY_COMMAND(${ARCMD-"ar"} cr conftest2/libconftest.a conftest1.o) + # We have had some problems with "AR" set to "ar cr"; this is + # a user-error; AR should be set to just the program (plus + # any flags that affect the object file format, such as -X64 + # required for 64-bit objects in some versions of AIX). + AC_TRY_COMMAND(${AR-"ar"} cr conftest2/libconftest.a conftest1.o) AC_TRY_COMMAND(${RANLIB-ranlib} conftest2/libconftest.a) ac_fcompileldtest='${F77-f77} -o conftest $FFLAGS ${ldir}conftest2 conftest.f -lconftest $LDFLAGS 1>&AC_FD_CC' for ldir in "-L" "-Wl,-L," ; do @@ -977,11 +990,13 @@ pac_cv_prog_f77_has_pointer,[ AC_LANG_SAVE AC_LANG_FORTRAN77 -AC_TRY_COMPILE(,[ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ integer M pointer (MPTR,M) data MPTR/0/ -],pac_cv_prog_f77_has_pointer="yes",pac_cv_prog_f77_has_pointer="no") +])], + pac_cv_prog_f77_has_pointer="yes", + pac_cv_prog_f77_has_pointer="no") AC_LANG_RESTORE ]) if test "$pac_cv_prog_f77_has_pointer" = "yes" ; then @@ -1161,9 +1176,14 @@ end EOF if AC_TRY_EVAL(ac_compile); then - if ${F77} -o conftest conftest.o conftest1.o $LDFLAGS 2>&AC_FD_CC ; then + # We include $FFLAGS on the link line because this is + # the way in which most of the configure tests run. In particular, + # many users are used to using FFLAGS (and CFLAGS) to select + # different instruction sets, such as 64-bit with -xarch=v9 for + # Solaris. + if ${F77} ${FFLAGS} -o conftest conftest.o conftest1.o $LDFLAGS 2>&AC_FD_CC ; then AC_MSG_RESULT([Use Fortran to link programs]) - elif ${CC} -o conftest conftest.o conftest1.o $LDFLAGS $FLIBS 2>&AC_FD_CC ; then + elif ${CC} ${CFLAGS} -o conftest conftest.o conftest1.o $LDFLAGS $FLIBS 2>&AC_FD_CC ; then AC_MSG_RESULT([Use C with FLIBS to link programs]) F77LINKER="$CC" F77_LDFLAGS="$F77_LDFLAGS $FLIBS" @@ -1215,10 +1235,9 @@ pac_cv_prog_f77_new_char_decl,[ AC_LANG_SAVE AC_LANG_FORTRAN77 -AC_TRY_COMPILE(,[ - character (len=10) s -],pac_cv_prog_f77_new_char_decl="yes", -pac_cv_prog_f77_new_char_decl="no") +AC_COMPILE_IFLESE([AC_LANG_PROGRAM(,[ character (len=10) s])], + pac_cv_prog_f77_new_char_decl="yes", + pac_cv_prog_f77_new_char_decl="no") AC_LANG_RESTORE ]) if test "$pac_cv_prog_f77_new_char_decl" = "yes" ; then --- mpich-1.2.7.orig/examples/perftest/config/confdb/aclocal_f90.m4 +++ mpich-1.2.7/examples/perftest/config/confdb/aclocal_f90.m4 @@ -10,7 +10,11 @@ ac_ext=$pac_cv_f90_ext ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&AC_FD_CC' ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$pac_cv_prog_f90_cross +dnl cross_compiling no longer maintained by autoconf as part of the +dnl AC_LANG changes. If we set it here, a later AC_LANG may not +dnl restore it (in the case where one compiler claims to be a cross compiler +dnl and another does not) +dnl cross_compiling=$pac_cv_prog_f90_cross ]) dnl dnl This is an addition for AC_TRY_COMPILE, but for f90. If the current @@ -322,7 +326,7 @@ # ifc - An older Intel compiler AC_DEFUN(PAC_PROG_F90,[ if test -z "$F90" ; then - AC_CHECK_PROGS(F90,f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 fc ifc efc) + AC_CHECK_PROGS(F90,f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 gfortran ifc efc) test -z "$F90" && AC_MSG_WARN([no acceptable Fortran 90 compiler found in \$PATH]) fi if test -n "$F90" ; then @@ -382,7 +386,11 @@ ac_ext=$pac_cv_f90_ext ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&AC_FD_CC' ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$pac_cv_prog_f90_cross +dnl cross_compiling no longer maintained by autoconf as part of the +dnl AC_LANG changes. If we set it here, a later AC_LANG may not +dnl restore it (in the case where one compiler claims to be a cross compiler +dnl and another does not) +dnl cross_compiling=$pac_cv_prog_f90_cross # Include a Fortran 90 construction to distinguish between Fortran 77 # and Fortran 90 compilers. cat >conftest.$ac_ext < conftest2.f <' was given. @@ -101,6 +102,13 @@ dnl programs that may need to be run before and after running MPI programs. dnl For example, 'MPIBOOT' may start demons necessary to run MPI programs and dnl 'MPIUNBOOT' will stop those demons. +dnl +dnl The two forms of the compilers are to allow for tests of the compiler +dnl when the MPI version of the compiler creates executables that cannot +dnl be run on the local system (for example, the IBM SP, where executables +dnl created with mpcc will not run locally, but executables created +dnl with xlc may be used to discover properties of the compiler, such as +dnl the size of data types). dnl dnl See also: dnl PAC_LANG_PUSH_COMPILERS, PAC_LIB_MPI @@ -137,6 +145,11 @@ if test "$ac_mpi_type" = "unknown" -a "$pac_lib_mpi_is_building" = "yes" ; then ac_mpi_type="mpich" fi +# Set defaults +MPIRUN_NP="-np " +MPIEXEC_N="-n " +AC_SUBST(MPIRUN_NP) +AC_SUBST(MPIEXEC_N) case $ac_mpi_type in mpich) dnl @@ -165,6 +178,7 @@ TESTCXX=${CXX-CC} CXX="$MPICXX" # We may want to restrict this to the path containing mpirun + AC_PATH_PROG(MPIEXEC,mpiexec) AC_PATH_PROG(MPIRUN,mpirun) AC_PATH_PROG(MPIBOOT,mpichboot) AC_PATH_PROG(MPIUNBOOT,mpichstop) @@ -228,6 +242,11 @@ ;; ibmmpi) + AC_CHECK_PROGS(MPCC,mpcc) + AC_CHECK_PROGS(MPXLF,mpxlf) + if test -z "$MPCC" -o -z "$MPXLF" ; then + AC_MSG_ERROR([Could not find IBM MPI compilation scripts. Either mpcc or mpxlf is missing]) + fi TESTCC=${CC-xlC}; TESTF77=${F77-xlf}; CC=mpcc; F77=mpxlf # There is no mpxlf90, but the options langlvl and free can # select the F90 version of xlf --- mpich-1.2.7.orig/examples/perftest/config/confdb/aclocal_shl.m4 +++ mpich-1.2.7/examples/perftest/config/confdb/aclocal_shl.m4 @@ -101,6 +101,9 @@ *CYGWIN*|*cygwin*) AC_MSG_ERROR([You must specify --enable-sharedlibs=cygwin-gcc for Cygwin]) ;; + *SunOS*) + AC_MSG_ERROR([You must specify --enable-sharedlibs=solaris-gcc for Solaris with gcc]) + ;; esac ;; @@ -158,6 +161,15 @@ C_LINKPATH_SHL="-R" enable_sharedlibs="solaris-cc" ;; + + solaris-gcc) + # This is the same as gcc, except for the C_LINKPATH_SHL + AC_MSG_RESULT([Creating shared libraries using Solaris with gcc]) + C_LINK_SHL='${CC} -shared' + CC_SHL='${CC} -fPIC' + C_LINKPATH_SHL="-R" + enable_sharedlibs="solaris-gcc" + ;; *) AC_MSG_ERROR([Unknown value $enable_sharedlibs for enable-sharedlibs]) enable_sharedlibs=no --- mpich-1.2.7.orig/examples/perftest/config/confdb/fortran90.m4 +++ mpich-1.2.7/examples/perftest/config/confdb/fortran90.m4 @@ -250,6 +250,9 @@ # ifort is another name for the Inten f90 compiler # efc - An older Intel compiler (?) # ifc - An older Intel compiler +# fc - A compiler on some unknown system. This has been removed because +# it may also be the name of a command for something other than +# the Fortran compiler (e.g., fc=file system check!) AC_DEFUN([AC_PROG_F90], [# This is the fortran90 version of f90 language support AC_LANG_PUSH(Fortran 90)dnl @@ -258,7 +261,7 @@ _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOLS(F90, [m4_default([$1], - [f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 fc ifc efc])]) + [f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 gfortran ifc efc])]) # once we find the compiler, confirm the extension AC_MSG_CHECKING([that $ac_ext works as the extension for Fortran 90 program]) @@ -1111,7 +1114,9 @@ save_ac_f90ext=$ac_f90ext ac_f90ext="f90" AC_LANG_PUSH(Fortran 90) -AC_TRY_COMPILE(,,pac_cv_f90_ext_f90="yes",pac_cv_f90_ext_f90="no") +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,)], + pac_cv_f90_ext_f90="yes", + pac_cv_f90_ext_f90="no") AC_LANG_POP ]) if test "$pac_cv_f90_ext_f90" = "yes" ; then @@ -1138,11 +1143,11 @@ program main integer a a = 1 - call t1(a) + call t1_2(a) end EOF cat > conftest2.f <conftest.$ac_ext </dev/null ; then pac_cv_prog_f90_cross="no" @@ -1236,5 +1245,9 @@ fi AC_MSG_CHECKING([whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) is a cross-compiler]) AC_MSG_RESULT($pac_cv_prog_f90_cross) -cross_compiling=$pac_cv_prog_f90_cross +dnl cross_compiling no longer maintained by autoconf as part of the +dnl AC_LANG changes. If we set it here, a later AC_LANG may not +dnl restore it (in the case where one compiler claims to be a cross compiler +dnl and another does not) +dnl cross_compiling=$pac_cv_prog_f90_cross ]) --- mpich-1.2.7.orig/examples/test/configure +++ mpich-1.2.7/examples/test/configure @@ -307,8 +307,19 @@ -with-mpich=*|--with-mpich=*) mpichpath=`echo A$arg | sed 's/A-*with-mpich=//'` - MPIRUNARGS='"-mvhome"' - MPIRUNMVBACK="-mvback" + # Let the user provide the top-level path for MPICH as well + # as the bin directory + if test ! -x "$mpichpath/mpicc" -a -x "$mpichpath/bin/mpicc" ; then + mpichpath="$mpichpath/mpicc" + fi + # Check for mpiexec; if found, use it, otherwise, set MPICH-1 specific + # mpirun options + if test -x "$mpichpath/mpiexec" ; then + MPIRUN="$mpichpath/mpiexec" + elif test -z "$MPIRUN" ; then + MPIRUNARGS='"-mvhome"' + MPIRUNMVBACK="-mvback" + fi MPIINCDIR=$mpichpath/../include ;; -mpi2) @@ -2433,9 +2444,6 @@ # # MPE_CFLAGS="$MPE_CFLAGS $DEFS" -if test -n "$MPILIBNAME" ; then - LIB_LIST="$LIB_LIST -l$MPILIBNAME" -fi # # We can check for MPICH by trying to compile a program that uses MPICH_NAME @@ -2527,10 +2535,16 @@ return 0; } EOF - if $MPICC -o conftest conftest.c $LIB_LIST >conftest.log 2>&1 ; then - : + if test -n "$MPILIBNAME" ; then + TLIB_LIST="$LIB_LIST -l$MPILIBNAME" + fi + if $MPICC -o conftest conftest.c $LIB_LIST > conftest.log 2>&1 ; then + : + elif $MPICC -o conftest conftest.c $TLIB_LIST >conftest.log 2>&1 ; then + # Accept the -l$MPILIBNAME in the liblist + LIB_LIST=$TLIB_LIST else - # Try adding -lmpi + # Try adding -lmpi instead of $MPILIBNAME rm conftest.log if $MPICC -o conftest conftest.c $LIB_LIST -lmpi >conftest.log 2>&1 ; then LIB_LIST="$LIB_LIST -lmpi" @@ -2540,7 +2554,10 @@ else echo "$ac_t""Warning: Could not compile/link a program containing MPI_Init" 1>&1 fi - if test -s conftest.log ; then cat conftest.out ; fi + echo "Test program was:" + cat conftest.c + echo "Compiler output was:" + if test -s conftest.log ; then cat conftest.log ; fi fi fi rm -f conftest* @@ -2933,7 +2950,7 @@ echo creating $file rm -f $file echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file -cat $top_srcdir/${file}.in | sed -e " + sed -e " $prsub $extrasub s%@prefix@%$prefix%g @@ -2975,7 +2992,7 @@ s%@MPICH_VERSION@%$MPICH_VERSION%g s%@MPIR_HOME@%$MPIR_HOME%g s%@MPI_FOBJECTS@%$MPI_FOBJECTS%g -s%@MPIFDEP@%$MPIFDEP%g" | sed -e " +s%@MPIFDEP@%$MPIFDEP%g s%@MPILIBNAME@%$MPILIBNAME%g s%@MPICC@%$MPICC%g s%@MPIF77@%$MPIF77%g @@ -2990,7 +3007,7 @@ s%@LIBS@%$LIBS%g s%@srcdir@%$srcdir%g s%@DEFS@%$DEFS% -" >> $file +" $top_srcdir/${file}.in >> $file fi; done --- mpich-1.2.7.orig/examples/test/configure.in +++ mpich-1.2.7/examples/test/configure.in @@ -319,8 +319,19 @@ -with-mpich=*|--with-mpich=*) mpichpath=`echo A$arg | sed 's/A-*with-mpich=//'` - MPIRUNARGS='"-mvhome"' - MPIRUNMVBACK="-mvback" + # Let the user provide the top-level path for MPICH as well + # as the bin directory + if test ! -x "$mpichpath/mpicc" -a -x "$mpichpath/bin/mpicc" ; then + mpichpath="$mpichpath/mpicc" + fi + # Check for mpiexec; if found, use it, otherwise, set MPICH-1 specific + # mpirun options + if test -x "$mpichpath/mpiexec" ; then + MPIRUN="$mpichpath/mpiexec" + elif test -z "$MPIRUN" ; then + MPIRUNARGS='"-mvhome"' + MPIRUNMVBACK="-mvback" + fi MPIINCDIR=$mpichpath/../include ;; -mpi2) @@ -681,9 +692,6 @@ # # MPE_CFLAGS="$MPE_CFLAGS $DEFS" -if test -n "$MPILIBNAME" ; then - LIB_LIST="$LIB_LIST -l$MPILIBNAME" -fi # # We can check for MPICH by trying to compile a program that uses MPICH_NAME @@ -705,16 +713,25 @@ return 0; } EOF - if $MPICC -o conftest conftest.c $LIB_LIST >conftest.log 2>&1 ; then - : + if test -n "$MPILIBNAME" ; then + TLIB_LIST="$LIB_LIST -l$MPILIBNAME" + fi + if $MPICC -o conftest conftest.c $LIB_LIST > conftest.log 2>&1 ; then + : + elif $MPICC -o conftest conftest.c $TLIB_LIST >conftest.log 2>&1 ; then + # Accept the -l$MPILIBNAME in the liblist + LIB_LIST=$TLIB_LIST else - # Try adding -lmpi + # Try adding -lmpi instead of $MPILIBNAME rm conftest.log if $MPICC -o conftest conftest.c $LIB_LIST -lmpi >conftest.log 2>&1 ; then LIB_LIST="$LIB_LIST -lmpi" else AC_MSG_WARN([Could not compile/link a program containing MPI_Init]) - if test -s conftest.log ; then cat conftest.out ; fi + echo "Test program was:" + cat conftest.c + echo "Compiler output was:" + if test -s conftest.log ; then cat conftest.log ; fi fi fi rm -f conftest* --- mpich-1.2.7.orig/examples/test/context/ictest2.c +++ mpich-1.2.7/examples/test/context/ictest2.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; c-basic-offset:4 ; -*- */ /* ictest2.c This is like ictest.c, but it creates communictors that are valid only at the "leaders"; other members of the local communicator are NOT @@ -15,6 +16,8 @@ #include #include "test.h" +int verbose = 0; + int main( int argc, char **argv ) { int size, rank, key, lrank, rsize, result, remLeader = 0; @@ -41,14 +44,14 @@ if (key == 1) { /* Odd rank communicator discarded */ MPI_Comm_free( &evenComm ); - } - + } + /* Create the odd communicator */ MPI_Comm_split ( MPI_COMM_WORLD, key, rank, &oddComm ); if (key == 0) { /* Even rank communicator discarded */ MPI_Comm_free( &oddComm ); - } + } /* Create the odd + 0 communicator */ if (rank == 0) key = 1; @@ -56,58 +59,75 @@ if (key == 0) { /* Even rank communicator discarded */ MPI_Comm_free( &remComm ); - } + } else { MPI_Comm_rank( remComm, &lrank ); - printf( "[%d] lrank in remComm is %d (color = %d, key=%d)\n", - rank, lrank, rank, key ); - remLeader = (lrank == 0) ? 1 : 0; + if (verbose) { + printf( "[%d] lrank in remComm is %d (color = %d, key=%d)\n", + rank, lrank, rank, key ); } + remLeader = (lrank == 0) ? 1 : 0; + } /* Now, choose the local and remote communicators */ if (rank % 2) { /* Odd */ myComm = oddComm; - } + } else { myComm = evenComm; - } + } /* Check that the leader is who we think he is */ MPI_Comm_rank( myComm, &lrank ); - printf( "[%d] local rank is %d\n", rank, lrank ); + if (verbose) { + printf( "[%d] local rank is %d\n", rank, lrank ); + } if (rank == 0) { int trank; MPI_Comm_rank( myComm, &trank ); if (trank != 0) { printf( "[%d] Comm split improperly ordered group (myComm)\n", rank ); - } + fflush(stdout); + errors++; + } MPI_Comm_rank( remComm, &trank ); if (trank != 0) { printf( "[%d] Comm split improperly ordered group (remComm)\n", rank ); - } + fflush(stdout); + errors++; } - fflush(stdout); + } /* Perform the intercomm create and test it */ /* local leader is first process in local_comm, i.e., has rank 0 */ /* remote leader is process 0 (if odd) or 1 (if even) in remComm */ MPI_Intercomm_create (myComm, 0, remComm, remLeader, 1, &myFirstComm ); /* temp */ - printf( "[%d] through intercom create\n", rank ); - fflush( stdout ); + if (verbose) { + printf( "[%d] through intercom create\n", rank ); + fflush( stdout ); + } MPI_Barrier( MPI_COMM_WORLD ); - printf( "[%d] through barrier at end of intercom create\n", rank ); + if (verbose) { + printf( "[%d] through barrier at end of intercom create\n", rank ); + fflush( stdout ); + } /* temp */ /* Try to dup this communicator */ MPI_Comm_dup ( myFirstComm, &mySecondComm ); /* temp */ - printf( "[%d] through comm dup\n", rank ); - fflush( stdout ); + if (verbose) { + printf( "[%d] through comm dup\n", rank ); + fflush( stdout ); + } MPI_Barrier( MPI_COMM_WORLD ); - printf( "[%d] through barrier at end of comm dup\n", rank ); + if (verbose) { + printf( "[%d] through barrier at end of comm dup\n", rank ); + fflush( stdout ); + } /* temp */ /* Each member shares data with his "partner". Note that process 0 in @@ -116,9 +136,11 @@ MPI_Comm_rank( mySecondComm, &lrank ); MPI_Comm_remote_size( mySecondComm, &rsize ); - printf( "[%d] lrank in secondcomm is %d and remote size is %d\n", - rank, lrank, rsize ); - fflush( stdout ); + if (verbose) { + printf( "[%d] lrank in secondcomm is %d and remote size is %d\n", + rank, lrank, rsize ); + fflush( stdout ); + } /* Send key * size + rank in communicator */ if (lrank < rsize) { @@ -126,9 +148,11 @@ key = rank % 2; myval = key * size + lrank; hisval = -1; - printf( "[%d] exchanging %d with %d in intercomm\n", - rank, myval, lrank ); - fflush( stdout ); + if (verbose) { + printf( "[%d] exchanging %d with %d in intercomm\n", + rank, myval, lrank ); + fflush( stdout ); + } MPI_Sendrecv (&myval, 1, MPI_INT, lrank, 0, &hisval, 1, MPI_INT, lrank, 0, mySecondComm, &status); if (hisval != (lrank + (!key)*size)) { @@ -138,8 +162,10 @@ } } - if (errors) - printf("[%d] Failed!\n",rank); + if (errors) { + printf("[%d] Failed!\n",rank); + fflush(stdout); + } /* Key is 1 for oddComm, 0 for evenComm (note both contain 0 in WORLD) */ MPI_Intercomm_merge ( mySecondComm, key, &merge1 ); @@ -155,7 +181,9 @@ /* Free communicators */ MPI_Comm_free( &myComm ); - MPI_Comm_free( &remComm ); + /* remComm may have been freed above */ + if (remComm != MPI_COMM_NULL) + MPI_Comm_free( &remComm ); MPI_Comm_free( &myFirstComm ); MPI_Comm_free( &mySecondComm ); MPI_Comm_free( &merge1 ); @@ -163,8 +191,9 @@ MPI_Comm_free( &merge3 ); MPI_Comm_free( &merge4 ); } - else - printf("[%d] Failed - at least 2 nodes must be used\n",rank); + else { + printf("[%d] Failed - at least 2 nodes must be used\n",rank); + } MPI_Barrier( MPI_COMM_WORLD ); MPI_Allreduce( &errors, &sum_errors, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD ); @@ -172,20 +201,9 @@ printf( "%d errors on process %d\n", errors, rank ); } else if (rank == 0) { - printf( "Completed successfully\n" ); + printf( " No Errors\n" ); } - /* Finalize and end! */ MPI_Finalize(); return 0; } - - - - - - - - - - --- mpich-1.2.7.orig/examples/test/pt2pt/issendtest.c +++ mpich-1.2.7/examples/test/pt2pt/issendtest.c @@ -51,11 +51,19 @@ Current_Test = "Testing timer"; t0 = MPI_Wtime(); if (t0 == 0 && MPI_Wtime() == 0) { - fprintf( stderr, - "MPI_WTIME is returning 0; a working value is needed\n\ + int loopcount = 1000000; + /* This test is too severe (systems with fast + processors and large MPI_Wtick values can + fail. Try harder to test MPI_Wtime */ + while (loopcount-- && MPI_Wtime() == 0) ; + if (loopcount <= 0) { + fprintf( stderr, + "MPI_WTIME is returning 0; a working value is needed\n\ for this test.\n" ); - Test_Failed(Current_Test); - MPI_Abort( MPI_COMM_WORLD, 1 ); + Test_Failed(Current_Test); + MPI_Abort( MPI_COMM_WORLD, 1 ); + } + t0 = MPI_Wtime(); } /* Test that the timer increases */ Current_Test = "Testing timer increases"; --- mpich-1.2.7.orig/examples/test/pt2pt/order.c +++ mpich-1.2.7/examples/test/pt2pt/order.c @@ -24,14 +24,18 @@ /* This test depends on a working wtime. Make a simple check */ t0 = MPI_Wtime(); if (t0 == 0 && MPI_Wtime() == 0) { - /* We MAY have a problem. Check some more */ - for (a=0; a<1000; a++) t0 = MPI_Wtime(); - if (t0 == 0) { + int loopcount = 1000000; + /* This test is too severe (systems with fast + processors and large MPI_Wtick values can + fail. Try harder to test MPI_Wtime */ + while (loopcount-- && MPI_Wtime() == 0) ; + if (loopcount <= 0) { fprintf( stderr, "MPI_WTIME is returning 0; a working value is needed\n\ for this test.\n" ); MPI_Abort( MPI_COMM_WORLD, 1 ); } + t0 = MPI_Wtime(); } easy = 1; --- mpich-1.2.7.orig/examples/test/pt2pt/runtests.in +++ mpich-1.2.7/examples/test/pt2pt/runtests.in @@ -91,6 +91,8 @@ # If cannot run test, do that and exit if [ $check_canrun = 1 ] ; then + # Make sure that we don't have an old file lying around + rm -f third third.o third.exe MakeExe third rm -f third.out echo '*** Testing Unexpected messages ***' >> third.out --- mpich-1.2.7.orig/examples/test/pt2pt/ssendtest.c +++ mpich-1.2.7/examples/test/pt2pt/ssendtest.c @@ -78,11 +78,19 @@ flag = 0; /* This test depends on a working wtime. Make a simple check */ if (t0 == 0 && MPI_Wtime() == 0) { - fprintf( stderr, - "MPI_WTIME is returning 0; a working value is needed\n\ + int loopcount = 1000000; + /* This test is too severe (systems with fast + processors and large MPI_Wtick values can + fail. Try harder to test MPI_Wtime */ + while (loopcount-- && MPI_Wtime() == 0) ; + if (loopcount <= 0) { + fprintf( stderr, + "MPI_WTIME is returning 0; a working value is needed\n\ for this test.\n" ); - Test_Failed(Current_Test); - MPI_Abort( MPI_COMM_WORLD, 1 ); + Test_Failed(Current_Test); + MPI_Abort( MPI_COMM_WORLD, 1 ); + } + t0 = MPI_Wtime(); } while (MPI_Wtime() - t0 < MAX_TIME) { MPI_Iprobe( src, 2, MPI_COMM_WORLD, &flag, &status ); --- mpich-1.2.7.orig/include/patchlevel.h +++ mpich-1.2.7/include/patchlevel.h @@ -2,14 +2,14 @@ #define PATCHLEVEL_MAJOR 1 #define PATCHLEVEL_MINOR 2 #define PATCHLEVEL_SUBMINOR 7 -#define PATCHLEVEL_STRING "1.2.7" +#define PATCHLEVEL_STRING "1.2.7p1" #define PATCHLEVEL_RELEASE_KIND "release first patches" #ifndef PATCHLEVEL_RELEASE_DATE #ifdef RELEASE_DATE #define PATCHLEVEL_RELEASE_DATE RELEASE_DATE #else -#define PATCHLEVEL_RELEASE_DATE "$Date: 2005/06/22 16:33:49$" +#define PATCHLEVEL_RELEASE_DATE "$Date: 2005/11/04 11:54:51$" #endif #endif --- mpich-1.2.7.orig/man/man3/MPI_Waitsome.3 +++ mpich-1.2.7/man/man3/MPI_Waitsome.3 @@ -1,4 +1,4 @@ -.TH MPI_Waitsome 3 "1/9/2003" " " "MPI" +.TH MPI_Waitsome 3 "8/15/2005" " " "MPI" .SH NAME MPI_Waitsome \- Waits for some given communications to complete .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_close.3 +++ mpich-1.2.7/man/man3/MPI_File_close.3 @@ -1,4 +1,4 @@ -.TH MPI_File_close 3 "5/23/2005" " " "MPI-2" +.TH MPI_File_close 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_close \- Closes a file .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_delete.3 +++ mpich-1.2.7/man/man3/MPI_File_delete.3 @@ -1,4 +1,4 @@ -.TH MPI_File_delete 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_delete 3 "7/9/2005" " " "MPI-2" .SH NAME MPI_File_delete \- Deletes a file .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_c2f.3 +++ mpich-1.2.7/man/man3/MPI_File_c2f.3 @@ -1,4 +1,4 @@ -.TH MPI_File_c2f 3 "10/4/2004" " " "MPI-2" +.TH MPI_File_c2f 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_c2f \- Translates a C file handle to a Fortran file handle .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_f2c.3 +++ mpich-1.2.7/man/man3/MPI_File_f2c.3 @@ -1,4 +1,4 @@ -.TH MPI_File_f2c 3 "10/4/2004" " " "MPI-2" +.TH MPI_File_f2c 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_f2c \- Translates a Fortran file handle to a C file handle .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_sync.3 +++ mpich-1.2.7/man/man3/MPI_File_sync.3 @@ -1,4 +1,4 @@ -.TH MPI_File_sync 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_sync 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_sync \- Causes all previous writes to be transferred to the storage device .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_get_amode.3 +++ mpich-1.2.7/man/man3/MPI_File_get_amode.3 @@ -1,4 +1,4 @@ -.TH MPI_File_get_amode 3 "2/18/2005" " " "MPI-2" +.TH MPI_File_get_amode 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_get_amode \- Returns the file access mode .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_get_atomicity.3 +++ mpich-1.2.7/man/man3/MPI_File_get_atomicity.3 @@ -1,4 +1,4 @@ -.TH MPI_File_get_atomicity 3 "2/18/2005" " " "MPI-2" +.TH MPI_File_get_atomicity 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_get_atomicity \- Returns the atomicity mode .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_get_byte_offset.3 +++ mpich-1.2.7/man/man3/MPI_File_get_byte_offset.3 @@ -1,4 +1,4 @@ -.TH MPI_File_get_byte_offset 3 "5/23/2005" " " "MPI-2" +.TH MPI_File_get_byte_offset 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_get_byte_offset \- Returns the absolute byte position in the file corresponding to "offset" etypes relative to the current view .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_get_errhandler.3 +++ mpich-1.2.7/man/man3/MPI_File_get_errhandler.3 @@ -1,4 +1,4 @@ -.TH MPI_File_get_errhandler 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_get_errhandler 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_get_errhandler \- Returns the error handler for a file .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_get_type_extent.3 +++ mpich-1.2.7/man/man3/MPI_File_get_type_extent.3 @@ -1,4 +1,4 @@ -.TH MPI_File_get_type_extent 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_get_type_extent 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_get_type_extent \- Returns the extent of datatype in the file .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_get_group.3 +++ mpich-1.2.7/man/man3/MPI_File_get_group.3 @@ -1,4 +1,4 @@ -.TH MPI_File_get_group 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_get_group 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_get_group \- Returns the group of processes that opened the file .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_get_info.3 +++ mpich-1.2.7/man/man3/MPI_File_get_info.3 @@ -1,4 +1,4 @@ -.TH MPI_File_get_info 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_get_info 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_get_info \- Returns the hints for a file that are actually being used by MPI .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_get_position.3 +++ mpich-1.2.7/man/man3/MPI_File_get_position.3 @@ -1,4 +1,4 @@ -.TH MPI_File_get_position 3 "5/23/2005" " " "MPI-2" +.TH MPI_File_get_position 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_get_position \- Returns the current position of the individual file pointer in etype units relative to the current view .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_get_position_shared.3 +++ mpich-1.2.7/man/man3/MPI_File_get_position_shared.3 @@ -1,4 +1,4 @@ -.TH MPI_File_get_position_shared 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_get_position_shared 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_get_position_shared \- Returns the current position of the shared file pointer in etype units relative to the current view .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_get_size.3 +++ mpich-1.2.7/man/man3/MPI_File_get_size.3 @@ -1,4 +1,4 @@ -.TH MPI_File_get_size 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_get_size 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_get_size \- Returns the file size .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_get_view.3 +++ mpich-1.2.7/man/man3/MPI_File_get_view.3 @@ -1,4 +1,4 @@ -.TH MPI_File_get_view 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_get_view 3 "8/11/2005" " " "MPI-2" .SH NAME MPI_File_get_view \- Returns the file view .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPIO_Request_c2f.3 +++ mpich-1.2.7/man/man3/MPIO_Request_c2f.3 @@ -1,4 +1,4 @@ -.TH MPIO_Request_c2f 3 "2/17/2005" " " "MPI-2" +.TH MPIO_Request_c2f 3 "6/8/2005" " " "MPI-2" .SH NAME MPIO_Request_c2f \- Translates a C I/O-request handle to a Fortran I/O-request handle .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPIO_Request_f2c.3 +++ mpich-1.2.7/man/man3/MPIO_Request_f2c.3 @@ -1,4 +1,4 @@ -.TH MPIO_Request_f2c 3 "2/17/2005" " " "MPI-2" +.TH MPIO_Request_f2c 3 "6/8/2005" " " "MPI-2" .SH NAME MPIO_Request_f2c \- Translates a Fortran I/O-request handle to a C I/O-request handle .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPIO_Test.3 +++ mpich-1.2.7/man/man3/MPIO_Test.3 @@ -1,4 +1,4 @@ -.TH MPIO_Test 3 "2/17/2005" " " "MPI-2" +.TH MPIO_Test 3 "6/8/2005" " " "MPI-2" .SH NAME MPIO_Test \- Test the completion of a nonblocking read or write .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPIO_Wait.3 +++ mpich-1.2.7/man/man3/MPIO_Wait.3 @@ -1,4 +1,4 @@ -.TH MPIO_Wait 3 "2/17/2005" " " "MPI-2" +.TH MPIO_Wait 3 "6/8/2005" " " "MPI-2" .SH NAME MPIO_Wait \- Waits for the completion of a nonblocking read or write .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_iread.3 +++ mpich-1.2.7/man/man3/MPI_File_iread.3 @@ -1,4 +1,4 @@ -.TH MPI_File_iread 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_iread 3 "9/10/2005" " " "MPI-2" .SH NAME MPI_File_iread \- Nonblocking read using individual file pointer .SH SYNOPSIS @@ -6,8 +6,8 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -int MPI_File_iread(MPI_File mpi_fh, void *buf, int count, - MPI_Datatype datatype, MPIO_Request *request) +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iread_args .fi .SH INPUT PARAMETERS .PD 0 --- mpich-1.2.7.orig/man/man3/MPI_File_iread_at.3 +++ mpich-1.2.7/man/man3/MPI_File_iread_at.3 @@ -1,13 +1,13 @@ -.TH MPI_File_iread_at 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_iread_at 3 "9/10/2005" " " "MPI-2" .SH NAME MPI_File_iread_at \- Nonblocking read using explict offset .SH SYNOPSIS .nf #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -int MPI_File_iread_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, - int count, MPI_Datatype datatype, - MPIO_Request *request) + +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iread_at_args .fi .SH INPUT PARAMETERS .PD 0 --- mpich-1.2.7.orig/man/man3/MPI_File_iread_shared.3 +++ mpich-1.2.7/man/man3/MPI_File_iread_shared.3 @@ -1,4 +1,4 @@ -.TH MPI_File_iread_shared 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_iread_shared 3 "9/10/2005" " " "MPI-2" .SH NAME MPI_File_iread_shared \- Nonblocking read using shared file pointer .SH SYNOPSIS @@ -6,8 +6,8 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -int MPI_File_iread_shared(MPI_File mpi_fh, void *buf, int count, - MPI_Datatype datatype, MPIO_Request *request) +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iread_shared_args .fi .SH INPUT PARAMETERS .PD 0 --- mpich-1.2.7.orig/man/man3/MPI_File_iwrite.3 +++ mpich-1.2.7/man/man3/MPI_File_iwrite.3 @@ -1,4 +1,4 @@ -.TH MPI_File_iwrite 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_iwrite 3 "9/10/2005" " " "MPI-2" .SH NAME MPI_File_iwrite \- Nonblocking write using individual file pointer .SH SYNOPSIS @@ -6,8 +6,8 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -int MPI_File_iwrite(MPI_File mpi_fh, void *buf, int count, - MPI_Datatype datatype, MPIO_Request *request) +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iwrite_args .fi .SH INPUT PARAMETERS .PD 0 --- mpich-1.2.7.orig/man/man3/MPI_File_iwrite_at.3 +++ mpich-1.2.7/man/man3/MPI_File_iwrite_at.3 @@ -1,4 +1,4 @@ -.TH MPI_File_iwrite_at 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_iwrite_at 3 "9/10/2005" " " "MPI-2" .SH NAME MPI_File_iwrite_at \- Nonblocking write using explict offset .SH SYNOPSIS @@ -6,9 +6,8 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -int MPI_File_iwrite_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, - int count, MPI_Datatype datatype, - MPIO_Request *request) +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iwrite_at_args .fi .SH INPUT PARAMETERS .PD 0 --- mpich-1.2.7.orig/man/man3/MPI_File_iwrite_shared.3 +++ mpich-1.2.7/man/man3/MPI_File_iwrite_shared.3 @@ -1,4 +1,4 @@ -.TH MPI_File_iwrite_shared 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_iwrite_shared 3 "9/10/2005" " " "MPI-2" .SH NAME MPI_File_iwrite_shared \- Nonblocking write using shared file pointer .SH SYNOPSIS @@ -6,8 +6,8 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" -int MPI_File_iwrite_shared(MPI_File mpi_fh, void *buf, int count, - MPI_Datatype datatype, MPIO_Request *request) +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iwrite_shared_args .fi .SH INPUT PARAMETERS .PD 0 --- mpich-1.2.7.orig/man/man3/MPI_File_open.3 +++ mpich-1.2.7/man/man3/MPI_File_open.3 @@ -1,4 +1,4 @@ -.TH MPI_File_open 3 "5/23/2005" " " "MPI-2" +.TH MPI_File_open 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_open \- Opens a file .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_preallocate.3 +++ mpich-1.2.7/man/man3/MPI_File_preallocate.3 @@ -1,4 +1,4 @@ -.TH MPI_File_preallocate 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_preallocate 3 "7/7/2005" " " "MPI-2" .SH NAME MPI_File_preallocate \- Preallocates storage space for a file .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_read_at_all_begin.3 +++ mpich-1.2.7/man/man3/MPI_File_read_at_all_begin.3 @@ -1,4 +1,4 @@ -.TH MPI_File_read_at_all_begin 3 "10/4/2004" " " "MPI-2" +.TH MPI_File_read_at_all_begin 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_read_at_all_begin \- Begin a split collective read using explict offset .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_read_at_all_end.3 +++ mpich-1.2.7/man/man3/MPI_File_read_at_all_end.3 @@ -1,4 +1,4 @@ -.TH MPI_File_read_at_all_end 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_read_at_all_end 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_read_at_all_end \- Complete a split collective read using explict offset .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_read_all_begin.3 +++ mpich-1.2.7/man/man3/MPI_File_read_all_begin.3 @@ -1,4 +1,4 @@ -.TH MPI_File_read_all_begin 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_read_all_begin 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_read_all_begin \- Begin a split collective read using individual file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_read_all_end.3 +++ mpich-1.2.7/man/man3/MPI_File_read_all_end.3 @@ -1,4 +1,4 @@ -.TH MPI_File_read_all_end 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_read_all_end 3 "7/9/2005" " " "MPI-2" .SH NAME MPI_File_read_all_end \- Complete a split collective read using individual file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_read_at_all.3 +++ mpich-1.2.7/man/man3/MPI_File_read_at_all.3 @@ -1,4 +1,4 @@ -.TH MPI_File_read_at_all 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_read_at_all 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_read_at_all \- Collective read using explict offset .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_read_ordered.3 +++ mpich-1.2.7/man/man3/MPI_File_read_ordered.3 @@ -1,4 +1,4 @@ -.TH MPI_File_read_ordered 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_read_ordered 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_read_ordered \- Collective read using shared file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_read_ordered_begin.3 +++ mpich-1.2.7/man/man3/MPI_File_read_ordered_begin.3 @@ -1,4 +1,4 @@ -.TH MPI_File_read_ordered_begin 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_read_ordered_begin 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_read_ordered_begin \- Begin a split collective read using shared file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_read_ordered_end.3 +++ mpich-1.2.7/man/man3/MPI_File_read_ordered_end.3 @@ -1,4 +1,4 @@ -.TH MPI_File_read_ordered_end 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_read_ordered_end 3 "7/9/2005" " " "MPI-2" .SH NAME MPI_File_read_ordered_end \- Complete a split collective read using shared file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_read_shared.3 +++ mpich-1.2.7/man/man3/MPI_File_read_shared.3 @@ -1,4 +1,4 @@ -.TH MPI_File_read_shared 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_read_shared 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_read_shared \- Read using shared file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_Register_datarep.3 +++ mpich-1.2.7/man/man3/MPI_Register_datarep.3 @@ -1,4 +1,4 @@ -.TH MPI_Register_datarep 3 "5/23/2005" " " "MPI-2" +.TH MPI_Register_datarep 3 "8/11/2005" " " "MPI-2" .SH NAME MPI_Register_datarep \- Register functions for user-defined data representations .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_seek.3 +++ mpich-1.2.7/man/man3/MPI_File_seek.3 @@ -1,4 +1,4 @@ -.TH MPI_File_seek 3 "5/23/2005" " " "MPI-2" +.TH MPI_File_seek 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_seek \- Updates the individual file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_set_atomicity.3 +++ mpich-1.2.7/man/man3/MPI_File_set_atomicity.3 @@ -1,4 +1,4 @@ -.TH MPI_File_set_atomicity 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_set_atomicity 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_set_atomicity \- Sets the atomicity mode .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_set_errhandler.3 +++ mpich-1.2.7/man/man3/MPI_File_set_errhandler.3 @@ -1,4 +1,4 @@ -.TH MPI_File_set_errhandler 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_set_errhandler 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_set_errhandler \- Sets the error handler for a file .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_set_info.3 +++ mpich-1.2.7/man/man3/MPI_File_set_info.3 @@ -1,4 +1,4 @@ -.TH MPI_File_set_info 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_set_info 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_set_info \- Sets new values for the hints associated with a file .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_set_size.3 +++ mpich-1.2.7/man/man3/MPI_File_set_size.3 @@ -1,4 +1,4 @@ -.TH MPI_File_set_size 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_set_size 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_set_size \- Sets the file size .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_set_view.3 +++ mpich-1.2.7/man/man3/MPI_File_set_view.3 @@ -1,4 +1,4 @@ -.TH MPI_File_set_view 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_set_view 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_set_view \- Sets the file view .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_write_at_all_begin.3 +++ mpich-1.2.7/man/man3/MPI_File_write_at_all_begin.3 @@ -1,4 +1,4 @@ -.TH MPI_File_write_at_all_begin 3 "10/4/2004" " " "MPI-2" +.TH MPI_File_write_at_all_begin 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_write_at_all_begin \- Begin a split collective write using explict offset .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_write_at_all_end.3 +++ mpich-1.2.7/man/man3/MPI_File_write_at_all_end.3 @@ -1,4 +1,4 @@ -.TH MPI_File_write_at_all_end 3 "10/4/2004" " " "MPI-2" +.TH MPI_File_write_at_all_end 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_write_at_all_end \- Complete a split collective write using explict offset .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_write_all.3 +++ mpich-1.2.7/man/man3/MPI_File_write_all.3 @@ -1,4 +1,4 @@ -.TH MPI_File_write_all 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_write_all 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_write_all \- Collective write using individual file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_write_all_begin.3 +++ mpich-1.2.7/man/man3/MPI_File_write_all_begin.3 @@ -1,4 +1,4 @@ -.TH MPI_File_write_all_begin 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_write_all_begin 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_write_all_begin \- Begin a split collective write using individual file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_write_all_end.3 +++ mpich-1.2.7/man/man3/MPI_File_write_all_end.3 @@ -1,4 +1,4 @@ -.TH MPI_File_write_all_end 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_write_all_end 3 "7/9/2005" " " "MPI-2" .SH NAME MPI_File_write_all_end \- Complete a split collective write using individual file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_write_at_all.3 +++ mpich-1.2.7/man/man3/MPI_File_write_at_all.3 @@ -1,4 +1,4 @@ -.TH MPI_File_write_at_all 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_write_at_all 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_write_at_all \- Collective write using explict offset .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_write_ordered.3 +++ mpich-1.2.7/man/man3/MPI_File_write_ordered.3 @@ -1,4 +1,4 @@ -.TH MPI_File_write_ordered 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_write_ordered 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_write_ordered \- Collective write using shared file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_write_ordered_begin.3 +++ mpich-1.2.7/man/man3/MPI_File_write_ordered_begin.3 @@ -1,4 +1,4 @@ -.TH MPI_File_write_ordered_begin 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_write_ordered_begin 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_write_ordered_begin \- Begin a split collective write using shared file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_write_ordered_end.3 +++ mpich-1.2.7/man/man3/MPI_File_write_ordered_end.3 @@ -1,4 +1,4 @@ -.TH MPI_File_write_ordered_end 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_write_ordered_end 3 "7/9/2005" " " "MPI-2" .SH NAME MPI_File_write_ordered_end \- Complete a split collective write using shared file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/man/man3/MPI_File_write_shared.3 +++ mpich-1.2.7/man/man3/MPI_File_write_shared.3 @@ -1,4 +1,4 @@ -.TH MPI_File_write_shared 3 "2/17/2005" " " "MPI-2" +.TH MPI_File_write_shared 3 "6/8/2005" " " "MPI-2" .SH NAME MPI_File_write_shared \- Write using shared file pointer .SH SYNOPSIS --- mpich-1.2.7.orig/mpid/ch2/Makefile.in +++ mpich-1.2.7/mpid/ch2/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.6 2004/08/11 15:30:20 gropp Exp $ +# $Id: Makefile.in,v 1.7 2005/10/17 16:25:09 gropp Exp $ # # (C) 1993,1995 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. @@ -43,7 +43,7 @@ # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: $(MPI_OBJECTS) - $(AR) $(LIBNAME) $? + $(AR) cr $(LIBNAME) $? profile_all: $(MPI_OBJECTS): dev.h req.h mpid.h @@ -58,10 +58,10 @@ $(CC) $(CFLAGS) $(BASEOPT) -c -S $*.c $(MPI_PROFILE) ../../build/$(ARCH)/$(DEVICE)/lib/lib@MPILIBNAME@.a: $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ libmpid.a: $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ --- mpich-1.2.7.orig/mpid/ch_cenju3/Makefile.in +++ mpich-1.2.7/mpid/ch_cenju3/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.7 2004/08/18 12:17:40 gropp Exp $ +# $Id: Makefile.in,v 1.8 2005/10/17 16:25:09 gropp Exp $ # # (C) 1993,1995 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. @@ -62,7 +62,7 @@ # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: $(MPI_OBJECTS) - $(AR) $(LIBNAME) $? + $(AR) cr $(LIBNAME) $? profile_all: clean: @@ -99,11 +99,11 @@ $(ASM) -c $*.s ../../build/$(ARCH)/$(DEVICE)/lib/lib@MPILIBNAME@.a: $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ libmpid.a: $(MPI_OBJECTS) mprerr.o - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ lint: --- mpich-1.2.7.orig/mpid/ch_lfshmem/Makefile.in +++ mpich-1.2.7/mpid/ch_lfshmem/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.10 2004/08/18 12:17:40 gropp Exp $ +# $Id: Makefile.in,v 1.11 2005/10/17 16:25:10 gropp Exp $ # # (C) 1993,1995 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. @@ -70,7 +70,7 @@ # is the same, but for the profile library default_all: setlinks default_files default_files: $(MPI_OBJECTS) - $(AR) $(LIBNAME) $? + $(AR) cr $(LIBNAME) $? profile_all: clean: @@ -115,11 +115,11 @@ $(ASM) -o $*.o $*.s ../../build/$(ARCH)/$(DEVICE)/lib/lib@MPILIBNAME@.a: $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ libmpid.a: $(MPI_OBJECTS) mprerr.o - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ lint: --- mpich-1.2.7.orig/mpid/ch_meiko/Makefile.in +++ mpich-1.2.7/mpid/ch_meiko/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.5 2004/08/11 15:30:21 gropp Exp $ +# $Id: Makefile.in,v 1.6 2005/10/17 16:25:10 gropp Exp $ # # (C) 1993 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. @@ -36,9 +36,9 @@ # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: $(MPI_OBJECTS) - $(AR) ../../build/$(ARCH)/$(DEVICE)/lib/lib@MPILIBNAME@.a $? + $(AR) cr ../../build/$(ARCH)/$(DEVICE)/lib/lib@MPILIBNAME@.a $? profile_all: $(MPI_OBJECTS) - $(AR) ../../build/$(ARCH)/$(DEVICE)/lib/libp@MPILIBNAME@.a $? + $(AR) cr ../../build/$(ARCH)/$(DEVICE)/lib/libp@MPILIBNAME@.a $? clean: rm -f *~ $(MPI_OBJECTS) @@ -47,7 +47,7 @@ $(CC) $(CFLAGS) $(BASEOPT) -c $*.c $(MPI_PROFILE) ../../build/$(ARCH)/$(DEVICE)/lib/lib@MPILIBNAME@.a: $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ --- mpich-1.2.7.orig/mpid/ch_mpl/Makefile.in +++ mpich-1.2.7/mpid/ch_mpl/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.20 2004/08/18 12:17:41 gropp Exp $ +# $Id: Makefile.in,v 1.21 2005/10/17 16:25:10 gropp Exp $ # # (C) 1993,1995 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. @@ -63,7 +63,7 @@ # is the same, but for the profile library default_all: setlinks default_files default_files: $(MPI_OBJECTS) - $(AR) $(LIBNAME) $? + $(AR) cr $(LIBNAME) $? profile_all: distclean: @@ -134,11 +134,11 @@ autoconf --localdir=/home/gropp/sowing-proj/sowing/confdb ${libbuild_dir}/lib@MPILIBNAME@.a: $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ libmpid.a: $(MPI_OBJECTS) mprerr.o - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ # --- mpich-1.2.7.orig/mpid/ch_nx/Makefile.in +++ mpich-1.2.7/mpid/ch_nx/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.9 2004/08/18 12:17:41 gropp Exp $ +# $Id: Makefile.in,v 1.10 2005/10/17 16:25:10 gropp Exp $ # # (C) 1993,1995 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. @@ -57,7 +57,7 @@ # is the same, but for the profile library default_all: setlinks default_files default_files: $(MPI_OBJECTS) - $(AR) $(LIBNAME) $? + $(AR) cr $(LIBNAME) $? profile_all: clean: @@ -98,11 +98,11 @@ $(CC) $(CFLAGS) $(BASEOPT) -c -S $*.c $(MPI_PROFILE) ../../build/$(ARCH)/$(DEVICE)/lib/lib@MPILIBNAME@.a: $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ libmpid.a: $(MPI_OBJECTS) mprerr.o - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ lint: --- mpich-1.2.7.orig/mpid/ch_p4/Makefile.in +++ mpich-1.2.7/mpid/ch_p4/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.30 2004/08/18 12:17:41 gropp Exp $ +# $Id: Makefile.in,v 1.31 2005/10/17 16:25:11 gropp Exp $ # # {C} 1993,1995 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. @@ -62,7 +62,7 @@ # is the same, but for the profile library default_all: setlinks p4inmpi default_all_files default_all_files: ${MPI_OBJECTS} - ${AR} ${LIBNAME} $? + ${AR} cr ${LIBNAME} $? profile_all: # We need to clean the srcdir of any .o files because they can confuse the @@ -136,11 +136,11 @@ # ${CC} ${DEFS} ${CFLAGS} ${BASEOPT} -c -S $< ${MPI_PROFILE} ${LIBNAME}: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ libmpid.a: ${MPI_OBJECTS} mprerr.o - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ configure: configure.in ../../aclocal.m4 --- mpich-1.2.7.orig/mpid/ch_p4/configure +++ mpich-1.2.7/mpid/ch_p4/configure @@ -1281,15 +1281,16 @@ #line 1282 "configure" #include "confdefs.h" #include -int main() +#include +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(int)); - return(0); + exit(0); } EOF -if { (eval echo configure:1293: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1294: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -1309,7 +1310,7 @@ echo $ac_n "checking size of long""... $ac_c" 1>&1 -echo "configure:1313: checking size of long" >&2 +echo "configure:1314: checking size of long" >&2 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&1 else @@ -1317,18 +1318,19 @@ ac_cv_sizeof_long=$CROSS_SIZEOF_LONG else cat > conftest.$ac_ext < -int main() +#include +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(long)); - return(0); + exit(0); } EOF -if { (eval echo configure:1332: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1334: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -1351,9 +1353,9 @@ for ac_func in gettimeofday BSDgettimeofday do echo $ac_n "checking for $ac_func""... $ac_c" 1>&1 -echo "configure:1355: checking for $ac_func" >&2 +echo "configure:1357: checking for $ac_func" >&2 cat > conftest.$ac_ext < /* Arbitrary system header to define __stub macros. */ #ifdef __cplusplus @@ -1374,7 +1376,7 @@ ; return 0; } EOF -if { (eval echo configure:1378: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1380: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1400,9 +1402,9 @@ for ac_func in setsid isatty do echo $ac_n "checking for $ac_func""... $ac_c" 1>&1 -echo "configure:1404: checking for $ac_func" >&2 +echo "configure:1406: checking for $ac_func" >&2 cat > conftest.$ac_ext < /* Arbitrary system header to define __stub macros. */ #ifdef __cplusplus @@ -1423,7 +1425,7 @@ ; return 0; } EOF -if { (eval echo configure:1427: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1429: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1465,7 +1467,7 @@ # Extract the first word of "hostname", so it can be a program name with args. set dummy hostname; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&1 -echo "configure:1469: checking for $ac_word" >&2 +echo "configure:1471: checking for $ac_word" >&2 ac_prog_where="" if test -n "$HOSTNAME_PGM"; then ac_pg_HOSTNAME_PGM="$HOSTNAME_PGM" # Let the user override the test. --- mpich-1.2.7.orig/mpid/ch_p4/mpich-mpid.h.in +++ mpich-1.2.7/mpid/ch_p4/mpich-mpid.h.in @@ -1,4 +1,4 @@ -/* mpich-mpid.h.in. Generated automatically from configure.in by autoheader. */ +/* mpich-mpid.h.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define if mmap does not work correctly for anonymous memory */ #undef HAVE_NO_ANON_MMAP --- mpich-1.2.7.orig/mpid/ch_p4/mpirun.ch_p4.in +++ mpich-1.2.7/mpid/ch_p4/mpirun.ch_p4.in @@ -24,7 +24,7 @@ fi # Old server if [ -r $HOME/.p4apps ] ; then - if grep $progname $HOME/.p4apps > /dev/null 2>&1 ; then + if grep "$progname" $HOME/.p4apps > /dev/null 2>&1 ; then : else echo "$progname" >> $HOME/.p4apps @@ -68,20 +68,20 @@ # select a second network whose names are not those returned by # "hostname". For example, a system with a DEC Gigiswitch, Myricom # network, or IP over the IBM SP2 switch (HPS). -prognamemain=$progname +prognamemain="$progname" if [ -z "$p4pgfile" ] ; then p4pgfile="$PWD_TRIAL/PI$$" # We need to explicitly redirect stderr. # Under Solaris, an echo that fails aborts the script (!) There is # no way around this using echo, so we use cat instead. - cat </dev/null > $p4pgfile + cat </dev/null > "$p4pgfile" Test EOF if [ ! -s "$p4pgfile" ] ; then # May not be able to write there. Try the user's home directory - p4pgfile=$HOME/PI$$ + p4pgfile="$HOME/PI$$" else - rm -rf $p4pgfile + rm -rf "$p4pgfile" fi # cnt is the "index" into the list of machines procNum=1 @@ -95,8 +95,8 @@ fi nprocval=`expr $nprocval - 1` archval=$archlocal - proginstance=`echo $progname | sed "s/%a/$archval/g"` - prognamemain=$proginstance + proginstance="`echo "$progname" | sed "s/%a/$archval/g"`" + prognamemain="$proginstance" if [ "$just_testing" = 1 ] ; then echo "Procgroup file:" if [ "$nolocal" = 0 ] ; then @@ -126,9 +126,9 @@ else nprocval=`expr $nproclocal - 1` fi - echo "$MPI_HOST $nprocval $proginstance" > $p4pgfile + echo "$MPI_HOST $nprocval $proginstance" > "$p4pgfile" else - echo "$machinehead $nprocval $proginstance" > $p4pgfile + echo "$machinehead $nprocval $proginstance" > "$p4pgfile" procNum=2 fi fi @@ -140,11 +140,11 @@ archval=`echo $archuselist | cut -d' ' -f$cnt` nprocval=`echo $nprocuselist | cut -d' ' -f$cnt` cnt=`expr $cnt + 1` - proginstance=`echo $progname | sed "s/%a/$archval/g"` + proginstance="`echo "$progname" | sed "s/%a/$archval/g"`" if [ $just_testing = 1 ] ; then - echo $machine $nprocval $proginstance + echo "$machine $nprocval $proginstance" else - echo $machine $nprocval $proginstance >> $p4pgfile + echo "$machine $nprocval $proginstance" >> "$p4pgfile" fi done @@ -172,18 +172,18 @@ # given as command line argument # if [ "$p4workdir" = "" ] ; then - p4workdir=$PWD_TRIAL + p4workdir="$PWD_TRIAL" fi # # Having a p4pgfile_master allows us to move the pg file to a location # where the master process can read it, even if the master does not # share a file system with the process that mpirun is executing on -p4pgfile_master=$p4pgfile +p4pgfile_master="$p4pgfile" if [ "$nolocal" = 1 -a "$move_pgfile_to_master" = "yes" ] ; then # Should we use $TMPDIR instead of /tmp here? p4pgfile_master=/tmp/`basename $p4pgfile` fi -startpgm="$prognamemain $cmdLineArgs -p4pg $p4pgfile_master -p4wd $p4workdir" +startpgm="\"$prognamemain\" $cmdLineArgs -p4pg \"$p4pgfile_master\" -p4wd \"$p4workdir\"" # The following could use the -stdin filename from mpirun, though # it doesn't handle the problem of the created jobs. #if [ -n "$stdinfile" ] ; then @@ -204,7 +204,7 @@ export nolocal export machinehead export stdinfile - $MPIRUN_HOME/mpirun_dbg.$debugger -progname $prognamemain -p4pg $p4pgfile_master -p4wd $p4workdir -cmdlineargs "$cmdLineArgs" + $MPIRUN_HOME/mpirun_dbg.$debugger -progname "$prognamemain" -p4pg "$p4pgfile_master" -p4wd "$p4workdir" -cmdlineargs "$cmdLineArgs" else echo "Cannot run debugger - no debugger script." exit 1 @@ -237,10 +237,10 @@ fi fi if [ -n "$stdinfile" ] ; then - $doitall $startpgm < $stdinfile + $doitall "$startpgm" < $stdinfile exitstatus=$? else - $doitall $startpgm + $doitall "$startpgm" exitstatus=$? fi fi @@ -251,7 +251,7 @@ fi else if [ "$nolocal" = 1 -a "$move_pgfile_to_master" = "yes" ] ; then - $rshcmd -n $machinehead /bin/rm $p4pgfile_master + $rshcmd -n $machinehead /bin/rm "$p4pgfile_master" fi rm "$p4pgfile" fi --- mpich-1.2.7.orig/mpid/ch_p4/p4/configure +++ mpich-1.2.7/mpid/ch_p4/p4/configure @@ -482,6 +482,15 @@ DEFINE_SYSV_IPC="#define SYSV_IPC" fi fi +# PowerPC running Linux +if test -n "$p4arch_LINUX_PPC"; then + # LINUX_PPC needs to be separate from LINUX because of + # byte ordering + P4ARCH=LINUX_PPC + if test -n "$p4comm_shared"; then + DEFINE_SYSV_IPC="#define SYSV_IPC" + fi +fi # Alpha running Linux if test -n "$p4arch_LINUX_ALPHA"; then @@ -11801,7 +11810,7 @@ echo creating $file rm -f $file echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file -cat $top_srcdir/${file}.in | sed -e " + sed -e " $prsub $extrasub s%@top_srcdir@%$top_srcdir%g @@ -11839,7 +11848,7 @@ s%@LIBS@%$LIBS%g s%@srcdir@%$srcdir%g s%@DEFS@%$DEFS% -" >> $file +" $top_srcdir/${file}.in >> $file fi; done --- mpich-1.2.7.orig/mpid/ch_p4/p4/configure.in +++ mpich-1.2.7/mpid/ch_p4/p4/configure.in @@ -342,6 +342,15 @@ DEFINE_SYSV_IPC="#define SYSV_IPC" fi fi +# PowerPC running Linux +if test -n "$p4arch_LINUX_PPC"; then + # LINUX_PPC needs to be separate from LINUX because of + # byte ordering + P4ARCH=LINUX_PPC + if test -n "$p4comm_shared"; then + DEFINE_SYSV_IPC="#define SYSV_IPC" + fi +fi # Alpha running Linux if test -n "$p4arch_LINUX_ALPHA"; then --- mpich-1.2.7.orig/mpid/ch_p4/p4/usc/usc.h +++ mpich-1.2.7/mpid/ch_p4/p4/usc/usc.h @@ -65,6 +65,17 @@ #endif /* -------------------------------- + Machine Synonyms + When P4 and the usc package were designed, there were no truely + portable operating systems, so using the OS name for the machine + was a 1-1 mapping. With various Unix versions, particularly Linux, + this is no longer true. + -------------------------------- */ +#if defined(LINUX_PPC) && !defined(LINUX) +#define LINUX +#endif + +/* -------------------------------- Machine dependent declarations -------------------------------- */ --- mpich-1.2.7.orig/mpid/ch_p4mpd/Makefile.in +++ mpich-1.2.7/mpid/ch_p4mpd/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.18 2004/08/18 12:17:42 gropp Exp $ +# $Id: Makefile.in,v 1.19 2005/10/17 16:25:11 gropp Exp $ # # (C) 1993,1995 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. @@ -71,7 +71,7 @@ # is the same, but for the profile library default_all: setlinks p4inmpi default_all_files default_all_files: $(MPI_OBJECTS) - $(AR) $(LIBNAME) $? + $(AR) cr $(LIBNAME) $? profile_all: clean: @@ -140,11 +140,11 @@ $(CC) $(CFLAGS) $(BASEOPT) -c -S $< $(MPI_PROFILE) $(LIBNAME): $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ libmpid.a: $(MPI_OBJECTS) mprerr.o - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ configure: configure.in --- mpich-1.2.7.orig/mpid/ch_shmem/Makefile.in +++ mpich-1.2.7/mpid/ch_shmem/Makefile.in @@ -1,6 +1,6 @@ # -# $Id: Makefile.in,v 1.27 2004/08/18 12:17:42 gropp Exp $ +# $Id: Makefile.in,v 1.28 2005/10/17 16:25:11 gropp Exp $ # # (C) 1993,1995 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. @@ -80,7 +80,7 @@ # is the same, but for the profile library default_all: setlinks default_files default_files: $(MPI_OBJECTS) - $(AR) $(LIBNAME) $? + $(AR) cr $(LIBNAME) $? profile_all: clean: @@ -139,11 +139,11 @@ autoconf --localdir=../.. ${libbuild_dir}/lib@MPILIBNAME@.a: $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ libmpid.a: $(MPI_OBJECTS) mprerr.o - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ --- mpich-1.2.7.orig/mpid/ch_shmem/mpich-mpid.h.in +++ mpich-1.2.7/mpid/ch_shmem/mpich-mpid.h.in @@ -1,4 +1,4 @@ -/* mpich-mpid.h.in. Generated automatically from configure.in by autoheader. */ +/* mpich-mpid.h.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE --- mpich-1.2.7.orig/mpid/ch_shmem/shmemneager.c +++ mpich-1.2.7/mpid/ch_shmem/shmemneager.c @@ -309,8 +309,8 @@ #ifdef LEAVE_IN_SHARED_MEM rhandle->start = address; #else - if (pkt->len > 0) { - rhandle->start = (void *)MALLOC( pkt->len ); + if (len > 0) { + rhandle->start = (void *)MALLOC( len ); rhandle->is_complete = 1; if (!rhandle->start) { rhandle->s.MPI_ERROR = MPI_ERR_INTERN; --- mpich-1.2.7.orig/mpid/globus2/Makefile.in +++ mpich-1.2.7/mpid/globus2/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.28 2002/11/01 20:07:28 karonis Exp $ +# $Id: Makefile.in,v 1.29 2005/10/17 16:25:12 gropp Exp $ # # (C) 1993,1995 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. @@ -73,7 +73,7 @@ # is the same, but for the profile library. default_all: $(MPI_OBJECTS) - $(AR) $(LIBNAME) $(MPI_OBJECTS) + $(AR) cr $(LIBNAME) $(MPI_OBJECTS) profile_all: # @@ -247,11 +247,11 @@ cia $(CIAS) ${libbuild_dir}/lib@MPILIBNAME@.a: $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ libmpid.a: $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ FORCE: --- mpich-1.2.7.orig/mpid/globus2/install_globus2 +++ mpich-1.2.7/mpid/globus2/install_globus2 @@ -25,24 +25,19 @@ CopyFile ${top_srcdir}/mpid/$DEVICE/global_c_symb.h ${includedir} CopyFile ${top_srcdir}/mpid/$DEVICE/global_fort_symb.h ${includedir} fi -CopyFile ${includebuild_dir}/mpid_fortdefs.h ${includedir} +if test $F77_SED -ne 0 ; then + CopyFile ${top_srcdir}/mpid/$DEVICE/mpid_fortdefs.h ${includedir} +fi # # Correct paths in mpich compiler scripts # -for file in ${bindir}/mpicc ${bindir}/mpiCC ${bindir}/mpicxx ${bindir}/mpif77 \ - ${bindir}/mpif90 ${sysconfdir}/mpicc.conf ${sysconfdir}/mpiCC.conf \ - ${sysconfdir}/mpicxx.conf ${sysconfdir}/mpif77.conf \ - ${sysconfdir}/mpif90.conf ${bindir}/mpireconfig ${bindir}/mpireconfig.dat \ - ${bindir}/mpirun -do - if test -f ${file} ; then - mv -f ${file} ${file}.tmp.$$ - sed -e '/^[ ]*binbuild_dir[ ]*=/!'" s!${binbuild_dir}!${bindir}!g" \ - ${file}.tmp.$$ >${file} - if test -x ${file}.tmp.$$ ; then - chmod $XMODE ${file} - fi - rm /${file}.tmp.$$ +for compiler in cc CC cxx f77 f90 ; do + if test -f ${bindir}/mpi${compiler} ; then + mv -f ${bindir}/mpi${compiler} ${bindir}/mpi${compiler}.orig + echo "rm ${bindir}/mpi${compiler}.orig" >> $UNINSTALLFILE + sed -e "s!BASE=\" *${binbuild_dir}!BASE=\"${bindir}!" \ + ${bindir}/mpi${compiler}.orig > ${bindir}/mpi${compiler} + chmod $XMODE ${bindir}/mpi${compiler} fi done --- mpich-1.2.7.orig/mpid/globus2/setup_globus2 +++ mpich-1.2.7/mpid/globus2/setup_globus2 @@ -10,27 +10,6 @@ } # -# mpidi_mkdir_p() -# -# Simulate "mkdir -p" since it is not available everywhere. Portions -# of this code were taken from mpich2/confdb/aclocal.m4. -# -mpidi_mkdir_p() -{( - saveIFS="${IFS}" - IFS="/" - tmp_curdir="" - for tmp_subdir in $1 ; do - tmp_curdir="${tmp_curdir}${tmp_subdir}" - if test -n "${tmp_curdir}" -a ! -d "${tmp_curdir}" ; then - mkdir "${tmp_curdir}" - fi - tmp_curdir="${tmp_curdir}/" - done - IFS="${saveIFS}" -)} - -# # Rename the MPICH libraries for G2 over vMPI-MPICH # MPILIBNAME="mpichg2" @@ -158,7 +137,6 @@ esac done -mpidi_mkdir_p mpid/${DEVICE} if test $globus_packaged -eq 0 ; then if test -z "$GLOBUSDIR" ; then if test -x $GLOBUS_INSTALL_PATH/bin/globus-development-path ; then @@ -271,7 +249,6 @@ # # We need to supply some header files to do the VMPI name transformations # -mpidi_mkdir_p ${includebuild_dir} if test $VMPI -ne 0 ; then HAVE_MPID_DEFS_H=1 cp ${top_srcdir}/mpid/$DEVICE/mpid_defs.h ${includebuild_dir} @@ -285,14 +262,12 @@ # doing sed replacement causes some problems with F90 modules. # we could probably fix this, but not before the first release. -- (Brian) NO_F90=1 + HAVE_MPID_FORTDEFS_H=1 + export HAVE_MPID_FORTDEFS_H + cp ${top_srcdir}/mpid/$DEVICE/mpid_fortdefs.h \ + ${builddir}/src/fortran/include + cp ${top_srcdir}/mpid/$DEVICE/mpid_fortdefs.h ${includebuild_dir} fi -mpidi_mkdir_p ${builddir}/src/fortran/include -HAVE_MPID_FORTDEFS_H=1 -export HAVE_MPID_FORTDEFS_H -sed -e "s!@F77_SED@!${F77_SED}!" ${top_srcdir}/mpid/$DEVICE/mpid_fortdefs.h.in \ - >${builddir}/src/fortran/include/mpid_fortdefs.h -sed -e "s!@F77_SED@!${F77_SED}!" ${top_srcdir}/mpid/$DEVICE/mpid_fortdefs.h.in \ - >${includebuild_dir}/mpid_fortdefs.h # # Get the libraries, etc (there's also a globuslibpath and globuslib) @@ -471,15 +446,15 @@ # if test "$ARCH" = "rs6000" -a $VMPI -ne 0 ; then if test "$globus_threads_enabled" = "yes" ; then - GLOBUS_TEST_CLINKER=xlc_r - GLOBUS_TEST_CXXLINKER=xlC_r - GLOBUS_TEST_F77LINKER=xlf_r - GLOBUS_TEST_F90LINKER=xlf90_r - else - GLOBUS_TEST_CLINKER=xlc - GLOBUS_TEST_CXXLINKER=xlC - GLOBUS_TEST_F77LINKER=xlf - GLOBUS_TEST_F90LINKER=xlf90 + GLOBUS_TEST_CLINKER="xlc_r`echo $GLOBUS_CLINKER | sed 's/[^ ]*//'`" + GLOBUS_TEST_CXXLINKER="xlC_r`echo $GLOBUS_CXXLINKER | sed 's/[^ ]*//'`" + GLOBUS_TEST_F77LINKER="xlf_r`echo $GLOBUS_F77LINKER | sed 's/[^ ]*//'`" + GLOBUS_TEST_F90LINKER="xlf90_r`echo $GLOBUS_F90LINKER | sed 's/[^ ]*//'`" + else + GLOBUS_TEST_CLINKER="xlc`echo $GLOBUS_CLINKER | sed 's/[^ ]*//'`" + GLOBUS_TEST_CXXLINKER="xlC`echo $GLOBUS_CXXLINKER | sed 's/[^ ]*//'`" + GLOBUS_TEST_F77LINKER="xlf`echo $GLOBUS_F77LINKER | sed 's/[^ ]*//'`" + GLOBUS_TEST_F90LINKER="xlf90`echo $GLOBUS_F90LINKER | sed 's/[^ ]*//'`" fi fi @@ -495,7 +470,6 @@ # # Create compiler scripts # -mpidi_mkdir_p ${binbuild_dir} sed -e "s!@GC@!$GLOBUS_CC!" \ -e "s!@GCFLAGS@!$GLOBUS_CFLAGS!" \ -e "s!@GL@!$GLOBUS_CLINKER!" \ @@ -557,6 +531,58 @@ fi # +# The AIX "ar" command require the option "-X 64" when building 64-bit +# libraries. MPICH doesn't seem to do this detection for us, so we +# must do it here. +# +if test "$ARCH" = "rs6000" -a $VMPI -ne 0 ; then + cat >conftest.c <&1 + fi + errmsg="" + if $CC -c conftest.c >>conftest.out 2>&1; then + test_XAR=`echo ${AR} | sed 's/ / -X64 /'` + if $AR conftest.a conftest.o >>conftest.out 2>&1 ; then + result=no + elif $test_XAR conftest.a conftest.o >>conftest.out 2>&1 ; then + result=yes + AR=$test_XAR + export AR + ARCMD="ar -X64" + export ARCMD + ARNAME="ar -X64" + export ARNAME + else + result="all trials failed" + errmsg="unable to build a library with ar" + fi + else + result="compile failure" + errmsg="unable to compile a simple program" + fi + if test -z "$ac_echo_test" ; then + echo "$ac_t""$result" + else + echo "$ac_t""$result" 1>&1 + fi + if test -n "$errmsg" ; then + echo "ERROR: $errmsg" + exit 1 + fi + rm -f conftest* +fi + +# # Figure out the size of a particular vendor's MPI type # get_vendor_size() @@ -670,7 +696,7 @@ # it may be larger. # get_vendor_size MPI_Aint - MPI_AINT_SIZE = $VENDOR_MPI_AINT_SIZE + MPI_AINT_SIZE=$VENDOR_MPI_AINT_SIZE # # If the vendor's MPI doesn't support MPI_LONG_LONG or MPI_LONG_LONG_INT --- mpich-1.2.7.orig/mpid/globus2/mpid_fortdefs.h +++ mpich-1.2.7/mpid/globus2/mpid_fortdefs.h @@ -0,0 +1,2438 @@ +#if !defined(MPID_FORT_H) +#define MPID_FORT_H + + + +/* + * This header file converts all MPI_ names into MPQ_ names, so that we avoid + * name clashing when using the vendor's MPI library. + * + * Based on a C hack by Warren Smith, extended to Fortran by Olle Larsson, + * updated and integrated in the MPICH distribution by Nick Karonis and + * Brian Toonen. + * + * This file is used only when you specify -f77sed during MPICH configuration, + * and under those circumstances, fortran90 will not work. This file is + * intended to be used as a fallback position ... it is NOT our first + * choice. + * + */ + + +#if defined(F77_NAME_UPPER) +# define MPI_ISEND MPQ_ISEND +# define PMPI_ISEND PMPQ_ISEND +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_isend__ mpq_isend__ +# define pmpi_isend__ pmpq_isend__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_isend mpq_isend +# define pmpi_isend pmpq_isend +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_isend_ mpq_isend_ +# endif +# define pmpi_isend_ pmpq_isend_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_IRECV MPQ_IRECV +# define PMPI_IRECV PMPQ_IRECV +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_irecv__ mpq_irecv__ +# define pmpi_irecv__ pmpq_irecv__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_irecv mpq_irecv +# define pmpi_irecv pmpq_irecv +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_irecv_ mpq_irecv_ +# endif +# define pmpi_irecv_ pmpq_irecv_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_WAIT MPQ_WAIT +# define PMPI_WAIT PMPQ_WAIT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_wait__ mpq_wait__ +# define pmpi_wait__ pmpq_wait__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_wait mpq_wait +# define pmpi_wait pmpq_wait +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_wait_ mpq_wait_ +# endif +# define pmpi_wait_ pmpq_wait_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TEST MPQ_TEST +# define PMPI_TEST PMPQ_TEST +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_test__ mpq_test__ +# define pmpi_test__ pmpq_test__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_test mpq_test +# define pmpi_test pmpq_test +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_test_ mpq_test_ +# endif +# define pmpi_test_ pmpq_test_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ADDRESS MPQ_ADDRESS +# define PMPI_ADDRESS PMPQ_ADDRESS +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_address__ mpq_address__ +# define pmpi_address__ pmpq_address__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_address mpq_address +# define pmpi_address pmpq_address +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_address_ mpq_address_ +# endif +# define pmpi_address_ pmpq_address_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_CANCEL MPQ_CANCEL +# define PMPI_CANCEL PMPQ_CANCEL +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_cancel__ mpq_cancel__ +# define pmpi_cancel__ pmpq_cancel__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_cancel mpq_cancel +# define pmpi_cancel pmpq_cancel +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_cancel_ mpq_cancel_ +# endif +# define pmpi_cancel_ pmpq_cancel_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_REQUEST_FREE MPQ_REQUEST_FREE +# define PMPI_REQUEST_FREE PMPQ_REQUEST_FREE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_request_free__ mpq_request_free__ +# define pmpi_request_free__ pmpq_request_free__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_request_free mpq_request_free +# define pmpi_request_free pmpq_request_free +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_request_free_ mpq_request_free_ +# endif +# define pmpi_request_free_ pmpq_request_free_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_PROBE MPQ_PROBE +# define PMPI_PROBE PMPQ_PROBE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_probe__ mpq_probe__ +# define pmpi_probe__ pmpq_probe__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_probe mpq_probe +# define pmpi_probe pmpq_probe +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_probe_ mpq_probe_ +# endif +# define pmpi_probe_ pmpq_probe_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_START MPQ_START +# define PMPI_START PMPQ_START +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_start__ mpq_start__ +# define pmpi_start__ pmpq_start__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_start mpq_start +# define pmpi_start pmpq_start +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_start_ mpq_start_ +# endif +# define pmpi_start_ pmpq_start_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TESTANY MPQ_TESTANY +# define PMPI_TESTANY PMPQ_TESTANY +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_testany__ mpq_testany__ +# define pmpi_testany__ pmpq_testany__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_testany mpq_testany +# define pmpi_testany pmpq_testany +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_testany_ mpq_testany_ +# endif +# define pmpi_testany_ pmpq_testany_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_WAITALL MPQ_WAITALL +# define PMPI_WAITALL PMPQ_WAITALL +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_waitall__ mpq_waitall__ +# define pmpi_waitall__ pmpq_waitall__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_waitall mpq_waitall +# define pmpi_waitall pmpq_waitall +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_waitall_ mpq_waitall_ +# endif +# define pmpi_waitall_ pmpq_waitall_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_SEND MPQ_SEND +# define PMPI_SEND PMPQ_SEND +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_send__ mpq_send__ +# define pmpi_send__ pmpq_send__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_send mpq_send +# define pmpi_send pmpq_send +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_send_ mpq_send_ +# endif +# define pmpi_send_ pmpq_send_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_RECV MPQ_RECV +# define PMPI_RECV PMPQ_RECV +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_recv__ mpq_recv__ +# define pmpi_recv__ pmpq_recv__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_recv mpq_recv +# define pmpi_recv pmpq_recv +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_recv_ mpq_recv_ +# endif +# define pmpi_recv_ pmpq_recv_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_SENDRECV MPQ_SENDRECV +# define PMPI_SENDRECV PMPQ_SENDRECV +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_sendrecv__ mpq_sendrecv__ +# define pmpi_sendrecv__ pmpq_sendrecv__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_sendrecv mpq_sendrecv +# define pmpi_sendrecv pmpq_sendrecv +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_sendrecv_ mpq_sendrecv_ +# endif +# define pmpi_sendrecv_ pmpq_sendrecv_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_IPROBE MPQ_IPROBE +# define PMPI_IPROBE PMPQ_IPROBE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_iprobe__ mpq_iprobe__ +# define pmpi_iprobe__ pmpq_iprobe__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_iprobe mpq_iprobe +# define pmpi_iprobe pmpq_iprobe +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_iprobe_ mpq_iprobe_ +# endif +# define pmpi_iprobe_ pmpq_iprobe_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TESTALL MPQ_TESTALL +# define PMPI_TESTALL PMPQ_TESTALL +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_testall__ mpq_testall__ +# define pmpi_testall__ pmpq_testall__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_testall mpq_testall +# define pmpi_testall pmpq_testall +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_testall_ mpq_testall_ +# endif +# define pmpi_testall_ pmpq_testall_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_WAITANY MPQ_WAITANY +# define PMPI_WAITANY PMPQ_WAITANY +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_waitany__ mpq_waitany__ +# define pmpi_waitany__ pmpq_waitany__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_waitany mpq_waitany +# define pmpi_waitany pmpq_waitany +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_waitany_ mpq_waitany_ +# endif +# define pmpi_waitany_ pmpq_waitany_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_RECV_INIT MPQ_RECV_INIT +# define PMPI_RECV_INIT PMPQ_RECV_INIT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_recv_init__ mpq_recv_init__ +# define pmpi_recv_init__ pmpq_recv_init__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_recv_init mpq_recv_init +# define pmpi_recv_init pmpq_recv_init +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_recv_init_ mpq_recv_init_ +# endif +# define pmpi_recv_init_ pmpq_recv_init_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_SEND_INIT MPQ_SEND_INIT +# define PMPI_SEND_INIT PMPQ_SEND_INIT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_send_init__ mpq_send_init__ +# define pmpi_send_init__ pmpq_send_init__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_send_init mpq_send_init +# define pmpi_send_init pmpq_send_init +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_send_init_ mpq_send_init_ +# endif +# define pmpi_send_init_ pmpq_send_init_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_SENDRECV_REPLACE MPQ_SENDRECV_REPLACE +# define PMPI_SENDRECV_REPLACE PMPQ_SENDRECV_REPLACE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_sendrecv_replace__ mpq_sendrecv_replace__ +# define pmpi_sendrecv_replace__ pmpq_sendrecv_replace__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_sendrecv_replace mpq_sendrecv_replace +# define pmpi_sendrecv_replace pmpq_sendrecv_replace +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_sendrecv_replace_ mpq_sendrecv_replace_ +# endif +# define pmpi_sendrecv_replace_ pmpq_sendrecv_replace_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GET_COUNT MPQ_GET_COUNT +# define PMPI_GET_COUNT PMPQ_GET_COUNT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_get_count__ mpq_get_count__ +# define pmpi_get_count__ pmpq_get_count__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_get_count mpq_get_count +# define pmpi_get_count pmpq_get_count +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_get_count_ mpq_get_count_ +# endif +# define pmpi_get_count_ pmpq_get_count_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_BSEND MPQ_BSEND +# define PMPI_BSEND PMPQ_BSEND +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_bsend__ mpq_bsend__ +# define pmpi_bsend__ pmpq_bsend__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_bsend mpq_bsend +# define pmpi_bsend pmpq_bsend +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_bsend_ mpq_bsend_ +# endif +# define pmpi_bsend_ pmpq_bsend_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_SSEND MPQ_SSEND +# define PMPI_SSEND PMPQ_SSEND +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_ssend__ mpq_ssend__ +# define pmpi_ssend__ pmpq_ssend__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_ssend mpq_ssend +# define pmpi_ssend pmpq_ssend +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_ssend_ mpq_ssend_ +# endif +# define pmpi_ssend_ pmpq_ssend_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_RSEND MPQ_RSEND +# define PMPI_RSEND PMPQ_RSEND +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_rsend__ mpq_rsend__ +# define pmpi_rsend__ pmpq_rsend__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_rsend mpq_rsend +# define pmpi_rsend pmpq_rsend +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_rsend_ mpq_rsend_ +# endif +# define pmpi_rsend_ pmpq_rsend_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_BUFFER_ATTACH MPQ_BUFFER_ATTACH +# define PMPI_BUFFER_ATTACH PMPQ_BUFFER_ATTACH +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_buffer_attach__ mpq_buffer_attach__ +# define pmpi_buffer_attach__ pmpq_buffer_attach__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_buffer_attach mpq_buffer_attach +# define pmpi_buffer_attach pmpq_buffer_attach +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_buffer_attach_ mpq_buffer_attach_ +# endif +# define pmpi_buffer_attach_ pmpq_buffer_attach_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_BUFFER_DETACH MPQ_BUFFER_DETACH +# define PMPI_BUFFER_DETACH PMPQ_BUFFER_DETACH +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_buffer_detach__ mpq_buffer_detach__ +# define pmpi_buffer_detach__ pmpq_buffer_detach__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_buffer_detach mpq_buffer_detach +# define pmpi_buffer_detach pmpq_buffer_detach +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_buffer_detach_ mpq_buffer_detach_ +# endif +# define pmpi_buffer_detach_ pmpq_buffer_detach_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_IBSEND MPQ_IBSEND +# define PMPI_IBSEND PMPQ_IBSEND +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_ibsend__ mpq_ibsend__ +# define pmpi_ibsend__ pmpq_ibsend__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_ibsend mpq_ibsend +# define pmpi_ibsend pmpq_ibsend +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_ibsend_ mpq_ibsend_ +# endif +# define pmpi_ibsend_ pmpq_ibsend_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ISSEND MPQ_ISSEND +# define PMPI_ISSEND PMPQ_ISSEND +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_issend__ mpq_issend__ +# define pmpi_issend__ pmpq_issend__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_issend mpq_issend +# define pmpi_issend pmpq_issend +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_issend_ mpq_issend_ +# endif +# define pmpi_issend_ pmpq_issend_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_IRSEND MPQ_IRSEND +# define PMPI_IRSEND PMPQ_IRSEND +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_irsend__ mpq_irsend__ +# define pmpi_irsend__ pmpq_irsend__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_irsend mpq_irsend +# define pmpi_irsend pmpq_irsend +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_irsend_ mpq_irsend_ +# endif +# define pmpi_irsend_ pmpq_irsend_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_WAITSOME MPQ_WAITSOME +# define PMPI_WAITSOME PMPQ_WAITSOME +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_waitsome__ mpq_waitsome__ +# define pmpi_waitsome__ pmpq_waitsome__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_waitsome mpq_waitsome +# define pmpi_waitsome pmpq_waitsome +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_waitsome_ mpq_waitsome_ +# endif +# define pmpi_waitsome_ pmpq_waitsome_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TESTSOME MPQ_TESTSOME +# define PMPI_TESTSOME PMPQ_TESTSOME +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_testsome__ mpq_testsome__ +# define pmpi_testsome__ pmpq_testsome__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_testsome mpq_testsome +# define pmpi_testsome pmpq_testsome +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_testsome_ mpq_testsome_ +# endif +# define pmpi_testsome_ pmpq_testsome_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TEST_CANCELLED MPQ_TEST_CANCELLED +# define PMPI_TEST_CANCELLED PMPQ_TEST_CANCELLED +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_test_cancelled__ mpq_test_cancelled__ +# define pmpi_test_cancelled__ pmpq_test_cancelled__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_test_cancelled mpq_test_cancelled +# define pmpi_test_cancelled pmpq_test_cancelled +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_test_cancelled_ mpq_test_cancelled_ +# endif +# define pmpi_test_cancelled_ pmpq_test_cancelled_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_BSEND_INIT MPQ_BSEND_INIT +# define PMPI_BSEND_INIT PMPQ_BSEND_INIT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_bsend_init__ mpq_bsend_init__ +# define pmpi_bsend_init__ pmpq_bsend_init__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_bsend_init mpq_bsend_init +# define pmpi_bsend_init pmpq_bsend_init +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_bsend_init_ mpq_bsend_init_ +# endif +# define pmpi_bsend_init_ pmpq_bsend_init_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_RSEND_INIT MPQ_RSEND_INIT +# define PMPI_RSEND_INIT PMPQ_RSEND_INIT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_rsend_init__ mpq_rsend_init__ +# define pmpi_rsend_init__ pmpq_rsend_init__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_rsend_init mpq_rsend_init +# define pmpi_rsend_init pmpq_rsend_init +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_rsend_init_ mpq_rsend_init_ +# endif +# define pmpi_rsend_init_ pmpq_rsend_init_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_SSEND_INIT MPQ_SSEND_INIT +# define PMPI_SSEND_INIT PMPQ_SSEND_INIT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_ssend_init__ mpq_ssend_init__ +# define pmpi_ssend_init__ pmpq_ssend_init__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_ssend_init mpq_ssend_init +# define pmpi_ssend_init pmpq_ssend_init +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_ssend_init_ mpq_ssend_init_ +# endif +# define pmpi_ssend_init_ pmpq_ssend_init_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_STARTALL MPQ_STARTALL +# define PMPI_STARTALL PMPQ_STARTALL +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_startall__ mpq_startall__ +# define pmpi_startall__ pmpq_startall__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_startall mpq_startall +# define pmpi_startall pmpq_startall +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_startall_ mpq_startall_ +# endif +# define pmpi_startall_ pmpq_startall_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_COMMIT MPQ_TYPE_COMMIT +# define PMPI_TYPE_COMMIT PMPQ_TYPE_COMMIT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_commit__ mpq_type_commit__ +# define pmpi_type_commit__ pmpq_type_commit__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_commit mpq_type_commit +# define pmpi_type_commit pmpq_type_commit +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_commit_ mpq_type_commit_ +# endif +# define pmpi_type_commit_ pmpq_type_commit_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_CONTIGUOUS MPQ_TYPE_CONTIGUOUS +# define PMPI_TYPE_CONTIGUOUS PMPQ_TYPE_CONTIGUOUS +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_contiguous__ mpq_type_contiguous__ +# define pmpi_type_contiguous__ pmpq_type_contiguous__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_contiguous mpq_type_contiguous +# define pmpi_type_contiguous pmpq_type_contiguous +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_contiguous_ mpq_type_contiguous_ +# endif +# define pmpi_type_contiguous_ pmpq_type_contiguous_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_EXTENT MPQ_TYPE_EXTENT +# define PMPI_TYPE_EXTENT PMPQ_TYPE_EXTENT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_extent__ mpq_type_extent__ +# define pmpi_type_extent__ pmpq_type_extent__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_extent mpq_type_extent +# define pmpi_type_extent pmpq_type_extent +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_extent_ mpq_type_extent_ +# endif +# define pmpi_type_extent_ pmpq_type_extent_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_FREE MPQ_TYPE_FREE +# define PMPI_TYPE_FREE PMPQ_TYPE_FREE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_free__ mpq_type_free__ +# define pmpi_type_free__ pmpq_type_free__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_free mpq_type_free +# define pmpi_type_free pmpq_type_free +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_free_ mpq_type_free_ +# endif +# define pmpi_type_free_ pmpq_type_free_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_HINDEXED MPQ_TYPE_HINDEXED +# define PMPI_TYPE_HINDEXED PMPQ_TYPE_HINDEXED +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_hindexed__ mpq_type_hindexed__ +# define pmpi_type_hindexed__ pmpq_type_hindexed__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_hindexed mpq_type_hindexed +# define pmpi_type_hindexed pmpq_type_hindexed +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_hindexed_ mpq_type_hindexed_ +# endif +# define pmpi_type_hindexed_ pmpq_type_hindexed_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_HVECTOR MPQ_TYPE_HVECTOR +# define PMPI_TYPE_HVECTOR PMPQ_TYPE_HVECTOR +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_hvector__ mpq_type_hvector__ +# define pmpi_type_hvector__ pmpq_type_hvector__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_hvector mpq_type_hvector +# define pmpi_type_hvector pmpq_type_hvector +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_hvector_ mpq_type_hvector_ +# endif +# define pmpi_type_hvector_ pmpq_type_hvector_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_INDEXED MPQ_TYPE_INDEXED +# define PMPI_TYPE_INDEXED PMPQ_TYPE_INDEXED +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_indexed__ mpq_type_indexed__ +# define pmpi_type_indexed__ pmpq_type_indexed__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_indexed mpq_type_indexed +# define pmpi_type_indexed pmpq_type_indexed +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_indexed_ mpq_type_indexed_ +# endif +# define pmpi_type_indexed_ pmpq_type_indexed_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_LB MPQ_TYPE_LB +# define PMPI_TYPE_LB PMPQ_TYPE_LB +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_lb__ mpq_type_lb__ +# define pmpi_type_lb__ pmpq_type_lb__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_lb mpq_type_lb +# define pmpi_type_lb pmpq_type_lb +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_lb_ mpq_type_lb_ +# endif +# define pmpi_type_lb_ pmpq_type_lb_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_SIZE MPQ_TYPE_SIZE +# define PMPI_TYPE_SIZE PMPQ_TYPE_SIZE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_size__ mpq_type_size__ +# define pmpi_type_size__ pmpq_type_size__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_size mpq_type_size +# define pmpi_type_size pmpq_type_size +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_size_ mpq_type_size_ +# endif +# define pmpi_type_size_ pmpq_type_size_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_STRUCT MPQ_TYPE_STRUCT +# define PMPI_TYPE_STRUCT PMPQ_TYPE_STRUCT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_struct__ mpq_type_struct__ +# define pmpi_type_struct__ pmpq_type_struct__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_struct mpq_type_struct +# define pmpi_type_struct pmpq_type_struct +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_struct_ mpq_type_struct_ +# endif +# define pmpi_type_struct_ pmpq_type_struct_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_UB MPQ_TYPE_UB +# define PMPI_TYPE_UB PMPQ_TYPE_UB +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_ub__ mpq_type_ub__ +# define pmpi_type_ub__ pmpq_type_ub__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_ub mpq_type_ub +# define pmpi_type_ub pmpq_type_ub +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_ub_ mpq_type_ub_ +# endif +# define pmpi_type_ub_ pmpq_type_ub_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_VECTOR MPQ_TYPE_VECTOR +# define PMPI_TYPE_VECTOR PMPQ_TYPE_VECTOR +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_vector__ mpq_type_vector__ +# define pmpi_type_vector__ pmpq_type_vector__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_vector mpq_type_vector +# define pmpi_type_vector pmpq_type_vector +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_vector_ mpq_type_vector_ +# endif +# define pmpi_type_vector_ pmpq_type_vector_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GET_ELEMENTS MPQ_GET_ELEMENTS +# define PMPI_GET_ELEMENTS PMPQ_GET_ELEMENTS +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_get_elements__ mpq_get_elements__ +# define pmpi_get_elements__ pmpq_get_elements__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_get_elements mpq_get_elements +# define pmpi_get_elements pmpq_get_elements +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_get_elements_ mpq_get_elements_ +# endif +# define pmpi_get_elements_ pmpq_get_elements_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_PACK_SIZE MPQ_PACK_SIZE +# define PMPI_PACK_SIZE PMPQ_PACK_SIZE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_pack_size__ mpq_pack_size__ +# define pmpi_pack_size__ pmpq_pack_size__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_pack_size mpq_pack_size +# define pmpi_pack_size pmpq_pack_size +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_pack_size_ mpq_pack_size_ +# endif +# define pmpi_pack_size_ pmpq_pack_size_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_PACK MPQ_PACK +# define PMPI_PACK PMPQ_PACK +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_pack__ mpq_pack__ +# define pmpi_pack__ pmpq_pack__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_pack mpq_pack +# define pmpi_pack pmpq_pack +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_pack_ mpq_pack_ +# endif +# define pmpi_pack_ pmpq_pack_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_UNPACK MPQ_UNPACK +# define PMPI_UNPACK PMPQ_UNPACK +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_unpack__ mpq_unpack__ +# define pmpi_unpack__ pmpq_unpack__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_unpack mpq_unpack +# define pmpi_unpack pmpq_unpack +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_unpack_ mpq_unpack_ +# endif +# define pmpi_unpack_ pmpq_unpack_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INITIALIZED MPQ_INITIALIZED +# define PMPI_INITIALIZED PMPQ_INITIALIZED +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_initialized__ mpq_initialized__ +# define pmpi_initialized__ pmpq_initialized__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_initialized mpq_initialized +# define pmpi_initialized pmpq_initialized +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_initialized_ mpq_initialized_ +# endif +# define pmpi_initialized_ pmpq_initialized_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ABORT MPQ_ABORT +# define PMPI_ABORT PMPQ_ABORT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_abort__ mpq_abort__ +# define pmpi_abort__ pmpq_abort__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_abort mpq_abort +# define pmpi_abort pmpq_abort +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_abort_ mpq_abort_ +# endif +# define pmpi_abort_ pmpq_abort_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INIT MPQ_INIT +# define PMPI_INIT PMPQ_INIT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_init__ mpq_init__ +# define pmpi_init__ pmpq_init__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_init mpq_init +# define pmpi_init pmpq_init +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_init_ mpq_init_ +# endif +# define pmpi_init_ pmpq_init_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_FINALIZE MPQ_FINALIZE +# define PMPI_FINALIZE PMPQ_FINALIZE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_finalize__ mpq_finalize__ +# define pmpi_finalize__ pmpq_finalize__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_finalize mpq_finalize +# define pmpi_finalize pmpq_finalize +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_finalize_ mpq_finalize_ +# endif +# define pmpi_finalize_ pmpq_finalize_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ERROR_STRING MPQ_ERROR_STRING +# define PMPI_ERROR_STRING PMPQ_ERROR_STRING +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_error_string__ mpq_error_string__ +# define pmpi_error_string__ pmpq_error_string__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_error_string mpq_error_string +# define pmpi_error_string pmpq_error_string +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_error_string_ mpq_error_string_ +# endif +# define pmpi_error_string_ pmpq_error_string_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GET_PROCESSOR_NAME MPQ_GET_PROCESSOR_NAME +# define PMPI_GET_PROCESSOR_NAME PMPQ_GET_PROCESSOR_NAME +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_get_processor_name__ mpq_get_processor_name__ +# define pmpi_get_processor_name__ pmpq_get_processor_name__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_get_processor_name mpq_get_processor_name +# define pmpi_get_processor_name pmpq_get_processor_name +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_get_processor_name_ mpq_get_processor_name_ +# endif +# define pmpi_get_processor_name_ pmpq_get_processor_name_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ERRHANDLER_CREATE MPQ_ERRHANDLER_CREATE +# define PMPI_ERRHANDLER_CREATE PMPQ_ERRHANDLER_CREATE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_errhandler_create__ mpq_errhandler_create__ +# define pmpi_errhandler_create__ pmpq_errhandler_create__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_errhandler_create mpq_errhandler_create +# define pmpi_errhandler_create pmpq_errhandler_create +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_errhandler_create_ mpq_errhandler_create_ +# endif +# define pmpi_errhandler_create_ pmpq_errhandler_create_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ERRHANDLER_SET MPQ_ERRHANDLER_SET +# define PMPI_ERRHANDLER_SET PMPQ_ERRHANDLER_SET +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_errhandler_set__ mpq_errhandler_set__ +# define pmpi_errhandler_set__ pmpq_errhandler_set__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_errhandler_set mpq_errhandler_set +# define pmpi_errhandler_set pmpq_errhandler_set +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_errhandler_set_ mpq_errhandler_set_ +# endif +# define pmpi_errhandler_set_ pmpq_errhandler_set_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ERRHANDLER_GET MPQ_ERRHANDLER_GET +# define PMPI_ERRHANDLER_GET PMPQ_ERRHANDLER_GET +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_errhandler_get__ mpq_errhandler_get__ +# define pmpi_errhandler_get__ pmpq_errhandler_get__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_errhandler_get mpq_errhandler_get +# define pmpi_errhandler_get pmpq_errhandler_get +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_errhandler_get_ mpq_errhandler_get_ +# endif +# define pmpi_errhandler_get_ pmpq_errhandler_get_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ERRHANDLER_FREE MPQ_ERRHANDLER_FREE +# define PMPI_ERRHANDLER_FREE PMPQ_ERRHANDLER_FREE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_errhandler_free__ mpq_errhandler_free__ +# define pmpi_errhandler_free__ pmpq_errhandler_free__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_errhandler_free mpq_errhandler_free +# define pmpi_errhandler_free pmpq_errhandler_free +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_errhandler_free_ mpq_errhandler_free_ +# endif +# define pmpi_errhandler_free_ pmpq_errhandler_free_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ERROR_CLASS MPQ_ERROR_CLASS +# define PMPI_ERROR_CLASS PMPQ_ERROR_CLASS +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_error_class__ mpq_error_class__ +# define pmpi_error_class__ pmpq_error_class__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_error_class mpq_error_class +# define pmpi_error_class pmpq_error_class +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_error_class_ mpq_error_class_ +# endif +# define pmpi_error_class_ pmpq_error_class_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_WTIME MPQ_WTIME +# define PMPI_WTIME PMPQ_WTIME +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_wtime__ mpq_wtime__ +# define pmpi_wtime__ pmpq_wtime__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_wtime mpq_wtime +# define pmpi_wtime pmpq_wtime +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_wtime_ mpq_wtime_ +# endif +# define pmpi_wtime_ pmpq_wtime_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_WTICK MPQ_WTICK +# define PMPI_WTICK PMPQ_WTICK +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_wtick__ mpq_wtick__ +# define pmpi_wtick__ pmpq_wtick__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_wtick mpq_wtick +# define pmpi_wtick pmpq_wtick +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_wtick_ mpq_wtick_ +# endif +# define pmpi_wtick_ pmpq_wtick_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GET_VERSION MPQ_GET_VERSION +# define PMPI_GET_VERSION PMPQ_GET_VERSION +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_get_version__ mpq_get_version__ +# define pmpi_get_version__ pmpq_get_version__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_get_version mpq_get_version +# define pmpi_get_version pmpq_get_version +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_get_version_ mpq_get_version_ +# endif +# define pmpi_get_version_ pmpq_get_version_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_KEYVAL_FREE MPQ_KEYVAL_FREE +# define PMPI_KEYVAL_FREE PMPQ_KEYVAL_FREE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_keyval_free__ mpq_keyval_free__ +# define pmpi_keyval_free__ pmpq_keyval_free__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_keyval_free mpq_keyval_free +# define pmpi_keyval_free pmpq_keyval_free +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_keyval_free_ mpq_keyval_free_ +# endif +# define pmpi_keyval_free_ pmpq_keyval_free_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_KEYVAL_CREATE MPQ_KEYVAL_CREATE +# define PMPI_KEYVAL_CREATE PMPQ_KEYVAL_CREATE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_keyval_create__ mpq_keyval_create__ +# define pmpi_keyval_create__ pmpq_keyval_create__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_keyval_create mpq_keyval_create +# define pmpi_keyval_create pmpq_keyval_create +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_keyval_create_ mpq_keyval_create_ +# endif +# define pmpi_keyval_create_ pmpq_keyval_create_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ATTR_GET MPQ_ATTR_GET +# define PMPI_ATTR_GET PMPQ_ATTR_GET +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_attr_get__ mpq_attr_get__ +# define pmpi_attr_get__ pmpq_attr_get__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_attr_get mpq_attr_get +# define pmpi_attr_get pmpq_attr_get +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_attr_get_ mpq_attr_get_ +# endif +# define pmpi_attr_get_ pmpq_attr_get_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ATTR_DELETE MPQ_ATTR_DELETE +# define PMPI_ATTR_DELETE PMPQ_ATTR_DELETE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_attr_delete__ mpq_attr_delete__ +# define pmpi_attr_delete__ pmpq_attr_delete__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_attr_delete mpq_attr_delete +# define pmpi_attr_delete pmpq_attr_delete +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_attr_delete_ mpq_attr_delete_ +# endif +# define pmpi_attr_delete_ pmpq_attr_delete_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ATTR_PUT MPQ_ATTR_PUT +# define PMPI_ATTR_PUT PMPQ_ATTR_PUT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_attr_put__ mpq_attr_put__ +# define pmpi_attr_put__ pmpq_attr_put__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_attr_put mpq_attr_put +# define pmpi_attr_put pmpq_attr_put +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_attr_put_ mpq_attr_put_ +# endif +# define pmpi_attr_put_ pmpq_attr_put_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GROUP_EXCL MPQ_GROUP_EXCL +# define PMPI_GROUP_EXCL PMPQ_GROUP_EXCL +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_group_excl__ mpq_group_excl__ +# define pmpi_group_excl__ pmpq_group_excl__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_group_excl mpq_group_excl +# define pmpi_group_excl pmpq_group_excl +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_group_excl_ mpq_group_excl_ +# endif +# define pmpi_group_excl_ pmpq_group_excl_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GROUP_DIFFERENCE MPQ_GROUP_DIFFERENCE +# define PMPI_GROUP_DIFFERENCE PMPQ_GROUP_DIFFERENCE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_group_difference__ mpq_group_difference__ +# define pmpi_group_difference__ pmpq_group_difference__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_group_difference mpq_group_difference +# define pmpi_group_difference pmpq_group_difference +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_group_difference_ mpq_group_difference_ +# endif +# define pmpi_group_difference_ pmpq_group_difference_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GROUP_FREE MPQ_GROUP_FREE +# define PMPI_GROUP_FREE PMPQ_GROUP_FREE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_group_free__ mpq_group_free__ +# define pmpi_group_free__ pmpq_group_free__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_group_free mpq_group_free +# define pmpi_group_free pmpq_group_free +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_group_free_ mpq_group_free_ +# endif +# define pmpi_group_free_ pmpq_group_free_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GROUP_INCL MPQ_GROUP_INCL +# define PMPI_GROUP_INCL PMPQ_GROUP_INCL +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_group_incl__ mpq_group_incl__ +# define pmpi_group_incl__ pmpq_group_incl__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_group_incl mpq_group_incl +# define pmpi_group_incl pmpq_group_incl +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_group_incl_ mpq_group_incl_ +# endif +# define pmpi_group_incl_ pmpq_group_incl_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GROUP_INTERSECTION MPQ_GROUP_INTERSECTION +# define PMPI_GROUP_INTERSECTION PMPQ_GROUP_INTERSECTION +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_group_intersection__ mpq_group_intersection__ +# define pmpi_group_intersection__ pmpq_group_intersection__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_group_intersection mpq_group_intersection +# define pmpi_group_intersection pmpq_group_intersection +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_group_intersection_ mpq_group_intersection_ +# endif +# define pmpi_group_intersection_ pmpq_group_intersection_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GROUP_RANK MPQ_GROUP_RANK +# define PMPI_GROUP_RANK PMPQ_GROUP_RANK +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_group_rank__ mpq_group_rank__ +# define pmpi_group_rank__ pmpq_group_rank__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_group_rank mpq_group_rank +# define pmpi_group_rank pmpq_group_rank +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_group_rank_ mpq_group_rank_ +# endif +# define pmpi_group_rank_ pmpq_group_rank_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GROUP_SIZE MPQ_GROUP_SIZE +# define PMPI_GROUP_SIZE PMPQ_GROUP_SIZE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_group_size__ mpq_group_size__ +# define pmpi_group_size__ pmpq_group_size__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_group_size mpq_group_size +# define pmpi_group_size pmpq_group_size +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_group_size_ mpq_group_size_ +# endif +# define pmpi_group_size_ pmpq_group_size_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GROUP_UNION MPQ_GROUP_UNION +# define PMPI_GROUP_UNION PMPQ_GROUP_UNION +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_group_union__ mpq_group_union__ +# define pmpi_group_union__ pmpq_group_union__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_group_union mpq_group_union +# define pmpi_group_union pmpq_group_union +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_group_union_ mpq_group_union_ +# endif +# define pmpi_group_union_ pmpq_group_union_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GROUP_COMPARE MPQ_GROUP_COMPARE +# define PMPI_GROUP_COMPARE PMPQ_GROUP_COMPARE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_group_compare__ mpq_group_compare__ +# define pmpi_group_compare__ pmpq_group_compare__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_group_compare mpq_group_compare +# define pmpi_group_compare pmpq_group_compare +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_group_compare_ mpq_group_compare_ +# endif +# define pmpi_group_compare_ pmpq_group_compare_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_DUP MPQ_COMM_DUP +# define PMPI_COMM_DUP PMPQ_COMM_DUP +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_dup__ mpq_comm_dup__ +# define pmpi_comm_dup__ pmpq_comm_dup__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_dup mpq_comm_dup +# define pmpi_comm_dup pmpq_comm_dup +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_dup_ mpq_comm_dup_ +# endif +# define pmpi_comm_dup_ pmpq_comm_dup_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_FREE MPQ_COMM_FREE +# define PMPI_COMM_FREE PMPQ_COMM_FREE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_free__ mpq_comm_free__ +# define pmpi_comm_free__ pmpq_comm_free__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_free mpq_comm_free +# define pmpi_comm_free pmpq_comm_free +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_free_ mpq_comm_free_ +# endif +# define pmpi_comm_free_ pmpq_comm_free_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_GROUP MPQ_COMM_GROUP +# define PMPI_COMM_GROUP PMPQ_COMM_GROUP +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_group__ mpq_comm_group__ +# define pmpi_comm_group__ pmpq_comm_group__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_group mpq_comm_group +# define pmpi_comm_group pmpq_comm_group +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_group_ mpq_comm_group_ +# endif +# define pmpi_comm_group_ pmpq_comm_group_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_CREATE MPQ_COMM_CREATE +# define PMPI_COMM_CREATE PMPQ_COMM_CREATE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_create__ mpq_comm_create__ +# define pmpi_comm_create__ pmpq_comm_create__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_create mpq_comm_create +# define pmpi_comm_create pmpq_comm_create +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_create_ mpq_comm_create_ +# endif +# define pmpi_comm_create_ pmpq_comm_create_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_SET_NAME MPQ_COMM_SET_NAME +# define PMPI_COMM_SET_NAME PMPQ_COMM_SET_NAME +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_set_name__ mpq_comm_set_name__ +# define pmpi_comm_set_name__ pmpq_comm_set_name__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_set_name mpq_comm_set_name +# define pmpi_comm_set_name pmpq_comm_set_name +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_set_name_ mpq_comm_set_name_ +# endif +# define pmpi_comm_set_name_ pmpq_comm_set_name_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_GET_NAME MPQ_COMM_GET_NAME +# define PMPI_COMM_GET_NAME PMPQ_COMM_GET_NAME +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_get_name__ mpq_comm_get_name__ +# define pmpi_comm_get_name__ pmpq_comm_get_name__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_get_name mpq_comm_get_name +# define pmpi_comm_get_name pmpq_comm_get_name +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_get_name_ mpq_comm_get_name_ +# endif +# define pmpi_comm_get_name_ pmpq_comm_get_name_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_SIZE MPQ_COMM_SIZE +# define PMPI_COMM_SIZE PMPQ_COMM_SIZE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_size__ mpq_comm_size__ +# define pmpi_comm_size__ pmpq_comm_size__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_size mpq_comm_size +# define pmpi_comm_size pmpq_comm_size +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_size_ mpq_comm_size_ +# endif +# define pmpi_comm_size_ pmpq_comm_size_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_SPLIT MPQ_COMM_SPLIT +# define PMPI_COMM_SPLIT PMPQ_COMM_SPLIT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_split__ mpq_comm_split__ +# define pmpi_comm_split__ pmpq_comm_split__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_split mpq_comm_split +# define pmpi_comm_split pmpq_comm_split +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_split_ mpq_comm_split_ +# endif +# define pmpi_comm_split_ pmpq_comm_split_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GROUP_TRANSLATE_RANKS MPQ_GROUP_TRANSLATE_RANKS +# define PMPI_GROUP_TRANSLATE_RANKS PMPQ_GROUP_TRANSLATE_RANKS +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_group_translate_ranks__ mpq_group_translate_ranks__ +# define pmpi_group_translate_ranks__ pmpq_group_translate_ranks__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_group_translate_ranks mpq_group_translate_ranks +# define pmpi_group_translate_ranks pmpq_group_translate_ranks +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_group_translate_ranks_ mpq_group_translate_ranks_ +# endif +# define pmpi_group_translate_ranks_ pmpq_group_translate_ranks_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_TEST_INTER MPQ_COMM_TEST_INTER +# define PMPI_COMM_TEST_INTER PMPQ_COMM_TEST_INTER +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_test_inter__ mpq_comm_test_inter__ +# define pmpi_comm_test_inter__ pmpq_comm_test_inter__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_test_inter mpq_comm_test_inter +# define pmpi_comm_test_inter pmpq_comm_test_inter +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_test_inter_ mpq_comm_test_inter_ +# endif +# define pmpi_comm_test_inter_ pmpq_comm_test_inter_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_RANK MPQ_COMM_RANK +# define PMPI_COMM_RANK PMPQ_COMM_RANK +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_rank__ mpq_comm_rank__ +# define pmpi_comm_rank__ pmpq_comm_rank__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_rank mpq_comm_rank +# define pmpi_comm_rank pmpq_comm_rank +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_rank_ mpq_comm_rank_ +# endif +# define pmpi_comm_rank_ pmpq_comm_rank_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_COMPARE MPQ_COMM_COMPARE +# define PMPI_COMM_COMPARE PMPQ_COMM_COMPARE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_compare__ mpq_comm_compare__ +# define pmpi_comm_compare__ pmpq_comm_compare__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_compare mpq_comm_compare +# define pmpi_comm_compare pmpq_comm_compare +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_compare_ mpq_comm_compare_ +# endif +# define pmpi_comm_compare_ pmpq_comm_compare_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_REMOTE_SIZE MPQ_COMM_REMOTE_SIZE +# define PMPI_COMM_REMOTE_SIZE PMPQ_COMM_REMOTE_SIZE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_remote_size__ mpq_comm_remote_size__ +# define pmpi_comm_remote_size__ pmpq_comm_remote_size__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_remote_size mpq_comm_remote_size +# define pmpi_comm_remote_size pmpq_comm_remote_size +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_remote_size_ mpq_comm_remote_size_ +# endif +# define pmpi_comm_remote_size_ pmpq_comm_remote_size_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_COMM_REMOTE_GROUP MPQ_COMM_REMOTE_GROUP +# define PMPI_COMM_REMOTE_GROUP PMPQ_COMM_REMOTE_GROUP +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_comm_remote_group__ mpq_comm_remote_group__ +# define pmpi_comm_remote_group__ pmpq_comm_remote_group__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_comm_remote_group mpq_comm_remote_group +# define pmpi_comm_remote_group pmpq_comm_remote_group +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_comm_remote_group_ mpq_comm_remote_group_ +# endif +# define pmpi_comm_remote_group_ pmpq_comm_remote_group_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INTERCOMM_CREATE MPQ_INTERCOMM_CREATE +# define PMPI_INTERCOMM_CREATE PMPQ_INTERCOMM_CREATE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_intercomm_create__ mpq_intercomm_create__ +# define pmpi_intercomm_create__ pmpq_intercomm_create__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_intercomm_create mpq_intercomm_create +# define pmpi_intercomm_create pmpq_intercomm_create +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_intercomm_create_ mpq_intercomm_create_ +# endif +# define pmpi_intercomm_create_ pmpq_intercomm_create_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INTERCOMM_MERGE MPQ_INTERCOMM_MERGE +# define PMPI_INTERCOMM_MERGE PMPQ_INTERCOMM_MERGE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_intercomm_merge__ mpq_intercomm_merge__ +# define pmpi_intercomm_merge__ pmpq_intercomm_merge__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_intercomm_merge mpq_intercomm_merge +# define pmpi_intercomm_merge pmpq_intercomm_merge +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_intercomm_merge_ mpq_intercomm_merge_ +# endif +# define pmpi_intercomm_merge_ pmpq_intercomm_merge_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_NULL_COPY_FN MPQ_NULL_COPY_FN +# define PMPI_NULL_COPY_FN PMPQ_NULL_COPY_FN +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_null_copy_fn__ mpq_null_copy_fn__ +# define pmpi_null_copy_fn__ pmpq_null_copy_fn__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_null_copy_fn mpq_null_copy_fn +# define pmpi_null_copy_fn pmpq_null_copy_fn +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_null_copy_fn_ mpq_null_copy_fn_ +# endif +# define pmpi_null_copy_fn_ pmpq_null_copy_fn_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_NULL_DELETE_FN MPQ_NULL_DELETE_FN +# define PMPI_NULL_DELETE_FN PMPQ_NULL_DELETE_FN +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_null_delete_fn__ mpq_null_delete_fn__ +# define pmpi_null_delete_fn__ pmpq_null_delete_fn__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_null_delete_fn mpq_null_delete_fn +# define pmpi_null_delete_fn pmpq_null_delete_fn +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_null_delete_fn_ mpq_null_delete_fn_ +# endif +# define pmpi_null_delete_fn_ pmpq_null_delete_fn_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_DUP_FN MPQ_DUP_FN +# define PMPI_DUP_FN PMPQ_DUP_FN +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_dup_fn__ mpq_dup_fn__ +# define pmpi_dup_fn__ pmpq_dup_fn__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_dup_fn mpq_dup_fn +# define pmpi_dup_fn pmpq_dup_fn +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_dup_fn_ mpq_dup_fn_ +# endif +# define pmpi_dup_fn_ pmpq_dup_fn_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_BARRIER MPQ_BARRIER +# define PMPI_BARRIER PMPQ_BARRIER +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_barrier__ mpq_barrier__ +# define pmpi_barrier__ pmpq_barrier__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_barrier mpq_barrier +# define pmpi_barrier pmpq_barrier +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_barrier_ mpq_barrier_ +# endif +# define pmpi_barrier_ pmpq_barrier_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_BCAST MPQ_BCAST +# define PMPI_BCAST PMPQ_BCAST +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_bcast__ mpq_bcast__ +# define pmpi_bcast__ pmpq_bcast__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_bcast mpq_bcast +# define pmpi_bcast pmpq_bcast +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_bcast_ mpq_bcast_ +# endif +# define pmpi_bcast_ pmpq_bcast_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GATHER MPQ_GATHER +# define PMPI_GATHER PMPQ_GATHER +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_gather__ mpq_gather__ +# define pmpi_gather__ pmpq_gather__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_gather mpq_gather +# define pmpi_gather pmpq_gather +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_gather_ mpq_gather_ +# endif +# define pmpi_gather_ pmpq_gather_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GATHERV MPQ_GATHERV +# define PMPI_GATHERV PMPQ_GATHERV +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_gatherv__ mpq_gatherv__ +# define pmpi_gatherv__ pmpq_gatherv__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_gatherv mpq_gatherv +# define pmpi_gatherv pmpq_gatherv +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_gatherv_ mpq_gatherv_ +# endif +# define pmpi_gatherv_ pmpq_gatherv_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_SCATTER MPQ_SCATTER +# define PMPI_SCATTER PMPQ_SCATTER +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_scatter__ mpq_scatter__ +# define pmpi_scatter__ pmpq_scatter__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_scatter mpq_scatter +# define pmpi_scatter pmpq_scatter +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_scatter_ mpq_scatter_ +# endif +# define pmpi_scatter_ pmpq_scatter_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_SCATTERV MPQ_SCATTERV +# define PMPI_SCATTERV PMPQ_SCATTERV +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_scatterv__ mpq_scatterv__ +# define pmpi_scatterv__ pmpq_scatterv__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_scatterv mpq_scatterv +# define pmpi_scatterv pmpq_scatterv +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_scatterv_ mpq_scatterv_ +# endif +# define pmpi_scatterv_ pmpq_scatterv_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ALLGATHER MPQ_ALLGATHER +# define PMPI_ALLGATHER PMPQ_ALLGATHER +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_allgather__ mpq_allgather__ +# define pmpi_allgather__ pmpq_allgather__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_allgather mpq_allgather +# define pmpi_allgather pmpq_allgather +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_allgather_ mpq_allgather_ +# endif +# define pmpi_allgather_ pmpq_allgather_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ALLGATHERV MPQ_ALLGATHERV +# define PMPI_ALLGATHERV PMPQ_ALLGATHERV +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_allgatherv__ mpq_allgatherv__ +# define pmpi_allgatherv__ pmpq_allgatherv__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_allgatherv mpq_allgatherv +# define pmpi_allgatherv pmpq_allgatherv +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_allgatherv_ mpq_allgatherv_ +# endif +# define pmpi_allgatherv_ pmpq_allgatherv_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ALLTOALL MPQ_ALLTOALL +# define PMPI_ALLTOALL PMPQ_ALLTOALL +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_alltoall__ mpq_alltoall__ +# define pmpi_alltoall__ pmpq_alltoall__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_alltoall mpq_alltoall +# define pmpi_alltoall pmpq_alltoall +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_alltoall_ mpq_alltoall_ +# endif +# define pmpi_alltoall_ pmpq_alltoall_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ALLTOALLV MPQ_ALLTOALLV +# define PMPI_ALLTOALLV PMPQ_ALLTOALLV +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_alltoallv__ mpq_alltoallv__ +# define pmpi_alltoallv__ pmpq_alltoallv__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_alltoallv mpq_alltoallv +# define pmpi_alltoallv pmpq_alltoallv +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_alltoallv_ mpq_alltoallv_ +# endif +# define pmpi_alltoallv_ pmpq_alltoallv_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_REDUCE MPQ_REDUCE +# define PMPI_REDUCE PMPQ_REDUCE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_reduce__ mpq_reduce__ +# define pmpi_reduce__ pmpq_reduce__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_reduce mpq_reduce +# define pmpi_reduce pmpq_reduce +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_reduce_ mpq_reduce_ +# endif +# define pmpi_reduce_ pmpq_reduce_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_ALLREDUCE MPQ_ALLREDUCE +# define PMPI_ALLREDUCE PMPQ_ALLREDUCE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_allreduce__ mpq_allreduce__ +# define pmpi_allreduce__ pmpq_allreduce__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_allreduce mpq_allreduce +# define pmpi_allreduce pmpq_allreduce +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_allreduce_ mpq_allreduce_ +# endif +# define pmpi_allreduce_ pmpq_allreduce_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_REDUCE_SCATTER MPQ_REDUCE_SCATTER +# define PMPI_REDUCE_SCATTER PMPQ_REDUCE_SCATTER +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_reduce_scatter__ mpq_reduce_scatter__ +# define pmpi_reduce_scatter__ pmpq_reduce_scatter__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_reduce_scatter mpq_reduce_scatter +# define pmpi_reduce_scatter pmpq_reduce_scatter +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_reduce_scatter_ mpq_reduce_scatter_ +# endif +# define pmpi_reduce_scatter_ pmpq_reduce_scatter_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_SCAN MPQ_SCAN +# define PMPI_SCAN PMPQ_SCAN +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_scan__ mpq_scan__ +# define pmpi_scan__ pmpq_scan__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_scan mpq_scan +# define pmpi_scan pmpq_scan +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_scan_ mpq_scan_ +# endif +# define pmpi_scan_ pmpq_scan_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_OP_CREATE MPQ_OP_CREATE +# define PMPI_OP_CREATE PMPQ_OP_CREATE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_op_create__ mpq_op_create__ +# define pmpi_op_create__ pmpq_op_create__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_op_create mpq_op_create +# define pmpi_op_create pmpq_op_create +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_op_create_ mpq_op_create_ +# endif +# define pmpi_op_create_ pmpq_op_create_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_OP_FREE MPQ_OP_FREE +# define PMPI_OP_FREE PMPQ_OP_FREE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_op_free__ mpq_op_free__ +# define pmpi_op_free__ pmpq_op_free__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_op_free mpq_op_free +# define pmpi_op_free pmpq_op_free +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_op_free_ mpq_op_free_ +# endif +# define pmpi_op_free_ pmpq_op_free_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TOPO_TEST MPQ_TOPO_TEST +# define PMPI_TOPO_TEST PMPQ_TOPO_TEST +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_topo_test__ mpq_topo_test__ +# define pmpi_topo_test__ pmpq_topo_test__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_topo_test mpq_topo_test +# define pmpi_topo_test pmpq_topo_test +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_topo_test_ mpq_topo_test_ +# endif +# define pmpi_topo_test_ pmpq_topo_test_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GRAPHDIMS_GET MPQ_GRAPHDIMS_GET +# define PMPI_GRAPHDIMS_GET PMPQ_GRAPHDIMS_GET +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_graphdims_get__ mpq_graphdims_get__ +# define pmpi_graphdims_get__ pmpq_graphdims_get__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_graphdims_get mpq_graphdims_get +# define pmpi_graphdims_get pmpq_graphdims_get +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_graphdims_get_ mpq_graphdims_get_ +# endif +# define pmpi_graphdims_get_ pmpq_graphdims_get_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GRAPH_GET MPQ_GRAPH_GET +# define PMPI_GRAPH_GET PMPQ_GRAPH_GET +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_graph_get__ mpq_graph_get__ +# define pmpi_graph_get__ pmpq_graph_get__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_graph_get mpq_graph_get +# define pmpi_graph_get pmpq_graph_get +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_graph_get_ mpq_graph_get_ +# endif +# define pmpi_graph_get_ pmpq_graph_get_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_CARTDIM_GET MPQ_CARTDIM_GET +# define PMPI_CARTDIM_GET PMPQ_CARTDIM_GET +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_cartdim_get__ mpq_cartdim_get__ +# define pmpi_cartdim_get__ pmpq_cartdim_get__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_cartdim_get mpq_cartdim_get +# define pmpi_cartdim_get pmpq_cartdim_get +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_cartdim_get_ mpq_cartdim_get_ +# endif +# define pmpi_cartdim_get_ pmpq_cartdim_get_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_CART_GET MPQ_CART_GET +# define PMPI_CART_GET PMPQ_CART_GET +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_cart_get__ mpq_cart_get__ +# define pmpi_cart_get__ pmpq_cart_get__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_cart_get mpq_cart_get +# define pmpi_cart_get pmpq_cart_get +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_cart_get_ mpq_cart_get_ +# endif +# define pmpi_cart_get_ pmpq_cart_get_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_DIMS_CREATE MPQ_DIMS_CREATE +# define PMPI_DIMS_CREATE PMPQ_DIMS_CREATE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_dims_create__ mpq_dims_create__ +# define pmpi_dims_create__ pmpq_dims_create__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_dims_create mpq_dims_create +# define pmpi_dims_create pmpq_dims_create +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_dims_create_ mpq_dims_create_ +# endif +# define pmpi_dims_create_ pmpq_dims_create_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_CART_MAP MPQ_CART_MAP +# define PMPI_CART_MAP PMPQ_CART_MAP +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_cart_map__ mpq_cart_map__ +# define pmpi_cart_map__ pmpq_cart_map__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_cart_map mpq_cart_map +# define pmpi_cart_map pmpq_cart_map +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_cart_map_ mpq_cart_map_ +# endif +# define pmpi_cart_map_ pmpq_cart_map_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GRAPH_MAP MPQ_GRAPH_MAP +# define PMPI_GRAPH_MAP PMPQ_GRAPH_MAP +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_graph_map__ mpq_graph_map__ +# define pmpi_graph_map__ pmpq_graph_map__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_graph_map mpq_graph_map +# define pmpi_graph_map pmpq_graph_map +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_graph_map_ mpq_graph_map_ +# endif +# define pmpi_graph_map_ pmpq_graph_map_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_CART_CREATE MPQ_CART_CREATE +# define PMPI_CART_CREATE PMPQ_CART_CREATE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_cart_create__ mpq_cart_create__ +# define pmpi_cart_create__ pmpq_cart_create__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_cart_create mpq_cart_create +# define pmpi_cart_create pmpq_cart_create +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_cart_create_ mpq_cart_create_ +# endif +# define pmpi_cart_create_ pmpq_cart_create_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GRAPH_CREATE MPQ_GRAPH_CREATE +# define PMPI_GRAPH_CREATE PMPQ_GRAPH_CREATE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_graph_create__ mpq_graph_create__ +# define pmpi_graph_create__ pmpq_graph_create__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_graph_create mpq_graph_create +# define pmpi_graph_create pmpq_graph_create +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_graph_create_ mpq_graph_create_ +# endif +# define pmpi_graph_create_ pmpq_graph_create_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_CART_RANK MPQ_CART_RANK +# define PMPI_CART_RANK PMPQ_CART_RANK +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_cart_rank__ mpq_cart_rank__ +# define pmpi_cart_rank__ pmpq_cart_rank__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_cart_rank mpq_cart_rank +# define pmpi_cart_rank pmpq_cart_rank +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_cart_rank_ mpq_cart_rank_ +# endif +# define pmpi_cart_rank_ pmpq_cart_rank_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_CART_COORDS MPQ_CART_COORDS +# define PMPI_CART_COORDS PMPQ_CART_COORDS +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_cart_coords__ mpq_cart_coords__ +# define pmpi_cart_coords__ pmpq_cart_coords__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_cart_coords mpq_cart_coords +# define pmpi_cart_coords pmpq_cart_coords +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_cart_coords_ mpq_cart_coords_ +# endif +# define pmpi_cart_coords_ pmpq_cart_coords_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GRAPH_NEIGHBORS_COUNT MPQ_GRAPH_NEIGHBORS_COUNT +# define PMPI_GRAPH_NEIGHBORS_COUNT PMPQ_GRAPH_NEIGHBORS_COUNT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_graph_neighbors_count__ mpq_graph_neighbors_count__ +# define pmpi_graph_neighbors_count__ pmpq_graph_neighbors_count__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_graph_neighbors_count mpq_graph_neighbors_count +# define pmpi_graph_neighbors_count pmpq_graph_neighbors_count +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_graph_neighbors_count_ mpq_graph_neighbors_count_ +# endif +# define pmpi_graph_neighbors_count_ pmpq_graph_neighbors_count_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GRAPH_NEIGHBORS MPQ_GRAPH_NEIGHBORS +# define PMPI_GRAPH_NEIGHBORS PMPQ_GRAPH_NEIGHBORS +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_graph_neighbors__ mpq_graph_neighbors__ +# define pmpi_graph_neighbors__ pmpq_graph_neighbors__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_graph_neighbors mpq_graph_neighbors +# define pmpi_graph_neighbors pmpq_graph_neighbors +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_graph_neighbors_ mpq_graph_neighbors_ +# endif +# define pmpi_graph_neighbors_ pmpq_graph_neighbors_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_CART_SHIFT MPQ_CART_SHIFT +# define PMPI_CART_SHIFT PMPQ_CART_SHIFT +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_cart_shift__ mpq_cart_shift__ +# define pmpi_cart_shift__ pmpq_cart_shift__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_cart_shift mpq_cart_shift +# define pmpi_cart_shift pmpq_cart_shift +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_cart_shift_ mpq_cart_shift_ +# endif +# define pmpi_cart_shift_ pmpq_cart_shift_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_CART_SUB MPQ_CART_SUB +# define PMPI_CART_SUB PMPQ_CART_SUB +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_cart_sub__ mpq_cart_sub__ +# define pmpi_cart_sub__ pmpq_cart_sub__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_cart_sub mpq_cart_sub +# define pmpi_cart_sub pmpq_cart_sub +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_cart_sub_ mpq_cart_sub_ +# endif +# define pmpi_cart_sub_ pmpq_cart_sub_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_PCONTROL MPQ_PCONTROL +# define PMPI_PCONTROL PMPQ_PCONTROL +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_pcontrol__ mpq_pcontrol__ +# define pmpi_pcontrol__ pmpq_pcontrol__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_pcontrol mpq_pcontrol +# define pmpi_pcontrol pmpq_pcontrol +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_pcontrol_ mpq_pcontrol_ +# endif +# define pmpi_pcontrol_ pmpq_pcontrol_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_FINALIZED MPQ_FINALIZED +# define PMPI_FINALIZED PMPQ_FINALIZED +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_finalized__ mpq_finalized__ +# define pmpi_finalized__ pmpq_finalized__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_finalized mpq_finalized +# define pmpi_finalized pmpq_finalized +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_finalized_ mpq_finalized_ +# endif +# define pmpi_finalized_ pmpq_finalized_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_CREATE_INDEXED_BLOCK MPQ_TYPE_CREATE_INDEXED_BLOCK +# define PMPI_TYPE_CREATE_INDEXED_BLOCK PMPQ_TYPE_CREATE_INDEXED_BLOCK +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_create_indexed_block__ mpq_type_create_indexed_block__ +# define pmpi_type_create_indexed_block__ pmpq_type_create_indexed_block__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_create_indexed_block mpq_type_create_indexed_block +# define pmpi_type_create_indexed_block pmpq_type_create_indexed_block +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_create_indexed_block_ mpq_type_create_indexed_block_ +# endif +# define pmpi_type_create_indexed_block_ pmpq_type_create_indexed_block_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_CREATE_SUBARRAY MPQ_TYPE_CREATE_SUBARRAY +# define PMPI_TYPE_CREATE_SUBARRAY PMPQ_TYPE_CREATE_SUBARRAY +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_create_subarray__ mpq_type_create_subarray__ +# define pmpi_type_create_subarray__ pmpq_type_create_subarray__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_create_subarray mpq_type_create_subarray +# define pmpi_type_create_subarray pmpq_type_create_subarray +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_create_subarray_ mpq_type_create_subarray_ +# endif +# define pmpi_type_create_subarray_ pmpq_type_create_subarray_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_CREATE_DARRAY MPQ_TYPE_CREATE_DARRAY +# define PMPI_TYPE_CREATE_DARRAY PMPQ_TYPE_CREATE_DARRAY +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_create_darray__ mpq_type_create_darray__ +# define pmpi_type_create_darray__ pmpq_type_create_darray__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_create_darray mpq_type_create_darray +# define pmpi_type_create_darray pmpq_type_create_darray +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_create_darray_ mpq_type_create_darray_ +# endif +# define pmpi_type_create_darray_ pmpq_type_create_darray_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INFO_CREATE MPQ_INFO_CREATE +# define PMPI_INFO_CREATE PMPQ_INFO_CREATE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_info_create__ mpq_info_create__ +# define pmpi_info_create__ pmpq_info_create__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_info_create mpq_info_create +# define pmpi_info_create pmpq_info_create +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_info_create_ mpq_info_create_ +# endif +# define pmpi_info_create_ pmpq_info_create_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INFO_DUP MPQ_INFO_DUP +# define PMPI_INFO_DUP PMPQ_INFO_DUP +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_info_dup__ mpq_info_dup__ +# define pmpi_info_dup__ pmpq_info_dup__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_info_dup mpq_info_dup +# define pmpi_info_dup pmpq_info_dup +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_info_dup_ mpq_info_dup_ +# endif +# define pmpi_info_dup_ pmpq_info_dup_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INFO_GET MPQ_INFO_GET +# define PMPI_INFO_GET PMPQ_INFO_GET +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_info_get__ mpq_info_get__ +# define pmpi_info_get__ pmpq_info_get__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_info_get mpq_info_get +# define pmpi_info_get pmpq_info_get +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_info_get_ mpq_info_get_ +# endif +# define pmpi_info_get_ pmpq_info_get_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INFO_GET_NTHKEY MPQ_INFO_GET_NTHKEY +# define PMPI_INFO_GET_NTHKEY PMPQ_INFO_GET_NTHKEY +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_info_get_nthkey__ mpq_info_get_nthkey__ +# define pmpi_info_get_nthkey__ pmpq_info_get_nthkey__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_info_get_nthkey mpq_info_get_nthkey +# define pmpi_info_get_nthkey pmpq_info_get_nthkey +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_info_get_nthkey_ mpq_info_get_nthkey_ +# endif +# define pmpi_info_get_nthkey_ pmpq_info_get_nthkey_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INFO_SET MPQ_INFO_SET +# define PMPI_INFO_SET PMPQ_INFO_SET +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_info_set__ mpq_info_set__ +# define pmpi_info_set__ pmpq_info_set__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_info_set mpq_info_set +# define pmpi_info_set pmpq_info_set +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_info_set_ mpq_info_set_ +# endif +# define pmpi_info_set_ pmpq_info_set_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INFO_DELETE MPQ_INFO_DELETE +# define PMPI_INFO_DELETE PMPQ_INFO_DELETE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_info_delete__ mpq_info_delete__ +# define pmpi_info_delete__ pmpq_info_delete__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_info_delete mpq_info_delete +# define pmpi_info_delete pmpq_info_delete +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_info_delete_ mpq_info_delete_ +# endif +# define pmpi_info_delete_ pmpq_info_delete_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INFO_FREE MPQ_INFO_FREE +# define PMPI_INFO_FREE PMPQ_INFO_FREE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_info_free__ mpq_info_free__ +# define pmpi_info_free__ pmpq_info_free__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_info_free mpq_info_free +# define pmpi_info_free pmpq_info_free +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_info_free_ mpq_info_free_ +# endif +# define pmpi_info_free_ pmpq_info_free_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INFO_GET_NKEYS MPQ_INFO_GET_NKEYS +# define PMPI_INFO_GET_NKEYS PMPQ_INFO_GET_NKEYS +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_info_get_nkeys__ mpq_info_get_nkeys__ +# define pmpi_info_get_nkeys__ pmpq_info_get_nkeys__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_info_get_nkeys mpq_info_get_nkeys +# define pmpi_info_get_nkeys pmpq_info_get_nkeys +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_info_get_nkeys_ mpq_info_get_nkeys_ +# endif +# define pmpi_info_get_nkeys_ pmpq_info_get_nkeys_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_INFO_GET_VALUELEN MPQ_INFO_GET_VALUELEN +# define PMPI_INFO_GET_VALUELEN PMPQ_INFO_GET_VALUELEN +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_info_get_valuelen__ mpq_info_get_valuelen__ +# define pmpi_info_get_valuelen__ pmpq_info_get_valuelen__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_info_get_valuelen mpq_info_get_valuelen +# define pmpi_info_get_valuelen pmpq_info_get_valuelen +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_info_get_valuelen_ mpq_info_get_valuelen_ +# endif +# define pmpi_info_get_valuelen_ pmpq_info_get_valuelen_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_GET_CONTENTS MPQ_TYPE_GET_CONTENTS +# define PMPI_TYPE_GET_CONTENTS PMPQ_TYPE_GET_CONTENTS +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_get_contents__ mpq_type_get_contents__ +# define pmpi_type_get_contents__ pmpq_type_get_contents__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_get_contents mpq_type_get_contents +# define pmpi_type_get_contents pmpq_type_get_contents +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_get_contents_ mpq_type_get_contents_ +# endif +# define pmpi_type_get_contents_ pmpq_type_get_contents_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_TYPE_GET_ENVELOPE MPQ_TYPE_GET_ENVELOPE +# define PMPI_TYPE_GET_ENVELOPE PMPQ_TYPE_GET_ENVELOPE +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_type_get_envelope__ mpq_type_get_envelope__ +# define pmpi_type_get_envelope__ pmpq_type_get_envelope__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_type_get_envelope mpq_type_get_envelope +# define pmpi_type_get_envelope pmpq_type_get_envelope +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_type_get_envelope_ mpq_type_get_envelope_ +# endif +# define pmpi_type_get_envelope_ pmpq_type_get_envelope_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GROUP_RANGE_INCL MPQ_GROUP_RANGE_INCL +# define PMPI_GROUP_RANGE_INCL PMPQ_GROUP_RANGE_INCL +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_group_range_incl__ mpq_group_range_incl__ +# define pmpi_group_range_incl__ pmpq_group_range_incl__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_group_range_incl mpq_group_range_incl +# define pmpi_group_range_incl pmpq_group_range_incl +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_group_range_incl_ mpq_group_range_incl_ +# endif +# define pmpi_group_range_incl_ pmpq_group_range_incl_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_GROUP_RANGE_EXCL MPQ_GROUP_RANGE_EXCL +# define PMPI_GROUP_RANGE_EXCL PMPQ_GROUP_RANGE_EXCL +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_group_range_excl__ mpq_group_range_excl__ +# define pmpi_group_range_excl__ pmpq_group_range_excl__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_group_range_excl mpq_group_range_excl +# define pmpi_group_range_excl pmpq_group_range_excl +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_group_range_excl_ mpq_group_range_excl_ +# endif +# define pmpi_group_range_excl_ pmpq_group_range_excl_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_STATUS_SET_CANCELLED MPQ_STATUS_SET_CANCELLED +# define PMPI_STATUS_SET_CANCELLED PMPQ_STATUS_SET_CANCELLED +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_status_set_cancelled__ mpq_status_set_cancelled__ +# define pmpi_status_set_cancelled__ pmpq_status_set_cancelled__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_status_set_cancelled mpq_status_set_cancelled +# define pmpi_status_set_cancelled pmpq_status_set_cancelled +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_status_set_cancelled_ mpq_status_set_cancelled_ +# endif +# define pmpi_status_set_cancelled_ pmpq_status_set_cancelled_ +#endif + +#if defined(F77_NAME_UPPER) +# define MPI_STATUS_SET_ELEMENTS MPQ_STATUS_SET_ELEMENTS +# define PMPI_STATUS_SET_ELEMENTS PMPQ_STATUS_SET_ELEMENTS +#elif defined(F77_NAME_LOWER_2USCORE) +# define mpi_status_set_elements__ mpq_status_set_elements__ +# define pmpi_status_set_elements__ pmpq_status_set_elements__ +#elif !defined(F77_NAME_LOWER_USCORE) +# define mpi_status_set_elements mpq_status_set_elements +# define pmpi_status_set_elements pmpq_status_set_elements +#else +# if !defined(MPI_BUILD_PROFILING) +# define mpi_status_set_elements_ mpq_status_set_elements_ +# endif +# define pmpi_status_set_elements_ pmpq_status_set_elements_ +#endif + +#endif /* !defined(MPID_FORT_H) */ --- mpich-1.2.7.orig/mpid/util/Makefile.in +++ mpich-1.2.7/mpid/util/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.5 2004/08/11 15:30:28 gropp Exp $ +# $Id: Makefile.in,v 1.6 2005/10/17 16:25:13 gropp Exp $ # # (C) 1993,1995 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. @@ -38,7 +38,7 @@ # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: $(MPI_OBJECTS) - $(AR) ../../build/$(ARCH)/$(DEVICE)/lib/lib@MPILIBNAME@.a $? + $(AR) cr ../../build/$(ARCH)/$(DEVICE)/lib/lib@MPILIBNAME@.a $? profile_all: clean: @@ -48,10 +48,10 @@ $(CC) $(CFLAGS) $(BASEOPT) -c $*.c $(MPI_PROFILE) ../../build/$(ARCH)/$(DEVICE)/lib/lib@MPILIBNAME@.a: $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ ../$(DEVICE)/libmpid.a: $(MPI_OBJECTS) - $(AR) $@ $? + $(AR) cr $@ $? $(RANLIB) $@ --- mpich-1.2.7.orig/src/coll/Makefile.in +++ mpich-1.2.7/src/coll/Makefile.in @@ -54,11 +54,11 @@ # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? profile_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/libp@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/libp@MPILIBNAME@.a $? default_conly: ${MPI_COBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? ${RANLIB} ${libbuild_dir}/lib@MPILIBNAME@.a source_names: @@ -68,11 +68,11 @@ ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTFLAGSC} ${OPTFLAGS} -c $< ${libbuild_dir}/lib@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ ${libbuild_dir}/libp@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ # We need to clean the srcdir of any .o files because they can confuse the --- mpich-1.2.7.orig/src/context/Makefile.in +++ mpich-1.2.7/src/context/Makefile.in @@ -63,11 +63,11 @@ # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/lib${MPILIBNAME}.a $? + ${AR} cr ${libbuild_dir}/lib${MPILIBNAME}.a $? profile_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/libp${MPILIBNAME}.a $? + ${AR} cr ${libbuild_dir}/libp${MPILIBNAME}.a $? default_conly: ${MPI_COBJECTS} - ${AR} ${libbuild_dir}/lib${MPILIBNAME}.a $? + ${AR} cr ${libbuild_dir}/lib${MPILIBNAME}.a $? ${RANLIB} ${libbuild_dir}/lib${MPILIBNAME}.a source_names: @@ -77,11 +77,11 @@ ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTFLAGSC} ${OPTFLAGS} -c $< ${libbuild_dir}/lib${MPILIBNAME}.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ ${libbuild_dir}/libp${MPILIBNAME}.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ # We need to clean the srcdir of any .o files because they can confuse the --- mpich-1.2.7.orig/src/dmpi/Makefile.in +++ mpich-1.2.7/src/dmpi/Makefile.in @@ -38,9 +38,9 @@ # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? profile_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/libp@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/libp@MPILIBNAME@.a $? source_names: @echo ${MPI_CSOURCES} @@ -49,11 +49,11 @@ ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTFLAGSC} ${OPTFLAGS} -c $< ${libbuild_dir}/lib@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ ${libbuild_dir}/libp@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ # We need to clean the srcdir of any .o files because they can confuse the --- mpich-1.2.7.orig/src/env/Makefile.in +++ mpich-1.2.7/src/env/Makefile.in @@ -54,17 +54,17 @@ # is the same, but for the profile library default_all: default_objs default_objs: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/lib${MPILIBNAME}.a $? + ${AR} cr ${libbuild_dir}/lib${MPILIBNAME}.a $? default_conly: ${MPI_COBJECTS} - ${AR} ${libbuild_dir}/lib${MPILIBNAME}.a $? + ${AR} cr ${libbuild_dir}/lib${MPILIBNAME}.a $? ${RANLIB} ${libbuild_dir}/lib${MPILIBNAME}.a profile_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/libp${MPILIBNAME}.a $? + ${AR} cr ${libbuild_dir}/libp${MPILIBNAME}.a $? ${MPI_OBJECTS} : ${MPI_INCLUDE} mpe_debug_objs: @MPE_MPI_EXT_O@ - ${AR} ${libbuild_dir}/lib${MPILIBNAME}.a @MPE_MPI_EXT_O@ + ${AR} cr ${libbuild_dir}/lib${MPILIBNAME}.a @MPE_MPI_EXT_O@ ${RANLIB} ${libbuild_dir}/lib${MPILIBNAME}.a source_names: @@ -148,11 +148,11 @@ ${CC} ${DEFS} ${CFLAGS} @NLS_DEFS@ -c ${srcdir}/nerrmsg.c ${libbuild_dir}/lib${MPILIBNAME}.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ ${libbuild_dir}/libp${MPILIBNAME}.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ tstmsg: ${CC} ${CFLAGS} -DTEST_MSGS @NLS_DEFS@ -c nerrmsg.c --- mpich-1.2.7.orig/src/external/Makefile.in +++ mpich-1.2.7/src/external/Makefile.in @@ -42,11 +42,11 @@ # is the same, but for the profile library default_all: default_objs default_objs: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? profile_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/libp@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/libp@MPILIBNAME@.a $? default_conly: ${MPI_COBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? ${RANLIB} ${libbuild_dir}/lib@MPILIBNAME@.a ${MPI_OBJECTS} : ${MPI_INCLUDE} @@ -58,11 +58,11 @@ ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTFLAGSC} ${OPTFLAGS} -c $< ${libbuild_dir}/lib@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ ${libbuild_dir}/libp@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ # We need to clean the srcdir of any .o files because they can confuse the # VPATH build process --- mpich-1.2.7.orig/src/fortran/configure.in +++ mpich-1.2.7/src/fortran/configure.in @@ -1,6 +1,6 @@ +AC_PREREQ(2.59) dnl needed for SHELL, added in 2.13 AC_INIT(Makefile.in) dnl -AC_PREREQ(2.13) dnl needed for SHELL, added in 2.13 rm -f ${srcdir}/mpi_fortconf.h mpi_fortconf.h AC_CONFIG_HEADER(mpi_fortconf.h) dnl We need install.sh, config.guess, etc. for the code that @@ -174,7 +174,7 @@ AC_SUBST(FORTRAN_INITOBJ) AC_SUBST(INCLUDES) if test "$pac_lib_mpi_is_building" = "yes" ; then - AC_DEFINE(BUILDING_IN_MPICH) + AC_DEFINE(BUILDING_IN_MPICH,1,[Define if building within MPICH1]) FORTRAN_INITOBJ="initfutil.o" # We should replace mpicc with the values used in the MPICH build. # This is best done with an environment variable (? what about @@ -245,7 +245,7 @@ fi if test "$pac_lib_mpi_is_building" = "yes" ; then - AC_DEFINE(HAVE_MPI_F2C) + AC_DEFINE(HAVE_MPI_F2C,1,[Define if MP_Xxx_f2c functions available]) else PAC_MPI_F2C @@ -401,7 +401,10 @@ AC_SUBST(F77_IN_C_LIBS) AC_LANG_FORTRAN77 PAC_PROG_F77_EXCLAIM_COMMENTS(has_exclaim="yes",has_exclaim="no") -PAC_PROG_F77_NEW_CHAR_DECL(CHARDECL="(LEN=*)",CHARDECL="*(*)") +dnl We're having trouble with this macro, so we use the old but +dnl always valid format for character declarations +dnl PAC_PROG_F77_NEW_CHAR_DECL(CHARDECL="(LEN=*)",CHARDECL="*(*)") +CHARDECL="*(*)" AC_SUBST(CHARDECL) dnl PAC_F77_CHECK_COMPILER_OPTION(-g) PAC_PROG_F77_HAS_INCDIR(include) @@ -438,7 +441,7 @@ data MPI_BOTTOM_PTR/0/, MPI_STATUS_IG_PTR/0/ data MPI_STATUSES_IG_PTR/0/ EOF - AC_DEFINE(USE_POINTER_FOR_BOTTOM) + AC_DEFINE(USE_POINTER_FOR_BOTTOM,1[Define if pointer should be use for MPI_BOTTOM]) dnl Note that with this, we do not need the call to mpir_init_fcm dnl in initfcmn.f . else @@ -473,11 +476,16 @@ # If we have sizes for real and double, we do not need to call mpir_get_fsize # at run time. # -AC_TRY_COMPILE(,[ integer*1 i],has_integer_1=1,has_integer_1=0) -AC_TRY_COMPILE(,[ integer*2 i],has_integer_2=2,has_integer_2=0) -AC_TRY_COMPILE(,[ integer*4 i],has_integer_4=4,has_integer_4=0) -AC_TRY_COMPILE(,[ integer*8 i],has_integer_8=8,has_integer_8=0) -AC_TRY_COMPILE(,[ integer*16 i],has_integer_16=16,has_integer_16=0) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ integer*1 i])], + has_integer_1=1,has_integer_1=0) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ integer*2 i])], + has_integer_2=2,has_integer_2=0) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ integer*4 i])], + has_integer_4=4,has_integer_4=0) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ integer*8 i])], + has_integer_8=8,has_integer_8=0) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ integer*16 i])], + has_integer_16=16,has_integer_16=0) dnl PAC_PROG_F77_CHECK_SIZEOF(integer*1,0) dnl PAC_PROG_F77_CHECK_SIZEOF(integer*2,0) dnl PAC_PROG_F77_CHECK_SIZEOF(integer*4,0) @@ -487,9 +495,12 @@ dnl PAC_PROG_F77_CHECK_SIZEOF(real*4,0) dnl PAC_PROG_F77_CHECK_SIZEOF(real*8,0) dnl PAC_PROG_F77_CHECK_SIZEOF(real*16,0) -AC_TRY_COMPILE(,[ real*4 a],has_real_4=4,has_real_4=0) -AC_TRY_COMPILE(,[ real*8 a],has_real_8=8,has_real_8=0) -AC_TRY_COMPILE(,[ real*16 a],has_real_16=16,has_real_16=0) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ real*4 a])], + has_real_4=4,has_real_4=0) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ real*8 a])], + has_real_8=8,has_real_8=0) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ real*16 a])], + has_real_16=16,has_real_16=0) # Compare the sizes of these types to the C types @@ -501,7 +512,7 @@ # Current bug: this is needed for mpi.h, which should eventually remove # the ifdef test on USE_STDARG # It is also used in the definition of MPIR_Err_setmsg. -PAC_HEADER_STDARG([AC_DEFINE(USE_STDARG)],[AC_DEFINE(USE_OLDSTYLE_STDARG)]) +PAC_HEADER_STDARG([AC_DEFINE(USE_STDARG,1,[if stdarg available])],[AC_DEFINE(USE_OLDSTYLE_STDARG,1,[Define if only old-style stdarg available])]) # Get defaults for cross compilation case CROSS_SIZEOF_CHAR=${CROSS_SIZEOF_CHAR:-0} @@ -623,7 +634,7 @@ dnl dnl Include a defined value for Fint is int if test "$MPI_FINT_TYPE" = "int" ; then - AC_DEFINE(FINT_IS_INT) + AC_DEFINE(FINT_IS_INT,,[Define if Fortran INTEGER is the same as C int]) fi PAC_PROG_C_UNALIGNED_DOUBLES(, @@ -632,7 +643,7 @@ Fortran (the Fortran standard requires it).)]) if test "$enable_weak" = "yes" ; then - PAC_PROG_C_WEAK_SYMBOLS(AC_DEFINE(HAVE_WEAK_SYMBOLS)) + PAC_PROG_C_WEAK_SYMBOLS(AC_DEFINE(HAVE_WEAK_SYMBOLS,,[Define if weak symbols available])) fi # @@ -664,7 +675,7 @@ true_val="`echo $pac_cv_prog_f77_true_false_value | sed -e 's/ .*//g'`" false_val="`echo $pac_cv_prog_f77_true_false_value | sed -e 's/.* *//g'`" if test -n "$true_val" -a -n "$false_val" ; then - AC_DEFINE(F77_TRUE_VALUE_SET) + AC_DEFINE(F77_TRUE_VALUE_SET,,[Define if Fortran logical values known]) AC_DEFINE_UNQUOTED(F77_TRUE_VALUE,$true_val) AC_DEFINE_UNQUOTED(F77_FALSE_VALUE,$false_val) AC_MSG_RESULT([True is $true_val and False is $false_val]) @@ -678,12 +689,13 @@ if test "$pac_lib_mpi_is_building" = "yes" ; then AC_LANG_C FARGOBJ="farg.o" - AC_DEFINE(HAS_MPIR_ERR_SETMSG) + AC_DEFINE(HAS_MPIR_ERR_SETMSG,1,[Define if MPICH err msg routine available]) else # Test for mpir_iargc; if not found, add farg.f.in AC_MSG_CHECKING([for mpir_iargc provided for command line in Fortran]) AC_LANG_FORTRAN77 - AC_TRY_LINK(,[mpir_iargc()],found="yes",found="no") + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[mpir_iargc()])], + found="yes",found="no") if test "$found" = "no" ; then AC_MSG_RESULT(no) PAC_LANG_PUSH_COMPILERS @@ -721,7 +733,7 @@ AC_MSG_WARN([You may have problems compiling the Fortran interface specifically calls to _fcdtocp]) elif test "$compile_check" = "yes" ; then - AC_DEFINE(_TWO_WORD_FCD) + AC_DEFINE(_TWO_WORD_FCD,,[Define if Cray two-word FCD used]) fi CFLAGS=$TEMP_CFLAGS fi @@ -731,7 +743,7 @@ # This asserts that Fortran passes functions by passing the address of the # pointer to the function. # We really need a TEST for this - AC_DEFINE(FORTRAN_SPECIAL_FUNCTION_PTR) + AC_DEFINE(FORTRAN_SPECIAL_FUNCTION_PTR,,[Define if function pointers special]) # Suggested values for these are dnl CFLAGS=-O dnl #FFLAGS=-Oe,-U -Aabe ( Parameter e is not supported on uxp/m ) --- mpich-1.2.7.orig/src/fortran/configure +++ mpich-1.2.7/src/fortran/configure @@ -1,80 +1,325 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.59. # +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + -# Defaults: -ac_help= +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help ---enable-cache - Turn on configure caching" -ac_help="$ac_help ---enable-strict - Turn on strict compilation testing when using gcc" -ac_help="$ac_help ---enable-echo - Turn on echoing from within the configure script" -ac_help="$ac_help ---enable-weak-symbols - Use weak symbols to provide the profiling interface - (default)" -ac_help="$ac_help ---enable-f90 - Find and use a Fortran 90 compiler (default:enable)" -ac_help="$ac_help ---enable-f90modules - Build an MPI module for use with Fortran 90" -ac_help="$ac_help ---enable-use-pointer - Use the common pointer extension for MPI_BOTTOM and - related special values" -ac_help="$ac_help ---with-flibname=name - Specify name of library containing Fortran interface -routines" -ac_help="$ac_help ---with-fwrapname=name - Specify name of library containing Fortran interface -routines" -ac_help="$ac_help ---with-mpe - MPI includes the MPE libraries" -ac_help="$ac_help ---with-cross=file - Use the file for cross compilation. The file should - contain assignments of the form - CROSS_SIZEOF_INT=4 - for each cross compilation variable. The command - egrep 'CROSS_[A-Z_]*=' configure | sed 's/=.*//g' - will list each variable" -ac_help="$ac_help ---with-mpichconfig=file - Use file for the MPICH configuration. - Normally, this file is mpichlib.conf, but other files - may be used." -ac_help="$ac_help ---with-subname=name - Use this name for forming the names of the - directories to install the mpif.h include file and - libraries, as well as the mpif77-name.conf file. This - should be used to support multiple Fortran compilers with - a single MPICH build. It must be used in conjunction with - --with-mpichconfig" -ac_help="$ac_help ---with-mpichbuilding - Assume that MPICH is being built" -ac_help="$ac_help ---with-mpich=path - Assume that we are building with MPICH" -ac_help="$ac_help ---with-lammpi=path - Assume that we are building with LAM/MPI" -ac_help="$ac_help ---with-ibmmpi - Use the IBM SP implementation of MPI" -ac_help="$ac_help ---with-sgimpi - Use the SGI implementation of MPI" -ac_help="$ac_help ---with-mpichnt - Use MPICH for Windows NT " +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="Makefile.in" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS HAVE_MPID_FORTDEFS_H COPTIONS FLIBNAME FWRAPNAME hasMPE OPTFLAGS OPTFLAGSF MPI_STATUS_SIZE f77includedir f77libdir f77bindir subname libbuild_dir FORTRAN_INITOBJ INCLUDES MPIVERSION CC CFLAGS F77 FFLAGS LDFLAGS ac_ct_F77 EXEEXT OBJEXT FOPTIONS FLINKER F90 F90FLAGS ac_ct_F90 F90LINKER CXX MPIRUN_NP MPIEXEC_N MPICC MPIF77 MPIF90 MPICXX MPIEXEC MPIRUN MPIBOOT MPIUNBOOT MPCC MPXLF CXXFLAGS CPPFLAGS ac_ct_CXX MAKE VPATH SET_CFLAGS SET_MAKE AR RANLIB ac_ct_RANLIB F77LINKER CPP MPILIBNAME LIB_PATH BASE_LIB_LIST HASMPE F77_LDFLAGS BASE_FFLAGS includebuild_dir MPI_WITH_PMPI SHAREDKIND SHARED_LIB_SEARCH_PATH_LEADER SHARED_LIB_LOCALDIR sharedlibbuild_dir sharedlib_dir MPI2_OBJECTS TESTCPP F77_GETARGDECL F77_IARGC F77_GETARG FXX_MODULE F77_GETARG_FFLAGS F77_GETARG_LDFLAGS F90_GETARG_FFLAGS F90_GETARG_LDFLAGS FLIBS F77_NAME_MANGLE F77_IN_C_LIBS CHARDECL F77_INCDIR FINCLUDES F77_LIBDIR_LEADER MPIFPMPI EGREP F77_INT1 F77_INT2 F77_INT4 F77_INT8 F77_INT16 F77_REAL4 F77_REAL8 F77_REAL16 F77_COMPLEX8 F77_COMPLEX16 F77_COMPLEX32 MPI_FINT_TYPE FARGOBJ ADDRESS_KIND OFFSET_KIND F90_SUFFIX f90includedir f90libdir F90_LDFLAGS F90INC F90_MODINCFLAG F90MODINCSPEC F90LIB_PATH F90_LIBDIR_LEADER LIBOBJS LTLIBOBJS' +ac_subst_files='' # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -83,10 +328,15 @@ silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -100,17 +350,9 @@ infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -118,59 +360,59 @@ continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) - datadir="$ac_optarg" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -179,95 +421,47 @@ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -276,19 +470,19 @@ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -302,26 +496,26 @@ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -338,7 +532,7 @@ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -348,7 +542,7 @@ ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -359,58 +553,57 @@ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -421,99 +614,110 @@ ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -exec 5>./config.log -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=Makefile.in # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. @@ -523,13 +727,517 @@ fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_F77_set=${F77+set} +ac_env_F77_value=$F77 +ac_cv_env_F77_set=${F77+set} +ac_cv_env_F77_value=$F77 +ac_env_FFLAGS_set=${FFLAGS+set} +ac_env_FFLAGS_value=$FFLAGS +ac_cv_env_FFLAGS_set=${FFLAGS+set} +ac_cv_env_FFLAGS_value=$FFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_F90_set=${F90+set} +ac_env_F90_value=$F90 +ac_cv_env_F90_set=${F90+set} +ac_cv_env_F90_value=$F90 +ac_env_F90FLAGS_set=${F90FLAGS+set} +ac_env_F90FLAGS_value=$F90FLAGS +ac_cv_env_F90FLAGS_set=${F90FLAGS+set} +ac_cv_env_F90FLAGS_value=$F90FLAGS +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] +--enable-cache - Turn on configure caching +--enable-strict - Turn on strict compilation testing when using gcc +--enable-echo - Turn on echoing from within the configure script +--enable-weak-symbols - Use weak symbols to provide the profiling interface + (default) +--enable-f90 - Find and use a Fortran 90 compiler (default:enable) +--enable-f90modules - Build an MPI module for use with Fortran 90 +--enable-use-pointer - Use the common pointer extension for MPI_BOTTOM and + related special values + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) +--with-flibname=name - Specify name of library containing Fortran interface +routines +--with-fwrapname=name - Specify name of library containing Fortran interface +routines +--with-mpe - MPI includes the MPE libraries +--with-cross=file - Use the file for cross compilation. The file should + contain assignments of the form + CROSS_SIZEOF_INT=4 + for each cross compilation variable. The command + egrep 'CROSS_A-Z_*=' configure | sed 's/=.*//g' + will list each variable +--with-mpichconfig=file - Use file for the MPICH configuration. + Normally, this file is mpichlib.conf, but other files + may be used. +--with-subname=name - Use this name for forming the names of the + directories to install the mpif.h include file and + libraries, as well as the mpif77-name.conf file. This + should be used to support multiple Fortran compilers with + a single MPICH build. It must be used in conjunction with + --with-mpichconfig +--with-mpichbuilding - Assume that MPICH is being built +--with-mpich=path - Assume that we are building with MPICH +--with-lammpi=path - Assume that we are building with LAM/MPI +--with-ibmmpi - Use the IBM SP implementation of MPI +--with-sgimpi - Use the SGI implementation of MPI +--with-mpichnt - Use MPICH for Windows NT + +Some influential environment variables: + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + F90 Fortran 90 compiler command + F90FLAGS Fortran 90 compiler flags + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd "$ac_popdir" + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright (C) 2003 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then @@ -540,41 +1248,43 @@ fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done -if test "$CONFIGURE_DEBUG_CACHE" = yes ; then +if test "$CONFIGURE_DEBUG_CACHE" = yes ; then oldopts="$-" clearMinusX=no - set -x - if test "$oldopts" != "$-" ; then + set -x + if test "$oldopts" != "$-" ; then clearMinusX=yes fi -fi +fi if test "X$cache_system" = "X" ; then # A default file name, just in case cache_system="config.system" if test "$cache_file" != "/dev/null" ; then # Get the directory for the cache file, if any - + cache_system=`echo $cache_file | sed -e 's%^\(.*/\)[^/]*%\1config.system%'` - + test "x$cache_system" = "x$cache_file" && cache_system="config.system" # else # We must *not* set enable_cache to no because we need to know if -# enable_cache was not set. +# enable_cache was not set. # enable_cache=no fi fi # -# Get a test value and flag whether we should remove/replace the +# Get a test value and flag whether we should remove/replace the # cache_system file (do so unless cache_system_ok is yes) # FC and F77 should be synonyms. Save both in case # We include the xxxFLAGS in case the user is using the flags to change -# the language (either input or output) of the compiler. E.g., -# using -xarch=v9 on Solaris to select 64 bit output or using -D_BSD_SOURCE +# the language (either input or output) of the compiler. E.g., +# using -xarch=v9 on Solaris to select 64 bit output or using -D_BSD_SOURCE # with gcc to get different header files on input. cleanargs=`echo "$CC $F77 $FC $CXX $F90 $CFLAGS $FFLAGS $CXXFLAGS $F90FLAGS $PATH" | tr '"' ' '` if uname -srm >/dev/null 2>&1 ; then @@ -600,7 +1310,7 @@ elif test ! -f "$cache_system" -a -n "$cache_system_text" ; then # remove the cache file because it may not correspond to our # system - if test "$cache_file" != "/dev/null" ; then + if test "$cache_file" != "/dev/null" ; then rm -f $cache_file fi real_enable_cache="yes" @@ -615,7 +1325,7 @@ echo "loading cache $cache_file" if test -w "$cache_file" ; then # Clean the cache file (ergh) - + rm -f confcache sed -e "s/'\\\\''//g" -e "s/'\\\\/'/" -e "s/\\\\'/'/" \ -e "s/'\\\\''//g" $cache_file > confcache @@ -628,7 +1338,7 @@ else echo "not updating unwritable cache $cache_file" fi - fi + fi rm -f confcache if test "$DEBUG_AUTOCONF_CACHE" = "yes" ; then echo "Results of cleaned cache file:" @@ -661,43 +1371,97 @@ set +x fi +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - rm -f ${srcdir}/mpi_fortconf.h mpi_fortconf.h -if test -f $CONFIG_AUX_DIR/install-sh ; then ac_aux_dir=$CONFIG_AUX_DIR -else -ac_aux_dir= -# We force the test to use the absolute path to ensure that the install -# program can be used if we cd to a different directory before using -# install. -for ac_dir in config $srcdir/config; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - abs_ac_aux_dir=`(cd $ac_aux_dir && pwd)` - ac_install_sh="$abs_ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then + + + + + + + + + + + + + + + +rm -f ${srcdir}/mpi_fortconf.h mpi_fortconf.h + ac_config_headers="$ac_config_headers mpi_fortconf.h" + +if test -f $CONFIG_AUX_DIR/install-sh ; then ac_aux_dir=$CONFIG_AUX_DIR +else +ac_aux_dir= +# We force the test to use the absolute path to ensure that the install +# program can be used if we cd to a different directory before using +# install. +for ac_dir in config $srcdir/config; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + abs_ac_aux_dir=`(cd $ac_aux_dir && pwd)` + ac_install_sh="$abs_ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir abs_ac_aux_dir=`(cd $ac_aux_dir && pwd)` ac_install_sh="$abs_ac_aux_dir/install.sh -c" @@ -706,7 +1470,9 @@ done fi if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in config $srcdir/config" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: can not find install-sh or install.sh in config $srcdir/config" >&5 +echo "$as_me: error: can not find install-sh or install.sh in config $srcdir/config" >&2;} + { (exit 1); exit 1; }; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub @@ -725,8 +1491,7 @@ enable_cache="$enableval" else enable_cache="notgiven" -fi - +fi; @@ -734,15 +1499,13 @@ if test "${enable_strict+set}" = set; then enableval="$enable_strict" COPTIONS="${COPTIONS} -Wall -O -Wstrict-prototypes -Wmissing-prototypes -DGCC_WALL" -fi - +fi; # Check whether --enable-echo or --disable-echo was given. if test "${enable_echo+set}" = set; then enableval="$enable_echo" set -x -fi - +fi; # Check whether --enable-weak-symbols or --disable-weak-symbols was given. if test "${enable_weak_symbols+set}" = set; then @@ -750,8 +1513,7 @@ enable_weak=$enableval else enable_weak="yes" -fi - +fi; # Check whether --enable-f90 or --disable-f90 was given. if test "${enable_f90+set}" = set; then @@ -759,8 +1521,7 @@ enable_f90=$enableval else enable_f90="yes" -fi - +fi; # Check whether --enable-f90modules or --disable-f90modules was given. if test "${enable_f90modules+set}" = set; then @@ -768,8 +1529,7 @@ do_f90_modules=$enableval else do_f90_modules="yes" -fi - +fi; # Check whether --enable-use-pointer or --disable-use-pointer was given. if test "${enable_use_pointer+set}" = set; then @@ -777,7 +1537,7 @@ use_pointer_in_f77=$enableval else use_pointer_in_f77="no" -fi +fi; # Check whether --with-flibname or --without-flibname was given. @@ -786,7 +1546,7 @@ FLIBNAMEOverride=$withval;set_FLIBNAME="yes" else FLIBNAME=mpich -fi +fi; @@ -796,7 +1556,7 @@ FWRAPNAME=$withval;set_FWRAPNAME="yes" else FWRAPNAME=fmpich -fi +fi; @@ -806,7 +1566,7 @@ hasMPE=$withval else hasMPE="unknown" -fi +fi; @@ -816,21 +1576,21 @@ cross_file=$withval else cross_file=/dev/null -fi +fi; # Check whether --with-mpichconfig or --without-mpichconfig was given. if test "${with_mpichconfig+set}" = set; then withval="$with_mpichconfig" - if test -z "$withval" -o "X$withval" = "Xyes" ; then + if test -z "$withval" -o "X$withval" = "Xyes" ; then mpichconfig_file=../../util/mpichlib.conf -else +else mpichconfig_file=$withval fi else mpichconfig_file="" -fi +fi; # Check whether --with-subname or --without-subname was given. @@ -839,8 +1599,7 @@ subname=$withval else subname="" -fi - +fi; # Propagate any optimization flags @@ -848,18 +1607,20 @@ + # Check whether --with-mpichbuilding or --without-mpichbuilding was given. if test "${with_mpichbuilding+set}" = set; then withval="$with_mpichbuilding" pac_lib_mpi_is_building=$withval else pac_lib_mpi_is_building="no" -fi - +fi; if test -n "$subname" -a -z "$mpichconfig_file" ; then - { echo "configure: error: Must specify --with-mpichconfig with --with-subname" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: Must specify --with-mpichconfig with --with-subname" >&5 +echo "$as_me: error: Must specify --with-mpichconfig with --with-subname" >&2;} + { (exit 1); exit 1; }; } fi # Read any cross-compilation variable values @@ -875,7 +1636,7 @@ # # Handle the FLIBNAMEOverride after the argument processing and loading # of the mpichconfig file -if test "$set_FLIBNAME" = "yes" ; then +if test "$set_FLIBNAME" = "yes" ; then FLIBNAME=$FLIBNAMEOverride fi @@ -883,7 +1644,8 @@ # Set size of MPI_Status # if test -z "$MPI_STATUS_SIZE" ; then - echo "configure: warning: MPI_STATUS_SIZE was not defined!" 1>&2 + { echo "$as_me:$LINENO: WARNING: MPI_STATUS_SIZE was not defined!" >&5 +echo "$as_me: WARNING: MPI_STATUS_SIZE was not defined!" >&2;} # The default size is 4 MPI_STATUS_SIZE=4 fi @@ -924,20 +1686,21 @@ -if test "$pac_lib_mpi_is_building" = "yes" ; then - cat >> confdefs.h <<\EOF +if test "$pac_lib_mpi_is_building" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF #define BUILDING_IN_MPICH 1 -EOF +_ACEOF FORTRAN_INITOBJ="initfutil.o" # We should replace mpicc with the values used in the MPICH build. - # This is best done with an environment variable (? what about + # This is best done with an environment variable (? what about # config.status re-execution?) INCLUDES="$mpich_includes" if test "$hasMPE" = "unknown" ; then hasMPE="yes" fi - + fi # Directory for building the library in (in src if not specified) if test -z "$libbuild_dir" ; then @@ -948,398 +1711,739 @@ -for ac_prog in cc xlC xlc pgcc icc gcc + +for ac_prog in cc xlC xlc pgcc icc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # 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:957: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # 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_CC="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$CC" && break + test -n "$CC" && break done -test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:988: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 999 "configure" -#include "confdefs.h" +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + { (exit 1); exit 1; }; } -main(){return(0);} -EOF -if { (eval echo configure:1004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1030: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross +echo "$as_me:$LINENO: checking whether the C compiler sets its return status correctly" >&5 +echo $ECHO_N "checking whether the C compiler sets its return status correctly... $ECHO_C" >&6 -echo $ac_n "checking whether the C compiler sets its return status correctly""... $ac_c" 1>&6 -echo "configure:1035: checking whether the C compiler sets its return status correctly" >&5 ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then notbroken=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - notbroken=yes + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +notbroken=yes fi -rm -f conftest* -echo "$ac_t""$notbroken" 1>&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $notbroken" >&5 +echo "${ECHO_T}$notbroken" >&6 if test "$notbroken" = "no" ; then - { echo "configure: error: installation or configuration problem: C compiler does not -correctly set error code when a fatal error occurs" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: installation or configuration problem: C compiler does not +correctly set error code when a fatal error occurs" >&5 +echo "$as_me: error: installation or configuration problem: C compiler does not +correctly set error code when a fatal error occurs" >&2;} + { (exit 1); exit 1; }; } fi -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1069: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -if test "$ac_cv_prog_gcc" = yes; then +if test "$ac_cv_c_compiler_gnu" = yes; then GCC=yes else GCC= fi -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1094: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif -/* Ultrix mips cc rejects this. */ -typedef int charset[2]; const charset x; -/* SunOS 4.1.1 cc rejects this. */ -char const *const *ccp; -char **p; -/* NEC SVR4.0.2 mips cc rejects this. */ -struct point {int x, y;}; -static struct point const zero = {0,0}; -/* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in an arm - of an if-expression whose if-part is not a constant expression */ -const char *g = "string"; -ccp = &g + (g ? g-g : 0); -/* HPUX 7.0 cc rejects these. */ -++ccp; -p = (char**) ccp; -ccp = (char const *const *) p; -{ /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; -} -{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; -} -{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; -} -{ /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; + ; + return 0; } - -; return 0; } -EOF -if { (eval echo configure:1148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_const=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_const=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF fi -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ long long i; -; return 0; } -EOF -if { (eval echo configure:1176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG 1 -EOF +_ACEOF else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ long double d; -; return 0; } -EOF -if { (eval echo configure:1195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_DOUBLE 1 -EOF +_ACEOF else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext save_FFLAGS="$FFLAGS" -if test -z "$F77"; then - for ac_prog in g77 f77 f2c -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:1213: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # 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_F77="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -F77="$ac_cv_prog_F77" +F77=$ac_cv_prog_F77 if test -n "$F77"; then - echo "$ac_t""$F77" 1>&6 + echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$F77" && break + test -n "$ac_ct_F77" && break done - test -z "$F77" && { echo "configure: error: no acceptable Fortran 77 compiler found in \$PATH" 1>&2; exit 1; } + F77=$ac_ct_F77 fi -echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1246: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works" >&5 -ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +# Provide some information about the compiler. +echo "$as_me:2124:" \ + "checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out -cat > conftest.$ac_ext << EOF +cat >conftest.$ac_ext <<_ACEOF + program main - program conftest end +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for Fortran 77 compiler default output file name" >&5 +echo $ECHO_N "checking for Fortran 77 compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -EOF -if { (eval echo configure:1259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_f77_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_f77_cross=no +{ { echo "$as_me:$LINENO: error: Fortran 77 compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: Fortran 77 compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the Fortran 77 compiler works" >&5 +echo $ECHO_N "checking whether the Fortran 77 compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no else - ac_cv_prog_f77_cross=yes + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run Fortran 77 compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run Fortran 77 compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_f77_works=no fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_f77_works" 1>&6 -if test $ac_cv_prog_f77_works = no; then - { echo "configure: error: installation or configuration problem: Fortran 77 compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1285: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_f77_cross" 1>&6 -cross_compiling=$ac_cv_prog_f77_cross - -echo $ac_n "checking whether we are using GNU Fortran 77""... $ac_c" 1>&6 -echo "configure:1290: checking whether we are using GNU Fortran 77" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_g77'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.fpp <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_g77=yes +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done else - ac_cv_prog_g77=no -fi -fi + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main -echo "$ac_t""$ac_cv_prog_g77" 1>&6 + end +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test $ac_cv_prog_g77 = yes; then - G77=yes - ac_test_FFLAGS="${FFLAGS+set}" - ac_save_FFLAGS="$FFLAGS" - FFLAGS= - echo $ac_n "checking whether $F77 accepts -g""... $ac_c" 1>&6 -echo "configure:1314: checking whether $F77 accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_f77_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.f << EOF - program conftest - end -EOF -if test -z "`$F77 -g -c conftest.f 2>&1`"; then + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else - ac_cv_prog_f77_g=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_f77_g=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_prog_f77_g" 1>&6 - if test "$ac_test_FFLAGS" = set; then - FFLAGS="$ac_save_FFLAGS" - elif test $ac_cv_prog_f77_g = yes; then +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else - FFLAGS="-O2" + FFLAGS="-g" fi else - G77= - test "${FFLAGS+set}" = set || FFLAGS="-g" + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi fi +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + FFLAGS="$save_FFLAGS" if test -z "$FLINKER" ; then @@ -1348,133 +2452,299 @@ # We need F90 to get the OFFSET_KIND and ADDRESS_KIND values. if test "$enable_f90" != "no" ; then - -if test -z "$F90" ; then - for ac_prog in f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 fc ifc efc -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:1359: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_F90'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + # This is the fortran90 version of f90 language support +ac_ext=${ac_f90ext-f} +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 gfortran ifc efc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_F90+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F90"; then ac_cv_prog_F90="$F90" # 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_F90="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_F90="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -F90="$ac_cv_prog_F90" +F90=$ac_cv_prog_F90 if test -n "$F90"; then - echo "$ac_t""$F90" 1>&6 + echo "$as_me:$LINENO: result: $F90" >&5 +echo "${ECHO_T}$F90" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$F90" && break + test -n "$F90" && break + done +fi +if test -z "$F90"; then + ac_ct_F90=$F90 + for ac_prog in f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 gfortran ifc efc +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_F90+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F90"; then + ac_cv_prog_ac_ct_F90="$ac_ct_F90" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_F90="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - test -z "$F90" && echo "configure: warning: no acceptable Fortran 90 compiler found in \$PATH" 1>&2 fi -if test -n "$F90" ; then - echo $ac_n "checking for extension for Fortran 90 programs""... $ac_c" 1>&6 -echo "configure:1392: checking for extension for Fortran 90 programs" >&5 -pac_cv_f90_ext="f90" -cat > conftest.$pac_cv_f90_ext <&5; (eval $ac_compile) 2>&5; } ; then - echo "$ac_t""f90" 1>&6 +fi +ac_ct_F90=$ac_cv_prog_ac_ct_F90 +if test -n "$ac_ct_F90"; then + echo "$as_me:$LINENO: result: $ac_ct_F90" >&5 +echo "${ECHO_T}$ac_ct_F90" >&6 else - rm -f conftest* - pac_cv_f90_ext="f" - cat > conftest.$pac_cv_f90_ext <&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_F90" && break +done + + F90=$ac_ct_F90 +fi + + +# once we find the compiler, confirm the extension +echo "$as_me:$LINENO: checking that $ac_ext works as the extension for Fortran 90 program" >&5 +echo $ECHO_N "checking that $ac_ext works as the extension for Fortran 90 program... $ECHO_C" >&6 +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "$as_me:$LINENO: checking for extension for Fortran 90 programs" >&5 +echo $ECHO_N "checking for extension for Fortran 90 programs... $ECHO_C" >&6 + ac_ext="f90" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; } ; then - echo "$ac_t""f" 1>&6 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then + echo "$as_me:$LINENO: result: f90" >&5 +echo "${ECHO_T}f90" >&6 else - echo "$ac_t""unknown!" 1>&6 - fi -fi -echo $ac_n "checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1415: checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) works" >&5 - -# We cannot use _LANG_FORTRAN90 here because we will usually be executing this -# test in the context of _PROG_F90, which is a require on _LANG_FORTRAN90. -# Instead, we insert the necessary code from _LANG_FORTRAN90 here -ac_ext=$pac_cv_f90_ext -ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&5' -ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$pac_cv_prog_f90_cross -# Include a Fortran 90 construction to distinguish between Fortran 77 -# and Fortran 90 compilers. -cat >conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeect} ; then - pac_cv_prog_f90_works="yes" - if (./conftest; exit) 2>/dev/null ; then - pac_cv_prog_f90_cross="no" + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then + echo "$as_me:$LINENO: result: f" >&5 +echo "${ECHO_T}f" >&6 + else + echo "$as_me:$LINENO: result: unknown!" >&5 +echo "${ECHO_T}unknown!" >&6 + fi + fi + ac_f90ext=$ac_ext + if test "$ac_ext" = "f90" ; then + pac_cv_f90_ext_f90=yes else - pac_cv_prog_f90_cross="yes" + pac_cv_f90_ext_f90=no fi + pac_cv_f90_ext=$ac_ext + rm -f conftest* +fi +# Provide some information about the compiler. +echo "$as_me:2607:" \ + "checking for Fortran 90 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. +if test -n "$F90" ; then + ac_save_ext=$ac_ext + ac_ext=F + echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 90 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 90 compiler... $ECHO_C" >&6 +if test "${ac_cv_f90_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - pac_cv_prog_f90_works="no" + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f90_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f90_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f90_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f90_compiler_gnu" >&6 + ac_ext=$ac_save_ext + G90=`test $ac_compiler_gnu = yes && echo yes` + ac_test_F90FLAGS=${F90FLAGS+set} +ac_save_F90FLAGS=$F90FLAGS +F90FLAGS= +echo "$as_me:$LINENO: checking whether $F90 accepts -g" >&5 +echo $ECHO_N "checking whether $F90 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f90_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + F90FLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f90_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_f90_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_f90_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f90_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f90_g" >&6 +if test "$ac_test_F90FLAGS" = set; then + F90FLAGS=$ac_save_F90FLAGS +elif test $ac_cv_prog_f90_g = yes; then + if test "$G90" = yes; then + F90FLAGS="-g -O2" + else + F90FLAGS="-g" + fi +else + if test "$G90" = yes; then + F90FLAGS="-O2" + else + F90FLAGS= + fi +fi fi -rm -f conftest* -# The intel compiler sometimes generates these work.pc and .pcl files -rm -f work.pc work.pcl ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$pac_cv_prog_f90_works" 1>&6 -if test $pac_cv_prog_f90_works = no; then - echo "configure: warning: installation or configuration problem: Fortran 90 compiler cannot create executables." 1>&2 -fi -echo $ac_n "checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1458: checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$pac_cv_prog_f90_cross" 1>&6 -cross_compiling=$pac_cv_prog_f90_cross - -fi -ac_f90ext=$pac_cv_f90_ext -ac_f90compile='${F90-f90} -c $F90FLAGS conftest.$ac_f90ext 1>&5' -ac_f90link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_f90ext $LIBS 1>&5' -# Check for problems with Intel efc compiler, if the compiler works -if test "$pac_cv_prog_f90_works" = yes ; then - cat > conftest.$ac_f90ext <&1 | grep 'bfd assertion fail'` - if test -n "$pac_msg" ; then - pac_msg=`$F90 -o conftest $F90FLAGS $LDFLAGS conftest.$ac_f90ext -i_dynamic $LIBS 2>&1 | grep 'bfd assertion fail'` - if test -z "$pac_msg" ; then LDFLAGS="-i_dynamic" ; fi - # There should really be f90linker flags rather than generic ldflags. - fi -fi +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -z "$F90" ; then enable_f90=no @@ -1483,7 +2753,7 @@ F90LINKER="$F90" fi fi - + fi @@ -1491,36 +2761,36 @@ + # Check whether --with-mpich or --without-mpich was given. if test "${with_mpich+set}" = set; then withval="$with_mpich" ac_mpi_type=mpich -fi +fi; # Check whether --with-lammpi or --without-lammpi was given. if test "${with_lammpi+set}" = set; then withval="$with_lammpi" ac_mpi_type=lammpi -fi +fi; # Check whether --with-ibmmpi or --without-ibmmpi was given. if test "${with_ibmmpi+set}" = set; then withval="$with_ibmmpi" ac_mpi_type=ibmmpi -fi +fi; # Check whether --with-sgimpi or --without-sgimpi was given. if test "${with_sgimpi+set}" = set; then withval="$with_sgimpi" ac_mpi_type=sgimpi -fi +fi; # Check whether --with-mpichnt or --without-mpichnt was given. if test "${with_mpichnt+set}" = set; then withval="$with_mpichnt" ac_mpi_type=mpichnt -fi - +fi; if test "X$ac_mpi_type" = "X" ; then if test "X" != "X" ; then @@ -1532,11 +2802,16 @@ if test "$ac_mpi_type" = "unknown" -a "$pac_lib_mpi_is_building" = "yes" ; then ac_mpi_type="mpich" fi +# Set defaults +MPIRUN_NP="-np " +MPIEXEC_N="-n " + + case $ac_mpi_type in mpich) if test "X$pac_lib_mpi_is_building" != "Xyes" ; then save_PATH="$PATH" - if test "$with_mpich" != "yes" -a "$with_mpich" != "no" ; then + if test "$with_mpich" != "yes" -a "$with_mpich" != "no" ; then # Look for commands; if not found, try adding bin to the # path if test ! -x $with_mpich/mpicc -a -x $with_mpich/bin/mpicc ; then @@ -1546,261 +2821,328 @@ fi # Extract the first word of "mpicc", so it can be a program name with args. set dummy mpicc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1551: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MPICC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MPICC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MPICC" in - /*) + case $MPICC in + [\\/]* | ?:[\\/]*) ac_cv_path_MPICC="$MPICC" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_MPICC="$MPICC" # Let the user override the test with a dos path. - ;; *) - 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_path_MPICC="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPICC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -MPICC="$ac_cv_path_MPICC" +MPICC=$ac_cv_path_MPICC + if test -n "$MPICC"; then - echo "$ac_t""$MPICC" 1>&6 + echo "$as_me:$LINENO: result: $MPICC" >&5 +echo "${ECHO_T}$MPICC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi TESTCC=${CC-cc} CC="$MPICC" # Extract the first word of "mpif77", so it can be a program name with args. set dummy mpif77; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1588: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MPIF77'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MPIF77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MPIF77" in - /*) + case $MPIF77 in + [\\/]* | ?:[\\/]*) ac_cv_path_MPIF77="$MPIF77" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_MPIF77="$MPIF77" # Let the user override the test with a dos path. - ;; *) - 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_path_MPIF77="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPIF77="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -MPIF77="$ac_cv_path_MPIF77" +MPIF77=$ac_cv_path_MPIF77 + if test -n "$MPIF77"; then - echo "$ac_t""$MPIF77" 1>&6 + echo "$as_me:$LINENO: result: $MPIF77" >&5 +echo "${ECHO_T}$MPIF77" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi TESTF77=${F77-f77} F77="$MPIF77" # Extract the first word of "mpif90", so it can be a program name with args. set dummy mpif90; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1625: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MPIF90'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MPIF90+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MPIF90" in - /*) + case $MPIF90 in + [\\/]* | ?:[\\/]*) ac_cv_path_MPIF90="$MPIF90" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_MPIF90="$MPIF90" # Let the user override the test with a dos path. - ;; *) - 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_path_MPIF90="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPIF90="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -MPIF90="$ac_cv_path_MPIF90" +MPIF90=$ac_cv_path_MPIF90 + if test -n "$MPIF90"; then - echo "$ac_t""$MPIF90" 1>&6 + echo "$as_me:$LINENO: result: $MPIF90" >&5 +echo "${ECHO_T}$MPIF90" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi TESTF90=${F90-f90} F90="$MPIF90" # Extract the first word of "mpiCC", so it can be a program name with args. set dummy mpiCC; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1662: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MPICXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MPICXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MPICXX" in - /*) + case $MPICXX in + [\\/]* | ?:[\\/]*) ac_cv_path_MPICXX="$MPICXX" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_MPICXX="$MPICXX" # Let the user override the test with a dos path. - ;; *) - 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_path_MPICXX="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPICXX="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -MPICXX="$ac_cv_path_MPICXX" +MPICXX=$ac_cv_path_MPICXX + if test -n "$MPICXX"; then - echo "$ac_t""$MPICXX" 1>&6 + echo "$as_me:$LINENO: result: $MPICXX" >&5 +echo "${ECHO_T}$MPICXX" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi TESTCXX=${CXX-CC} CXX="$MPICXX" # We may want to restrict this to the path containing mpirun + # Extract the first word of "mpiexec", so it can be a program name with args. +set dummy mpiexec; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MPIEXEC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MPIEXEC in + [\\/]* | ?:[\\/]*) + ac_cv_path_MPIEXEC="$MPIEXEC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPIEXEC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +MPIEXEC=$ac_cv_path_MPIEXEC + +if test -n "$MPIEXEC"; then + echo "$as_me:$LINENO: result: $MPIEXEC" >&5 +echo "${ECHO_T}$MPIEXEC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + # Extract the first word of "mpirun", so it can be a program name with args. set dummy mpirun; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1700: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MPIRUN'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MPIRUN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MPIRUN" in - /*) + case $MPIRUN in + [\\/]* | ?:[\\/]*) ac_cv_path_MPIRUN="$MPIRUN" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_MPIRUN="$MPIRUN" # Let the user override the test with a dos path. - ;; *) - 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_path_MPIRUN="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPIRUN="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -MPIRUN="$ac_cv_path_MPIRUN" +MPIRUN=$ac_cv_path_MPIRUN + if test -n "$MPIRUN"; then - echo "$ac_t""$MPIRUN" 1>&6 + echo "$as_me:$LINENO: result: $MPIRUN" >&5 +echo "${ECHO_T}$MPIRUN" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi # Extract the first word of "mpichboot", so it can be a program name with args. set dummy mpichboot; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1735: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MPIBOOT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MPIBOOT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MPIBOOT" in - /*) + case $MPIBOOT in + [\\/]* | ?:[\\/]*) ac_cv_path_MPIBOOT="$MPIBOOT" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_MPIBOOT="$MPIBOOT" # Let the user override the test with a dos path. - ;; *) - 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_path_MPIBOOT="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPIBOOT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -MPIBOOT="$ac_cv_path_MPIBOOT" +MPIBOOT=$ac_cv_path_MPIBOOT + if test -n "$MPIBOOT"; then - echo "$ac_t""$MPIBOOT" 1>&6 + echo "$as_me:$LINENO: result: $MPIBOOT" >&5 +echo "${ECHO_T}$MPIBOOT" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi # Extract the first word of "mpichstop", so it can be a program name with args. set dummy mpichstop; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1770: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MPIUNBOOT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MPIUNBOOT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MPIUNBOOT" in - /*) + case $MPIUNBOOT in + [\\/]* | ?:[\\/]*) ac_cv_path_MPIUNBOOT="$MPIUNBOOT" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_MPIUNBOOT="$MPIUNBOOT" # Let the user override the test with a dos path. - ;; *) - 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_path_MPIUNBOOT="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPIUNBOOT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -MPIUNBOOT="$ac_cv_path_MPIUNBOOT" +MPIUNBOOT=$ac_cv_path_MPIUNBOOT + if test -n "$MPIUNBOOT"; then - echo "$ac_t""$MPIUNBOOT" 1>&6 + echo "$as_me:$LINENO: result: $MPIUNBOOT" >&5 +echo "${ECHO_T}$MPIUNBOOT" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi PATH="$save_PATH" MPILIBNAME="mpich" - else + else # All of the above should have been passed in the environment! : fi @@ -1813,87 +3155,143 @@ CPPFLAGS="$save_CPPFLAGS -I$with_mpichnt/include" save_LDFLAGS="$LDFLAGS" LDFLAGS="$save_LDFLAGS -L$with_mpichnt/lib" - echo $ac_n "checking for MPI_Init in -lmpich""... $ac_c" 1>&6 -echo "configure:1818: checking for MPI_Init in -lmpich" >&5 -ac_lib_var=`echo mpich'_'MPI_Init | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 +echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6 +if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char MPI_Init(); - -int main() { -MPI_Init() -; return 0; } -EOF -if { (eval echo configure:1837: \"$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 - 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 + builtin and then its argument prototype would still apply. */ +char MPI_Init (); +int +main () +{ +MPI_Init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_mpich_MPI_Init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mpich_MPI_Init=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 +echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6 +if test $ac_cv_lib_mpich_MPI_Init = yes; then found="yes" else - echo "$ac_t""no" 1>&6 -found="no" + found="no" fi if test "$found" = "no" ; then - echo $ac_n "checking for MPI_Init in -lmpich2""... $ac_c" 1>&6 -echo "configure:1860: checking for MPI_Init in -lmpich2" >&5 -ac_lib_var=`echo mpich2'_'MPI_Init | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for MPI_Init in -lmpich2" >&5 +echo $ECHO_N "checking for MPI_Init in -lmpich2... $ECHO_C" >&6 +if test "${ac_cv_lib_mpich2_MPI_Init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich2 $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char MPI_Init(); - -int main() { -MPI_Init() -; return 0; } -EOF -if { (eval echo configure:1879: \"$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 - 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 + builtin and then its argument prototype would still apply. */ +char MPI_Init (); +int +main () +{ +MPI_Init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_mpich2_MPI_Init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mpich2_MPI_Init=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_mpich2_MPI_Init" >&5 +echo "${ECHO_T}$ac_cv_lib_mpich2_MPI_Init" >&6 +if test $ac_cv_lib_mpich2_MPI_Init = yes; then found="yes" else - echo "$ac_t""no" 1>&6 -found="no" + found="no" fi fi @@ -1906,7 +3304,7 @@ lammpi) save_PATH="$PATH" - if test "$with_mpich" != "yes" -a "$with_mpich" != "no" ; then + if test "$with_mpich" != "yes" -a "$with_mpich" != "no" ; then # Look for commands; if not found, try adding bin to the path if test ! -x $with_lammpi/mpicc -a -x $with_lammpi/bin/mpicc ; then with_lammpi="$with_lammpi/bin" @@ -1915,148 +3313,164 @@ fi # Extract the first word of "mpicc", so it can be a program name with args. set dummy mpicc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1920: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MPICC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MPICC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MPICC" in - /*) + case $MPICC in + [\\/]* | ?:[\\/]*) ac_cv_path_MPICC="$MPICC" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_MPICC="$MPICC" # Let the user override the test with a dos path. - ;; *) - 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_path_MPICC="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPICC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -MPICC="$ac_cv_path_MPICC" +MPICC=$ac_cv_path_MPICC + if test -n "$MPICC"; then - echo "$ac_t""$MPICC" 1>&6 + echo "$as_me:$LINENO: result: $MPICC" >&5 +echo "${ECHO_T}$MPICC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi TESTCC=${CC-cc} CC="$MPICC" # Extract the first word of "mpif77", so it can be a program name with args. set dummy mpif77; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1957: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MPIF77'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MPIF77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MPIF77" in - /*) + case $MPIF77 in + [\\/]* | ?:[\\/]*) ac_cv_path_MPIF77="$MPIF77" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_MPIF77="$MPIF77" # Let the user override the test with a dos path. - ;; *) - 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_path_MPIF77="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPIF77="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -MPIF77="$ac_cv_path_MPIF77" +MPIF77=$ac_cv_path_MPIF77 + if test -n "$MPIF77"; then - echo "$ac_t""$MPIF77" 1>&6 + echo "$as_me:$LINENO: result: $MPIF77" >&5 +echo "${ECHO_T}$MPIF77" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi TESTF77=${F77-f77} F77="$MPIF77" # Extract the first word of "mpif90", so it can be a program name with args. set dummy mpif90; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1994: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MPIF90'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MPIF90+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MPIF90" in - /*) + case $MPIF90 in + [\\/]* | ?:[\\/]*) ac_cv_path_MPIF90="$MPIF90" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_MPIF90="$MPIF90" # Let the user override the test with a dos path. - ;; *) - 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_path_MPIF90="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPIF90="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -MPIF90="$ac_cv_path_MPIF90" +MPIF90=$ac_cv_path_MPIF90 + if test -n "$MPIF90"; then - echo "$ac_t""$MPIF90" 1>&6 + echo "$as_me:$LINENO: result: $MPIF90" >&5 +echo "${ECHO_T}$MPIF90" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi TESTF90=${F90-f90} F90="$MPIF90" # Extract the first word of "mpiCC", so it can be a program name with args. set dummy mpiCC; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2031: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MPICXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MPICXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MPICXX" in - /*) + case $MPICXX in + [\\/]* | ?:[\\/]*) ac_cv_path_MPICXX="$MPICXX" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_MPICXX="$MPICXX" # Let the user override the test with a dos path. - ;; *) - 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_path_MPICXX="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MPICXX="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -MPICXX="$ac_cv_path_MPICXX" +MPICXX=$ac_cv_path_MPICXX + if test -n "$MPICXX"; then - echo "$ac_t""$MPICXX" 1>&6 + echo "$as_me:$LINENO: result: $MPICXX" >&5 +echo "${ECHO_T}$MPICXX" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi TESTCXX=${CXX-CC} @@ -2069,6 +3483,91 @@ ;; ibmmpi) + for ac_prog in mpcc +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_MPCC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$MPCC"; then + ac_cv_prog_MPCC="$MPCC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MPCC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +MPCC=$ac_cv_prog_MPCC +if test -n "$MPCC"; then + echo "$as_me:$LINENO: result: $MPCC" >&5 +echo "${ECHO_T}$MPCC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$MPCC" && break +done + + for ac_prog in mpxlf +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_MPXLF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$MPXLF"; then + ac_cv_prog_MPXLF="$MPXLF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MPXLF="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +MPXLF=$ac_cv_prog_MPXLF +if test -n "$MPXLF"; then + echo "$as_me:$LINENO: result: $MPXLF" >&5 +echo "${ECHO_T}$MPXLF" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$MPXLF" && break +done + + if test -z "$MPCC" -o -z "$MPXLF" ; then + { { echo "$as_me:$LINENO: error: Could not find IBM MPI compilation scripts. Either mpcc or mpxlf is missing" >&5 +echo "$as_me: error: Could not find IBM MPI compilation scripts. Either mpcc or mpxlf is missing" >&2;} + { (exit 1); exit 1; }; } + fi TESTCC=${CC-xlC}; TESTF77=${F77-xlf}; CC=mpcc; F77=mpxlf # There is no mpxlf90, but the options langlvl and free can # select the F90 version of xlf @@ -2077,58 +3576,84 @@ ;; sgimpi) - TESTCC=${CC:=cc}; TESTF77=${F77:=f77}; + TESTCC=${CC:=cc}; TESTF77=${F77:=f77}; TESTCXX=${CXX:=CC}; TESTF90=${F90:=f90} - echo $ac_n "checking for MPI_Init in -lmpi""... $ac_c" 1>&6 -echo "configure:2084: checking for MPI_Init in -lmpi" >&5 -ac_lib_var=`echo mpi'_'MPI_Init | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 +echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6 +if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char MPI_Init(); - -int main() { -MPI_Init() -; return 0; } -EOF -if { (eval echo configure:2103: \"$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 - 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 - ac_tr_lib=HAVE_LIB`echo mpi | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_mpi_MPI_Init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mpi_MPI_Init=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 +echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6 +if test $ac_cv_lib_mpi_MPI_Init = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBMPI 1 +_ACEOF LIBS="-lmpi $LIBS" -else - echo "$ac_t""no" 1>&6 fi if test "$ac_cv_lib_mpi_MPI_Init" = "yes" ; then MPILIBNAME="mpi" - fi + fi MPIRUN=mpirun MPIBOOT="" MPIUNBOOT="" @@ -2136,143 +3661,118 @@ *) # Find the compilers - -for ac_prog in cc xlC xlc pgcc icc gcc + +for ac_prog in cc xlC xlc pgcc icc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # 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:2147: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # 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_CC="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$CC" && break + test -n "$CC" && break done -test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2178: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + { (exit 1); exit 1; }; } -#line 2189 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2220: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross +echo "$as_me:$LINENO: checking whether the C compiler sets its return status correctly" >&5 +echo $ECHO_N "checking whether the C compiler sets its return status correctly... $ECHO_C" >&6 -echo $ac_n "checking whether the C compiler sets its return status correctly""... $ac_c" 1>&6 -echo "configure:2225: checking whether the C compiler sets its return status correctly" >&5 ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ int a = bzzzt; -; return 0; } -EOF -if { (eval echo configure:2242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then notbroken=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - notbroken=yes + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +notbroken=yes fi -rm -f conftest* -echo "$ac_t""$notbroken" 1>&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $notbroken" >&5 +echo "${ECHO_T}$notbroken" >&6 if test "$notbroken" = "no" ; then - { echo "configure: error: installation or configuration problem: C compiler does not -correctly set error code when a fatal error occurs" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: installation or configuration problem: C compiler does not +correctly set error code when a fatal error occurs" >&5 +echo "$as_me: error: installation or configuration problem: C compiler does not +correctly set error code when a fatal error occurs" >&2;} + { (exit 1); exit 1; }; } fi -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2259: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -if test "$ac_cv_prog_gcc" = yes; then +if test "$ac_cv_c_compiler_gnu" = yes; then GCC=yes else GCC= @@ -2281,274 +3781,470 @@ # We only look for the other compilers if there is no # disable for them if test "$enable_f77" != no -a "$enable_fortran" != no ; then - if test -z "$F77"; then - for ac_prog in g77 f77 f2c -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:2291: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # 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_F77="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -F77="$ac_cv_prog_F77" +F77=$ac_cv_prog_F77 if test -n "$F77"; then - echo "$ac_t""$F77" 1>&6 + echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$F77" && break + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - test -z "$F77" && { echo "configure: error: no acceptable Fortran 77 compiler found in \$PATH" 1>&2; exit 1; } +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2324: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works" >&5 - -ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross + test -n "$ac_ct_F77" && break +done -cat > conftest.$ac_ext << EOF + F77=$ac_ct_F77 +fi - program conftest - end -EOF -if { (eval echo configure:2337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_f77_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_f77_cross=no - else - ac_cv_prog_f77_cross=yes - fi +# Provide some information about the compiler. +echo "$as_me:3876:" \ + "checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_f77_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_f77_works" 1>&6 -if test $ac_cv_prog_f77_works = no; then - { echo "configure: error: installation or configuration problem: Fortran 77 compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2363: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_f77_cross" 1>&6 -cross_compiling=$ac_cv_prog_f77_cross - -echo $ac_n "checking whether we are using GNU Fortran 77""... $ac_c" 1>&6 -echo "configure:2368: checking whether we are using GNU Fortran 77" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_g77'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.fpp <conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me #endif -EOF -if { ac_try='$F77 -E conftest.fpp'; { (eval echo configure:2377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_g77=yes -else - ac_cv_prog_g77=no -fi -fi - -echo "$ac_t""$ac_cv_prog_g77" 1>&6 -if test $ac_cv_prog_g77 = yes; then - G77=yes - ac_test_FFLAGS="${FFLAGS+set}" - ac_save_FFLAGS="$FFLAGS" - FFLAGS= - echo $ac_n "checking whether $F77 accepts -g""... $ac_c" 1>&6 -echo "configure:2392: checking whether $F77 accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_f77_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.f << EOF - program conftest - end -EOF -if test -z "`$F77 -g -c conftest.f 2>&1`"; then + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else - ac_cv_prog_f77_g=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_f77_g=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_prog_f77_g" 1>&6 - if test "$ac_test_FFLAGS" = set; then - FFLAGS="$ac_save_FFLAGS" - elif test $ac_cv_prog_f77_g = yes; then +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else - FFLAGS="-O2" + FFLAGS="-g" fi else - G77= - test "${FFLAGS+set}" = set || FFLAGS="-g" + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi fi +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + fi if test "$enable_cxx" != no ; then - for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl -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:2429: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -CXX="$ac_cv_prog_CXX" +CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$ac_t""$CXX" 1>&6 + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$CXX" && break + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done -test -n "$CXX" || CXX="gcc" +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2461: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross + CXX=$ac_ct_CXX +fi -cat > conftest.$ac_ext << EOF -#line 2472 "configure" -#include "confdefs.h" +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main(){return(0);} -EOF -if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cxx_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cxx_cross=no - else - ac_cv_prog_cxx_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cxx_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 -if test $ac_cv_prog_cxx_works = no; then - { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2503: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 -cross_compiling=$ac_cv_prog_cxx_cross - -echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:2508: checking whether we are using GNU C++" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gxx=yes -else - ac_cv_prog_gxx=no -fi -fi -echo "$ac_t""$ac_cv_prog_gxx" 1>&6 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -if test $ac_cv_prog_gxx = yes; then - GXX=yes -else - GXX= -fi +int +main () +{ -ac_test_CXXFLAGS="${CXXFLAGS+set}" -ac_save_CXXFLAGS="$CXXFLAGS" -CXXFLAGS= -echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:2536: checking whether ${CXX-g++} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.cc -if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else - ac_cv_prog_cxx_g=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_cxx_g=no fi - -echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS="$ac_save_CXXFLAGS" + CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" @@ -2562,143 +4258,418 @@ CXXFLAGS= fi fi +for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu fi if test "$enable_f90" != no ; then - -if test -z "$F90" ; then - for ac_prog in f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 fc ifc efc -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:2576: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_F90'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + # This is the fortran90 version of f90 language support +ac_ext=${ac_f90ext-f} +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 gfortran ifc efc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_F90+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F90"; then ac_cv_prog_F90="$F90" # 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_F90="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_F90="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -F90="$ac_cv_prog_F90" +F90=$ac_cv_prog_F90 if test -n "$F90"; then - echo "$ac_t""$F90" 1>&6 + echo "$as_me:$LINENO: result: $F90" >&5 +echo "${ECHO_T}$F90" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$F90" && break + test -n "$F90" && break + done +fi +if test -z "$F90"; then + ac_ct_F90=$F90 + for ac_prog in f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 gfortran ifc efc +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_F90+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F90"; then + ac_cv_prog_ac_ct_F90="$ac_ct_F90" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_F90="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - test -z "$F90" && echo "configure: warning: no acceptable Fortran 90 compiler found in \$PATH" 1>&2 fi -if test -n "$F90" ; then - echo $ac_n "checking for extension for Fortran 90 programs""... $ac_c" 1>&6 -echo "configure:2609: checking for extension for Fortran 90 programs" >&5 -pac_cv_f90_ext="f90" -cat > conftest.$pac_cv_f90_ext <&5 +echo "${ECHO_T}$ac_ct_F90" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_F90" && break +done + + F90=$ac_ct_F90 +fi + + +# once we find the compiler, confirm the extension +echo "$as_me:$LINENO: checking that $ac_ext works as the extension for Fortran 90 program" >&5 +echo $ECHO_N "checking that $ac_ext works as the extension for Fortran 90 program... $ECHO_C" >&6 +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; } ; then - echo "$ac_t""f90" 1>&6 -else - rm -f conftest* - pac_cv_f90_ext="f" - cat > conftest.$pac_cv_f90_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "$as_me:$LINENO: checking for extension for Fortran 90 programs" >&5 +echo $ECHO_N "checking for extension for Fortran 90 programs... $ECHO_C" >&6 + ac_ext="f90" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; } ; then - echo "$ac_t""f" 1>&6 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then + echo "$as_me:$LINENO: result: f90" >&5 +echo "${ECHO_T}f90" >&6 else - echo "$ac_t""unknown!" 1>&6 - fi -fi -echo $ac_n "checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2632: checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) works" >&5 - -# We cannot use _LANG_FORTRAN90 here because we will usually be executing this -# test in the context of _PROG_F90, which is a require on _LANG_FORTRAN90. -# Instead, we insert the necessary code from _LANG_FORTRAN90 here -ac_ext=$pac_cv_f90_ext -ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&5' -ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$pac_cv_prog_f90_cross -# Include a Fortran 90 construction to distinguish between Fortran 77 -# and Fortran 90 compilers. -cat >conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeect} ; then - pac_cv_prog_f90_works="yes" - if (./conftest; exit) 2>/dev/null ; then - pac_cv_prog_f90_cross="no" + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then + echo "$as_me:$LINENO: result: f" >&5 +echo "${ECHO_T}f" >&6 + else + echo "$as_me:$LINENO: result: unknown!" >&5 +echo "${ECHO_T}unknown!" >&6 + fi + fi + ac_f90ext=$ac_ext + if test "$ac_ext" = "f90" ; then + pac_cv_f90_ext_f90=yes else - pac_cv_prog_f90_cross="yes" + pac_cv_f90_ext_f90=no fi + pac_cv_f90_ext=$ac_ext + rm -f conftest* +fi +# Provide some information about the compiler. +echo "$as_me:4525:" \ + "checking for Fortran 90 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. +if test -n "$F90" ; then + ac_save_ext=$ac_ext + ac_ext=F + echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 90 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 90 compiler... $ECHO_C" >&6 +if test "${ac_cv_f90_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - pac_cv_prog_f90_works="no" + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f90_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f90_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f90_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f90_compiler_gnu" >&6 + ac_ext=$ac_save_ext + G90=`test $ac_compiler_gnu = yes && echo yes` + ac_test_F90FLAGS=${F90FLAGS+set} +ac_save_F90FLAGS=$F90FLAGS +F90FLAGS= +echo "$as_me:$LINENO: checking whether $F90 accepts -g" >&5 +echo $ECHO_N "checking whether $F90 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f90_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + F90FLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f90_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_f90_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_f90_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f90_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f90_g" >&6 +if test "$ac_test_F90FLAGS" = set; then + F90FLAGS=$ac_save_F90FLAGS +elif test $ac_cv_prog_f90_g = yes; then + if test "$G90" = yes; then + F90FLAGS="-g -O2" + else + F90FLAGS="-g" + fi +else + if test "$G90" = yes; then + F90FLAGS="-O2" + else + F90FLAGS= + fi +fi fi -rm -f conftest* -# The intel compiler sometimes generates these work.pc and .pcl files -rm -f work.pc work.pcl ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$pac_cv_prog_f90_works" 1>&6 -if test $pac_cv_prog_f90_works = no; then - echo "configure: warning: installation or configuration problem: Fortran 90 compiler cannot create executables." 1>&2 -fi -echo $ac_n "checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2675: checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$pac_cv_prog_f90_cross" 1>&6 -cross_compiling=$pac_cv_prog_f90_cross - -fi -ac_f90ext=$pac_cv_f90_ext -ac_f90compile='${F90-f90} -c $F90FLAGS conftest.$ac_f90ext 1>&5' -ac_f90link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_f90ext $LIBS 1>&5' -# Check for problems with Intel efc compiler, if the compiler works -if test "$pac_cv_prog_f90_works" = yes ; then - cat > conftest.$ac_f90ext <&1 | grep 'bfd assertion fail'` - if test -n "$pac_msg" ; then - pac_msg=`$F90 -o conftest $F90FLAGS $LDFLAGS conftest.$ac_f90ext -i_dynamic $LIBS 2>&1 | grep 'bfd assertion fail'` - if test -z "$pac_msg" ; then LDFLAGS="-i_dynamic" ; fi - # There should really be f90linker flags rather than generic ldflags. - fi -fi +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # Set defaults for the TEST versions if not already set - if test -z "$TESTCC" ; then + if test -z "$TESTCC" ; then TESTCC=${CC:=cc} fi - if test -z "$TESTF77" ; then + if test -z "$TESTF77" ; then TESTF77=${F77:=f77} fi if test -z "$TESTCXX" ; then @@ -2716,47 +4687,53 @@ if test "X$MAKE" = "X" ; then for ac_prog in make gnumake nmake pmake smake do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # 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:2723: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_MAKE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$MAKE"; then ac_cv_prog_MAKE="$MAKE" # 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_MAKE="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MAKE="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -MAKE="$ac_cv_prog_MAKE" +MAKE=$ac_cv_prog_MAKE if test -n "$MAKE"; then - echo "$ac_t""$MAKE" 1>&6 + echo "$as_me:$LINENO: result: $MAKE" >&5 +echo "${ECHO_T}$MAKE" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$MAKE" && break + test -n "$MAKE" && break done fi -echo $ac_n "checking whether clock skew breaks make""... $ac_c" 1>&6 -echo "configure:2756: checking whether clock skew breaks make" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_make_found_clock_skew'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether clock skew breaks make" >&5 +echo $ECHO_N "checking whether clock skew breaks make... $ECHO_C" >&6 +if test "${pac_cv_prog_make_found_clock_skew+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + rm -f conftest* cat > conftest <&6 +echo "$as_me:$LINENO: result: $pac_cv_prog_make_found_clock_skew" >&5 +echo "${ECHO_T}$pac_cv_prog_make_found_clock_skew" >&6 if test "$pac_cv_prog_make_found_clock_skew" = "yes" ; then - echo "configure: warning: Clock skew found by make. The configure and build may fail. -Consider building in a local instead of NFS filesystem." 1>&2 + { echo "$as_me:$LINENO: WARNING: Clock skew found by make. The configure and build may fail. +Consider building in a local instead of NFS filesystem." >&5 +echo "$as_me: WARNING: Clock skew found by make. The configure and build may fail. +Consider building in a local instead of NFS filesystem." >&2;} fi -echo $ac_n "checking whether make supports include""... $ac_c" 1>&6 -echo "configure:2785: checking whether make supports include" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_make_include'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether make supports include" >&5 +echo $ECHO_N "checking whether make supports include... $ECHO_C" >&6 +if test "${pac_cv_prog_make_include+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + rm -f conftest cat > conftest <<. @@ -2804,8 +4783,8 @@ fi fi - -echo "$ac_t""$pac_cv_prog_make_include" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_prog_make_include" >&5 +echo "${ECHO_T}$pac_cv_prog_make_include" >&6 if test "$pac_cv_prog_make_include" = "no" ; then : else @@ -2813,12 +4792,12 @@ fi -echo $ac_n "checking whether make allows comments in actions""... $ac_c" 1>&6 -echo "configure:2818: checking whether make allows comments in actions" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_make_allows_comments'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether make allows comments in actions" >&5 +echo $ECHO_N "checking whether make allows comments in actions... $ECHO_C" >&6 +if test "${pac_cv_prog_make_allows_comments+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + rm -f conftest cat > conftest <<. @@ -2828,7 +4807,7 @@ @echo "success" . pac_str=`$MAKE -f conftest 2>&1` -rm -f conftest +rm -f conftest if test "$pac_str" != "success" ; then pac_cv_prog_make_allows_comments="no" else @@ -2836,23 +4815,26 @@ fi fi - -echo "$ac_t""$pac_cv_prog_make_allows_comments" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_prog_make_allows_comments" >&5 +echo "${ECHO_T}$pac_cv_prog_make_allows_comments" >&6 if test "$pac_cv_prog_make_allows_comments" = "no" ; then - echo "configure: warning: Your make does not allow comments in target code. + { echo "$as_me:$LINENO: WARNING: Your make does not allow comments in target code. +Using this make may cause problems when building programs. +You should consider using gnumake instead." >&5 +echo "$as_me: WARNING: Your make does not allow comments in target code. Using this make may cause problems when building programs. -You should consider using gnumake instead." 1>&2 - +You should consider using gnumake instead." >&2;} + fi -echo $ac_n "checking for virtual path format""... $ac_c" 1>&6 -echo "configure:2852: checking for virtual path format" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_make_vpath'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for virtual path format" >&5 +echo $ECHO_N "checking for virtual path format... $ECHO_C" >&6 +if test "${pac_cv_prog_make_vpath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + rm -rf conftest* mkdir conftestdir @@ -2866,7 +4848,7 @@ @echo \$< EOF ac_out=`$MAKE -f conftest 2>&1 | grep 'conftestdir/a.c'` -if test -n "$ac_out" ; then +if test -n "$ac_out" ; then pac_cv_prog_make_vpath="VPATH" else rm -f conftest @@ -2877,7 +4859,7 @@ @echo \$< EOF ac_out=`$MAKE -f conftest 2>&1 | grep 'conftestdir/a.c'` - if test -n "$ac_out" ; then + if test -n "$ac_out" ; then pac_cv_prog_make_vpath=".PATH" else pac_cv_prog_make_vpath="neither VPATH nor .PATH works" @@ -2886,8 +4868,8 @@ rm -rf conftest* fi - -echo "$ac_t""$pac_cv_prog_make_vpath" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_prog_make_vpath" >&5 +echo "${ECHO_T}$pac_cv_prog_make_vpath" >&6 if test "$pac_cv_prog_make_vpath" = "VPATH" ; then VPATH='VPATH=.:${srcdir}' elif test "$pac_cv_prog_make_vpath" = ".PATH" ; then @@ -2896,12 +4878,12 @@ -echo $ac_n "checking whether make sets CFLAGS""... $ac_c" 1>&6 -echo "configure:2901: checking whether make sets CFLAGS" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_make_set_cflags'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether make sets CFLAGS" >&5 +echo $ECHO_N "checking whether make sets CFLAGS... $ECHO_C" >&6 +if test "${pac_cv_prog_make_set_cflags+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + rm -f conftest cat > conftest <&1` -rm -f conftest +rm -f conftest if test "$pac_str" = "XX" ; then pac_cv_prog_make_set_cflags="no" else @@ -2918,8 +4900,8 @@ fi fi - -echo "$ac_t""$pac_cv_prog_make_set_cflags" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_prog_make_set_cflags" >&5 +echo "${ECHO_T}$pac_cv_prog_make_set_cflags" >&6 if test "$pac_cv_prog_make_set_cflags" = "no" ; then : else @@ -2927,30 +4909,32 @@ fi if test "$pac_cv_prog_make_echos_dir" = "no" ; then - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:2932: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftestmake <<\EOF + cat >conftest.make <<\_ACEOF all: - @echo 'ac_maketemp="${MAKE}"' -EOF + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi -rm -f conftestmake +rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 SET_MAKE= else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi @@ -2969,34 +4953,84 @@ # We need ranlib as well if test -z "$RANLIB" ; then - # 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:2976: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -RANLIB="$ac_cv_prog_RANLIB" +RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else - echo "$ac_t""no" 1>&6 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" fi fi @@ -3008,166 +5042,371 @@ fi if test "$pac_lib_mpi_is_building" = "yes" ; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_MPI_F2C 1 -EOF +_ACEOF else - -echo $ac_n "checking for MPI F2C and C2F routines""... $ac_c" 1>&6 -echo "configure:3019: checking for MPI F2C and C2F routines" >&5 -if eval "test \"`echo '$''{'pac_cv_mpi_f2c'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:$LINENO: checking for MPI F2C and C2F routines" >&5 +echo $ECHO_N "checking for MPI F2C and C2F routines... $ECHO_C" >&6 +if test "${pac_cv_mpi_f2c+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include "mpi.h" -int main() { +int +main () +{ MPI_Request request;MPI_Fint a;a = MPI_Request_c2f(request); -; return 0; } -EOF -if { (eval echo configure:3032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_mpi_f2c="yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - pac_cv_mpi_f2c="no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +pac_cv_mpi_f2c="no" fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $pac_cv_mpi_f2c" >&5 +echo "${ECHO_T}$pac_cv_mpi_f2c" >&6 +if test "$pac_cv_mpi_f2c" = "yes" ; then -echo "$ac_t""$pac_cv_mpi_f2c" 1>&6 -if test "$pac_cv_mpi_f2c" = "yes" ; then - cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_MPI_F2C 1 -EOF - +_ACEOF + fi # Check for mpi.h - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3056: checking how to run the C preprocessor" >&5 + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # 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 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # 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:3077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - : + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi 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:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then + ac_cpp_err=yes +fi +if test -z "$ac_cpp_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:3111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - : + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp + ac_cpp_err=yes fi -rm -f conftest* +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi - CPP="$ac_cv_prog_CPP" +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue else - ac_cv_prog_CPP="$CPP" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -echo "$ac_t""$CPP" 1>&6 + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_safe=`echo "mpi.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for mpi.h""... $ac_c" 1>&6 -echo "configure:3137: 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 +echo "$as_me:$LINENO: checking for mpi.h" >&5 +echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + pac_found_header=no if test "$CPP" != "/lib/cpp" ; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - rm -rf conftest* +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then pac_found_header=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext fi # If cpp failed, see if the compiler accepts the header. if test "$pac_found_header" != "yes" ; then cat >conftest.c< int conftest() {return 0;} EOF ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' - if { (eval echo configure:3171: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then + if { (eval echo "$as_me:$LINENO: \"$ac_compile_for_cpp\"") >&5 + (eval $ac_compile_for_cpp) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pac_found_header=yes else echo "configure: failed program was:" >&5 @@ -3184,12 +5423,16 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 : else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: mpi.h is required" 1>&2; exit 1; } - + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +{ { echo "$as_me:$LINENO: error: mpi.h is required" >&5 +echo "$as_me: error: mpi.h is required" >&2;} + { (exit 1); exit 1; }; } + fi fi @@ -3197,30 +5440,30 @@ # # The following variables are used in mpif77.in and reflect the MPI # implementation that is in use. -# +# if test "$pac_lib_mpi_is_building" = "yes" ; then # These values are EXPORTED by the MPICH configure # Alternately, if we are building a *new* Fortran library for a # pre-existing MPICH build, we need to get these variables from # the MPICH library configuration file. - - - - + + + + F77_LDFLAGS="$ROMIO_LFLAGS" - + BASE_FFLAGS="$ROMIO_TFFLAGS" - - - + + + # Shared library support (replace with libtool?) - - - - - + + + + + MPI2_OBJECTS='${MPI2_OBJECTS}' - + fi if test "$DEBUG_DUMP" = "yes" ; then rm -f config.env @@ -3239,164 +5482,334 @@ pac_save_prog_cxx_cross="$ac_cv_prog_cxx_cross" pac_save_prog_f90_cross="$pac_cv_prog_f90_cross" if test "X$CPP" = "X" ; then - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3244: checking how to run the C preprocessor" >&5 + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # 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 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # 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:3265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - : + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi 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:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then + ac_cpp_err=yes +fi +if test -z "$ac_cpp_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:3299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - : + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp + ac_cpp_err=yes fi -rm -f conftest* +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" + + done + ac_cv_prog_CPP=$CPP + fi - CPP="$ac_cv_prog_CPP" + CPP=$ac_cv_prog_CPP else - ac_cv_prog_CPP="$CPP" + ac_cv_prog_CPP=$CPP fi -echo "$ac_t""$CPP" 1>&6 - - fi - pac_save_CPP="$CPP" - CC="${TESTCC:=$CC}" - CXX="${TESTCXX:=$CXX}" - F77="${TESTF77:=$F77}" - F90="${TESTF90:=$F90}" - if test -z "$TESTCPP" ; then - -if test -z "$TESTCPP"; then - if eval "test \"`echo '$''{'pac_cv_prog_TESTCPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - rm -f conftest.* - cat > conftest.c < - Syntax Error -EOF +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - TESTCPP="${TESTCC-cc} -E" - ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" - if { (eval echo configure:3345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then - pac_cv_prog_TESTCPP="$TESTCPP" + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= fi - if test "X$pac_cv_prog_TESTCPP" = "X" ; then +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + fi + pac_save_CPP="$CPP" + CC="${TESTCC:=$CC}" + CXX="${TESTCXX:=$CXX}" + F77="${TESTF77:=$F77}" + F90="${TESTF90:=$F90}" + if test -z "$TESTCPP" ; then + +if test -z "$TESTCPP"; then + if test "${pac_cv_prog_TESTCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + rm -f conftest.* + cat > conftest.c < + Syntax Error +EOF + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + TESTCPP="${TESTCC-cc} -E" + ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" + if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then + pac_cv_prog_TESTCPP="$TESTCPP" + fi + if test "X$pac_cv_prog_TESTCPP" = "X" ; then TESTCPP="${TESTCC-cc} -E -traditional-cpp" ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" - if { (eval echo configure:3351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then + if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then pac_cv_prog_TESTCPP="$TESTCPP" fi fi if test "X$pac_cv_prog_TESTCPP" = "X" ; then TESTCPP="${TESTCC-cc} -nologo -E" ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" - if { (eval echo configure:3358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then + if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then pac_cv_prog_TESTCPP="$TESTCPP" fi fi if test "X$pac_cv_prog_TESTCPP" = "X" ; then # Extract the first word of "cpp", so it can be a program name with args. set dummy cpp; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3366: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_TESTCPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_TESTCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$TESTCPP" in - /*) + case $TESTCPP in + [\\/]* | ?:[\\/]*) ac_cv_path_TESTCPP="$TESTCPP" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_TESTCPP="$TESTCPP" # Let the user override the test with a dos path. - ;; *) - 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_path_TESTCPP="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_TESTCPP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -TESTCPP="$ac_cv_path_TESTCPP" +TESTCPP=$ac_cv_path_TESTCPP + if test -n "$TESTCPP"; then - echo "$ac_t""$TESTCPP" 1>&6 + echo "$as_me:$LINENO: result: $TESTCPP" >&5 +echo "${ECHO_T}$TESTCPP" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi rm -f conftest.* - + fi else @@ -3408,26 +5821,30 @@ pac_save_level="0" # Recompute cross_compiling values and set for the current language # This is just: - + + ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$pac_cross_compiling" = "yes" ; then ac_cv_prog_cc_cross=yes ac_cv_prog_cc_works=yes else - cat > conftest.$ac_ext << EOF + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -3443,31 +5860,35 @@ rm -fr conftest* fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu # Ignore Fortran if we aren't using it. if test -n "$F77" ; then - + + ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test "$pac_cross_compiling" = "yes" ; then ac_cv_prog_f77_cross=yes ac_cv_prog_f77_works=yes else - cat > conftest.$ac_ext << EOF + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then ac_cv_prog_f77_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -3483,31 +5904,34 @@ rm -fr conftest* fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # Ignore C++ if we aren't using it. if test -n "$CXX" ; then - - ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + + + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat > conftest.$ac_ext << EOF + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -3522,21 +5946,20 @@ fi rm -fr conftest* ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # Ignore Fortran 90 if we aren't using it. if test -n "$F90" ; then - - -ac_ext=$pac_cv_f90_ext -ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&5' -ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$pac_cv_prog_f90_cross + + + ac_ext=${ac_f90ext-f} +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu if test "$pac_cross_compiling" = "yes" ; then ac_cv_prog_f90_cross=yes @@ -3564,11 +5987,10 @@ pac_cv_prog_f90_works="$ac_cv_prog_f90_works" rm -fr conftest* ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu fi fi @@ -3585,26 +6007,27 @@ NOG2C=no fi if test "$pac_lib_mpi_is_building" = "yes" ; then - + found_cached="yes" -echo $ac_n "checking for routines to access the command line from Fortran 77""... $ac_c" 1>&6 -echo "configure:3592: checking for routines to access the command line from Fortran 77" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_f77_cmdarg'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for routines to access the command line from Fortran 77" >&5 +echo $ECHO_N "checking for routines to access the command line from Fortran 77... $ECHO_C" >&6 +if test "${pac_cv_prog_f77_cmdarg+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - echo "$ac_t""searching..." 1>&6 + + echo "$as_me:$LINENO: result: searching..." >&5 +echo "${ECHO_T}searching..." >&6 found_cached="no" # First, we perform a quick check. Does iargc and getarg work? fxx_module="${FXX_MODULE:-}" f77_getargdecl="${F77_GETARGDECL:-external getarg}" f77_getarg="${F77_GETARG:-call GETARG(i,s)}" f77_iargc="${F77_IARGC:-IARGC()}" - # + # # Grumble. The Absoft Fortran compiler computes i - i as 0 and then # 1.0 / 0 at compile time, even though the code may never be executed. # What we need is a way to generate an error, so the second usage of i - # was replaced with f77_iargc. + # was replaced with f77_iargc. cat > conftest.f <&6 -echo "configure:3629: checking whether ${F77-f77} $flags $libs works with GETARG and IARGC" >&5 - if { (eval echo configure:3630: \"$ac_fcompilelink\") 1>&5; (eval $ac_fcompilelink) 2>&5; } && test -x conftest ; then + echo "$as_me:$LINENO: checking whether ${F77-f77} $flags $libs works with GETARG and IARGC" >&5 +echo $ECHO_N "checking whether ${F77-f77} $flags $libs works with GETARG and IARGC... $ECHO_C" >&6 + if { (eval echo "$as_me:$LINENO: \"$ac_fcompilelink\"") >&5 + (eval $ac_fcompilelink) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then # Check that cross != yes so that this works with autoconf 2.52 if test "$ac_cv_prog_f77_cross" != "yes" ; then if ./conftest >/dev/null 2>&1 ; then @@ -3635,18 +6062,20 @@ F77_GETARGDECL="$f77_getargdecl" F77_GETARG="$f77_getarg" F77_IARGC="$f77_iargc" - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi fi - fi + fi if test $found_answer = "no" ; then - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 # Grumph. Here are a bunch of different approaches # We have several axes the check: # Library to link with (none, -lU77 (HPUX), -lg2c (LINUX f77)) # PEPCF90 (Intel ifc) # The first line is a dummy - # (we experimented with using a , but this caused other + # (we experimented with using a , but this caused other # problems because we need in the IFS) trial_LIBS="0 -lU77 -lPEPCF90" if test "$NOG2C" != "1" ; then @@ -3656,7 +6085,7 @@ save_IFS="$IFS" # Make sure that IFS includes a space, or the tests that run programs # may fail - IFS=" + IFS=" " save_trial_LIBS="$trial_LIBS" trial_LIBS="" @@ -3669,13 +6098,19 @@ if test "$libs" = "0" ; then lib_ok="yes" else - echo $ac_n "checking whether Fortran 77 links with $libs""... $ac_c" 1>&6 -echo "configure:3674: checking whether Fortran 77 links with $libs" >&5 - if { (eval echo configure:3675: \"$ac_fcompilelink_test\") 1>&5; (eval $ac_fcompilelink_test) 2>&5; } && test -x conftest ; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: checking whether Fortran 77 links with $libs" >&5 +echo $ECHO_N "checking whether Fortran 77 links with $libs... $ECHO_C" >&6 + if { (eval echo "$as_me:$LINENO: \"$ac_fcompilelink_test\"") >&5 + (eval $ac_fcompilelink_test) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 lib_ok="yes" else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 lib_ok="no" fi fi @@ -3690,7 +6125,7 @@ # The -N109 was used for getarg before we realized that GETARG # was necessary with the (non standard conforming) Absoft compiler # (Fortran is monocase; Absoft uses mixedcase by default) - # The -f is used by Absoft and is the compiler switch that folds + # The -f is used by Absoft and is the compiler switch that folds # symbolic names to lower case. Without this option, the compiler # considers upper- and lower-case letters to be unique. # The -YEXT_NAMES=LCS will cause external names to be output as lower @@ -3698,14 +6133,14 @@ # The first line is ", the space is important # To make the Absoft f77 and f90 work together, we need to prefer the # upper case versions of the arguments. They also require libU77. - # -YCFRL=1 causes Absoft f90 to work with g77 and similar (f2c-based) + # -YCFRL=1 causes Absoft f90 to work with g77 and similar (f2c-based) # Fortran compilers # # Problem: The Intel efc compiler hangs when presented with -N109 . # The only real fix for this is to detect this compiler and exclude # the test. We may want to reorganize these tests so that if we # can compile code without special options, we never look for them. - # + # using_intel_efc="no" pac_test_msg=`$F77 -V 2>&1 | grep 'Intel(R) Fortran Itanium'` if test "$pac_test_msg" != "" ; then @@ -3724,7 +6159,7 @@ fi # Discard options that are not available: # (IFS already saved above) - IFS=" + IFS=" " save_trial_FLAGS="$trial_FLAGS" trial_FLAGS="" @@ -3732,9 +6167,9 @@ if test "$flag" = " " -o "$flag" = "000" ; then opt_ok="yes" else - -echo $ac_n "checking whether Fortran 77 compiler accepts option $flag""... $ac_c" 1>&6 -echo "configure:3738: checking whether Fortran 77 compiler accepts option $flag" >&5 + +echo "$as_me:$LINENO: checking whether Fortran 77 compiler accepts option $flag" >&5 +echo $ECHO_N "checking whether Fortran 77 compiler accepts option $flag... $ECHO_C" >&6 ac_result="no" save_FFLAGS="$FFLAGS" FFLAGS="$flag $FFLAGS" @@ -3749,21 +6184,38 @@ EOF ac_fscompilelink='${F77-f77} $save_FFLAGS -o conftest conftest.f $LDFLAGS >conftest.bas 2>&1' ac_fscompilelink2='${F77-f77} $FFLAGS -o conftest conftest.f $LDFLAGS >conftest.out 2>&1' -if { (eval echo configure:3753: \"$ac_fscompilelink\") 1>&5; (eval $ac_fscompilelink) 2>&5; } && test -x conftest ; then - if { (eval echo configure:3754: \"$ac_fscompilelink2\") 1>&5; (eval $ac_fscompilelink2) 2>&5; } && test -x conftest ; then +if { (eval echo "$as_me:$LINENO: \"$ac_fscompilelink\"") >&5 + (eval $ac_fscompilelink) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then + if { (eval echo "$as_me:$LINENO: \"$ac_fscompilelink2\"") >&5 + (eval $ac_fscompilelink2) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then if diff -b conftest.out conftest.bas >/dev/null 2>&1 ; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking whether routines compiled with $flag can be linked with ones compiled without $flag""... $ac_c" 1>&6 -echo "configure:3758: checking whether routines compiled with $flag can be linked with ones compiled without $flag" >&5 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + echo "$as_me:$LINENO: checking whether routines compiled with $flag can be linked with ones compiled without $flag" >&5 +echo $ECHO_N "checking whether routines compiled with $flag can be linked with ones compiled without $flag... $ECHO_C" >&6 rm -f conftest2.out rm -f conftest.bas ac_fscompile3='${F77-f77} -c $save_FFLAGS conftest2.f >conftest2.out 2>&1' ac_fscompilelink4='${F77-f77} $FFLAGS -o conftest conftest2.o conftest.f $LDFLAGS >conftest.bas 2>&1' - if { (eval echo configure:3763: \"$ac_fscompile3\") 1>&5; (eval $ac_fscompile3) 2>&5; } && test -s conftest2.o ; then - if { (eval echo configure:3764: \"$ac_fscompilelink4\") 1>&5; (eval $ac_fscompilelink4) 2>&5; } && test -x conftest ; then + if { (eval echo "$as_me:$LINENO: \"$ac_fscompile3\"") >&5 + (eval $ac_fscompile3) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest2.o ; then + if { (eval echo "$as_me:$LINENO: \"$ac_fscompilelink4\"") >&5 + (eval $ac_fscompilelink4) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then if diff -b conftest.out conftest.bas >/dev/null 2>&1 ; then ac_result="yes" - else + else echo "configure: Compiler output differed in two cases" >&5 diff -b conftest.out conftest.bas >&5 fi @@ -3795,10 +6247,12 @@ cat conftest.bas >&5 fi if test "$ac_result" = "yes" ; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 opt_ok=yes else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 opt_ok=no fi FFLAGS="$save_FFLAGS" @@ -3806,10 +6260,10 @@ fi if test "$opt_ok" = "yes" ; then - if test "$flag" = " " -o "$flag" = "000" ; then - fflag="" - else - fflag="$flag" + if test "$flag" = " " -o "$flag" = "000" ; then + fflag="" + else + fflag="$flag" fi # discard options that don't allow mixed-case name matching cat > conftest.f <&6 -echo "configure:3825: checking whether Fortran 77 routine names are case-insensitive $flagval" >&5 + echo "$as_me:$LINENO: checking whether Fortran 77 routine names are case-insensitive $flagval" >&5 +echo $ECHO_N "checking whether Fortran 77 routine names are case-insensitive $flagval... $ECHO_C" >&6 ac_fcompilelink_test="${F77-f77} -o conftest $fflag $FFLAGS conftest.f $LDFLAGS $LIBS 1>&5" - if { (eval echo configure:3827: \"$ac_fcompilelink_test\") 1>&5; (eval $ac_fcompilelink_test) 2>&5; } && test -x conftest ; then - echo "$ac_t""yes" 1>&6 + if { (eval echo "$as_me:$LINENO: \"$ac_fcompilelink_test\"") >&5 + (eval $ac_fcompilelink_test) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 opt_ok="no" fi fi @@ -3839,15 +6299,15 @@ # Name of routines. Since these are in groups, we use a case statement # and loop until the end (accomplished by reaching the end of the # case statement - # For one version of Nag F90, the names are + # For one version of Nag F90, the names are # call f90_unix_MP_getarg(i,s) and f90_unix_MP_iargc(). trial=0 while test -z "$pac_cv_prog_f77_cmdarg" ; do - case $trial in + case $trial in 0) # User-specified values, if any - if test -z "$F77_GETARG" -o -z "$F77_IARGC" ; then + if test -z "$F77_GETARG" -o -z "$F77_IARGC" ; then trial=`expr $trial + 1` - continue + continue fi MSG="Using environment values of F77_GETARG etc." ;; @@ -3895,6 +6355,13 @@ continue fi ;; + 7) # gfortran won't find getarg if it is marked as external + FXX_MODULE="" + F77_GETARGDECL="intrinsic GETARG" + F77_GETARG="call GETARG(i,s)" + F77_IARGC="IARGC()" + MSG="intrinsic GETARG and IARGC" + ;; *) # exit from while loop FXX_MODULE="" F77_GETARGDECL="" @@ -3922,48 +6389,54 @@ end EOF # - # Now, try to find some way to compile and link that program, looping + # Now, try to find some way to compile and link that program, looping # over the possibilities of options and libraries save_IFS="$IFS" - IFS=" + IFS=" " for libs in $trial_LIBS ; do if test -n "$pac_cv_prog_f77_cmdarg" ; then break ; fi if test "$libs" = " " -o "$libs" = "0" ; then libs="" ; fi for flags in $trial_FLAGS ; do if test "$flags" = " " -o "$flags" = "000"; then flags="" ; fi - echo $ac_n "checking whether ${F77-f77} $flags $libs works with $MSG""... $ac_c" 1>&6 -echo "configure:3937: checking whether ${F77-f77} $flags $libs works with $MSG" >&5 + echo "$as_me:$LINENO: checking whether ${F77-f77} $flags $libs works with $MSG" >&5 +echo $ECHO_N "checking whether ${F77-f77} $flags $libs works with $MSG... $ECHO_C" >&6 IFS="$save_IFS" ac_fcompilelink_test="${F77-f77} -o conftest $FFLAGS $flags conftest.f $LDFLAGS $libs $LIBS 1>&5" found_answer="no" - if { (eval echo configure:3941: \"$ac_fcompilelink_test\") 1>&5; (eval $ac_fcompilelink_test) 2>&5; } && test -x conftest ; then + if { (eval echo "$as_me:$LINENO: \"$ac_fcompilelink_test\"") >&5 + (eval $ac_fcompilelink_test) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then if test "$ac_cv_prog_f77_cross" != "yes" ; then if ./conftest >/dev/null 2>&1 ; then found_answer="yes" fi - else + else found_answer="yes" fi fi - IFS=" + IFS=" " if test "$found_answer" = "yes" ; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 pac_cv_prog_f77_cmdarg="$MSG" pac_cv_prog_f77_cmdarg_fflags="$flags" pac_cv_prog_f77_cmdarg_ldflags="$libs" break else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 echo "configure: failed program was:" >&5 cat conftest.f >&5 fi done done - IFS="$save_IFS" + IFS="$save_IFS" rm -f conftest.* - trial=`expr $trial + 1` + trial=`expr $trial + 1` done fi pac_cv_F77_GETARGDECL="$F77_GETARGDECL" @@ -3973,10 +6446,12 @@ fi -if test "$found_cached" = "yes" ; then - echo "$ac_t""$pac_cv_prog_f77_cmdarg" 1>&6 +if test "$found_cached" = "yes" ; then + echo "$as_me:$LINENO: result: $pac_cv_prog_f77_cmdarg" >&5 +echo "${ECHO_T}$pac_cv_prog_f77_cmdarg" >&6 elif test -z "$pac_cv_F77_IARGC" ; then - echo "configure: warning: Could not find a way to access the command line from Fortran 77" 1>&2 + { echo "$as_me:$LINENO: WARNING: Could not find a way to access the command line from Fortran 77" >&5 +echo "$as_me: WARNING: Could not find a way to access the command line from Fortran 77" >&2;} fi # Set the variable values based on pac_cv_prog_xxx F77_GETARGDECL="$pac_cv_F77_GETARGDECL" @@ -3992,30 +6467,33 @@ - if test -z "$pac_cv_F77_IARGC" ; then - { echo "configure: error: Command line access is required for MPICH" 1>&2; exit 1; } + if test -z "$pac_cv_F77_IARGC" ; then + { { echo "$as_me:$LINENO: error: Command line access is required for MPICH" >&5 +echo "$as_me: error: Command line access is required for MPICH" >&2;} + { (exit 1); exit 1; }; } fi - if test "$F90" = "$F77" ; then + if test "$F90" = "$F77" ; then # We don't need to do anything pac_cv_prog_f90_cmdarg_fflags="$pac_cv_prog_f77_cmdarg_fflags" pac_cv_prog_f90_cmdarg_ldflags="$pac_cv_prog_f77_cmdarg_ldflags" F90_GETARG_FFLAGS="$pac_cv_prog_f90_cmdarg_fflags" F90_GETARG_LDFLAGS="$pac_cv_prog_f90_cmdarg_ldflags" elif test -n "$F90" -a "$enable_f90" != "no" ; then - echo $ac_n "checking how to compile and link Fortran 90 programs with Fortran 77 programs that access the command line""... $ac_c" 1>&6 -echo "configure:4007: checking how to compile and link Fortran 90 programs with Fortran 77 programs that access the command line" >&5 - if eval "test \"`echo '$''{'pac_cv_prog_f90_cmdarg'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking how to compile and link Fortran 90 programs with Fortran 77 programs that access the command line" >&5 +echo $ECHO_N "checking how to compile and link Fortran 90 programs with Fortran 77 programs that access the command line... $ECHO_C" >&6 + if test "${pac_cv_prog_f90_cmdarg+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - echo "$ac_t""searching..." 1>&6 + + echo "$as_me:$LINENO: result: searching..." >&5 +echo "${ECHO_T}searching..." >&6 cat >conftest.f <&6 -echo "configure:4034: checking if $F90 $flags $libs works" >&5 + echo "$as_me:$LINENO: checking if $F90 $flags $libs works" >&5 +echo $ECHO_N "checking if $F90 $flags $libs works... $ECHO_C" >&6 else - echo $ac_n "checking if $F90 $flags $libs works with $MSG""... $ac_c" 1>&6 -echo "configure:4037: checking if $F90 $flags $libs works with $MSG" >&5 + echo "$as_me:$LINENO: checking if $F90 $flags $libs works with $MSG" >&5 +echo $ECHO_N "checking if $F90 $flags $libs works with $MSG... $ECHO_C" >&6 fi ac_f90compilelink_test="${F90-f90} -o conftest $F90FLAGS $flags conftest.f $libs $LIBS 1>&5" - if { (eval echo configure:4040: \"$ac_f90compilelink_test\") 1>&5; (eval $ac_f90compilelink_test) 2>&5; } && test -x conftest ; then - echo "$ac_t""yes" 1>&6 + if { (eval echo "$as_me:$LINENO: \"$ac_f90compilelink_test\"") >&5 + (eval $ac_f90compilelink_test) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 pac_cv_prog_f90_cmdarg="$flags $libs" pac_cv_prog_f90_cmdarg_flags="$flags" pac_cv_prog_f90_cmdarg_ldflags="$libs" break else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 echo "configure: failed program was:" >&5 cat conftest.f >&5 fi @@ -4053,11 +6537,12 @@ fi - echo "$ac_t""$pac_cv_prog_f90_cmdarg" 1>&6 + echo "$as_me:$LINENO: result: $pac_cv_prog_f90_cmdarg" >&5 +echo "${ECHO_T}$pac_cv_prog_f90_cmdarg" >&6 F90_GETARG_FFLAGS="$pac_cv_prog_f90_cmdarg_fflags" F90_GETARG_LDFLAGS="$pac_cv_prog_f90_cmdarg_ldflags" - - + + fi # We need to add F77_GETARG_FFLAGS to FFLAGS or to F77 (they may # change the compiler, for example, by changing the way external @@ -4069,224 +6554,367 @@ FLIBS_save="$FLIBS" FLIBS="" -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5 +echo $ECHO_N "checking how to get verbose linking output from $F77... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_v+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_f77_v= +# Try some options frequently used verbose output +for ac_verb in -v -verbose --verbose -V -\#\#\#; do + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FFLAGS=$FFLAGS +FFLAGS="$FFLAGS $ac_verb" +(eval echo $as_me:6607: \"$ac_link\") >&5 +ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` +echo "$ac_f77_v_output" >&5 +FFLAGS=$ac_save_FFLAGS + +rm -f conftest* + +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_f77_v_output="`echo $ac_f77_v_output | + grep 'LPATH is:' | + sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" + +case $ac_f77_v_output in + # If we are using xlf then replace all the commas with spaces. + *xlfentry*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;; + + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;; + + # If we are using Cray Fortran then delete quotes. + # Use "\"" instead of '"' for font-lock-mode. + # FIXME: a more general fix for quoted arguments with spaces? + *cft90*) + ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` ;; +esac + + + # look for -l* and *.a constructs in the output + for ac_arg in $ac_f77_v_output; do + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) + ac_cv_prog_f77_v=$ac_verb + break 2 ;; + esac + done +done +if test -z "$ac_cv_prog_f77_v"; then + { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5 +echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:4079: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; +{ echo "$as_me:$LINENO: WARNING: compilation failed" >&5 +echo "$as_me: WARNING: compilation failed" >&2;} +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_v" >&6 +echo "$as_me:$LINENO: checking for Fortran libraries of $F77" >&5 +echo $ECHO_N "checking for Fortran libraries of $F77... $ECHO_C" >&6 +if test "${ac_cv_f77_libs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$FLIBS" != "x"; then + ac_cv_f77_libs="$FLIBS" # Let the user override the test. +else + +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FFLAGS=$FFLAGS +FFLAGS="$FFLAGS $ac_cv_prog_f77_v" +(eval echo $as_me:6685: \"$ac_link\") >&5 +ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` +echo "$ac_f77_v_output" >&5 +FFLAGS=$ac_save_FFLAGS + +rm -f conftest* + +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_f77_v_output="`echo $ac_f77_v_output | + grep 'LPATH is:' | + sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" + +case $ac_f77_v_output in + # If we are using xlf then replace all the commas with spaces. + *xlfentry*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;; + + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;; + + # If we are using Cray Fortran then delete quotes. + # Use "\"" instead of '"' for font-lock-mode. + # FIXME: a more general fix for quoted arguments with spaces? + *cft90*) + ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` ;; esac -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking for Fortran 77 libraries""... $ac_c" 1>&6 -echo "configure:4100: checking for Fortran 77 libraries" >&5 - - -if eval "test \"`echo '$''{'ac_cv_flibs'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo " END" > conftest.f -foutput=`${F77} -v -o conftest conftest.f 2>&1` -g77_p=`echo $foutput | grep GNU` -if test -n "$g77_p" ; then - foutput=`${F77} -v -o conftest conftest.f 2>&1 | sed '/^Driving:/d'` -fi -xlf_p=`echo $foutput | grep xlfentry` -if test -n "$xlf_p"; then - foutput=`echo $foutput | sed 's/,/ /g'` -fi -ld_run_path=`echo $foutput | \ - sed -n -e 's/^.*LD_RUN_PATH *= *\([^ ]*\).*/\1/p'` -case "$ld_run_path" in - /*) - if test "$ac_cv_prog_gcc" = yes; then - ld_run_path="-Xlinker -R -Xlinker $ld_run_path" - else - ld_run_path="-R $ld_run_path" + + +ac_cv_f77_libs= + +# Save positional arguments (if any) +ac_save_positional="$@" + +set X $ac_f77_v_output +while test $# != 1; do + shift + ac_arg=$1 + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a) + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break fi - ;; - *) - ld_run_path= - ;; -esac -flibs= -lflags= -want_arg= -for arg in $foutput; do - old_want_arg=$want_arg - want_arg= - if test -n "$old_want_arg"; then - case "$arg" in - -*) - old_want_arg= - ;; - esac - fi - case "$old_want_arg" in - '') - case $arg in - /*.a) - exists=false - for f in $lflags; do - if test x$arg = x$f; then - exists=true - fi - done - if $exists; then - arg= - else - lflags="$lflags $arg" - fi - ;; + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +fi + + ;; -bI:*) - exists=false - for f in $lflags; do - if test x$arg = x$f; then - exists=true - fi + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_arg; do + ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" + done +else + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +fi +fi + + ;; + # Ignore these flags. + -lang* | -lcrt*.o | -lc | -lgcc | -libmil | -LANG:=*) + ;; + -lkernel32) + test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" + ;; + -[LRuY]) + # These flags, when seen by themselves, take an argument. + # We remove the space between option and argument and re-iterate + # unless we find an empty arg or a new option (starting with -) + case $2 in + "" | -*);; + *) + ac_arg="$ac_arg$2" + shift; shift + set X $ac_arg "$@" + ;; + esac + ;; + -YP,*) + for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_j" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_arg="$ac_arg $ac_j" + ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" +fi + done - if $exists; then - arg= - else - if test "$ac_cv_prog_gcc" = yes; then - lflags="$lflags -Xlinker $arg" - else - lflags="$lflags $arg" - fi - fi - ;; - -lang* | -lcrt0.o | -lc | -lgcc) - arg= - ;; - -[lLR]) - want_arg=$arg - arg= - ;; + ;; -[lLR]*) - exists=false - for f in $lflags; do - if test x$arg = x$f; then - exists=true - fi - done - if $exists; then - arg= - else - case "$arg" in - -lkernel32) - case "$canonical_host_type" in - *-*-cygwin*) - arg= - ;; - *) - lflags="$lflags $arg" - ;; - esac - ;; - -lm) - ;; - *) - lflags="$lflags $arg" - ;; - esac - fi - ;; - -u) - want_arg=$arg - arg= - ;; - -Y) - want_arg=$arg - arg= - ;; - *) - arg= - ;; - esac - ;; - -[lLR]) - arg="$old_want_arg $arg" - ;; - -u) - arg="-u $arg" - ;; - -Y) - arg=`echo $arg | sed -e 's%^P,%%'` - SAVE_IFS=$IFS - IFS=: - list= - for elt in $arg; do - list="$list -L$elt" - done - IFS=$SAVE_IFS - arg="$list" - ;; + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +fi + + ;; + # Ignore everything else. esac - if test -n "$arg"; then - flibs="$flibs $arg" - fi done -if test -n "$ld_run_path"; then - flibs_result="$ld_run_path $flibs" +# restore positional arguments +set X $ac_save_positional; shift + +# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, +# then we insist that the "run path" must be an absolute path (i.e. it +# must begin with a "/"). +case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + ac_ld_run_path=`echo $ac_f77_v_output | + sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` + test "x$ac_ld_run_path" != x && + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_ld_run_path; do + ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" + done else - flibs_result="$flibs" + ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path" fi -ac_cv_flibs="$flibs_result" + ;; +esac +fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" + fi +echo "$as_me:$LINENO: result: $ac_cv_f77_libs" >&5 +echo "${ECHO_T}$ac_cv_f77_libs" >&6 +FLIBS="$ac_cv_f77_libs" -FLIBS="$ac_cv_flibs" -echo "$ac_t""$FLIBS" 1>&6 -echo $ac_n "checking whether C can link with $FLIBS""... $ac_c" 1>&6 -echo "configure:4259: checking whether C can link with $FLIBS" >&5 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +echo "$as_me:$LINENO: checking whether C can link with $FLIBS" >&5 +echo $ECHO_N "checking whether C can link with $FLIBS... $ECHO_C" >&6 # Try to link a C program with all of these libraries save_LIBS="$LIBS" LIBS="$LIBS $FLIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ int a; -; return 0; } -EOF -if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then runs=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - runs=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +runs=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" -echo "$ac_t""$runs" 1>&6 +echo "$as_me:$LINENO: result: $runs" >&5 +echo "${ECHO_T}$runs" >&6 if test "$runs" = "no" ; then - echo $ac_n "checking for which libraries can be used""... $ac_c" 1>&6 -echo "configure:4285: checking for which libraries can be used" >&5 + echo "$as_me:$LINENO: checking for which libraries can be used" >&5 +echo $ECHO_N "checking for which libraries can be used... $ECHO_C" >&6 pac_ldirs="" pac_libs="" pac_other="" for name in $FLIBS ; do - case $name in + case $name in -l*) pac_libs="$pac_libs $name" ;; -L*) pac_ldirs="$pac_ldirs $name" ;; *) pac_other="$pac_other $name" ;; @@ -4294,55 +6922,111 @@ done save_LIBS="$LIBS" keep_libs="" - for name in $pac_libs ; do + for name in $pac_libs ; do LIBS="$save_LIBS $pac_ldirs $pac_other $name" - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ int a; -; return 0; } -EOF -if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then runs=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - runs=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +runs=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test $runs = "yes" ; then keep_libs="$keep_libs $name" ; fi done - echo "$ac_t""$keep_libs" 1>&6 + echo "$as_me:$LINENO: result: $keep_libs" >&5 +echo "${ECHO_T}$keep_libs" >&6 LIBS="$save_LIBS" FLIBS="$pac_ldirs $pac_other $keep_libs" fi -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ long long a; -; return 0; } -EOF -if { (eval echo configure:4334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG 1 -EOF +_ACEOF else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* -echo $ac_n "checking for linker for Fortran main programs""... $ac_c" 1>&6 -echo "configure:4346: checking for linker for Fortran main programs" >&5 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: checking for linker for Fortran main programs" >&5 +echo $ECHO_N "checking for linker for Fortran main programs... $ECHO_C" >&6 cat > conftest.c <&5; (eval $ac_compile) 2>&5; }; then +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then mv conftest.o conftest1.o else - { echo "configure: error: Could not compile C test program" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: Could not compile C test program" >&5 +echo "$as_me: error: Could not compile C test program" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu cat > conftest.f <&5; (eval $ac_compile) 2>&5; }; then - if ${F77} -o conftest conftest.o conftest1.o $LDFLAGS 2>&5 ; then - echo "$ac_t""Use Fortran to link programs" 1>&6 - elif ${CC} -o conftest conftest.o conftest1.o $LDFLAGS $FLIBS 2>&5 ; then - echo "$ac_t""Use C with FLIBS to link programs" 1>&6 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # We include $FFLAGS on the link line because this is + # the way in which most of the configure tests run. In particular, + # many users are used to using FFLAGS (and CFLAGS) to select + # different instruction sets, such as 64-bit with -xarch=v9 for + # Solaris. + if ${F77} ${FFLAGS} -o conftest conftest.o conftest1.o $LDFLAGS 2>&5 ; then + echo "$as_me:$LINENO: result: Use Fortran to link programs" >&5 +echo "${ECHO_T}Use Fortran to link programs" >&6 + elif ${CC} ${CFLAGS} -o conftest conftest.o conftest1.o $LDFLAGS $FLIBS 2>&5 ; then + echo "$as_me:$LINENO: result: Use C with FLIBS to link programs" >&5 +echo "${ECHO_T}Use C with FLIBS to link programs" >&6 F77LINKER="$CC" F77_LDFLAGS="$F77_LDFLAGS $FLIBS" else - echo "$ac_t""Unable to determine how to link Fortran programs with C" 1>&6 + echo "$as_me:$LINENO: result: Unable to determine how to link Fortran programs with C" >&5 +echo "${ECHO_T}Unable to determine how to link Fortran programs with C" >&6 fi else - { echo "configure: error: Could not compile Fortran test program" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: Could not compile Fortran test program" >&5 +echo "$as_me: error: Could not compile Fortran test program" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo $ac_n "checking for Fortran 77 name mangling""... $ac_c" 1>&6 -echo "configure:4402: checking for Fortran 77 name mangling" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_f77_name_mangle'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for Fortran 77 name mangling" >&5 +echo $ECHO_N "checking for Fortran 77 name mangling... $ECHO_C" >&6 +if test "${pac_cv_prog_f77_name_mangle+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + # Check for strange behavior of Fortran. For example, some FreeBSD - # systems use f2c to implement f77, and the version of f2c that they + # systems use f2c to implement f77, and the version of f2c that they # use generates TWO (!!!) trailing underscores # Currently, WDEF is not used but could be... # @@ -4422,228 +7125,438 @@ if test "X$ac_fcompile" = "X" ; then ac_fcompile='${F77-f77} -c $FFLAGS conftest.f 1>&5' fi - if { (eval echo configure:4426: \"$ac_fcompile\") 1>&5; (eval $ac_fcompile) 2>&5; } && test -s conftest.o ; then + if { (eval echo "$as_me:$LINENO: \"$ac_fcompile\"") >&5 + (eval $ac_fcompile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest.o ; then mv conftest.o fconftestf.o - else + else echo "configure: failed program was:" >&5 cat conftest.f >&5 fi - + + ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + save_LIBS="$LIBS" LIBS="fconftestf.o $FLIBS $LIBS" - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ my_name(); -; return 0; } -EOF -if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_prog_f77_name_mangle="lower" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "X$pac_cv_prog_f77_name_mangle" = "X" ; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ my_name_(); -; return 0; } -EOF -if { (eval echo configure:4468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_prog_f77_name_mangle="lower underscore" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi if test "X$pac_cv_prog_f77_name_mangle" = "X" ; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ void __stdcall MY_NAME(int); -int main() { +int +main () +{ MY_NAME(0); -; return 0; } -EOF -if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_prog_f77_name_mangle="upper stdcall" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi if test "X$pac_cv_prog_f77_name_mangle" = "X" ; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ MY_NAME(); -; return 0; } -EOF -if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_prog_f77_name_mangle="upper" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi if test "X$pac_cv_prog_f77_name_mangle" = "X" ; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ my_name__(); -; return 0; } -EOF -if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_prog_f77_name_mangle="lower doubleunderscore" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi if test "X$pac_cv_prog_f77_name_mangle" = "X" ; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ MY_name(); -; return 0; } -EOF -if { (eval echo configure:4540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_prog_f77_name_mangle="mixed" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi if test "X$pac_cv_prog_f77_name_mangle" = "X" ; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ MY_name_(); -; return 0; } -EOF -if { (eval echo configure:4558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_prog_f77_name_mangle="mixed underscore" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi LIBS="$save_LIBS" ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f fconftest* fi - -echo "$ac_t""$pac_cv_prog_f77_name_mangle" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_prog_f77_name_mangle" >&5 +echo "${ECHO_T}$pac_cv_prog_f77_name_mangle" >&6 # Make the actual definition pac_namecheck=`echo X$pac_cv_prog_f77_name_mangle | sed 's/ /-/g'` pac_cv_test_stdcall="" case $pac_namecheck in - X) echo "configure: warning: Cannot determine Fortran naming scheme" 1>&2 ;; - Xlower) cat >> confdefs.h <<\EOF + X) { echo "$as_me:$LINENO: WARNING: Cannot determine Fortran naming scheme" >&5 +echo "$as_me: WARNING: Cannot determine Fortran naming scheme" >&2;} ;; + Xlower) +cat >>confdefs.h <<\_ACEOF #define F77_NAME_LOWER 1 -EOF - +_ACEOF + F77_NAME_MANGLE="F77_NAME_LOWER" ;; - Xlower-underscore) cat >> confdefs.h <<\EOF + Xlower-underscore) +cat >>confdefs.h <<\_ACEOF #define F77_NAME_LOWER_USCORE 1 -EOF +_ACEOF F77_NAME_MANGLE="F77_NAME_LOWER_USCORE" ;; - Xlower-doubleunderscore) cat >> confdefs.h <<\EOF + Xlower-doubleunderscore) +cat >>confdefs.h <<\_ACEOF #define F77_NAME_LOWER_2USCORE 1 -EOF +_ACEOF F77_NAME_MANGLE="F77_NAME_LOWER_2USCORE" ;; - Xupper) cat >> confdefs.h <<\EOF + Xupper) +cat >>confdefs.h <<\_ACEOF #define F77_NAME_UPPER 1 -EOF - +_ACEOF + F77_NAME_MANGLE="F77_NAME_UPPER" ;; - Xmixed) cat >> confdefs.h <<\EOF + Xmixed) +cat >>confdefs.h <<\_ACEOF #define F77_NAME_MIXED 1 -EOF - +_ACEOF + F77_NAME_MANGLE="F77_NAME_MIXED" ;; - Xmixed-underscore) cat >> confdefs.h <<\EOF + Xmixed-underscore) +cat >>confdefs.h <<\_ACEOF #define F77_NAME_MIXED_USCORE 1 -EOF - +_ACEOF + F77_NAME_MANGLE="F77_NAME_MIXED_USCORE" ;; - Xupper-stdcall) cat >> confdefs.h <<\EOF + Xupper-stdcall) +cat >>confdefs.h <<\_ACEOF #define F77_NAME_UPPER 1 -EOF +_ACEOF F77_NAME_MANGLE="F77_NAME_UPPER_STDCALL" pac_cv_test_stdcall="__stdcall" ;; - *) echo "configure: warning: Unknown Fortran naming scheme" 1>&2 ;; + *) { echo "$as_me:$LINENO: WARNING: Unknown Fortran naming scheme" >&5 +echo "$as_me: WARNING: Unknown Fortran naming scheme" >&2;} ;; esac +# Get the standard call definition +# FIXME: This should use F77_STDCALL, not STDCALL (non-conforming name) if test "X$pac_cv_test_stdcall" = "X" ; then - cat >> confdefs.h <<\EOF -#define STDCALL -EOF - + F77_STDCALL="" else - cat >> confdefs.h <<\EOF -#define STDCALL __stdcall -EOF - + F77_STDCALL="__stdcall" fi +# +cat >>confdefs.h <<_ACEOF +#define STDCALL $F77_STDCALL +_ACEOF -echo $ac_n "checking for which Fortran libraries are needed to link C with Fortran""... $ac_c" 1>&6 -echo "configure:4647: checking for which Fortran libraries are needed to link C with Fortran" >&5 + + +echo "$as_me:$LINENO: checking for which Fortran libraries are needed to link C with Fortran" >&5 +echo $ECHO_N "checking for which Fortran libraries are needed to link C with Fortran... $ECHO_C" >&6 F77_IN_C_LIBS="$FLIBS" rm -f conftest* cat < conftest.f @@ -4653,23 +7566,32 @@ if test "X$ac_fcompile" = "X" ; then ac_fcompile='${F77-f77} -c $FFLAGS conftest.f 1>&5' fi -if { (eval echo configure:4657: \"$ac_fcompile\") 1>&5; (eval $ac_fcompile) 2>&5; } && test -s conftest.o ; then +if { (eval echo "$as_me:$LINENO: \"$ac_fcompile\"") >&5 + (eval $ac_fcompile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest.o ; then mv conftest.o mconftestf.o - + + ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu save_LIBS="$LIBS" LIBS="mconftestf.o $save_LIBS" - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -int main() { +int +main () +{ #ifdef F77_NAME_UPPER #define ftest_ FTEST @@ -4678,28 +7600,55 @@ #endif ftest_(); -; return 0; } -EOF -if { (eval echo configure:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then link_worked=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - link_worked=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +link_worked=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$link_worked" = "no" ; then flibdirs=`echo $FLIBS | tr ' ' '\012' | grep '\-L' | tr '\012' ' '` fliblibs=`echo $FLIBS | tr ' ' '\012' | grep -v '\-L' | tr '\012' ' '` for flibs in $fliblibs ; do LIBS="mconftestf.o $flibdirs $flibs $save_LIBS" - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -int main() { +int +main () +{ #ifdef F77_NAME_UPPER #define ftest_ FTEST @@ -4708,19 +7657,41 @@ #endif ftest_(); -; return 0; } -EOF -if { (eval echo configure:4714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then link_worked=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - link_worked=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +link_worked=no fi -rm -f conftest* - if test "$link_worked" = "yes" ; then +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$link_worked" = "yes" ; then F77_IN_C_LIBS="$flibdirs $flibs" break fi @@ -4731,11 +7702,16 @@ for flibs in $fliblibs ; do flibscat="$flibscat $flibs" LIBS="mconftestf.o $flibdirs $flibscat $save_LIBS" - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -int main() { +int +main () +{ #ifdef F77_NAME_UPPER #define ftest_ FTEST @@ -4744,19 +7720,41 @@ #endif ftest_(); -; return 0; } -EOF -if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then link_worked=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - link_worked=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +link_worked=no fi -rm -f conftest* - if test "$link_worked" = "yes" ; then +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$link_worked" = "yes" ; then F77_IN_C_LIBS="$flibdirs $flibscat" break fi @@ -4768,128 +7766,103 @@ fi LIBS="$save_LIBS" ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -else +else echo "configure: failed program was:" >&5 cat conftest.f >&5 fi rm -f conftest* mconftest* if test -z "$F77_IN_C_LIBS" ; then - echo "$ac_t""none" 1>&6 + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else - echo "$ac_t""$F77_IN_C_LIBS" 1>&6 + echo "$as_me:$LINENO: result: $F77_IN_C_LIBS" >&5 +echo "${ECHO_T}$F77_IN_C_LIBS" >&6 fi ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu -echo $ac_n "checking whether Fortran accepts ! for comments""... $ac_c" 1>&6 -echo "configure:4797: checking whether Fortran accepts ! for comments" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_f77_exclaim_comments'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether Fortran accepts ! for comments" >&5 +echo $ECHO_N "checking whether Fortran accepts ! for comments... $ECHO_C" >&6 +if test "${pac_cv_prog_f77_exclaim_comments+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF + program main +! This is a comment end -EOF -if { (eval echo configure:4815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_prog_f77_exclaim_comments="yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - pac_cv_prog_f77_exclaim_comments="no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +pac_cv_prog_f77_exclaim_comments="no" fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu fi - -echo "$ac_t""$pac_cv_prog_f77_exclaim_comments" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_prog_f77_exclaim_comments" >&5 +echo "${ECHO_T}$pac_cv_prog_f77_exclaim_comments" >&6 if test "$pac_cv_prog_f77_exclaim_comments" = "yes" ; then has_exclaim="yes" else has_exclaim="no" fi - -echo $ac_n "checking whether Fortran supports new-style character declarations""... $ac_c" 1>&6 -echo "configure:4842: checking whether Fortran supports new-style character declarations" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_f77_new_char_decl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - -ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross - -cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - pac_cv_prog_f77_new_char_decl="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - pac_cv_prog_f77_new_char_decl="no" -fi -rm -f conftest* -ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross - - -fi - -echo "$ac_t""$pac_cv_prog_f77_new_char_decl" 1>&6 -if test "$pac_cv_prog_f77_new_char_decl" = "yes" ; then - CHARDECL="(LEN=*)" -else - CHARDECL="*(*)" -fi - +CHARDECL="*(*)" checkdir=include -echo $ac_n "checking for include directory flag for Fortran""... $ac_c" 1>&6 -echo "configure:4889: checking for include directory flag for Fortran" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_f77_has_incdir'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for include directory flag for Fortran" >&5 +echo $ECHO_N "checking for include directory flag for Fortran... $ECHO_C" >&6 +if test "${pac_cv_prog_f77_has_incdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test ! -d $checkdir ; then mkdir $checkdir ; fi cat >$checkdir/conftestf.h <&5; (eval $ac_fcompiletest) 2>&5; } && test -s conftest.o ; then + if { (eval echo "$as_me:$LINENO: \"$ac_fcompiletest\"") >&5 + (eval $ac_fcompiletest) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest.o ; then pac_cv_prog_f77_has_incdir="$idir" break fi @@ -4913,17 +7890,17 @@ rm -f $checkdir/conftestf.h fi - -echo "$ac_t""$pac_cv_prog_f77_has_incdir" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_prog_f77_has_incdir" >&5 +echo "${ECHO_T}$pac_cv_prog_f77_has_incdir" >&6 if test "X$pac_cv_prog_f77_has_incdir" != "Xnone" ; then F77_INCDIR="$pac_cv_prog_f77_has_incdir" fi if test -n "$F77_INCDIR" ; then - # For building the Fortran files, add the directory where we are building + # For building the Fortran files, add the directory where we are building # the object to the include list. This is needed for g77, which makes - # includes relative to the source directory of the file, not the + # includes relative to the source directory of the file, not the # directory that the command is executed in FINCLUDES="$F77_INCDIR`pwd`/src" fi @@ -4931,14 +7908,14 @@ # if test "X$F77_LIBDIR_LEADER" = "X" ; then -echo $ac_n "checking for Fortran 77 flag for library directories""... $ac_c" 1>&6 -echo "configure:4936: checking for Fortran 77 flag for library directories" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_f77_library_dir_flag'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - - rm -f conftest.* conftest1.* +echo "$as_me:$LINENO: checking for Fortran 77 flag for library directories" >&5 +echo $ECHO_N "checking for Fortran 77 flag for library directories... $ECHO_C" >&6 +if test "${pac_cv_prog_f77_library_dir_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + rm -f conftest.* conftest1.* cat > conftest.f <&5; (eval $ac_fcompileforlib) 2>&5; } && test -s conftest1.o ; then + if { (eval echo "$as_me:$LINENO: \"$ac_fcompileforlib\"") >&5 + (eval $ac_fcompileforlib) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest1.o ; then if test ! -d conftest ; then mkdir conftest2 ; fi - { ac_try='${ARCMD-"ar"} cr conftest2/libconftest.a conftest1.o'; { (eval echo configure:4955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } - { ac_try='${RANLIB-ranlib} conftest2/libconftest.a'; { (eval echo configure:4956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } + # We have had some problems with "AR" set to "ar cr"; this is + # a user-error; AR should be set to just the program (plus + # any flags that affect the object file format, such as -X64 + # required for 64-bit objects in some versions of AIX). + { ac_try='${AR-"ar"} cr conftest2/libconftest.a conftest1.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + { ac_try='${RANLIB-ranlib} conftest2/libconftest.a' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } ac_fcompileldtest='${F77-f77} -o conftest $FFLAGS ${ldir}conftest2 conftest.f -lconftest $LDFLAGS 1>&5' for ldir in "-L" "-Wl,-L," ; do - if { (eval echo configure:4959: \"$ac_fcompileldtest\") 1>&5; (eval $ac_fcompileldtest) 2>&5; } && test -s conftest ; then + if { (eval echo "$as_me:$LINENO: \"$ac_fcompileldtest\"") >&5 + (eval $ac_fcompileldtest) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest ; then pac_cv_prog_f77_library_dir_flag="$ldir" break fi @@ -4968,9 +7967,9 @@ rm -f conftest* fi +echo "$as_me:$LINENO: result: $pac_cv_prog_f77_library_dir_flag" >&5 +echo "${ECHO_T}$pac_cv_prog_f77_library_dir_flag" >&6 -echo "$ac_t""$pac_cv_prog_f77_library_dir_flag" 1>&6 - if test "X$pac_cv_prog_f77_library_dir_flag" != "X" ; then F77_LIBDIR_LEADER="$pac_cv_prog_f77_library_dir_flag" fi @@ -4981,25 +7980,30 @@ if test "$MPI_WITH_PMPI" = "no" ; then # If the PMPI routines are not in the same library with the MPI # routines, we may need to remove the pmpi declarations - -echo $ac_n "checking whether Fortran allows unused externals""... $ac_c" 1>&6 -echo "configure:4987: checking whether Fortran allows unused externals" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_f77_allows_unused_externals'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:$LINENO: checking whether Fortran allows unused externals" >&5 +echo $ECHO_N "checking whether Fortran allows unused externals... $ECHO_C" >&6 +if test "${pac_cv_prog_f77_allows_unused_externals+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + + ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then rm -rf conftest* pac_cv_prog_f77_allows_unused_externals="yes" else @@ -5007,44 +8011,46 @@ cat conftest.$ac_ext >&5 rm -rf conftest* pac_cv_prog_f77_allows_unused_externals="no" - + fi rm -f conftest* # ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu fi - -echo "$ac_t""$pac_cv_prog_f77_allows_unused_externals" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_prog_f77_allows_unused_externals" >&5 +echo "${ECHO_T}$pac_cv_prog_f77_allows_unused_externals" >&6 if test "X$pac_cv_prog_f77_allows_unused_externals" = "Xyes" ; then MPIFPMPI=",PMPI_WTIME,PMPI_WTICK" else - - MPIFPMPI=""; - echo "configure: warning: Removed PMPI_WTIME and PMPI_WTICK from mpif.h" 1>&2 + + MPIFPMPI=""; + { echo "$as_me:$LINENO: WARNING: Removed PMPI_WTIME and PMPI_WTICK from mpif.h" >&5 +echo "$as_me: WARNING: Removed PMPI_WTIME and PMPI_WTICK from mpif.h" >&2;} fi else MPIFPMPI=",PMPI_WTIME,PMPI_WTICK" fi -echo $ac_n "checking whether Fortran has pointer declaration""... $ac_c" 1>&6 -echo "configure:5037: checking whether Fortran has pointer declaration" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_f77_has_pointer'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether Fortran has pointer declaration" >&5 +echo $ECHO_N "checking whether Fortran has pointer declaration... $ECHO_C" >&6 +if test "${pac_cv_prog_f77_has_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + + ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF program main integer M @@ -5052,26 +8058,45 @@ data MPTR/0/ end -EOF -if { (eval echo configure:5057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_prog_f77_has_pointer="yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - pac_cv_prog_f77_has_pointer="no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +pac_cv_prog_f77_has_pointer="no" fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu fi - -echo "$ac_t""$pac_cv_prog_f77_has_pointer" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_prog_f77_has_pointer" >&5 +echo "${ECHO_T}$pac_cv_prog_f77_has_pointer" >&6 if test "$pac_cv_prog_f77_has_pointer" = "yes" ; then f77_has_pointer=yes else @@ -5087,9 +8112,9 @@ data MPI_BOTTOM_PTR/0/, MPI_STATUS_IG_PTR/0/ data MPI_STATUSES_IG_PTR/0/ EOF - cat >> confdefs.h <<\EOF -#define USE_POINTER_FOR_BOTTOM 1 -EOF + cat >>confdefs.h <<\_ACEOF +#define USE_POINTER_FOR_BOTTOM 1Define if pointer should be use for MPI_BOTTOM +_ACEOF else cat >>include/mpif_bottom.h <&6 -echo "configure:5114: checking for size of Fortran type integer" >&5 -if eval "test \"`echo '$''{'pac_cv_f77_sizeof_integer'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for size of Fortran type integer" >&5 +echo $ECHO_N "checking for size of Fortran type integer... $ECHO_C" >&6 +if test "${pac_cv_f77_sizeof_integer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + rm -f conftest* cat < conftest.f @@ -5126,24 +8151,31 @@ if test "X$ac_fcompile" = "X" ; then ac_fcompile='${F77-f77} -c $FFLAGS conftest.f 1>&5' fi -if { (eval echo configure:5130: \"$ac_fcompile\") 1>&5; (eval $ac_fcompile) 2>&5; } && test -s conftest.o ; then +if { (eval echo "$as_me:$LINENO: \"$ac_fcompile\"") >&5 + (eval $ac_fcompile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest.o ; then mv conftest.o conftestf.o - + + ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu save_LIBS="$LIBS" LIBS="conftestf.o $FLIBS $LIBS" if test "$cross_compiling" = yes; then eval pac_cv_f77_sizeof_integer=$CROSS_F77_SIZEOF_INTEGER else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #ifdef F77_NAME_UPPER #define cisize_ CISIZE @@ -5156,7 +8188,7 @@ void cisize_(char *,char*); void isize_(void); void cisize_(char *i1p, char *i2p) -{ +{ isize_val = (int)(i2p - i1p); } int main(int argc, char **argv) @@ -5167,54 +8199,65 @@ fprintf(f,"%d\n", isize_val ); return 0; } -EOF -if { (eval echo configure:5172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval pac_cv_f77_sizeof_integer=`cat conftestval` else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - eval pac_cv_f77_sizeof_integer=0 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +eval pac_cv_f77_sizeof_integer=0 fi -rm -fr conftest* +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - # Problem. If the process fails to run, then there won't be # a good error message. For example, with one Portland Group # installation, we had problems with finding the libpgc.so shared library # The autoconf code for TRY_RUN doesn't capture the output from # the test program (!) - + LIBS="$save_LIBS" ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu -else +else echo "configure: failed program was:" >&5 cat conftest.f >&5 eval pac_cv_f77_sizeof_integer=$CROSS_F77_SIZEOF_INTEGER fi fi +echo "$as_me:$LINENO: result: $pac_cv_f77_sizeof_integer" >&5 +echo "${ECHO_T}$pac_cv_f77_sizeof_integer" >&6 -echo "$ac_t""$pac_cv_f77_sizeof_integer" 1>&6 -cat >> confdefs.h <>confdefs.h <<_ACEOF #define SIZEOF_F77_INTEGER $pac_cv_f77_sizeof_integer -EOF +_ACEOF -echo $ac_n "checking for size of Fortran type real""... $ac_c" 1>&6 -echo "configure:5214: checking for size of Fortran type real" >&5 -if eval "test \"`echo '$''{'pac_cv_f77_sizeof_real'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for size of Fortran type real" >&5 +echo $ECHO_N "checking for size of Fortran type real... $ECHO_C" >&6 +if test "${pac_cv_f77_sizeof_real+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + rm -f conftest* cat < conftest.f @@ -5226,24 +8269,31 @@ if test "X$ac_fcompile" = "X" ; then ac_fcompile='${F77-f77} -c $FFLAGS conftest.f 1>&5' fi -if { (eval echo configure:5230: \"$ac_fcompile\") 1>&5; (eval $ac_fcompile) 2>&5; } && test -s conftest.o ; then +if { (eval echo "$as_me:$LINENO: \"$ac_fcompile\"") >&5 + (eval $ac_fcompile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest.o ; then mv conftest.o conftestf.o - + + ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu save_LIBS="$LIBS" LIBS="conftestf.o $FLIBS $LIBS" if test "$cross_compiling" = yes; then eval pac_cv_f77_sizeof_real=$CROSS_F77_SIZEOF_REAL else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #ifdef F77_NAME_UPPER #define cisize_ CISIZE @@ -5256,7 +8306,7 @@ void cisize_(char *,char*); void isize_(void); void cisize_(char *i1p, char *i2p) -{ +{ isize_val = (int)(i2p - i1p); } int main(int argc, char **argv) @@ -5267,54 +8317,65 @@ fprintf(f,"%d\n", isize_val ); return 0; } -EOF -if { (eval echo configure:5272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval pac_cv_f77_sizeof_real=`cat conftestval` else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - eval pac_cv_f77_sizeof_real=0 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +eval pac_cv_f77_sizeof_real=0 fi -rm -fr conftest* +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - # Problem. If the process fails to run, then there won't be # a good error message. For example, with one Portland Group # installation, we had problems with finding the libpgc.so shared library # The autoconf code for TRY_RUN doesn't capture the output from # the test program (!) - + LIBS="$save_LIBS" ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu -else +else echo "configure: failed program was:" >&5 cat conftest.f >&5 eval pac_cv_f77_sizeof_real=$CROSS_F77_SIZEOF_REAL fi fi +echo "$as_me:$LINENO: result: $pac_cv_f77_sizeof_real" >&5 +echo "${ECHO_T}$pac_cv_f77_sizeof_real" >&6 -echo "$ac_t""$pac_cv_f77_sizeof_real" 1>&6 -cat >> confdefs.h <>confdefs.h <<_ACEOF #define SIZEOF_F77_REAL $pac_cv_f77_sizeof_real -EOF +_ACEOF -echo $ac_n "checking for size of Fortran type double precision""... $ac_c" 1>&6 -echo "configure:5314: checking for size of Fortran type double precision" >&5 -if eval "test \"`echo '$''{'pac_cv_f77_sizeof_double_precision'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for size of Fortran type double precision" >&5 +echo $ECHO_N "checking for size of Fortran type double precision... $ECHO_C" >&6 +if test "${pac_cv_f77_sizeof_double_precision+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + rm -f conftest* cat < conftest.f @@ -5326,24 +8387,31 @@ if test "X$ac_fcompile" = "X" ; then ac_fcompile='${F77-f77} -c $FFLAGS conftest.f 1>&5' fi -if { (eval echo configure:5330: \"$ac_fcompile\") 1>&5; (eval $ac_fcompile) 2>&5; } && test -s conftest.o ; then +if { (eval echo "$as_me:$LINENO: \"$ac_fcompile\"") >&5 + (eval $ac_fcompile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest.o ; then mv conftest.o conftestf.o - + + ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu save_LIBS="$LIBS" LIBS="conftestf.o $FLIBS $LIBS" if test "$cross_compiling" = yes; then eval pac_cv_f77_sizeof_double_precision=$CROSS_F77_SIZEOF_DOUBLE_PRECISION else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #ifdef F77_NAME_UPPER #define cisize_ CISIZE @@ -5356,7 +8424,7 @@ void cisize_(char *,char*); void isize_(void); void cisize_(char *i1p, char *i2p) -{ +{ isize_val = (int)(i2p - i1p); } int main(int argc, char **argv) @@ -5367,43 +8435,54 @@ fprintf(f,"%d\n", isize_val ); return 0; } -EOF -if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval pac_cv_f77_sizeof_double_precision=`cat conftestval` else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - eval pac_cv_f77_sizeof_double_precision=0 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +eval pac_cv_f77_sizeof_double_precision=0 fi -rm -fr conftest* +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - # Problem. If the process fails to run, then there won't be # a good error message. For example, with one Portland Group # installation, we had problems with finding the libpgc.so shared library # The autoconf code for TRY_RUN doesn't capture the output from # the test program (!) - + LIBS="$save_LIBS" ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu -else +else echo "configure: failed program was:" >&5 cat conftest.f >&5 eval pac_cv_f77_sizeof_double_precision=$CROSS_F77_SIZEOF_DOUBLE_PRECISION fi fi +echo "$as_me:$LINENO: result: $pac_cv_f77_sizeof_double_precision" >&5 +echo "${ECHO_T}$pac_cv_f77_sizeof_double_precision" >&6 -echo "$ac_t""$pac_cv_f77_sizeof_double_precision" 1>&6 -cat >> confdefs.h <>confdefs.h <<_ACEOF #define SIZEOF_F77_DOUBLE_PRECISION $pac_cv_f77_sizeof_double_precision -EOF +_ACEOF @@ -5411,179 +8490,374 @@ # If we have sizes for real and double, we do not need to call mpir_get_fsize # at run time. # -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF program main integer*1 i end -EOF -if { (eval echo configure:5420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then has_integer_1=1 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - has_integer_1=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +has_integer_1=0 fi -rm -f conftest* -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF program main integer*2 i end -EOF -if { (eval echo configure:5435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then has_integer_2=2 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - has_integer_2=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +has_integer_2=0 fi -rm -f conftest* -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF program main integer*4 i end -EOF -if { (eval echo configure:5450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then has_integer_4=4 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - has_integer_4=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +has_integer_4=0 fi -rm -f conftest* -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF program main integer*8 i end -EOF -if { (eval echo configure:5465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then has_integer_8=8 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - has_integer_8=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +has_integer_8=0 fi -rm -f conftest* -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF program main integer*16 i end -EOF -if { (eval echo configure:5480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then has_integer_16=16 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - has_integer_16=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +has_integer_16=0 fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF program main real*4 a end -EOF -if { (eval echo configure:5496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then has_real_4=4 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - has_real_4=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +has_real_4=0 fi -rm -f conftest* -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF program main real*8 a end -EOF -if { (eval echo configure:5511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then has_real_8=8 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - has_real_8=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +has_real_8=0 fi -rm -f conftest* -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF program main real*16 a end -EOF -if { (eval echo configure:5526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then has_real_16=16 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - has_real_16=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +has_real_16=0 fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Compare the sizes of these types to the C types ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:5549: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext </dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include #include #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - rm -rf conftest* + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then + $EGREP "memchr" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -5592,16 +8866,19 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then + $EGREP "free" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -5610,83 +8887,135 @@ if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -EOF -if { (eval echo configure:5629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then : else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no fi -rm -fr conftest* +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 -EOF +_ACEOF fi -for ac_hdr in stdlib.h string.h + + +for ac_header in stdlib.h string.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5656: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + pac_found_header=no if test "$CPP" != "/lib/cpp" ; then - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - rm -rf conftest* + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then pac_found_header=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext fi # If cpp failed, see if the compiler accepts the header. if test "$pac_found_header" != "yes" ; then cat >conftest.c< +#include <$ac_header> int conftest() {return 0;} EOF ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' - if { (eval echo configure:5690: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then + if { (eval echo "$as_me:$LINENO: \"$ac_compile_for_cpp\"") >&5 + (eval $ac_compile_for_cpp) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pac_found_header=yes else echo "configure: failed program was:" >&5 @@ -5703,58 +9032,80 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi done # Current bug: this is needed for mpi.h, which should eventually remove -# the ifdef test on USE_STDARG +# the ifdef test on USE_STDARG # It is also used in the definition of MPIR_Err_setmsg. ac_safe=`echo "stdarg.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for stdarg.h""... $ac_c" 1>&6 -echo "configure:5724: checking for stdarg.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for stdarg.h" >&5 +echo $ECHO_N "checking for stdarg.h... $ECHO_C" >&6 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + pac_found_header=no if test "$CPP" != "/lib/cpp" ; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - rm -rf conftest* +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then pac_found_header=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext fi # If cpp failed, see if the compiler accepts the header. if test "$pac_found_header" != "yes" ; then cat >conftest.c< int conftest() {return 0;} EOF ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' - if { (eval echo configure:5758: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then + if { (eval echo "$as_me:$LINENO: \"$ac_compile_for_cpp\"") >&5 + (eval $ac_compile_for_cpp) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pac_found_header=yes else echo "configure: failed program was:" >&5 @@ -5771,31 +9122,34 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 : else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test "$ac_cv_header_stdarg_h" = "yes" ; then - echo $ac_n "checking whether stdarg is oldstyle""... $ac_c" 1>&6 -echo "configure:5783: checking whether stdarg is oldstyle" >&5 -if eval "test \"`echo '$''{'pac_cv_header_stdarg_oldstyle'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking whether stdarg is oldstyle" >&5 +echo $ECHO_N "checking whether stdarg is oldstyle... $ECHO_C" >&6 +if test "${pac_cv_header_stdarg_oldstyle+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + pac_check_compile=2 if test -z "$pac_TRY_COMPLILE_CLEAN" ; then rm -f conftest* echo 'int try(void);int try(void){return 0;}' > conftest.c if ${CC-cc} $CFLAGS -c conftest.c >conftest.bas 2>&1 ; then - if test -s conftest.bas ; then + if test -s conftest.bas ; then pac_TRY_COMPILE_CLEAN_OUT=`cat conftest.bas` fi pac_TRY_COMPILE_CLEAN=1 else - echo "configure: warning: Could not compile simple test program!" 1>&2 + { echo "$as_me:$LINENO: WARNING: Could not compile simple test program!" >&5 +echo "$as_me: WARNING: Could not compile simple test program!" >&2;} if test -s conftest.bas ; then cat conftest.bas >> config.log ; fi fi fi @@ -5831,7 +9185,7 @@ fi rm -f conftest* -case "$pac_check_compile" in +case "$pac_check_compile" in 0) pac_cv_header_stdarg_oldstyle="yes" ;; 1) pac_cv_header_stdarg_oldstyle="may be newstyle" @@ -5841,32 +9195,34 @@ esac fi - -echo "$ac_t""$pac_cv_header_stdarg_oldstyle" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_header_stdarg_oldstyle" >&5 +echo "${ECHO_T}$pac_cv_header_stdarg_oldstyle" >&6 if test "$pac_cv_header_stdarg_oldstyle" = "yes" ; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define USE_OLDSTYLE_STDARG 1 -EOF +_ACEOF else - echo $ac_n "checking whether stdarg works""... $ac_c" 1>&6 -echo "configure:5854: checking whether stdarg works" >&5 -if eval "test \"`echo '$''{'pac_cv_header_stdarg_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking whether stdarg works" >&5 +echo $ECHO_N "checking whether stdarg works... $ECHO_C" >&6 +if test "${pac_cv_header_stdarg_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - + + pac_check_compile=2 if test -z "$pac_TRY_COMPLILE_CLEAN" ; then rm -f conftest* echo 'int try(void);int try(void){return 0;}' > conftest.c if ${CC-cc} $CFLAGS -c conftest.c >conftest.bas 2>&1 ; then - if test -s conftest.bas ; then + if test -s conftest.bas ; then pac_TRY_COMPILE_CLEAN_OUT=`cat conftest.bas` fi pac_TRY_COMPILE_CLEAN=1 else - echo "configure: warning: Could not compile simple test program!" 1>&2 + { echo "$as_me:$LINENO: WARNING: Could not compile simple test program!" >&5 +echo "$as_me: WARNING: Could not compile simple test program!" >&2;} if test -s conftest.bas ; then cat conftest.bas >> config.log ; fi fi fi @@ -5904,7 +9260,7 @@ fi rm -f conftest* -case "$pac_check_compile" in +case "$pac_check_compile" in 0) pac_cv_header_stdarg_works="yes" ;; 1) pac_cv_header_stdarg_works="yes with warnings" @@ -5914,18 +9270,19 @@ esac fi - -echo "$ac_t""$pac_cv_header_stdarg_works" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_header_stdarg_works" >&5 +echo "${ECHO_T}$pac_cv_header_stdarg_works" >&6 fi # test on oldstyle if test "$pac_cv_header_stdarg_works" = "no" ; then : else - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define USE_STDARG 1 -EOF +_ACEOF fi -else +else : fi # test on header @@ -5943,356 +9300,3759 @@ CROSS_OFFSET_KIND=${CROSS_OFFSET_KIND:-0} CROSS_ADDRESS_KIND=${CROSS_ADDRESS_KIND:-0} -echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:5948: checking size of char" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_char=$CROSS_SIZEOF_CHAR + +pac_found_header=no +if test "$CPP" != "/lib/cpp" ; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi +rm -f conftest.err conftest.$ac_ext +fi +# If cpp failed, see if the compiler accepts the header. +if test "$pac_found_header" != "yes" ; then + cat >conftest.c< +int conftest() {return 0;} +EOF + ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' + if { (eval echo "$as_me:$LINENO: \"$ac_compile_for_cpp\"") >&5 + (eval $ac_compile_for_cpp) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pac_found_header=yes + else + echo "configure: failed program was:" >&5 + cat conftest.c >&5 + fi + rm -f conftest* +fi +# Finally, set the ac variable. +if test "$pac_found_header" = "yes" ; then + eval "ac_cv_header_$ac_safe=yes" +else + eval "ac_cv_header_$ac_safe=no" +fi + +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +done + + +echo "$as_me:$LINENO: checking for char" >&5 +echo $ECHO_N "checking for char... $ECHO_C" >&6 +if test "${ac_cv_type_char+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((char *) 0) + return 0; +if (sizeof (char)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_char=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_char=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5 +echo "${ECHO_T}$ac_cv_type_char" >&6 + +echo "$as_me:$LINENO: checking size of char" >&5 +echo $ECHO_N "checking size of char... $ECHO_C" >&6 +if test "${ac_cv_sizeof_char+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_char" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_char=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (char)); } +unsigned long ulongval () { return (long) (sizeof (char)); } #include -main() +#include +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(char)); - exit(0); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (char))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (char)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (char)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; } -EOF -if { (eval echo configure:5967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_char=`cat conftestval` +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_char=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* ac_cv_sizeof_char=0 fi -rm -fr conftest* fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 +echo "${ECHO_T}$ac_cv_sizeof_char" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_CHAR $ac_cv_sizeof_char +_ACEOF + + +echo "$as_me:$LINENO: checking for short" >&5 +echo $ECHO_N "checking for short... $ECHO_C" >&6 +if test "${ac_cv_type_short+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((short *) 0) + return 0; +if (sizeof (short)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_short=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_short=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 +echo "${ECHO_T}$ac_cv_type_short" >&6 + +echo "$as_me:$LINENO: checking size of short" >&5 +echo $ECHO_N "checking size of short... $ECHO_C" >&6 +if test "${ac_cv_sizeof_short+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_short" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -echo "$ac_t""$ac_cv_sizeof_char" 1>&6 -cat >> confdefs.h <&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; +test_array [0] = 0 -echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:5987: checking size of short" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_short=$CROSS_SIZEOF_SHORT + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid else - cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_short=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (short)); } +unsigned long ulongval () { return (long) (sizeof (short)); } #include -main() +#include +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short)); - exit(0); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (short))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (short)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (short)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; } -EOF -if { (eval echo configure:6006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_short=`cat conftestval` +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* ac_cv_sizeof_short=0 fi -rm -fr conftest* fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +echo "${ECHO_T}$ac_cv_sizeof_short" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF + +echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6 +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((int *) 0) + return 0; +if (sizeof (int)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_int=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6 + +echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_int" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -echo "$ac_t""$ac_cv_sizeof_short" 1>&6 -cat >> confdefs.h <&5 +sed 's/^/| /' conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; +test_array [0] = 0 -echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:6026: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_int=$CROSS_SIZEOF_INT + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid else - cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (int)); } +unsigned long ulongval () { return (long) (sizeof (int)); } #include -main() +#include +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (int))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (int)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (int)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; } -EOF -if { (eval echo configure:6045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* ac_cv_sizeof_int=0 fi -rm -fr conftest* fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + +echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6 +if test "${ac_cv_type_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((long *) 0) + return 0; +if (sizeof (long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_long=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6 + +echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (long)); } +unsigned long ulongval () { return (long) (sizeof (long)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (long))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_long=0 +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + +echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6 +if test "${ac_cv_type_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((long long *) 0) + return 0; +if (sizeof (long long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_long_long=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6 + +echo "$as_me:$LINENO: checking size of long long" >&5 +echo $ECHO_N "checking size of long long... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_long_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_long=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (long long)); } +unsigned long ulongval () { return (long) (sizeof (long long)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (long long))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (long long)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (long long)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_long_long=0 +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF + + +echo "$as_me:$LINENO: checking for float" >&5 +echo $ECHO_N "checking for float... $ECHO_C" >&6 +if test "${ac_cv_type_float+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((float *) 0) + return 0; +if (sizeof (float)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_float=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_float=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5 +echo "${ECHO_T}$ac_cv_type_float" >&6 + +echo "$as_me:$LINENO: checking size of float" >&5 +echo $ECHO_N "checking size of float... $ECHO_C" >&6 +if test "${ac_cv_sizeof_float+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_float" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_float=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (float), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (float)); } +unsigned long ulongval () { return (long) (sizeof (float)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (float))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (float)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (float)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_float=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (float), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_float=0 +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 +echo "${ECHO_T}$ac_cv_sizeof_float" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_FLOAT $ac_cv_sizeof_float +_ACEOF + + +echo "$as_me:$LINENO: checking for double" >&5 +echo $ECHO_N "checking for double... $ECHO_C" >&6 +if test "${ac_cv_type_double+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((double *) 0) + return 0; +if (sizeof (double)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_double=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_double=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5 +echo "${ECHO_T}$ac_cv_type_double" >&6 + +echo "$as_me:$LINENO: checking size of double" >&5 +echo $ECHO_N "checking size of double... $ECHO_C" >&6 +if test "${ac_cv_sizeof_double+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_double" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo= ac_hi= fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:6065: checking size of long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_double=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (double), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - ac_cv_sizeof_long=$CROSS_SIZEOF_LONG -else - cat > conftest.$ac_ext <&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (double)); } +unsigned long ulongval () { return (long) (sizeof (double)); } #include -main() +#include +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (double))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (double)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (double)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; } -EOF -if { (eval echo configure:6084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_double=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (double), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -rm -fr conftest* +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_double" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_DOUBLE $ac_cv_sizeof_double +_ACEOF -echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:6104: checking size of long long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else +echo "$as_me:$LINENO: checking for long double" >&5 +echo $ECHO_N "checking for long double... $ECHO_C" >&6 +if test "${ac_cv_type_long_double+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((long double *) 0) + return 0; +if (sizeof (long double)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long_double=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_long_double=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5 +echo "${ECHO_T}$ac_cv_type_long_double" >&6 + +echo "$as_me:$LINENO: checking size of long double" >&5 +echo $ECHO_N "checking size of long double... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long_double+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_long_double" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then - ac_cv_sizeof_long_long=$CROSS_SIZEOF_LONG_LONG -else - cat > conftest.$ac_ext < -main() + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long long)); - exit(0); +static int test_array [1 - 2 * !(((long) (sizeof (long double))) >= 0)]; +test_array [0] = 0 + + ; + return 0; } -EOF -if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long_long=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_long=0 -fi -rm -fr conftest* -fi +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long double))) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 -cat >> confdefs.h <&5 +sed 's/^/| /' conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long double))) < 0)]; +test_array [0] = 0 -echo $ac_n "checking size of float""... $ac_c" 1>&6 -echo "configure:6143: checking size of float" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_float=$CROSS_SIZEOF_FLOAT -else - cat > conftest.$ac_ext < -main() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(float)); - exit(0); +static int test_array [1 - 2 * !(((long) (sizeof (long double))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; } -EOF -if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_float=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_float=0 -fi -rm -fr conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo= ac_hi= fi -echo "$ac_t""$ac_cv_sizeof_float" 1>&6 -cat >> confdefs.h <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long double))) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo $ac_n "checking size of double""... $ac_c" 1>&6 -echo "configure:6182: checking size of double" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_double=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long double), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - ac_cv_sizeof_double=$CROSS_SIZEOF_DOUBLE -else - cat > conftest.$ac_ext <&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (long double)); } +unsigned long ulongval () { return (long) (sizeof (long double)); } #include -main() +#include +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(double)); - exit(0); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (long double))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (long double)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (long double)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; } -EOF -if { (eval echo configure:6201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_double=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_double=0 +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_double=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long double), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long double), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -rm -fr conftest* +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -echo "$ac_t""$ac_cv_sizeof_double" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +_ACEOF -echo $ac_n "checking size of long double""... $ac_c" 1>&6 -echo "configure:6221: checking size of long double" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else +# sizeof(void*) is needed for ADDRESS_KIND below +echo "$as_me:$LINENO: checking for void*" >&5 +echo $ECHO_N "checking for void*... $ECHO_C" >&6 +if test "${ac_cv_type_voidp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((void* *) 0) + return 0; +if (sizeof (void*)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_voidp=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_voidp=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_voidp" >&5 +echo "${ECHO_T}$ac_cv_type_voidp" >&6 + +echo "$as_me:$LINENO: checking size of void*" >&5 +echo $ECHO_N "checking size of void*... $ECHO_C" >&6 +if test "${ac_cv_sizeof_voidp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_voidp" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then - ac_cv_sizeof_long_double=$CROSS_SIZEOF_LONG_DOUBLE -else - cat > conftest.$ac_ext < -main() + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long double)); - exit(0); +static int test_array [1 - 2 * !(((long) (sizeof (void*))) >= 0)]; +test_array [0] = 0 + + ; + return 0; } -EOF -if { (eval echo configure:6240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long_double=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_double=0 +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void*))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -fr conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void*))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void*))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo= ac_hi= fi -echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6 -cat >> confdefs.h <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void*))) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# sizeof(void*) is needed for ADDRESS_KIND below -echo $ac_n "checking size of void*""... $ac_c" 1>&6 -echo "configure:6261: checking size of void*" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_voidp=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void*), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (void*), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - ac_cv_sizeof_voidp=$CROSS_SIZEOF_VOID_P -else - cat > conftest.$ac_ext <&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (void*)); } +unsigned long ulongval () { return (long) (sizeof (void*)); } #include -main() +#include +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(void*)); - exit(0); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (void*))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (void*)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (void*)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; } -EOF -if { (eval echo configure:6280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_voidp=`cat conftestval` +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_voidp=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void*), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (void*), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* ac_cv_sizeof_voidp=0 fi -rm -fr conftest* -fi - fi -echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_voidp" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_VOIDP $ac_cv_sizeof_voidp -EOF +_ACEOF @@ -6319,19 +13079,21 @@ eval testval=\$"has_integer_$len" if test "$testval" = 0 ; then continue ; fi noval="yes" - echo $ac_n "checking for C type matching Fortran integer*$len""... $ac_c" 1>&6 -echo "configure:6324: checking for C type matching Fortran integer*$len" >&5 + echo "$as_me:$LINENO: checking for C type matching Fortran integer*$len" >&5 +echo $ECHO_N "checking for C type matching Fortran integer*$len... $ECHO_C" >&6 for c_type in char short int long "long_long" ; do eval ctypelen=\$"ac_cv_sizeof_$c_type" if test "$testval" = "$ctypelen" -a "$ctypelen" -gt 0 ; then - echo "$ac_t""$c_type" 1>&6 + echo "$as_me:$LINENO: result: $c_type" >&5 +echo "${ECHO_T}$c_type" >&6 eval F77_INT$len=\$"${c_type}_mpi" noval="no" break fi done if test "$noval" = "yes" ; then - echo "$ac_t""unavailable" 1>&6 + echo "$as_me:$LINENO: result: unavailable" >&5 +echo "${ECHO_T}unavailable" >&6 fi done @@ -6343,12 +13105,13 @@ eval testval=\$"has_real_$len" if test "$testval" = 0 ; then continue ; fi noval="yes" - echo $ac_n "checking for C type matching Fortran real*$len""... $ac_c" 1>&6 -echo "configure:6348: checking for C type matching Fortran real*$len" >&5 + echo "$as_me:$LINENO: checking for C type matching Fortran real*$len" >&5 +echo $ECHO_N "checking for C type matching Fortran real*$len... $ECHO_C" >&6 for c_type in float double "long_double" ; do eval ctypelen=\$"ac_cv_sizeof_$c_type" if test "$testval" = "$ctypelen" -a "$ctypelen" -gt 0 ; then - echo "$ac_t""$c_type" 1>&6 + echo "$as_me:$LINENO: result: $c_type" >&5 +echo "${ECHO_T}$c_type" >&6 eval F77_REAL$len=\$"${c_type}_mpi" eval F77_COMPLEX$len2=\$"${c_type}_cplx_mpi" noval="no" @@ -6356,7 +13119,8 @@ fi done if test "$noval" = "yes" ; then - echo "$ac_t""unavailable" 1>&6 + echo "$as_me:$LINENO: result: unavailable" >&5 +echo "${ECHO_T}unavailable" >&6 fi done @@ -6372,14 +13136,15 @@ noval="yes" -echo $ac_n "checking for C type matching Fortran integer""... $ac_c" 1>&6 -echo "configure:6377: checking for C type matching Fortran integer" >&5 +echo "$as_me:$LINENO: checking for C type matching Fortran integer" >&5 +echo $ECHO_N "checking for C type matching Fortran integer... $ECHO_C" >&6 for c_type in char short int long "long_long" ; do eval ctypelen=\$"ac_cv_sizeof_$c_type" if test "$pac_cv_f77_sizeof_integer" = "$ctypelen" -a \ "$ctypelen" -gt 0 ; then c_type=`echo $c_type | sed -e 's/_/ /g'` - echo "$ac_t""$c_type" 1>&6 + echo "$as_me:$LINENO: result: $c_type" >&5 +echo "${ECHO_T}$c_type" >&6 MPI_FINT_TYPE=$c_type noval="no" break @@ -6388,33 +13153,39 @@ if test "$noval" = "yes" ; then # Set a default MPI_FINT_TYPE="int" - echo "$ac_t""unavailable" 1>&6 - cat >> confdefs.h <<\EOF -#define FINT_TYPE_UNKNOWN -EOF + echo "$as_me:$LINENO: result: unavailable" >&5 +echo "${ECHO_T}unavailable" >&6 + +cat >>confdefs.h <<\_ACEOF +#define FINT_TYPE_UNKNOWN +_ACEOF fi if test "$MPI_FINT_TYPE" = "int" ; then - cat >> confdefs.h <<\EOF -#define FINT_IS_INT 1 -EOF + +cat >>confdefs.h <<\_ACEOF +#define FINT_IS_INT +_ACEOF fi -echo $ac_n "checking whether C compiler allows unaligned doubles""... $ac_c" 1>&6 -echo "configure:6408: checking whether C compiler allows unaligned doubles" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_c_unaligned_doubles'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking whether C compiler allows unaligned doubles" >&5 +echo $ECHO_N "checking whether C compiler allows unaligned doubles... $ECHO_C" >&6 +if test "${pac_cv_prog_c_unaligned_doubles+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then pac_cv_prog_c_unaligned_doubles="unknown" else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ void fetch_double( v ) double *v; @@ -6436,69 +13207,110 @@ return 0; } -EOF -if { (eval echo configure:6441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_prog_c_unaligned_doubles="yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - pac_cv_prog_c_unaligned_doubles="no" -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$pac_cv_prog_c_unaligned_doubles" 1>&6 - -if test "X$pac_cv_prog_c_unaligned_doubles" = "no" ; then -echo "configure: warning: Your C compiler $CC does not support unaligned accesses -to doubles. This is required for interoperation with -Fortran (the Fortran standard requires it)." 1>&2 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +pac_cv_prog_c_unaligned_doubles="no" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $pac_cv_prog_c_unaligned_doubles" >&5 +echo "${ECHO_T}$pac_cv_prog_c_unaligned_doubles" >&6 + +if test "X$pac_cv_prog_c_unaligned_doubles" = "no" ; then +{ echo "$as_me:$LINENO: WARNING: Your C compiler $CC does not support unaligned accesses +to doubles. This is required for interoperation with +Fortran (the Fortran standard requires it)." >&5 +echo "$as_me: WARNING: Your C compiler $CC does not support unaligned accesses +to doubles. This is required for interoperation with +Fortran (the Fortran standard requires it)." >&2;} fi if test "$enable_weak" = "yes" ; then - + pragma_extra_message="" -echo $ac_n "checking for type of weak symbol support""... $ac_c" 1>&6 -echo "configure:6469: checking for type of weak symbol support" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_c_weak_symbols'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for type of weak symbol support" >&5 +echo $ECHO_N "checking for type of weak symbol support... $ECHO_C" >&6 +if test "${pac_cv_prog_c_weak_symbols+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + # Test for weak symbol support... # We can't put # in the message because it causes autoconf to generate # incorrect code -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ extern int PFoo(int); #pragma weak PFoo = Foo int Foo(int a) { return a; } -int main() { +int +main () +{ return PFoo(1); -; return 0; } -EOF -if { (eval echo configure:6489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then has_pragma_weak=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext # # Some systems (Linux ia64 and ecc, for example), support weak symbols # only within a single object file! This tests that case. # Note that there is an extern int PFoo declaration before the # pragma. Some compilers require this in order to make the weak symbol -# extenally visible. +# extenally visible. if test "$has_pragma_weak" = yes ; then rm -f conftest* cat >>conftest1.c <>conftest1.c <>conftest2.c <> config.log + echo "Failed program was" >> config.log + cat conftest1.c >>config.log + cat conftest2.c >>config.log + if test -s conftest.out ; then cat conftest.out >> config.log ; fi + has_pragma_weak=0 + pragma_extra_message="pragma weak accepted but does not work (probably creates two non-weak entries)" + fi else echo "$ac_link2" >>config.log echo "Failed program was" >>config.log @@ -6526,49 +13365,105 @@ fi rm -f conftest* fi -if test -z "$pac_cv_prog_c_weak_symbols" ; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ extern int PFoo(int); #pragma _HP_SECONDARY_DEF Foo PFoo int Foo(int a) { return a; } -int main() { +int +main () +{ return PFoo(1); -; return 0; } -EOF -if { (eval echo configure:6543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_prog_c_weak_symbols="pragma _HP_SECONDARY_DEF" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi if test -z "$pac_cv_prog_c_weak_symbols" ; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ extern int PFoo(int); #pragma _CRI duplicate PFoo as Foo int Foo(int a) { return a; } -int main() { +int +main () +{ return PFoo(1); -; return 0; } -EOF -if { (eval echo configure:6565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_prog_c_weak_symbols="pragma _CRI duplicate x as y" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi if test -z "$pac_cv_prog_c_weak_symbols" ; then pac_cv_prog_c_weak_symbols="no" @@ -6578,73 +13473,103 @@ fi fi - -echo "$ac_t""$pac_cv_prog_c_weak_symbols" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_prog_c_weak_symbols" >&5 +echo "${ECHO_T}$pac_cv_prog_c_weak_symbols" >&6 if test "$pac_cv_prog_c_weak_symbols" = "no" ; then : else case "$pac_cv_prog_c_weak_symbols" in - "pragma weak") cat >> confdefs.h <<\EOF + "pragma weak") +cat >>confdefs.h <<\_ACEOF #define HAVE_PRAGMA_WEAK 1 -EOF - +_ACEOF + ;; - "pragma _HP") cat >> confdefs.h <<\EOF + "pragma _HP") +cat >>confdefs.h <<\_ACEOF #define HAVE_PRAGMA_HP_SEC_DEF 1 -EOF +_ACEOF ;; - "pragma _CRI") cat >> confdefs.h <<\EOF + "pragma _CRI") +cat >>confdefs.h <<\_ACEOF #define HAVE_PRAGMA_CRI_DUP 1 -EOF +_ACEOF ;; esac - cat >> confdefs.h <<\EOF -#define HAVE_WEAK_SYMBOLS 1 -EOF -fi -echo $ac_n "checking whether __attribute__ ((weak)) allowed""... $ac_c" 1>&6 -echo "configure:6610: checking whether __attribute__ ((weak)) allowed" >&5 -if eval "test \"`echo '$''{'pac_cv_attr_weak'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -cat > conftest.$ac_ext <>confdefs.h <<\_ACEOF +#define HAVE_WEAK_SYMBOLS +_ACEOF + +fi +echo "$as_me:$LINENO: checking whether __attribute__ ((weak)) allowed" >&5 +echo $ECHO_N "checking whether __attribute__ ((weak)) allowed... $ECHO_C" >&6 +if test "${pac_cv_attr_weak+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int foo(int) __attribute__ ((weak)); -int main() { +int +main () +{ int a; -; return 0; } -EOF -if { (eval echo configure:6623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then pac_cv_attr_weak=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - pac_cv_attr_weak=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +pac_cv_attr_weak=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$pac_cv_attr_weak" 1>&6 +echo "$as_me:$LINENO: result: $pac_cv_attr_weak" >&5 +echo "${ECHO_T}$pac_cv_attr_weak" >&6 fi # # Try to get values for Fortran logical variables. if test "$cross_compiling" = "no" ; then - echo $ac_n "checking for values of Fortran logicals""... $ac_c" 1>&6 -echo "configure:6643: checking for values of Fortran logicals" >&5 - if eval "test \"`echo '$''{'pac_cv_prog_f77_true_false_value'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for values of Fortran logicals" >&5 +echo $ECHO_N "checking for values of Fortran logicals... $ECHO_C" >&6 + if test "${pac_cv_prog_f77_true_false_value+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - + + rm -f conftest* cat < conftest.f @@ -6659,24 +13584,31 @@ if test "X$ac_fcompile" = "X" ; then ac_fcompile='${F77-f77} -c $FFLAGS conftest.f 1>&5' fi -if { (eval echo configure:6663: \"$ac_fcompile\") 1>&5; (eval $ac_fcompile) 2>&5; } && test -s conftest.o ; then +if { (eval echo "$as_me:$LINENO: \"$ac_fcompile\"") >&5 + (eval $ac_fcompile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest.o ; then mv conftest.o conftestf.o - + + ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu save_LIBS="$LIBS" LIBS="conftestf.o $FLIBS $LIBS" if test "$cross_compiling" = yes; then - : + : else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #ifdef F77_NAME_UPPER #define ftest_ FTEST @@ -6696,28 +13628,37 @@ } -EOF -if { (eval echo configure:6701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + pac_cv_prog_f77_true_false_value=`cat conftestval` else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -fr conftest* +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - LIBS="$save_LIBS" ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -else +else echo "configure: failed program was:" >&5 cat conftest.f >&5 fi @@ -6728,21 +13669,24 @@ true_val="`echo $pac_cv_prog_f77_true_false_value | sed -e 's/ .*//g'`" false_val="`echo $pac_cv_prog_f77_true_false_value | sed -e 's/.* *//g'`" if test -n "$true_val" -a -n "$false_val" ; then - cat >> confdefs.h <<\EOF -#define F77_TRUE_VALUE_SET 1 -EOF - cat >> confdefs.h <>confdefs.h <<\_ACEOF +#define F77_TRUE_VALUE_SET +_ACEOF + + cat >>confdefs.h <<_ACEOF #define F77_TRUE_VALUE $true_val -EOF +_ACEOF - cat >> confdefs.h <>confdefs.h <<_ACEOF #define F77_FALSE_VALUE $false_val -EOF +_ACEOF - echo "$ac_t""True is $true_val and False is $false_val" 1>&6 + echo "$as_me:$LINENO: result: True is $true_val and False is $false_val" >&5 +echo "${ECHO_T}True is $true_val and False is $false_val" >&6 else - echo "$ac_t""could not determine" 1>&6 + echo "$as_me:$LINENO: result: could not determine" >&5 +echo "${ECHO_T}could not determine" >&6 fi fi @@ -6764,45 +13708,65 @@ if test "$pac_lib_mpi_is_building" = "yes" ; then ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu FARGOBJ="farg.o" - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define HAS_MPIR_ERR_SETMSG 1 -EOF +_ACEOF else # Test for mpir_iargc; if not found, add farg.f.in - echo $ac_n "checking for mpir_iargc provided for command line in Fortran""... $ac_c" 1>&6 -echo "configure:6782: checking for mpir_iargc provided for command line in Fortran" >&5 + echo "$as_me:$LINENO: checking for mpir_iargc provided for command line in Fortran" >&5 +echo $ECHO_N "checking for mpir_iargc provided for command line in Fortran... $ECHO_C" >&6 ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF program main - mpir_iargc() +mpir_iargc() end -EOF -if { (eval echo configure:6794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then found="yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - found="no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +found="no" fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$found" = "no" ; then - echo "$ac_t""no" 1>&6 - + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + if test "X$pac_save_level" = "X" ; then pac_save_CC="$CC" pac_save_CXX="$CXX" @@ -6813,127 +13777,238 @@ pac_save_prog_cxx_cross="$ac_cv_prog_cxx_cross" pac_save_prog_f90_cross="$pac_cv_prog_f90_cross" if test "X$CPP" = "X" ; then - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:6818: checking how to run the C preprocessor" >&5 + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # 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 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # 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:6839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - : + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi 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:6856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then + ac_cpp_err=yes +fi +if test -z "$ac_cpp_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" - echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:6867: 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 -else - ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -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:6885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - : + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CXXCPP=/lib/cpp + ac_cpp_err=yes fi -rm -f conftest* - ac_cv_prog_CXXCPP="$CXXCPP" -ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break fi -CXXCPP="$ac_cv_prog_CXXCPP" -echo "$ac_t""$CXXCPP" 1>&6 -s%@CXXCPP@%$CXXCPP%g -cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - : + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp + ac_cv_prog_CPP=$CPP fi -rm -f conftest* +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -rm -f conftest* +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break fi - CPP="$ac_cv_prog_CPP" +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : else - ac_cv_prog_CPP="$CPP" + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -echo "$ac_t""$CPP" 1>&6 + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu fi pac_save_CPP="$CPP" @@ -6942,12 +14017,12 @@ F77="${TESTF77:=$F77}" F90="${TESTF90:=$F90}" if test -z "$TESTCPP" ; then - + if test -z "$TESTCPP"; then - if eval "test \"`echo '$''{'pac_cv_prog_TESTCPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${pac_cv_prog_TESTCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + rm -f conftest.* cat > conftest.c < @@ -6957,62 +14032,78 @@ # not just through cpp. TESTCPP="${TESTCC-cc} -E" ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" - if { (eval echo configure:6961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then + if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then pac_cv_prog_TESTCPP="$TESTCPP" fi if test "X$pac_cv_prog_TESTCPP" = "X" ; then TESTCPP="${TESTCC-cc} -E -traditional-cpp" ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" - if { (eval echo configure:6967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then + if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then pac_cv_prog_TESTCPP="$TESTCPP" fi fi if test "X$pac_cv_prog_TESTCPP" = "X" ; then TESTCPP="${TESTCC-cc} -nologo -E" ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" - if { (eval echo configure:6974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then + if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then pac_cv_prog_TESTCPP="$TESTCPP" fi fi if test "X$pac_cv_prog_TESTCPP" = "X" ; then # Extract the first word of "cpp", so it can be a program name with args. set dummy cpp; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6982: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_TESTCPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_TESTCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$TESTCPP" in - /*) + case $TESTCPP in + [\\/]* | ?:[\\/]*) ac_cv_path_TESTCPP="$TESTCPP" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_TESTCPP="$TESTCPP" # Let the user override the test with a dos path. - ;; *) - 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_path_TESTCPP="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_TESTCPP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -TESTCPP="$ac_cv_path_TESTCPP" +TESTCPP=$ac_cv_path_TESTCPP + if test -n "$TESTCPP"; then - echo "$ac_t""$TESTCPP" 1>&6 + echo "$as_me:$LINENO: result: $TESTCPP" >&5 +echo "${ECHO_T}$TESTCPP" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi rm -f conftest.* - + fi else @@ -7024,26 +14115,30 @@ pac_save_level="0" # Recompute cross_compiling values and set for the current language # This is just: - + + ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$pac_cross_compiling" = "yes" ; then ac_cv_prog_cc_cross=yes ac_cv_prog_cc_works=yes else - cat > conftest.$ac_ext << EOF + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -7059,29 +14154,34 @@ rm -fr conftest* fi ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu # Ignore Fortran if we aren't using it. if test -n "$F77" ; then - + + ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test "$pac_cross_compiling" = "yes" ; then ac_cv_prog_f77_cross=yes ac_cv_prog_f77_works=yes else - cat > conftest.$ac_ext << EOF + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then ac_cv_prog_f77_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -7097,29 +14197,33 @@ rm -fr conftest* fi ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu fi # Ignore C++ if we aren't using it. if test -n "$CXX" ; then - - ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + + + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat > conftest.$ac_ext << EOF + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -7134,19 +14238,19 @@ fi rm -fr conftest* ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu fi # Ignore Fortran 90 if we aren't using it. if test -n "$F90" ; then - - -ac_ext=$pac_cv_f90_ext -ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&5' -ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$pac_cv_prog_f90_cross + + + ac_ext=${ac_f90ext-f} +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu if test "$pac_cross_compiling" = "yes" ; then ac_cv_prog_f90_cross=yes @@ -7174,34 +14278,35 @@ pac_cv_prog_f90_works="$ac_cv_prog_f90_works" rm -fr conftest* ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu fi fi pac_save_level=`expr $pac_save_level + 1` - + found_cached="yes" -echo $ac_n "checking for routines to access the command line from Fortran 77""... $ac_c" 1>&6 -echo "configure:7189: checking for routines to access the command line from Fortran 77" >&5 -if eval "test \"`echo '$''{'pac_cv_prog_f77_cmdarg'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for routines to access the command line from Fortran 77" >&5 +echo $ECHO_N "checking for routines to access the command line from Fortran 77... $ECHO_C" >&6 +if test "${pac_cv_prog_f77_cmdarg+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - echo "$ac_t""searching..." 1>&6 + + echo "$as_me:$LINENO: result: searching..." >&5 +echo "${ECHO_T}searching..." >&6 found_cached="no" # First, we perform a quick check. Does iargc and getarg work? fxx_module="${FXX_MODULE:-}" f77_getargdecl="${F77_GETARGDECL:-external getarg}" f77_getarg="${F77_GETARG:-call GETARG(i,s)}" f77_iargc="${F77_IARGC:-IARGC()}" - # + # # Grumble. The Absoft Fortran compiler computes i - i as 0 and then # 1.0 / 0 at compile time, even though the code may never be executed. # What we need is a way to generate an error, so the second usage of i - # was replaced with f77_iargc. + # was replaced with f77_iargc. cat > conftest.f <&6 -echo "configure:7226: checking whether ${F77-f77} $flags $libs works with GETARG and IARGC" >&5 - if { (eval echo configure:7227: \"$ac_fcompilelink\") 1>&5; (eval $ac_fcompilelink) 2>&5; } && test -x conftest ; then + echo "$as_me:$LINENO: checking whether ${F77-f77} $flags $libs works with GETARG and IARGC" >&5 +echo $ECHO_N "checking whether ${F77-f77} $flags $libs works with GETARG and IARGC... $ECHO_C" >&6 + if { (eval echo "$as_me:$LINENO: \"$ac_fcompilelink\"") >&5 + (eval $ac_fcompilelink) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then # Check that cross != yes so that this works with autoconf 2.52 if test "$ac_cv_prog_f77_cross" != "yes" ; then if ./conftest >/dev/null 2>&1 ; then @@ -7232,18 +14341,20 @@ F77_GETARGDECL="$f77_getargdecl" F77_GETARG="$f77_getarg" F77_IARGC="$f77_iargc" - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi fi - fi + fi if test $found_answer = "no" ; then - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 # Grumph. Here are a bunch of different approaches # We have several axes the check: # Library to link with (none, -lU77 (HPUX), -lg2c (LINUX f77)) # PEPCF90 (Intel ifc) # The first line is a dummy - # (we experimented with using a , but this caused other + # (we experimented with using a , but this caused other # problems because we need in the IFS) trial_LIBS="0 -lU77 -lPEPCF90" if test "$NOG2C" != "1" ; then @@ -7253,7 +14364,7 @@ save_IFS="$IFS" # Make sure that IFS includes a space, or the tests that run programs # may fail - IFS=" + IFS=" " save_trial_LIBS="$trial_LIBS" trial_LIBS="" @@ -7266,13 +14377,19 @@ if test "$libs" = "0" ; then lib_ok="yes" else - echo $ac_n "checking whether Fortran 77 links with $libs""... $ac_c" 1>&6 -echo "configure:7271: checking whether Fortran 77 links with $libs" >&5 - if { (eval echo configure:7272: \"$ac_fcompilelink_test\") 1>&5; (eval $ac_fcompilelink_test) 2>&5; } && test -x conftest ; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: checking whether Fortran 77 links with $libs" >&5 +echo $ECHO_N "checking whether Fortran 77 links with $libs... $ECHO_C" >&6 + if { (eval echo "$as_me:$LINENO: \"$ac_fcompilelink_test\"") >&5 + (eval $ac_fcompilelink_test) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 lib_ok="yes" else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 lib_ok="no" fi fi @@ -7287,7 +14404,7 @@ # The -N109 was used for getarg before we realized that GETARG # was necessary with the (non standard conforming) Absoft compiler # (Fortran is monocase; Absoft uses mixedcase by default) - # The -f is used by Absoft and is the compiler switch that folds + # The -f is used by Absoft and is the compiler switch that folds # symbolic names to lower case. Without this option, the compiler # considers upper- and lower-case letters to be unique. # The -YEXT_NAMES=LCS will cause external names to be output as lower @@ -7295,14 +14412,14 @@ # The first line is ", the space is important # To make the Absoft f77 and f90 work together, we need to prefer the # upper case versions of the arguments. They also require libU77. - # -YCFRL=1 causes Absoft f90 to work with g77 and similar (f2c-based) + # -YCFRL=1 causes Absoft f90 to work with g77 and similar (f2c-based) # Fortran compilers # # Problem: The Intel efc compiler hangs when presented with -N109 . # The only real fix for this is to detect this compiler and exclude # the test. We may want to reorganize these tests so that if we # can compile code without special options, we never look for them. - # + # using_intel_efc="no" pac_test_msg=`$F77 -V 2>&1 | grep 'Intel(R) Fortran Itanium'` if test "$pac_test_msg" != "" ; then @@ -7321,7 +14438,7 @@ fi # Discard options that are not available: # (IFS already saved above) - IFS=" + IFS=" " save_trial_FLAGS="$trial_FLAGS" trial_FLAGS="" @@ -7329,9 +14446,9 @@ if test "$flag" = " " -o "$flag" = "000" ; then opt_ok="yes" else - -echo $ac_n "checking whether Fortran 77 compiler accepts option $flag""... $ac_c" 1>&6 -echo "configure:7335: checking whether Fortran 77 compiler accepts option $flag" >&5 + +echo "$as_me:$LINENO: checking whether Fortran 77 compiler accepts option $flag" >&5 +echo $ECHO_N "checking whether Fortran 77 compiler accepts option $flag... $ECHO_C" >&6 ac_result="no" save_FFLAGS="$FFLAGS" FFLAGS="$flag $FFLAGS" @@ -7346,21 +14463,38 @@ EOF ac_fscompilelink='${F77-f77} $save_FFLAGS -o conftest conftest.f $LDFLAGS >conftest.bas 2>&1' ac_fscompilelink2='${F77-f77} $FFLAGS -o conftest conftest.f $LDFLAGS >conftest.out 2>&1' -if { (eval echo configure:7350: \"$ac_fscompilelink\") 1>&5; (eval $ac_fscompilelink) 2>&5; } && test -x conftest ; then - if { (eval echo configure:7351: \"$ac_fscompilelink2\") 1>&5; (eval $ac_fscompilelink2) 2>&5; } && test -x conftest ; then +if { (eval echo "$as_me:$LINENO: \"$ac_fscompilelink\"") >&5 + (eval $ac_fscompilelink) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then + if { (eval echo "$as_me:$LINENO: \"$ac_fscompilelink2\"") >&5 + (eval $ac_fscompilelink2) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then if diff -b conftest.out conftest.bas >/dev/null 2>&1 ; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking whether routines compiled with $flag can be linked with ones compiled without $flag""... $ac_c" 1>&6 -echo "configure:7355: checking whether routines compiled with $flag can be linked with ones compiled without $flag" >&5 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + echo "$as_me:$LINENO: checking whether routines compiled with $flag can be linked with ones compiled without $flag" >&5 +echo $ECHO_N "checking whether routines compiled with $flag can be linked with ones compiled without $flag... $ECHO_C" >&6 rm -f conftest2.out rm -f conftest.bas ac_fscompile3='${F77-f77} -c $save_FFLAGS conftest2.f >conftest2.out 2>&1' ac_fscompilelink4='${F77-f77} $FFLAGS -o conftest conftest2.o conftest.f $LDFLAGS >conftest.bas 2>&1' - if { (eval echo configure:7360: \"$ac_fscompile3\") 1>&5; (eval $ac_fscompile3) 2>&5; } && test -s conftest2.o ; then - if { (eval echo configure:7361: \"$ac_fscompilelink4\") 1>&5; (eval $ac_fscompilelink4) 2>&5; } && test -x conftest ; then + if { (eval echo "$as_me:$LINENO: \"$ac_fscompile3\"") >&5 + (eval $ac_fscompile3) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest2.o ; then + if { (eval echo "$as_me:$LINENO: \"$ac_fscompilelink4\"") >&5 + (eval $ac_fscompilelink4) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then if diff -b conftest.out conftest.bas >/dev/null 2>&1 ; then ac_result="yes" - else + else echo "configure: Compiler output differed in two cases" >&5 diff -b conftest.out conftest.bas >&5 fi @@ -7392,10 +14526,12 @@ cat conftest.bas >&5 fi if test "$ac_result" = "yes" ; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 opt_ok=yes else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 opt_ok=no fi FFLAGS="$save_FFLAGS" @@ -7403,10 +14539,10 @@ fi if test "$opt_ok" = "yes" ; then - if test "$flag" = " " -o "$flag" = "000" ; then - fflag="" - else - fflag="$flag" + if test "$flag" = " " -o "$flag" = "000" ; then + fflag="" + else + fflag="$flag" fi # discard options that don't allow mixed-case name matching cat > conftest.f <&6 -echo "configure:7422: checking whether Fortran 77 routine names are case-insensitive $flagval" >&5 + echo "$as_me:$LINENO: checking whether Fortran 77 routine names are case-insensitive $flagval" >&5 +echo $ECHO_N "checking whether Fortran 77 routine names are case-insensitive $flagval... $ECHO_C" >&6 ac_fcompilelink_test="${F77-f77} -o conftest $fflag $FFLAGS conftest.f $LDFLAGS $LIBS 1>&5" - if { (eval echo configure:7424: \"$ac_fcompilelink_test\") 1>&5; (eval $ac_fcompilelink_test) 2>&5; } && test -x conftest ; then - echo "$ac_t""yes" 1>&6 + if { (eval echo "$as_me:$LINENO: \"$ac_fcompilelink_test\"") >&5 + (eval $ac_fcompilelink_test) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 opt_ok="no" fi fi @@ -7436,15 +14578,15 @@ # Name of routines. Since these are in groups, we use a case statement # and loop until the end (accomplished by reaching the end of the # case statement - # For one version of Nag F90, the names are + # For one version of Nag F90, the names are # call f90_unix_MP_getarg(i,s) and f90_unix_MP_iargc(). trial=0 while test -z "$pac_cv_prog_f77_cmdarg" ; do - case $trial in + case $trial in 0) # User-specified values, if any - if test -z "$F77_GETARG" -o -z "$F77_IARGC" ; then + if test -z "$F77_GETARG" -o -z "$F77_IARGC" ; then trial=`expr $trial + 1` - continue + continue fi MSG="Using environment values of F77_GETARG etc." ;; @@ -7492,6 +14634,13 @@ continue fi ;; + 7) # gfortran won't find getarg if it is marked as external + FXX_MODULE="" + F77_GETARGDECL="intrinsic GETARG" + F77_GETARG="call GETARG(i,s)" + F77_IARGC="IARGC()" + MSG="intrinsic GETARG and IARGC" + ;; *) # exit from while loop FXX_MODULE="" F77_GETARGDECL="" @@ -7519,48 +14668,54 @@ end EOF # - # Now, try to find some way to compile and link that program, looping + # Now, try to find some way to compile and link that program, looping # over the possibilities of options and libraries save_IFS="$IFS" - IFS=" + IFS=" " for libs in $trial_LIBS ; do if test -n "$pac_cv_prog_f77_cmdarg" ; then break ; fi if test "$libs" = " " -o "$libs" = "0" ; then libs="" ; fi for flags in $trial_FLAGS ; do if test "$flags" = " " -o "$flags" = "000"; then flags="" ; fi - echo $ac_n "checking whether ${F77-f77} $flags $libs works with $MSG""... $ac_c" 1>&6 -echo "configure:7534: checking whether ${F77-f77} $flags $libs works with $MSG" >&5 + echo "$as_me:$LINENO: checking whether ${F77-f77} $flags $libs works with $MSG" >&5 +echo $ECHO_N "checking whether ${F77-f77} $flags $libs works with $MSG... $ECHO_C" >&6 IFS="$save_IFS" ac_fcompilelink_test="${F77-f77} -o conftest $FFLAGS $flags conftest.f $LDFLAGS $libs $LIBS 1>&5" found_answer="no" - if { (eval echo configure:7538: \"$ac_fcompilelink_test\") 1>&5; (eval $ac_fcompilelink_test) 2>&5; } && test -x conftest ; then + if { (eval echo "$as_me:$LINENO: \"$ac_fcompilelink_test\"") >&5 + (eval $ac_fcompilelink_test) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -x conftest ; then if test "$ac_cv_prog_f77_cross" != "yes" ; then if ./conftest >/dev/null 2>&1 ; then found_answer="yes" fi - else + else found_answer="yes" fi fi - IFS=" + IFS=" " if test "$found_answer" = "yes" ; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 pac_cv_prog_f77_cmdarg="$MSG" pac_cv_prog_f77_cmdarg_fflags="$flags" pac_cv_prog_f77_cmdarg_ldflags="$libs" break else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 echo "configure: failed program was:" >&5 cat conftest.f >&5 fi done done - IFS="$save_IFS" + IFS="$save_IFS" rm -f conftest.* - trial=`expr $trial + 1` + trial=`expr $trial + 1` done fi pac_cv_F77_GETARGDECL="$F77_GETARGDECL" @@ -7570,10 +14725,12 @@ fi -if test "$found_cached" = "yes" ; then - echo "$ac_t""$pac_cv_prog_f77_cmdarg" 1>&6 +if test "$found_cached" = "yes" ; then + echo "$as_me:$LINENO: result: $pac_cv_prog_f77_cmdarg" >&5 +echo "${ECHO_T}$pac_cv_prog_f77_cmdarg" >&6 elif test -z "$pac_cv_F77_IARGC" ; then - echo "configure: warning: Could not find a way to access the command line from Fortran 77" 1>&2 + { echo "$as_me:$LINENO: WARNING: Could not find a way to access the command line from Fortran 77" >&5 +echo "$as_me: WARNING: Could not find a way to access the command line from Fortran 77" >&2;} fi # Set the variable values based on pac_cv_prog_xxx F77_GETARGDECL="$pac_cv_F77_GETARGDECL" @@ -7589,7 +14746,7 @@ - + pac_save_level=`expr $pac_save_level - 1` if test "X$pac_save_level" = "X0" ; then CC="$pac_save_CC" @@ -7606,64 +14763,106 @@ FARGOBJ="farg.o" else - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 FARGOBJ="" fi # Test for MPICH error handling routine ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - - echo $ac_n "checking for MPIR_Err_setmsg""... $ac_c" 1>&6 -echo "configure:7622: checking for MPIR_Err_setmsg" >&5 -if eval "test \"`echo '$''{'ac_cv_func_MPIR_Err_setmsg'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for MPIR_Err_setmsg... $ECHO_C" >&6 +if test "${ac_cv_func_MPIR_Err_setmsg+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define MPIR_Err_setmsg to an innocuous variant, in case declares MPIR_Err_setmsg. + For example, HP-UX 11i declares gettimeofday. */ +#define MPIR_Err_setmsg innocuous_MPIR_Err_setmsg + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char MPIR_Err_setmsg(); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char MPIR_Err_setmsg(); + which can conflict with char MPIR_Err_setmsg (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -int main() { +#ifdef __STDC__ +# include +#else +# include +#endif +#undef MPIR_Err_setmsg + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char MPIR_Err_setmsg (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_MPIR_Err_setmsg) || defined (__stub___MPIR_Err_setmsg) choke me #else -MPIR_Err_setmsg(); +char (*f) () = MPIR_Err_setmsg; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:7650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_MPIR_Err_setmsg=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_MPIR_Err_setmsg=no" -fi -rm -f conftest* -fi +int +main () +{ +return f != MPIR_Err_setmsg; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_MPIR_Err_setmsg=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if eval "test \"`echo '$ac_cv_func_'MPIR_Err_setmsg`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 +ac_cv_func_MPIR_Err_setmsg=no fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_MPIR_Err_setmsg" >&5 +echo "${ECHO_T}$ac_cv_func_MPIR_Err_setmsg" >&6 fi @@ -7672,58 +14871,115 @@ # data in a special way. This code does that. if test "$target_os" = "CRAY" ; then # If tested code does NOT compile, then define _TWO_WORD_FCD - echo $ac_n "checking whether TWO_WORD_FCDs are used""... $ac_c" 1>&6 -echo "configure:7677: checking whether TWO_WORD_FCDs are used" >&5 - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking whether TWO_WORD_FCDs are used... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -int main() { +int +main () +{ void *buf;_fcd temp;temp = _fcdtocp(buf); -; return 0; } -EOF -if { (eval echo configure:7686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then compile_check=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - compile_check=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +compile_check=no fi -rm -f conftest* - echo "$ac_t""$compile_check" 1>&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: result: $compile_check" >&5 +echo "${ECHO_T}$compile_check" >&6 if test "$compile_check" = "no" ; then TEMP_CFLAGS=$CFLAGS CFLAGS="-D_TWO_WORD_FCD $CFLAGS" - echo $ac_n "checking whether program compiles if _TWO_WORD_FCD is defined ""... $ac_c" 1>&6 -echo "configure:7701: checking whether program compiles if _TWO_WORD_FCD is defined " >&5 - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking whether program compiles if _TWO_WORD_FCD is defined ... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -int main() { +int +main () +{ void *buf;_fcd temp;temp = _fcdtocp(buf); -; return 0; } -EOF -if { (eval echo configure:7710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then compile_check=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - compile_check=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +compile_check=no fi -rm -f conftest* - echo "$ac_t""$compile_check" 1>&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: result: $compile_check" >&5 +echo "${ECHO_T}$compile_check" >&6 if test "$compile_check" = "no" ; then - echo "configure: warning: You may have problems compiling the Fortran interface -specifically calls to _fcdtocp" 1>&2 + { echo "$as_me:$LINENO: WARNING: You may have problems compiling the Fortran interface +specifically calls to _fcdtocp" >&5 +echo "$as_me: WARNING: You may have problems compiling the Fortran interface +specifically calls to _fcdtocp" >&2;} elif test "$compile_check" = "yes" ; then - cat >> confdefs.h <<\EOF -#define _TWO_WORD_FCD 1 -EOF + +cat >>confdefs.h <<\_ACEOF +#define _TWO_WORD_FCD +_ACEOF fi CFLAGS=$TEMP_CFLAGS @@ -7734,9 +14990,10 @@ # This asserts that Fortran passes functions by passing the address of the # pointer to the function. # We really need a TEST for this - cat >> confdefs.h <<\EOF -#define FORTRAN_SPECIAL_FUNCTION_PTR 1 -EOF + +cat >>confdefs.h <<\_ACEOF +#define FORTRAN_SPECIAL_FUNCTION_PTR +_ACEOF # Suggested values for these are fi @@ -7744,7 +15001,7 @@ # # For Fortran 90, we'll also need MPI_ADDRESS_KIND and MPI_OFFSET_KIND # Since our compiler might BE a Fortran 90 compiler, try and determine the -# values. +# values. F90="${F90-$F77}" if test "X$pac_save_level" = "X" ; then @@ -7757,85 +15014,239 @@ pac_save_prog_cxx_cross="$ac_cv_prog_cxx_cross" pac_save_prog_f90_cross="$pac_cv_prog_f90_cross" if test "X$CPP" = "X" ; then - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:7762: checking how to run the C preprocessor" >&5 + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # 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 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # 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:7783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - : + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi 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:7800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then + ac_cpp_err=yes +fi +if test -z "$ac_cpp_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:7817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$" | grep -v "^conftest.${ac_ext}:\$"` -if test -z "$ac_err"; then - : + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp + ac_cpp_err=yes fi -rm -f conftest* +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi - CPP="$ac_cv_prog_CPP" +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue else - ac_cv_prog_CPP="$CPP" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -echo "$ac_t""$CPP" 1>&6 + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu fi pac_save_CPP="$CPP" @@ -7844,12 +15255,12 @@ F77="${TESTF77:=$F77}" F90="${TESTF90:=$F90}" if test -z "$TESTCPP" ; then - + if test -z "$TESTCPP"; then - if eval "test \"`echo '$''{'pac_cv_prog_TESTCPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${pac_cv_prog_TESTCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + rm -f conftest.* cat > conftest.c < @@ -7859,62 +15270,78 @@ # not just through cpp. TESTCPP="${TESTCC-cc} -E" ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" - if { (eval echo configure:7863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then + if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then pac_cv_prog_TESTCPP="$TESTCPP" fi if test "X$pac_cv_prog_TESTCPP" = "X" ; then TESTCPP="${TESTCC-cc} -E -traditional-cpp" ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" - if { (eval echo configure:7869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then + if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then pac_cv_prog_TESTCPP="$TESTCPP" fi fi if test "X$pac_cv_prog_TESTCPP" = "X" ; then TESTCPP="${TESTCC-cc} -nologo -E" ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out" - if { (eval echo configure:7876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ; then + if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } ; then pac_cv_prog_TESTCPP="$TESTCPP" fi fi if test "X$pac_cv_prog_TESTCPP" = "X" ; then # Extract the first word of "cpp", so it can be a program name with args. set dummy cpp; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7884: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_TESTCPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_TESTCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$TESTCPP" in - /*) + case $TESTCPP in + [\\/]* | ?:[\\/]*) ac_cv_path_TESTCPP="$TESTCPP" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_TESTCPP="$TESTCPP" # Let the user override the test with a dos path. - ;; *) - 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_path_TESTCPP="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_TESTCPP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -TESTCPP="$ac_cv_path_TESTCPP" +TESTCPP=$ac_cv_path_TESTCPP + if test -n "$TESTCPP"; then - echo "$ac_t""$TESTCPP" 1>&6 + echo "$as_me:$LINENO: result: $TESTCPP" >&5 +echo "${ECHO_T}$TESTCPP" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi rm -f conftest.* - + fi else @@ -7926,26 +15353,30 @@ pac_save_level="0" # Recompute cross_compiling values and set for the current language # This is just: - + + ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$pac_cross_compiling" = "yes" ; then ac_cv_prog_cc_cross=yes ac_cv_prog_cc_works=yes else - cat > conftest.$ac_ext << EOF + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -7961,31 +15392,35 @@ rm -fr conftest* fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu # Ignore Fortran if we aren't using it. if test -n "$F77" ; then - + + ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test "$pac_cross_compiling" = "yes" ; then ac_cv_prog_f77_cross=yes ac_cv_prog_f77_works=yes else - cat > conftest.$ac_ext << EOF + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then ac_cv_prog_f77_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -8001,31 +15436,34 @@ rm -fr conftest* fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # Ignore C++ if we aren't using it. if test -n "$CXX" ; then - - ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + + + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat > conftest.$ac_ext << EOF + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -8040,21 +15478,20 @@ fi rm -fr conftest* ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # Ignore Fortran 90 if we aren't using it. if test -n "$F90" ; then - - -ac_ext=$pac_cv_f90_ext -ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&5' -ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$pac_cv_prog_f90_cross + + + ac_ext=${ac_f90ext-f} +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu if test "$pac_cross_compiling" = "yes" ; then ac_cv_prog_f90_cross=yes @@ -8082,21 +15519,19 @@ pac_cv_prog_f90_works="$ac_cv_prog_f90_works" rm -fr conftest* ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu fi fi pac_save_level=`expr $pac_save_level + 1` - -ac_ext=$pac_cv_f90_ext -ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&5' -ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$pac_cv_prog_f90_cross +ac_ext=${ac_f90ext-f} +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu # Offset kind should be for 8 bytes if possible (Romio prefers that) # address should be sizeof void * @@ -8111,11 +15546,16 @@ if test "$pac_cv_prog_f90_cross" = "yes" ; then ADDRESS_KIND="$CROSS_ADDRESS_KIND" else -if test -n "$ac_f90compile" ; then - echo $ac_n "checking for Fortran 90 integer kind for ${testsize}-byte integers""... $ac_c" 1>&6 -echo "configure:8117: checking for Fortran 90 integer kind for ${testsize}-byte integers" >&5 +ac_ext=${ac_f90ext-f} +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + +if test -n "$ac_compile" ; then + echo "$as_me:$LINENO: checking for Fortran 90 integer kind for ${testsize}-byte integers" >&5 +echo $ECHO_N "checking for Fortran 90 integer kind for ${testsize}-byte integers... $ECHO_C" >&6 # Convert bytes to digits - case ${testsize} in + case ${testsize} in 1) sellen=2 ;; 2) sellen=4 ;; 4) sellen=8 ;; @@ -8125,13 +15565,14 @@ esac # Check for cached value eval testval=\$"pac_cv_prog_f90_int_kind_$sellen" - if test -n "$testval" ; then - echo "$ac_t""$testval (cached)" 1>&6 + if test -n "$testval" ; then + echo "$as_me:$LINENO: result: $testval (cached)" >&5 +echo "${ECHO_T}$testval (cached)" >&6 ADDRESS_KIND=$testval else # must compute rm -f conftest* - cat < conftest.$ac_f90ext + cat < conftest.$ac_ext program main integer i i = selected_int_kind($sellen) @@ -8143,8 +15584,12 @@ EOF KINDVAL="unavailable" eval "pac_cv_prog_f90_int_kind_$sellen"=-1 - if { (eval echo configure:8147: \"$ac_f90link\") 1>&5; (eval $ac_f90link) 2>&5; } && test -s conftest ; then - ./conftest 1>&5 2>&1 + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest ; then + ./conftest >>config.log 2>&1 if test -s conftest1.out ; then # Because of write, there may be a leading blank. KINDVAL=`cat conftest1.out | sed 's/ //g'` @@ -8153,27 +15598,36 @@ fi fi rm -f conftest* - # The intel compiler sometimes generates these work.pc and .pcl files - rm -f work.pc work.pcl - echo "$ac_t""$KINDVAL" 1>&6 + echo "$as_me:$LINENO: result: $KINDVAL" >&5 +echo "${ECHO_T}$KINDVAL" >&6 fi # not cached fi # Has Fortran 90 +ac_ext=${ac_f90ext-f} +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + fi # is not cross compiling if test "$ac_cv_sizeof_void_p" = 8 ; then OFFSET_KIND=$ADDRESS_KIND else - + # Set the default OFFSET_KIND=-1 if test "$pac_cv_prog_f90_cross" = "yes" ; then OFFSET_KIND="$CROSS_OFFSET_KIND" else -if test -n "$ac_f90compile" ; then - echo $ac_n "checking for Fortran 90 integer kind for 8-byte integers""... $ac_c" 1>&6 -echo "configure:8175: checking for Fortran 90 integer kind for 8-byte integers" >&5 +ac_ext=${ac_f90ext-f} +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + +if test -n "$ac_compile" ; then + echo "$as_me:$LINENO: checking for Fortran 90 integer kind for 8-byte integers" >&5 +echo $ECHO_N "checking for Fortran 90 integer kind for 8-byte integers... $ECHO_C" >&6 # Convert bytes to digits - case 8 in + case 8 in 1) sellen=2 ;; 2) sellen=4 ;; 4) sellen=8 ;; @@ -8183,13 +15637,14 @@ esac # Check for cached value eval testval=\$"pac_cv_prog_f90_int_kind_$sellen" - if test -n "$testval" ; then - echo "$ac_t""$testval (cached)" 1>&6 + if test -n "$testval" ; then + echo "$as_me:$LINENO: result: $testval (cached)" >&5 +echo "${ECHO_T}$testval (cached)" >&6 OFFSET_KIND=$testval else # must compute rm -f conftest* - cat < conftest.$ac_f90ext + cat < conftest.$ac_ext program main integer i i = selected_int_kind($sellen) @@ -8201,8 +15656,12 @@ EOF KINDVAL="unavailable" eval "pac_cv_prog_f90_int_kind_$sellen"=-1 - if { (eval echo configure:8205: \"$ac_f90link\") 1>&5; (eval $ac_f90link) 2>&5; } && test -s conftest ; then - ./conftest 1>&5 2>&1 + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest ; then + ./conftest >>config.log 2>&1 if test -s conftest1.out ; then # Because of write, there may be a leading blank. KINDVAL=`cat conftest1.out | sed 's/ //g'` @@ -8211,32 +15670,41 @@ fi fi rm -f conftest* - # The intel compiler sometimes generates these work.pc and .pcl files - rm -f work.pc work.pcl - echo "$ac_t""$KINDVAL" 1>&6 + echo "$as_me:$LINENO: result: $KINDVAL" >&5 +echo "${ECHO_T}$KINDVAL" >&6 fi # not cached fi # Has Fortran 90 +ac_ext=${ac_f90ext-f} +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + fi # is not cross compiling fi # -# Some compilers won't allow a -1 kind (e.g., absoft), others won't +# Some compilers won't allow a -1 kind (e.g., absoft), others won't # allow a 0 (Intel?). In this case, use a fallback (sizeof(int) kind), # which is correct for many but not all Fortran 90 compilers (the NAG # F90 compiler uses consequetive integers, i.e., 1,2,3) if test "$ADDRESS_KIND" = "-1" -o "$OFFSET_KIND" = "-1" -o \ "$ADDRESS_KIND" = "0" -o "$OFFSET_KIND" = "0" ; then - + # Set the default simpleintkind=-1 if test "$pac_cv_prog_f90_cross" = "yes" ; then simpleintkind="" else -if test -n "$ac_f90compile" ; then - echo $ac_n "checking for Fortran 90 integer kind for ${pac_cv_f77_sizeof_integer}-byte integers""... $ac_c" 1>&6 -echo "configure:8238: checking for Fortran 90 integer kind for ${pac_cv_f77_sizeof_integer}-byte integers" >&5 +ac_ext=${ac_f90ext-f} +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + +if test -n "$ac_compile" ; then + echo "$as_me:$LINENO: checking for Fortran 90 integer kind for ${pac_cv_f77_sizeof_integer}-byte integers" >&5 +echo $ECHO_N "checking for Fortran 90 integer kind for ${pac_cv_f77_sizeof_integer}-byte integers... $ECHO_C" >&6 # Convert bytes to digits - case ${pac_cv_f77_sizeof_integer} in + case ${pac_cv_f77_sizeof_integer} in 1) sellen=2 ;; 2) sellen=4 ;; 4) sellen=8 ;; @@ -8246,13 +15714,14 @@ esac # Check for cached value eval testval=\$"pac_cv_prog_f90_int_kind_$sellen" - if test -n "$testval" ; then - echo "$ac_t""$testval (cached)" 1>&6 + if test -n "$testval" ; then + echo "$as_me:$LINENO: result: $testval (cached)" >&5 +echo "${ECHO_T}$testval (cached)" >&6 simpleintkind=$testval else # must compute rm -f conftest* - cat < conftest.$ac_f90ext + cat < conftest.$ac_ext program main integer i i = selected_int_kind($sellen) @@ -8264,8 +15733,12 @@ EOF KINDVAL="unavailable" eval "pac_cv_prog_f90_int_kind_$sellen"=-1 - if { (eval echo configure:8268: \"$ac_f90link\") 1>&5; (eval $ac_f90link) 2>&5; } && test -s conftest ; then - ./conftest 1>&5 2>&1 + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest ; then + ./conftest >>config.log 2>&1 if test -s conftest1.out ; then # Because of write, there may be a leading blank. KINDVAL=`cat conftest1.out | sed 's/ //g'` @@ -8274,24 +15747,31 @@ fi fi rm -f conftest* - # The intel compiler sometimes generates these work.pc and .pcl files - rm -f work.pc work.pcl - echo "$ac_t""$KINDVAL" 1>&6 + echo "$as_me:$LINENO: result: $KINDVAL" >&5 +echo "${ECHO_T}$KINDVAL" >&6 fi # not cached fi # Has Fortran 90 +ac_ext=${ac_f90ext-f} +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + fi # is not cross compiling if test "$simpleintkind" = "-1" ; then # Wild guess; probably means that Fortran 90 is not available simpleintkind=4 - echo "configure: warning: Unable to determine the size of a simple integer" 1>&2 + { echo "$as_me:$LINENO: WARNING: Unable to determine the size of a simple integer" >&5 +echo "$as_me: WARNING: Unable to determine the size of a simple integer" >&2;} fi if test "$ADDRESS_KIND" = "-1" -o "$ADDRESS_KIND" = "0" ; then - echo "configure: warning: Using $simpleintkind for the Fortran 90 KIND of an MPI_Aint" 1>&2 + { echo "$as_me:$LINENO: WARNING: Using $simpleintkind for the Fortran 90 KIND of an MPI_Aint" >&5 +echo "$as_me: WARNING: Using $simpleintkind for the Fortran 90 KIND of an MPI_Aint" >&2;} ADDRESS_KIND=$simpleintkind fi if test "$OFFSET_KIND" = "-1" -o "$OFFSET_KIND" = "0" ; then - echo "configure: warning: Using $simpleintkind for the Fortran 90 KIND of an MPI_Offset" 1>&2 + { echo "$as_me:$LINENO: WARNING: Using $simpleintkind for the Fortran 90 KIND of an MPI_Offset" >&5 +echo "$as_me: WARNING: Using $simpleintkind for the Fortran 90 KIND of an MPI_Offset" >&2;} OFFSET_KIND=$simpleintkind fi fi @@ -8316,7 +15796,7 @@ if test -n "$F90" -a "$enable_f90" != "no" ; then F90_SUFFIX="$ac_f90ext" - # For now, top_srcdir_val is MPIR_HOME; + # For now, top_srcdir_val is MPIR_HOME; # The build dir is relative at ../.. top_srcdir_val="$MPIR_HOME" if test "$do_f90_modules" = "yes" -a -n "$top_srcdir_val" ; then @@ -8336,19 +15816,19 @@ export MAKE ; F90LINKER="$F90LINKER" ; \ export F90LINKER ; export F77 ; \ $top_srcdir_val/f90modules/configure --with-mpich) - if test ! -s ../../f90modules/Makefile ; then + if test ! -s ../../f90modules/Makefile ; then # turn off f90 F90="" - else + else F90_MODINCFLAG="`$MAKE -f ../../f90modules/Makefile f90modflag`" F90MODINCSPEC="`$MAKE -f ../../f90modules/Makefile f90modspec`" - if test -z "$USER_SET_F90INC" -a -z "$F90INC" ; then + if test -z "$USER_SET_F90INC" -a -z "$F90INC" ; then # This should use a test or try to get it from the f90module. F90INC=`$MAKE -f ../../f90modules/Makefile f90incflag` fi fi fi -else +else # Remove the f90modules/Makefile since this is the only way # to tell the top-level makefile not to build the f90 modules. # (We need a better way) @@ -8366,502 +15846,1416 @@ -if test -z "$F90_LIBDIR_LEADER" ; then +if test -z "$F90_LIBDIR_LEADER" ; then F90_LIBDIR_LEADER="-L" fi -echo $ac_n "checking whether using gcc and g77 together""... $ac_c" 1>&6 -echo "configure:8376: checking whether using gcc and g77 together" >&5 -if test "$ac_cv_prog_gcc" = "yes" -a "$ac_cv_prog_g77" = "yes" ; then - cat >> confdefs.h <<\EOF +echo "$as_me:$LINENO: checking whether using gcc and g77 together" >&5 +echo $ECHO_N "checking whether using gcc and g77 together... $ECHO_C" >&6 +if test "$ac_cv_c_compiler_gnu" = "yes" -a "$ac_cv_f77_compiler_gnu" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF #define USE_GCC_G77_DECLS 1 -EOF +_ACEOF - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi + ac_config_commands="$ac_config_commands default-1" + ac_config_commands="$ac_config_commands default-2" + ac_config_commands="$ac_config_commands default-3" + ac_config_commands="$ac_config_commands default-4" + ac_config_commands="$ac_config_commands default-5" + ac_config_commands="$ac_config_commands default-6" -trap '' 1 2 15 -cat > confcache <<\EOF + ac_config_files="$ac_config_files Makefile src/Makefile src/farg.f include/mpif.h include/mpi_fortdefs.h src/mpif77 src/mpif77.conf src/mpif90 src/mpif90.conf src/initfcmn.f src/initfdte.f" +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done done +;; + esac -ac_given_srcdir=$srcdir + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} -trap 'rm -fr `echo "Makefile src/Makefile src/farg.f \ - include/mpif.h include/mpi_fortdefs.h src/mpif77 src/mpif77.conf \ - src/mpif90 src/mpif90.conf src/initfcmn.f src/initfdte.f mpi_fortconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@HAVE_MPID_FORTDEFS_H@%$HAVE_MPID_FORTDEFS_H%g -s%@COPTIONS@%$COPTIONS%g -s%@FLIBNAME@%$FLIBNAME%g -s%@FWRAPNAME@%$FWRAPNAME%g -s%@hasMPE@%$hasMPE%g -s%@OPTFLAGS@%$OPTFLAGS%g -s%@OPTFLAGSF@%$OPTFLAGSF%g -s%@MPI_STATUS_SIZE@%$MPI_STATUS_SIZE%g -s%@f77includedir@%$f77includedir%g -s%@f77libdir@%$f77libdir%g -s%@f77bindir@%$f77bindir%g -s%@subname@%$subname%g -s%@libbuild_dir@%$libbuild_dir%g -s%@FORTRAN_INITOBJ@%$FORTRAN_INITOBJ%g -s%@INCLUDES@%$INCLUDES%g -s%@MPIVERSION@%$MPIVERSION%g -s%@CC@%$CC%g -s%@F77@%$F77%g -s%@FOPTIONS@%$FOPTIONS%g -s%@FLINKER@%$FLINKER%g -s%@F90@%$F90%g -s%@F90LINKER@%$F90LINKER%g -s%@CXX@%$CXX%g -s%@MPICC@%$MPICC%g -s%@MPIF77@%$MPIF77%g -s%@MPIF90@%$MPIF90%g -s%@MPICXX@%$MPICXX%g -s%@MPIRUN@%$MPIRUN%g -s%@MPIBOOT@%$MPIBOOT%g -s%@MPIUNBOOT@%$MPIUNBOOT%g -s%@MAKE@%$MAKE%g -s%@VPATH@%$VPATH%g -s%@SET_CFLAGS@%$SET_CFLAGS%g -s%@SET_MAKE@%$SET_MAKE%g -s%@AR@%$AR%g -s%@RANLIB@%$RANLIB%g -s%@F77LINKER@%$F77LINKER%g -s%@CPP@%$CPP%g -s%@MPILIBNAME@%$MPILIBNAME%g -s%@LIB_PATH@%$LIB_PATH%g -s%@BASE_LIB_LIST@%$BASE_LIB_LIST%g -s%@HASMPE@%$HASMPE%g -s%@F77_LDFLAGS@%$F77_LDFLAGS%g -s%@BASE_FFLAGS@%$BASE_FFLAGS%g -s%@includebuild_dir@%$includebuild_dir%g -s%@MPI_WITH_PMPI@%$MPI_WITH_PMPI%g -s%@SHAREDKIND@%$SHAREDKIND%g -s%@SHARED_LIB_SEARCH_PATH_LEADER@%$SHARED_LIB_SEARCH_PATH_LEADER%g -s%@SHARED_LIB_LOCALDIR@%$SHARED_LIB_LOCALDIR%g -s%@sharedlibbuild_dir@%$sharedlibbuild_dir%g -s%@sharedlib_dir@%$sharedlib_dir%g -s%@MPI2_OBJECTS@%$MPI2_OBJECTS%g -s%@TESTCPP@%$TESTCPP%g -s%@F77_GETARGDECL@%$F77_GETARGDECL%g -s%@F77_IARGC@%$F77_IARGC%g -s%@F77_GETARG@%$F77_GETARG%g -s%@FXX_MODULE@%$FXX_MODULE%g -s%@F77_GETARG_FFLAGS@%$F77_GETARG_FFLAGS%g -s%@F77_GETARG_LDFLAGS@%$F77_GETARG_LDFLAGS%g -s%@F90_GETARG_FFLAGS@%$F90_GETARG_FFLAGS%g -s%@F90_GETARG_LDFLAGS@%$F90_GETARG_LDFLAGS%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@FLIBS@%$FLIBS%g -s%@F77_NAME_MANGLE@%$F77_NAME_MANGLE%g -s%@F77_IN_C_LIBS@%$F77_IN_C_LIBS%g -s%@CHARDECL@%$CHARDECL%g -s%@F77_INCDIR@%$F77_INCDIR%g -s%@FINCLUDES@%$FINCLUDES%g -s%@F77_LIBDIR_LEADER@%$F77_LIBDIR_LEADER%g -s%@MPIFPMPI@%$MPIFPMPI%g -s%@F77_INT1@%$F77_INT1%g -s%@F77_INT2@%$F77_INT2%g -s%@F77_INT4@%$F77_INT4%g -s%@F77_INT8@%$F77_INT8%g -s%@F77_INT16@%$F77_INT16%g -s%@F77_REAL4@%$F77_REAL4%g -s%@F77_REAL8@%$F77_REAL8%g -s%@F77_REAL16@%$F77_REAL16%g -s%@F77_COMPLEX8@%$F77_COMPLEX8%g -s%@F77_COMPLEX16@%$F77_COMPLEX16%g -s%@F77_COMPLEX32@%$F77_COMPLEX32%g -s%@MPI_FINT_TYPE@%$MPI_FINT_TYPE%g -s%@FARGOBJ@%$FARGOBJ%g -s%@ADDRESS_KIND@%$ADDRESS_KIND%g -s%@OFFSET_KIND@%$OFFSET_KIND%g -s%@F90_SUFFIX@%$F90_SUFFIX%g -s%@f90includedir@%$f90includedir%g -s%@f90libdir@%$f90libdir%g -s%@F90_LDFLAGS@%$F90_LDFLAGS%g -s%@F90INC@%$F90INC%g -s%@F90_MODINCFLAG@%$F90_MODINCFLAG%g -s%@F90MODINCSPEC@%$F90MODINCSPEC%g -s%@F90FLAGS@%$F90FLAGS%g -s%@F90LIB_PATH@%$F90LIB_PATH%g -s%@F90_LIBDIR_LEADER@%$F90_LIBDIR_LEADER%g -CEOF -EOF +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac -cat >> $CONFIG_STATUS <<\EOF +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` + as_ln_s='ln -s' fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' fi -EOF +rm -f conf$$ conf$$.exe conf$$.file -cat >> $CONFIG_STATUS </dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; -CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile src/farg.f \ - include/mpif.h include/mpi_fortdefs.h src/mpif77 src/mpif77.conf \ - src/mpif90 src/mpif90.conf src/initfcmn.f src/initfdte.f "} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; esac + shift +done - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. +ac_configure_extra_args= - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + + + + +has_exclaim=$has_exclaim + + + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/farg.f" ) CONFIG_FILES="$CONFIG_FILES src/farg.f" ;; + "include/mpif.h" ) CONFIG_FILES="$CONFIG_FILES include/mpif.h" ;; + "include/mpi_fortdefs.h" ) CONFIG_FILES="$CONFIG_FILES include/mpi_fortdefs.h" ;; + "src/mpif77" ) CONFIG_FILES="$CONFIG_FILES src/mpif77" ;; + "src/mpif77.conf" ) CONFIG_FILES="$CONFIG_FILES src/mpif77.conf" ;; + "src/mpif90" ) CONFIG_FILES="$CONFIG_FILES src/mpif90" ;; + "src/mpif90.conf" ) CONFIG_FILES="$CONFIG_FILES src/mpif90.conf" ;; + "src/initfcmn.f" ) CONFIG_FILES="$CONFIG_FILES src/initfcmn.f" ;; + "src/initfdte.f" ) CONFIG_FILES="$CONFIG_FILES src/initfdte.f" ;; + "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;; + "default-3" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-3" ;; + "default-4" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-4" ;; + "default-5" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-5" ;; + "default-6" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-6" ;; + "mpi_fortconf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS mpi_fortconf.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@HAVE_MPID_FORTDEFS_H@,$HAVE_MPID_FORTDEFS_H,;t t +s,@COPTIONS@,$COPTIONS,;t t +s,@FLIBNAME@,$FLIBNAME,;t t +s,@FWRAPNAME@,$FWRAPNAME,;t t +s,@hasMPE@,$hasMPE,;t t +s,@OPTFLAGS@,$OPTFLAGS,;t t +s,@OPTFLAGSF@,$OPTFLAGSF,;t t +s,@MPI_STATUS_SIZE@,$MPI_STATUS_SIZE,;t t +s,@f77includedir@,$f77includedir,;t t +s,@f77libdir@,$f77libdir,;t t +s,@f77bindir@,$f77bindir,;t t +s,@subname@,$subname,;t t +s,@libbuild_dir@,$libbuild_dir,;t t +s,@FORTRAN_INITOBJ@,$FORTRAN_INITOBJ,;t t +s,@INCLUDES@,$INCLUDES,;t t +s,@MPIVERSION@,$MPIVERSION,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@F77@,$F77,;t t +s,@FFLAGS@,$FFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@ac_ct_F77@,$ac_ct_F77,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@FOPTIONS@,$FOPTIONS,;t t +s,@FLINKER@,$FLINKER,;t t +s,@F90@,$F90,;t t +s,@F90FLAGS@,$F90FLAGS,;t t +s,@ac_ct_F90@,$ac_ct_F90,;t t +s,@F90LINKER@,$F90LINKER,;t t +s,@CXX@,$CXX,;t t +s,@MPIRUN_NP@,$MPIRUN_NP,;t t +s,@MPIEXEC_N@,$MPIEXEC_N,;t t +s,@MPICC@,$MPICC,;t t +s,@MPIF77@,$MPIF77,;t t +s,@MPIF90@,$MPIF90,;t t +s,@MPICXX@,$MPICXX,;t t +s,@MPIEXEC@,$MPIEXEC,;t t +s,@MPIRUN@,$MPIRUN,;t t +s,@MPIBOOT@,$MPIBOOT,;t t +s,@MPIUNBOOT@,$MPIUNBOOT,;t t +s,@MPCC@,$MPCC,;t t +s,@MPXLF@,$MPXLF,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@MAKE@,$MAKE,;t t +s,@VPATH@,$VPATH,;t t +s,@SET_CFLAGS@,$SET_CFLAGS,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@AR@,$AR,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@F77LINKER@,$F77LINKER,;t t +s,@CPP@,$CPP,;t t +s,@MPILIBNAME@,$MPILIBNAME,;t t +s,@LIB_PATH@,$LIB_PATH,;t t +s,@BASE_LIB_LIST@,$BASE_LIB_LIST,;t t +s,@HASMPE@,$HASMPE,;t t +s,@F77_LDFLAGS@,$F77_LDFLAGS,;t t +s,@BASE_FFLAGS@,$BASE_FFLAGS,;t t +s,@includebuild_dir@,$includebuild_dir,;t t +s,@MPI_WITH_PMPI@,$MPI_WITH_PMPI,;t t +s,@SHAREDKIND@,$SHAREDKIND,;t t +s,@SHARED_LIB_SEARCH_PATH_LEADER@,$SHARED_LIB_SEARCH_PATH_LEADER,;t t +s,@SHARED_LIB_LOCALDIR@,$SHARED_LIB_LOCALDIR,;t t +s,@sharedlibbuild_dir@,$sharedlibbuild_dir,;t t +s,@sharedlib_dir@,$sharedlib_dir,;t t +s,@MPI2_OBJECTS@,$MPI2_OBJECTS,;t t +s,@TESTCPP@,$TESTCPP,;t t +s,@F77_GETARGDECL@,$F77_GETARGDECL,;t t +s,@F77_IARGC@,$F77_IARGC,;t t +s,@F77_GETARG@,$F77_GETARG,;t t +s,@FXX_MODULE@,$FXX_MODULE,;t t +s,@F77_GETARG_FFLAGS@,$F77_GETARG_FFLAGS,;t t +s,@F77_GETARG_LDFLAGS@,$F77_GETARG_LDFLAGS,;t t +s,@F90_GETARG_FFLAGS@,$F90_GETARG_FFLAGS,;t t +s,@F90_GETARG_LDFLAGS@,$F90_GETARG_LDFLAGS,;t t +s,@FLIBS@,$FLIBS,;t t +s,@F77_NAME_MANGLE@,$F77_NAME_MANGLE,;t t +s,@F77_IN_C_LIBS@,$F77_IN_C_LIBS,;t t +s,@CHARDECL@,$CHARDECL,;t t +s,@F77_INCDIR@,$F77_INCDIR,;t t +s,@FINCLUDES@,$FINCLUDES,;t t +s,@F77_LIBDIR_LEADER@,$F77_LIBDIR_LEADER,;t t +s,@MPIFPMPI@,$MPIFPMPI,;t t +s,@EGREP@,$EGREP,;t t +s,@F77_INT1@,$F77_INT1,;t t +s,@F77_INT2@,$F77_INT2,;t t +s,@F77_INT4@,$F77_INT4,;t t +s,@F77_INT8@,$F77_INT8,;t t +s,@F77_INT16@,$F77_INT16,;t t +s,@F77_REAL4@,$F77_REAL4,;t t +s,@F77_REAL8@,$F77_REAL8,;t t +s,@F77_REAL16@,$F77_REAL16,;t t +s,@F77_COMPLEX8@,$F77_COMPLEX8,;t t +s,@F77_COMPLEX16@,$F77_COMPLEX16,;t t +s,@F77_COMPLEX32@,$F77_COMPLEX32,;t t +s,@MPI_FINT_TYPE@,$MPI_FINT_TYPE,;t t +s,@FARGOBJ@,$FARGOBJ,;t t +s,@ADDRESS_KIND@,$ADDRESS_KIND,;t t +s,@OFFSET_KIND@,$OFFSET_KIND,;t t +s,@F90_SUFFIX@,$F90_SUFFIX,;t t +s,@f90includedir@,$f90includedir,;t t +s,@f90libdir@,$f90libdir,;t t +s,@F90_LDFLAGS@,$F90_LDFLAGS,;t t +s,@F90INC@,$F90INC,;t t +s,@F90_MODINCFLAG@,$F90_MODINCFLAG,;t t +s,@F90MODINCSPEC@,$F90MODINCSPEC,;t t +s,@F90LIB_PATH@,$F90LIB_PATH,;t t +s,@F90_LIBDIR_LEADER@,$F90_LIBDIR_LEADER,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' +ac_uD=',;t' -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS rm -f conftest.tail -while : +while grep . conftest.defines >/dev/null do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - -EOF -cat >> $CONFIG_STATUS <$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -has_exclaim=$has_exclaim +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac -EOF -cat >> $CONFIG_STATUS <<\EOF -if test "$enable_echo" ; then set -x ; fi -if test -f ../../romio/include/mpiof.h -a "$ROMIO" = 1 ; then \ + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + default-1 ) if test "$enable_echo" ; then set -x ; fi ;; + default-2 ) if test -f ../../romio/include/mpiof.h -a "$ROMIO" = 1 ; then \ sed -e '/MPI_OFFSET_KIND/d' ../../romio/include/mpiof.h | \ cat include/mpif.h - > mpif-tmp.h ; \ rm -f $includebuild_dir/mpif.h ; \ - mv mpif-tmp.h include/mpif.h ; fi -rm -f .tmp ; + mv mpif-tmp.h include/mpif.h ; fi ;; + default-3 ) rm -f .tmp ; cat include/mpif.h include/mpif_bottom.h > .tmp ; rm -f include/mpif.h ; mv .tmp include/mpif.h - -if test "$has_exclaim" = "yes" ; then + ;; + default-4 ) if test "$has_exclaim" = "yes" ; then rm -f .tmp cp include/mpif.h .tmp sed -e 's/^C/\!/g' .tmp > include/mpif.h rm -f .tmp fi + ;; + default-5 ) chmod a+x src/mpif77 ;; + default-6 ) chmod a+x src/mpif90 ;; + esac +done +_ACEOF -chmod a+x src/mpif77 -chmod a+x src/mpif90 +cat >>$CONFIG_STATUS <<\_ACEOF -exit 0 -EOF +{ (exit 0); exit 0; } +_ACEOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi exit 0 --- mpich-1.2.7.orig/src/fortran/mpi_fortconf.h.in +++ mpich-1.2.7/src/fortran/mpi_fortconf.h.in @@ -1,10 +1,54 @@ -/* mpi_fortconf.h.in. Generated automatically from configure.in by autoheader. */ +/* mpi_fortconf.h.in. Generated from configure.in by autoheader. */ +/* acconfig_cc.h */ +/* Define if union semun is defined in sys/sem.h */ +#undef HAVE_UNION_SEMUN -/* Define to empty if the keyword does not work. */ -#undef const +/* Define if semctl requires a union semun argument in the 4th position */ +#undef SEMCTL_NEEDS_SEMUN -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS +/* Define as empty if C does not support volatile */ +#undef volatile + +/* Define if #pragma weak supported */ +#undef HAVE_PRAGMA_WEAK + +/* Define is #pragma _HP_SECONDARY_DEF supported */ +#undef HAVE_PRAGMA_HP_SEC_DEF + +/* Define is #pragma _CRI duplicate x as y supported */ +#undef HAVE_PRAGMA_CRI_DUP + +/* Define if crypt requires a prototype */ +#undef NEED_CRYPT_PROTOTYPE + +/* Define as empty if C does not support any form of restrict or define + as the appropriate extension */ +#undef restrict + +/* Define if the XOPEN versions of routines and header files are needed */ +#undef _XOPEN_SOURCE + +/* Define as empty if C does not support inline */ +#undef inline +/* acconfig_f77.h */ +/* Define if Fortran uses lowercase name mangling */ +#undef F77_NAME_LOWER + +/* Define if Fortran use lowercase followed by an underscore */ +#undef F77_NAME_LOWER_USCORE + +/* Define if Fortran uses uppercase */ +#undef F77_NAME_UPPER + +/* Define if Fortran uses two underscores for names with an underscore + (and one for names without an underscore) */ +#undef F77_NAME_LOWER_2USCORE + +/* Define if Fortran leaves case unchanged */ +#undef F77_NAME_MIXED + +/* Define if Fortran leaves case unchanged, followed by an underscore */ +#undef F77_NAME_MIXED_USCORE /* Sizeof standard Fortran types */ #undef SIZEOF_F77_DOUBLE_PRECISION @@ -27,6 +71,16 @@ #undef F77_TRUE_VALUE #undef F77_FALSE_VALUE +#undef SIZEOF_F77_INTEGER_1 +#undef SIZEOF_F77_INTEGER_2 +#undef SIZEOF_F77_INTEGER_4 +#undef SIZEOF_F77_INTEGER_8 +#undef SIZEOF_F77_INTEGER_16 + +#undef SIZEOF_F77_REAL_4 +#undef SIZEOF_F77_REAL_8 +#undef SIZEOF_F77_REAL_16 + #undef HAVE_WEAK_SYMBOLS #undef USE_STDARG @@ -38,102 +92,113 @@ #undef USE_POINTER_FOR_BOTTOM -/* The number of bytes in a char. */ -#undef SIZEOF_CHAR +/* Define if building within MPICH1 */ +#undef BUILDING_IN_MPICH -/* The number of bytes in a double. */ -#undef SIZEOF_DOUBLE +/* Define if Fortran logical values known */ +#undef F77_TRUE_VALUE_SET -/* The number of bytes in a float. */ -#undef SIZEOF_FLOAT +/* Define if Fortran INTEGER is the same as C int */ +#undef FINT_IS_INT -/* The number of bytes in a int. */ -#undef SIZEOF_INT +/* Define if we cannot determine the type of MPI_Fint at compile time */ +#undef FINT_TYPE_UNKNOWN -/* The number of bytes in a long. */ -#undef SIZEOF_LONG +/* Define if function pointers special */ +#undef FORTRAN_SPECIAL_FUNCTION_PTR -/* The number of bytes in a long double. */ -#undef SIZEOF_LONG_DOUBLE +/* Define if MPICH err msg routine available */ +#undef HAS_MPIR_ERR_SETMSG -/* The number of bytes in a long long. */ -#undef SIZEOF_LONG_LONG +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H -/* The number of bytes in a short. */ -#undef SIZEOF_SHORT +/* Define if C compiler supports long double type */ +#undef HAVE_LONG_DOUBLE -/* The number of bytes in a void*. */ -#undef SIZEOF_VOIDP +/* Define if C compiler supports long long type */ +#undef HAVE_LONG_LONG -/* Define if you have the header file. */ -#undef HAVE_STDLIB_H +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H -/* Define if you have the header file. */ -#undef HAVE_STRING_H +/* Define if MP_Xxx_f2c functions available */ +#undef HAVE_MPI_F2C -/* Define if you have the mpi library (-lmpi). */ -#undef HAVE_LIBMPI +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H -/* Define if C compiler supports long long type */ -#undef HAVE_LONG_LONG +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H -/* Define if C compiler supports long double type */ -#undef HAVE_LONG_DOUBLE +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H -/* Define if MPI has F2C */ -#undef HAVE_MPI_F2C +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H -/* Define if long long allowed */ -#undef HAVE_LONG_LONG +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H -/* Define if Fortran names are lowercase */ -#undef F77_NAME_LOWER +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H -/* Define if Fortran names are lowercase with a trailing underscore */ -#undef F77_NAME_LOWER_USCORE +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H -/* Define if Fortran names containing an underscore have two trailing underscores */ -#undef F77_NAME_LOWER_2USCORE +/* Define if weak symbols available */ +#undef HAVE_WEAK_SYMBOLS -/* Define if Fortran names are uppercase */ -#undef F77_NAME_UPPER +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT -/* Define if Fortran names preserve the original case */ -#undef F77_NAME_MIXED +/* Define to the full name of this package. */ +#undef PACKAGE_NAME -/* Define if Fortran names preserve the original case and add a trailing underscore */ -#undef F77_NAME_MIXED_USCORE +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING -/* Define if Fortran names are uppercase */ -#undef F77_NAME_UPPER +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME -/* Define calling convention */ -#undef STDCALL +/* Define to the version of this package. */ +#undef PACKAGE_VERSION -/* Define calling convention */ -#undef STDCALL +/* The size of a `char', as computed by sizeof. */ +#undef SIZEOF_CHAR -/* Define size of SIZEOF_F77_INTEGER */ -#undef SIZEOF_F77_INTEGER +/* The size of a `double', as computed by sizeof. */ +#undef SIZEOF_DOUBLE -/* Define size of SIZEOF_F77_REAL */ -#undef SIZEOF_F77_REAL +/* The size of a `float', as computed by sizeof. */ +#undef SIZEOF_FLOAT -/* Define size of SIZEOF_F77_DOUBLE_PRECISION */ -#undef SIZEOF_F77_DOUBLE_PRECISION +/* The size of a `int', as computed by sizeof. */ +#undef SIZEOF_INT -/* Define if we cannot determine the type of MPI_Fint at compile time */ -#undef FINT_TYPE_UNKNOWN +/* The size of a `long', as computed by sizeof. */ +#undef SIZEOF_LONG -/* Supports weak pragma */ -#undef HAVE_PRAGMA_WEAK +/* The size of a `long double', as computed by sizeof. */ +#undef SIZEOF_LONG_DOUBLE -/* HP style weak pragma */ -#undef HAVE_PRAGMA_HP_SEC_DEF +/* The size of a `long long', as computed by sizeof. */ +#undef SIZEOF_LONG_LONG -/* Cray style weak pragma */ -#undef HAVE_PRAGMA_CRI_DUP +/* The size of a `short', as computed by sizeof. */ +#undef SIZEOF_SHORT + +/* The size of a `void*', as computed by sizeof. */ +#undef SIZEOF_VOIDP + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS /* Define if using gcc and g77 together */ #undef USE_GCC_G77_DECLS +/* Define if Cray two-word FCD used */ +#undef _TWO_WORD_FCD + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const --- mpich-1.2.7.orig/src/fortran/src/initfutil.c +++ mpich-1.2.7/src/fortran/src/initfutil.c @@ -1,5 +1,5 @@ /* - * $Id: initfutil.c,v 1.19.4.2 2005/05/31 12:47:59 gropp Exp $ + * $Id: initfutil.c,v 1.19 2004/07/26 18:26:13 gropp Exp $ * * (C) 2000 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. @@ -80,9 +80,6 @@ #endif void mpir_init_fsize_ ( float *, float *, double *, double * ); -#if !defined(SIZEOF_F77_REAL) || !defined(SIZEOF_F77_DOUBLE_PRECISION) -#error 'SIZEOF_F77_REAL and/or DOUBLE_PRECISION not defined' -#endif #if SIZEOF_F77_REAL == 0 || SIZEOF_F77_DOUBLE_PRECISION == 0 void mpir_get_fsize_ ( void ); #endif --- mpich-1.2.7.orig/src/fortran/src/mpif77.in +++ mpich-1.2.7/src/fortran/src/mpif77.in @@ -249,7 +249,8 @@ if [ -s "$arg" ] ; then ext=`expr "$arg" : '.*\(\..*\)'` if [ "$ext" = ".f" -o "$ext" = ".F" -o \ - "$ext" = ".for" -o "$ext" = ".FOR" ] ; then + "$ext" = ".for" -o "$ext" = ".FOR" -o \ + "$ext" = ".fpp" -o "$ext" = ".FPP" ] ; then DoCompile=1 compileargs="$compileargs $arg" fname=`basename $arg $ext` @@ -285,7 +286,7 @@ # -r is true if we can read the file, which is what we want if [ ! -r mpif.h ] ; then #echo "Adding a symbolic link for mpif.h" - trap "$Show rm -f mpif.h" 0 + trap "$Show rm mpif.h" 0 $Show ln -s $f77includedir/mpif.h mpif.h added_link=1 fi @@ -293,6 +294,10 @@ FINC="$FINC$f77includedir" fi status=0 +if [ $HasDashC = 1 -a $DoCompile = 0 -a $DoLink = 0 ] ; then + # Specified -c but no files. Try to force -c behavior from compiler + DoCompile=1 +fi if [ $DoCompile = 1 -o $show_compile = 1 ] ; then if [ $HasDashC != 1 ] ; then compileargs="-c $compileargs" --- mpich-1.2.7.orig/src/fortran/src/mpif90.in +++ mpich-1.2.7/src/fortran/src/mpif90.in @@ -263,7 +263,8 @@ if [ -s "$arg" ] ; then ext=`expr "$arg" : '.*\(\..*\)'` if [ "$ext" = ".f" -o "$ext" = ".F" -o "$ext" = ".f90" -o \ - "$ext" = ".for" -o "$ext" = ".FOR" -o "$ext" = ".F90" ] ; then + "$ext" = ".for" -o "$ext" = ".FOR" -o "$ext" = ".F90" -o \ + "$ext" = ".fpp" -o "$ext" = ".FPP" ] ; then DoCompile=1 compileargs="$compileargs $arg" fname=`basename $arg $ext` @@ -341,6 +342,10 @@ F90INC=${F90INC}${includedir} fi status=0 +if [ $HasDashC = 1 -a $DoCompile = 0 -a $DoLink = 0 ] ; then + # Specified -c but no files. Try to force -c behavior from compiler + DoCompile=1 +fi if [ $DoCompile = 1 -o $show_compile = 1 ] ; then if [ $HasDashC != 1 ] ; then compileargs="-c $compileargs" --- mpich-1.2.7.orig/src/misc2/Makefile.in +++ mpich-1.2.7/src/misc2/Makefile.in @@ -48,11 +48,11 @@ # is the same, but for the profile library default_all: default_objs default_objs: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? profile_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/libp@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/libp@MPILIBNAME@.a $? default_conly: ${MPI_COBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? ${RANLIB} ${libbuild_dir}/lib@MPILIBNAME@.a ${MPI_OBJECTS} : ${MPI_INCLUDE} @@ -64,11 +64,11 @@ ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTFLAGSC} ${OPTFLAGS} -c $< ${libbuild_dir}/lib@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ ${libbuild_dir}/libp@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ # We need to clean the srcdir of any .o files because they can confuse the --- mpich-1.2.7.orig/src/profile/Makefile.in +++ mpich-1.2.7/src/profile/Makefile.in @@ -39,11 +39,11 @@ # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? profile_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/libp@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/libp@MPILIBNAME@.a $? default_conly: ${MPI_COBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? ${RANLIB} ${libbuild_dir}/lib@MPILIBNAME@.a source_names: @@ -53,11 +53,11 @@ ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTFLAGSC} ${OPTFLAGS} -c $< ${libbuild_dir}/lib@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ ${libbuild_dir}/libp@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ # We need to clean the srcdir of any .o files because they can confuse the --- mpich-1.2.7.orig/src/pt2pt/Makefile.in +++ mpich-1.2.7/src/pt2pt/Makefile.in @@ -65,12 +65,12 @@ # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? profile_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/libp@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/libp@MPILIBNAME@.a $? default_conly: ${MPI_COBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? ${RANLIB} ${libbuild_dir}/lib@MPILIBNAME@.a profile: ${libbuild_dir}/libp@MPILIBNAME@.a @@ -82,11 +82,11 @@ ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTFLAGSC} ${OPTFLAGS} -c $< ${libbuild_dir}/lib@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ ${libbuild_dir}/libp@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ # We need to clean the srcdir of any .o files because they can confuse the --- mpich-1.2.7.orig/src/pt2pt/waitsome.c +++ mpich-1.2.7/src/pt2pt/waitsome.c @@ -1,5 +1,5 @@ /* - * $Id: waitsome.c,v 1.14 2003/01/09 20:48:42 gropp Exp $ + * $Id: waitsome.c,v 1.15 2005/08/15 17:20:47 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. @@ -82,8 +82,8 @@ The same is true for waitall.c . */ nnull = 0; + MPID_DeviceCheck( MPID_NOTBLOCKING ); while (nfound == 0 && nnull < incount ) { - MPID_DeviceCheck( MPID_NOTBLOCKING ); nnull = 0; for (i = 0; i < incount; i++) { /* Skip over null handles. We need this for handles generated @@ -219,6 +219,8 @@ break; } } + if (nfound == 0 && nnull < incount) + MPID_DeviceCheck( MPID_BLOCKING ); } if (nnull == incount) *outcount = MPI_UNDEFINED; --- mpich-1.2.7.orig/src/topol/Makefile.in +++ mpich-1.2.7/src/topol/Makefile.in @@ -45,14 +45,14 @@ # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? profile_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/libp@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/libp@MPILIBNAME@.a $? wrapperlib: ${MPI_WOBJECTS} - ${AR} ${libbuild_dir}/libf@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/libf@MPILIBNAME@.a $? default_conly: ${MPI_COBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? ${RANLIB} ${libbuild_dir}/lib@MPILIBNAME@.a source_names: @@ -62,11 +62,11 @@ ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTFLAGSC} ${OPTFLAGS} -c $< ${libbuild_dir}/lib@MPILIBNAME@.a: ${MPI_OBJECTS} - -${AR} $@ $? + -${AR} cr $@ $? ${RANLIB} $@ ${libbuild_dir}/libp@MPILIBNAME@.a: ${MPI_OBJECTS} - -${AR} $@ $? + -${AR} cr $@ $? ${RANLIB} $@ # We need to clean the srcdir of any .o files because they can confuse the --- mpich-1.2.7.orig/src/util/Makefile.in +++ mpich-1.2.7/src/util/Makefile.in @@ -43,9 +43,9 @@ # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/lib@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/lib@MPILIBNAME@.a $? profile_all: ${MPI_OBJECTS} - ${AR} ${libbuild_dir}/libp@MPILIBNAME@.a $? + ${AR} cr ${libbuild_dir}/libp@MPILIBNAME@.a $? source_names: @echo ${MPI_CSOURCES} @@ -54,11 +54,11 @@ ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTFLAGSC} ${OPTFLAGS} -c $< ${libbuild_dir}/lib@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ ${libbuild_dir}/libp@MPILIBNAME@.a: ${MPI_OBJECTS} - ${AR} $@ $? + ${AR} cr $@ $? ${RANLIB} $@ # We need to clean the srcdir of any .o files because they can confuse the --- mpich-1.2.7.orig/util/mpicc.in +++ mpich-1.2.7/util/mpicc.in @@ -315,6 +315,10 @@ done # status=0 +if [ $HasDashC = 1 -a $DoCompile = 0 -a $DoLink = 0 ] ; then + # Specified -c but no files. Try to force -c behavior from compiler + DoCompile=1 +fi if [ $DoCompile = 1 -o $show_compile = 1 ] ; then if [ $HasDashC != 1 ] ; then compileargs="-c $compileargs" --- mpich-1.2.7.orig/util/mpicxx.in +++ mpich-1.2.7/util/mpicxx.in @@ -327,6 +327,10 @@ done # status=0 +if [ $HasDashC = 1 -a $DoCompile = 0 -a $DoLink = 0 ] ; then + # Specified -c but no files. Try to force -c behavior from compiler + DoCompile=1 +fi # # One user has asked that # mpicxx -o foo mysources/foo.c --- mpich-1.2.7.orig/util/mpiinstall.in +++ mpich-1.2.7/util/mpiinstall.in @@ -942,13 +942,7 @@ MkDir $htmldir if [ -s $top_srcdir/www/index.html ] ; then # Some development versions don't include the www directories - # Be careful of the top-level directory. Some users may - # pick a top-level (e.g., /usr/doc/www) directory, and we - # do not want to replace index.html in that directory. - # This is a little more awkward for people who install - # into a separate directory, but it is more important not - # to overwrite a general index.html file - CopyFile $top_srcdir/www/index.html $htmldir/mpich.html + CopyFile $top_srcdir/www/index.html $htmldir # No files in www5 (was ADI routines) for dir1 in www1 www3 www4 ; do MkDir $htmldir/$dir1 --- mpich-1.2.7.orig/util/mpiman.in +++ mpich-1.2.7/util/mpiman.in @@ -26,17 +26,17 @@ set -x ;; -xmosaic) - program="xmosaic $htmldir/mpich.html" + program="xmosaic $htmldir/index.html" docdir=$htmldir mankind=HTML ;; -mosaic) - program="mosaic $htmldir/mpich.html" + program="mosaic $htmldir/index.html" docdir=$htmldir mankind=HTML ;; -netscape) - program="netscape $htmldir/mpich.html" + program="netscape $htmldir/index.html" docdir=$htmldir mankind=HTML ;; --- mpich-1.2.7.orig/util/mpirun.args.in +++ mpich-1.2.7/util/mpirun.args.in @@ -563,39 +563,39 @@ if [ -n "$AUTOMOUNTFIX" ] ; then # We have had some reports of problems in this step. We try not to # assume here that pwd works, or that the AUTOMOUNTFIX is correct - PWDtest=`pwd | $AUTOMOUNTFIX` + PWDtest="`pwd | $AUTOMOUNTFIX`" if [ ! -d "$PWDtest" ] ; then - PWDtest=`pwd` + PWDtest="`pwd`" elif [ -z "$PWDtest" ] ; then - PWDtest=`pwd` + PWDtest="`pwd`" fi if [ -n "$PWD" ] ; then # Use a process-specific filename - PWDtest2=`echo $PWD | $AUTOMOUNTFIX` - rm -f $PWDtest/.mpirtmp$$ $PWDtest2/.mpirtmp$$ - if `eval "echo test > $PWDtest2/.mpirtmp$$" 2>/dev/null` ; then + PWDtest2="`echo "$PWD" | $AUTOMOUNTFIX`" + rm -f "$PWDtest"/.mpirtmp$$ "$PWDtest2"/.mpirtmp$$ + if `eval "echo test > \"$PWDtest2\"/.mpirtmp$$" 2>/dev/null` ; then if [ ! -s "$PWDtest/.mpirtmp$$" ] ; then - rm -f $PWDtest2/.mpirtmp$$ - PWDreal=$PWDtest + rm -f "$PWDtest2"/.mpirtmp$$ + PWDreal="$PWDtest" else - PWDreal=$PWDtest2 + PWDreal="$PWDtest2" fi else # Current directory is not writable. Hope for the best - PWDreal=$PWDtest + PWDreal="$PWDtest" fi - rm -f $PWDtest/.mpirtmp$$ $PWDtest2/.mpirtmp$$ + rm -f "$PWDtest"/.mpirtmp$$ "$PWDtest2"/.mpirtmp$$ else - PWDreal=$PWDtest + PWDreal="$PWDtest" fi else - PWDreal=`pwd` + PWDreal="`pwd`" fi # if [ -n "$PWDreal" ] ; then - PWD_TRIAL=$PWDreal + PWD_TRIAL="$PWDreal" else - PWD_TRIAL=$PWDtest + PWD_TRIAL="$PWDtest" fi # The test for PWD_TRIAL usable is within the p4/execer test (since that # is where it matters) @@ -744,11 +744,11 @@ # message about the automounter unless we're using ch_p4 # if [ "$PWD_TRIAL" != "" ] ; then - PWD_TRIAL=`pwd | sed -e 's%/tmp_mnt/%/%g'` - if [ ! -d $PWD_TRIAL ] ; then + PWD_TRIAL="`pwd | sed -e 's%/tmp_mnt/%/%g'`" + if [ ! -d "$PWD_TRIAL" ] ; then echo "Warning: your default path uses the automounter; this may" echo "cause some problems if you use other NFS-connected systems." - PWD_TRIAL=`pwd` + PWD_TRIAL="`pwd`" fi fi fi @@ -760,7 +760,7 @@ while [ $cnt -le $narch ] ; do eval mp=\$"np$cnt" eval archm=\$"arch$cnt" - proginstance=`echo $progname | sed "s/%a/$archm/"` + proginstance="`echo "$progname" | sed "s/%a/$archm/"`" echo "running $proginstance on $mp $archm $machine processors" cnt=`expr $cnt + 1` done --- mpich-1.2.7.orig/MPI-2-C++/configure +++ mpich-1.2.7/MPI-2-C++/configure @@ -1516,6 +1516,16 @@ if test -z "$MPICH_BIN"; then { echo "configure: error: when configuring for 1.2.6, --with-mpichbin must be specified" 1>&2; exit 1; } fi + elif test "$MPICH_VERSION" = "1.2.7."; then + cat >> confdefs.h <<\EOF +#define MPI2CPP_MPICH121 1 +EOF + + echo "$ac_t""1.2.7 (good)" 1>&6 + WANT_UPGRADE=0 + if test -z "$MPICH_BIN"; then + { echo "configure: error: when configuring for 1.2.7, --with-mpichbin must be specified" 1>&2; exit 1; } + fi else cat >> confdefs.h <<\EOF #define MPI2CPP_MPICHUNKNOWN 1 @@ -2223,6 +2233,11 @@ LOCAL_CXXFLAGS_SAVE=$CXXFLAGS CXXFLAGS="$CXXFLAGS" +# +# Note that PROG_CXX looks in CCC, not CXX !! +if test -z "$CCC" -a -n "$CXX" ; then + CCC="$CXX" +fi for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl do # Extract the first word of "$ac_prog", so it can be a program name with args. --- mpich-1.2.7.orig/MPI-2-C++/configure.in +++ mpich-1.2.7/MPI-2-C++/configure.in @@ -463,6 +463,13 @@ if test -z "$MPICH_BIN"; then AC_MSG_ERROR([when configuring for 1.2.6, --with-mpichbin must be specified]) fi + elif test "$MPICH_VERSION" = "1.2.7."; then + AC_DEFINE(MPI2CPP_MPICH121) + AC_MSG_RESULT([1.2.7 (good)]) + WANT_UPGRADE=0 + if test -z "$MPICH_BIN"; then + AC_MSG_ERROR([when configuring for 1.2.7, --with-mpichbin must be specified]) + fi else AC_DEFINE(MPI2CPP_MPICHUNKNOWN, 1) AC_MSG_RESULT([unrecognized MPICH level -- good luck!]) @@ -1005,6 +1012,11 @@ LOCAL_CXXFLAGS_SAVE=$CXXFLAGS CXXFLAGS="$CXXFLAGS" +# +# Note that PROG_CXX looks in CCC, not CXX !! +if test -z "$CCC" -a -n "$CXX" ; then + CCC="$CXX" +fi AC_PROG_CXX AC_PROG_CXXCPP CXXFLAGS="$LOCAL_CXXFLAGS_SAVE" --- mpich-1.2.7.orig/romio/.codingcheck +++ mpich-1.2.7/romio/.codingcheck @@ -1,50 +1,55 @@ -# Here are names that at least at one point were used within ROMIO. -# We should look at these and decide which we wish to allow and which -# should be replaced with something more ROMIO-specific. -%romioDefines = ( 'ROMIO_[A-Za-z0-9_]+' => romio, - 'PROFILE' => romio, - 'PRINT_ERR_MSG' => romio, - 'HPUX' => romio, - 'SPPUX'=> romio, - 'SX4'=> romio, - 'AIO_SUN'=> romio, - 'AIO_HANDLE_IN_AIOCB'=> romio, - 'NO_FD_IN_AIOCB'=> romio, - 'NO_AIO'=> romio, - 'AIO_PRIORITY_DEFAULT'=> romio, - 'AIO_SIGNOTIFY_NONE'=> romio, - 'MPISGI'=> romio, - 'CRAY'=> romio, - 'PARAGON'=> romio, - 'FREEBSD'=> romio, - 'LINUX'=> romio, - 'tflops'=> romio, - 'NFS'=> romio, - 'XFS'=> romio, - 'CB_CONFIG_LIST_DEBUG'=> romio, - 'SFS'=> romio, - 'HFS'=> romio, - 'UFS'=> romio, - 'PVFS_.+' => romio, - 'MPI_hpux'=> romio, - 'FORTRANCAPS'=> romio, - 'MPILAM'=> romio, - 'NEEDS_ADIOCB_T'=> romio, - 'AGG_DEBUG'=> romio, - 'SOLARIS'=> romio, - 'IRIX'=> romio, - 'AIX'=> romio, - 'DEC'=> romio, - 'NEEDS_MPI_TEST'=> romio, - 'PFS'=> romio, - 'PIOFS'=> romio, - 'MPICH'=> romio, - 'MPICH2' => romio, - 'MPI_OFFSET_IS_INT'=> romio, - 'MPI_COMBINER_NAMED'=> romio, - '_UNICOS'=> romio, - 'MPIHP'=> romio, - ); - -&PushDefinesNames( "romioDefines", "tree", "add" ); - \ No newline at end of file +# Here are names that at least at one point were used within ROMIO. +# We should look at these and decide which we wish to allow and which +# should be replaced with something more ROMIO-specific. +%romioDefines = ( 'ROMIO_[A-Za-z0-9_]+' => romio, + 'PROFILE' => romio, + 'PRINT_ERR_MSG' => romio, + 'HPUX' => romio, + 'SPPUX'=> romio, + 'SX4'=> romio, + 'AIO_SUN'=> romio, + 'AIO_HANDLE_IN_AIOCB'=> romio, + 'NO_FD_IN_AIOCB'=> romio, + 'NO_AIO'=> romio, + 'AIO_PRIORITY_DEFAULT'=> romio, + 'AIO_SIGNOTIFY_NONE'=> romio, + 'MPISGI'=> romio, + 'CRAY'=> romio, + 'PARAGON'=> romio, + 'FREEBSD'=> romio, + 'LINUX'=> romio, + 'tflops'=> romio, + 'NFS'=> romio, + 'XFS'=> romio, + 'CB_CONFIG_LIST_DEBUG'=> romio, + 'SFS'=> romio, + 'HFS'=> romio, + 'UFS'=> romio, + 'PVFS_.+' => romio, + 'MPI_hpux'=> romio, + 'FORTRANCAPS'=> romio, + 'MPILAM'=> romio, + 'NEEDS_ADIOCB_T'=> romio, + 'AGG_DEBUG'=> romio, + 'SOLARIS'=> romio, + 'IRIX'=> romio, + 'AIX'=> romio, + 'DEC'=> romio, + 'NEEDS_MPI_TEST'=> romio, + 'PFS'=> romio, + 'PIOFS'=> romio, + 'MPICH'=> romio, + 'MPICH2' => romio, + 'MPI_OFFSET_IS_INT'=> romio, + 'MPI_COMBINER_NAMED'=> romio, + '_UNICOS'=> romio, + 'MPIHP'=> romio, + ); + +# Only invoke this function if the function is defined (in case the +# user removed the cpp defines check with -rmchecks=cppdefines) +if (defined(&PushDefinesNames)) { + &PushDefinesNames( "romioDefines", "tree", "add" ); +} + +1; --- mpich-1.2.7.orig/romio/configure +++ mpich-1.2.7/romio/configure @@ -852,6 +852,7 @@ --enable-aio - Request use of asynchronous I/O routines (default) --enable-echo - Turn on strong echoing. The default is enable=no. --enable-f77 - Turn on support for Fortran 77 (default) +--enable-f90 - Turn on support for Fortran 90 (default) --enable-weak-symbols - Turn on support for weak symbols --enable-debug - Build a debugging version @@ -1323,6 +1324,7 @@ NOF77=0 +NOF90=0 ARCH="" arch_IRIX="" MPI="" @@ -1427,6 +1429,13 @@ else enable_f77=yes fi; +# Check whether --enable-f90 or --disable-f90 was given. +if test "${enable_f90+set}" = set; then + enableval="$enable_f90" + +else + enable_f90=yes +fi; # Check whether --enable-weak-symbols or --disable-weak-symbols was given. if test "${enable_weak_symbols+set}" = set; then enableval="$enable_weak_symbols" @@ -1454,6 +1463,9 @@ if test "$enable_f77" != "yes" ; then NOF77=1 fi +if test "$enable_f90" != "yes" ; then + NOF90=1 +fi if test "$enable_debug" = "yes" ; then DEBUG=yes fi @@ -2943,7 +2955,7 @@ # Provide some information about the compiler. -echo "$as_me:2946:" \ +echo "$as_me:2958:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6029,7 +6041,7 @@ MPI_OFFSET_KIND1=" INTEGER MPI_OFFSET_KIND" MPI_OFFSET_KIND2=" PARAMETER (MPI_OFFSET_KIND=$OFFSET_KIND)" else - if test "$FORTRAN_MPI_OFFSET" = "integer*8" && test "A$MPI_OFFSET_KIND2" = "A!" && test $NOF77 = 0 ; then + if test "$FORTRAN_MPI_OFFSET" = "integer*8" && test "A$MPI_OFFSET_KIND2" = "A!" && test $NOF77 = 0 && test $NOF90 = 0 ; then rm -f conftest* # Determine the extension for Fortran 90 files (not all compilers accept # .f and not all accept .f90) @@ -6146,7 +6158,7 @@ fi # - if test "$FORTRAN_MPI_OFFSET" = "integer" && test "A$MPI_OFFSET_KIND2" = "A!" && test $NOF77 = 0 ; then + if test "$FORTRAN_MPI_OFFSET" = "integer" && test "A$MPI_OFFSET_KIND2" = "A!" && test $NOF77 = 0 && test $NOF90 = 0 ; then echo "$as_me:$LINENO: checking for Fortran 90 KIND parameter for 4-byte integers" >&5 echo $ECHO_N "checking for Fortran 90 KIND parameter for 4-byte integers... $ECHO_C" >&6 rm -f kind.f kind.o kind @@ -7075,6 +7087,15 @@ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF +cat >>confdefs.h <<\_ACEOF +#define ROMIO_PVFS2 1 +_ACEOF + +else + { { echo "$as_me:$LINENO: error: PVFS support requested but cannot find pvfs.h header file" >&5 +echo "$as_me: error: PVFS support requested but cannot find pvfs.h header file" >&2;} + { (exit 1); exit 1; }; } + fi done @@ -10191,7 +10212,7 @@ USER_CFLAGS="" USER_FFLAGS="" TEST_LIBNAME="" - MPIRUN=${master_top_builddir}/mpiexec + MPIRUN=${master_top_builddir}/bin/mpiexec # # Turn off the building of the Fortran interface and the Info routines EXTRA_DIRS="" @@ -10454,6 +10475,173 @@ fi +for ac_func in snprintf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +if test "$ac_cv_func_snprintf" = "yes" ; then + # Do we need to declare snprintf? + +echo "$as_me:$LINENO: checking whether snprintf needs a declaration" >&5 +echo $ECHO_N "checking whether snprintf needs a declaration... $ECHO_C" >&6 +if test "${pac_cv_func_decl_snprintf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +int a=snprintf(1.0,27,1.0,"foo"); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + pac_cv_func_decl_snprintf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +pac_cv_func_decl_snprintf=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $pac_cv_func_decl_snprintf" >&5 +echo "${ECHO_T}$pac_cv_func_decl_snprintf" >&6 +if test "$pac_cv_func_decl_snprintf" = "yes" ; then + +cat >>confdefs.h <<_ACEOF +#define NEEDS_SNPRINTF_DECL 1 +_ACEOF + + +fi + +fi + for ac_func in lstat do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -11165,6 +11353,286 @@ F77MPIOINC="include 'mpiof.h'" fi + +echo "$as_me:$LINENO: checking for restrict" >&5 +echo $ECHO_N "checking for restrict... $ECHO_C" >&6 +if test "${pac_cv_c_restrict+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +int * restrict a; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + pac_cv_c_restrict="restrict" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +pac_cv_c_restrict="no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +if test "$pac_cv_c_restrict" = "no" ; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +int * _Restrict a; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + pac_cv_c_restrict="_Restrict" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +pac_cv_c_restrict="no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +if test "$pac_cv_c_restrict" = "no" ; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +int * __restrict a; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + pac_cv_c_restrict="__restrict" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +pac_cv_c_restrict="no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +fi +echo "$as_me:$LINENO: result: $pac_cv_c_restrict" >&5 +echo "${ECHO_T}$pac_cv_c_restrict" >&6 +if test "$pac_cv_c_restrict" = "no" ; then + restrict_val="" +elif test "$pac_cv_c_restrict" != "restrict" ; then + restrict_val=$pac_cv_c_restrict +fi +if test "$restrict_val" != "restrict" ; then + +cat >>confdefs.h <<_ACEOF +#define restrict $restrict_val +_ACEOF + +fi + + + + +if test "$ac_cv_c_compiler_gnu" = "yes" ; then + echo "$as_me:$LINENO: checking whether __attribute__ allowed" >&5 +echo $ECHO_N "checking whether __attribute__ allowed... $ECHO_C" >&6 +if test "${pac_cv_gnu_attr_pure+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int foo(int) __attribute__ ((pure)); +int +main () +{ +int a; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + pac_cv_gnu_attr_pure=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +pac_cv_gnu_attr_pure=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $pac_cv_gnu_attr_pure" >&5 +echo "${ECHO_T}$pac_cv_gnu_attr_pure" >&6 +echo "$as_me:$LINENO: checking whether __attribute__((format)) allowed" >&5 +echo $ECHO_N "checking whether __attribute__((format)) allowed... $ECHO_C" >&6 +if test "${pac_cv_gnu_attr_format+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int foo(char *,...) __attribute__ ((format(printf,1,2))); +int +main () +{ +int a; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + pac_cv_gnu_attr_format=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +pac_cv_gnu_attr_format=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $pac_cv_gnu_attr_format" >&5 +echo "${ECHO_T}$pac_cv_gnu_attr_format" >&6 + if test "$pac_cv_gnu_attr_pure" = "yes" -a "$pac_cv_gnu_attr_format" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GCC_ATTRIBUTE 1 +_ACEOF + + fi +fi + + echo "setting CC to $CC" echo "setting F77 to $F77" echo "setting TEST_CC to $TEST_CC" --- mpich-1.2.7.orig/romio/README +++ mpich-1.2.7/romio/README @@ -1,9 +1,12 @@ ROMIO: A High-Performance, Portable MPI-IO Implementation - Version , + Version 2005-06-09 Major Changes in this version: ------------------------------ +* Fixed performance problems with the darray and subarray datatypes + when using MPICH2. + * Better support for building against existing MPICH and MPICH2 versions. When building against an existing MPICH installation, use the --- mpich-1.2.7.orig/romio/aclocal.m4 +++ mpich-1.2.7/romio/aclocal.m4 @@ -876,4 +876,113 @@ fi ])dnl dnl +dnl/*D +dnl PAC_C_RESTRICT - Check if C supports restrict +dnl +dnl Synopsis: +dnl PAC_C_RESTRICT +dnl +dnl Output Effect: +dnl Defines 'restrict' if some version of restrict is supported; otherwise +dnl defines 'restrict' as empty. This allows you to include 'restrict' in +dnl declarations in the same way that 'AC_C_CONST' allows you to use 'const' +dnl in declarations even when the C compiler does not support 'const' +dnl +dnl Note that some compilers accept restrict only with additional options. +dnl DEC/Compaq/HP Alpha Unix (Tru64 etc.) -accept restrict_keyword +dnl +dnl D*/ +AC_DEFUN(PAC_C_RESTRICT,[ +AC_CACHE_CHECK([for restrict], +pac_cv_c_restrict,[ +AC_TRY_COMPILE(,[int * restrict a;],pac_cv_c_restrict="restrict", +pac_cv_c_restrict="no") +if test "$pac_cv_c_restrict" = "no" ; then + AC_TRY_COMPILE(,[int * _Restrict a;],pac_cv_c_restrict="_Restrict", + pac_cv_c_restrict="no") +fi +if test "$pac_cv_c_restrict" = "no" ; then + AC_TRY_COMPILE(,[int * __restrict a;],pac_cv_c_restrict="__restrict", + pac_cv_c_restrict="no") +fi +]) +if test "$pac_cv_c_restrict" = "no" ; then + restrict_val="" +elif test "$pac_cv_c_restrict" != "restrict" ; then + restrict_val=$pac_cv_c_restrict +fi +if test "$restrict_val" != "restrict" ; then + AC_DEFINE_UNQUOTED(restrict,$restrict_val,[if C does not support restrict]) +fi +])dnl +dnl +dnl +dnl +dnl This is a replacement for AC_PROG_CC that does not prefer gcc and +dnl that does not mess with CFLAGS. See acspecific.m4 for the original defn. +dnl +dnl/*D +dnl PAC_PROG_CC - Find a working C compiler +dnl +dnl Synopsis: +dnl PAC_PROG_CC +dnl +dnl Output Effect: +dnl Sets the variable CC if it is not already set +dnl +dnl Notes: +dnl Unlike AC_PROG_CC, this does not prefer gcc and does not set CFLAGS. +dnl It does check that the compiler can compile a simple C program. +dnl It also sets the variable GCC to yes if the compiler is gcc. It does +dnl not yet check for some special options needed in particular for +dnl parallel computers, such as -Tcray-t3e, or special options to get +dnl full ANSI/ISO C, such as -Aa for HP. +dnl +dnl D*/ +dnl 2.52 doesn't have AC_PROG_CC_GNU +ifdef([AC_PROG_CC_GNU],,[AC_DEFUN([AC_PROG_CC_GNU],)]) +AC_DEFUN(PAC_PROG_CC,[ +AC_PROVIDE([AC_PROG_CC]) +AC_CHECK_PROGS(CC, cc xlC xlc pgcc icc gcc ) +test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) +PAC_PROG_CC_WORKS +AC_PROG_CC_GNU +if test "$ac_cv_prog_gcc" = yes; then + GCC=yes +else + GCC= +fi +]) +dnl +dnl +dnl PAC_C_GNU_ATTRIBUTE - See if the GCC __attribute__ specifier is allow. +dnl Use the following +dnl #ifndef HAVE_GCC_ATTRIBUTE +dnl #define __attribute__(a) +dnl #endif +dnl If *not*, define __attribute__(a) as null +dnl +dnl We start by requiring Gcc. Some other compilers accept __attribute__ +dnl but generate warning messages, or have different interpretations +dnl (which seems to make __attribute__ just as bad as #pragma) +dnl For example, the Intel icc compiler accepts __attribute__ and +dnl __attribute__((pure)) but generates warnings for __attribute__((format...)) +dnl +AC_DEFUN([PAC_C_GNU_ATTRIBUTE],[ +AC_REQUIRE([AC_PROG_CC_GNU]) +if test "$ac_cv_prog_gcc" = "yes" ; then + AC_CACHE_CHECK([whether __attribute__ allowed], +pac_cv_gnu_attr_pure,[ +AC_TRY_COMPILE([int foo(int) __attribute__ ((pure));],[int a;], +pac_cv_gnu_attr_pure=yes,pac_cv_gnu_attr_pure=no)]) +AC_CACHE_CHECK([whether __attribute__((format)) allowed], +pac_cv_gnu_attr_format,[ +AC_TRY_COMPILE([int foo(char *,...) __attribute__ ((format(printf,1,2)));],[int a;], +pac_cv_gnu_attr_format=yes,pac_cv_gnu_attr_format=no)]) + if test "$pac_cv_gnu_attr_pure" = "yes" -a "$pac_cv_gnu_attr_format" = "yes" ; then + AC_DEFINE(HAVE_GCC_ATTRIBUTE,1,[Define if GNU __attribute__ is supported]) + fi +fi +]) +dnl --- mpich-1.2.7.orig/romio/configure.in +++ mpich-1.2.7/romio/configure.in @@ -18,6 +18,7 @@ dnl NOF77=0 +NOF90=0 ARCH="" arch_IRIX="" MPI="" @@ -109,6 +110,8 @@ [--enable-echo - Turn on strong echoing. The default is enable=no.] ,set -x) AC_ARG_ENABLE(f77, [--enable-f77 - Turn on support for Fortran 77 (default)],,enable_f77=yes) +AC_ARG_ENABLE(f90, +[--enable-f90 - Turn on support for Fortran 90 (default)],,enable_f90=yes) AC_ARG_ENABLE(weak-symbols, [--enable-weak-symbols - Turn on support for weak symbols],,enable_weak_symbols=yes) AC_ARG_ENABLE(debug, @@ -121,6 +124,9 @@ if test "$enable_f77" != "yes" ; then NOF77=1 fi +if test "$enable_f90" != "yes" ; then + NOF90=1 +fi if test "$enable_debug" = "yes" ; then DEBUG=yes fi @@ -769,11 +775,11 @@ MPI_OFFSET_KIND1=" INTEGER MPI_OFFSET_KIND" MPI_OFFSET_KIND2=" PARAMETER (MPI_OFFSET_KIND=$OFFSET_KIND)" else - if test "$FORTRAN_MPI_OFFSET" = "integer*8" && test "A$MPI_OFFSET_KIND2" = "A!" && test $NOF77 = 0 ; then + if test "$FORTRAN_MPI_OFFSET" = "integer*8" && test "A$MPI_OFFSET_KIND2" = "A!" && test $NOF77 = 0 && test $NOF90 = 0 ; then PAC_MPI_OFFSET_KIND fi # - if test "$FORTRAN_MPI_OFFSET" = "integer" && test "A$MPI_OFFSET_KIND2" = "A!" && test $NOF77 = 0 ; then + if test "$FORTRAN_MPI_OFFSET" = "integer" && test "A$MPI_OFFSET_KIND2" = "A!" && test $NOF77 = 0 && test $NOF90 = 0 ; then PAC_MPI_OFFSET_KIND_4BYTE fi fi @@ -1030,7 +1036,10 @@ # if test -n "$file_system_pvfs"; then CPPFLAGS="$CPPFLAGS $CFLAGS" - AC_CHECK_HEADERS(pvfs.h) + AC_CHECK_HEADERS(pvfs.h, + AC_DEFINE(ROMIO_PVFS2,1,[Define for ROMIO with PVFS]), + AC_MSG_ERROR([PVFS support requested but cannot find pvfs.h header file]) + ) # Check for missing int64_t (intel version 8 compiler and -no-gcc # selected) AC_MSG_CHECKING([that pvfs.h can be compiled]) @@ -1681,7 +1690,7 @@ USER_CFLAGS="" USER_FFLAGS="" TEST_LIBNAME="" - MPIRUN=${master_top_builddir}/mpiexec + MPIRUN=${master_top_builddir}/bin/mpiexec # # Turn off the building of the Fortran interface and the Info routines EXTRA_DIRS="" @@ -1711,6 +1720,11 @@ # Do we need to declare strdup? PAC_FUNC_NEEDS_DECL([#include ],strdup) fi +AC_CHECK_FUNCS(snprintf) +if test "$ac_cv_func_snprintf" = "yes" ; then + # Do we need to declare snprintf? + PAC_FUNC_NEEDS_DECL([#include ],snprintf) +fi AC_CHECK_FUNCS(lstat) if test "$ac_cv_func_lstat" = "yes" ; then # Do we need to declare lstat? @@ -1775,6 +1789,9 @@ F77MPIOINC="include 'mpiof.h'" fi +PAC_C_RESTRICT +PAC_C_GNU_ATTRIBUTE + echo "setting CC to $CC" echo "setting F77 to $F77" echo "setting TEST_CC to $TEST_CC" --- mpich-1.2.7.orig/romio/adio/ad_gridftp/ad_gridftp.c +++ mpich-1.2.7/romio/adio/ad_gridftp/ad_gridftp.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_gridftp.c,v 1.2 2005/05/23 23:27:38 rross Exp $ * * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_gridftp/ad_gridftp_close.c +++ mpich-1.2.7/romio/adio/ad_gridftp/ad_gridftp_close.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_gridftp_close.c,v 1.2 2005/05/23 23:27:38 rross Exp $ * * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_gridftp/ad_gridftp_delete.c +++ mpich-1.2.7/romio/adio/ad_gridftp/ad_gridftp_delete.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_gridftp_delete.c,v 1.3 2005/05/24 17:59:18 thakur Exp $ * * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. @@ -17,7 +16,7 @@ if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); } else { --- mpich-1.2.7.orig/romio/adio/ad_gridftp/ad_gridftp_fcntl.c +++ mpich-1.2.7/romio/adio/ad_gridftp/ad_gridftp_fcntl.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_gridftp_fcntl.c,v 1.3 2005/05/24 17:59:19 thakur Exp $ * * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. @@ -19,7 +18,7 @@ { if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); } globus_mutex_lock(&fcntl_size_lock); fcntl_size_done=GLOBUS_TRUE; --- mpich-1.2.7.orig/romio/adio/ad_gridftp/ad_gridftp_flush.c +++ mpich-1.2.7/romio/adio/ad_gridftp/ad_gridftp_flush.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_gridftp_flush.c,v 1.2 2005/05/23 23:27:38 rross Exp $ * * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_gridftp/ad_gridftp_hints.c +++ mpich-1.2.7/romio/adio/ad_gridftp/ad_gridftp_hints.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_gridftp_hints.c,v 1.2 2005/05/23 23:27:39 rross Exp $ * * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_gridftp/ad_gridftp_open.c +++ mpich-1.2.7/romio/adio/ad_gridftp/ad_gridftp_open.c @@ -15,7 +15,7 @@ { if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); } else { @@ -29,7 +29,7 @@ { if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); } globus_mutex_lock(&lock); touch_ctl_done=GLOBUS_TRUE; @@ -42,7 +42,7 @@ globus_bool_t eof) { if (error) - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); globus_ftp_client_register_read(handle,buffer,length,touch_data_cb,myargs); return; } @@ -232,7 +232,7 @@ } } else - fprintf(stderr,"no MPI_Info object associated with %s\n",fd->filename); + FPRINTF(stderr,"no MPI_Info object associated with %s\n",fd->filename); /* Create the ftp handle */ result=globus_ftp_client_handle_init(&(gridftp_fh[fd->fd_sys]),&hattr) @@ -336,7 +336,7 @@ { if ( myrank==0 ) { - fprintf(stderr,"WARNING: read-only file %s does not exist!\n",fd->filename); + FPRINTF(stderr,"WARNING: read-only file %s does not exist!\n",fd->filename); } } num_gridftp_handles++; @@ -350,71 +350,71 @@ globus_ftp_control_type_t filetype; globus_ftp_control_parallelism_t parallelism; - fprintf(stderr,"--gridftp details for %s--\n", + FPRINTF(stderr,"--gridftp details for %s--\n", fd->filename); /* - fprintf(stderr,"Connection caching: "); + FPRINTF(stderr,"Connection caching: "); globus_ftp_client_handleattr_get_cache_all(&hattr,&cached); if ( cached==GLOBUS_TRUE ) - fprintf(stderr,"Y\n"); + FPRINTF(stderr,"Y\n"); else - fprintf(stderr,"N\n"); + FPRINTF(stderr,"N\n"); */ - fprintf(stderr,"Control mode: "); + FPRINTF(stderr,"Control mode: "); globus_ftp_client_operationattr_get_mode(&(oattr[fd->fd_sys]),&mode); if ( mode==GLOBUS_FTP_CONTROL_MODE_BLOCK ) - fprintf(stderr,"block\n"); + FPRINTF(stderr,"block\n"); else if ( mode==GLOBUS_FTP_CONTROL_MODE_COMPRESSED ) - fprintf(stderr,"compressed\n"); + FPRINTF(stderr,"compressed\n"); else if ( mode==GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK ) - fprintf(stderr,"extended block\n"); + FPRINTF(stderr,"extended block\n"); else if ( mode==GLOBUS_FTP_CONTROL_MODE_STREAM ) - fprintf(stderr,"stream\n"); + FPRINTF(stderr,"stream\n"); else - fprintf(stderr,"unknown\n"); + FPRINTF(stderr,"unknown\n"); - fprintf(stderr,"File type: "); + FPRINTF(stderr,"File type: "); globus_ftp_client_operationattr_get_type(&(oattr[fd->fd_sys]),&filetype); if ( filetype==GLOBUS_FTP_CONTROL_TYPE_ASCII ) - fprintf(stderr,"ASCII\n"); + FPRINTF(stderr,"ASCII\n"); else if ( filetype==GLOBUS_FTP_CONTROL_TYPE_IMAGE ) - fprintf(stderr,"binary\n"); + FPRINTF(stderr,"binary\n"); else if ( filetype==GLOBUS_FTP_CONTROL_TYPE_EBCDIC ) - fprintf(stderr,"EBCDIC\n"); + FPRINTF(stderr,"EBCDIC\n"); else - fprintf(stderr,"unknown\n"); + FPRINTF(stderr,"unknown\n"); - fprintf(stderr,"Parallelism: "); + FPRINTF(stderr,"Parallelism: "); globus_ftp_client_operationattr_get_parallelism(&(oattr[fd->fd_sys]),¶llelism); if ( parallelism.mode==GLOBUS_FTP_CONTROL_PARALLELISM_NONE ) - fprintf(stderr,"none\n"); + FPRINTF(stderr,"none\n"); else if ( parallelism.mode==GLOBUS_FTP_CONTROL_PARALLELISM_FIXED ) - fprintf(stderr,"fixed with %d streams\n",parallelism.fixed.size); + FPRINTF(stderr,"fixed with %d streams\n",parallelism.fixed.size); else - fprintf(stderr,"unknown\n"); + FPRINTF(stderr,"unknown\n"); - fprintf(stderr,"Striping: "); + FPRINTF(stderr,"Striping: "); globus_ftp_client_operationattr_get_striped(&(oattr[fd->fd_sys]),&striped); if ( striped==GLOBUS_TRUE ) { globus_ftp_control_layout_t layout; - fprintf(stderr,"Y\nLayout: "); + FPRINTF(stderr,"Y\nLayout: "); globus_ftp_client_operationattr_get_layout(&(oattr[fd->fd_sys]), &layout); if ( layout.mode==GLOBUS_FTP_CONTROL_STRIPING_NONE ) - fprintf(stderr,"none\n"); + FPRINTF(stderr,"none\n"); else if ( layout.mode==GLOBUS_FTP_CONTROL_STRIPING_PARTITIONED ) - fprintf(stderr,"partitioned, size=%d\n",layout.partitioned.size); + FPRINTF(stderr,"partitioned, size=%d\n",layout.partitioned.size); else if ( layout.mode==GLOBUS_FTP_CONTROL_STRIPING_BLOCKED_ROUND_ROBIN ) - fprintf(stderr,"round-robin, block size=%d\n",layout.round_robin.block_size); + FPRINTF(stderr,"round-robin, block size=%d\n",layout.round_robin.block_size); else - fprintf(stderr,"unknown\n"); + FPRINTF(stderr,"unknown\n"); } else - fprintf(stderr,"N\n"); + FPRINTF(stderr,"N\n"); fflush(stderr); } --- mpich-1.2.7.orig/romio/adio/ad_gridftp/ad_gridftp_read.c +++ mpich-1.2.7/romio/adio/ad_gridftp/ad_gridftp_read.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_gridftp_read.c,v 1.3 2005/05/24 17:59:19 thakur Exp $ * * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. @@ -17,7 +16,7 @@ { if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); } globus_mutex_lock(&readcontig_ctl_lock); if ( readcontig_ctl_done!=GLOBUS_TRUE ) @@ -36,7 +35,7 @@ bytes_read=(globus_size_t *)myargs; if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); } *bytes_read+=length; /* I don't understand why the data callback has to keep recalling register_read, @@ -52,7 +51,7 @@ readcontig_data_cb: buffer 0x404d0008 length 65536 offset 32178176 eof 0 */ #if 0 - fprintf(stderr, "%s: buffer %p length %d offset %Ld eof %d\n", + FPRINTF(stderr, "%s: buffer %p length %d offset %Ld eof %d\n", __func__, buffer, length, offset, eof); #endif if ( !eof ) @@ -71,7 +70,7 @@ { if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); } globus_mutex_lock(&readdiscontig_ctl_lock); if ( readdiscontig_ctl_done!=GLOBUS_TRUE ) @@ -90,7 +89,7 @@ bytes_read=(globus_size_t *)myargs; if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); } *bytes_read+=length; /* I don't understand why the data callback has to keep recalling register_read, @@ -280,7 +279,7 @@ } if ( extent < count*btype_size ) { - fprintf(stderr,"[%d/%d] %s error in computing extent -- extent %d is smaller than total bytes requested %d!\n", + FPRINTF(stderr,"[%d/%d] %s error in computing extent -- extent %d is smaller than total bytes requested %d!\n", myrank,nprocs,myname,extent,count*btype_size); fflush(stderr); *error_code = MPIO_Err_create_code(MPI_SUCCESS, @@ -289,7 +288,7 @@ return; } end=start+(globus_off_t)extent; - tmp=(globus_byte_t *)malloc((size_t)extent*sizeof(globus_byte_t)); + tmp=(globus_byte_t *)ADIOI_Malloc((size_t)extent*sizeof(globus_byte_t)); /* start up the globus partial read */ globus_mutex_init(&readdiscontig_ctl_lock, GLOBUS_NULL); @@ -367,7 +366,7 @@ } nblks++; } - free(tmp); + ADIOI_Free(tmp); #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bytes_read); @@ -436,14 +435,14 @@ int posn=0; /* read contiguous data into intermediate buffer */ - intermediate=(globus_byte_t *)malloc((size_t)bufsize); + intermediate=(globus_byte_t *)ADIOI_Malloc((size_t)bufsize); ADIOI_GRIDFTP_ReadContig(fd, intermediate, bufsize, MPI_BYTE, file_ptr_type, offset, status, error_code); /* explode contents of intermediate buffer into main buffer */ MPI_Unpack(intermediate,bufsize,&posn,buf,count,datatype,fd->comm); - free(intermediate); + ADIOI_Free(intermediate); } else if ( !buf_contig && !file_contig ) { @@ -451,7 +450,7 @@ int posn=0; /* Read discontiguous data into intermediate buffer */ - intermediate=(globus_byte_t *)malloc((size_t)bufsize); + intermediate=(globus_byte_t *)ADIOI_Malloc((size_t)bufsize); ADIOI_GRIDFTP_ReadDiscontig(fd, intermediate, bufsize, MPI_BYTE, file_ptr_type, offset, status, error_code); @@ -459,7 +458,7 @@ posn=0; MPI_Unpack(intermediate,bufsize,&posn,buf,count,datatype,fd->comm); - free(intermediate); + ADIOI_Free(intermediate); } else { --- mpich-1.2.7.orig/romio/adio/ad_gridftp/ad_gridftp_resize.c +++ mpich-1.2.7/romio/adio/ad_gridftp/ad_gridftp_resize.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_gridftp_resize.c,v 1.2 2005/05/23 23:27:39 rross Exp $ * * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. @@ -19,7 +18,7 @@ { if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); globus_mutex_lock(&resize_lock); resize_success=GLOBUS_FALSE; globus_mutex_unlock(&resize_lock); @@ -42,7 +41,7 @@ globus_bool_t eof) { if (error) - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); if (!eof) globus_ftp_client_register_read(handle, buffer, @@ -68,7 +67,7 @@ /* Sanity check */ if ( fd->access_mode&MPI_MODE_RDONLY ) { - fprintf(stderr,"%s: attempt to resize read-only file %s!\n", + FPRINTF(stderr,"%s: attempt to resize read-only file %s!\n", myname,fd->filename); *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, @@ -150,8 +149,8 @@ size_t urllen; urllen=strlen(fd->filename); - urlold=(char *)malloc(urllen+5); - sprintf(urlold,"%s.old",fd->filename); + urlold=(char *)ADIOI_Malloc(urllen+5); + ADIOI_Snprintf(urlold,urllen+5,"%s.old",fd->filename); resize_done=GLOBUS_FALSE; resize_success=GLOBUS_FALSE; if ( (result=globus_ftp_client_move(&(gridftp_fh[fd->fd_sys]), @@ -230,6 +229,7 @@ ADIOI_Error(fd,*error_code,myname); return; } + ADIOI_Free(urlold); } globus_mutex_destroy(&resize_lock); globus_cond_destroy(&resize_cond); --- mpich-1.2.7.orig/romio/adio/ad_gridftp/ad_gridftp_write.c +++ mpich-1.2.7/romio/adio/ad_gridftp/ad_gridftp_write.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_gridftp_write.c,v 1.2 2005/05/23 23:27:39 rross Exp $ * * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. @@ -17,7 +16,7 @@ { if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); } globus_mutex_lock(&writecontig_ctl_lock); if ( writecontig_ctl_done!=GLOBUS_TRUE ) @@ -25,7 +24,7 @@ globus_cond_signal(&writecontig_ctl_cond); globus_mutex_unlock(&writecontig_ctl_lock); #ifdef PRINT_ERR_MSG - fprintf(stderr,"finished with contig write transaction\n"); + FPRINTF(stderr,"finished with contig write transaction\n"); #endif /* PRINT_ERR_MSG */ return; } @@ -39,7 +38,7 @@ bytes_written=(globus_size_t *)myargs; if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); } *bytes_written+=length; /* I don't understand why the data callback has to keep recalling register_write, @@ -56,7 +55,7 @@ (void *)(bytes_written)); } #ifdef PRINT_ERR_MSG - fprintf(stderr,"wrote %Ld bytes...",(long long)length); + FPRINTF(stderr,"wrote %Ld bytes...",(long long)length); #endif /* PRINT_ERR_MSG */ return; } @@ -69,7 +68,7 @@ { if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); } globus_mutex_lock(&writediscontig_ctl_lock); if ( writediscontig_ctl_done!=GLOBUS_TRUE ) @@ -88,7 +87,7 @@ bytes_written=(globus_size_t *)myargs; if (error) { - fprintf(stderr, "%s\n", globus_object_printable_to_string(error)); + FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); } *bytes_written+=length; /* I don't understand why the data callback has to keep recalling register_read, @@ -102,7 +101,7 @@ eof, writediscontig_data_cb, (void *)(bytes_written)); - fprintf(stderr,"wrote %Ld bytes...",(long long)length); + FPRINTF(stderr,"wrote %Ld bytes...",(long long)length); return; } @@ -230,7 +229,7 @@ if ( ( btype_extent!=btype_size ) || ( ! buf_contig ) ) { - fprintf(stderr,"[%d/%d] %s called with discontigous memory buffer\n", + FPRINTF(stderr,"[%d/%d] %s called with discontigous memory buffer\n", myrank,nprocs,myname); fflush(stderr); *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, @@ -273,7 +272,7 @@ } if ( extent < count*btype_size ) { - fprintf(stderr,"[%d/%d] %s error in computing extent -- extent %d is smaller than total bytes requested %d!\n", + FPRINTF(stderr,"[%d/%d] %s error in computing extent -- extent %d is smaller than total bytes requested %d!\n", myrank,nprocs,myname,extent,count*btype_size); fflush(stderr); *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, @@ -283,7 +282,7 @@ return; } end=start+(globus_off_t)extent; - fprintf(stderr,"[%d/%d] %s writing %d bytes into extent of %d bytes starting at offset %Ld\n", + FPRINTF(stderr,"[%d/%d] %s writing %d bytes into extent of %d bytes starting at offset %Ld\n", myrank,nprocs,myname,count*btype_size,extent,(long long)start); fflush(stderr); @@ -325,7 +324,7 @@ { goff=start+nblks*ftype_extent+((globus_off_t)flat_file->indices[i]); /* - fprintf(stderr,"[%d/%d] %s writing %d bytes from boff=%d at goff=%Ld\n",myrank,nprocs,myname,blklen,boff,goff); + FPRINTF(stderr,"[%d/%d] %s writing %d bytes from boff=%d at goff=%Ld\n",myrank,nprocs,myname,blklen,boff,goff); */ if ( (result=globus_ftp_client_register_write(&(gridftp_fh[fd->fd_sys]), ((globus_byte_t *)buf)+boff, @@ -418,7 +417,7 @@ if ( buf_contig && !file_contig ) { /* Contiguous in memory, discontig in file */ - fprintf(stderr,"[%d/%d] %s called w/ contig mem, discontig file\n", + FPRINTF(stderr,"[%d/%d] %s called w/ contig mem, discontig file\n", myrank,nprocs,myname); fflush(stderr); @@ -430,44 +429,44 @@ /* Discontiguous in mem, contig in file -- comparatively easy */ int posn=0; - fprintf(stderr,"[%d/%d] %s called w/ discontig mem, contig file\n", + FPRINTF(stderr,"[%d/%d] %s called w/ discontig mem, contig file\n", myrank,nprocs,myname); fflush(stderr); /* squeeze contents of main buffer into intermediate buffer*/ - intermediate=(globus_byte_t *)malloc((size_t)bufsize); + intermediate=(globus_byte_t *)ADIOI_Malloc((size_t)bufsize); MPI_Pack(buf,count,datatype,intermediate,bufsize,&posn,fd->comm); /* write contiguous data from intermediate buffer */ ADIOI_GRIDFTP_WriteContig(fd, intermediate, bufsize, MPI_BYTE, file_ptr_type, offset, status, error_code); - free(intermediate); + ADIOI_Free(intermediate); } else if ( !buf_contig && !file_contig ) { /* Discontig in both mem and file -- the hardest case */ int posn=0; - fprintf(stderr,"[%d/%d] %s called w/ discontig mem, discontig file\n", + FPRINTF(stderr,"[%d/%d] %s called w/ discontig mem, discontig file\n", myrank,nprocs,myname); fflush(stderr); /* squeeze contents of main buffer into intermediate buffer*/ - intermediate=(globus_byte_t *)malloc((size_t)bufsize); + intermediate=(globus_byte_t *)ADIOI_Malloc((size_t)bufsize); MPI_Pack(buf,count,datatype,intermediate,bufsize,&posn,fd->comm); /* write contiguous data from intermediate buffer */ ADIOI_GRIDFTP_WriteDiscontig(fd, intermediate, bufsize, MPI_BYTE, file_ptr_type, offset, status, error_code); - free(intermediate); + ADIOI_Free(intermediate); } else { /* Why did you bother calling WriteStrided?!?!?! */ - fprintf(stderr,"[%d/%d] Why the heck did you call %s with contiguous buffer *and* file types?\n", + FPRINTF(stderr,"[%d/%d] Why the heck did you call %s with contiguous buffer *and* file types?\n", myrank,nprocs,myname); ADIOI_GRIDFTP_WriteContig(fd, buf, count, datatype, file_ptr_type, offset, status, error_code); --- mpich-1.2.7.orig/romio/adio/ad_gridftp/globus_routines.c +++ mpich-1.2.7/romio/adio/ad_gridftp/globus_routines.c @@ -1,3 +1,10 @@ +/* -*- Mode: C; c-basic-offset:4 ; -*- */ +/* + * + * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. + * See COPYRIGHT notice in top-level directory. + */ + #include #include #include --- mpich-1.2.7.orig/romio/adio/ad_hfs/ad_hfs.c +++ mpich-1.2.7/romio/adio/ad_hfs/ad_hfs.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_hfs.c,v 1.5 2005/05/23 23:27:40 rross Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_hfs/ad_hfs.h +++ mpich-1.2.7/romio/adio/ad_hfs/ad_hfs.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_hfs.h,v 1.5 2004/10/04 15:50:49 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_hfs/ad_hfs_fcntl.c +++ mpich-1.2.7/romio/adio/ad_hfs/ad_hfs_fcntl.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_hfs_fcntl.c,v 1.15 2004/11/01 20:33:26 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_hfs/ad_hfs_open.c +++ mpich-1.2.7/romio/adio/ad_hfs/ad_hfs_open.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_hfs_open.c,v 1.11 2005/05/23 23:27:40 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_hfs/ad_hfs_read.c +++ mpich-1.2.7/romio/adio/ad_hfs/ad_hfs_read.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_hfs_read.c,v 1.11 2004/10/04 15:50:50 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_hfs/ad_hfs_resize.c +++ mpich-1.2.7/romio/adio/ad_hfs/ad_hfs_resize.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_hfs_resize.c,v 1.9 2003/04/18 20:14:54 David Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_hfs/ad_hfs_write.c +++ mpich-1.2.7/romio/adio/ad_hfs/ad_hfs_write.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_hfs_write.c,v 1.11 2004/10/04 15:50:51 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_nfs/Makefile.in +++ mpich-1.2.7/romio/adio/ad_nfs/Makefile.in @@ -30,8 +30,8 @@ .c.o: $(CC) $(CFLAGS) -c $< .c.lo: - $(C_COMPILE_SHL) $(CFLAGS) -c $< - @mv -f $*.o $*.lo + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o + @mv -f _s$*.o $*.lo $(LIBNAME): $(AD_NFS_OBJECTS) $(AR) $(LIBNAME) $(AD_NFS_OBJECTS) @@ -40,7 +40,6 @@ AD_NFS_LOOBJECTS=$(AD_NFS_OBJECTS:.o=.lo) $(SHLIBNAME).la: $(AD_NFS_LOOBJECTS) $(AR) $(SHLIBNAME).la $(AD_NFS_LOOBJECTS) - $(RANLIB) $(SHLIBNAME) coverage: -@for file in ${AD_NFS_OBJECTS:.o=.c} ; do \ --- mpich-1.2.7.orig/romio/adio/ad_nfs/ad_nfs.c +++ mpich-1.2.7/romio/adio/ad_nfs/ad_nfs.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_nfs.c,v 1.4 2004/10/04 15:50:51 robl Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_nfs/ad_nfs_fcntl.c +++ mpich-1.2.7/romio/adio/ad_nfs/ad_nfs_fcntl.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_nfs_fcntl.c,v 1.19 2004/11/01 21:59:41 ashton Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_nfs/ad_nfs_getsh.c +++ mpich-1.2.7/romio/adio/ad_nfs/ad_nfs_getsh.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_nfs_getsh.c,v 1.13 2004/10/04 15:50:52 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_nfs/ad_nfs_hints.c +++ mpich-1.2.7/romio/adio/ad_nfs/ad_nfs_hints.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_nfs_hints.c,v 1.4 2002/10/24 17:00:46 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_nfs/ad_nfs_open.c +++ mpich-1.2.7/romio/adio/ad_nfs/ad_nfs_open.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_nfs_open.c,v 1.16 2005/05/23 23:27:41 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_nfs/ad_nfs_read.c +++ mpich-1.2.7/romio/adio/ad_nfs/ad_nfs_read.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_nfs_read.c,v 1.17 2004/10/04 15:50:53 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_nfs/ad_nfs_setsh.c +++ mpich-1.2.7/romio/adio/ad_nfs/ad_nfs_setsh.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_nfs_setsh.c,v 1.14 2004/10/25 18:40:40 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_nfs/ad_nfs_write.c +++ mpich-1.2.7/romio/adio/ad_nfs/ad_nfs_write.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_nfs_write.c,v 1.16 2004/10/04 15:50:54 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_ntfs/ad_ntfs.h +++ mpich-1.2.7/romio/adio/ad_ntfs/ad_ntfs.h @@ -61,4 +61,6 @@ void ADIOI_NTFS_Flush(ADIO_File fd, int *error_code); void ADIOI_NTFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); +const char * ADIOI_NTFS_Strerror(int error); + #endif --- mpich-1.2.7.orig/romio/adio/ad_ntfs/ad_ntfs_close.c +++ mpich-1.2.7/romio/adio/ad_ntfs/ad_ntfs_close.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_ntfs_close.c,v 1.8 2004/10/04 15:50:54 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -11,15 +10,19 @@ void ADIOI_NTFS_Close(ADIO_File fd, int *error_code) { int err; - static char myname[] = "ADIOI_NTFS_CLOSE"; + static char myname[] = "ADIOI_NTFS_Close"; err = CloseHandle(fd->fd_sys); - if (err == FALSE) { + /* --BEGIN ERROR HANDLING-- */ + if (err == FALSE) + { + err = GetLastError(); *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", strerror(errno)); + "**io %s", ADIOI_NTFS_Strerror(err)); return; } - else *error_code = MPI_SUCCESS; + /* --END ERROR HANDLING-- */ + *error_code = MPI_SUCCESS; } --- mpich-1.2.7.orig/romio/adio/ad_ntfs/ad_ntfs_done.c +++ mpich-1.2.7/romio/adio/ad_ntfs/ad_ntfs_done.c @@ -10,35 +10,45 @@ int *error_code) { DWORD ret_val; - int done=0; - static char myname[] = "ADIOI_NTFS_READDONE"; + int done = 0; + static char myname[] = "ADIOI_NTFS_ReadDone"; - if (*request == ADIO_REQUEST_NULL) { - *error_code = MPI_SUCCESS; - return 1; + if (*request == ADIO_REQUEST_NULL) + { + *error_code = MPI_SUCCESS; + return 1; } if ((*request)->queued) + { + (*request)->nbytes = 0; + ret_val = GetOverlappedResult((*request)->fd, (*request)->handle, &(*request)->nbytes, FALSE); + + if (!ret_val) { - (*request)->nbytes = 0; - ret_val = GetOverlappedResult((*request)->fd, (*request)->handle, &(*request)->nbytes, FALSE); - - if (!ret_val) + /* --BEGIN ERROR HANDLING-- */ + ret_val = GetLastError(); + if (ret_val == ERROR_IO_INCOMPLETE) { - ret_val = GetLastError(); - if (ret_val == ERROR_IO_INCOMPLETE) - { - done = 0; - *error_code = MPI_SUCCESS; - } + done = 0; + *error_code = MPI_SUCCESS; } - else + else { - done = 1; - *error_code = MPI_SUCCESS; + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(ret_val)); } + /* --END ERROR HANDLING-- */ } - else { + else + { + done = 1; + *error_code = MPI_SUCCESS; + } + } + else + { done = 1; *error_code = MPI_SUCCESS; } @@ -56,7 +66,13 @@ (*request)->fd->async_count--; if ((*request)->handle) { - CloseHandle(((OVERLAPPED*)((*request)->handle))->hEvent); + if (!CloseHandle(((OVERLAPPED*)((*request)->handle))->hEvent)) + { + ret_val = GetLastError(); + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(ret_val)); + } ADIOI_Free((*request)->handle); } ADIOI_Free_request((ADIOI_Req_node *) (*request)); @@ -69,5 +85,16 @@ int ADIOI_NTFS_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code) { - return ADIOI_NTFS_ReadDone(request, status, error_code); + static char myname[] = "ADIOI_NTFS_WriteDone"; + int ret_val; + ret_val = ADIOI_NTFS_ReadDone(request, status, error_code); + /* --BEGIN ERROR HANDLING-- */ + if (*error_code != MPI_SUCCESS) + { + *error_code = MPIO_Err_create_code(*error_code, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", 0); + } + /* --END ERROR HANDLING-- */ + return ret_val; } --- mpich-1.2.7.orig/romio/adio/ad_ntfs/ad_ntfs_fcntl.c +++ mpich-1.2.7/romio/adio/ad_ntfs/ad_ntfs_fcntl.c @@ -9,25 +9,41 @@ void ADIOI_NTFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code) { - DWORD dwTemp; + DWORD err; + LONG dwTemp; static char myname[] = "ADIOI_NTFS_FCNTL"; - switch(flag) { + switch(flag) + { case ADIO_FCNTL_GET_FSIZE: fcntl_struct->fsize = SetFilePointer(fd->fd_sys, 0, 0, FILE_END); if (fd->fp_sys_posn != -1) { - dwTemp = DWORDHIGH(fd->fp_sys_posn); - SetFilePointer(fd->fd_sys, DWORDLOW(fd->fp_sys_posn), &dwTemp, FILE_BEGIN); + dwTemp = DWORDHIGH(fd->fp_sys_posn); + if (SetFilePointer(fd->fd_sys, DWORDLOW(fd->fp_sys_posn), &dwTemp, FILE_BEGIN) == INVALID_SET_FILE_POINTER) + { + err = GetLastError(); + if (err != NO_ERROR) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + return; + } + } } - if (fcntl_struct->fsize == -1) { + /* --BEGIN ERROR HANDLING-- */ + if (fcntl_struct->fsize == INVALID_SET_FILE_POINTER) + { + dwTemp = GetLastError(); *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", strerror(errno)); + "**io %s", ADIOI_NTFS_Strerror(dwTemp)); return; } - else *error_code = MPI_SUCCESS; + /* --END ERROR HANDLING-- */ + *error_code = MPI_SUCCESS; break; case ADIO_FCNTL_SET_DISKSPACE: @@ -35,10 +51,12 @@ break; case ADIO_FCNTL_SET_ATOMICITY: - /* fd->atomicity = (fcntl_struct->atomicity == 0) ? 0 : 1; */ - /* *error_code = MPI_SUCCESS; */ + fd->atomicity = (fcntl_struct->atomicity == 0) ? 0 : 1; + *error_code = MPI_SUCCESS; + /* fd->atomicity = 0; *error_code = MPI_ERR_UNSUPPORTED_OPERATION; + */ break; default: --- mpich-1.2.7.orig/romio/adio/ad_ntfs/ad_ntfs_flush.c +++ mpich-1.2.7/romio/adio/ad_ntfs/ad_ntfs_flush.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_ntfs_flush.c,v 1.9 2004/10/04 15:50:54 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -11,17 +10,21 @@ void ADIOI_NTFS_Flush(ADIO_File fd, int *error_code) { int err; - static char myname[] = "ADIOI_GEN_FLUSH"; + static char myname[] = "ADIOI_NTFS_Flush"; err = (fd->access_mode & ADIO_RDONLY) ? TRUE : FlushFileBuffers(fd->fd_sys); - if (err == FALSE) { + /* --BEGIN ERROR HANDLING-- */ + if (err == FALSE) + { + err = GetLastError(); *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", strerror(errno)); + "**io %s", ADIOI_NTFS_Strerror(err)); return; } - else *error_code = MPI_SUCCESS; + /* --END ERROR HANDLING-- */ + *error_code = MPI_SUCCESS; } --- mpich-1.2.7.orig/romio/adio/ad_ntfs/ad_ntfs_iread.c +++ mpich-1.2.7/romio/adio/ad_ntfs/ad_ntfs_iread.c @@ -11,10 +11,17 @@ ADIO_Offset offset, ADIO_Request *request, int *error_code) { int len, typesize; - int err=FALSE; - static char myname[] = "ADIOI_NTFS_IREADCONTIG"; + int err; + static char myname[] = "ADIOI_NTFS_IreadContig"; (*request) = ADIOI_Malloc_request(); + if ((*request) == NULL) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**nomem", "**nomem %s", "ADIOI_Request"); + return; + } (*request)->optype = ADIOI_READ; (*request)->fd = fd; (*request)->datatype = datatype; @@ -22,21 +29,29 @@ MPI_Type_size(datatype, &typesize); len = count * typesize; - if (file_ptr_type == ADIO_INDIVIDUAL) offset = fd->fp_ind; + if (file_ptr_type == ADIO_INDIVIDUAL) + { + offset = fd->fp_ind; + } err = ADIOI_NTFS_aio(fd, buf, len, offset, 0, &((*request)->handle)); - if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len; + if (file_ptr_type == ADIO_INDIVIDUAL) + { + fd->fp_ind += len; + } (*request)->queued = 1; ADIOI_Add_req_to_list(request); - if (err == FALSE) { - *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + /* --BEGIN ERROR HANDLING-- */ + if (err != MPI_SUCCESS) + { + *error_code = MPIO_Err_create_code(err, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, - "**io", - "**io %s", strerror(errno)); + "**io", 0); return; } - else *error_code = MPI_SUCCESS; + /* --END ERROR HANDLING-- */ + *error_code = MPI_SUCCESS; fd->fp_sys_posn = -1; /* set it to null. */ fd->async_count++; --- mpich-1.2.7.orig/romio/adio/ad_ntfs/ad_ntfs_iwrite.c +++ mpich-1.2.7/romio/adio/ad_ntfs/ad_ntfs_iwrite.c @@ -12,10 +12,17 @@ int *error_code) { int len, typesize; - int err=FALSE; - static char myname[] = "ADIOI_NTFS_IWRITECONTIG"; + int err; + static char myname[] = "ADIOI_NTFS_IwriteContig"; *request = ADIOI_Malloc_request(); + if ((*request) == NULL) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**nomem", "**nomem %s", "ADIOI_Request"); + return; + } (*request)->optype = ADIOI_WRITE; (*request)->fd = fd; (*request)->datatype = datatype; @@ -23,21 +30,29 @@ MPI_Type_size(datatype, &typesize); len = count * typesize; - if (file_ptr_type == ADIO_INDIVIDUAL) offset = fd->fp_ind; + if (file_ptr_type == ADIO_INDIVIDUAL) + { + offset = fd->fp_ind; + } err = ADIOI_NTFS_aio(fd, buf, len, offset, 1, &((*request)->handle)); - if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len; + if (file_ptr_type == ADIO_INDIVIDUAL) + { + fd->fp_ind += len; + } (*request)->queued = 1; ADIOI_Add_req_to_list(request); - if (err == FALSE) { - *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + /* --BEGIN ERROR HANDLING-- */ + if (err != MPI_SUCCESS) + { + *error_code = MPIO_Err_create_code(err, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, - "**io", - "**io %s", strerror(errno)); + "**io", 0); return; } - else *error_code = MPI_SUCCESS; + /* --END ERROR HANDLING-- */ + *error_code = MPI_SUCCESS; fd->fp_sys_posn = -1; /* set it to null. */ fd->async_count++; @@ -47,60 +62,95 @@ /* This function is for implementation convenience. It is not user-visible. * If wr==1 write, wr==0 read. * - * Returns TRUE on success, FALSE on failure. Error code construction is - * handled above this function. + * Returns MPI_SUCCESS on success, mpi_errno on failure. */ int ADIOI_NTFS_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, int wr, void *handle) { - DWORD dwNumWritten=0, dwNumRead=0; + static char myname[] = "ADIOI_NTFS_aio"; + static DWORD dwNumWritten, dwNumRead; BOOL ret_val = FALSE; FDTYPE fd_sys; - + int mpi_errno = MPI_SUCCESS; OVERLAPPED *pOvl; + DWORD err; fd_sys = fd->fd_sys; pOvl = (OVERLAPPED *) ADIOI_Calloc(sizeof(OVERLAPPED), 1); + if (pOvl == NULL) + { + mpi_errno = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**nomem", "**nomem %s", "OVERLAPPED"); + return mpi_errno; + } pOvl->hEvent = CreateEvent(NULL, TRUE, TRUE, NULL); + if (pOvl->hEvent == NULL) + { + err = GetLastError(); + mpi_errno = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + ADIOI_Free(pOvl); + return mpi_errno; + } pOvl->Offset = DWORDLOW(offset); pOvl->OffsetHigh = DWORDHIGH(offset); if (wr) { ret_val = WriteFile(fd_sys, buf, len, &dwNumWritten, pOvl); - /* - ret_val = WriteFile(fd_sys, buf, len, &dwNumWritten, NULL); - if (ret_val && dwNumWritten) printf("written immediately: %d\n", dwNumWritten); - */ } else { ret_val = ReadFile(fd_sys, buf, len, &dwNumRead, pOvl); - /*ret_val = ReadFile(fd_sys, buf, len, &dwNumRead, NULL);*/ } + /* --BEGIN ERROR HANDLING-- */ if (ret_val == FALSE) { - errno = GetLastError(); - if (errno != ERROR_IO_PENDING) + mpi_errno = GetLastError(); + if (mpi_errno != ERROR_IO_PENDING) { - if (wr) { - FPRINTF(stderr, - "WriteFile error (%d): len %d, dwNumWritten %d\n", - errno, len, dwNumWritten); - } - else { - FPRINTF(stderr, - "ReadFile error (%d): len %d, dwNumRead %d\n", - errno, len, dwNumRead); - } - return FALSE; + mpi_errno = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", + "**io %s", ADIOI_NTFS_Strerror(mpi_errno)); + return mpi_errno; } - ret_val = TRUE; + mpi_errno = MPI_SUCCESS; } + /* --END ERROR HANDLING-- */ *((OVERLAPPED **) handle) = pOvl; - return ret_val; + return mpi_errno; +} + +const char * ADIOI_NTFS_Strerror(int error) +{ + /* obviously not thread safe to store a message like this */ + static char msg[1024]; + HLOCAL str; + int num_bytes; + num_bytes = FormatMessage( + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_ALLOCATE_BUFFER, + 0, + error, + MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), + (LPTSTR) &str, + 0,0); + if (num_bytes == 0) + { + *msg = '\0'; + } + else + { + memcpy(msg, str, num_bytes+1); + LocalFree(str); + strtok(msg, "\r\n"); + } + return msg; } --- mpich-1.2.7.orig/romio/adio/ad_ntfs/ad_ntfs_open.c +++ mpich-1.2.7/romio/adio/ad_ntfs/ad_ntfs_open.c @@ -10,56 +10,88 @@ void ADIOI_NTFS_Open(ADIO_File fd, int *error_code) { - int cmode, amode, smode; - static char myname[] = "ADIOI_NTFS_OPEN"; + int err; + int cmode, amode, attrib; + static char myname[] = "ADIOI_NTFS_Open"; amode = 0; cmode = OPEN_EXISTING; - smode = 0; +#ifdef USE_WIN_THREADED_IO + attrib = FILE_FLAG_OVERLAPPED; +#else + attrib = FILE_ATTRIBUTE_NORMAL; +#endif + if (fd->access_mode & ADIO_CREATE) - cmode = OPEN_ALWAYS; /*CREATE_ALWAYS;*/ + { + cmode = OPEN_ALWAYS; + } if (fd->access_mode & ADIO_EXCL) + { cmode = CREATE_NEW; + } if (fd->access_mode & ADIO_RDONLY) { - amode = amode | FILE_SHARE_READ; - smode = smode | GENERIC_READ; + amode = GENERIC_READ; } if (fd->access_mode & ADIO_WRONLY) { - amode = amode | FILE_SHARE_WRITE; - smode = smode | GENERIC_WRITE; + amode = GENERIC_WRITE; } if (fd->access_mode & ADIO_RDWR) { - amode = amode | FILE_SHARE_READ | FILE_SHARE_WRITE; - smode = smode | GENERIC_READ | GENERIC_WRITE; + amode = GENERIC_READ | GENERIC_WRITE; + } + + if (fd->access_mode & ADIO_DELETE_ON_CLOSE) + { + attrib = attrib | FILE_FLAG_DELETE_ON_CLOSE; + } + if (fd->access_mode & ADIO_SEQUENTIAL) + { + attrib = attrib | FILE_FLAG_SEQUENTIAL_SCAN; + } + else + { + attrib = attrib | FILE_FLAG_RANDOM_ACCESS; } - fd->fd_sys = CreateFile(fd->filename, - GENERIC_READ | GENERIC_WRITE, - amode, - NULL, - cmode, - FILE_ATTRIBUTE_NORMAL, - NULL); - fd->fd_direct = -1; + fd->fd_sys = CreateFile(fd->filename, + amode, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + NULL, + cmode, + attrib, + NULL); + fd->fd_direct = -1; - if ((fd->fd_sys != INVALID_HANDLE_VALUE) && - (fd->access_mode & ADIO_APPEND)) + if ((fd->fd_sys != INVALID_HANDLE_VALUE) && (fd->access_mode & ADIO_APPEND)) { - fd->fp_ind = fd->fp_sys_posn = SetFilePointer(fd->fd_sys, 0, NULL, - FILE_END); + fd->fp_ind = fd->fp_sys_posn = SetFilePointer(fd->fd_sys, 0, NULL, FILE_END); + if (fd->fp_ind == INVALID_SET_FILE_POINTER) + { + err = GetLastError(); + if (err != NO_ERROR) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + return; + } + } } - if (fd->fd_sys == INVALID_HANDLE_VALUE) { + /* --BEGIN ERROR HANDLING-- */ + if (fd->fd_sys == INVALID_HANDLE_VALUE) + { + err = GetLastError(); *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", strerror(errno)); + "**io %s", ADIOI_NTFS_Strerror(err)); return; } - else *error_code = MPI_SUCCESS; + /* --END ERROR HANDLING-- */ + *error_code = MPI_SUCCESS; } - --- mpich-1.2.7.orig/romio/adio/ad_ntfs/ad_ntfs_read.c +++ mpich-1.2.7/romio/adio/ad_ntfs/ad_ntfs_read.c @@ -11,47 +11,196 @@ ADIO_Offset offset, ADIO_Status *status, int *error_code) { - DWORD dwTemp; + LONG dwTemp; DWORD dwNumRead = 0; int err=-1, datatype_size, len; - static char myname[] = "ADIOI_NTFS_READCONTIG"; + static char myname[] = "ADIOI_NTFS_ReadContig"; + OVERLAPPED *pOvl; MPI_Type_size(datatype, &datatype_size); len = datatype_size * count; - if (file_ptr_type == ADIO_EXPLICIT_OFFSET) { + pOvl = (OVERLAPPED *) ADIOI_Calloc(sizeof(OVERLAPPED), 1); + if (pOvl == NULL) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**nomem", "**nomem %s", "OVERLAPPED"); + return; + } + pOvl->hEvent = CreateEvent(NULL, TRUE, TRUE, NULL); + if (pOvl->hEvent == NULL) + { + err = GetLastError(); + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + ADIOI_Free(pOvl); + return; + } + pOvl->Offset = DWORDLOW(offset); + pOvl->OffsetHigh = DWORDHIGH(offset); + + if (file_ptr_type == ADIO_EXPLICIT_OFFSET) + { if (fd->fp_sys_posn != offset) { dwTemp = DWORDHIGH(offset); - SetFilePointer(fd->fd_sys, DWORDLOW(offset), &dwTemp, FILE_BEGIN); + if (SetFilePointer(fd->fd_sys, DWORDLOW(offset), &dwTemp, FILE_BEGIN) == INVALID_SET_FILE_POINTER) + { + err = GetLastError(); + if (err != NO_ERROR) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } + } + } + err = ReadFile(fd->fd_sys, buf, len, &dwNumRead, pOvl); + /* --BEGIN ERROR HANDLING-- */ + if (err == FALSE) + { + err = GetLastError(); + switch (err) + { + case ERROR_IO_PENDING: + break; + case ERROR_HANDLE_EOF: + SetEvent(pOvl->hEvent); + break; + default: + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", + "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } + } + /* --END ERROR HANDLING-- */ + err = GetOverlappedResult(fd->fd_sys, pOvl, &dwNumRead, TRUE); + /* --BEGIN ERROR HANDLING-- */ + if (err == FALSE) + { + err = GetLastError(); + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, + __LINE__, MPI_ERR_IO, "**io", + "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; } - err = ReadFile(fd->fd_sys, buf, len, &dwNumRead, NULL); + /* --END ERROR HANDLING-- */ + if (!CloseHandle(pOvl->hEvent)) + { + err = GetLastError(); + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } + ADIOI_Free(pOvl); fd->fp_sys_posn = offset + (ADIO_Offset)dwNumRead; /* individual file pointer not updated */ } - else { /* read from curr. location of ind. file pointer */ + else + { + /* read from curr. location of ind. file pointer */ if (fd->fp_sys_posn != fd->fp_ind) { dwTemp = DWORDHIGH(fd->fp_ind); - SetFilePointer(fd->fd_sys, DWORDLOW(fd->fp_ind), &dwTemp, - FILE_BEGIN); + if (SetFilePointer(fd->fd_sys, DWORDLOW(fd->fp_ind), &dwTemp, FILE_BEGIN) == INVALID_SET_FILE_POINTER) + { + err = GetLastError(); + if (err != NO_ERROR) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } + } + } + err = ReadFile(fd->fd_sys, buf, len, &dwNumRead, pOvl); + /* --BEGIN ERROR HANDLING-- */ + if (err == FALSE) + { + err = GetLastError(); + switch (err) + { + case ERROR_IO_PENDING: + break; + case ERROR_HANDLE_EOF: + SetEvent(pOvl->hEvent); + break; + default: + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", + "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } + } + /* --END ERROR HANDLING-- */ + err = GetOverlappedResult(fd->fd_sys, pOvl, &dwNumRead, TRUE); + /* --BEGIN ERROR HANDLING-- */ + if (err == FALSE) + { + err = GetLastError(); + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, + __LINE__, MPI_ERR_IO, "**io", + "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } + /* --END ERROR HANDLING-- */ + if (!CloseHandle(pOvl->hEvent)) + { + err = GetLastError(); + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + ADIOI_Free(pOvl); + return; } - err = ReadFile(fd->fd_sys, buf, len, &dwNumRead, NULL); + ADIOI_Free(pOvl); + fd->fp_ind = fd->fp_ind + (ADIO_Offset)dwNumRead; fd->fp_sys_posn = fd->fp_ind; } #ifdef HAVE_STATUS_SET_BYTES - if (err != FALSE) MPIR_Status_set_bytes(status, datatype, dwNumRead); + if (err != FALSE) + { + MPIR_Status_set_bytes(status, datatype, dwNumRead); + } #endif - if (err == FALSE) { + /* --BEGIN ERROR HANDLING-- */ + if (err == FALSE) + { + err = GetLastError(); *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", strerror(errno)); + "**io %s", ADIOI_NTFS_Strerror(err)); return; } - else *error_code = MPI_SUCCESS; + /* --END ERROR HANDLING-- */ + *error_code = MPI_SUCCESS; } --- mpich-1.2.7.orig/romio/adio/ad_ntfs/ad_ntfs_resize.c +++ mpich-1.2.7/romio/adio/ad_ntfs/ad_ntfs_resize.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_ntfs_resize.c,v 1.8 2004/10/04 15:50:55 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -10,19 +9,38 @@ void ADIOI_NTFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) { - DWORD dwTemp; - int err; - static char myname[] = "ADIOI_NTFS_RESIZE"; + LONG dwTemp; + DWORD err; + BOOL result; + static char myname[] = "ADIOI_NTFS_Resize"; dwTemp = DWORDHIGH(size); err = SetFilePointer(fd->fd_sys, DWORDLOW(size), &dwTemp, FILE_BEGIN); - err = SetEndOfFile(fd->fd_sys); - if (err == FALSE) { + /* --BEGIN ERROR HANDLING-- */ + if (err == INVALID_SET_FILE_POINTER) + { + err = GetLastError(); + if (err != NO_ERROR) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", + "**io %s", ADIOI_NTFS_Strerror(err)); + return; + } + } + /* --END ERROR HANDLING-- */ + result = SetEndOfFile(fd->fd_sys); + /* --BEGIN ERROR HANDLING-- */ + if (result == FALSE) + { + err = GetLastError(); *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", strerror(errno)); + "**io %s", ADIOI_NTFS_Strerror(err)); return; } - else *error_code = MPI_SUCCESS; + /* --END ERROR HANDLING-- */ + *error_code = MPI_SUCCESS; } --- mpich-1.2.7.orig/romio/adio/ad_ntfs/ad_ntfs_wait.c +++ mpich-1.2.7/romio/adio/ad_ntfs/ad_ntfs_wait.c @@ -10,43 +10,44 @@ int *error_code) { DWORD ret_val; - static char myname[] = "ADIOI_NTFS_READCOMPLETE"; + static char myname[] = "ADIOI_NTFS_ReadComplete"; - if (*request == ADIO_REQUEST_NULL) { + if (*request == ADIO_REQUEST_NULL) + { *error_code = MPI_SUCCESS; return; } - if ((*request)->queued) { + if ((*request)->queued) + { ret_val = GetOverlappedResult((*request)->fd, (*request)->handle, &(*request)->nbytes, TRUE); - /* Is this a busy wait on the aio handle? - do { - err = aio_suspend((const aiocb_t **) &((*request)->handle), 1, 0); - } while ((err == -1) && (errno == EINTR)); - */ - if (!ret_val) (*request)->nbytes = -1; - if (ret_val == FALSE) { + /* --BEGIN ERROR HANDLING-- */ + if (ret_val == FALSE) + { + ret_val = GetLastError(); *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", strerror(errno)); + "**io %s", ADIOI_NTFS_Strerror(ret_val)); return; } - else *error_code = MPI_SUCCESS; + /* --END ERROR HANDLING-- */ } /* if ((*request)->queued) ... */ - else *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; #ifdef HAVE_STATUS_SET_BYTES if ((*request)->nbytes != -1) + { MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes); + } #endif - if ((*request)->queued != -1) { - + if ((*request)->queued != -1) + { /* queued = -1 is an internal hack used when the request must be completed, but the request object should not be freed. This is used in ADIOI_Complete_async, because the user @@ -68,12 +69,20 @@ ADIOI_Free_request((ADIOI_Req_node *) (*request)); *request = ADIO_REQUEST_NULL; } - } void ADIOI_NTFS_WriteComplete(ADIO_Request *request, ADIO_Status *status, int *error_code) { + static char myname[] = "ADIOI_NTFS_WriteComplete"; ADIOI_NTFS_ReadComplete(request, status, error_code); + /* --BEGIN ERROR HANDLING-- */ + if (*error_code != MPI_SUCCESS) + { + *error_code = MPIO_Err_create_code(*error_code, + MPIR_ERR_RECOVERABLE, myname, + __LINE__, MPI_ERR_IO, "**io", 0); + } + /* --END ERROR HANDLING-- */ } --- mpich-1.2.7.orig/romio/adio/ad_ntfs/ad_ntfs_write.c +++ mpich-1.2.7/romio/adio/ad_ntfs/ad_ntfs_write.c @@ -11,46 +11,184 @@ ADIO_Offset offset, ADIO_Status *status, int *error_code) { - DWORD dwTemp; + static char myname[] = "ADIOI_NTFS_WriteContig"; + LONG dwTemp; DWORD dwNumWritten = 0; int err=-1, datatype_size, len; - static char myname[] = "ADIOI_NTFS_WRITECONTIG"; + OVERLAPPED *pOvl; MPI_Type_size(datatype, &datatype_size); len = datatype_size * count; - if (file_ptr_type == ADIO_EXPLICIT_OFFSET) { + pOvl = (OVERLAPPED *) ADIOI_Calloc(sizeof(OVERLAPPED), 1); + if (pOvl == NULL) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**nomem", "**nomem %s", "OVERLAPPED"); + return; + } + pOvl->hEvent = CreateEvent(NULL, TRUE, TRUE, NULL); + if (pOvl->hEvent == NULL) + { + err = GetLastError(); + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + ADIOI_Free(pOvl); + return; + } + pOvl->Offset = DWORDLOW(offset); + pOvl->OffsetHigh = DWORDHIGH(offset); + + if (file_ptr_type == ADIO_EXPLICIT_OFFSET) + { if (fd->fp_sys_posn != offset) { dwTemp = DWORDHIGH(offset); - SetFilePointer(fd->fd_sys, DWORDLOW(offset), &dwTemp, FILE_BEGIN); + if (SetFilePointer(fd->fd_sys, DWORDLOW(offset), &dwTemp, FILE_BEGIN) == INVALID_SET_FILE_POINTER) + { + err = GetLastError(); + if (err != NO_ERROR) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } + } + } + err = WriteFile(fd->fd_sys, buf, len, &dwNumWritten, pOvl); + /* --BEGIN ERROR HANDLING-- */ + if (err == FALSE) + { + err = GetLastError(); + if (err != ERROR_IO_PENDING) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", + "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } + } + /* --END ERROR HANDLING-- */ + err = GetOverlappedResult(fd->fd_sys, pOvl, &dwNumWritten, TRUE); + /* --BEGIN ERROR HANDLING-- */ + if (err == FALSE) + { + err = GetLastError(); + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, + __LINE__, MPI_ERR_IO, "**io", + "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; } - err = WriteFile(fd->fd_sys, buf, len, &dwNumWritten, NULL); + /* --END ERROR HANDLING-- */ + if (!CloseHandle(pOvl->hEvent)) + { + err = GetLastError(); + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } + ADIOI_Free(pOvl); + fd->fp_sys_posn = offset + dwNumWritten; /* individual file pointer not updated */ } - else { /* write from curr. location of ind. file pointer */ + else + { + /* write from curr. location of ind. file pointer */ if (fd->fp_sys_posn != fd->fp_ind) { dwTemp = DWORDHIGH(fd->fp_ind); - SetFilePointer(fd->fd_sys, DWORDLOW(fd->fp_ind), &dwTemp, - FILE_BEGIN); + if (SetFilePointer(fd->fd_sys, DWORDLOW(fd->fp_ind), &dwTemp, FILE_BEGIN) == INVALID_SET_FILE_POINTER) + { + err = GetLastError(); + if (err != NO_ERROR) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } + } } - err = WriteFile(fd->fd_sys, buf, len, &dwNumWritten, NULL); + err = WriteFile(fd->fd_sys, buf, len, &dwNumWritten, pOvl); + /* --BEGIN ERROR HANDLING-- */ + if (err == FALSE) + { + err = GetLastError(); + if (err != ERROR_IO_PENDING) + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", + "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } + } + /* --END ERROR HANDLING-- */ + err = GetOverlappedResult(fd->fd_sys, pOvl, &dwNumWritten, TRUE); + /* --BEGIN ERROR HANDLING-- */ + if (err == FALSE) + { + err = GetLastError(); + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, + __LINE__, MPI_ERR_IO, "**io", + "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } + /* --END ERROR HANDLING-- */ + if (!CloseHandle(pOvl->hEvent)) + { + err = GetLastError(); + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", ADIOI_NTFS_Strerror(err)); + ADIOI_Free(pOvl); + return; + } + ADIOI_Free(pOvl); + fd->fp_ind = fd->fp_ind + dwNumWritten; fd->fp_sys_posn = fd->fp_ind; } #ifdef HAVE_STATUS_SET_BYTES - if (err != FALSE) MPIR_Status_set_bytes(status, datatype, dwNumWritten); + if (err != FALSE) + { + MPIR_Status_set_bytes(status, datatype, dwNumWritten); + } #endif - if (err == FALSE) { + /* --BEGIN ERROR HANDLING-- */ + if (err == FALSE) + { + err = GetLastError(); *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", strerror(errno)); + "**io %s", ADIOI_NTFS_Strerror(err)); return; } - else *error_code = MPI_SUCCESS; + /* --END ERROR HANDLING-- */ + *error_code = MPI_SUCCESS; } --- mpich-1.2.7.orig/romio/adio/ad_panfs/Makefile.in +++ mpich-1.2.7/romio/adio/ad_panfs/Makefile.in @@ -9,7 +9,7 @@ INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I${srcdir}/../include -I../include -I../../include -I/opt/panfs/include CFLAGS = @CFLAGS@ $(INCLUDE_DIR) -C_COMPILE_SHL = $(CC_SHL) @CFLAGS@ $(INCLUDE_DIR) +C_COMPILE_SHL = $(CC_SHL) @VPATH@ @@ -27,8 +27,8 @@ .c.o: $(CC) $(CFLAGS) -c $< .c.lo: - $(C_COMPILE_SHL) -c $< - @mv -f $*.o $*.lo + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o + @mv -f _s$*.o $*.lo $(LIBNAME): $(AD_PANFS_OBJECTS) $(AR) $(LIBNAME) $(AD_PANFS_OBJECTS) @@ -37,7 +37,6 @@ AD_PANFS_LOOBJECTS=$(AD_PANFS_OBJECTS:.o=.lo) $(SHLIBNAME).la: $(AD_PANFS_LOOBJECTS) $(AR) $(SHLIBNAME).la $(AD_PANFS_LOOBJECTS) - $(RANLIB) $(SHLIBNAME) coverage: -@for file in ${AD_PANFS_OBJECTS:.o=.c} ; do \ --- mpich-1.2.7.orig/romio/adio/ad_panfs/ad_panfs_open.c +++ mpich-1.2.7/romio/adio/ad_panfs/ad_panfs_open.c @@ -157,10 +157,10 @@ { /* (err == -1) && (errno == ENOENT) */ /* File does not exist */ - path = strdup(fd->filename); + path = ADIOI_Strdup(fd->filename); slash = strrchr(path, '/'); if (!slash) - strcpy(path, "."); + ADIOI_Strncpy(path, ".", 2); else { if (slash == path) *(path + 1) = '\0'; @@ -187,7 +187,7 @@ file_create_args.mode = perm; file_create_args.version = PAN_FS_CLIENT_LAYOUT_VERSION; file_create_args.flags = PAN_FS_CLIENT_LAYOUT_CREATE_F__NONE; - strcpy(file_create_args.filename, file_name_ptr); + ADIOI_Strncpy(file_create_args.filename, file_name_ptr, strlen(fd->filename)+1); file_create_args.layout.agg_type = layout_type; file_create_args.layout.layout_is_valid = 1; if(layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE) @@ -210,7 +210,7 @@ } err = close(fd_dir); } - free(path); + ADIOI_Free(path); } } MPI_Barrier(fd->comm); @@ -255,28 +255,28 @@ } else { - snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.agg_type); + ADIOI_Snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.agg_type); MPI_Info_set(fd->info, "panfs_layout_type", temp_buffer); if (file_query_args.layout.layout_is_valid == 1) { switch (file_query_args.layout.agg_type) { case PAN_FS_CLIENT_LAYOUT_TYPE__RAID0: - snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid0.stripe_unit); + ADIOI_Snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid0.stripe_unit); MPI_Info_set(fd->info, "panfs_layout_stripe_unit", temp_buffer); - snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid0.total_num_comps); + ADIOI_Snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid0.total_num_comps); MPI_Info_set(fd->info, "panfs_layout_total_num_comps", temp_buffer); break; case PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE: - snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid1_5_parity_stripe.stripe_unit); + ADIOI_Snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid1_5_parity_stripe.stripe_unit); MPI_Info_set(fd->info, "panfs_layout_stripe_unit", temp_buffer); - snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid1_5_parity_stripe.parity_stripe_width); + ADIOI_Snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid1_5_parity_stripe.parity_stripe_width); MPI_Info_set(fd->info, "panfs_layout_parity_stripe_width", temp_buffer); - snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid1_5_parity_stripe.parity_stripe_depth); + ADIOI_Snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid1_5_parity_stripe.parity_stripe_depth); MPI_Info_set(fd->info, "panfs_layout_parity_stripe_depth", temp_buffer); - snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid1_5_parity_stripe.total_num_comps); + ADIOI_Snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid1_5_parity_stripe.total_num_comps); MPI_Info_set(fd->info, "panfs_layout_total_num_comps", temp_buffer); - snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid1_5_parity_stripe.layout_visit_policy); + ADIOI_Snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid1_5_parity_stripe.layout_visit_policy); MPI_Info_set(fd->info, "panfs_layout_visit_policy", temp_buffer); break; } --- mpich-1.2.7.orig/romio/adio/ad_pfs/ad_pfs.c +++ mpich-1.2.7/romio/adio/ad_pfs/ad_pfs.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pfs.c,v 1.5 2005/05/23 23:27:43 rross Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pfs/ad_pfs.h +++ mpich-1.2.7/romio/adio/ad_pfs/ad_pfs.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pfs.h,v 1.7 2004/10/04 15:50:56 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pfs/ad_pfs_done.c +++ mpich-1.2.7/romio/adio/ad_pfs/ad_pfs_done.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pfs_done.c,v 1.11 2004/10/04 15:50:56 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pfs/ad_pfs_fcntl.c +++ mpich-1.2.7/romio/adio/ad_pfs/ad_pfs_fcntl.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pfs_fcntl.c,v 1.13 2004/11/01 21:36:54 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pfs/ad_pfs_flush.c +++ mpich-1.2.7/romio/adio/ad_pfs/ad_pfs_flush.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pfs_flush.c,v 1.11 2004/10/04 15:50:57 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pfs/ad_pfs_hints.c +++ mpich-1.2.7/romio/adio/ad_pfs/ad_pfs_hints.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pfs_hints.c,v 1.6 2004/10/04 15:50:57 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pfs/ad_pfs_iread.c +++ mpich-1.2.7/romio/adio/ad_pfs/ad_pfs_iread.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pfs_iread.c,v 1.10 2004/10/04 15:50:57 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pfs/ad_pfs_iwrite.c +++ mpich-1.2.7/romio/adio/ad_pfs/ad_pfs_iwrite.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pfs_iwrite.c,v 1.11 2004/10/04 15:50:57 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pfs/ad_pfs_open.c +++ mpich-1.2.7/romio/adio/ad_pfs/ad_pfs_open.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pfs_open.c,v 1.12 2005/05/23 23:27:43 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -70,13 +69,13 @@ err = fcntl(fd->fd_sys, F_GETSATTR, &attr); if (!err) { - sprintf(value, "%d", attr.s_sunitsize); + ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", attr.s_sunitsize); MPI_Info_set(fd->info, "striping_unit", value); - sprintf(value, "%d", attr.s_sfactor); + ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", attr.s_sfactor); MPI_Info_set(fd->info, "striping_factor", value); - sprintf(value, "%d", attr.s_start_sdir); + ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", attr.s_start_sdir); MPI_Info_set(fd->info, "start_iodevice", value); } ADIOI_Free(value); --- mpich-1.2.7.orig/romio/adio/ad_pfs/ad_pfs_read.c +++ mpich-1.2.7/romio/adio/ad_pfs/ad_pfs_read.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pfs_read.c,v 1.11 2004/10/04 15:50:57 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pfs/ad_pfs_wait.c +++ mpich-1.2.7/romio/adio/ad_pfs/ad_pfs_wait.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pfs_wait.c,v 1.11 2004/10/04 15:50:58 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pfs/ad_pfs_write.c +++ mpich-1.2.7/romio/adio/ad_pfs/ad_pfs_write.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pfs_write.c,v 1.11 2004/10/04 15:50:58 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_piofs/ad_piofs.c +++ mpich-1.2.7/romio/adio/ad_piofs/ad_piofs.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_piofs.c,v 1.5 2005/05/23 23:27:43 rross Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_piofs/ad_piofs.h +++ mpich-1.2.7/romio/adio/ad_piofs/ad_piofs.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_piofs.h,v 1.5 2004/10/04 15:50:58 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_piofs/ad_piofs_fcntl.c +++ mpich-1.2.7/romio/adio/ad_piofs/ad_piofs_fcntl.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_piofs_fcntl.c,v 1.14 2004/11/01 20:33:30 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_piofs/ad_piofs_hints.c +++ mpich-1.2.7/romio/adio/ad_piofs/ad_piofs_hints.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_piofs_hints.c,v 1.6 2003/06/02 18:27:47 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -68,6 +67,8 @@ if ((str_factor > 0) || (str_unit > 0) || (start_iodev >= 0)) { MPI_Comm_rank(fd->comm, &myrank); if (!myrank) { + int len; + if (fd->perm == ADIO_PERM_NULL) { old_mask = umask(022); umask(old_mask); @@ -78,23 +79,24 @@ /* to find out the number of I/O servers, I need the path to the directory containing the file */ - path = strdup(fd->filename); + path = ADIOI_Strdup(fd->filename); + len = strlen(path) + 1; slash = strrchr(path, '/'); - if (!slash) strcpy(path, "."); + if (!slash) ADIOI_Strncpy(path, ".", len); else { if (slash == path) *(path + 1) = '\0'; else *slash = '\0'; } - strcpy(piofs_statfs.name, path); + ADIOI_Strncpy(piofs_statfs.name, path, len); err = piofsioctl(0, PIOFS_STATFS, &piofs_statfs); nioservers = (err) ? -1 : piofs_statfs.f_nodes; - free(path); + ADIOI_Free(path); str_factor = ADIOI_MIN(nioservers, str_factor); if (start_iodev >= nioservers) start_iodev = -1; - strcpy(piofs_create.name, fd->filename); + ADIOI_Strncpy(piofs_create.name, fd->filename, len); piofs_create.bsu = (str_unit > 0) ? str_unit : -1; piofs_create.cells = (str_factor > 0) ? str_factor : -1; piofs_create.permissions = perm; --- mpich-1.2.7.orig/romio/adio/ad_piofs/ad_piofs_open.c +++ mpich-1.2.7/romio/adio/ad_piofs/ad_piofs_open.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_piofs_open.c,v 1.11 2005/05/23 23:27:43 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -59,13 +58,13 @@ err = piofsioctl(fd->fd_sys, PIOFS_FSTAT, &piofs_fstat); if (!err) { - sprintf(value, "%d", piofs_fstat.st_bsu); + ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", piofs_fstat.st_bsu); MPI_Info_set(fd->info, "striping_unit", value); - sprintf(value, "%d", piofs_fstat.st_cells); + ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", piofs_fstat.st_cells); MPI_Info_set(fd->info, "striping_factor", value); - sprintf(value, "%d", piofs_fstat.st_base_node); + ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", piofs_fstat.st_base_node); MPI_Info_set(fd->info, "start_iodevice", value); } ADIOI_Free(value); --- mpich-1.2.7.orig/romio/adio/ad_piofs/ad_piofs_read.c +++ mpich-1.2.7/romio/adio/ad_piofs/ad_piofs_read.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_piofs_read.c,v 1.12 2004/10/04 15:51:00 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_piofs/ad_piofs_write.c +++ mpich-1.2.7/romio/adio/ad_piofs/ad_piofs_write.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_piofs_write.c,v 1.12 2003/04/18 20:15:00 David Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs/Makefile.in +++ mpich-1.2.7/romio/adio/ad_pvfs/Makefile.in @@ -31,8 +31,8 @@ .c.o: $(CC) $(CFLAGS) -c $< .c.lo: - $(C_COMPILE_SHL) $(CFLAGS) -c $< - @mv -f $*.o $*.lo + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o + @mv -f _s$*.o $*.lo $(LIBNAME): $(AD_PVFS_OBJECTS) $(AR) $(LIBNAME) $(AD_PVFS_OBJECTS) @@ -41,7 +41,6 @@ AD_PVFS_LOOBJECTS=$(AD_PVFS_OBJECTS:.o=.lo) $(SHLIBNAME).la: $(AD_PVFS_LOOBJECTS) $(AR) $(SHLIBNAME).la $(AD_PVFS_LOOBJECTS) - $(RANLIB) $(SHLIBNAME) coverage: -@for file in ${AD_PVFS_OBJECTS:.o=.c} ; do \ --- mpich-1.2.7.orig/romio/adio/ad_pvfs/ad_pvfs.c +++ mpich-1.2.7/romio/adio/ad_pvfs/ad_pvfs.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs.c,v 1.6 2005/05/23 23:27:44 rross Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs/ad_pvfs.h +++ mpich-1.2.7/romio/adio/ad_pvfs/ad_pvfs.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs.h,v 1.6 2004/10/04 15:51:01 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs/ad_pvfs_close.c +++ mpich-1.2.7/romio/adio/ad_pvfs/ad_pvfs_close.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs_close.c,v 1.9 2004/10/04 15:51:01 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs/ad_pvfs_delete.c +++ mpich-1.2.7/romio/adio/ad_pvfs/ad_pvfs_delete.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs_delete.c,v 1.7 2004/10/04 15:51:01 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs/ad_pvfs_fcntl.c +++ mpich-1.2.7/romio/adio/ad_pvfs/ad_pvfs_fcntl.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs_fcntl.c,v 1.16 2004/11/01 21:36:55 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs/ad_pvfs_flush.c +++ mpich-1.2.7/romio/adio/ad_pvfs/ad_pvfs_flush.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs_flush.c,v 1.13 2004/10/04 15:51:08 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs/ad_pvfs_hints.c +++ mpich-1.2.7/romio/adio/ad_pvfs/ad_pvfs_hints.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs_hints.c,v 1.8 2004/10/04 15:51:08 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs/ad_pvfs_open.c +++ mpich-1.2.7/romio/adio/ad_pvfs/ad_pvfs_open.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs_open.c,v 1.18 2005/05/23 23:27:44 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -58,11 +57,11 @@ if (fd->fd_sys != -1) { pvfs_ioctl(fd->fd_sys, GETMETA, &pstat); - sprintf(value, "%d", pstat.pcount); + ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", pstat.pcount); MPI_Info_set(fd->info, "striping_factor", value); - sprintf(value, "%d", pstat.ssize); + ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", pstat.ssize); MPI_Info_set(fd->info, "striping_unit", value); - sprintf(value, "%d", pstat.base); + ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", pstat.base); MPI_Info_set(fd->info, "start_iodevice", value); } --- mpich-1.2.7.orig/romio/adio/ad_pvfs/ad_pvfs_read.c +++ mpich-1.2.7/romio/adio/ad_pvfs/ad_pvfs_read.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs_read.c,v 1.15 2004/10/07 16:15:17 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs/ad_pvfs_resize.c +++ mpich-1.2.7/romio/adio/ad_pvfs/ad_pvfs_resize.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs_resize.c,v 1.15 2004/10/04 16:37:05 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs/ad_pvfs_write.c +++ mpich-1.2.7/romio/adio/ad_pvfs/ad_pvfs_write.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs_write.c,v 1.17 2004/10/07 16:15:18 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/Makefile.in +++ mpich-1.2.7/romio/adio/ad_pvfs2/Makefile.in @@ -31,8 +31,8 @@ .c.o: $(CC) $(CFLAGS) -c $< .c.lo: - $(C_COMPILE_SHL) $(CFLAGS) -c $< - @mv -f $*.o $*.lo + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o + @mv -f _s$*.o $*.lo $(LIBNAME): $(AD_PVFS2_OBJECTS) @@ -42,7 +42,6 @@ AD_PVFS2_LOOBJECTS=$(AD_PVFS2_OBJECTS:.o=.lo) $(SHLIBNAME).la: $(AD_PVFS2_LOOBJECTS) $(AR) $(SHLIBNAME).la $(AD_PVFS2_LOOBJECTS) - $(RANLIB) $(SHLIBNAME) coverage: -@for file in ${AD_PVFS2_OBJECTS:.o=.c} ; do \ --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/ad_pvfs2.c +++ mpich-1.2.7/romio/adio/ad_pvfs2/ad_pvfs2.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs2.c,v 1.3 2005/05/23 23:27:44 rross Exp $ * * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/ad_pvfs2.h +++ mpich-1.2.7/romio/adio/ad_pvfs2/ad_pvfs2.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs2.h,v 1.3 2004/10/04 15:51:10 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/ad_pvfs2_close.c +++ mpich-1.2.7/romio/adio/ad_pvfs2/ad_pvfs2_close.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs2_close.c,v 1.4 2004/10/04 15:51:10 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/ad_pvfs2_common.c +++ mpich-1.2.7/romio/adio/ad_pvfs2/ad_pvfs2_common.c @@ -81,7 +81,7 @@ attribs->owner = geteuid(); attribs->group = getegid(); - attribs->perms = 1877; + attribs->perms = 0644; attribs->mask = PVFS_ATTR_SYS_ALL_SETABLE; attribs->atime = time(NULL); attribs->mtime = attribs->atime; --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/ad_pvfs2_common.h +++ mpich-1.2.7/romio/adio/ad_pvfs2/ad_pvfs2_common.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab - * $Id: ad_pvfs2_common.h,v 1.11 2004/10/04 15:51:10 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/ad_pvfs2_delete.c +++ mpich-1.2.7/romio/adio/ad_pvfs2/ad_pvfs2_delete.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs2_delete.c,v 1.9 2004/10/04 15:51:11 robl Exp $ * * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/ad_pvfs2_fcntl.c +++ mpich-1.2.7/romio/adio/ad_pvfs2/ad_pvfs2_fcntl.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs2_fcntl.c,v 1.12 2004/11/01 21:36:57 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/ad_pvfs2_flush.c +++ mpich-1.2.7/romio/adio/ad_pvfs2/ad_pvfs2_flush.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs2_flush.c,v 1.10 2004/10/04 15:51:11 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/ad_pvfs2_hints.c +++ mpich-1.2.7/romio/adio/ad_pvfs2/ad_pvfs2_hints.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs2_hints.c,v 1.5 2005/03/10 00:10:07 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/ad_pvfs2_open.c +++ mpich-1.2.7/romio/adio/ad_pvfs2/ad_pvfs2_open.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab - * $Id: ad_pvfs2_open.c,v 1.16 2004/10/06 22:33:55 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -54,7 +53,7 @@ ret = PVFS_sys_getparent(fs_id, pvfs_name, &(pvfs2_fs->credentials), &resp_getparent); if (ret < 0) { - fprintf(stderr, "pvfs_sys_getparent returns with %d\n", ret); + FPRINTF(stderr, "pvfs_sys_getparent returns with %d\n", ret); o_status->error = ret; return; } @@ -76,7 +75,7 @@ } o_status->object_ref = resp_create.ref; } else { - fprintf(stderr, "cannot create file without MPI_MODE_CREATE\n"); + FPRINTF(stderr, "cannot create file without MPI_MODE_CREATE\n"); o_status->error = ret; return; } --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/ad_pvfs2_resize.c +++ mpich-1.2.7/romio/adio/ad_pvfs2/ad_pvfs2_resize.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_pvfs2_resize.c,v 1.12 2005/03/09 17:36:20 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_pvfs2/ad_pvfs2_write.c +++ mpich-1.2.7/romio/adio/ad_pvfs2/ad_pvfs2_write.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab - * $Id: ad_pvfs2_write.c,v 1.19 2004/10/07 16:15:18 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_sfs/ad_sfs.c +++ mpich-1.2.7/romio/adio/ad_sfs/ad_sfs.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_sfs.c,v 1.5 2005/05/23 23:27:45 rross Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_sfs/ad_sfs.h +++ mpich-1.2.7/romio/adio/ad_sfs/ad_sfs.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_sfs.h,v 1.5 2004/10/04 15:51:13 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_sfs/ad_sfs_fcntl.c +++ mpich-1.2.7/romio/adio/ad_sfs/ad_sfs_fcntl.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_sfs_fcntl.c,v 1.16 2004/11/01 20:33:33 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_sfs/ad_sfs_flush.c +++ mpich-1.2.7/romio/adio/ad_sfs/ad_sfs_flush.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_sfs_flush.c,v 1.9 2003/04/18 20:15:02 David Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_sfs/ad_sfs_open.c +++ mpich-1.2.7/romio/adio/ad_sfs/ad_sfs_open.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_sfs_open.c,v 1.11 2005/05/23 23:27:45 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/Makefile.in +++ mpich-1.2.7/romio/adio/ad_testfs/Makefile.in @@ -33,8 +33,8 @@ .c.o: $(CC) $(CFLAGS) -c $< .c.lo: - $(C_COMPILE_SHL) $(CFLAGS) -c $< - @mv -f $*.o $*.lo + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o + @mv -f _s$*.o $*.lo $(LIBNAME): $(AD_TESTFS_OBJECTS) $(AR) $(LIBNAME) $(AD_TESTFS_OBJECTS) @@ -44,7 +44,6 @@ $(SHLIBNAME).la: $(AD_TESTFS_LOOBJECTS) $(AR) $(SHLIBNAME).la $(AD_TESTFS_LOOBJECTS) - $(RANLIB) $(SHLIBNAME) clean: @rm -f *.o *.lo --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs.c,v 1.2 2002/10/24 17:01:03 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs.h +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs.h,v 1.2 2002/10/24 17:01:03 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_close.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_close.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_close.c,v 1.2 2002/10/24 17:01:03 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_delete.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_delete.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_delete.c,v 1.2 2002/10/24 17:01:03 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_done.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_done.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_done.c,v 1.3 2002/10/24 17:01:03 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_fcntl.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_fcntl.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_fcntl.c,v 1.8 2004/11/01 21:36:58 robl Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_flush.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_flush.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_flush.c,v 1.2 2002/10/24 17:01:04 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_getsh.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_getsh.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_getsh.c,v 1.2 2002/10/24 17:01:04 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_hints.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_hints.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_hints.c,v 1.4 2002/10/24 17:01:04 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_iread.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_iread.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_iread.c,v 1.3 2002/10/24 17:01:04 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_iwrite.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_iwrite.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_iwrite.c,v 1.3 2002/10/24 17:01:04 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_open.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_open.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_open.c,v 1.3 2005/05/23 23:27:45 rross Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_rdcoll.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_rdcoll.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_rdcoll.c,v 1.4 2002/10/24 17:01:05 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_resize.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_resize.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_resize.c,v 1.2 2002/10/24 17:01:05 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_seek.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_seek.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_seek.c,v 1.6 2004/10/25 18:46:00 robl Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_setsh.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_setsh.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_setsh.c,v 1.2 2002/10/24 17:01:05 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_wait.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_wait.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_wait.c,v 1.4 2002/10/24 17:01:05 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_testfs/ad_testfs_wrcoll.c +++ mpich-1.2.7/romio/adio/ad_testfs/ad_testfs_wrcoll.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_testfs_wrcoll.c,v 1.4 2002/10/24 17:01:06 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_ufs/Makefile.in +++ mpich-1.2.7/romio/adio/ad_ufs/Makefile.in @@ -28,8 +28,8 @@ .c.o: $(CC) $(CFLAGS) -c $< .c.lo: - $(C_COMPILE_SHL) $(CFLAGS) -c $< - @mv -f $*.o $*.lo + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o + @mv -f _s$*.o $*.lo $(LIBNAME): $(AD_UFS_OBJECTS) $(AR) $(LIBNAME) $(AD_UFS_OBJECTS) @@ -38,7 +38,6 @@ AD_UFS_LOOBJECTS=$(AD_UFS_OBJECTS:.o=.lo) $(SHLIBNAME).la: $(AD_UFS_LOOBJECTS) $(AR) $(SHLIBNAME).la $(AD_UFS_LOOBJECTS) - $(RANLIB) $(SHLIBNAME) coverage: -@for file in ${AD_UFS_OBJECTS:.o=.c} ; do \ --- mpich-1.2.7.orig/romio/adio/ad_ufs/ad_ufs.c +++ mpich-1.2.7/romio/adio/ad_ufs/ad_ufs.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_ufs.c,v 1.5 2005/05/23 23:27:46 rross Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_ufs/ad_ufs_open.c +++ mpich-1.2.7/romio/adio/ad_ufs/ad_ufs_open.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_ufs_open.c,v 1.15 2005/05/23 23:27:46 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -38,6 +37,7 @@ if ((fd->fd_sys != -1) && (fd->access_mode & ADIO_APPEND)) fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END); + /* --BEGIN ERROR HANDLING-- */ if (fd->fd_sys == -1) { if (errno == ENAMETOOLONG) *error_code = MPIO_Err_create_code(MPI_SUCCESS, @@ -84,5 +84,6 @@ "**io %s", strerror(errno)); } } + /* --END ERROR HANDLING */ else *error_code = MPI_SUCCESS; } --- mpich-1.2.7.orig/romio/adio/ad_xfs/Makefile.in +++ mpich-1.2.7/romio/adio/ad_xfs/Makefile.in @@ -32,8 +32,8 @@ $(CC) $(CFLAGS) -c $< .c.lo: - $(C_COMPILE_SHL) $(CFLAGS) -c $< - @mv -f $*.o $*.lo + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o + @mv -f _s$*.o $*.lo $(LIBNAME): $(AD_XFS_OBJECTS) $(AR) $(LIBNAME) $(AD_XFS_OBJECTS) @@ -42,7 +42,6 @@ AD_XFS_LOOBJECTS=$(AD_XFS_OBJECTS:.o=.lo) $(SHLIBNAME).la: $(AD_XFS_LOOBJECTS) $(AR) $(SHLIBNAME).la $(AD_XFS_LOOBJECTS) - $(RANLIB) $(SHLIBNAME) clean: @rm -f *.o --- mpich-1.2.7.orig/romio/adio/ad_xfs/ad_xfs.c +++ mpich-1.2.7/romio/adio/ad_xfs/ad_xfs.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_xfs.c,v 1.5 2005/05/23 23:27:46 rross Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_xfs/ad_xfs.h +++ mpich-1.2.7/romio/adio/ad_xfs/ad_xfs.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_xfs.h,v 1.7 2004/10/04 15:51:19 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_xfs/ad_xfs_done.c +++ mpich-1.2.7/romio/adio/ad_xfs/ad_xfs_done.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_xfs_done.c,v 1.11 2004/10/04 15:51:19 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_xfs/ad_xfs_fcntl.c +++ mpich-1.2.7/romio/adio/ad_xfs/ad_xfs_fcntl.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_xfs_fcntl.c,v 1.17 2005/05/23 23:27:47 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_xfs/ad_xfs_hints.c +++ mpich-1.2.7/romio/adio/ad_xfs/ad_xfs_hints.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_xfs_hints.c,v 1.5 2003/02/27 02:15:53 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_xfs/ad_xfs_iwrite.c +++ mpich-1.2.7/romio/adio/ad_xfs/ad_xfs_iwrite.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_xfs_iwrite.c,v 1.12 2004/10/04 15:51:22 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_xfs/ad_xfs_open.c +++ mpich-1.2.7/romio/adio/ad_xfs/ad_xfs_open.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_xfs_open.c,v 1.14 2005/05/23 23:27:47 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_xfs/ad_xfs_read.c +++ mpich-1.2.7/romio/adio/ad_xfs/ad_xfs_read.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_xfs_read.c,v 1.16 2005/05/23 23:27:47 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -11,6 +10,8 @@ #include #endif +/* style: allow:free:2 sig:0 */ + static void ADIOI_XFS_Aligned_Mem_File_Read(ADIO_File fd, void *buf, int len, ADIO_Offset offset, int *err); --- mpich-1.2.7.orig/romio/adio/ad_xfs/ad_xfs_resize.c +++ mpich-1.2.7/romio/adio/ad_xfs/ad_xfs_resize.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_xfs_resize.c,v 1.11 2004/10/04 15:51:22 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_xfs/ad_xfs_wait.c +++ mpich-1.2.7/romio/adio/ad_xfs/ad_xfs_wait.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_xfs_wait.c,v 1.11 2004/10/04 15:51:22 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/ad_xfs/ad_xfs_write.c +++ mpich-1.2.7/romio/adio/ad_xfs/ad_xfs_write.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_xfs_write.c,v 1.16 2005/05/23 23:27:47 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -12,6 +11,8 @@ #include #endif +/* style: allow:free:2 sig:0 */ + static void ADIOI_XFS_Aligned_Mem_File_Write(ADIO_File fd, void *buf, int len, ADIO_Offset offset, int *err); --- mpich-1.2.7.orig/romio/adio/common/Makefile.in +++ mpich-1.2.7/romio/adio/common/Makefile.in @@ -27,7 +27,8 @@ ad_read_str_naive.o gencheck.o ad_set_view.o ad_iopen.o \ ad_write_str_naive.o ad_resize.o ad_read.o ad_write.o ad_iread.o \ ad_iwrite.o ad_done.o ad_wait.o adi_close.o ad_prealloc.o ad_fcntl.o \ - ad_iread_fake.o ad_iwrite_fake.o ad_done_fake.o ad_wait_fake.o + ad_iread_fake.o ad_iwrite_fake.o ad_done_fake.o ad_wait_fake.o \ + ad_subarray.o ad_darray.o strfns.o all: $(LIBNAME) @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ @@ -39,8 +40,8 @@ .c.o: $(CC) $(CFLAGS) $(INC) -c $< .c.lo: - $(C_COMPILE_SHL) $(CFLAGS) $(INC) -c $< - @mv -f $*.o $*.lo + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o + @mv -f _s$*.o $*.lo $(LIBNAME): $(AD_OBJECTS) $(AR) $(LIBNAME) $(AD_OBJECTS) @@ -50,7 +51,6 @@ $(SHLIBNAME).la: $(AD_LOOBJECTS) $(AR) $(SHLIBNAME).la $(AD_LOOBJECTS) - $(RANLIB) $(SHLIBNAME) clean: @rm -f *.o *.lo --- mpich-1.2.7.orig/romio/adio/common/ad_aggregate.c +++ mpich-1.2.7/romio/adio/common/ad_aggregate.c @@ -80,6 +80,8 @@ int rank_index, rank; ADIO_Offset avail_bytes; + ADIOI_UNREFERENCED_ARG(fd_start); + #ifdef AGG_DEBUG #if 0 FPRINTF(stdout, "off = %lld, min_off = %lld, len = %lld, fd_size = %lld\n", @@ -90,6 +92,12 @@ /* get an index into our array of aggregators */ rank_index = (int) ((off - min_off + fd_size)/ fd_size - 1); + /* we index into fd_end with rank_index, and fd_end was allocated to be no + * bigger than fd->hins->cb_nodes. If we ever violate that, we're + * overrunning arrays. Obviously, we should never ever hit this abort */ + if (rank_index >= fd->hints->cb_nodes) + MPI_Abort(MPI_COMM_WORLD, 1); + /* remember here that even in Rajeev's original code it was the case that * different aggregators could end up with different amounts of data to * aggregate. here we use fd_end[] to make sure that we know how much @@ -220,6 +228,10 @@ * contig_access_count was calculated way back in ADIOI_Calc_my_off_len() */ for (i=0; i < contig_access_count; i++) { + /* short circuit offset/len processing if len == 0 + * (zero-byte read/write */ + if (len_list[i] == 0) + continue; off = offset_list[i]; fd_len = len_list[i]; /* note: we set fd_len to be the total size of the access. then @@ -270,6 +282,10 @@ /* now fill in my_req */ curr_idx = 0; for (i=0; iagg_comm != MPI_COMM_NULL) { MPI_Comm_free(&(fd->agg_comm)); } - free(fd->filename); /* should not use ADIOI_Free here, because - it was strdup'ed */ + ADIOI_Free(fd->filename); MPI_Type_get_envelope(fd->etype, &i, &j, &k, &combiner); if (combiner != MPI_COMBINER_NAMED) MPI_Type_free(&(fd->etype)); --- mpich-1.2.7.orig/romio/adio/common/ad_darray.c +++ mpich-1.2.7/romio/adio/common/ad_darray.c @@ -24,7 +24,7 @@ int order, MPI_Datatype oldtype, MPI_Datatype *newtype) { - MPI_Datatype type_old, type_new, types[3]; + MPI_Datatype type_old, type_new=MPI_DATATYPE_NULL, types[3]; int procs, tmp_rank, i, tmp_size, blklens[3], *coords; MPI_Aint *st_offsets, orig_extent, disps[3]; --- mpich-1.2.7.orig/romio/adio/common/ad_delete.c +++ mpich-1.2.7/romio/adio/common/ad_delete.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_delete.c,v 1.18 2004/10/04 15:51:23 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_done.c +++ mpich-1.2.7/romio/adio/common/ad_done.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_done.c,v 1.6 2005/05/24 20:16:35 thakur Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_done_fake.c +++ mpich-1.2.7/romio/adio/common/ad_done_fake.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_done_fake.c,v 1.1 2005/05/23 23:26:21 rross Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_end.c +++ mpich-1.2.7/romio/adio/common/ad_end.c @@ -95,6 +95,11 @@ { int error_code; + ADIOI_UNREFERENCED_ARG(comm); + ADIOI_UNREFERENCED_ARG(keyval); + ADIOI_UNREFERENCED_ARG(attribute_val); + ADIOI_UNREFERENCED_ARG(extra_state); + ADIO_End(&error_code); return error_code; } --- mpich-1.2.7.orig/romio/adio/common/ad_fcntl.c +++ mpich-1.2.7/romio/adio/common/ad_fcntl.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_fcntl.c,v 1.2 2005/05/23 23:27:48 rross Exp $ * * Copyright (C) 2005 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_flush.c +++ mpich-1.2.7/romio/adio/common/ad_flush.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_flush.c,v 1.15 2004/10/04 15:51:23 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_fstype.c +++ mpich-1.2.7/romio/adio/common/ad_fstype.c @@ -147,7 +147,7 @@ /* no such file, or file is not a link; these are the "normal" * cases where we can just return the parent directory. */ - dir = strdup(filename); + dir = ADIOI_Strdup(filename); } else { /* filename is a symlink. we've presumably already tried @@ -165,18 +165,18 @@ * we determined that this was a link and the time that * we attempted to read it; punt and use the old name. */ - dir = strdup(filename); + dir = ADIOI_Strdup(filename); } else { /* successfully read the link */ linkbuf[namelen] = '\0'; /* readlink doesn't null terminate */ - dir = strdup(linkbuf); + dir = ADIOI_Strdup(linkbuf); ADIOI_Free(linkbuf); } } slash = strrchr(dir, '/'); - if (!slash) strcpy(dir, "."); + if (!slash) ADIOI_Strncpy(dir, ".", 2); else { if (slash == dir) *(dir + 1) = '\0'; else *slash = '\0'; @@ -239,8 +239,7 @@ ADIO_FileSysType_parentdir(filename, &dir); err = statvfs(dir, &vfsbuf); - /* "dir" was allocated with strdup() in ADIO_FileSysType_parentdir */ - free(dir); + ADIOI_Free(dir); } /* --BEGIN ERROR HANDLING-- */ @@ -283,7 +282,7 @@ if (err && (errno == ENOENT)) { ADIO_FileSysType_parentdir(filename, &dir); err = statfs(dir, &fsbuf); - free(dir); + ADIOI_Free(dir); } /* --BEGIN ERROR HANDLING-- */ @@ -364,7 +363,7 @@ if (err && (errno == ENOENT)) { ADIO_FileSysType_parentdir(filename, &dir); err = stat(dir, &sbuf); - free(dir); + ADIOI_Free(dir); } if (err) { @@ -382,25 +381,20 @@ #endif /* STAT APPROACH */ #ifdef ROMIO_NTFS + ADIOI_UNREFERENCED_ARG(filename); + ADIOI_UNREFERENCED_ARG(error_code); *fstype = ADIO_NTFS; /* only supported FS on Windows */ - return; -#endif - -#ifdef ROMIO_NFS +#elif defined(ROMIO_NFS) *fstype = ADIO_NFS; - return; -#endif - -#ifdef ROMIO_UFS +#elif defined(ROMIO_UFS) *fstype = ADIO_UFS; - return; -#endif - +#else /* --BEGIN ERROR HANDLING-- */ *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_NO_SUCH_FILE, "**filename", "**filename %s", filename); /* --END ERROR HANDLING-- */ +#endif } /* --- mpich-1.2.7.orig/romio/adio/common/ad_hints.c +++ mpich-1.2.7/romio/adio/common/ad_hints.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_hints.c,v 1.19 2004/10/04 15:51:24 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -19,7 +18,7 @@ MPI_Info info; char *value; - int flag, intval, tmp_val, nprocs, nprocs_is_valid = 0; + int flag, intval, tmp_val, nprocs=0, nprocs_is_valid = 0, len; static char myname[] = "ADIOI_GEN_SETINFO"; if (fd->info == MPI_INFO_NULL) MPI_Info_create(&(fd->info)); @@ -55,7 +54,7 @@ /* number of processes that perform I/O in collective I/O */ MPI_Comm_size(fd->comm, &nprocs); nprocs_is_valid = 1; - sprintf(value, "%d", nprocs); + ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", nprocs); MPI_Info_set(info, "cb_nodes", value); fd->hints->cb_nodes = nprocs; @@ -303,11 +302,12 @@ * either by the user or to the default */ MPI_Info_set(info, "cb_config_list", value); - fd->hints->cb_config_list = ADIOI_Malloc((strlen(value)+1) * sizeof(char)); + len = (strlen(value)+1) * sizeof(char); + fd->hints->cb_config_list = ADIOI_Malloc(len); if (fd->hints->cb_config_list == NULL) { /* NEED TO HANDLE ENOMEM */ } - strcpy(fd->hints->cb_config_list, value); + ADIOI_Strncpy(fd->hints->cb_config_list, value, len); } /* if it has been set already, we ignore it the second time. * otherwise we would get an error if someone used the same @@ -321,11 +321,12 @@ */ if (fd->hints->cb_config_list == NULL) { MPI_Info_set(info, "cb_config_list", ADIOI_CB_CONFIG_LIST_DFLT); - fd->hints->cb_config_list = ADIOI_Malloc((strlen(ADIOI_CB_CONFIG_LIST_DFLT)+1) * sizeof(char)); + len = (strlen(ADIOI_CB_CONFIG_LIST_DFLT)+1) * sizeof(char); + fd->hints->cb_config_list = ADIOI_Malloc(len); if (fd->hints->cb_config_list == NULL) { /* NEED TO HANDLE ENOMEM */ } - strcpy(fd->hints->cb_config_list, ADIOI_CB_CONFIG_LIST_DFLT); + ADIOI_Strncpy(fd->hints->cb_config_list, ADIOI_CB_CONFIG_LIST_DFLT, len); } /* deferred_open won't be set by callers, but if the user doesn't * explicitly disable collecitve buffering (two-phase) and does hint that --- mpich-1.2.7.orig/romio/adio/common/ad_init.c +++ mpich-1.2.7/romio/adio/common/ad_init.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_init.c,v 1.11 2004/10/04 15:51:24 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -50,6 +49,9 @@ char *c; #endif + ADIOI_UNREFERENCED_ARG(argc); + ADIOI_UNREFERENCED_ARG(argv); + /* initialize the linked list containing flattened datatypes */ ADIOI_Flatlist = (ADIOI_Flatlist_node *) ADIOI_Malloc(sizeof(ADIOI_Flatlist_node)); ADIOI_Flatlist->type = MPI_DATATYPE_NULL; --- mpich-1.2.7.orig/romio/adio/common/ad_iopen.c +++ mpich-1.2.7/romio/adio/common/ad_iopen.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_iopen.c,v 1.1 2003/06/08 05:21:43 robl Exp $ * * Copyright (C) 2002 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_iread.c +++ mpich-1.2.7/romio/adio/common/ad_iread.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_iread.c,v 1.5 2005/05/24 20:16:35 thakur Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_iread_fake.c +++ mpich-1.2.7/romio/adio/common/ad_iread_fake.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_iread_fake.c,v 1.1 2005/05/23 23:26:22 rross Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_iwrite.c +++ mpich-1.2.7/romio/adio/common/ad_iwrite.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_iwrite.c,v 1.6 2005/05/24 20:16:35 thakur Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_iwrite_fake.c +++ mpich-1.2.7/romio/adio/common/ad_iwrite_fake.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_iwrite_fake.c,v 1.1 2005/05/23 23:26:22 rross Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_open.c +++ mpich-1.2.7/romio/adio/common/ad_open.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_open.c,v 1.30 2005/05/23 23:27:48 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -28,11 +27,12 @@ int orig_amode_excl, orig_amode_wronly, err, rank, procs, agg_rank; char *value; static char myname[] = "ADIO_OPEN"; - int rank_ct, max_error_code; int *tmp_ranklist; MPI_Comm aggregator_comm = MPI_COMM_NULL; /* just for deferred opens */ + ADIOI_UNREFERENCED_ARG(iomode); + *error_code = MPI_SUCCESS; /* obtain MPI_File handle */ @@ -45,7 +45,7 @@ fd->fp_ind = disp; fd->fp_sys_posn = 0; fd->comm = comm; /* dup'ed in MPI_File_open */ - fd->filename = strdup(filename); + fd->filename = ADIOI_Strdup(filename); fd->file_system = file_system; /* TODO: VERIFY THAT WE DON'T NEED TO ALLOCATE THESE, THEN DON'T. */ @@ -107,7 +107,7 @@ fd->hints->cb_nodes = rank_ct; /* TEMPORARY -- REMOVE WHEN NO LONGER UPDATING INFO FOR FS-INDEP. */ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - sprintf(value, "%d", rank_ct); + ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", rank_ct); MPI_Info_set(fd->info, "cb_nodes", value); ADIOI_Free(value); } @@ -253,7 +253,7 @@ } if (fd->fns) ADIOI_Free(fd->fns); - if (fd->filename) free(fd->filename); + if (fd->filename) ADIOI_Free(fd->filename); if (fd->info != MPI_INFO_NULL) MPI_Info_free(&(fd->info)); ADIOI_Free(fd); fd = ADIO_FILE_NULL; --- mpich-1.2.7.orig/romio/adio/common/ad_prealloc.c +++ mpich-1.2.7/romio/adio/common/ad_prealloc.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_prealloc.c,v 1.1 2004/11/01 20:33:37 robl Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -20,6 +19,7 @@ ADIO_Status status; int i, ntimes; char *buf; + ADIO_Fcntl_t *fcntl_struct; static char myname[] = "ADIOI_GEN_PREALLOC"; /* will be called by one process only */ @@ -31,7 +31,12 @@ preallocation is needed. read/write in sizes of no more than ADIOI_PREALLOC_BUFSZ */ - curr_fsize = fd->fp_ind; + /*curr_fsize = fd->fp_ind; */ + fcntl_struct = (ADIO_Fcntl_t *) ADIOI_Malloc(sizeof(ADIO_Fcntl_t)); + ADIO_Fcntl(fd, ADIO_FCNTL_GET_FSIZE, fcntl_struct, error_code); + + curr_fsize = fcntl_struct->fsize; /* don't rely on fd->fp_ind: might be + working on a pre-existing file */ alloc_size = diskspace; size = ADIOI_MIN(curr_fsize, alloc_size); @@ -71,6 +76,7 @@ done += len; } } + ADIOI_Free(fcntl_struct); ADIOI_Free(buf); *error_code = MPI_SUCCESS; } --- mpich-1.2.7.orig/romio/adio/common/ad_read.c +++ mpich-1.2.7/romio/adio/common/ad_read.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_read.c,v 1.2 2004/10/04 15:51:25 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_read_coll.c +++ mpich-1.2.7/romio/adio/common/ad_read_coll.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_read_coll.c,v 1.19 2004/12/23 20:03:32 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -69,7 +68,7 @@ whose request lies in this process's file domain. */ int i, filetype_is_contig, nprocs, nprocs_for_coll, myrank; - int contig_access_count, interleave_count = 0, buftype_is_contig; + int contig_access_count=0, interleave_count = 0, buftype_is_contig; int *count_my_req_per_proc, count_my_req_procs, count_others_req_procs; ADIO_Offset start_offset, end_offset, orig_fp, fd_size, min_st_offset, off; ADIO_Offset *offset_list = NULL, *st_offsets = NULL, *fd_start = NULL, @@ -937,9 +936,11 @@ int i, p, flat_buf_idx, size, buf_incr; int flat_buf_sz, size_in_buf, n_buftypes; ADIO_Offset off, len, rem_len, user_buf_idx; - int *curr_from_proc, *done_from_proc, *recv_buf_idx; + ADIOI_UNREFERENCED_ARG(requests); + ADIOI_UNREFERENCED_ARG(statuses); + /* curr_from_proc[p] = amount of data recd from proc. p that has already been accounted for so far done_from_proc[p] = amount of data already recd from proc. p and --- mpich-1.2.7.orig/romio/adio/common/ad_read_str.c +++ mpich-1.2.7/romio/adio/common/ad_read_str.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_read_str.c,v 1.10 2002/10/24 17:01:12 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_read_str_naive.c +++ mpich-1.2.7/romio/adio/common/ad_read_str_naive.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_read_str_naive.c,v 1.3 2002/10/24 17:01:12 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_resize.c +++ mpich-1.2.7/romio/adio/common/ad_resize.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_resize.c,v 1.3 2004/11/03 20:57:22 gropp Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_seek.c +++ mpich-1.2.7/romio/adio/common/ad_seek.c @@ -31,6 +31,8 @@ int filetype_size, etype_size, filetype_is_contig; MPI_Aint filetype_extent; + ADIOI_UNREFERENCED_ARG(whence); + ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig); etype_size = fd->etype_size; --- mpich-1.2.7.orig/romio/adio/common/ad_set_view.c +++ mpich-1.2.7/romio/adio/common/ad_set_view.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_set_view.c,v 1.3 2003/05/05 22:59:22 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_subarray.c +++ mpich-1.2.7/romio/adio/common/ad_subarray.c @@ -16,10 +16,9 @@ MPI_Datatype oldtype, MPI_Datatype *newtype) { - MPI_Aint extent, disps[3], size, size_with_aint; + MPI_Aint extent, disps[3], size; int i, blklens[3]; MPI_Datatype tmp1, tmp2, types[3]; - MPI_Offset size_with_offset; MPI_Type_extent(oldtype, &extent); --- mpich-1.2.7.orig/romio/adio/common/ad_wait.c +++ mpich-1.2.7/romio/adio/common/ad_wait.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_wait.c,v 1.6 2005/05/24 20:16:35 thakur Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_wait_fake.c +++ mpich-1.2.7/romio/adio/common/ad_wait_fake.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_wait_fake.c,v 1.1 2005/05/23 23:26:22 rross Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_write.c +++ mpich-1.2.7/romio/adio/common/ad_write.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_write.c,v 1.2 2004/10/04 15:51:25 robl Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/ad_write_coll.c +++ mpich-1.2.7/romio/adio/common/ad_write_coll.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_write_coll.c,v 1.26 2004/12/23 20:03:32 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -70,7 +69,7 @@ whose request lies in this process's file domain. */ int i, filetype_is_contig, nprocs, nprocs_for_coll, myrank; - int contig_access_count, interleave_count = 0, buftype_is_contig; + int contig_access_count=0, interleave_count = 0, buftype_is_contig; int *count_my_req_per_proc, count_my_req_procs, count_others_req_procs; ADIO_Offset orig_fp, start_offset, end_offset, fd_size, min_st_offset, off; ADIO_Offset *offset_list = NULL, *st_offsets = NULL, *fd_start = NULL, @@ -929,7 +928,7 @@ removed the recursion so that there are no function calls. Function calls are too expensive. */ k = i; - while (1) { + for(;;) { l = 2*(k+1) - 1; r = 2*(k+1); @@ -980,7 +979,7 @@ /* Heapify(a, 0, heapsize); */ k = 0; - while (1) { + for (;;) { l = 2*(k+1) - 1; r = 2*(k+1); --- mpich-1.2.7.orig/romio/adio/common/ad_write_str.c +++ mpich-1.2.7/romio/adio/common/ad_write_str.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_write_str.c,v 1.14 2004/10/29 21:32:57 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -16,7 +15,13 @@ ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE, \ ADIO_EXPLICIT_OFFSET, writebuf_off, &status1, error_code); \ if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \ - if (*error_code != MPI_SUCCESS) return; \ + if (*error_code != MPI_SUCCESS) { \ + *error_code = MPIO_Err_create_code(*error_code, \ + MPIR_ERR_RECOVERABLE, myname, \ + __LINE__, MPI_ERR_IO, \ + "**iowswc", 0); \ + return; \ + } \ } \ writebuf_off = req_off; \ writebuf_len = (int) (ADIOI_MIN(max_bufsize,end_offset-writebuf_off+1));\ @@ -27,7 +32,7 @@ *error_code = MPIO_Err_create_code(*error_code, \ MPIR_ERR_RECOVERABLE, myname, \ __LINE__, MPI_ERR_IO, \ - "**ioRMWrdwr", 0); \ + "**iowsrc", 0); \ return; \ } \ } \ @@ -37,7 +42,13 @@ ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE, \ ADIO_EXPLICIT_OFFSET, writebuf_off, &status1, error_code); \ if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \ - if (*error_code != MPI_SUCCESS) return; \ + if (*error_code != MPI_SUCCESS) { \ + *error_code = MPIO_Err_create_code(*error_code, \ + MPIR_ERR_RECOVERABLE, myname, \ + __LINE__, MPI_ERR_IO, \ + "**iowswc", 0); \ + return; \ + } \ req_len -= write_sz; \ userbuf_off += write_sz; \ writebuf_off += writebuf_len; \ @@ -49,7 +60,7 @@ *error_code = MPIO_Err_create_code(*error_code, \ MPIR_ERR_RECOVERABLE, myname, \ __LINE__, MPI_ERR_IO, \ - "**ioRMWrdwr", 0); \ + "**iowsrc", 0); \ return; \ } \ write_sz = ADIOI_MIN(req_len, writebuf_len); \ @@ -65,7 +76,13 @@ if (req_off >= writebuf_off + writebuf_len) { \ ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE, \ ADIO_EXPLICIT_OFFSET, writebuf_off, &status1, error_code); \ - if (*error_code != MPI_SUCCESS) return; \ + if (*error_code != MPI_SUCCESS) { \ + *error_code = MPIO_Err_create_code(*error_code, \ + MPIR_ERR_RECOVERABLE, myname, \ + __LINE__, MPI_ERR_IO, \ + "**iowswc", 0); \ + return; \ + } \ writebuf_off = req_off; \ writebuf_len = (int) (ADIOI_MIN(max_bufsize,end_offset-writebuf_off+1));\ } \ @@ -74,7 +91,13 @@ while (write_sz != req_len) { \ ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE, \ ADIO_EXPLICIT_OFFSET, writebuf_off, &status1, error_code); \ - if (*error_code != MPI_SUCCESS) return; \ + if (*error_code != MPI_SUCCESS) { \ + *error_code = MPIO_Err_create_code(*error_code, \ + MPIR_ERR_RECOVERABLE, myname, \ + __LINE__, MPI_ERR_IO, \ + "**iowswc", 0); \ + return; \ + } \ req_len -= write_sz; \ userbuf_off += write_sz; \ writebuf_off += writebuf_len; \ --- mpich-1.2.7.orig/romio/adio/common/ad_write_str_naive.c +++ mpich-1.2.7/romio/adio/common/ad_write_str_naive.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ad_write_str_naive.c,v 1.1 2003/12/16 21:51:23 robl Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/adi_close.c +++ mpich-1.2.7/romio/adio/common/adi_close.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: adi_close.c,v 1.3 2005/05/24 17:41:00 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/async_list.c +++ mpich-1.2.7/romio/adio/common/async_list.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: async_list.c,v 1.5 2004/10/04 15:51:26 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/byte_offset.c +++ mpich-1.2.7/romio/adio/common/byte_offset.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: byte_offset.c,v 1.4 2002/10/24 17:01:13 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/cb_config_list.c +++ mpich-1.2.7/romio/adio/common/cb_config_list.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: cb_config_list.c,v 1.5 2003/04/24 21:10:20 David Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -83,7 +82,7 @@ /* TEMPORARY -- REMOVE WHEN NO LONGER UPDATING INFO FOR * FS-INDEP. */ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - sprintf(value, "%d", fd->hints->cb_nodes); + ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", fd->hints->cb_nodes); MPI_Info_set(fd->info, "cb_nodes", value); ADIOI_Free(value); @@ -330,7 +329,7 @@ else { /* AGG_STRING is the only remaining case */ /* save procname (for now) */ - strcpy(cur_procname, yylval); + ADIOI_Strncpy(cur_procname, yylval, MPI_MAX_INFO_VAL+1); cur_procname_p = cur_procname; } @@ -368,6 +367,10 @@ { ADIO_cb_name_array array; + ADIOI_UNREFERENCED_ARG(comm); + ADIOI_UNREFERENCED_ARG(keyval); + ADIOI_UNREFERENCED_ARG(extra); + array = (ADIO_cb_name_array) attr_in; array->refct++; @@ -387,6 +390,10 @@ int i; ADIO_cb_name_array array; + ADIOI_UNREFERENCED_ARG(comm); + ADIOI_UNREFERENCED_ARG(keyval); + ADIOI_UNREFERENCED_ARG(extra); + array = (ADIO_cb_name_array) attr_val; array->refct--; @@ -700,7 +707,7 @@ * should ensure that no one tries to use wildcards with strings * (e.g. "ccn*"). */ - strncpy(yylval, token_ptr, slen); + ADIOI_Strncpy(yylval, token_ptr, slen); yylval[slen] = '\0'; token_ptr += slen; return AGG_STRING; --- mpich-1.2.7.orig/romio/adio/common/eof_offset.c +++ mpich-1.2.7/romio/adio/common/eof_offset.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: eof_offset.c,v 1.4 2002/10/24 17:01:14 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -15,7 +14,7 @@ void ADIOI_Get_eof_offset(ADIO_File fd, ADIO_Offset *eof_offset) { int error_code, filetype_is_contig, etype_size, filetype_size; - ADIO_Offset fsize, disp, sum, size_in_file; + ADIO_Offset fsize, disp, sum=0, size_in_file; int n_filetypes, flag, i, rem; ADIO_Fcntl_t *fcntl_struct; MPI_Aint filetype_extent; --- mpich-1.2.7.orig/romio/adio/common/error.c +++ mpich-1.2.7/romio/adio/common/error.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: error.c,v 1.3 2004/10/04 15:51:26 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/flatten.c +++ mpich-1.2.7/romio/adio/common/flatten.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: flatten.c,v 1.18 2004/11/02 18:35:09 robl Exp $ + * $Id: flatten.c,v 1.22 2005/08/12 18:56:56 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -13,55 +13,12 @@ #endif */ void ADIOI_Optimize_flattened(ADIOI_Flatlist_node *flat_type); -void ADIOI_Flatten_subarray(int ndims, - int *array_of_sizes, - int *array_of_subsizes, - int *array_of_starts, - int order, - MPI_Datatype oldtype, - ADIOI_Flatlist_node *flat, - ADIO_Offset start_offset, - int *inout_index_p); -void ADIOI_Flatten_darray(int size, - int rank, - int ndims, - int array_of_gsizes[], - int array_of_distribs[], - int array_of_dargs[], - int array_of_psizes[], - int order, - MPI_Datatype oldtype, - ADIOI_Flatlist_node *flat, - ADIO_Offset start_offset, - int *inout_index_p); void ADIOI_Flatten_copy_type(ADIOI_Flatlist_node *flat, int old_type_start, int old_type_end, int new_type_start, ADIO_Offset offset_adjustment); -/* darray helper functions */ -#ifdef MPIIMPL_HAVE_MPI_COMBINER_DARRAY -static int index_of_type(int type_nr, - int dim_size, - int dim_rank, - int dim_ranks, - int k); -static int get_cyclic_k(int dim_size, - int dim_ranks, - int dist, - int d_arg); -static void get_darray_position(int rank, - int ranks, - int ndims, - int array_of_psizes[], - int r[]); -static int local_types_in_dim(int dim_size, - int dim_rank, - int dim_ranks, - int k); -#endif - /* flatten datatype and add it to Flatlist */ void ADIOI_Flatten_datatype(MPI_Datatype datatype) { @@ -101,7 +58,7 @@ flat->count = ADIOI_Count_contiguous_blocks(datatype, &curr_index); #if 0 - printf("cur_idx = %d\n", curr_index); + FPRINTF(stderr, "cur_idx = %d\n", curr_index); #endif /* FPRINTF(stderr, "%d\n", flat->count);*/ @@ -170,18 +127,19 @@ #endif #ifdef MPIIMPL_HAVE_MPI_COMBINER_SUBARRAY case MPI_COMBINER_SUBARRAY: - { + { int dims = ints[0]; - ADIOI_Flatten_subarray(dims, - &ints[1], /* sizes */ - &ints[dims+1], /* subsizes */ - &ints[2*dims+1], /* starts */ - ints[3*dims+1], /* order */ - types[0], /* type */ - flat, - st_offset, - curr_index); - + MPI_Datatype stype; + + ADIO_Type_create_subarray(dims, + &ints[1], /* sizes */ + &ints[dims+1], /* subsizes */ + &ints[2*dims+1], /* starts */ + ints[3*dims+1], /* order */ + types[0], /* type */ + &stype); + ADIOI_Flatten(stype, flat, st_offset, curr_index); + MPI_Type_free(&stype); } break; #endif @@ -189,18 +147,20 @@ case MPI_COMBINER_DARRAY: { int dims = ints[2]; - ADIOI_Flatten_darray(ints[0], /* size */ - ints[1], /* rank */ - dims, - &ints[3], /* gsizes */ - &ints[dims+3], /* distribs */ - &ints[2*dims+3], /* dargs */ - &ints[3*dims+3], /* psizes */ - ints[4*dims+3], /* order */ - types[0], - flat, - st_offset, - curr_index); + MPI_Datatype dtype; + + ADIO_Type_create_darray(ints[0], /* size */ + ints[1], /* rank */ + dims, + &ints[3], /* gsizes */ + &ints[dims+3], /* distribs */ + &ints[2*dims+3], /* dargs */ + &ints[3*dims+3], /* psizes */ + ints[4*dims+3], /* order */ + types[0], + &dtype); + ADIOI_Flatten(dtype, flat, st_offset, curr_index); + MPI_Type_free(&dtype); } break; #endif @@ -578,89 +538,47 @@ #endif #ifdef MPIIMPL_HAVE_MPI_COMBINER_SUBARRAY case MPI_COMBINER_SUBARRAY: - /* first get an upper bound (since we're not optimizing) on the - * number of blocks in the child type. - */ - MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); - ADIOI_Datatype_iscontig(types[0], &old_is_contig); - - - prev_index = *curr_index; - if ((old_combiner != MPI_COMBINER_NAMED) && (!old_is_contig)) { - count = ADIOI_Count_contiguous_blocks(types[0], curr_index); - } - else { - count = 1; - (*curr_index)++; - } + { + int dims = ints[0]; + MPI_Datatype stype; - /* now multiply that by the number of types in the subarray. - * - * note: we could be smarter about this, because chances are - * our data is contiguous in the first dimension if the child - * type is contiguous. - * - * ints[0] - ndims - * ints[ndims+1..2*ndims] - subsizes - */ - top_count = 1; /* going to tally up # of types in here */ - for (i=0; i < ints[0]; i++) { - top_count *= ints[ints[0]+1+i]; - } + ADIO_Type_create_subarray(dims, + &ints[1], /* sizes */ + &ints[dims+1], /* subsizes */ + &ints[2*dims+1], /* starts */ + ints[3*dims+1], /* order */ + types[0], /* type */ + &stype); + count = ADIOI_Count_contiguous_blocks(stype, curr_index); + /* curr_index will have already been updated; just pass + * count back up. + */ + MPI_Type_free(&stype); - if (top_count > 1) { - num = *curr_index - prev_index; - count *= top_count; - *curr_index += (top_count - 1) * num; } break; #endif #ifdef MPIIMPL_HAVE_MPI_COMBINER_DARRAY case MPI_COMBINER_DARRAY: { - int dims, k, *ranks; - - MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); - ADIOI_Datatype_iscontig(types[0], &old_is_contig); - - prev_index = *curr_index; - if ((old_combiner != MPI_COMBINER_NAMED) && (!old_is_contig)) { - count = ADIOI_Count_contiguous_blocks(types[0], curr_index); - } - else { - count = 1; - (*curr_index)++; - } - - top_count = 1; - dims = ints[2]; - ranks = ADIOI_Malloc(sizeof(int) * dims); - get_darray_position(ints[1], /* rank */ - ints[0], /* size */ - dims, - &ints[3*dims+3], /* psizes */ - ranks); - - for (i=0; i < dims; i++) { - k = get_cyclic_k(ints[3+i], /* gsize */ - ints[3*dims+3+i], /* psize */ - ints[dims+3+i], /* distrib */ - ints[2*dims+3+i]); /* darg */ - - top_count *= local_types_in_dim(ints[3+i], /* gsize */ - ranks[i], /* dim rank */ - ints[3*dims+3+i],/* psize */ - k); - } - ADIOI_Free(ranks); + int dims = ints[2]; + MPI_Datatype dtype; - if (top_count > 1) { - num = *curr_index - prev_index; - count *= top_count; - *curr_index += (top_count - 1) * num; - } + ADIO_Type_create_darray(ints[0], /* size */ + ints[1], /* rank */ + dims, + &ints[3], /* gsizes */ + &ints[dims+3], /* distribs */ + &ints[2*dims+3], /* dargs */ + &ints[3*dims+3], /* psizes */ + ints[4*dims+3], /* order */ + types[0], + &dtype); + count = ADIOI_Count_contiguous_blocks(dtype, curr_index); + /* curr_index will have already been updated; just pass + * count back up. + */ + MPI_Type_free(&dtype); } break; #endif @@ -858,8 +776,6 @@ return; } -/****************************************************************/ - void ADIOI_Delete_flattened(MPI_Datatype datatype) { ADIOI_Flatlist_node *flat, *prev; @@ -877,176 +793,6 @@ } } -/****************************************************************/ - -#ifdef MPIIMPL_HAVE_MPI_COMBINER_SUBARRAY -/* ADIOI_Flatten_subarray() - * - * ndims - number of dimensions in the array - * array_of_sizes - dimensions of the array (one value per dim) - * array_of_subsizes - dimensions of the subarray (one value per dim) - * array_of_starts - starting offsets of the subarray (one value per dim) - * order - MPI_ORDER_FORTRAN or MPI_ORDER_C - * oldtype - type on which this subarray as built - * flat - ... - * start_offset - offset of this type to begin with - * inout_index_p - as an input holds the count of indices (and blocklens) - * that have already been used (also the index to the next - * location to fill in!) - */ -void ADIOI_Flatten_subarray(int ndims, - int *array_of_sizes, - int *array_of_subsizes, - int *array_of_starts, - int order, - MPI_Datatype oldtype, - ADIOI_Flatlist_node *flat, - ADIO_Offset start_offset, - int *inout_index_p) -{ - int i, j, total_types, *dim_sz, flatten_start_offset, - flatten_end_offset; - int old_nints, old_nadds, old_ntypes, old_combiner; - ADIO_Offset subarray_start_offset, type_offset, *dim_skipbytes; - MPI_Aint oldtype_extent; - - MPI_Type_extent(oldtype, &oldtype_extent); - - /* TODO: optimization for 1-dimensional types -- treat like a contig */ - - /* general case - make lots of copies of the offsets, adjusting - * the indices as necessary. - */ - - /* allocate space for temporary values */ - dim_sz = (int *) ADIOI_Malloc(sizeof(int)*(ndims)); - dim_skipbytes = (ADIO_Offset *) ADIOI_Malloc(sizeof(ADIO_Offset)*(ndims)); - - /* get a count of the total number of types (of type oldtype) in - * the subarray. - */ - total_types = 1; - for (i=0; i < ndims; i++) total_types *= array_of_subsizes[i]; - - /* fill in the temporary values dim_sz and dim_skipbytes. - * - * these are used to calculate the starting offset for each instance - * of oldtype in the subarray. we precalculate these values so that - * we can avoid calculating them for every instance. this is all done - * so that we can avoid a recursive algorithm here, which could be very - * expensive if done for every dimension. - * - * finally, we're going to store these in C order regardless of how the - * arrays were described in the first place. - * - * dim_sz is a value describing the number of types that go into a single - * block in this dimension. dim_skipbytes is the distance necessary to - * move from one block to the next in this dimension. - * - * this is a little misleading, because actually dim_sz[ndims-1] is - * always 1 and the dim_skipbytes[ndims-1] is always the extent... - * - * the dim_sz values are in terms of types, the dim_skipbytes are in - * terms of bytes, and do *not* include the starting offset calculated - * above. - */ - - /* priming the loop more or less */ - dim_sz[ndims-1] = 1; - dim_skipbytes[ndims-1] = oldtype_extent; - - for (i=ndims-2; i >= 0; i--) { - dim_sz[i] = dim_sz[i+1]; - dim_skipbytes[i] = dim_skipbytes[i+1]; - if (order == MPI_ORDER_FORTRAN) { - dim_sz[i] *= array_of_subsizes[ndims-2-i]; - dim_skipbytes[i] *= array_of_sizes[ndims-2-i]; - } - else { - dim_sz[i] *= array_of_subsizes[i+1]; - dim_skipbytes[i] *= array_of_sizes[i+1]; - } - } - - /* determine our starting offset for use later; this is a lot - * easier to do now that we have the dim_skipbytes[] array from - * above. - */ - subarray_start_offset = 0; - for (i=0; i < ndims; i++) { - if (order == MPI_ORDER_FORTRAN) { - subarray_start_offset += array_of_starts[ndims-1-i]*dim_skipbytes[i]; - } - else { - subarray_start_offset += array_of_starts[i]*dim_skipbytes[i]; - } - } - subarray_start_offset += start_offset; /* add in input parameter */ - - /* flatten one of the type to get the offsets that we need; - * really we need the starting offset to be right in order to - * do this in-place. - * - * we save the offset to the first piece of the flattened type - * so we can know what to make copies of in the next step. - */ - flatten_start_offset = *inout_index_p; - MPI_Type_get_envelope(oldtype, &old_nints, &old_nadds, - &old_ntypes, &old_combiner); - if (old_combiner != MPI_COMBINER_NAMED) - { - ADIOI_Flatten(oldtype, flat, subarray_start_offset, inout_index_p); - } - else { - int oldtype_size; - - flat->indices[flatten_start_offset] = subarray_start_offset; - MPI_Type_size(oldtype, &oldtype_size); - flat->blocklens[flatten_start_offset] = oldtype_size; - (*inout_index_p)++; - } - - /* note this is really one larger than the end offset, but - * that's what we want below. - */ - flatten_end_offset = *inout_index_p; - - /* now we run through all the blocks, calculating their effective - * offset and then making copies of all the regions for the type - * for this instance. - */ - for (i=1; i < total_types; i++) { - int block_nr = i; - type_offset = 0; - - for (j=0; j < ndims; j++) { - /* move through dimensions from least frequently changing - * to most frequently changing, calculating offset to get - * to a particular block, then reducing our block number - * so that we can correctly calculate based on the next - * dimension's size. - */ - int dim_index = block_nr / dim_sz[j]; - - if (dim_index) type_offset += dim_index * dim_skipbytes[j]; - block_nr %= dim_sz[j]; - } - - /* do the copy */ - ADIOI_Flatten_copy_type(flat, - flatten_start_offset, - flatten_end_offset, - flatten_start_offset + i * (flatten_end_offset - flatten_start_offset), - type_offset); - } - - /* free our temp space */ - ADIOI_Free(dim_sz); - ADIOI_Free(dim_skipbytes); - *inout_index_p = flatten_start_offset + total_types * (flatten_end_offset - flatten_start_offset); -} -#endif - /* ADIOI_Flatten_copy_type() * flat - pointer to flatlist node holding offset and lengths * start - starting index of src type in arrays @@ -1069,318 +815,3 @@ } } -/****************************************************************/ - -#ifdef MPIIMPL_HAVE_MPI_COMBINER_DARRAY -/* ADIOI_Flatten_darray() - * - * size - number of processes across which darray is defined - * rank - our rank in the group of processes - * ndims - number of dimensions of darray type - * gsizes - dimensions of the array in types (order varies) - * distribs - type of dist. for each dimension (order varies) - * dargs - argument to dist. for each dimension (order varies) - * psizes - number of processes across which each dimension - * is split (always C order) - * order - order of parameters (c or fortran) - * oldtype - type on which this darray is built - * flat - ... - * start_offset - offset of this type to begin with - * inout_index_p - count of indices already used on input, updated - * for output - * - * The general approach is to convert everything into cyclic-k and process - * it from there. - */ -void ADIOI_Flatten_darray(int size, - int rank, - int ndims, - int array_of_gsizes[], - int array_of_distribs[], - int array_of_dargs[], - int array_of_psizes[], - int order, - MPI_Datatype oldtype, - ADIOI_Flatlist_node *flat, - ADIO_Offset start_offset, - int *inout_index_p) -{ - int i, j, total_types, flatten_start_offset, - flatten_end_offset, oldtype_nints, oldtype_nadds, oldtype_ntypes, - oldtype_combiner, *dim_ranks, *dim_ks, *dim_localtypes; - ADIO_Offset darray_start_offset, first_darray_offset; - MPI_Aint oldtype_extent, *dim_skipbytes; - - MPI_Type_extent(oldtype, &oldtype_extent); - - dim_localtypes = ADIOI_Malloc(sizeof(int) * ndims); - dim_skipbytes = ADIOI_Malloc(sizeof(MPI_Aint) * ndims); - dim_ranks = (int *) ADIOI_Malloc(sizeof(int) * ndims); - dim_ks = (int *) ADIOI_Malloc(sizeof(int) * ndims); - - /* fill in dim_ranks, C order (just like psizes) */ - get_darray_position(rank, size, ndims, array_of_psizes, dim_ranks); - - /* calculate all k values; store in same order as arrays */ - for (i=0; i < ndims; i++) { - dim_ks[i] = get_cyclic_k(array_of_gsizes[i], - array_of_psizes[i], - array_of_distribs[i], - array_of_dargs[i]); - } - - /* calculate total number of oldtypes in this type */ - total_types = 1; - for (i=0; i < ndims; i++) { - total_types *= local_types_in_dim(array_of_gsizes[i], - dim_ranks[i], - array_of_psizes[i], - dim_ks[i]); - } - - /* fill in temporary values; these are just cached so we aren't - * calculating them for every type instance. - * - * dim_localtypes holds the # of types this process has in the given - * dimension. - * - * dim_skipbytes (in this function) is going to hold the distance - * to skip to move from one type to the next in that dimension, in - * bytes, in terms of the darray as a whole. sort of like the stride - * for a vector. - * - * we keep this stuff in row-major (C) order -- least-frequently changing - * first. - */ - for (i=0; i < ndims; i++) { - int idx = (order == MPI_ORDER_C) ? i : ndims-1-i; - - dim_localtypes[i] = local_types_in_dim(array_of_gsizes[idx], - dim_ranks[idx], - array_of_psizes[idx], - dim_ks[idx]); - } - - dim_skipbytes[ndims-1] = oldtype_extent; - for (i=ndims-2; i >= 0; i--) { - int idx = (order == MPI_ORDER_C) ? i+1 : ndims-2-i; - - dim_skipbytes[i] = array_of_gsizes[idx] * dim_skipbytes[i+1]; - } - -#if 0 - for (i=0; i < ndims; i++) { - MPIU_dbg_printf("dim_skipbytes[%d] = %d, dim_localtypes[%d] = %d\n", - i, (int) dim_skipbytes[i], i, dim_localtypes[i]); - } -#endif - - - /* determine starting offset */ - darray_start_offset = start_offset; - first_darray_offset = 0; - for (i=0; i < ndims; i++) { - ADIO_Offset this_dim_off; - int idx = (order == MPI_ORDER_C) ? i : ndims-1-i; - - this_dim_off = index_of_type(0, - array_of_gsizes[idx], - dim_ranks[i], - array_of_psizes[i], - dim_ks[idx]); - - this_dim_off *= (ADIO_Offset) dim_skipbytes[i]; - darray_start_offset += this_dim_off; - first_darray_offset += this_dim_off; - } - - /* flatten one of the type to get the offsets that we need; - * we need an accurate starting offset to do this in-place. - * - * we save the starting offset so we can adjust when copying - * later on. - */ - flatten_start_offset = *inout_index_p; - MPI_Type_get_envelope(oldtype, - &oldtype_nints, - &oldtype_nadds, - &oldtype_ntypes, - &oldtype_combiner); - if (oldtype_combiner != MPI_COMBINER_NAMED) { - ADIOI_Flatten(oldtype, flat, darray_start_offset, inout_index_p); - } - else { - int oldtype_size; - - MPI_Type_size(oldtype, &oldtype_size); - - flat->indices[flatten_start_offset] = darray_start_offset; - flat->blocklens[flatten_start_offset] = oldtype_size; - (*inout_index_p)++; - } - flatten_end_offset = *inout_index_p; - - /* now run through all the types, calculating the effective - * offset and then making a copy of the flattened regions for the - * type (and adjusting the offsets of them appropriately) - */ - for (i=0; i < total_types; i++) { - int block_nr = i; - ADIO_Offset type_offset = 0; - - for (j=ndims-1; j >= 0; j--) { - ADIO_Offset dim_off; - int idx = (order == MPI_ORDER_C) ? j : ndims-1-j; - int dim_index = block_nr % dim_localtypes[j]; - - dim_off = index_of_type(dim_index, - array_of_gsizes[idx], - dim_ranks[j], - array_of_psizes[j], - dim_ks[idx]); - - - if (dim_off) type_offset += (ADIO_Offset) dim_off * - (ADIO_Offset) dim_skipbytes[j]; -#if 0 - { - char s1[] = " ", s2[] = " ", s3[] = " "; - MPIU_dbg_printf("%sindex of type %d (pass %d,%d) is %d; new offset = %d\n", - (j == 0) ? s1 : ((j == 1) ? s2 : s3), - dim_index, i, j, (int) dim_off, (int) type_offset); - } -#endif - block_nr /= dim_localtypes[j]; - } - - /* perform copy; noting in this case that the type offsets that - * we are calculating here are relative to the beginning of the - * darray as a whole, not relative to the first of our elements. - * - * because of that we have to subtract off the first_darray_offset - * in order to get the right offset adjustment. - */ - ADIOI_Flatten_copy_type(flat, - flatten_start_offset, - flatten_end_offset, - flatten_start_offset + i * (flatten_end_offset - flatten_start_offset), - type_offset - first_darray_offset); - } - - /* free temp space */ - ADIOI_Free(dim_skipbytes); - ADIOI_Free(dim_localtypes); - ADIOI_Free(dim_ranks); - ADIOI_Free(dim_ks); - - *inout_index_p = flatten_start_offset + total_types * - (flatten_end_offset - flatten_start_offset); -} - -/* darray processing helper functions */ -static int index_of_type(int type_nr, - int dim_size, - int dim_rank, - int dim_ranks, - int k) -{ - int cycle, leftover, index; - - /* handle MPI_DISTRIBUTE_NONE case */ - if (k == 0) return type_nr; - - cycle = type_nr / k; - leftover = type_nr % k; - - index = (dim_rank * k) + (dim_ranks * k * cycle) + leftover; - - return index; -} - -static int get_cyclic_k(int dim_size, - int dim_ranks, - int dist, - int d_arg) -{ - int k; - - /* calculate correct "k" if DFLT_DARG passed in */ - if (dist == MPI_DISTRIBUTE_NONE) return 0; /* indicates NONE */ - else if (d_arg == MPI_DISTRIBUTE_DFLT_DARG) { - if (dist == MPI_DISTRIBUTE_BLOCK) { - k = (dim_size + dim_ranks - 1) / dim_ranks; - } - else { - k = 1; - } - } - else { - k = d_arg; - } - - return k; -} - -static int local_types_in_dim(int dim_size, - int dim_rank, - int dim_ranks, - int k) -{ - int count, n_blocks, n_types, leftover; - - if (k == 0) { - /* indicates MPI_DISTRIBUTE_NONE */ - return dim_size; - } - - /* blocks are regions of (up to k) types; this count - * includes partials - */ - n_blocks = (dim_size + k - 1) / k; - - /* count gets us a total # of blocks that the particular - * rank gets, including possibly a partial block - */ - count = n_blocks / dim_ranks; - leftover = n_blocks - (count * dim_ranks); - if (dim_rank < leftover) count++; - - n_types = count * k; - - /* subtract off the types that are missing from the final - * partial block, if there is a partial and this rank is - * the one that has it. - */ - if ((dim_rank == leftover - 1) && (dim_size % k != 0)) { - n_types -= k - (dim_size - ((dim_size / k) * k)); - } - - return n_types; -} - -/* get_darray_position(rank, ranks, ndims, array_of_psizes, r[]) - * - * Calculates the position of this process in the darray - * given the rank of the process passed to the darray create - * and the total number of processes also passed to the darray - * create. - * - * Assumes that the array (r[]) has already been allocated. - */ -static void get_darray_position(int rank, - int ranks, - int ndims, - int array_of_psizes[], - int r[]) -{ - int i; - int t_rank = rank; - int t_size = ranks; - - for (i = 0; i < ndims; i++) { - t_size = t_size / array_of_psizes[i]; - r[i] = t_rank / t_size; - t_rank = t_rank % t_size; - } -} -#endif --- mpich-1.2.7.orig/romio/adio/common/gencheck.c +++ mpich-1.2.7/romio/adio/common/gencheck.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: gencheck.c,v 1.3 2002/10/24 17:01:14 gropp Exp $ * * Copyright (C) 2002 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/get_fp_posn.c +++ mpich-1.2.7/romio/adio/common/get_fp_posn.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_fp_posn.c,v 1.4 2002/10/24 17:01:14 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -18,7 +17,7 @@ int i, n_filetypes, flag, frd_size; int filetype_size, etype_size, filetype_is_contig; MPI_Aint filetype_extent; - ADIO_Offset disp, byte_offset, sum, size_in_file; + ADIO_Offset disp, byte_offset, sum=0, size_in_file; ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig); etype_size = fd->etype_size; --- mpich-1.2.7.orig/romio/adio/common/iscontig.c +++ mpich-1.2.7/romio/adio/common/iscontig.c @@ -24,7 +24,7 @@ if (*flag) { MPI_Aint true_extent, true_lb; - PMPI_Type_get_true_extent(datatype, &true_lb, &true_extent); + MPI_Type_get_true_extent(datatype, &true_lb, &true_extent); if (true_lb > 0) *flag = 0; --- mpich-1.2.7.orig/romio/adio/common/lock.c +++ mpich-1.2.7/romio/adio/common/lock.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: lock.c,v 1.13 2004/11/03 20:57:23 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -9,46 +8,83 @@ #include "adio.h" #ifdef ROMIO_NTFS +/* This assumes that lock will always remain in the common directory and + * that the ntfs directory will always be called ad_ntfs. */ +#include "..\ad_ntfs\ad_ntfs.h" int ADIOI_Set_lock(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence, ADIO_Offset len) { - int ret_val, error_code; - OVERLAPPED Overlapped; - DWORD dwFlags; - - dwFlags = type; + static char myname[] = "ADIOI_Set_lock"; + int ret_val, error_code = MPI_SUCCESS; + OVERLAPPED Overlapped; + DWORD dwFlags; - Overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + ADIOI_UNREFERENCED_ARG(whence); + + if (len == 0) return MPI_SUCCESS; + + dwFlags = type; + + Overlapped.hEvent = /*0;*/CreateEvent(NULL, TRUE, FALSE, NULL); #ifdef HAVE_INT64 - Overlapped.Offset = ( (DWORD) ( offset & (__int64) 0xFFFFFFFF ) ); - Overlapped.OffsetHigh = ( (DWORD) ( (offset >> 32) & (__int64) 0xFFFFFFFF ) ); + Overlapped.Offset = ( (DWORD) ( offset & (__int64) 0xFFFFFFFF ) ); + Overlapped.OffsetHigh = ( (DWORD) ( (offset >> 32) & (__int64) 0xFFFFFFFF ) ); - if (cmd == ADIOI_LOCK_CMD) - ret_val = LockFileEx(fd, dwFlags, 0, - ( (DWORD) ( len & (__int64) 0xFFFFFFFF ) ), - ( (DWORD) ( (len >> 32) & (__int64) 0xFFFFFFFF ) ), - &Overlapped); - else - ret_val = UnlockFileEx(fd, 0, - ( (DWORD) ( len & (__int64) 0xFFFFFFFF ) ), - ( (DWORD) ( (len >> 32) & (__int64) 0xFFFFFFFF ) ), - &Overlapped); + if (cmd == ADIOI_LOCK_CMD) + { + /*printf("locking %d\n", (int)fd);fflush(stdout);*/ + ret_val = LockFileEx(fd, dwFlags, 0, + ( (DWORD) ( len & (__int64) 0xFFFFFFFF ) ), + ( (DWORD) ( (len >> 32) & (__int64) 0xFFFFFFFF ) ), + &Overlapped); + } + else + { + /*printf("unlocking %d\n", (int)fd);fflush(stdout);*/ + ret_val = UnlockFileEx(fd, 0, + ( (DWORD) ( len & (__int64) 0xFFFFFFFF ) ), + ( (DWORD) ( (len >> 32) & (__int64) 0xFFFFFFFF ) ), + &Overlapped); + } #else - Overlapped.Offset = offset; - Overlapped.OffsetHigh = 0; + Overlapped.Offset = offset; + Overlapped.OffsetHigh = 0; - if (cmd == ADIOI_LOCK_CMD) - ret_val = LockFileEx(fd, dwFlags, 0, len, 0, &Overlapped); - else - ret_val = UnlockFileEx(fd, 0, len, 0, &Overlapped); + if (cmd == ADIOI_LOCK_CMD) + { + /*printf("locking %d\n", (int)fd);fflush(stdout);*/ + ret_val = LockFileEx(fd, dwFlags, 0, len, 0, &Overlapped); + } + else + { + /*printf("unlocking %d\n", (int)fd);fflush(stdout);*/ + ret_val = UnlockFileEx(fd, 0, len, 0, &Overlapped); + } #endif - if (!ret_val) { + if (!ret_val) + { + /* FPRINTF(stderr, "File locking failed in ADIOI_Set_lock.\n"); MPI_Abort(MPI_COMM_WORLD, 1); + */ + ret_val = GetLastError(); + if (ret_val == ERROR_IO_PENDING) + { + DWORD dummy; + ret_val = GetOverlappedResult(fd, &Overlapped, &dummy, TRUE); + if (ret_val) + { + CloseHandle(Overlapped.hEvent); + return MPI_SUCCESS; + } + ret_val = GetLastError(); + } + error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, + MPI_ERR_IO, "**io", "**io %s", ADIOI_NTFS_Strerror(ret_val)); } + CloseHandle(Overlapped.hEvent); - error_code = (ret_val) ? MPI_SUCCESS : MPI_ERR_UNKNOWN; return error_code; } #else @@ -58,6 +94,9 @@ int err, error_code; struct flock lock; + if (len == 0) return MPI_SUCCESS; + + /* Depending on the compiler flags and options, struct flock may not be defined with types that are the same size as ADIO_Offsets. */ @@ -103,6 +142,8 @@ int err, error_code; struct flock64 lock; + if (len == 0) return MPI_SUCCESS; + lock.l_type = type; lock.l_start = offset; lock.l_whence = whence; --- mpich-1.2.7.orig/romio/adio/common/malloc.c +++ mpich-1.2.7/romio/adio/common/malloc.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: malloc.c,v 1.11 2005/05/23 23:27:49 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -28,6 +27,13 @@ #include #endif +/* for the style checker */ +/* style: allow:malloc:1 sig:0 */ +/* style: allow:free:1 sig:0 */ +/* style: allow:calloc:1 sig:0 */ +/* style: allow:realloc:1 sig:0 */ + + #define FPRINTF fprintf void *ADIOI_Malloc_fn(size_t size, int lineno, char *fname); void *ADIOI_Calloc_fn(size_t nelem, size_t elsize, int lineno, char *fname); @@ -89,3 +95,4 @@ free(ptr); } + --- mpich-1.2.7.orig/romio/adio/common/req_malloc.c +++ mpich-1.2.7/romio/adio/common/req_malloc.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: req_malloc.c,v 1.3 2002/10/24 17:01:15 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/common/shfp_fname.c +++ mpich-1.2.7/romio/adio/common/shfp_fname.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: shfp_fname.c,v 1.5 2003/04/24 21:10:20 David Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -33,7 +32,7 @@ tm *= 1000000.0; i = (int) tm; - strcpy(fd->shared_fp_fname, fd->filename); + ADIOI_Strncpy(fd->shared_fp_fname, fd->filename, 256); #ifdef ROMIO_NTFS slash = strrchr(fd->filename, '\\'); @@ -41,8 +40,8 @@ slash = strrchr(fd->filename, '/'); #endif if (!slash) { - strcpy(fd->shared_fp_fname, "."); - strcpy(fd->shared_fp_fname + 1, fd->filename); + ADIOI_Strncpy(fd->shared_fp_fname, ".", 2); + ADIOI_Strncpy(fd->shared_fp_fname + 1, fd->filename, 255); } else { ptr = slash; @@ -51,12 +50,13 @@ #else slash = strrchr(fd->shared_fp_fname, '/'); #endif - strcpy(slash + 1, "."); - strcpy(slash + 2, ptr + 1); + ADIOI_Strncpy(slash + 1, ".", 2); + len = 256 - (slash+2 - fd->shared_fp_fname); + ADIOI_Strncpy(slash + 2, ptr + 1, len); } - sprintf(tmp, ".shfp.%d", i); - strcat(fd->shared_fp_fname, tmp); + ADIOI_Snprintf(tmp, 128, ".shfp.%d", i); + ADIOI_Strnapp(fd->shared_fp_fname, tmp, 256); len = (int)strlen(fd->shared_fp_fname); MPI_Bcast(&len, 1, MPI_INT, 0, fd->comm); --- mpich-1.2.7.orig/romio/adio/common/status_setb.c +++ mpich-1.2.7/romio/adio/common/status_setb.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: status_setb.c,v 1.14 2005/05/23 23:27:49 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -17,6 +16,7 @@ int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype, int nbytes) { + ADIOI_UNREFERENCED_ARG(datatype); /* it's ok that ROMIO stores number-of-bytes in status, not * count-of-copies, as long as MPI_GET_COUNT knows what to do */ if (status != MPI_STATUS_IGNORE) --- mpich-1.2.7.orig/romio/adio/common/strfns.c +++ mpich-1.2.7/romio/adio/common/strfns.c @@ -0,0 +1,315 @@ +/* -*- Mode: C; c-basic-offset:4 ; -*- */ +/* + * + * Copyright (C) 1997 University of Chicago. + * See COPYRIGHT notice in top-level directory. + */ + +#include "adio.h" + +/* style: allow:sprintf:3 sig:0 */ + +/* + * Below are the "safe" versions of the various string and printf + * operations. They are directly taken from MPICH2, with MPIU replaced by ADIOI. + */ + +/* + * ADIOI_Strncpy - Copy at most n character. Stop once a null is reached. + * + * This is different from strncpy, which null pads so that exactly + * n characters are copied. The strncpy behavior is correct for many + * applications because it guarantees that the string has no uninitialized + * data. + * + * If n characters are copied without reaching a null, return an error. + * Otherwise, return 0. + * + */ +/*@ ADIOI_Strncpy - Copy a string with a maximum length + + Input Parameters: ++ instr - String to copy +- maxlen - Maximum total length of 'outstr' + + Output Parameter: +. outstr - String to copy into + + Notes: + This routine is the routine that you wish 'strncpy' was. In copying + 'instr' to 'outstr', it stops when either the end of 'outstr' (the + null character) is seen or the maximum length 'maxlen' is reached. + Unlike 'strncpy', it does not add enough nulls to 'outstr' after + copying 'instr' in order to move precisely 'maxlen' characters. + Thus, this routine may be used anywhere 'strcpy' is used, without any + performance cost related to large values of 'maxlen'. + + Module: + Utility + @*/ +int ADIOI_Strncpy( char *dest, const char *src, size_t n ) +{ + char * restrict d_ptr = dest; + const char * restrict s_ptr = src; + register int i; + + i = (int)n; + while (*s_ptr && i-- > 0) { + *d_ptr++ = *s_ptr++; + } + + if (i > 0) { + *d_ptr = 0; + return 0; + } + else + /* We may want to force an error message here, at least in the + debugging version */ + return 1; +} + +/* Append src to dest, but only allow dest to contain n characters (including + any null, which is always added to the end of the line */ +/*@ ADIOI_Strnapp - Append to a string with a maximum length + + Input Parameters: ++ instr - String to copy +- maxlen - Maximum total length of 'outstr' + + Output Parameter: +. outstr - String to copy into + + Notes: + This routine is similar to 'strncat' except that the 'maxlen' argument + is the maximum total length of 'outstr', rather than the maximum + number of characters to move from 'instr'. Thus, this routine is + easier to use when the declared size of 'instr' is known. + + Module: + Utility + @*/ +int ADIOI_Strnapp( char *dest, const char *src, size_t n ) +{ + char * restrict d_ptr = dest; + const char * restrict s_ptr = src; + register int i; + + /* Get to the end of dest */ + i = (int)n; + while (i-- > 0 && *d_ptr) d_ptr++; + if (i <= 0) return 1; + + /* Append. d_ptr points at first null and i is remaining space. */ + while (*s_ptr && i-- > 0) { + *d_ptr++ = *s_ptr++; + } + + /* We allow i >= (not just >) here because the first while decrements + i by one more than there are characters, leaving room for the null */ + if (i >= 0) { + *d_ptr = 0; + return 0; + } + else { + /* Force the null at the end */ + *--d_ptr = 0; + + /* We may want to force an error message here, at least in the + debugging version */ + return 1; + } +} + +/*@ + ADIOI_Strdup - Duplicate a string + + Synopsis: +.vb + char *ADIOI_Strdup( const char *str ) +.ve + + Input Parameter: +. str - null-terminated string to duplicate + + Return value: + A pointer to a copy of the string, including the terminating null. A + null pointer is returned on error, such as out-of-memory. + + Notes: + Like 'ADIOI_Malloc' and 'ADIOI_Free', this will often be implemented as a + macro but may use 'ADIOI_trstrdup' to provide a tracing version. + + Module: + Utility + @*/ +char *ADIOI_Strdup( const char *str ) +{ + char *p = ADIOI_Malloc( strlen(str) + 1 ); + char *in_p = (char *)str; + char *save_p; + + save_p = p; + if (p) { + while (*in_p) { + *p++ = *in_p++; + } + *p = '\0'; + } + return save_p; +} + + +/* + * We need an snprintf replacement for systems without one + */ +#ifndef HAVE_SNPRINTF +/* FIXME: Really need a check for varargs.h vs stdarg.h */ +#include +/* + * This is an approximate form which is suitable for most uses within + * the MPICH code + */ +int ADIOI_Snprintf( char *str, size_t size, const char *format, ... ) +{ + int n; + const char *p; + char *out_str = str; + va_list list; + + va_start(list, format); + + p = format; + while (*p && size > 0) { + char *nf; + + nf = strchr(p, '%'); + if (!nf) { + /* No more format characters */ + while (size-- > 0 && *p) { + *out_str++ = *p++; + } + } + else { + int nc; + int width = -1; + + /* Copy until nf */ + while (p < nf && size-- > 0) { + *out_str++ = *p++; + } + /* p now points at nf */ + /* Handle the format character */ + nc = nf[1]; + if (isdigit(nc)) { + /* Get the field width */ + /* FIXME : Assumes ASCII */ + width = nc - '0'; + p = nf + 2; + while (*p && isdigit(*p)) { + width = 10 * width + (*p++ - '0'); + } + /* When there is no longer a digit, get the format + character */ + nc = *p++; + } + else { + /* Skip over the format string */ + p += 2; + } + + switch (nc) { + case '%': + *out_str++ = '%'; + size--; + break; + + case 'd': + { + int val; + char tmp[20]; + char *t = tmp; + /* Get the argument, of integer type */ + val = va_arg( list, int ); + sprintf( tmp, "%d", val ); + if (width > 0) { + int tmplen = strlen(tmp); + /* If a width was specified, pad with spaces on the + left (on the right if %-3d given; not implemented yet */ + while (size-- > 0 && width-- > tmplen) + *out_str++ = ' '; + } + while (size-- > 0 && *t) { + *out_str++ = *t++; + } + } + break; + + case 'x': + { + int val; + char tmp[20]; + char *t = tmp; + /* Get the argument, of integer type */ + val = va_arg( list, int ); + sprintf( tmp, "%x", val ); + if (width > 0) { + int tmplen = strlen(tmp); + /* If a width was specified, pad with spaces on the + left (on the right if %-3d given; not implemented yet */ + while (size-- > 0 && width-- > tmplen) + *out_str++ = ' '; + } + while (size-- > 0 && *t) { + *out_str++ = *t++; + } + } + break; + + case 'p': + { + int val; + char tmp[20]; + char *t = tmp; + /* Get the argument, of integer type */ + val = va_arg( list, int ); + sprintf( tmp, "%p", val ); + if (width > 0) { + int tmplen = strlen(tmp); + /* If a width was specified, pad with spaces on the + left (on the right if %-3d given; not implemented yet */ + while (size-- > 0 && width-- > tmplen) + *out_str++ = ' '; + } + while (size-- > 0 && *t) { + *out_str++ = *t++; + } + } + break; + + case 's': + { + char *s_arg; + /* Get the argument, of pointer to char type */ + s_arg = va_arg( list, char * ); + while (size-- > 0 && s_arg && *s_arg) { + *out_str++ = *s_arg++; + } + } + break; + + default: + /* Error, unknown case */ + return -1; + break; + } + } + } + + va_end(list); + + if (size-- > 0) *out_str++ = '\0'; + + n = (int)(out_str - str); + return n; +} +#endif --- mpich-1.2.7.orig/romio/adio/include/romioconf.h.in +++ mpich-1.2.7/romio/adio/include/romioconf.h.in @@ -21,6 +21,9 @@ /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE +/* Define if GNU __attribute__ is supported */ +#undef HAVE_GCC_ATTRIBUTE + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -84,6 +87,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H +/* Define to 1 if you have the `snprintf' function. */ +#undef HAVE_SNPRINTF + /* Define to 1 if you have the `stat' function. */ #undef HAVE_STAT @@ -186,6 +192,9 @@ /* Define if readlink needs a declaration */ #undef NEEDS_READLINK_DECL +/* Define if snprintf needs a declaration */ +#undef NEEDS_SNPRINTF_DECL + /* Define if strdup needs a declaration */ #undef NEEDS_STRDUP_DECL @@ -305,3 +314,6 @@ #ifndef __cplusplus #undef inline #endif + +/* if C does not support restrict */ +#undef restrict --- mpich-1.2.7.orig/romio/adio/include/adio.h +++ mpich-1.2.7/romio/adio/include/adio.h @@ -55,6 +55,13 @@ # define FORTRAN_API #endif +/* Use this macro for each parameter to a function that is not referenced in the body of the function */ +#ifdef HAVE_WINDOWS_H +#define ADIOI_UNREFERENCED_ARG(a) a +#else +#define ADIOI_UNREFERENCED_ARG(a) +#endif + /* Include romioconf.h if we haven't already (some include files may need to include romioconf before some system includes) */ #ifndef ROMIOCONF_H_INCLUDED @@ -165,6 +172,8 @@ #endif +/* style: allow:strdup:1 sig:0 */ + #if defined(HAVE_STRDUP) && defined(NEEDS_STRDUP_DECL) && !defined(strdup) char *strdup(const char *s); # endif @@ -389,6 +398,20 @@ void ADIO_Set_view(ADIO_File fd, ADIO_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, MPI_Info info, int *error_code); +/* functions to help deal with the array datatypes */ +int ADIO_Type_create_subarray(int ndims, + int *array_of_sizes, + int *array_of_subsizes, + int *array_of_starts, + int order, + MPI_Datatype oldtype, + MPI_Datatype *newtype); +int ADIO_Type_create_darray(int size, int rank, int ndims, + int *array_of_gsizes, int *array_of_distribs, + int *array_of_dargs, int *array_of_psizes, + int order, MPI_Datatype oldtype, + MPI_Datatype *newtype); + /* MPI_File management functions (in mpio_file.c) */ MPI_File MPIO_File_create(int size); ADIO_File MPIO_File_resolve(MPI_File mpi_fh); --- mpich-1.2.7.orig/romio/adio/include/adio_cb_config_list.h +++ mpich-1.2.7/romio/adio/include/adio_cb_config_list.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: adio_cb_config_list.h,v 1.2 2002/10/24 17:01:15 gropp Exp $ * * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/include/adio_extern.h +++ mpich-1.2.7/romio/adio/include/adio_extern.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: adio_extern.h,v 1.8 2004/10/04 15:51:27 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/include/adioi.h +++ mpich-1.2.7/romio/adio/include/adioi.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: adioi.h,v 1.27 2005/05/24 17:41:15 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -542,7 +541,7 @@ # define ADIOI_WRITE_LOCK(fd, offset, whence, len) \ ADIOI_Set_lock((fd)->fd_sys, ADIOI_LOCK_CMD, LOCKFILE_EXCLUSIVE_LOCK, offset, whence, len) # define ADIOI_READ_LOCK(fd, offset, whence, len) \ - ADIOI_Set_lock((fd)->fd_sys, ADIOLOCK, 0, offset, whence, len) + ADIOI_Set_lock((fd)->fd_sys, ADIOI_LOCK_CMD, 0, offset, whence, len) # define ADIOI_UNLOCK(fd, offset, whence, len) \ ADIOI_Set_lock((fd)->fd_sys, ADIOI_UNLOCK_CMD, LOCKFILE_FAIL_IMMEDIATELY, offset, whence, len) @@ -565,6 +564,33 @@ #define ADIOI_Realloc(a,b) ADIOI_Realloc_fn(a,b,__LINE__,__FILE__) #define ADIOI_Free(a) ADIOI_Free_fn(a,__LINE__,__FILE__) +int ADIOI_Strncpy( char *outstr, const char *instr, size_t maxlen ); +int ADIOI_Strnapp( char *, const char *, size_t ); +char *ADIOI_Strdup( const char * ); + +/* Provide a fallback snprintf for systems that do not have one */ +/* Define attribute as empty if it has no definition */ +#ifndef ATTRIBUTE +#ifdef HAVE_GCC_ATTRIBUTE +#define ATTRIBUTE(a) __attribute__(a) +#else +#define ATTRIBUTE(a) +#endif +#endif + +/* style: allow:snprintf:1 sig:0 */ + +#ifdef HAVE_SNPRINTF +#define ADIOI_Snprintf snprintf +/* Sometimes systems don't provide prototypes for snprintf */ +#ifdef NEEDS_SNPRINTF_DECL +extern int snprintf( char *, size_t, const char *, ... ) ATTRIBUTE((format(printf,3,4))); +#endif +#else +int ADIOI_Snprintf( char *str, size_t size, const char *format, ... ) + ATTRIBUTE((format(printf,3,4))); +#endif /* HAVE_SNPRINTF */ + #define FPRINTF fprintf #ifndef HAVE_STRERROR --- mpich-1.2.7.orig/romio/adio/include/adioi_fs_proto.h +++ mpich-1.2.7/romio/adio/include/adioi_fs_proto.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: adioi_fs_proto.h,v 1.14 2005/05/23 23:27:50 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/adio/include/mpipr.h +++ mpich-1.2.7/romio/adio/include/mpipr.h @@ -60,6 +60,8 @@ #define MPI_Cart_sub PMPI_Cart_sub #undef MPI_Cartdim_get #define MPI_Cartdim_get PMPI_Cartdim_get +#undef MPI_Comm_call_errhandler +#define MPI_Comm_call_errhandler PMPI_Comm_call_errhandler #undef MPI_Comm_compare #define MPI_Comm_compare PMPI_Comm_compare #undef MPI_Comm_create @@ -276,6 +278,8 @@ #define MPI_Type_get_contents PMPI_Type_get_contents #undef MPI_Type_get_envelope #define MPI_Type_get_envelope PMPI_Type_get_envelope +#undef MPI_Type_get_true_extent +#define MPI_Type_get_true_extent PMPI_Type_get_true_extent #undef MPI_Type_hindexed #define MPI_Type_hindexed PMPI_Type_hindexed #undef MPI_Type_hvector --- mpich-1.2.7.orig/romio/include/mpio.h.in +++ mpich-1.2.7/romio/include/mpio.h.in @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: mpio.h.in,v 1.28 2004/10/07 17:59:38 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/Makefile.in +++ mpich-1.2.7/romio/mpi-io/Makefile.in @@ -142,7 +142,7 @@ $(SHLIBNAME).la: $(MPIO_LOOBJECTS) $(MPIO_EXTRA_LOOBJECTS) $(AR) $(SHLIBNAME).la $(MPIO_LOOBJECTS) $(MPIO_EXTRA_LOOBJECTS) - $(RANLIB) $(SHLIBNAME) + # -------------------------------------------------------------------------- # We use P$(SHLBNAME) simply to distinguish the regular lib build from the # profiling library build @@ -152,7 +152,6 @@ MPIO_EXTRA_LOPOBJECTS = ${MPIO_EXTRA_TMP_OBJECTS:.p=.sp} P$(SHLIBNAME).la: $(MPIO_TMP_LOPOBJECTS) $(MPIO_EXTRA_TMP_LOPOBJECTS) $(AR) $(SHLIBNAME).la $(MPIO_LOPOBJECTS) $(MPIO_EXTRA_LOPOBJECTS) - $(RANLIB) $(SHLIBNAME) # -------------------------------------------------------------------------- clean: @rm -f *.o *.lo --- mpich-1.2.7.orig/romio/mpi-io/close.c +++ mpich-1.2.7/romio/mpi-io/close.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: close.c,v 1.15 2005/05/23 23:28:10 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/delete.c +++ mpich-1.2.7/romio/mpi-io/delete.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: delete.c,v 1.21 2005/02/18 00:39:04 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -48,6 +47,8 @@ MPI_FILE_NULL, MPI_DATATYPE_NULL, -1); #endif /* MPI_hpux */ + MPIU_UNREFERENCED_ARG(info); + MPID_CS_ENTER(); MPIR_Nest_incr(); --- mpich-1.2.7.orig/romio/mpi-io/file_c2f.c +++ mpich-1.2.7/romio/mpi-io/file_c2f.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: file_c2f.c,v 1.8 2004/10/04 15:51:28 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/file_f2c.c +++ mpich-1.2.7/romio/mpi-io/file_f2c.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: file_f2c.c,v 1.10 2004/10/04 15:51:28 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fsync.c +++ mpich-1.2.7/romio/mpi-io/fsync.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: fsync.c,v 1.15 2005/02/18 00:39:04 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/get_amode.c +++ mpich-1.2.7/romio/mpi-io/get_amode.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_amode.c,v 1.14 2005/02/18 15:39:46 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/get_atom.c +++ mpich-1.2.7/romio/mpi-io/get_atom.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_atom.c,v 1.13 2005/02/18 17:10:23 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/get_bytoff.c +++ mpich-1.2.7/romio/mpi-io/get_bytoff.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_bytoff.c,v 1.18 2005/05/23 23:28:10 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/get_errh.c +++ mpich-1.2.7/romio/mpi-io/get_errh.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_errh.c,v 1.13 2005/02/18 00:39:05 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/get_extent.c +++ mpich-1.2.7/romio/mpi-io/get_extent.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_extent.c,v 1.18 2005/02/18 00:39:05 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/get_group.c +++ mpich-1.2.7/romio/mpi-io/get_group.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_group.c,v 1.13 2005/02/18 00:39:05 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/get_info.c +++ mpich-1.2.7/romio/mpi-io/get_info.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_info.c,v 1.12 2005/02/18 00:39:05 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/get_posn.c +++ mpich-1.2.7/romio/mpi-io/get_posn.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_posn.c,v 1.19 2005/05/23 23:28:10 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/get_posn_sh.c +++ mpich-1.2.7/romio/mpi-io/get_posn_sh.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_posn_sh.c,v 1.20 2005/02/18 00:39:05 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/get_size.c +++ mpich-1.2.7/romio/mpi-io/get_size.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_size.c,v 1.14 2005/02/18 00:39:05 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/get_view.c +++ mpich-1.2.7/romio/mpi-io/get_view.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_view.c,v 1.18 2005/02/18 00:39:06 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -73,7 +72,7 @@ /* --END ERROR HANDLING-- */ *disp = fh->disp; - strcpy(datarep, "native"); + ADIOI_Strncpy(datarep, "native", MPI_MAX_DATAREP_STRING); MPI_Type_get_envelope(fh->etype, &i, &j, &k, &combiner); if (combiner == MPI_COMBINER_NAMED) *etype = fh->etype; --- mpich-1.2.7.orig/romio/mpi-io/ioreq_c2f.c +++ mpich-1.2.7/romio/mpi-io/ioreq_c2f.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ioreq_c2f.c,v 1.11 2005/02/18 00:39:06 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/ioreq_f2c.c +++ mpich-1.2.7/romio/mpi-io/ioreq_f2c.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: ioreq_f2c.c,v 1.13 2005/02/18 00:39:06 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/iotest.c +++ mpich-1.2.7/romio/mpi-io/iotest.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iotest.c,v 1.19 2005/02/18 00:39:06 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/iotestall.c +++ mpich-1.2.7/romio/mpi-io/iotestall.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iotestall.c,v 1.5 2005/02/18 00:39:06 robl Exp $ * * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/iotestany.c +++ mpich-1.2.7/romio/mpi-io/iotestany.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iotestany.c,v 1.5 2005/02/18 00:39:06 robl Exp $ * * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/iotestsome.c +++ mpich-1.2.7/romio/mpi-io/iotestsome.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iotestsome.c,v 1.3 2005/02/18 00:39:06 robl Exp $ * * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/iowait.c +++ mpich-1.2.7/romio/mpi-io/iowait.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iowait.c,v 1.19 2005/02/18 00:39:06 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/iowaitall.c +++ mpich-1.2.7/romio/mpi-io/iowaitall.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iowaitall.c,v 1.4 2005/02/18 00:39:06 robl Exp $ * * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/iowaitany.c +++ mpich-1.2.7/romio/mpi-io/iowaitany.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iowaitany.c,v 1.6 2005/02/27 15:13:39 gropp Exp $ * * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/iowaitsome.c +++ mpich-1.2.7/romio/mpi-io/iowaitsome.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iowaitsome.c,v 1.4 2005/02/18 00:39:07 robl Exp $ * * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/iread.c +++ mpich-1.2.7/romio/mpi-io/iread.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iread.c,v 1.26 2005/02/18 00:39:07 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -40,34 +39,91 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iread_args +{ + MPI_File file; + void *buf; + int count; + MPI_Datatype datatype; + MPIO_Request request; + MPI_Status *status; +} iread_args; + +static DWORD WINAPI iread_thread(LPVOID lpParameter) +{ + int error_code; + iread_args *args = (iread_args *)lpParameter; + + error_code = MPI_File_read(args->file, args->buf, args->count, args->datatype, args->status); + /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ + args->status->MPI_ERROR = error_code; + + MPI_Grequest_complete(args->request); + ADIOI_Free(args); + return 0; +} +#endif + int MPI_File_iread(MPI_File mpi_fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { - int error_code; - MPI_Status *status; + int error_code; + MPI_Status *status; +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) + iread_args *args; + HANDLE hThread; +#endif + + MPID_CS_ENTER(); + MPIR_Nest_incr(); + + status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); - MPID_CS_ENTER(); - MPIR_Nest_incr(); +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) + /* kick off the request */ + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPIU_Greq_cancel_fn, status, request); + + args = (iread_args*) ADIOI_Malloc(sizeof(iread_args)); + args->file = mpi_fh; + args->buf = buf; + args->count = count; + args->datatype = datatype; + args->status = status; + args->request = *request; + hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)iread_thread, args, 0, NULL); + if (hThread == NULL) + { + error_code = GetLastError(); + error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + "MPI_File_iread", __LINE__, MPI_ERR_OTHER, + "**fail", "**fail %d", error_code); + error_code = MPIO_Err_return_file(args->file, error_code); + return error_code; + } + CloseHandle(hThread); - status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); +#else - /* for now, no threads or anything fancy. - * just call the blocking version */ - error_code = MPI_File_read(mpi_fh, buf, count, datatype, status); - /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ - status->MPI_ERROR = error_code; - - /* kick off the request */ - MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, - MPIU_Greq_cancel_fn, status, request); - /* but we did all the work already */ - MPI_Grequest_complete(*request); - - /* passed the buck to the blocking version...*/ - - MPIR_Nest_decr(); - MPID_CS_EXIT(); - return MPI_SUCCESS; + /* for now, no threads or anything fancy. + * just call the blocking version */ + error_code = MPI_File_read(mpi_fh, buf, count, datatype, status); + /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ + status->MPI_ERROR = error_code; + + /* kick off the request */ + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPIU_Greq_cancel_fn, status, request); + /* but we did all the work already */ + MPI_Grequest_complete(*request); + + /* passed the buck to the blocking version...*/ +#endif + + MPIR_Nest_decr(); + MPID_CS_EXIT(); + return MPI_SUCCESS; } #else int MPI_File_iread(MPI_File mpi_fh, void *buf, int count, --- mpich-1.2.7.orig/romio/mpi-io/iread_at.c +++ mpich-1.2.7/romio/mpi-io/iread_at.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iread_at.c,v 1.23 2005/02/18 00:39:07 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -41,36 +40,96 @@ @*/ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" + +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iread_at_args +{ + MPI_File file; + MPI_Offset offset; + void *buf; + int count; + MPI_Datatype datatype; + MPIO_Request request; + MPI_Status *status; +} iread_at_args; + +static DWORD WINAPI iread_at_thread(LPVOID lpParameter) +{ + int error_code; + iread_at_args *args = (iread_at_args *)lpParameter; + + error_code = MPI_File_read_at(args->file, args->offset, args->buf, args->count, args->datatype, args->status); + /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ + args->status->MPI_ERROR = error_code; + + MPI_Grequest_complete(args->request); + ADIOI_Free(args); + return 0; +} +#endif + int MPI_File_iread_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { - int error_code; - MPI_Status *status; + int error_code; + MPI_Status *status; +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) + iread_at_args *args; + HANDLE hThread; +#endif + + MPID_CS_ENTER(); + MPIR_Nest_incr(); - MPID_CS_ENTER(); - MPIR_Nest_incr(); + status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); - status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) + /* kick off the request */ + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPIU_Greq_cancel_fn, status, request); + + args = (iread_at_args*) ADIOI_Malloc(sizeof(iread_at_args)); + args->file = mpi_fh; + args->offset = offset; + args->buf = buf; + args->count = count; + args->datatype = datatype; + args->status = status; + args->request = *request; + hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)iread_at_thread, args, 0, NULL); + if (hThread == NULL) + { + error_code = GetLastError(); + error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + "MPI_File_iread_at", __LINE__, MPI_ERR_OTHER, + "**fail", "**fail %d", error_code); + error_code = MPIO_Err_return_file(args->file, error_code); + return error_code; + } + CloseHandle(hThread); - /* for now, no threads or anything fancy. - * just call the blocking version */ - error_code = MPI_File_read_at(mpi_fh, offset, buf, count, datatype, - status); - /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ - status->MPI_ERROR = error_code; - - /* kick off the request */ - MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, - MPIU_Greq_cancel_fn, status, request); - /* but we did all the work already */ - MPI_Grequest_complete(*request); +#else + + /* for now, no threads or anything fancy. + * just call the blocking version */ + error_code = MPI_File_read_at(mpi_fh, offset, buf, count, datatype, + status); + /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ + status->MPI_ERROR = error_code; + + /* kick off the request */ + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPIU_Greq_cancel_fn, status, request); + /* but we did all the work already */ + MPI_Grequest_complete(*request); + /* passed the buck to the blocking version...*/ +#endif - MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIR_Nest_decr(); + MPID_CS_EXIT(); - /* passed the buck to the blocking version...*/ - return MPI_SUCCESS; + return MPI_SUCCESS; } #else int MPI_File_iread_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, --- mpich-1.2.7.orig/romio/mpi-io/iread_sh.c +++ mpich-1.2.7/romio/mpi-io/iread_sh.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iread_sh.c,v 1.23 2005/02/18 00:39:07 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -41,39 +40,95 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iread_shared_args +{ + MPI_File file; + void *buf; + int count; + MPI_Datatype datatype; + MPIO_Request request; + MPI_Status *status; +} iread_shared_args; + +static DWORD WINAPI iread_shared_thread(LPVOID lpParameter) +{ + int error_code; + iread_shared_args *args = (iread_shared_args *)lpParameter; + + error_code = MPI_File_read_shared(args->file, args->buf, args->count, args->datatype, args->status); + /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ + args->status->MPI_ERROR = error_code; + + MPI_Grequest_complete(args->request); + ADIOI_Free(args); + return 0; +} +#endif + int MPI_File_iread_shared(MPI_File mpi_fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { - int error_code; - ADIO_File fh; - MPI_Status *status; - - MPID_CS_ENTER(); - MPIR_Nest_incr(); + int error_code; + ADIO_File fh; + MPI_Status *status; +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) + iread_shared_args *args; + HANDLE hThread; +#endif - fh = MPIO_File_resolve(mpi_fh); + MPID_CS_ENTER(); + MPIR_Nest_incr(); - status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); + fh = MPIO_File_resolve(mpi_fh); - /* for now, no threads or anything fancy. - * just call the blocking version */ - error_code = MPI_File_read_shared(mpi_fh, buf, count, datatype, - status); - /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ - status->MPI_ERROR = error_code; + status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); - /* kick off the request */ - MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, - MPIU_Greq_cancel_fn, status, request); +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) + /* kick off the request */ + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPIU_Greq_cancel_fn, status, request); + + args = (iread_shared_args*) ADIOI_Malloc(sizeof(iread_shared_args)); + args->file = mpi_fh; + args->buf = buf; + args->count = count; + args->datatype = datatype; + args->status = status; + args->request = *request; + hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)iread_shared_thread, args, 0, NULL); + if (hThread == NULL) + { + error_code = GetLastError(); + error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + "MPI_File_iread_shared", __LINE__, MPI_ERR_OTHER, + "**fail", "**fail %d", error_code); + error_code = MPIO_Err_return_file(fh, error_code); + return error_code; + } + CloseHandle(hThread); - /* but we did all the work already */ - MPI_Grequest_complete(*request); +#else - MPID_CS_EXIT(); + /* for now, no threads or anything fancy. + * just call the blocking version */ + error_code = MPI_File_read_shared(mpi_fh, buf, count, datatype, + status); + /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ + status->MPI_ERROR = error_code; + + /* kick off the request */ + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPIU_Greq_cancel_fn, status, request); + + /* but we did all the work already */ + MPI_Grequest_complete(*request); + /* passed the buck to the blocking version...*/ +#endif - /* passed the buck to the blocking version...*/ - MPIR_Nest_decr(); - return MPI_SUCCESS; + MPIR_Nest_decr(); + MPID_CS_EXIT(); + return MPI_SUCCESS; } #else int MPI_File_iread_shared(MPI_File mpi_fh, void *buf, int count, --- mpich-1.2.7.orig/romio/mpi-io/iwrite.c +++ mpich-1.2.7/romio/mpi-io/iwrite.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iwrite.c,v 1.23 2005/02/18 00:39:07 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -41,39 +40,98 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iwrite_args +{ + MPI_File file; + void *buf; + int count; + MPI_Datatype datatype; + MPIO_Request request; + MPI_Status *status; +} iwrite_args; + +static DWORD WINAPI iwrite_thread(LPVOID lpParameter) +{ + int error_code; + iwrite_args *args = (iwrite_args *)lpParameter; + + error_code = MPI_File_write(args->file, args->buf, args->count, args->datatype, args->status); + /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ + args->status->MPI_ERROR = error_code; + + MPI_Grequest_complete(args->request); + ADIOI_Free(args); + return 0; +} +#endif + int MPI_File_iwrite(MPI_File mpi_fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { - int error_code; - MPI_Status *status; + int error_code; + MPI_Status *status; +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) + iwrite_args *args; + HANDLE hThread; +#endif - MPID_CS_ENTER(); - MPIR_Nest_incr(); + MPID_CS_ENTER(); + MPIR_Nest_incr(); + + status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); + +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) + /* kick off the request */ + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPIU_Greq_cancel_fn, status, request); + + args = (iwrite_args*) ADIOI_Malloc(sizeof(iwrite_args)); + args->file = mpi_fh; + args->buf = buf; + args->count = count; + args->datatype = datatype; + args->status = status; + args->request = *request; + hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)iwrite_thread, args, 0, NULL); + if (hThread == NULL) + { + error_code = GetLastError(); + error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + "MPI_File_iwrite", __LINE__, MPI_ERR_OTHER, + "**fail", "**fail %d", error_code); + error_code = MPIO_Err_return_file(args->file, error_code); + return error_code; + } + CloseHandle(hThread); - status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); +#else - /* for now, no threads or anything fancy. - * just call the blocking version */ - error_code = MPI_File_write(mpi_fh, buf, count, datatype, status); - /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ - status->MPI_ERROR = error_code; + /* for now, no threads or anything fancy. + * just call the blocking version */ + error_code = MPI_File_write(mpi_fh, buf, count, datatype, status); + /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ + status->MPI_ERROR = error_code; + + /* kick off the request */ + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPIU_Greq_cancel_fn, status, request); - /* kick off the request */ - MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, - MPIU_Greq_cancel_fn, status, request); + /* but we did all the work already */ + MPI_Grequest_complete(*request); +#endif - /* but we did all the work already */ - MPI_Grequest_complete(*request); + /* FIXME: Shouldn't status be freed before leaving this function */ - MPID_CS_EXIT(); - MPIR_Nest_decr(); + MPID_CS_EXIT(); + MPIR_Nest_decr(); - /* passed the buck to the blocking version...*/ - return MPI_SUCCESS; + /* passed the buck to the blocking version...*/ + return MPI_SUCCESS; } #else int MPI_File_iwrite(MPI_File mpi_fh, void *buf, int count, - MPI_Datatype datatype, MPIO_Request *request) + MPI_Datatype datatype, MPIO_Request *request) { int error_code; static char myname[] = "MPI_FILE_IWRITE"; --- mpich-1.2.7.orig/romio/mpi-io/iwrite_at.c +++ mpich-1.2.7/romio/mpi-io/iwrite_at.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iwrite_at.c,v 1.21 2005/02/18 00:39:07 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -42,37 +41,96 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iwrite_at_args +{ + MPI_File file; + MPI_Offset offset; + void *buf; + int count; + MPI_Datatype datatype; + MPIO_Request request; + MPI_Status *status; +} iwrite_at_args; + +static DWORD WINAPI iwrite_at_thread(LPVOID lpParameter) +{ + int error_code; + iwrite_at_args *args = (iwrite_at_args *)lpParameter; + + error_code = MPI_File_write_at(args->file, args->offset, args->buf, args->count, args->datatype, args->status); + /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ + args->status->MPI_ERROR = error_code; + + MPI_Grequest_complete(args->request); + ADIOI_Free(args); + return 0; +} +#endif + int MPI_File_iwrite_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { - int error_code; - MPI_Status *status; + int error_code; + MPI_Status *status; +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) + iwrite_at_args *args; + HANDLE hThread; +#endif - MPID_CS_ENTER(); - MPIR_Nest_incr(); + MPID_CS_ENTER(); + MPIR_Nest_incr(); - status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); + status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); - /* for now, no threads or anything fancy. - * just call the blocking version */ - error_code = MPI_File_write_at(mpi_fh, offset, buf, count, datatype, - status); - /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ - status->MPI_ERROR = error_code; +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) + /* kick off the request */ + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPIU_Greq_cancel_fn, status, request); + + args = (iwrite_at_args*) ADIOI_Malloc(sizeof(iwrite_at_args)); + args->file = mpi_fh; + args->offset = offset; + args->buf = buf; + args->count = count; + args->datatype = datatype; + args->status = status; + args->request = *request; + hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)iwrite_at_thread, args, 0, NULL); + if (hThread == NULL) + { + error_code = GetLastError(); + error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + "MPI_File_iwrite_at", __LINE__, MPI_ERR_OTHER, + "**fail", "**fail %d", error_code); + error_code = MPIO_Err_return_file(args->file, error_code); + return error_code; + } + CloseHandle(hThread); - /* kick off the request */ - MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, - MPIU_Greq_cancel_fn, status, request); +#else + + /* for now, no threads or anything fancy. + * just call the blocking version */ + error_code = MPI_File_write_at(mpi_fh, offset, buf, count, datatype, + status); + /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ + status->MPI_ERROR = error_code; + + /* kick off the request */ + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPIU_Greq_cancel_fn, status, request); - /* but we did all the work already */ - MPI_Grequest_complete(*request); + /* but we did all the work already */ + MPI_Grequest_complete(*request); +#endif - MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIR_Nest_decr(); + MPID_CS_EXIT(); - /* passed the buck to the blocking version...*/ - return MPI_SUCCESS; + /* passed the buck to the blocking version...*/ + return MPI_SUCCESS; } #else int MPI_File_iwrite_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, --- mpich-1.2.7.orig/romio/mpi-io/iwrite_sh.c +++ mpich-1.2.7/romio/mpi-io/iwrite_sh.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: iwrite_sh.c,v 1.20 2005/02/18 00:39:07 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -41,36 +40,93 @@ #ifdef HAVE_MPI_GREQUEST #include "mpiu_greq.h" +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) +typedef struct iwrite_shared_args +{ + MPI_File file; + void *buf; + int count; + MPI_Datatype datatype; + MPIO_Request request; + MPI_Status *status; +} iwrite_shared_args; + +static DWORD WINAPI iwrite_shared_thread(LPVOID lpParameter) +{ + int error_code; + iwrite_shared_args *args = (iwrite_shared_args *)lpParameter; + + error_code = MPI_File_write_shared(args->file, args->buf, args->count, args->datatype, args->status); + /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ + args->status->MPI_ERROR = error_code; + + MPI_Grequest_complete(args->request); + ADIOI_Free(args); + return 0; +} +#endif + int MPI_File_iwrite_shared(MPI_File mpi_fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { - int error_code; - MPI_Status *status; + int error_code; + MPI_Status *status; +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) + iwrite_shared_args *args; + HANDLE hThread; +#endif - MPID_CS_ENTER(); - MPIR_Nest_incr(); + MPID_CS_ENTER(); + MPIR_Nest_incr(); - status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); + status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); + +#if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) + /* kick off the request */ + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPIU_Greq_cancel_fn, status, request); + + args = (iwrite_shared_args*) ADIOI_Malloc(sizeof(iwrite_shared_args)); + args->file = mpi_fh; + args->buf = buf; + args->count = count; + args->datatype = datatype; + args->status = status; + args->request = *request; + hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)iwrite_shared_thread, args, 0, NULL); + if (hThread == NULL) + { + error_code = GetLastError(); + error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + "MPI_File_iwrite_shared", __LINE__, MPI_ERR_OTHER, + "**fail", "**fail %d", error_code); + error_code = MPIO_Err_return_file(args->file, error_code); + return error_code; + } + CloseHandle(hThread); - /* for now, no threads or anything fancy. - * just call the blocking version */ - error_code = MPI_File_write_shared(mpi_fh, buf, count, - datatype, status); - /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ - status->MPI_ERROR = error_code; +#else - /* kick off the request */ - MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, - MPIU_Greq_cancel_fn, status, request); + /* for now, no threads or anything fancy. + * just call the blocking version */ + error_code = MPI_File_write_shared(mpi_fh, buf, count, + datatype, status); + /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ + status->MPI_ERROR = error_code; + + /* kick off the request */ + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPIU_Greq_cancel_fn, status, request); - /* but we did all the work already */ - MPI_Grequest_complete(*request); + /* but we did all the work already */ + MPI_Grequest_complete(*request); +#endif - MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIR_Nest_decr(); + MPID_CS_EXIT(); - /* passed the buck to the blocking version...*/ - return MPI_SUCCESS; + /* passed the buck to the blocking version...*/ + return MPI_SUCCESS; } #else int MPI_File_iwrite_shared(MPI_File mpi_fh, void *buf, int count, --- mpich-1.2.7.orig/romio/mpi-io/mpich2_fileutil.c +++ mpich-1.2.7/romio/mpi-io/mpich2_fileutil.c @@ -17,8 +17,6 @@ void MPIR_Get_file_error_routine( MPI_Errhandler, void (**)(MPI_File *, int *, ...), int * ); -struct MPID_Comm; -int MPID_Abort( struct MPID_Comm *comm, int mpi_errno, int exit_code, char *error_msg ); /* These next two routines are used to allow MPICH2 to access/set the error handers in the MPI_File structure until MPICH2 knows about the --- mpich-1.2.7.orig/romio/mpi-io/mpioimpl.h +++ mpich-1.2.7/romio/mpi-io/mpioimpl.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: mpioimpl.h,v 1.13 2005/05/23 23:28:10 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -15,6 +14,7 @@ #include "adio.h" #include "mpio.h" + #ifdef ROMIO_INSIDE_MPICH2 #include "mpiimpl.h" #include "mpiimplthread.h" @@ -27,6 +27,11 @@ #define MPID_CS_ENTER() #define MPIR_Nest_incr() #define MPIR_Nest_decr() +#ifdef HAVE_WINDOWS_H +#define MPIU_UNREFERENCED_ARG(a) a +#else +#define MPIU_UNREFERENCED_ARG(a) +#endif #endif /* info is a linked list of these structures */ --- mpich-1.2.7.orig/romio/mpi-io/mpioprof.h +++ mpich-1.2.7/romio/mpi-io/mpioprof.h @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: mpioprof.h,v 1.11 2004/10/04 15:51:31 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/mpiu_greq.c +++ mpich-1.2.7/romio/mpi-io/mpiu_greq.c @@ -15,34 +15,37 @@ int MPIU_Greq_query_fn(void *extra_state, MPI_Status *status) { - int foo; + int foo; - /* can't touch user's MPI_ERROR, so hold it for a moment */ - foo = status->MPI_ERROR; + /* can't touch user's MPI_ERROR, so hold it for a moment */ + foo = status->MPI_ERROR; - /* get the status from the blocking operation */ - memcpy(status, extra_state, sizeof(MPI_Status)); + /* get the status from the blocking operation */ + memcpy(status, extra_state, sizeof(MPI_Status)); - /* restore MPI_ERROR to whatever it had when we got it */ - status->MPI_ERROR = foo; + /* restore MPI_ERROR to whatever it had when we got it */ + status->MPI_ERROR = foo; - /* and let Test|Wait know we weren't canceled */ - MPIR_Nest_incr(); - MPI_Status_set_cancelled(status, 0); - MPIR_Nest_decr(); + /* and let Test|Wait know we weren't canceled */ + MPIR_Nest_incr(); + MPI_Status_set_cancelled(status, 0); + MPIR_Nest_decr(); - /* the MPI_Status structure is a convienent place to stash the return - * code of the blocking operation */ - return ((MPI_Status*)extra_state)->MPI_ERROR; + /* the MPI_Status structure is a convienent place to stash the return + * code of the blocking operation */ + return ((MPI_Status*)extra_state)->MPI_ERROR; } int MPIU_Greq_free_fn(void *extra_state) { - ADIOI_Free(extra_state); - return MPI_SUCCESS; + ADIOI_Free(extra_state); + return MPI_SUCCESS; } int MPIU_Greq_cancel_fn(void *extra_state, int complete) { - /* can't cancel */ - return MPI_SUCCESS; + MPIU_UNREFERENCED_ARG(extra_state); + MPIU_UNREFERENCED_ARG(complete); + + /* can't cancel */ + return MPI_SUCCESS; } --- mpich-1.2.7.orig/romio/mpi-io/open.c +++ mpich-1.2.7/romio/mpi-io/open.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: open.c,v 1.39 2005/05/23 23:28:11 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/prealloc.c +++ mpich-1.2.7/romio/mpi-io/prealloc.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: prealloc.c,v 1.19 2005/02/18 00:39:08 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -36,7 +35,7 @@ int MPI_File_preallocate(MPI_File mpi_fh, MPI_Offset size) { ADIO_Fcntl_t *fcntl_struct; - int error_code, mynod; + int error_code=0, mynod=0; ADIO_File fh; static char myname[] = "MPI_FILE_PREALLOCATE"; MPI_Offset tmp_sz; --- mpich-1.2.7.orig/romio/mpi-io/rd_atallb.c +++ mpich-1.2.7/romio/mpi-io/rd_atallb.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: rd_atallb.c,v 1.16 2004/10/04 15:51:32 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/rd_atalle.c +++ mpich-1.2.7/romio/mpi-io/rd_atalle.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: rd_atalle.c,v 1.17 2005/02/18 00:39:08 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/read_allb.c +++ mpich-1.2.7/romio/mpi-io/read_allb.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: read_allb.c,v 1.19 2005/02/18 00:39:08 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/read_alle.c +++ mpich-1.2.7/romio/mpi-io/read_alle.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: read_alle.c,v 1.20 2005/02/18 00:39:09 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -57,6 +56,8 @@ int error_code; ADIO_File fh; + MPIU_UNREFERENCED_ARG(buf); + MPID_CS_ENTER(); MPIR_Nest_incr(); --- mpich-1.2.7.orig/romio/mpi-io/read_atall.c +++ mpich-1.2.7/romio/mpi-io/read_atall.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: read_atall.c,v 1.18 2005/02/18 00:39:09 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/read_ord.c +++ mpich-1.2.7/romio/mpi-io/read_ord.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: read_ord.c,v 1.23 2005/02/18 00:39:09 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/read_ordb.c +++ mpich-1.2.7/romio/mpi-io/read_ordb.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: read_ordb.c,v 1.23 2005/02/18 00:39:09 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/read_orde.c +++ mpich-1.2.7/romio/mpi-io/read_orde.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: read_orde.c,v 1.18 2005/02/18 00:39:09 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -42,6 +41,8 @@ ADIO_File fh; static char myname[] = "MPI_FILE_READ_ORDERED_END"; + MPIU_UNREFERENCED_ARG(buf); + MPID_CS_ENTER(); fh = MPIO_File_resolve(mpi_fh); --- mpich-1.2.7.orig/romio/mpi-io/read_sh.c +++ mpich-1.2.7/romio/mpi-io/read_sh.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: read_sh.c,v 1.22 2005/02/18 00:39:09 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/register_datarep.c +++ mpich-1.2.7/romio/mpi-io/register_datarep.c @@ -143,7 +143,7 @@ #ifdef MPICH2 datarep->name = MPIU_Strdup(name); #else - datarep->name = strdup(name); + datarep->name = ADIOI_Strdup(name); #endif datarep->state = state; datarep->read_conv_fn = read_conv_fn; --- mpich-1.2.7.orig/romio/mpi-io/seek.c +++ mpich-1.2.7/romio/mpi-io/seek.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: seek.c,v 1.21 2005/05/23 23:28:11 rross Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/set_atom.c +++ mpich-1.2.7/romio/mpi-io/set_atom.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: set_atom.c,v 1.19 2005/02/18 00:39:10 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/set_errh.c +++ mpich-1.2.7/romio/mpi-io/set_errh.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: set_errh.c,v 1.15 2005/02/18 00:39:10 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/set_info.c +++ mpich-1.2.7/romio/mpi-io/set_info.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: set_info.c,v 1.12 2005/02/18 00:39:10 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/set_size.c +++ mpich-1.2.7/romio/mpi-io/set_size.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: set_size.c,v 1.19 2005/02/18 00:39:10 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/set_view.c +++ mpich-1.2.7/romio/mpi-io/set_view.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: set_view.c,v 1.22 2005/02/18 00:39:10 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/wr_atallb.c +++ mpich-1.2.7/romio/mpi-io/wr_atallb.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: wr_atallb.c,v 1.18 2004/10/04 15:51:34 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/wr_atalle.c +++ mpich-1.2.7/romio/mpi-io/wr_atalle.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: wr_atalle.c,v 1.18 2004/10/04 15:51:34 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/write_all.c +++ mpich-1.2.7/romio/mpi-io/write_all.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: write_all.c,v 1.20 2005/02/18 00:39:10 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/write_allb.c +++ mpich-1.2.7/romio/mpi-io/write_allb.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: write_allb.c,v 1.20 2005/02/18 00:39:11 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/write_alle.c +++ mpich-1.2.7/romio/mpi-io/write_alle.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: write_alle.c,v 1.22 2005/02/18 00:39:11 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -56,6 +55,8 @@ int error_code; ADIO_File fh; + MPIU_UNREFERENCED_ARG(buf); + MPID_CS_ENTER(); MPIR_Nest_incr(); --- mpich-1.2.7.orig/romio/mpi-io/write_atall.c +++ mpich-1.2.7/romio/mpi-io/write_atall.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: write_atall.c,v 1.18 2005/02/18 00:39:11 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/write_ord.c +++ mpich-1.2.7/romio/mpi-io/write_ord.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: write_ord.c,v 1.21 2005/02/18 00:39:11 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/write_ordb.c +++ mpich-1.2.7/romio/mpi-io/write_ordb.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: write_ordb.c,v 1.23 2005/02/18 00:39:11 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/write_orde.c +++ mpich-1.2.7/romio/mpi-io/write_orde.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: write_orde.c,v 1.18 2005/02/18 00:39:11 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -42,6 +41,8 @@ static char myname[] = "MPI_FILE_WRITE_ORDERED_END"; ADIO_File fh; + MPIU_UNREFERENCED_ARG(buf); + MPID_CS_ENTER(); fh = MPIO_File_resolve(mpi_fh); --- mpich-1.2.7.orig/romio/mpi-io/write_sh.c +++ mpich-1.2.7/romio/mpi-io/write_sh.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: write_sh.c,v 1.23 2005/02/18 00:39:11 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/glue/default/Makefile.in +++ mpich-1.2.7/romio/mpi-io/glue/default/Makefile.in @@ -3,20 +3,32 @@ LIBNAME = @LIBNAME@ RANLIB = @RANLIB@ srcdir = @srcdir@ +CC_SHL = @CC_SHL@ +SHLIBNAME = @SHLIBNAME@ -INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I../../../include -I${srcdir}/../../../mpi-io -I${srcdir}/../../../adio/include -I../../../adio/include -CFLAGS = -DHAVE_MPI_INFO_SRC @CFLAGS@ $(MPIOPROFILE) $(INCLUDE_DIR) +INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I../../../include -I${srcdir}/../../../mpi-io -I${srcdir}/../../../adio/include -I../../../adio/include -I${srcdir}/../../../../../../src/include -I../../../../../../src/include +CFLAGS = -DHAVE_MPI_INFO_SRC @CPPFLAGS@ @CFLAGS@ $(MPIOPROFILE) $(INCLUDE_DIR) + +top_builddir = @master_topbuild_dir@ +LIBTOOL = @LIBTOOL@ +C_COMPILE_SHL = $(CC_SHL) @VPATH@ MPIO_OBJECTS = mpio_file.o mpio_err.o all: $(LIBNAME) + @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ + $(MAKE) $(SHLIBNAME).la ;\ + fi -.SUFFIXES: $(SUFFIXES) .p +.SUFFIXES: $(SUFFIXES) .p .lo .c.o: $(CC) $(CFLAGS) -c $< +.c.lo: + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o + @mv -f _s$*.o $*.lo .c.p: @cp $(srcdir)/$*.c _$*.c @@ -28,7 +40,11 @@ $(LIBNAME): $(MPIO_OBJECTS) $(AR) $(LIBNAME) $(MPIO_OBJECTS) - $(RANLIB) $(LIBNAME) + $(RANLIB) $(LIBNAME) + +MPIO_LOOBJECTS = $(MPIO_OBJECTS:.o=.lo) +$(SHLIBNAME).la: $(MPIO_LOOBJECTS) + $(AR) $(SHLIBNAME).la $(MPIO_LOOBJECTS) clean: - @rm -f *.o + @rm -f *.o *.lo --- mpich-1.2.7.orig/romio/mpi-io/glue/default/mpio_err.c +++ mpich-1.2.7/romio/mpi-io/glue/default/mpio_err.c @@ -26,9 +26,9 @@ buf = (char *) ADIOI_Malloc(1024); if (buf != NULL) { - idx += snprintf(buf, 1023, "%s (line %d): ", fcname, line); + idx += ADIOI_Snprintf(buf, 1023, "%s (line %d): ", fcname, line); if (specific_msg == NULL) { - snprintf(&buf[idx], 1023 - idx, "%s\n", generic_msg); + ADIOI_Snprintf(&buf[idx], 1023 - idx, "%s\n", generic_msg); } else { va_start(Argp, specific_msg); --- mpich-1.2.7.orig/romio/mpi-io/glue/default/mpio_file.c +++ mpich-1.2.7/romio/mpi-io/glue/default/mpio_file.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: mpio_file.c,v 1.2 2004/10/04 15:51:37 robl Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/glue/mpich1/Makefile.in +++ mpich-1.2.7/romio/mpi-io/glue/mpich1/Makefile.in @@ -3,20 +3,32 @@ LIBNAME = @LIBNAME@ RANLIB = @RANLIB@ srcdir = @srcdir@ +CC_SHL = @CC_SHL@ +SHLIBNAME = @SHLIBNAME@ -INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I../../../include -I${srcdir}/../../../mpi-io -I${srcdir}/../../../adio/include -I../../../adio/include -CFLAGS = -DHAVE_MPI_INFO_SRC @CFLAGS@ $(MPIOPROFILE) $(INCLUDE_DIR) +INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I../../../include -I${srcdir}/../../../mpi-io -I${srcdir}/../../../adio/include -I../../../adio/include -I${srcdir}/../../../../../../src/include -I../../../../../../src/include +CFLAGS = -DHAVE_MPI_INFO_SRC @CPPFLAGS@ @CFLAGS@ $(MPIOPROFILE) $(INCLUDE_DIR) + +top_builddir = @master_topbuild_dir@ +LIBTOOL = @LIBTOOL@ +C_COMPILE_SHL = $(CC_SHL) @VPATH@ MPIO_OBJECTS = mpio_file.o mpio_err.o all: $(LIBNAME) + @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ + $(MAKE) $(SHLIBNAME).la ;\ + fi -.SUFFIXES: $(SUFFIXES) .p +.SUFFIXES: $(SUFFIXES) .p .lo .c.o: $(CC) $(CFLAGS) -c $< +.c.lo: + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o + @mv -f _s$*.o $*.lo .c.p: @cp $(srcdir)/$*.c _$*.c @@ -28,7 +40,11 @@ $(LIBNAME): $(MPIO_OBJECTS) $(AR) $(LIBNAME) $(MPIO_OBJECTS) - $(RANLIB) $(LIBNAME) + $(RANLIB) $(LIBNAME) + +MPIO_LOOBJECTS = $(MPIO_OBJECTS:.o=.lo) +$(SHLIBNAME).la: $(MPIO_LOOBJECTS) + $(AR) $(SHLIBNAME).la $(MPIO_LOOBJECTS) clean: - @rm -f *.o + @rm -f *.o *.lo --- mpich-1.2.7.orig/romio/mpi-io/glue/mpich1/mpio_err.c +++ mpich-1.2.7/romio/mpi-io/glue/mpich1/mpio_err.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: mpio_err.c,v 1.4 2005/05/23 23:28:11 rross Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/glue/mpich1/mpio_file.c +++ mpich-1.2.7/romio/mpi-io/glue/mpich1/mpio_file.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: mpio_file.c,v 1.3 2005/01/27 21:48:55 rross Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/glue/mpich2/Makefile.in +++ mpich-1.2.7/romio/mpi-io/glue/mpich2/Makefile.in @@ -11,7 +11,7 @@ top_builddir = @master_topbuild_dir@ LIBTOOL = @LIBTOOL@ -C_COMPILE_SHL = $(CC_SHL) @CPPFLAGS@ @CFLAGS@ $(INCLUDE_DIR) +C_COMPILE_SHL = $(CC_SHL) @VPATH@ @@ -27,7 +27,7 @@ .c.o: $(CC) $(CFLAGS) -c $< .c.lo: - $(C_COMPILE_SHL) -c $< -o _s$*.o + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o @mv -f _s$*.o $*.lo .c.p: @@ -45,7 +45,6 @@ MPIO_LOOBJECTS = $(MPIO_OBJECTS:.o=.lo) $(SHLIBNAME).la: $(MPIO_LOOBJECTS) $(AR) $(SHLIBNAME).la $(MPIO_LOOBJECTS) - $(RANLIB) $(SHLIBNAME) clean: - @rm -f *.o + @rm -f *.o *.lo --- mpich-1.2.7.orig/romio/mpi-io/glue/mpich2/mpio_err.c +++ mpich-1.2.7/romio/mpi-io/glue/mpich2/mpio_err.c @@ -10,8 +10,6 @@ #include "mpioimpl.h" #include "adio_extern.h" -#define NMPI_Comm_call_errhandler PMPI_Comm_call_errhandler - /* MPICH2 error handling implementation */ int MPIR_Err_create_code_valist(int, int, const char [], int, int, const char [], const char [], va_list ); @@ -84,7 +82,7 @@ /* --BEGIN ERROR HANDLING-- */ if (MPIR_Err_is_fatal(error_code) || kind == 0) { - sprintf(error_msg, "I/O error: "); + ADIOI_Snprintf(error_msg, 4096, "I/O error: "); len = (int)strlen(error_msg); MPIR_Err_get_string(error_code, &error_msg[len], 4096-len, NULL); MPID_Abort(NULL, MPI_SUCCESS, error_code, error_msg); @@ -103,6 +101,6 @@ /* note: MPI calls inside the MPICH2 implementation are prefixed * with an "N", indicating a nested call. */ - NMPI_Comm_call_errhandler(mpi_comm, error_code); + MPI_Comm_call_errhandler(mpi_comm, error_code); return error_code; } --- mpich-1.2.7.orig/romio/mpi-io/glue/mpich2/mpio_file.c +++ mpich-1.2.7/romio/mpi-io/glue/mpich2/mpio_file.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: mpio_file.c,v 1.3 2004/10/28 22:40:33 rross Exp $ * * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/Makefile.in +++ mpich-1.2.7/romio/mpi-io/fortran/Makefile.in @@ -3,10 +3,16 @@ RANLIB = @RANLIB@ LIBNAME = @LIBNAME@ srcdir = @srcdir@ +CC_SHL = @CC_SHL@ +SHLIBNAME = @SHLIBNAME@ INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I../../include -I${srcdir}/../../adio/include -I../../adio/include -I${srcdir}/.. CFLAGS = -DMPIO_FORTRAN_SRC @CFLAGS@ $(MPIOPROFILE) $(INCLUDE_DIR) +top_builddir = @master_topbuild_dir@ +LIBTOOL = @LIBTOOL@ +C_COMPILE_SHL = $(CC_SHL) + @VPATH@ MPIO_FOBJECTS = closef.o readf.o openf.o writef.o get_extentf.o \ @@ -52,25 +58,51 @@ _read_ordbf.o _write_ordf.o _write_ordef.o _set_errhf.o _get_errhf.o all: $(LIBNAME) + @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ + $(MAKE) $(SHLIBNAME).la ;\ + fi -.SUFFIXES: $(SUFFIXES) .p +.SUFFIXES: $(SUFFIXES) .p .sp .lo .c.o: $(CC) $(CFLAGS) -c $< +.c.lo: + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _s$*.o + @mv -f _s$*.o $*.lo + .c.p: @cp $(srcdir)/$*.c _$*.c $(CC) $(CFLAGS) -c _$*.c @rm -f _$*.c +.c.sp: + $(C_COMPILE_SHL) $(CFLAGS) -c $< -o _$*.lo + profile: $(MPIO_TMP_PFOBJECTS) $(AR) $(LIBNAME) $(MPIO_REAL_PFOBJECTS) $(RANLIB) $(LIBNAME) - @rm -f $(srcdir)/_*.o + @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ + $(MAKE) P$(SHLIBNAME).la ;\ + fi + @rm -f _*.o $(LIBNAME): $(MPIO_FOBJECTS) $(AR) $(LIBNAME) $(MPIO_FOBJECTS) $(RANLIB) $(LIBNAME) +MPIO_LOFOBJECTS = $(MPIO_FOBJECTS:.o=.lo) +$(SHLIBNAME).la: $(MPIO_LOFOBJECTS) + $(AR) $(SHLIBNAME).la $(MPIO_LOFOBJECTS) + +# -------------------------------------------------------------------------- +# We use P$(SHLBNAME) simply to distinguish the regular lib build from the +# profiling library build +MPIO_LOPFOBJECTS = $(MPIO_REAL_PFOBJECTS:.o=.lo) +MPIO_TMP_LOPFOBJECTS = ${MPIO_TMP_PFOBJECTS:.p=.sp} +P$(SHLIBNAME).la: $(MPIO_TMP_LOPFOBJECTS) + $(AR) $(SHLIBNAME).la $(MPIO_LOPFOBJECTS) +# -------------------------------------------------------------------------- + clean: - @rm -f *.o + @rm -f *.o *.lo --- mpich-1.2.7.orig/romio/mpi-io/fortran/closef.c +++ mpich-1.2.7/romio/mpi-io/fortran/closef.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: closef.c,v 1.14 2003/07/08 22:25:41 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/deletef.c +++ mpich-1.2.7/romio/mpi-io/fortran/deletef.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: deletef.c,v 1.15 2003/07/08 22:25:42 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -136,7 +135,7 @@ real_len = i + 1; newfname = (char *) ADIOI_Malloc((real_len+1)*sizeof(char)); - strncpy(newfname, filename, real_len); + ADIOI_Strncpy(newfname, filename, real_len); newfname[real_len] = '\0'; *ierr = MPI_File_delete(newfname, info_c); --- mpich-1.2.7.orig/romio/mpi-io/fortran/fsyncf.c +++ mpich-1.2.7/romio/mpi-io/fortran/fsyncf.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: fsyncf.c,v 1.14 2003/07/08 22:25:42 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/get_amodef.c +++ mpich-1.2.7/romio/mpi-io/fortran/get_amodef.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_amodef.c,v 1.14 2003/07/08 22:25:42 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/get_atomf.c +++ mpich-1.2.7/romio/mpi-io/fortran/get_atomf.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_atomf.c,v 1.14 2003/07/08 22:25:42 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/get_bytofff.c +++ mpich-1.2.7/romio/mpi-io/fortran/get_bytofff.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_bytofff.c,v 1.14 2003/07/08 22:25:42 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/get_errhf.c +++ mpich-1.2.7/romio/mpi-io/fortran/get_errhf.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_errhf.c,v 1.9 2003/07/08 22:25:42 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/get_extentf.c +++ mpich-1.2.7/romio/mpi-io/fortran/get_extentf.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_extentf.c,v 1.15 2003/07/08 22:25:43 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/get_groupf.c +++ mpich-1.2.7/romio/mpi-io/fortran/get_groupf.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_groupf.c,v 1.16 2003/07/08 22:25:43 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/get_infof.c +++ mpich-1.2.7/romio/mpi-io/fortran/get_infof.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_infof.c,v 1.14 2003/07/08 22:25:43 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/get_posn_shf.c +++ mpich-1.2.7/romio/mpi-io/fortran/get_posn_shf.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_posn_shf.c,v 1.13 2003/07/08 22:25:43 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/get_posnf.c +++ mpich-1.2.7/romio/mpi-io/fortran/get_posnf.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_posnf.c,v 1.14 2003/07/08 22:25:43 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/get_sizef.c +++ mpich-1.2.7/romio/mpi-io/fortran/get_sizef.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_sizef.c,v 1.14 2003/07/08 22:25:43 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi-io/fortran/get_viewf.c +++ mpich-1.2.7/romio/mpi-io/fortran/get_viewf.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: get_viewf.c,v 1.16 2003/07/08 22:25:44 thakur Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -117,14 +116,14 @@ tmpreplen = strlen(tmprep); if (tmpreplen <= str_len) { - strncpy(datarep, tmprep, tmpreplen); + ADIOI_Strncpy(datarep, tmprep, tmpreplen); /* blank pad the remaining space */ for (i=tmpreplen; i=0; i--) { - switch(array_of_distribs[i]) { - case MPI_DISTRIBUTE_BLOCK: - MPIOI_Type_block(array_of_gsizes, i, ndims, array_of_psizes[i], - coords[i], array_of_dargs[i], order, orig_extent, - type_old, &type_new, st_offsets+i); - break; - case MPI_DISTRIBUTE_CYCLIC: - MPIOI_Type_cyclic(array_of_gsizes, i, ndims, - array_of_psizes[i], coords[i], array_of_dargs[i], order, - orig_extent, type_old, &type_new, st_offsets+i); - break; - case MPI_DISTRIBUTE_NONE: - /* --BEGIN ERROR HANDLING-- */ - if (array_of_psizes[i] != 1) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, - MPI_ERR_ARG, - "For MPI_DISTRIBUTE_NONE, the number of processes in that dimension of the grid must be 1", 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - } - /* --END ERROR HANDLING-- */ - - /* treat it as a block distribution on 1 process */ - MPIOI_Type_block(array_of_gsizes, i, ndims, array_of_psizes[i], - coords[i], MPI_DISTRIBUTE_DFLT_DARG, order, orig_extent, - type_old, &type_new, st_offsets+i); - break; - default: - /* --BEGIN ERROR HANDLING-- */ - error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, - MPI_ERR_ARG, - "Invalid distrib argument", - 0); - return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - /* --END ERROR HANDLING-- */ - } - if (i != ndims-1) MPI_Type_free(&type_old); - type_old = type_new; - } - - /* add displacement and UB */ - disps[1] = st_offsets[ndims-1]; - tmp_size = 1; - for (i=ndims-2; i>=0; i--) { - tmp_size *= array_of_gsizes[i+1]; - disps[1] += tmp_size*st_offsets[i]; - } - } - else { - /* --BEGIN ERROR HANDLING-- */ - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + if (order != MPI_ORDER_FORTRAN && order != MPI_ORDER_C) { + error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_ARG, "Invalid order argument", 0); return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); - /* --END ERROR HANDLING-- */ } + /* --END ERROR HANDLING-- */ - disps[1] *= orig_extent; - - disps[2] = orig_extent; - for (i=0; idim; i--) stride *= array_of_gsizes[i]; - MPI_Type_hvector(mysize, 1, stride, type_old, type_new); - } - - } - - *st_offset = blksize * rank; - /* in terms of no. of elements of type oldtype in this dimension */ - if (mysize == 0) *st_offset = 0; - - return MPI_SUCCESS; -} - - -/* Returns MPI_SUCCESS on success, an MPI error code on failure. Code above - * needs to call MPIO_Err_return_xxx. - */ -int MPIOI_Type_cyclic(int *array_of_gsizes, int dim, int ndims, int nprocs, - int rank, int darg, int order, MPI_Aint orig_extent, - MPI_Datatype type_old, MPI_Datatype *type_new, - MPI_Aint *st_offset) -{ -/* nprocs = no. of processes in dimension dim of grid - rank = coordinate of this process in dimension dim */ - - int blksize, i, blklens[3], st_index, end_index, local_size, rem, count; - MPI_Aint stride, disps[3]; - MPI_Datatype type_tmp, types[3]; - - if (darg == MPI_DISTRIBUTE_DFLT_DARG) blksize = 1; - else blksize = darg; - + err = ADIO_Type_create_darray(size, + rank, + ndims, + array_of_gsizes, + array_of_distribs, + array_of_dargs, + array_of_psizes, + order, + oldtype, + newtype); /* --BEGIN ERROR HANDLING-- */ - if (blksize <= 0) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, - "Invalid blksize argument", 0); - return error_code; + if (err != MPI_SUCCESS) { + error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, + myname, __LINE__, err, + "Internal error", 0); } /* --END ERROR HANDLING-- */ - - st_index = rank*blksize; - end_index = array_of_gsizes[dim] - 1; - - if (end_index < st_index) local_size = 0; - else { - local_size = ((end_index - st_index + 1)/(nprocs*blksize))*blksize; - rem = (end_index - st_index + 1) % (nprocs*blksize); - local_size += ADIOI_MIN(rem, blksize); - } - - count = local_size/blksize; - rem = local_size % blksize; - - stride = nprocs*blksize*orig_extent; - if (order == MPI_ORDER_FORTRAN) - for (i=0; idim; i--) stride *= array_of_gsizes[i]; - - MPI_Type_hvector(count, blksize, stride, type_old, type_new); - - if (rem) { - /* if the last block is of size less than blksize, include - it separately using MPI_Type_struct */ - - types[0] = *type_new; - types[1] = type_old; - disps[0] = 0; - disps[1] = count*stride; - blklens[0] = 1; - blklens[1] = rem; - - MPI_Type_struct(2, blklens, disps, types, &type_tmp); - - MPI_Type_free(type_new); - *type_new = type_tmp; - } - - /* In the first iteration, we need to set the displacement in that - dimension correctly. */ - if ( ((order == MPI_ORDER_FORTRAN) && (dim == 0)) || - ((order == MPI_ORDER_C) && (dim == ndims-1)) ) { - types[0] = MPI_LB; - disps[0] = 0; - types[1] = *type_new; - disps[1] = rank * blksize * orig_extent; - types[2] = MPI_UB; - disps[2] = orig_extent * array_of_gsizes[dim]; - blklens[0] = blklens[1] = blklens[2] = 1; - MPI_Type_struct(3, blklens, disps, types, &type_tmp); - MPI_Type_free(type_new); - *type_new = type_tmp; - - *st_offset = 0; /* set it to 0 because it is taken care of in - the struct above */ - } - else { - *st_offset = rank * blksize; - /* st_offset is in terms of no. of elements of type oldtype in - * this dimension */ - } - - if (local_size == 0) *st_offset = 0; return MPI_SUCCESS; } -#endif + --- mpich-1.2.7.orig/romio/mpi2-other/array/subarray.c +++ mpich-1.2.7/romio/mpi2-other/array/subarray.c @@ -1,7 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: subarray.c,v 1.9 2004/10/04 15:51:38 robl Exp $ - * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -46,7 +44,7 @@ MPI_Datatype *newtype) { MPI_Aint extent, disps[3], size, size_with_aint; - int i, blklens[3]; + int i, blklens[3], err; MPI_Datatype tmp1, tmp2, types[3]; MPI_Offset size_with_offset; @@ -148,83 +146,30 @@ return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); } - if (order == MPI_ORDER_FORTRAN) { - /* dimension 0 changes fastest */ - if (ndims == 1) - MPI_Type_contiguous(array_of_subsizes[0], oldtype, &tmp1); - else { - MPI_Type_vector(array_of_subsizes[1], array_of_subsizes[0], - array_of_sizes[0], oldtype, &tmp1); - - size = array_of_sizes[0]*extent; - for (i=2; i=0; i--) { - size *= array_of_sizes[i+1]; - MPI_Type_hvector(array_of_subsizes[i], 1, size, tmp1, &tmp2); - MPI_Type_free(&tmp1); - tmp1 = tmp2; - } - } - - /* add displacement and UB */ - - disps[1] = array_of_starts[ndims-1]; - size = 1; - for (i=ndims-2; i>=0; i--) { - size *= array_of_sizes[i+1]; - disps[1] += size*array_of_starts[i]; - } - } - else { + if (order != MPI_ORDER_FORTRAN && order != MPI_ORDER_C) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_ARG, "Invalid order argument", 0); return MPIO_Err_return_comm(MPI_COMM_SELF, error_code); } - - disps[1] *= extent; - - disps[2] = extent; - for (i=0; ikey, key)) { - free(curr->key); /* not ADIOI_Free, because it was strdup'ed */ - free(curr->value); + ADIOI_Free(curr->key); + ADIOI_Free(curr->value); prev->next = curr->next; ADIOI_Free(curr); done = 1; --- mpich-1.2.7.orig/romio/mpi2-other/info/info_dup.c +++ mpich-1.2.7/romio/mpi2-other/info/info_dup.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_dup.c,v 1.7 2002/10/24 17:01:28 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -56,8 +55,8 @@ curr_new->next = (MPI_Info) ADIOI_Malloc(sizeof(struct MPIR_Info)); curr_new = curr_new->next; curr_new->cookie = 0; /* cookie not set on purpose */ - curr_new->key = strdup(curr_old->key); - curr_new->value = strdup(curr_old->value); + curr_new->key = ADIOI_Strdup(curr_old->key); + curr_new->value = ADIOI_Strdup(curr_old->value); curr_new->next = 0; curr_old = curr_old->next; --- mpich-1.2.7.orig/romio/mpi2-other/info/info_f2c.c +++ mpich-1.2.7/romio/mpi2-other/info/info_f2c.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_f2c.c,v 1.7 2002/10/24 17:01:28 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi2-other/info/info_free.c +++ mpich-1.2.7/romio/mpi2-other/info/info_free.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_free.c,v 1.7 2002/10/24 17:01:29 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -47,8 +46,8 @@ while (curr) { next = curr->next; - free(curr->key); - free(curr->value); + ADIOI_Free(curr->key); + ADIOI_Free(curr->value); ADIOI_Free(curr); curr = next; } --- mpich-1.2.7.orig/romio/mpi2-other/info/info_get.c +++ mpich-1.2.7/romio/mpi2-other/info/info_get.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_get.c,v 1.7 2002/10/24 17:01:29 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -77,7 +76,7 @@ while (curr) { if (!strcmp(curr->key, key)) { - strncpy(value, curr->value, valuelen); + ADIOI_Strncpy(value, curr->value, valuelen); value[valuelen] = '\0'; *flag = 1; break; --- mpich-1.2.7.orig/romio/mpi2-other/info/info_getnks.c +++ mpich-1.2.7/romio/mpi2-other/info/info_getnks.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_getnks.c,v 1.7 2002/10/24 17:01:29 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi2-other/info/info_getnth.c +++ mpich-1.2.7/romio/mpi2-other/info/info_getnth.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_getnth.c,v 1.7 2002/10/24 17:01:29 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -69,7 +68,7 @@ curr = curr->next; i++; } - strcpy(key, curr->key); + ADIOI_Strncpy(key, curr->key, MPI_MAX_INFO_KEY); return MPI_SUCCESS; } --- mpich-1.2.7.orig/romio/mpi2-other/info/info_getvln.c +++ mpich-1.2.7/romio/mpi2-other/info/info_getvln.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_getvln.c,v 1.7 2002/10/24 17:01:29 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi2-other/info/info_set.c +++ mpich-1.2.7/romio/mpi2-other/info/info_set.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_set.c,v 1.7 2002/10/24 17:01:29 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -78,8 +77,8 @@ while (curr) { if (!strcmp(curr->key, key)) { - free(curr->value); /* not ADIOI_Free, because it was strdup'ed */ - curr->value = strdup(value); + ADIOI_Free(curr->value); + curr->value = ADIOI_Strdup(value); break; } prev = curr; @@ -90,8 +89,8 @@ prev->next = (MPI_Info) ADIOI_Malloc(sizeof(struct MPIR_Info)); curr = prev->next; curr->cookie = 0; /* cookie not set on purpose */ - curr->key = strdup(key); - curr->value = strdup(value); + curr->key = ADIOI_Strdup(key); + curr->value = ADIOI_Strdup(value); curr->next = 0; } --- mpich-1.2.7.orig/romio/mpi2-other/info/fortran/info_createf.c +++ mpich-1.2.7/romio/mpi2-other/info/fortran/info_createf.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_createf.c,v 1.7 2002/10/24 17:01:30 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi2-other/info/fortran/info_deletef.c +++ mpich-1.2.7/romio/mpi2-other/info/fortran/info_deletef.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_deletef.c,v 1.7 2002/10/24 17:01:30 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -111,7 +110,7 @@ key += lead_blanks; newkey = (char *) ADIOI_Malloc((new_keylen+1)*sizeof(char)); - strncpy(newkey, key, new_keylen); + ADIOI_Strncpy(newkey, key, new_keylen); newkey[new_keylen] = '\0'; info_c = MPI_Info_f2c(*info); --- mpich-1.2.7.orig/romio/mpi2-other/info/fortran/info_dupf.c +++ mpich-1.2.7/romio/mpi2-other/info/fortran/info_dupf.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_dupf.c,v 1.7 2002/10/24 17:01:30 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi2-other/info/fortran/info_freef.c +++ mpich-1.2.7/romio/mpi2-other/info/fortran/info_freef.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_freef.c,v 1.7 2002/10/24 17:01:30 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. --- mpich-1.2.7.orig/romio/mpi2-other/info/fortran/info_getf.c +++ mpich-1.2.7/romio/mpi2-other/info/fortran/info_getf.c @@ -1,6 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * $Id: info_getf.c,v 1.7 2002/10/24 17:01:30 gropp Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -112,7 +111,7 @@ key += lead_blanks; newkey = (char *) ADIOI_Malloc((new_keylen+1)*sizeof(char)); - strncpy(newkey, key, new_keylen); + ADIOI_Strncpy(newkey, key, new_keylen); newkey[new_keylen] = '\0'; if (value <= (char *) 0) { @@ -135,7 +134,7 @@ if (*flag) { tmpvaluelen = strlen(tmpvalue); - strncpy(value, tmpvalue, tmpvaluelen); + ADIOI_Strncpy(value, tmpvalue, tmpvaluelen); /* blank pad the remaining space */ for (i=tmpvaluelen; i sys, 'fprintf' => sys , 'sprintf' => sys, 'vprintf' => sys, - 'strcpy' => sys, 'strncpy' => sys, 'strcat' => sys, - 'malloc' => sys, 'free' => sys, 'calloc' => sys, 'strdup' => sys, - 'assert' => sys, - ); -&PushAllowFuncNames( "romioTestRoutines", "tree", "add" ); +# +# We allow these routines for the romio test programs +%romioTestRoutines = ( + 'printf' => sys, 'fprintf' => sys , 'sprintf' => sys, 'vprintf' => sys, + 'strcpy' => sys, 'strncpy' => sys, 'strcat' => sys, + 'malloc' => sys, 'free' => sys, 'calloc' => sys, 'strdup' => sys, + 'assert' => sys, 'snprintf' => sys, + ); +if (defined(&PushAllowFuncNames)) { + &PushAllowFuncNames( "romioTestRoutines", "tree", "add" ); +} + +1; --- mpich-1.2.7.orig/romio/test/README +++ mpich-1.2.7/romio/test/README @@ -48,7 +48,7 @@ large_file.c: Tests access to large files. Writes a 4-Gbyte file and reads it back. Run it only on one process and on a file system - on which ROMIO supports large files, i.e., PIOFS, XFS, SFS, and HFS. + on which ROMIO supports large files. large_array.c: Tests writing and reading a 4-Gbyte distributed array using the distributed array datatype constructor. Works only on file --- mpich-1.2.7.orig/romio/test/async.c +++ mpich-1.2.7/romio/test/async.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/atomicity.c +++ mpich-1.2.7/romio/test/atomicity.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/coll_perf.c +++ mpich-1.2.7/romio/test/coll_perf.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/coll_test.c +++ mpich-1.2.7/romio/test/coll_test.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/error.c +++ mpich-1.2.7/romio/test/error.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/excl.c +++ mpich-1.2.7/romio/test/excl.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/file_info.c +++ mpich-1.2.7/romio/test/file_info.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/i_noncontig.c +++ mpich-1.2.7/romio/test/i_noncontig.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/large_array.c +++ mpich-1.2.7/romio/test/large_array.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/large_file.c.in +++ mpich-1.2.7/romio/test/large_file.c.in @@ -1,5 +1,4 @@ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/misc.c.in +++ mpich-1.2.7/romio/test/misc.c.in @@ -1,5 +1,4 @@ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/noncontig.c +++ mpich-1.2.7/romio/test/noncontig.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/noncontig_coll.c +++ mpich-1.2.7/romio/test/noncontig_coll.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/noncontig_coll2.c +++ mpich-1.2.7/romio/test/noncontig_coll2.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include @@ -260,9 +259,9 @@ p = snprintf(ptr, len, "%s,", array->names[i]); ptr += p; } + /* chop off that last comma */ + dest[strlen(dest) - 1] = '\0'; } - /* chop off that last comma */ - dest[strlen(dest) - 1] = '\0'; MPI_Bcast(dest, len, MPI_CHAR, 0, MPI_COMM_WORLD); } void reverse_str(int mynod, int len, ADIO_cb_name_array array, char *dest) @@ -275,8 +274,8 @@ p = snprintf(ptr, len, "%s,", array->names[i]); ptr += p; } + dest[strlen(dest) - 1] = '\0'; } - dest[strlen(dest) - 1] = '\0'; MPI_Bcast(dest, len, MPI_CHAR, 0, MPI_COMM_WORLD); } @@ -296,9 +295,9 @@ p = snprintf(ptr, len, "%s,", array->names[i]); ptr += p; } - } - dest[strlen(dest) - 1] = '\0'; - MPI_Bcast(dest, len, MPI_CHAR, 0, MPI_COMM_WORLD); + dest[strlen(dest) - 1] = '\0'; + } + MPI_Bcast(dest, len, MPI_CHAR, 0, MPI_COMM_WORLD); } void simple_shuffle_str(int mynod, int len, ADIO_cb_name_array array, char *dest) @@ -315,8 +314,8 @@ p = snprintf(ptr, len, "%s,", array->names[i]); ptr += p; } + dest[strlen(dest) - 1] = '\0'; } - dest[strlen(dest) - 1] = '\0'; MPI_Bcast(dest, len, MPI_CHAR, 0, MPI_COMM_WORLD); } --- mpich-1.2.7.orig/romio/test/perf.c +++ mpich-1.2.7/romio/test/perf.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/psimple.c +++ mpich-1.2.7/romio/test/psimple.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/runtests.in +++ mpich-1.2.7/romio/test/runtests.in @@ -159,8 +159,8 @@ MakeExe simple \rm -f $FILENAME* echo '**** Testing simple.c ****' -$mpirun -np 4 ./simple -fname $FILENAME "$@" >> simple.out 2>&1 -CheckOutput simple +$mpirun -np 4 ./simple -fname $FILENAME +# CheckOutput simple CleanExe simple # OutTime @@ -169,8 +169,8 @@ MakeExe async \rm -f $FILENAME* echo '**** Testing async.c ****' -$mpirun -np 4 ./async -fname $FILENAME "$@" >> async.out 2>&1 -CheckOutput async +$mpirun -np 4 ./async -fname $FILENAME +# CheckOutput async CleanExe async # OutTime @@ -181,8 +181,8 @@ echo '**** Testing atomicity.c ****' # Atomicity test recommends at least 8 processes (separate processors # even better) -$mpirun -np 4 ./atomicity -fname $FILENAME "$@" >> atomicity.out 2>&1 -CheckOutput atomicity +$mpirun -np 4 ./atomicity -fname $FILENAME +# CheckOutput atomicity CleanExe atomicity # OutTime @@ -191,8 +191,8 @@ MakeExe coll_test \rm -f $FILENAME* echo '**** Testing coll_test.c ****' -$mpirun -np 4 ./coll_test -fname $FILENAME "$@" >> coll_test.out 2>&1 -CheckOutput coll_test +$mpirun -np 4 ./coll_test -fname $FILENAME +# CheckOutput coll_test CleanExe coll_test # OutTime @@ -201,8 +201,8 @@ MakeExe excl \rm -f $FILENAME* echo '**** Testing excl.c ****' -$mpirun -np 4 ./excl -fname $FILENAME "$@" >> excl.out 2>&1 -CheckOutput excl +$mpirun -np 4 ./excl -fname $FILENAME +# CheckOutput excl CleanExe excl # OutTime @@ -211,8 +211,8 @@ MakeExe file_info \rm -f $FILENAME* echo '**** Testing file_info.c ****' -$mpirun -np 4 ./file_info -fname $FILENAME "$@" >> file_info.out 2>&1 -CheckOutput file_info +$mpirun -np 4 ./file_info -fname $FILENAME +# CheckOutput file_info CleanExe file_info # OutTime @@ -221,8 +221,8 @@ MakeExe i_noncontig \rm -f $FILENAME* echo '**** Testing i_noncontig.c ****' -$mpirun -np 2 ./i_noncontig -fname $FILENAME "$@" >> i_noncontig.out 2>&1 -CheckOutput i_noncontig +$mpirun -np 2 ./i_noncontig -fname $FILENAME +# CheckOutput i_noncontig CleanExe i_noncontig # OutTime @@ -231,8 +231,8 @@ MakeExe noncontig \rm -f $FILENAME* echo '**** Testing noncontig.c ****' -$mpirun -np 2 ./noncontig -fname $FILENAME "$@" >> noncontig.out 2>&1 -CheckOutput noncontig +$mpirun -np 2 ./noncontig -fname $FILENAME +# CheckOutput noncontig CleanExe noncontig # OutTime @@ -241,8 +241,8 @@ MakeExe noncontig_coll \rm -f $FILENAME* echo '**** Testing noncontig_coll.c ****' -$mpirun -np 2 ./noncontig_coll -fname $FILENAME "$@" >> noncontig_coll.out 2>&1 -CheckOutput noncontig_coll +$mpirun -np 2 ./noncontig_coll -fname $FILENAME +# CheckOutput noncontig_coll CleanExe noncontig_coll # OutTime @@ -251,8 +251,8 @@ MakeExe noncontig_coll2 \rm -f $FILENAME* echo '**** Testing noncontig_coll2.c ****' -$mpirun -np 4 ./noncontig_coll2 -fname $FILENAME "$@" >> noncontig_coll2.out 2>&1 -CheckOutput noncontig_coll2 +$mpirun -np 4 ./noncontig_coll2 -fname $FILENAME +# CheckOutput noncontig_coll2 CleanExe noncontig_coll2 # OutTime @@ -261,8 +261,8 @@ MakeExe misc \rm -f $FILENAME* echo '**** Testing misc.c ****' -$mpirun -np 4 ./misc -fname $FILENAME "$@" >> misc.out 2>&1 -CheckOutput misc +$mpirun -np 4 ./misc -fname $FILENAME +# CheckOutput misc CleanExe misc # OutTime @@ -271,8 +271,8 @@ MakeExe shared_fp \rm -f $FILENAME* echo '**** Testing shared_fp.c ****' -$mpirun -np 4 ./shared_fp -fname $FILENAME "$@" >> shared_fp.out 2>&1 -CheckOutput shared_fp +$mpirun -np 4 ./shared_fp -fname $FILENAME +# CheckOutput shared_fp CleanExe shared_fp # OutTime @@ -281,8 +281,8 @@ MakeExe split_coll \rm -f $FILENAME* echo '**** Testing split_coll.c ****' -$mpirun -np 4 ./split_coll -fname $FILENAME "$@" >> split_coll.out 2>&1 -CheckOutput split_coll +$mpirun -np 4 ./split_coll -fname $FILENAME +# CheckOutput split_coll CleanExe split_coll # OutTime @@ -291,8 +291,8 @@ MakeExe psimple \rm -f $FILENAME* echo '**** Testing psimple.c ****' -$mpirun -np 4 ./psimple -fname $FILENAME "$@" >> psimple.out 2>&1 -CheckOutput psimple +$mpirun -np 4 ./psimple -fname $FILENAME +# CheckOutput psimple CleanExe psimple # OutTime @@ -301,8 +301,8 @@ MakeExe error \rm -f $FILENAME* echo '**** Testing error.c ****' -$mpirun -np 1 ./error -fname $FILENAME "$@" >> error.out 2>&1 -CheckOutput error +$mpirun -np 1 ./error -fname $FILENAME +# CheckOutput error CleanExe error # OutTime @@ -312,8 +312,8 @@ \rm -f $FILENAME* echo '**** Testing status.c ****' # Some systems have a status program. -$mpirun -np 1 ./status -fname $FILENAME "$@" >> status.out 2>&1 -CheckOutput status +$mpirun -np 1 ./status -fname $FILENAME +# CheckOutput status CleanExe status # if [ @NOF77@ = 0 ] ; then @@ -325,8 +325,8 @@ MakeExe fmisc \rm -f $FILENAME* echo '**** Testing fmisc.f ****' - $mpirun -np 4 ./fmisc -fname $FILENAME "$@" >> fmisc.out 2>&1 - CheckOutput fmisc + $mpirun -np 4 ./fmisc -fname $FILENAME + # CheckOutput fmisc CleanExe fmisc # OutTime @@ -335,8 +335,8 @@ MakeExe fcoll_test \rm -f $FILENAME* echo '**** Testing fcoll_test.f ****' - $mpirun -np 4 ./fcoll_test -fname $FILENAME "$@" >> fcoll_test.out 2>&1 - CheckOutput fcoll_test + $mpirun -np 4 ./fcoll_test -fname $FILENAME + # CheckOutput fcoll_test CleanExe fcoll_test # OutTime @@ -345,8 +345,8 @@ MakeExe pfcoll_test \rm -f $FILENAME* echo '**** Testing pfcoll_test.f ****' - $mpirun -np 4 ./pfcoll_test -fname $FILENAME "$@" >> pfcoll_test.out 2>&1 - CheckOutput pfcoll_test + $mpirun -np 4 ./pfcoll_test -fname $FILENAME + # CheckOutput pfcoll_test CleanExe pfcoll_test # echo "" @@ -361,46 +361,46 @@ fi fi # -echo '*** Checking for differences from expected output ***' -/bin/rm -f iotests.diff -nodiff=1 -for file in $testfiles ; do - stdfile="${srcdir}/std/`basename $file .out`.std" - # if basename is sendrecv or isndrcv, then we may want to test - # with .std2 as well. We should really separate out the long double - # tests ... - if [ -s $stdfile ] ; then - stdfile2=${stdfile}2 - # Handle Fortran systems that generate stop statements - bfile="`basename $file .out`.tout" - rm -f ${bfile} - grep -v 'FORTRAN STOP' ${file} > ${bfile} - if diff -b $bfile $stdfile > /dev/null ; then - true - elif [ -s $stdfile2 ] ; then - # check for alternate in case configuration has fewer datatypes - if diff -b $bfile $stdfile2 > /dev/null ; then - true - else - echo "Differences in `basename $file .out`" >> iotests.diff - diff -b $bfile $stdfile >> iotests.diff - nodiff=0 - fi - else - echo "Differences in `basename $file .out`" >> iotests.diff - diff -b $bfile $stdfile >> iotests.diff - nodiff=0 - fi - rm -f ${bfile} - else - echo "Can not find file $stdfile to compare against for test `basename $file .out`" - nodiff=0 - fi -done -if [ -s iotests.diff ] ; then - cat iotests.diff -elif [ $nodiff = 1 ] ; then - echo "-- No differences found; test successful" -fi -exit 0 - +# echo '*** Checking for differences from expected output ***' +# /bin/rm -f iotests.diff +# nodiff=1 +# for file in $testfiles ; do +# stdfile="${srcdir}/std/`basename $file .out`.std" +# # if basename is sendrecv or isndrcv, then we may want to test +# # with .std2 as well. We should really separate out the long double +# # tests ... +# if [ -s $stdfile ] ; then +# stdfile2=${stdfile}2 +# # Handle Fortran systems that generate stop statements +# bfile="`basename $file .out`.tout" +# rm -f ${bfile} +# grep -v 'FORTRAN STOP' ${file} > ${bfile} +# if diff -b $bfile $stdfile > /dev/null ; then +# true +# elif [ -s $stdfile2 ] ; then +# # check for alternate in case configuration has fewer datatypes +# if diff -b $bfile $stdfile2 > /dev/null ; then +# true +# else +# echo "Differences in `basename $file .out`" >> iotests.diff +# diff -b $bfile $stdfile >> iotests.diff +# nodiff=0 +# fi +# else +# echo "Differences in `basename $file .out`" >> iotests.diff +# diff -b $bfile $stdfile >> iotests.diff +# nodiff=0 +# fi +# rm -f ${bfile} +# else +# echo "Can not find file $stdfile to compare against for test `basename $file .out`" +# nodiff=0 +# fi +# done +# if [ -s iotests.diff ] ; then +# cat iotests.diff +# elif [ $nodiff = 1 ] ; then +# echo "-- No differences found; test successful" +# fi + exit 0 + --- mpich-1.2.7.orig/romio/test/shared_fp.c +++ mpich-1.2.7/romio/test/shared_fp.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/simple.c +++ mpich-1.2.7/romio/test/simple.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/split_coll.c +++ mpich-1.2.7/romio/test/split_coll.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/test/status.c +++ mpich-1.2.7/romio/test/status.c @@ -4,7 +4,6 @@ * See COPYRIGHT in top-level directory. */ #include "mpi.h" -#include "mpio.h" /* not necessary with MPICH 1.1.1 or HPMPI 1.4 */ #include #include #include --- mpich-1.2.7.orig/romio/util/nfslock.c +++ mpich-1.2.7/romio/util/nfslock.c @@ -9,7 +9,7 @@ #include /* - * This routine tests to see if fcntl returns success when asked to + * This program tests to see if fcntl returns success when asked to * establish a file lock. This test is intended for use on file systems * such as NFS that may not implement file locks. ROMIO makes use * of file locks to implement certain operations, and may not work @@ -26,11 +26,14 @@ * Under normal conditions, this program should only take a few seconds to * run. * - * This program prints a message showing the success or failure of + * The program prints a message showing the success or failure of * setting the file lock and sets the return status to 0 on success and * non-zero on failure. If there is a failure, the system routine * perror is also called to explain the reason. */ + +/* style: allow:printf:2 sig:0 */ + int main( int argc, char *argv[] ) { struct flock lock;