ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/configure
(Generate patch)

Comparing trunk/OOPSE/configure (file contents):
Revision 822 by gezelter, Mon Oct 27 16:20:59 2003 UTC vs.
Revision 896 by chuckv, Mon Jan 5 22:18:40 2004 UTC

# Line 311 | Line 311 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKA
311   # include <unistd.h>
312   #endif"
313  
314 < 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 PROGNAME debug build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX F90 F90FLAGS ac_ct_F90 PREPFLAG PREPDEFFLAG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT AR F90LIBS F90_FUNC F90_FUNC_ mpi_dir MPI_LIBDIR MPI_INC MPI_LIB MPIF77 MPIF90 MPILIBS CPP EGREP SPRNG_LIBDIR SPRNG_LIB SPRNG_INC HAVE_SPRNG MKL_LIBDIR MKL_LIB MKL_INC HAVE_MKL MPI_F90_MODS MPIMODLIBNAME BATEXT MKINSTALLDIRS OOPSE OOPSE_HOME SUBDIRS FFLAGS LIBOBJS LTLIBOBJS'
314 > 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 PROGNAME debug build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX OOPSE_TEMPLATE_FLAGS EXTRA_CC_FLAG F90 F90FLAGS ac_ct_F90 PREPFLAG PREPDEFFLAG F90LIBS F90_FUNC F90_FUNC_ MOD F90_WORK_FILES_ARG MODDIRFLAG F90MODINCSPEC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT AR mpi_dir MPI_LIBDIR MPI_INC MPI_LIB MPIF77 MPIF90 MPILIBS MPI_F90_MODS MPIMODLIBNAME EGREP CPP SPRNG_LIBDIR SPRNG_LIB SPRNG_INC HAVE_SPRNG MKL_LIBDIR MKL_LIB MKL_INC HAVE_MKL BATEXT MKINSTALLDIRS OOPSE OOPSE_HOME SUBDIRS FFLAGS LIBOBJS LTLIBOBJS'
315   ac_subst_files=''
316  
317   # Initialize some variables set by options.
# Line 877 | Line 877 | Optional Packages:
877    --with-mpi_dir=MPIDIR   give the path for MPI /usr/local
878    --with-mpi-libdir=dir  give the path for MPI-libraries MPI_DIR/lib
879    --with-mpi_inc=dir  give the path for MPI-include-files MPI_DIR/include
880 +  --with-mpi_f90_mods=<dir>
881 +                          Location where MPI f90 modules are installed
882    --with-sprng_prefix=PREFIX
883                            Prefix where SPRNG is installed
884    --with-sprng-libdir=PREFIX  SPRNG library directory
885    --with-sprng-include=PREFIX
886                            SPRNG include directory
887    --with-mkl              Do we want MKL will check /usr/local/intel/mkl60 /opt/intel/mkl60
886  --with-mpi_f90_mods=<dir>
887                          Location where MPI f90 modules are installed
888  
889   Some influential environment variables:
890    CC          C compiler command
# Line 1792 | Line 1792 | ac_configure="$SHELL $ac_aux_dir/configure" # This sho
1792   # $SHELLVAR to the Fortran 95 mangled name.  If the SHELLVAR
1793   # argument is not supplied, it defaults to NAME.
1794   # AC_F95_FUNC
1795 +
1796 +
1797 +
1798  
1799  
1800  
# Line 1828 | Line 1831 | ac_configure="$SHELL $ac_aux_dir/configure" # This sho
1831  
1832  
1833  
1834 +
1835 +
1836 +
1837 +
1838 +
1839   # set program name
1840   PROGNAME="oopse"
1841  
# Line 2558 | Line 2566 | ac_ext=cc
2566   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2567   ac_compiler_gnu=$ac_cv_c_compiler_gnu
2568  
2569 +
2570   ac_ext=cc
2571   ac_cpp='$CXXCPP $CPPFLAGS'
2572   ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
# Line 2878 | Line 2887 | ac_ext=f90
2887   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2888   ac_compiler_gnu=$ac_cv_c_compiler_gnu
2889  
2890 + OOPSE_TEMPLATE_FLAGS=""
2891 + if test $ac_cv_cxx_compiler_gnu = no; then
2892 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -ptused -no_prelink" >&5
2893 + echo $ECHO_N "checking checking whether ${CXX} accepts -ptused -no_prelink... $ECHO_C" >&6
2894 +  echo 'void f(){}' > conftest.cc
2895 +  if test -z "`${CXX} -ptused -no_prelink -c conftest.cc 2>&1`"; then
2896 +    echo "$as_me:$LINENO: result: yes" >&5
2897 + echo "${ECHO_T}yes" >&6
2898 +    OOPSE_TEMPLATE_FLAGS="-ptused -no_prelink"
2899 +  else
2900 +    echo "$as_me:$LINENO: result: no" >&5
2901 + echo "${ECHO_T}no" >&6
2902 +  fi
2903 +  rm -f conftest*
2904 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -instances=static" >&5
2905 + echo $ECHO_N "checking checking whether ${CXX} accepts -instances=static... $ECHO_C" >&6
2906 +  echo 'void f(){}' > conftest.cc
2907 +  if test -z "`${CXX} -instances=static -c conftest.cc 2>&1`"; then
2908 +    echo "$as_me:$LINENO: result: yes" >&5
2909 + echo "${ECHO_T}yes" >&6
2910 +    OOPSE_TEMPLATE_FLAGS="-instances=static"
2911 +  else
2912 +    echo "$as_me:$LINENO: result: no" >&5
2913 + echo "${ECHO_T}no" >&6
2914 +  fi
2915 +  rm -f conftest*
2916 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -pto" >&5
2917 + echo $ECHO_N "checking checking whether ${CXX} accepts -pto... $ECHO_C" >&6
2918 +  echo 'void f(){}' > conftest.cc
2919 +  if test -z "`${CXX} -pto -c conftest.cc 2>&1`"; then
2920 +    echo "$as_me:$LINENO: result: yes" >&5
2921 + echo "${ECHO_T}yes" >&6
2922 +    OOPSE_TEMPLATE_FLAGS="-pto"
2923 +  else
2924 +    echo "$as_me:$LINENO: result: no" >&5
2925 + echo "${ECHO_T}no" >&6
2926 +  fi
2927 +  rm -f conftest*
2928 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -LANG:std" >&5
2929 + echo $ECHO_N "checking checking whether ${CXX} accepts -LANG:std... $ECHO_C" >&6
2930 +  echo 'void f(){}' > conftest.cc
2931 +  if test -z "`${CXX} -LANG:std -c conftest.cc 2>&1`"; then
2932 +    echo "$as_me:$LINENO: result: yes" >&5
2933 + echo "${ECHO_T}yes" >&6
2934 +    EXTRA_CC_FLAG=${EXTRA_CC_FLAG}" -LANG:std"
2935 +  else
2936 +    echo "$as_me:$LINENO: result: no" >&5
2937 + echo "${ECHO_T}no" >&6
2938 +  fi
2939 + fi
2940 +
2941 +
2942 +
2943 +
2944   ac_ext=f90
2945   ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
2946   ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
# Line 3046 | Line 3109 | if test "$ac_test_PREPFLAG" != "set"; then
3109    esac
3110  
3111    if test -z "$PREPFLAG"; then
3112 <        echo ""
3113 <        echo "**********************************************************"
3051 <        echo "* WARNING: Don't know the best PREPFLAG for this system  *"
3052 <        echo "* Use  make PREPFLAG=..., or edit the top level Makefile *"
3053 <        echo "* (otherwise, an empty PREPFLAG will be used)            *"
3054 <        echo "**********************************************************"
3055 <        echo ""
3112 >        { echo "$as_me:$LINENO: WARNING: \"Using empty PREPFLAG\"" >&5
3113 > echo "$as_me: WARNING: \"Using empty PREPFLAG\"" >&2;}
3114          PREPFLAG=""
3115    fi
3116  
# Line 3153 | Line 3211 | if test "$ac_test_PREPDEFFLAG" != "set"; then
3211    esac
3212  
3213    if test -z "$PREPDEFFLAG"; then
3214 <        echo ""
3215 <        echo "*************************************************************"
3158 <        echo "* WARNING: Don't know the best PREPDEFFLAG for this system  *"
3159 <        echo "* Use  make PREPDEFFLAG=..., or edit the top level Makefile *"
3160 <        echo "* (otherwise, an empty PREPDEFFLAG will be used)            *"
3161 <        echo "*************************************************************"
3162 <        echo ""
3214 >        { echo "$as_me:$LINENO: WARNING: \"Using empty PREPDEFFLAG\"" >&5
3215 > echo "$as_me: WARNING: \"Using empty PREPDEFFLAG\"" >&2;}
3216          PREPDEFFLAG=" "
3217    fi
3218  
# Line 3238 | Line 3291 | fi
3291   echo "$as_me: error: Can't figure out working Fortran90 preprocessor define flag" >&2;}
3292     { (exit 1); exit 1; }; }
3293    fi
3294 + fi
3295 +
3296 + ac_ext=f90
3297 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3298 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3299 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3300 +
3301 +
3302 +
3303 + ac_ext=f90
3304 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3305 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3306 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3307 + echo "$as_me:$LINENO: checking how to get verbose linking output from $F90" >&5
3308 + echo $ECHO_N "checking how to get verbose linking output from $F90... $ECHO_C" >&6
3309 + if test "${ac_cv_prog_f90_v+set}" = set; then
3310 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3311 + else
3312 +
3313 + cat >conftest.$ac_ext <<_ACEOF
3314 +
3315 + program main
3316 +
3317 +
3318 + end program main
3319 +
3320 + _ACEOF
3321 + rm -f conftest.$ac_objext
3322 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3323 +  (eval $ac_compile) 2>&5
3324 +  ac_status=$?
3325 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3326 +  (exit $ac_status); } &&
3327 +         { ac_try='test -s conftest.$ac_objext'
3328 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3329 +  (eval $ac_try) 2>&5
3330 +  ac_status=$?
3331 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3332 +  (exit $ac_status); }; }; then
3333 +  ac_cv_prog_f90_v=
3334 + # Try some options frequently used verbose output
3335 + for ac_verb in -v -verbose --verbose -V -\#\#\#; do
3336 +  ac_ext=f90
3337 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3338 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3339 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3340 +
3341 + cat >conftest.$ac_ext <<_ACEOF
3342 +
3343 + program main
3344 +
3345 +
3346 + end program main
3347 +
3348 + _ACEOF
3349 +
3350 + # Compile and link our simple test program by passing a flag (argument
3351 + # 1 to this macro) to the Fortran 90 compiler in order to get
3352 + # "verbose" output that we can then parse for the Fortran 90 linker
3353 + # flags.
3354 + ac_save_F90FLAGS=$F90FLAGS
3355 + F90FLAGS="$F90FLAGS $ac_verb"
3356 +
3357 + (eval echo $as_me:3357: \"$ac_link\") >&5
3358 + ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
3359 + echo "$ac_f90_v_output" >&5
3360 + F90FLAGS=$ac_save_F90FLAGS
3361 +
3362 + rm -f conftest.*
3363 + ac_ext=f90
3364 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3365 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3366 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3367 +
3368 + # If we are using xlf then replace all the commas with spaces.
3369 + if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
3370 +  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
3371   fi
3372  
3373 + # If we are using Cray Fortran then delete quotes.
3374 + # Use "\"" instead of '"' for font-lock-mode.
3375 + # FIXME: a more general fix for quoted arguments with spaces?
3376 + if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
3377 +  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
3378 + fi
3379 +  # look for -l* and *.a constructs in the output
3380 +  for ac_arg in $ac_f90_v_output; do
3381 +     case $ac_arg in
3382 +        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
3383 +          ac_cv_prog_f90_v=$ac_verb
3384 +          break 2 ;;
3385 +     esac
3386 +  done
3387 + done
3388 + if test -z "$ac_cv_prog_f90_v"; then
3389 +   { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F90" >&5
3390 + echo "$as_me: WARNING: cannot determine how to obtain linking information from $F90" >&2;}
3391 + fi
3392 + else
3393 +  echo "$as_me: failed program was:" >&5
3394 + sed 's/^/| /' conftest.$ac_ext >&5
3395  
3396 + { echo "$as_me:$LINENO: WARNING: compilation failed" >&5
3397 + echo "$as_me: WARNING: compilation failed" >&2;}
3398 + fi
3399 + rm -f conftest.$ac_objext conftest.$ac_ext
3400 +
3401 + fi
3402 + echo "$as_me:$LINENO: result: $ac_cv_prog_f90_v" >&5
3403 + echo "${ECHO_T}$ac_cv_prog_f90_v" >&6
3404 + echo "$as_me:$LINENO: checking for Fortran 90 libraries" >&5
3405 + echo $ECHO_N "checking for Fortran 90 libraries... $ECHO_C" >&6
3406 + if test "${ac_cv_flibs+set}" = set; then
3407 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3408 + else
3409 +  if test "x$F90LIBS" != "x"; then
3410 +  ac_cv_f90libs="$F90LIBS" # Let the user override the test.
3411 + else
3412 +
3413 + ac_ext=f90
3414 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3415 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3416 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3417 +
3418 + cat >conftest.$ac_ext <<_ACEOF
3419 +
3420 + program main
3421 +
3422 +
3423 + end program main
3424 +
3425 + _ACEOF
3426 +
3427 + # Compile and link our simple test program by passing a flag (argument
3428 + # 1 to this macro) to the Fortran 90 compiler in order to get
3429 + # "verbose" output that we can then parse for the Fortran 90 linker
3430 + # flags.
3431 + ac_save_F90FLAGS=$F90FLAGS
3432 + F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v"
3433 +
3434 + (eval echo $as_me:3434: \"$ac_link\") >&5
3435 + ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
3436 + echo "$ac_f90_v_output" >&5
3437 + F90FLAGS=$ac_save_F90FLAGS
3438 +
3439 + rm -f conftest.*
3440 + ac_ext=f90
3441 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3442 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3443 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3444 +
3445 + # If we are using xlf then replace all the commas with spaces.
3446 + if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
3447 +  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
3448 + fi
3449 +
3450 + # If we are using Cray Fortran then delete quotes.
3451 + # Use "\"" instead of '"' for font-lock-mode.
3452 + # FIXME: a more general fix for quoted arguments with spaces?
3453 + if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
3454 +  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
3455 + fi
3456 +
3457 + ac_cv_f90libs=
3458 +
3459 + # Save positional arguments (if any)
3460 + ac_save_positional="$@"
3461 +
3462 + set X $ac_f90_v_output
3463 + while test $# != 1; do
3464 +  shift
3465 +  ac_arg=$1
3466 +  case $ac_arg in
3467 +        [\\/]*.a | ?:[\\/]*.a)
3468 +            ac_exists=false
3469 +  for ac_i in $ac_cv_f90libs; do
3470 +    if test x"$ac_arg" = x"$ac_i"; then
3471 +      ac_exists=true
3472 +      break
3473 +    fi
3474 +  done
3475 +
3476 +  if test x"$ac_exists" = xtrue; then
3477 +  :
3478 + else
3479 +  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3480 + fi
3481 +
3482 +          ;;
3483 +        -bI:*)
3484 +            ac_exists=false
3485 +  for ac_i in $ac_cv_f90libs; do
3486 +    if test x"$ac_arg" = x"$ac_i"; then
3487 +      ac_exists=true
3488 +      break
3489 +    fi
3490 +  done
3491 +
3492 +  if test x"$ac_exists" = xtrue; then
3493 +  :
3494 + else
3495 +  if test "$ac_compiler_gnu" = yes; then
3496 +  for ac_link_opt in $ac_arg; do
3497 +    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
3498 +  done
3499 + else
3500 +  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3501 + fi
3502 + fi
3503 +
3504 +          ;;
3505 +          # Ignore these flags.
3506 +        -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*)
3507 +          ;;
3508 +        -lkernel32)
3509 +          test x"$CYGWIN" != xyes && ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3510 +          ;;
3511 +        -[LRuY])
3512 +          # These flags, when seen by themselves, take an argument.
3513 +          # We remove the space between option and argument and re-iterate
3514 +          # unless we find an empty arg or a new option (starting with -)
3515 +          case $2 in
3516 +             "" | -*);;
3517 +             *)
3518 +                ac_arg="$ac_arg$2"
3519 +
3520 +                shift; shift
3521 +                set X $ac_arg "$@"
3522 +                ;;
3523 +          esac
3524 +          ;;
3525 +        -YP,*)
3526 +          for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
3527 +              ac_exists=false
3528 +  for ac_i in $ac_cv_f90libs; do
3529 +    if test x"$ac_j" = x"$ac_i"; then
3530 +      ac_exists=true
3531 +      break
3532 +    fi
3533 +  done
3534 +
3535 +  if test x"$ac_exists" = xtrue; then
3536 +  :
3537 + else
3538 +  ac_arg="$ac_arg $ac_j"
3539 +                             ac_cv_f90libs="$ac_cv_f90libs $ac_j"
3540 + fi
3541 +
3542 +          done
3543 +          ;;
3544 +        -[lLR]*)
3545 +            ac_exists=false
3546 +  for ac_i in $ac_cv_f90libs; do
3547 +    if test x"$ac_arg" = x"$ac_i"; then
3548 +      ac_exists=true
3549 +      break
3550 +    fi
3551 +  done
3552 +
3553 +  if test x"$ac_exists" = xtrue; then
3554 +  :
3555 + else
3556 +  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3557 + fi
3558 +
3559 +          ;;
3560 +          # Ignore everything else.
3561 +  esac
3562 + done
3563 + # restore positional arguments
3564 + set X $ac_save_positional; shift
3565 +
3566 + # We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
3567 + # then we insist that the "run path" must be an absolute path (i.e. it
3568 + # must begin with a "/").
3569 + case `(uname -sr) 2>/dev/null` in
3570 +   "SunOS 5"*)
3571 +      ac_ld_run_path=`echo $ac_f90_v_output |
3572 +                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
3573 +      test "x$ac_ld_run_path" != x &&
3574 +
3575 +        if test "$ac_compiler_gnu" = yes; then
3576 +  for ac_link_opt in $ac_ld_run_path; do
3577 +    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
3578 +  done
3579 + else
3580 +  ac_cv_f90libs="$ac_cv_f90libs $ac_ld_run_path"
3581 + fi
3582 +      ;;
3583 + esac
3584 + fi # test "x$F90LIBS" = "x"
3585 +
3586 + fi
3587 + echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5
3588 + echo "${ECHO_T}$ac_cv_flibs" >&6
3589 + F90LIBS="$ac_cv_f90libs"
3590 +
3591 + ac_ext=f90
3592 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3593 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3594 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3595 +
3596 +
3597 + echo "$as_me:$LINENO: checking for Fortran 90 name-mangling scheme" >&5
3598 + echo $ECHO_N "checking for Fortran 90 name-mangling scheme... $ECHO_C" >&6
3599 + if test "${ac_cv_f90_mangling+set}" = set; then
3600 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3601 + else
3602 +  ac_ext=f90
3603 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3604 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3605 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3606 + cat >conftest.$ac_ext <<_ACEOF
3607 + subroutine foobar()
3608 + return
3609 + end
3610 + subroutine foo_bar()
3611 + return
3612 + end
3613 + _ACEOF
3614 + rm -f conftest.$ac_objext
3615 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3616 +  (eval $ac_compile) 2>&5
3617 +  ac_status=$?
3618 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3619 +  (exit $ac_status); } &&
3620 +         { ac_try='test -s conftest.$ac_objext'
3621 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3622 +  (eval $ac_try) 2>&5
3623 +  ac_status=$?
3624 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3625 +  (exit $ac_status); }; }; then
3626 +  mv conftest.$ac_objext cf90_test.$ac_objext
3627 +
3628 +  ac_ext=c
3629 + ac_cpp='$CPP $CPPFLAGS'
3630 + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3631 + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3632 + ac_compiler_gnu=$ac_cv_c_compiler_gnu
3633 +
3634 +  ac_save_LIBS=$LIBS
3635 +  LIBS="cf90_test.$ac_objext $F90LIBS $LIBS"
3636 +
3637 +  ac_success=no
3638 +  for ac_foobar in foobar FOOBAR; do
3639 +    for ac_underscore in "" "_"; do
3640 +      ac_func="$ac_foobar$ac_underscore"
3641 +      cat >conftest.$ac_ext <<_ACEOF
3642 + #line $LINENO "configure"
3643 + /* confdefs.h.  */
3644 + _ACEOF
3645 + cat confdefs.h >>conftest.$ac_ext
3646 + cat >>conftest.$ac_ext <<_ACEOF
3647 + /* end confdefs.h.  */
3648 +
3649 + /* Override any gcc2 internal prototype to avoid an error.  */
3650 + #ifdef __cplusplus
3651 + extern "C"
3652 + #endif
3653 + /* We use char because int might match the return type of a gcc2
3654 +   builtin and then its argument prototype would still apply.  */
3655 + char $ac_func ();
3656 + int
3657 + main ()
3658 + {
3659 + $ac_func ();
3660 +  ;
3661 +  return 0;
3662 + }
3663 + _ACEOF
3664 + rm -f conftest.$ac_objext conftest$ac_exeext
3665 + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3666 +  (eval $ac_link) 2>&5
3667 +  ac_status=$?
3668 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3669 +  (exit $ac_status); } &&
3670 +         { ac_try='test -s conftest$ac_exeext'
3671 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3672 +  (eval $ac_try) 2>&5
3673 +  ac_status=$?
3674 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3675 +  (exit $ac_status); }; }; then
3676 +  ac_success=yes; break 2
3677 + else
3678 +  echo "$as_me: failed program was:" >&5
3679 + sed 's/^/| /' conftest.$ac_ext >&5
3680 +
3681 + fi
3682 + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3683 +    done
3684 +  done
3685 +
3686 +  if test "$ac_success" = "yes"; then
3687 +     case $ac_foobar in
3688 +        foobar)
3689 +           ac_case=lower
3690 +           ac_foo_bar=foo_bar
3691 +           ;;
3692 +        FOOBAR)
3693 +           ac_case=upper
3694 +           ac_foo_bar=FOO_BAR
3695 +           ;;
3696 +     esac
3697 +
3698 +     ac_success_extra=no
3699 +     for ac_extra in "" "_"; do
3700 +        ac_func="$ac_foo_bar$ac_underscore$ac_extra"
3701 +
3702 +        cat >conftest.$ac_ext <<_ACEOF
3703 + #line $LINENO "configure"
3704 + /* confdefs.h.  */
3705 + _ACEOF
3706 + cat confdefs.h >>conftest.$ac_ext
3707 + cat >>conftest.$ac_ext <<_ACEOF
3708 + /* end confdefs.h.  */
3709 +
3710 + /* Override any gcc2 internal prototype to avoid an error.  */
3711 + #ifdef __cplusplus
3712 + extern "C"
3713 + #endif
3714 + /* We use char because int might match the return type of a gcc2
3715 +   builtin and then its argument prototype would still apply.  */
3716 + char $ac_func ();
3717 + int
3718 + main ()
3719 + {
3720 + $ac_func ();
3721 +  ;
3722 +  return 0;
3723 + }
3724 + _ACEOF
3725 + rm -f conftest.$ac_objext conftest$ac_exeext
3726 + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3727 +  (eval $ac_link) 2>&5
3728 +  ac_status=$?
3729 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3730 +  (exit $ac_status); } &&
3731 +         { ac_try='test -s conftest$ac_exeext'
3732 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3733 +  (eval $ac_try) 2>&5
3734 +  ac_status=$?
3735 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3736 +  (exit $ac_status); }; }; then
3737 +  ac_success_extra=yes; break
3738 + else
3739 +  echo "$as_me: failed program was:" >&5
3740 + sed 's/^/| /' conftest.$ac_ext >&5
3741 +
3742 + fi
3743 + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3744 +     done
3745 +
3746 +     if test "$ac_success_extra" = "yes"; then
3747 +        ac_cv_f90_mangling="$ac_case case"
3748 +        if test -z "$ac_underscore"; then
3749 +           ac_cv_f90_mangling="$ac_cv_f90_mangling, no underscore"
3750 +        else
3751 +           ac_cv_f90_mangling="$ac_cv_f90_mangling, underscore"
3752 +
3753 +        fi
3754 +        if test -z "$ac_extra"; then
3755 +           ac_cv_f90_mangling="$ac_cv_f90_mangling, no extra underscore"
3756 +        else
3757 +           ac_cv_f90_mangling="$ac_cv_f90_mangling, extra underscore"
3758 +        fi
3759 +      else
3760 +        ac_cv_f90_mangling="unknown"
3761 +      fi
3762 +  else
3763 +     ac_cv_f90_mangling="unknown"
3764 +
3765 +  fi
3766 +
3767 +  LIBS=$ac_save_LIBS
3768 +  ac_ext=f90
3769 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3770 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3771 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3772 +  rm -f cf90_test* conftest*
3773 + else
3774 +  echo "$as_me: failed program was:" >&5
3775 + sed 's/^/| /' conftest.$ac_ext >&5
3776 +
3777 + fi
3778 + rm -f conftest.$ac_objext conftest.$ac_ext
3779 + ac_ext=f90
3780 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3781 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3782 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3783 +
3784 + fi
3785 + echo "$as_me:$LINENO: result: $ac_cv_f90_mangling" >&5
3786 + echo "${ECHO_T}$ac_cv_f90_mangling" >&6
3787 +
3788 +
3789 +
3790 + case $ac_cv_f90_mangling in
3791 +  "lower case, no underscore, no extra underscore")
3792 +          cat >>confdefs.h <<\_ACEOF
3793 + #define F90_FUNC(name,NAME) name
3794 + _ACEOF
3795 +
3796 +          cat >>confdefs.h <<\_ACEOF
3797 + #define F90_FUNC_(name,NAME) name
3798 + _ACEOF
3799 + ;;
3800 +  "lower case, no underscore, extra underscore")
3801 +          cat >>confdefs.h <<\_ACEOF
3802 + #define F90_FUNC(name,NAME) name
3803 + _ACEOF
3804 +
3805 +          cat >>confdefs.h <<\_ACEOF
3806 + #define F90_FUNC_(name,NAME) name ## _
3807 + _ACEOF
3808 + ;;
3809 +  "lower case, underscore, no extra underscore")
3810 +          cat >>confdefs.h <<\_ACEOF
3811 + #define F90_FUNC(name,NAME) name ## _
3812 + _ACEOF
3813 +
3814 +          cat >>confdefs.h <<\_ACEOF
3815 + #define F90_FUNC_(name,NAME) name ## _
3816 + _ACEOF
3817 + ;;
3818 +  "lower case, underscore, extra underscore")
3819 +          cat >>confdefs.h <<\_ACEOF
3820 + #define F90_FUNC(name,NAME) name ## _
3821 + _ACEOF
3822 +
3823 +          cat >>confdefs.h <<\_ACEOF
3824 + #define F90_FUNC_(name,NAME) name ## __
3825 + _ACEOF
3826 + ;;
3827 +  "upper case, no underscore, no extra underscore")
3828 +          cat >>confdefs.h <<\_ACEOF
3829 + #define F90_FUNC(name,NAME) NAME
3830 + _ACEOF
3831 +
3832 +          cat >>confdefs.h <<\_ACEOF
3833 + #define F90_FUNC_(name,NAME) NAME
3834 + _ACEOF
3835 + ;;
3836 +  "upper case, no underscore, extra underscore")
3837 +          cat >>confdefs.h <<\_ACEOF
3838 + #define F90_FUNC(name,NAME) NAME
3839 + _ACEOF
3840 +
3841 +          cat >>confdefs.h <<\_ACEOF
3842 + #define F90_FUNC_(name,NAME) NAME ## _
3843 + _ACEOF
3844 + ;;
3845 +  "upper case, underscore, no extra underscore")
3846 +          cat >>confdefs.h <<\_ACEOF
3847 + #define F90_FUNC(name,NAME) NAME ## _
3848 + _ACEOF
3849 +
3850 +          cat >>confdefs.h <<\_ACEOF
3851 + #define F90_FUNC_(name,NAME) NAME ## _
3852 + _ACEOF
3853 + ;;
3854 +  "upper case, underscore, extra underscore")
3855 +          cat >>confdefs.h <<\_ACEOF
3856 + #define F90_FUNC(name,NAME) NAME ## _
3857 + _ACEOF
3858 +
3859 +          cat >>confdefs.h <<\_ACEOF
3860 + #define F90_FUNC_(name,NAME) NAME ## __
3861 + _ACEOF
3862 + ;;
3863 +  *)
3864 +          { echo "$as_me:$LINENO: WARNING: unknown Fortran 90 name-mangling scheme" >&5
3865 + echo "$as_me: WARNING: unknown Fortran 90 name-mangling scheme" >&2;}
3866 +          ;;
3867 + esac
3868 +
3869 +
3870 +
3871 +
3872 +
3873 + echo "$as_me:$LINENO: checking for module suffix" >&5
3874 + echo $ECHO_N "checking for module suffix... $ECHO_C" >&6
3875 + rm -f conftest*
3876 + # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
3877 + rm -f work*
3878 + cat >conftest.f90 <<EOF
3879 +        module conftest
3880 +        integer n
3881 +        parameter (n=1)
3882 +        end module conftest
3883 + EOF
3884 + # SGI and absoft compilers generates module name in upper case!
3885 + testname="conftest"
3886 + modcase="lower"
3887 + if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
3888 +    MOD=`ls conftest* | grep -v conftest.f | grep -v conftest.o`
3889 +    MOD=`echo "$MOD" | sed -e 's/conftest\.//g'`
3890 +    if test -z "$MOD" ; then
3891 +        MOD=`ls CONFTEST* 2>/dev/null \
3892 +                | grep -v CONFTEST.f | grep -v CONFTEST.o`
3893 +        MOD=`echo "$MOD" | sed -e 's/CONFTEST\.//g'`
3894 +        if test -n "$MOD" ; then
3895 +            testname="CONFTEST"
3896 +            modcase="upper"
3897 +        fi
3898 +    fi
3899 +    if test -z "$MOD" ; then
3900 +        echo "$as_me:$LINENO: result: unknown" >&5
3901 + echo "${ECHO_T}unknown" >&6
3902 +        # Use mod if we can't figure it out
3903 +        MOD="mod"
3904 +    else
3905 +        echo "$as_me:$LINENO: result: $MOD" >&5
3906 + echo "${ECHO_T}$MOD" >&6
3907 +    fi
3908 +    if test -s work.pcl ; then
3909 +        { echo "$as_me:$LINENO: WARNING: Compiler generates auxillery files!" >&5
3910 + echo "$as_me: WARNING: Compiler generates auxillery files!" >&2;}
3911 +    fi
3912 + else
3913 +    echo "$as_me:$LINENO: result: unknown" >&5
3914 + echo "${ECHO_T}unknown" >&6
3915 + fi
3916 +
3917 +
3918 +
3919 +
3920 +
3921 + # Check for module include path (some use -I, some (Solaris) use -M, some
3922 + # (absoft) use -p).
3923 + # Intel compilers use a wierd system: -cl,filename.pcl .  If no file is
3924 + # specified, work.pcl and work.pc are created.  However, if you specify
3925 + # a file, it must contain a the name of a file ending in .pc .  Ugh!
3926 + # Use the module made above
3927 + echo "$as_me:$LINENO: checking for module directory path flag" >&5
3928 + echo $ECHO_N "checking for module directory path flag... $ECHO_C" >&6
3929 + rm -f conftest*
3930 + # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
3931 + rm -f work*
3932 + cat >conftest.f90 <<EOF
3933 +        module conftest
3934 +        integer n
3935 +        parameter (n=1)
3936 +        end module conftest
3937 + EOF
3938 + # SGI and absoft compilers generates module name in upper case!
3939 + testname="conftest"
3940 + if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
3941 +   mod=`ls CONFTEST* 2>/dev/null | grep -v CONFTEST.f | grep -v CONFTEST.o`
3942 +   mod=`echo "$mod" | sed -e 's/CONFTEST\.//g'`
3943 +   if test -n "$mod" ; then
3944 +      testname="CONFTEST"
3945 +   fi
3946 +   madedir=0
3947 +   if test ! -d conf ; then mkdir conf ; madedir=1; fi
3948 +   cp $testname.$MOD conf
3949 +   rm -f conftest* CONFTEST*
3950 +   cat >conftest1.f90 <<EOF
3951 +        program main
3952 +        use conftest
3953 +        print *, n
3954 +        end
3955 + EOF
3956 +   F90_WORK_FILES_ARG=""
3957 +   F90MODINCSPEC=""
3958 +   if $F90 -c -Iconf conftest1.f90 > conftest.out 2>&1 ; then
3959 +       MODDIRFLAG="-I"
3960 +       F90MODINCSPEC="-I<dir>"
3961 +       echo "$as_me:$LINENO: result: -I" >&5
3962 + echo "${ECHO_T}-I" >&6
3963 +   elif $F90 -c -Mconf conftest1.f90 >> conftest.out 2>&1 ; then
3964 +       MODDIRFLAG="-M"
3965 +       F90MODINCSPEC="-M<dir>"
3966 +       echo "$as_me:$LINENO: result: -M" >&5
3967 + echo "${ECHO_T}-M" >&6
3968 +   elif $F90 -c -pconf conftest1.f90 >> conftest.out 2>&1 ; then
3969 +       MODDIRFLAG="-p"
3970 +       F90MODINCSPEC="-p<dir>"
3971 +       echo "$as_me:$LINENO: result: -p" >&5
3972 + echo "${ECHO_T}-p" >&6
3973 +   elif test -s work.pc ; then
3974 +        cp work.pc conf/mpimod.pc
3975 +        echo "mpimod.pc" > conf/mpimod.pcl
3976 +        echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl
3977 +        if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then
3978 +            MODDIRFLAG='-cl,mpimod.pcl'
3979 +            echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and directories" >&5
3980 + echo "${ECHO_T}-cl,filename where filename contains a list of files and directories" >&6
3981 +            F90_WORK_FILES_ARG="-cl,mpimod.pcl"
3982 +            F90MODINCSPEC="-cl,<dir>/<file>mod.pcl"
3983 +
3984 +        else
3985 +            # The version of the Intel compiler that I have refuses to let
3986 +            # you put the "work catalog" list anywhere but the current
3987 +            # directory. For example, you cannot in
3988 +         :
3989 +        fi
3990 +   fi
3991 +   if test -z "MODDIRFLAG" ; then
3992 +       echo "$as_me:$LINENO: result: unknown" >&5
3993 + echo "${ECHO_T}unknown" >&6
3994 +   fi
3995 +
3996 +
3997 +   rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod*
3998 +   if test $madedir = 1 ; then rmdir conf ; fi
3999 + fi
4000 +
4001 +
4002 +
4003 +
4004   case $debug in
4005    1)
4006       ;;
# Line 4107 | Line 4867 | if test x"$F90FLAGS" == x ; then
4867   # Try to determine "good" native compiler flags if none specified on command
4868   # line
4869  
4870 < if test x"$F90FLAGS" == x ; then
4870 > if test x"$F90FLAGS" = x ; then
4871    F90FLAGS=""
4872    case "${host_cpu}-${host_os}" in
4873  
# Line 4187 | Line 4947 | ac_ext=c
4947          ac_guessed_f90flags=no
4948   fi
4949   rm -f conftest*
4950 < ac_ext=c
4951 < ac_cpp='$CPP $CPPFLAGS'
4952 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4953 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4194 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
4950 > ac_ext=f90
4951 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4952 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4953 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4954  
4955  
4956   fi
# Line 4458 | Line 5217 | test -n "$YACC" || YACC="yacc"
5217   done
5218   test -n "$YACC" || YACC="yacc"
5219  
4461
5220   for ac_prog in flex lex
5221   do
5222    # Extract the first word of "$ac_prog", so it can be a program name with args.
# Line 4510 | Line 5268 | cat >conftest.$ac_ext <<_ACEOF
5268    ac_check_lib_save_LIBS=$LIBS
5269   LIBS="-lfl  $LIBS"
5270   cat >conftest.$ac_ext <<_ACEOF
5271 < #line $LINENO "configure"
5272 < /* confdefs.h.  */
4515 < _ACEOF
4516 < cat confdefs.h >>conftest.$ac_ext
4517 < cat >>conftest.$ac_ext <<_ACEOF
4518 < /* end confdefs.h.  */
5271 >
5272 > program main
5273  
5274 < /* Override any gcc2 internal prototype to avoid an error.  */
5275 < #ifdef __cplusplus
5276 < extern "C"
4523 < #endif
4524 < /* We use char because int might match the return type of a gcc2
4525 <   builtin and then its argument prototype would still apply.  */
4526 < char yywrap ();
4527 < int
4528 < main ()
4529 < {
4530 < yywrap ();
4531 <  ;
4532 <  return 0;
4533 < }
5274 > call yywrap
5275 > end program main
5276 >
5277   _ACEOF
5278   rm -f conftest.$ac_objext conftest$ac_exeext
5279   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 4567 | Line 5310 | cat >conftest.$ac_ext <<_ACEOF
5310    ac_check_lib_save_LIBS=$LIBS
5311   LIBS="-ll  $LIBS"
5312   cat >conftest.$ac_ext <<_ACEOF
4570 #line $LINENO "configure"
4571 /* confdefs.h.  */
4572 _ACEOF
4573 cat confdefs.h >>conftest.$ac_ext
4574 cat >>conftest.$ac_ext <<_ACEOF
4575 /* end confdefs.h.  */
5313  
5314 < /* Override any gcc2 internal prototype to avoid an error.  */
5315 < #ifdef __cplusplus
5316 < extern "C"
5317 < #endif
5318 < /* We use char because int might match the return type of a gcc2
4582 <   builtin and then its argument prototype would still apply.  */
4583 < char yywrap ();
4584 < int
4585 < main ()
4586 < {
4587 < yywrap ();
4588 <  ;
4589 <  return 0;
4590 < }
5314 > program main
5315 >
5316 > call yywrap
5317 > end program main
5318 >
5319   _ACEOF
5320   rm -f conftest.$ac_objext conftest$ac_exeext
5321   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 4799 | Line 5527 | ac_ext=f90
5527    exit 1
5528   fi
5529  
5530 < ac_ext=f90
5531 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4804 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4805 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5530 > echo "$as_me:$LINENO: checking for mpi-directory" >&5
5531 > echo $ECHO_N "checking for mpi-directory... $ECHO_C" >&6
5532  
5533 + # Check whether --with-mpi_dir or --without-mpi_dir was given.
5534 + if test "${with_mpi_dir+set}" = set; then
5535 +  withval="$with_mpi_dir"
5536 +  MPI_DIR="$withval"
5537 + else
5538 +  MPI_DIR="/usr/local"
5539 + fi;
5540 + echo "$as_me:$LINENO: result: $MPI_DIR" >&5
5541 + echo "${ECHO_T}$MPI_DIR" >&6
5542  
5543  
5544 < ac_ext=f90
5545 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5546 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5547 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5548 < echo "$as_me:$LINENO: checking how to get verbose linking output from $F90" >&5
5549 < echo $ECHO_N "checking how to get verbose linking output from $F90... $ECHO_C" >&6
5550 < if test "${ac_cv_prog_f90_v+set}" = set; then
4816 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5544 > echo "$as_me:$LINENO: checking for mpi-lib-directory" >&5
5545 > echo $ECHO_N "checking for mpi-lib-directory... $ECHO_C" >&6
5546 >
5547 > # Check whether --with-mpi_libdir or --without-mpi_libdir was given.
5548 > if test "${with_mpi_libdir+set}" = set; then
5549 >  withval="$with_mpi_libdir"
5550 >  MPI_LIBDIR="$withval"
5551   else
5552 +  MPI_LIBDIR="$MPI_DIR/lib"
5553 + fi;
5554 + echo "$as_me:$LINENO: result: $MPI_LIBDIR" >&5
5555 + echo "${ECHO_T}$MPI_LIBDIR" >&6
5556  
4819 cat >conftest.$ac_ext <<_ACEOF
5557  
5558 < program main
5558 > echo "$as_me:$LINENO: checking for mpi-inc-directory" >&5
5559 > echo $ECHO_N "checking for mpi-inc-directory... $ECHO_C" >&6
5560  
5561 + # Check whether --with-mpi_inc or --without-mpi_inc was given.
5562 + if test "${with_mpi_inc+set}" = set; then
5563 +  withval="$with_mpi_inc"
5564 +  MPI_INC="$withval"
5565 + else
5566 +  MPI_INC="$MPI_DIR/include"
5567 + fi;
5568 + echo "$as_me:$LINENO: result: $MPI_INC" >&5
5569 + echo "${ECHO_T}$MPI_INC" >&6
5570  
4824 end program main
5571  
5572 < _ACEOF
5573 < rm -f conftest.$ac_objext
5574 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5575 <  (eval $ac_compile) 2>&5
5576 <  ac_status=$?
5577 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578 <  (exit $ac_status); } &&
5579 <         { ac_try='test -s conftest.$ac_objext'
5580 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5581 <  (eval $ac_try) 2>&5
5582 <  ac_status=$?
5583 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5584 <  (exit $ac_status); }; }; then
5585 <  ac_cv_prog_f90_v=
5586 < # Try some options frequently used verbose output
5587 < for ac_verb in -v -verbose --verbose -V -\#\#\#; do
5588 <  ac_ext=f90
5589 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5590 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5591 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5572 >
5573 > echo "$as_me:$LINENO: checking for MPI library" >&5
5574 > echo $ECHO_N "checking for MPI library... $ECHO_C" >&6
5575 > MPI_LIB=""
5576 > case "$host" in
5577 >  *-ibm-aix*)
5578 >    echo "$as_me:$LINENO: checking whether to use signal-based MPI library" >&5
5579 > echo $ECHO_N "checking whether to use signal-based MPI library... $ECHO_C" >&6
5580 >    echo "$as_me:$LINENO: result: $PACX_SIGNAL" >&5
5581 > echo "${ECHO_T}$PACX_SIGNAL" >&6
5582 >    if test "x$PACX_SIGNAL" = "xyes" ; then
5583 >      if test -f "$MPI_LIBDIR/libmpi.a" ; then
5584 >        MPI_LIB="-lmpi"
5585 >      elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5586 >        MPI_LIB="-lmpi"
5587 >      elif test -f "$MPI_LIBDIR/libmpich.a" ; then
5588 >        MPI_LIB="-lmpich"
5589 >      else
5590 >        { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5
5591 > echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;}
5592 >   { (exit 1); exit 1; }; }
5593 >      fi
5594 >    else
5595 >      if test -f "$MPI_LIBDIR/libmpi_r.a" ; then
5596 >         MPI_LIB="-lmpi_r"
5597 >      else
5598 >         { { echo "$as_me:$LINENO: error: libmpi_r not found; check path for MPI package..." >&5
5599 > echo "$as_me: error: libmpi_r not found; check path for MPI package..." >&2;}
5600 >   { (exit 1); exit 1; }; }
5601 >      fi
5602 >    fi
5603 >    echo "$as_me:$LINENO: result: found $MPI_LIB" >&5
5604 > echo "${ECHO_T}found $MPI_LIB" >&6
5605 >  ;;
5606 >  *)                             if test -f "$MPI_LIBDIR/libmpich.a" ; then
5607 >      MPI_LIB="-lmpich"
5608 >    elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5609 >      MPI_LIB="-lmpi"
5610 >    elif test -f "$MPI_LIBDIR/libmpi.a" ; then
5611 >      MPI_LIB="-lmpi"
5612 >    else
5613 >      { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5
5614 > echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;}
5615 >   { (exit 1); exit 1; }; }
5616 >    fi
5617 >    echo "$as_me:$LINENO: result: found $MPI_LIB" >&5
5618 > echo "${ECHO_T}found $MPI_LIB" >&6
5619 >  ;;
5620 > esac
5621  
4847 cat >conftest.$ac_ext <<_ACEOF
5622  
4849 program main
5623  
5624  
4852 end program main
5625  
4854 _ACEOF
5626  
4856 # Compile and link our simple test program by passing a flag (argument
4857 # 1 to this macro) to the Fortran 90 compiler in order to get
4858 # "verbose" output that we can then parse for the Fortran 90 linker
4859 # flags.
4860 ac_save_F90FLAGS=$F90FLAGS
4861 F90FLAGS="$F90FLAGS $ac_verb"
5627  
5628 < (eval echo $as_me:4863: \"$ac_link\") >&5
5629 < ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
5630 < echo "$ac_f90_v_output" >&5
5631 < F90FLAGS=$ac_save_F90FLAGS
5628 >        for ac_prog in mpif90 hf90 mpxlf90 mpf90 mpxlf95 mpxlf_r
5629 > do
5630 >  # Extract the first word of "$ac_prog", so it can be a program name with args.
5631 > set dummy $ac_prog; ac_word=$2
5632 > echo "$as_me:$LINENO: checking for $ac_word" >&5
5633 > echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5634 > if test "${ac_cv_prog_MPIF90+set}" = set; then
5635 >  echo $ECHO_N "(cached) $ECHO_C" >&6
5636 > else
5637 >  if test -n "$MPIF90"; then
5638 >  ac_cv_prog_MPIF90="$MPIF90" # Let the user override the test.
5639 > else
5640 > as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5641 > for as_dir in $PATH
5642 > do
5643 >  IFS=$as_save_IFS
5644 >  test -z "$as_dir" && as_dir=.
5645 >  for ac_exec_ext in '' $ac_executable_extensions; do
5646 >  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5647 >    ac_cv_prog_MPIF90="$ac_prog"
5648 >    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5649 >    break 2
5650 >  fi
5651 > done
5652 > done
5653  
4868 rm -f conftest.*
4869 ac_ext=f90
4870 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4871 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4872 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4873
4874 # If we are using xlf then replace all the commas with spaces.
4875 if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
4876  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
5654   fi
4878
4879 # If we are using Cray Fortran then delete quotes.
4880 # Use "\"" instead of '"' for font-lock-mode.
4881 # FIXME: a more general fix for quoted arguments with spaces?
4882 if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
4883  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
5655   fi
5656 <  # look for -l* and *.a constructs in the output
5657 <  for ac_arg in $ac_f90_v_output; do
5658 <     case $ac_arg in
5659 <        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
4889 <          ac_cv_prog_f90_v=$ac_verb
4890 <          break 2 ;;
4891 <     esac
4892 <  done
4893 < done
4894 < if test -z "$ac_cv_prog_f90_v"; then
4895 <   { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F90" >&5
4896 < echo "$as_me: WARNING: cannot determine how to obtain linking information from $F90" >&2;}
4897 < fi
5656 > MPIF90=$ac_cv_prog_MPIF90
5657 > if test -n "$MPIF90"; then
5658 >  echo "$as_me:$LINENO: result: $MPIF90" >&5
5659 > echo "${ECHO_T}$MPIF90" >&6
5660   else
5661 <  echo "$as_me: failed program was:" >&5
5662 < sed 's/^/| /' conftest.$ac_ext >&5
4901 <
4902 < { echo "$as_me:$LINENO: WARNING: compilation failed" >&5
4903 < echo "$as_me: WARNING: compilation failed" >&2;}
5661 >  echo "$as_me:$LINENO: result: no" >&5
5662 > echo "${ECHO_T}no" >&6
5663   fi
4905 rm -f conftest.$ac_objext conftest.$ac_ext
5664  
5665 < fi
5666 < echo "$as_me:$LINENO: result: $ac_cv_prog_f90_v" >&5
5667 < echo "${ECHO_T}$ac_cv_prog_f90_v" >&6
4910 < echo "$as_me:$LINENO: checking for Fortran 90 libraries" >&5
4911 < echo $ECHO_N "checking for Fortran 90 libraries... $ECHO_C" >&6
4912 < if test "${ac_cv_flibs+set}" = set; then
4913 <  echo $ECHO_N "(cached) $ECHO_C" >&6
4914 < else
4915 <  if test "x$F90LIBS" != "x"; then
4916 <  ac_cv_f90libs="$F90LIBS" # Let the user override the test.
4917 < else
5665 >  test -n "$MPIF90" && break
5666 > done
5667 > test -n "$MPIF90" || MPIF90="$F90"
5668  
5669 < ac_ext=f90
5670 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4921 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4922 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5669 >        acx_mpi_save_F90="$F90"
5670 >        F90="$MPIF90"
5671  
4924 cat >conftest.$ac_ext <<_ACEOF
5672  
4926 program main
5673  
5674 + if test x = x"$MPILIBS"; then
5675 +        echo "$as_me:$LINENO: checking for MPI_Init" >&5
5676 + echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6
5677 +                        cat >conftest.$ac_ext <<_ACEOF
5678  
5679 + program main
5680 +
5681 +      call MPI_Init
5682   end program main
5683  
5684   _ACEOF
5685 <
5686 < # Compile and link our simple test program by passing a flag (argument
5687 < # 1 to this macro) to the Fortran 90 compiler in order to get
4935 < # "verbose" output that we can then parse for the Fortran 90 linker
4936 < # flags.
4937 < ac_save_F90FLAGS=$F90FLAGS
4938 < F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v"
4939 <
4940 < (eval echo $as_me:4940: \"$ac_link\") >&5
4941 < ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
4942 < echo "$ac_f90_v_output" >&5
4943 < F90FLAGS=$ac_save_F90FLAGS
4944 <
4945 < rm -f conftest.*
4946 < ac_ext=f90
4947 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4948 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4949 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4950 <
4951 < # If we are using xlf then replace all the commas with spaces.
4952 < if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
4953 <  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
4954 < fi
4955 <
4956 < # If we are using Cray Fortran then delete quotes.
4957 < # Use "\"" instead of '"' for font-lock-mode.
4958 < # FIXME: a more general fix for quoted arguments with spaces?
4959 < if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
4960 <  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
4961 < fi
4962 <
4963 < ac_cv_f90libs=
4964 <
4965 < # Save positional arguments (if any)
4966 < ac_save_positional="$@"
4967 <
4968 < set X $ac_f90_v_output
4969 < while test $# != 1; do
4970 <  shift
4971 <  ac_arg=$1
4972 <  case $ac_arg in
4973 <        [\\/]*.a | ?:[\\/]*.a)
4974 <            ac_exists=false
4975 <  for ac_i in $ac_cv_f90libs; do
4976 <    if test x"$ac_arg" = x"$ac_i"; then
4977 <      ac_exists=true
4978 <      break
4979 <    fi
4980 <  done
4981 <
4982 <  if test x"$ac_exists" = xtrue; then
4983 <  :
4984 < else
4985 <  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
4986 < fi
4987 <
4988 <          ;;
4989 <        -bI:*)
4990 <            ac_exists=false
4991 <  for ac_i in $ac_cv_f90libs; do
4992 <    if test x"$ac_arg" = x"$ac_i"; then
4993 <      ac_exists=true
4994 <      break
4995 <    fi
4996 <  done
4997 <
4998 <  if test x"$ac_exists" = xtrue; then
4999 <  :
5000 < else
5001 <  if test "$ac_compiler_gnu" = yes; then
5002 <  for ac_link_opt in $ac_arg; do
5003 <    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
5004 <  done
5005 < else
5006 <  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5007 < fi
5008 < fi
5009 <
5010 <          ;;
5011 <          # Ignore these flags.
5012 <        -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*)
5013 <          ;;
5014 <        -lkernel32)
5015 <          test x"$CYGWIN" != xyes && ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5016 <          ;;
5017 <        -[LRuY])
5018 <          # These flags, when seen by themselves, take an argument.
5019 <          # We remove the space between option and argument and re-iterate
5020 <          # unless we find an empty arg or a new option (starting with -)
5021 <          case $2 in
5022 <             "" | -*);;
5023 <             *)
5024 <                ac_arg="$ac_arg$2"
5025 <
5026 <                shift; shift
5027 <                set X $ac_arg "$@"
5028 <                ;;
5029 <          esac
5030 <          ;;
5031 <        -YP,*)
5032 <          for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
5033 <              ac_exists=false
5034 <  for ac_i in $ac_cv_f90libs; do
5035 <    if test x"$ac_j" = x"$ac_i"; then
5036 <      ac_exists=true
5037 <      break
5038 <    fi
5039 <  done
5040 <
5041 <  if test x"$ac_exists" = xtrue; then
5042 <  :
5043 < else
5044 <  ac_arg="$ac_arg $ac_j"
5045 <                             ac_cv_f90libs="$ac_cv_f90libs $ac_j"
5046 < fi
5047 <
5048 <          done
5049 <          ;;
5050 <        -[lLR]*)
5051 <            ac_exists=false
5052 <  for ac_i in $ac_cv_f90libs; do
5053 <    if test x"$ac_arg" = x"$ac_i"; then
5054 <      ac_exists=true
5055 <      break
5056 <    fi
5057 <  done
5058 <
5059 <  if test x"$ac_exists" = xtrue; then
5060 <  :
5061 < else
5062 <  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5063 < fi
5064 <
5065 <          ;;
5066 <          # Ignore everything else.
5067 <  esac
5068 < done
5069 < # restore positional arguments
5070 < set X $ac_save_positional; shift
5071 <
5072 < # We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
5073 < # then we insist that the "run path" must be an absolute path (i.e. it
5074 < # must begin with a "/").
5075 < case `(uname -sr) 2>/dev/null` in
5076 <   "SunOS 5"*)
5077 <      ac_ld_run_path=`echo $ac_f90_v_output |
5078 <                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
5079 <      test "x$ac_ld_run_path" != x &&
5080 <
5081 <        if test "$ac_compiler_gnu" = yes; then
5082 <  for ac_link_opt in $ac_ld_run_path; do
5083 <    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
5084 <  done
5085 < else
5086 <  ac_cv_f90libs="$ac_cv_f90libs $ac_ld_run_path"
5087 < fi
5088 <      ;;
5089 < esac
5090 < fi # test "x$F90LIBS" = "x"
5091 <
5092 < fi
5093 < echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5
5094 < echo "${ECHO_T}$ac_cv_flibs" >&6
5095 < F90LIBS="$ac_cv_f90libs"
5096 <
5097 < ac_ext=f90
5098 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5099 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5100 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5101 <
5102 < echo "$as_me:$LINENO: checking for Fortran 90 name-mangling scheme" >&5
5103 < echo $ECHO_N "checking for Fortran 90 name-mangling scheme... $ECHO_C" >&6
5104 < if test "${ac_cv_f90_mangling+set}" = set; then
5105 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5106 < else
5107 <  ac_ext=f90
5108 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5109 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5110 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5111 < cat >conftest.$ac_ext <<_ACEOF
5112 < subroutine foobar()
5113 < return
5114 < end
5115 < subroutine foo_bar()
5116 < return
5117 < end
5118 < _ACEOF
5119 < rm -f conftest.$ac_objext
5120 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5121 <  (eval $ac_compile) 2>&5
5685 > rm -f conftest.$ac_objext conftest$ac_exeext
5686 > if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5687 >  (eval $ac_link) 2>&5
5688    ac_status=$?
5689    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5690    (exit $ac_status); } &&
5691 <         { ac_try='test -s conftest.$ac_objext'
5691 >         { ac_try='test -s conftest$ac_exeext'
5692    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5693    (eval $ac_try) 2>&5
5694    ac_status=$?
5695    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696    (exit $ac_status); }; }; then
5697 <  mv conftest.$ac_objext cf90_test.$ac_objext
5697 >  MPILIBS=" "
5698 >                                echo "$as_me:$LINENO: result: yes" >&5
5699 > echo "${ECHO_T}yes" >&6
5700 > else
5701 >  echo "$as_me: failed program was:" >&5
5702 > sed 's/^/| /' conftest.$ac_ext >&5
5703  
5704 <  ac_ext=c
5705 < ac_cpp='$CPP $CPPFLAGS'
5706 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5707 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5708 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
5704 > echo "$as_me:$LINENO: result: no" >&5
5705 > echo "${ECHO_T}no" >&6
5706 > fi
5707 > rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5708 > fi
5709 > if test x = x"$MPILIBS"; then
5710 >        echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5711 > echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
5712 > if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
5713 >  echo $ECHO_N "(cached) $ECHO_C" >&6
5714 > else
5715 >  ac_check_lib_save_LIBS=$LIBS
5716 > LIBS="-lmpi  $LIBS"
5717 > cat >conftest.$ac_ext <<_ACEOF
5718  
5719 <  ac_save_LIBS=$LIBS
5140 <  LIBS="cf90_test.$ac_objext $F90LIBS $LIBS"
5719 > program main
5720  
5721 <  ac_success=no
5722 <  for ac_foobar in foobar FOOBAR; do
5144 <    for ac_underscore in "" "_"; do
5145 <      ac_func="$ac_foobar$ac_underscore"
5146 <      cat >conftest.$ac_ext <<_ACEOF
5147 < #line $LINENO "configure"
5148 < /* confdefs.h.  */
5149 < _ACEOF
5150 < cat confdefs.h >>conftest.$ac_ext
5151 < cat >>conftest.$ac_ext <<_ACEOF
5152 < /* end confdefs.h.  */
5721 > call MPI_Init
5722 > end program main
5723  
5154 /* Override any gcc2 internal prototype to avoid an error.  */
5155 #ifdef __cplusplus
5156 extern "C"
5157 #endif
5158 /* We use char because int might match the return type of a gcc2
5159   builtin and then its argument prototype would still apply.  */
5160 char $ac_func ();
5161 int
5162 main ()
5163 {
5164 $ac_func ();
5165  ;
5166  return 0;
5167 }
5724   _ACEOF
5725   rm -f conftest.$ac_objext conftest$ac_exeext
5726   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 5178 | Line 5734 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5734    ac_status=$?
5735    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5736    (exit $ac_status); }; }; then
5737 <  ac_success=yes; break 2
5737 >  ac_cv_lib_mpi_MPI_Init=yes
5738   else
5739    echo "$as_me: failed program was:" >&5
5740   sed 's/^/| /' conftest.$ac_ext >&5
5741  
5742 + ac_cv_lib_mpi_MPI_Init=no
5743   fi
5744   rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5745 <    done
5746 <  done
5745 > LIBS=$ac_check_lib_save_LIBS
5746 > fi
5747 > echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5748 > echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5749 > if test $ac_cv_lib_mpi_MPI_Init = yes; then
5750 >  MPILIBS="-lmpi"
5751 > fi
5752  
5753 <  if test "$ac_success" = "yes"; then
5754 <     case $ac_foobar in
5755 <        foobar)
5756 <           ac_case=lower
5757 <           ac_foo_bar=foo_bar
5758 <           ;;
5759 <        FOOBAR)
5760 <           ac_case=upper
5761 <           ac_foo_bar=FOO_BAR
5762 <           ;;
5201 <     esac
5753 > fi
5754 > if test x = x"$MPILIBS"; then
5755 >        echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
5756 > echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
5757 > if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
5758 >  echo $ECHO_N "(cached) $ECHO_C" >&6
5759 > else
5760 >  ac_check_lib_save_LIBS=$LIBS
5761 > LIBS="-lmpich  $LIBS"
5762 > cat >conftest.$ac_ext <<_ACEOF
5763  
5764 <     ac_success_extra=no
5204 <     for ac_extra in "" "_"; do
5205 <        ac_func="$ac_foo_bar$ac_underscore$ac_extra"
5764 > program main
5765  
5766 <        cat >conftest.$ac_ext <<_ACEOF
5767 < #line $LINENO "configure"
5209 < /* confdefs.h.  */
5210 < _ACEOF
5211 < cat confdefs.h >>conftest.$ac_ext
5212 < cat >>conftest.$ac_ext <<_ACEOF
5213 < /* end confdefs.h.  */
5766 > call MPI_Init
5767 > end program main
5768  
5215 /* Override any gcc2 internal prototype to avoid an error.  */
5216 #ifdef __cplusplus
5217 extern "C"
5218 #endif
5219 /* We use char because int might match the return type of a gcc2
5220   builtin and then its argument prototype would still apply.  */
5221 char $ac_func ();
5222 int
5223 main ()
5224 {
5225 $ac_func ();
5226  ;
5227  return 0;
5228 }
5769   _ACEOF
5770   rm -f conftest.$ac_objext conftest$ac_exeext
5771   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 5239 | Line 5779 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5779    ac_status=$?
5780    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5781    (exit $ac_status); }; }; then
5782 <  ac_success_extra=yes; break
5782 >  ac_cv_lib_mpich_MPI_Init=yes
5783   else
5784    echo "$as_me: failed program was:" >&5
5785   sed 's/^/| /' conftest.$ac_ext >&5
5786  
5787 + ac_cv_lib_mpich_MPI_Init=no
5788   fi
5789   rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5790 <     done
5790 > LIBS=$ac_check_lib_save_LIBS
5791 > fi
5792 > echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
5793 > echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
5794 > if test $ac_cv_lib_mpich_MPI_Init = yes; then
5795 >  MPILIBS="-lmpich"
5796 > fi
5797  
5798 <     if test "$ac_success_extra" = "yes"; then
5252 <        ac_cv_f90_mangling="$ac_case case"
5253 <        if test -z "$ac_underscore"; then
5254 <           ac_cv_f90_mangling="$ac_cv_f90_mangling, no underscore"
5255 <        else
5256 <           ac_cv_f90_mangling="$ac_cv_f90_mangling, underscore"
5798 > fi
5799  
5258        fi
5259        if test -z "$ac_extra"; then
5260           ac_cv_f90_mangling="$ac_cv_f90_mangling, no extra underscore"
5261        else
5262           ac_cv_f90_mangling="$ac_cv_f90_mangling, extra underscore"
5263        fi
5264      else
5265        ac_cv_f90_mangling="unknown"
5266      fi
5267  else
5268     ac_cv_f90_mangling="unknown"
5800  
5270  fi
5801  
5802 <  LIBS=$ac_save_LIBS
5273 <  ac_ext=f90
5274 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5275 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5276 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5277 <  rm -f cf90_test* conftest*
5278 < else
5279 <  echo "$as_me: failed program was:" >&5
5280 < sed 's/^/| /' conftest.$ac_ext >&5
5802 > F90="$acx_mpi_save_F90"
5803  
5282 fi
5283 rm -f conftest.$ac_objext conftest.$ac_ext
5284 ac_ext=f90
5285 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5286 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5287 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5804  
5289 fi
5290 echo "$as_me:$LINENO: result: $ac_cv_f90_mangling" >&5
5291 echo "${ECHO_T}$ac_cv_f90_mangling" >&6
5805  
5806 + # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
5807 + if test x = x"$MPILIBS"; then
5808  
5809 +        :
5810 + else
5811  
5812 < case $ac_cv_f90_mangling in
5813 <  "lower case, no underscore, no extra underscore")
5297 <          cat >>confdefs.h <<\_ACEOF
5298 < #define F90_FUNC(name,NAME) name
5812 > cat >>confdefs.h <<\_ACEOF
5813 > #define HAVE_MPI 1
5814   _ACEOF
5815  
5816 <          cat >>confdefs.h <<\_ACEOF
5817 < #define F90_FUNC_(name,NAME) name
5303 < _ACEOF
5304 < ;;
5305 <  "lower case, no underscore, extra underscore")
5306 <          cat >>confdefs.h <<\_ACEOF
5307 < #define F90_FUNC(name,NAME) name
5308 < _ACEOF
5816 >        :
5817 > fi
5818  
5310          cat >>confdefs.h <<\_ACEOF
5311 #define F90_FUNC_(name,NAME) name ## _
5312 _ACEOF
5313 ;;
5314  "lower case, underscore, no extra underscore")
5315          cat >>confdefs.h <<\_ACEOF
5316 #define F90_FUNC(name,NAME) name ## _
5317 _ACEOF
5819  
5319          cat >>confdefs.h <<\_ACEOF
5320 #define F90_FUNC_(name,NAME) name ## _
5321 _ACEOF
5322 ;;
5323  "lower case, underscore, extra underscore")
5324          cat >>confdefs.h <<\_ACEOF
5325 #define F90_FUNC(name,NAME) name ## _
5326 _ACEOF
5820  
5328          cat >>confdefs.h <<\_ACEOF
5329 #define F90_FUNC_(name,NAME) name ## __
5330 _ACEOF
5331 ;;
5332  "upper case, no underscore, no extra underscore")
5333          cat >>confdefs.h <<\_ACEOF
5334 #define F90_FUNC(name,NAME) NAME
5335 _ACEOF
5821  
5337          cat >>confdefs.h <<\_ACEOF
5338 #define F90_FUNC_(name,NAME) NAME
5339 _ACEOF
5340 ;;
5341  "upper case, no underscore, extra underscore")
5342          cat >>confdefs.h <<\_ACEOF
5343 #define F90_FUNC(name,NAME) NAME
5344 _ACEOF
5822  
5823 <          cat >>confdefs.h <<\_ACEOF
5824 < #define F90_FUNC_(name,NAME) NAME ## _
5825 < _ACEOF
5826 < ;;
5827 <  "upper case, underscore, no extra underscore")
5828 <          cat >>confdefs.h <<\_ACEOF
5829 < #define F90_FUNC(name,NAME) NAME ## _
5353 < _ACEOF
5823 > # Check whether --with-mpi_f90_mods or --without-mpi_f90_mods was given.
5824 > if test "${with_mpi_f90_mods+set}" = set; then
5825 >  withval="$with_mpi_f90_mods"
5826 >  mpi_f90_mods="$withval"
5827 > else
5828 >  mpi_f90_mods="/usr/local/include/f90choice"
5829 > fi;
5830  
5831 <          cat >>confdefs.h <<\_ACEOF
5832 < #define F90_FUNC_(name,NAME) NAME ## _
5357 < _ACEOF
5358 < ;;
5359 <  "upper case, underscore, extra underscore")
5360 <          cat >>confdefs.h <<\_ACEOF
5361 < #define F90_FUNC(name,NAME) NAME ## _
5362 < _ACEOF
5831 >  echo "$as_me:$LINENO: checking for MPI F90 modules" >&5
5832 > echo $ECHO_N "checking for MPI F90 modules... $ECHO_C" >&6
5833  
5364          cat >>confdefs.h <<\_ACEOF
5365 #define F90_FUNC_(name,NAME) NAME ## __
5366 _ACEOF
5367 ;;
5368  *)
5369          { echo "$as_me:$LINENO: WARNING: unknown Fortran 90 name-mangling scheme" >&5
5370 echo "$as_me: WARNING: unknown Fortran 90 name-mangling scheme" >&2;}
5371          ;;
5372 esac
5834  
5835 +  ac_ext=f90
5836 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5837 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5838 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5839  
5840 +  ac_save_F90FLAGS=$F90FLAGS
5841  
5842 +  if test "$mpi_f90_mods"; then
5843 +  F90FLAGS="${F90FLAGS} ${MODDIRFLAG}${mpi_f90_mods}"
5844 + fi
5845  
5846 < echo "$as_me:$LINENO: checking for mpi-directory" >&5
5378 < echo $ECHO_N "checking for mpi-directory... $ECHO_C" >&6
5846 >    cat >conftest.$ac_ext <<_ACEOF
5847  
5380 # Check whether --with-mpi_dir or --without-mpi_dir was given.
5381 if test "${with_mpi_dir+set}" = set; then
5382  withval="$with_mpi_dir"
5383  MPI_DIR="$withval"
5384 else
5385  MPI_DIR="/usr/local"
5386 fi;
5387 echo "$as_me:$LINENO: result: $MPI_DIR" >&5
5388 echo "${ECHO_T}$MPI_DIR" >&6
5848  
5849 + program main
5850  
5851 < echo "$as_me:$LINENO: checking for mpi-lib-directory" >&5
5852 < echo $ECHO_N "checking for mpi-lib-directory... $ECHO_C" >&6
5851 > use mpi
5852 > integer :: ierr
5853 > call MPI_Init(ierr)
5854  
5855 < # Check whether --with-mpi_libdir or --without-mpi_libdir was given.
5856 < if test "${with_mpi_libdir+set}" = set; then
5857 <  withval="$with_mpi_libdir"
5858 <  MPI_LIBDIR="$withval"
5855 >
5856 > end program main
5857 >
5858 > _ACEOF
5859 > rm -f conftest.$ac_objext
5860 > if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5861 >  (eval $ac_compile) 2>&5
5862 >  ac_status=$?
5863 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5864 >  (exit $ac_status); } &&
5865 >         { ac_try='test -s conftest.$ac_objext'
5866 >  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5867 >  (eval $ac_try) 2>&5
5868 >  ac_status=$?
5869 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870 >  (exit $ac_status); }; }; then
5871 >  HAVE_MPI_MOD=1
5872   else
5873 <  MPI_LIBDIR="$MPI_DIR/lib"
5874 < fi;
5401 < echo "$as_me:$LINENO: result: $MPI_LIBDIR" >&5
5402 < echo "${ECHO_T}$MPI_LIBDIR" >&6
5873 >  echo "$as_me: failed program was:" >&5
5874 > sed 's/^/| /' conftest.$ac_ext >&5
5875  
5876 + HAVE_MPI_MOD=0
5877 + fi
5878 + rm -f conftest.$ac_objext conftest.$ac_ext
5879  
5880 < echo "$as_me:$LINENO: checking for mpi-inc-directory" >&5
5881 < echo $ECHO_N "checking for mpi-inc-directory... $ECHO_C" >&6
5880 >  F90FLAGS=$ac_save_F90FLAGS
5881 >  ac_ext=f90
5882 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5883 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5884 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5885  
5408 # Check whether --with-mpi_inc or --without-mpi_inc was given.
5409 if test "${with_mpi_inc+set}" = set; then
5410  withval="$with_mpi_inc"
5411  MPI_INC="$withval"
5412 else
5413  MPI_INC="$MPI_DIR/include"
5414 fi;
5415 echo "$as_me:$LINENO: result: $MPI_INC" >&5
5416 echo "${ECHO_T}$MPI_INC" >&6
5886  
5887 +  if test "$HAVE_MPI_MOD" = 1; then
5888 +    echo "$as_me:$LINENO: result: yes" >&5
5889 + echo "${ECHO_T}yes" >&6
5890  
5891 + cat >>confdefs.h <<\_ACEOF
5892 + #define MPI_MOD 1
5893 + _ACEOF
5894  
5895 < echo "$as_me:$LINENO: checking for MPI library" >&5
5896 < echo $ECHO_N "checking for MPI library... $ECHO_C" >&6
5897 < MPI_LIB=""
5898 < case "$host" in
5899 <  *-ibm-aix*)
5425 <    echo "$as_me:$LINENO: checking whether to use signal-based MPI library" >&5
5426 < echo $ECHO_N "checking whether to use signal-based MPI library... $ECHO_C" >&6
5427 <    echo "$as_me:$LINENO: result: $PACX_SIGNAL" >&5
5428 < echo "${ECHO_T}$PACX_SIGNAL" >&6
5429 <    if test "x$PACX_SIGNAL" = "xyes" ; then
5430 <      if test -f "$MPI_LIBDIR/libmpi.a" ; then
5431 <        MPI_LIB="-lmpi"
5432 <      elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5433 <        MPI_LIB="-lmpi"
5434 <      elif test -f "$MPI_LIBDIR/libmpich.a" ; then
5435 <        MPI_LIB="-lmpich"
5436 <      else
5437 <        { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5
5438 < echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;}
5439 <   { (exit 1); exit 1; }; }
5440 <      fi
5895 >    MPI_F90_MODS="${mpi_f90_mods}"
5896 >
5897 >    # The library name:
5898 >    if test -z "$MPI_LIB" ; then
5899 >       MPI_LIBNAME=-lmpich
5900      else
5901 <      if test -f "$MPI_LIBDIR/libmpi_r.a" ; then
5443 <         MPI_LIB="-lmpi_r"
5444 <      else
5445 <         { { echo "$as_me:$LINENO: error: libmpi_r not found; check path for MPI package..." >&5
5446 < echo "$as_me: error: libmpi_r not found; check path for MPI package..." >&2;}
5447 <   { (exit 1); exit 1; }; }
5448 <      fi
5901 >       MPI_LIBNAME="$MPI_LIB"
5902      fi
5903 <    echo "$as_me:$LINENO: result: found $MPI_LIB" >&5
5904 < echo "${ECHO_T}found $MPI_LIB" >&6
5452 <  ;;
5453 <  *)                             if test -f "$MPI_LIBDIR/libmpi.a" ; then
5454 <      MPI_LIB="-lmpi"
5455 <    elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5456 <      MPI_LIB="-lmpi"
5457 <    elif test -f "$MPI_LIBDIR/libmpich.a" ; then
5458 <      MPI_LIB="-lmpich"
5459 <    else
5460 <      { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5
5461 < echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;}
5462 <   { (exit 1); exit 1; }; }
5903 >    if test -z "$MPIMODLIBNAME" ; then
5904 >       MPIMODLIBNAME="${MPI_LIBNAME}f90"
5905      fi
5464    echo "$as_me:$LINENO: result: found $MPI_LIB" >&5
5465 echo "${ECHO_T}found $MPI_LIB" >&6
5466  ;;
5467 esac
5906  
5907 +  else
5908 +    echo "$as_me:$LINENO: result: no" >&5
5909 + echo "${ECHO_T}no" >&6
5910 +    { echo "$as_me:$LINENO: WARNING: Couldn't locate MPI F90 Modules" >&5
5911 + echo "$as_me: WARNING: Couldn't locate MPI F90 Modules" >&2;}
5912 +  fi
5913  
5914  
5915  
5916 + if test "$HAVE_MPI_MOD" = 1; then
5917  
5918 + cat >>confdefs.h <<\_ACEOF
5919 + #define MPI_MOD 1
5920 + _ACEOF
5921  
5922 + else
5923 +        ac_ext=f90
5924 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5925 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5926 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5927  
5928 <        for ac_prog in mpif90 hf90 mpxlf90 mpf90 mpxlf95 mpxlf_r
5929 < do
5930 <  # Extract the first word of "$ac_prog", so it can be a program name with args.
5478 < set dummy $ac_prog; ac_word=$2
5479 < echo "$as_me:$LINENO: checking for $ac_word" >&5
5480 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5481 < if test "${ac_cv_prog_MPIF90+set}" = set; then
5928 >        echo "$as_me:$LINENO: checking for egrep" >&5
5929 > echo $ECHO_N "checking for egrep... $ECHO_C" >&6
5930 > if test "${ac_cv_prog_egrep+set}" = set; then
5931    echo $ECHO_N "(cached) $ECHO_C" >&6
5932   else
5933 <  if test -n "$MPIF90"; then
5934 <  ac_cv_prog_MPIF90="$MPIF90" # Let the user override the test.
5935 < else
5936 < as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488 < for as_dir in $PATH
5489 < do
5490 <  IFS=$as_save_IFS
5491 <  test -z "$as_dir" && as_dir=.
5492 <  for ac_exec_ext in '' $ac_executable_extensions; do
5493 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5494 <    ac_cv_prog_MPIF90="$ac_prog"
5495 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5496 <    break 2
5497 <  fi
5498 < done
5499 < done
5500 <
5933 >  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
5934 >    then ac_cv_prog_egrep='grep -E'
5935 >    else ac_cv_prog_egrep='egrep'
5936 >    fi
5937   fi
5938 < fi
5939 < MPIF90=$ac_cv_prog_MPIF90
5940 < if test -n "$MPIF90"; then
5505 <  echo "$as_me:$LINENO: result: $MPIF90" >&5
5506 < echo "${ECHO_T}$MPIF90" >&6
5507 < else
5508 <  echo "$as_me:$LINENO: result: no" >&5
5509 < echo "${ECHO_T}no" >&6
5510 < fi
5938 > echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
5939 > echo "${ECHO_T}$ac_cv_prog_egrep" >&6
5940 > EGREP=$ac_cv_prog_egrep
5941  
5512  test -n "$MPIF90" && break
5513 done
5514 test -n "$MPIF90" || MPIF90="$F90"
5942  
5943 <        acx_mpi_save_F90="$F90"
5944 <        F90="$MPIF90"
5943 > echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5944 > echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5945 > if test "${ac_cv_header_stdc+set}" = set; then
5946 >  echo $ECHO_N "(cached) $ECHO_C" >&6
5947 > else
5948 >  cat >conftest.$ac_ext <<_ACEOF
5949  
5950 + program main
5951 + #include <stdlib.h>
5952 + #include <stdarg.h>
5953 + #include <string.h>
5954 + #include <float.h>
5955  
5956  
5957 < if test x = x"$MPILIBS"; then
5522 <        echo "$as_me:$LINENO: checking for MPI_Init" >&5
5523 < echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6
5524 <                        cat >conftest.$ac_ext <<_ACEOF
5957 > end program main
5958  
5526 program main
5527
5528      call MPI_Init
5529 end program main
5530
5959   _ACEOF
5960 < rm -f conftest.$ac_objext conftest$ac_exeext
5961 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5962 <  (eval $ac_link) 2>&5
5960 > rm -f conftest.$ac_objext
5961 > if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5962 >  (eval $ac_compile) 2>&5
5963    ac_status=$?
5964    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5965    (exit $ac_status); } &&
5966 <         { ac_try='test -s conftest$ac_exeext'
5966 >         { ac_try='test -s conftest.$ac_objext'
5967    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5968    (eval $ac_try) 2>&5
5969    ac_status=$?
5970    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5971    (exit $ac_status); }; }; then
5972 <  MPILIBS=" "
5545 <                                echo "$as_me:$LINENO: result: yes" >&5
5546 < echo "${ECHO_T}yes" >&6
5972 >  ac_cv_header_stdc=yes
5973   else
5974    echo "$as_me: failed program was:" >&5
5975   sed 's/^/| /' conftest.$ac_ext >&5
5976  
5977 < echo "$as_me:$LINENO: result: no" >&5
5552 < echo "${ECHO_T}no" >&6
5977 > ac_cv_header_stdc=no
5978   fi
5979 < rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5979 > rm -f conftest.$ac_objext conftest.$ac_ext
5980 >
5981 > if test $ac_cv_header_stdc = yes; then
5982 >  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5983 >  cat >conftest.$ac_ext <<_ACEOF
5984 > #include <string.h>
5985 >
5986 > _ACEOF
5987 > if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5988 >  $EGREP "memchr" >/dev/null 2>&1; then
5989 >  :
5990 > else
5991 >  ac_cv_header_stdc=no
5992   fi
5993 < if test x = x"$MPILIBS"; then
5994 <        echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5995 < echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
5996 < if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
5997 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5993 > rm -f conftest*
5994 >
5995 > fi
5996 >
5997 > if test $ac_cv_header_stdc = yes; then
5998 >  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5999 >  cat >conftest.$ac_ext <<_ACEOF
6000 > #include <stdlib.h>
6001 >
6002 > _ACEOF
6003 > if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6004 >  $EGREP "free" >/dev/null 2>&1; then
6005 >  :
6006   else
6007 <  ac_check_lib_save_LIBS=$LIBS
6008 < LIBS="-lmpi  $LIBS"
6009 < cat >conftest.$ac_ext <<_ACEOF
6007 >  ac_cv_header_stdc=no
6008 > fi
6009 > rm -f conftest*
6010  
6011 < program main
6011 > fi
6012  
6013 < call MPI_Init
6014 < end program main
6013 > if test $ac_cv_header_stdc = yes; then
6014 >  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6015 >  if test "$cross_compiling" = yes; then
6016 >  :
6017 > else
6018 >  cat >conftest.$ac_ext <<_ACEOF
6019 > #include <ctype.h>
6020 > #if ((' ' & 0x0FF) == 0x020)
6021 > # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6022 > # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6023 > #else
6024 > # define ISLOWER(c) \
6025 >                   (('a' <= (c) && (c) <= 'i') \
6026 >                     || ('j' <= (c) && (c) <= 'r') \
6027 >                     || ('s' <= (c) && (c) <= 'z'))
6028 > # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6029 > #endif
6030  
6031 + #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6032 + int
6033 + main ()
6034 + {
6035 +  int i;
6036 +  for (i = 0; i < 256; i++)
6037 +    if (XOR (islower (i), ISLOWER (i))
6038 +        || toupper (i) != TOUPPER (i))
6039 +      exit(2);
6040 +  exit (0);
6041 + }
6042   _ACEOF
6043 < rm -f conftest.$ac_objext conftest$ac_exeext
6043 > rm -f conftest$ac_exeext
6044   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6045    (eval $ac_link) 2>&5
6046    ac_status=$?
6047    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6048 <  (exit $ac_status); } &&
5578 <         { ac_try='test -s conftest$ac_exeext'
6048 >  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6049    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6050    (eval $ac_try) 2>&5
6051    ac_status=$?
6052    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6053    (exit $ac_status); }; }; then
6054 <  ac_cv_lib_mpi_MPI_Init=yes
6054 >  :
6055   else
6056 <  echo "$as_me: failed program was:" >&5
6056 >  echo "$as_me: program exited with status $ac_status" >&5
6057 > echo "$as_me: failed program was:" >&5
6058   sed 's/^/| /' conftest.$ac_ext >&5
6059  
6060 < ac_cv_lib_mpi_MPI_Init=no
6060 > ( exit $ac_status )
6061 > ac_cv_header_stdc=no
6062   fi
6063 < rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5592 < LIBS=$ac_check_lib_save_LIBS
6063 > rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6064   fi
5594 echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5595 echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5596 if test $ac_cv_lib_mpi_MPI_Init = yes; then
5597  MPILIBS="-lmpi"
6065   fi
6066 + fi
6067 + echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6068 + echo "${ECHO_T}$ac_cv_header_stdc" >&6
6069 + if test $ac_cv_header_stdc = yes; then
6070  
6071 + cat >>confdefs.h <<\_ACEOF
6072 + #define STDC_HEADERS 1
6073 + _ACEOF
6074 +
6075   fi
5601 if test x = x"$MPILIBS"; then
5602        echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
5603 echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
5604 if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
5605  echo $ECHO_N "(cached) $ECHO_C" >&6
5606 else
5607  ac_check_lib_save_LIBS=$LIBS
5608 LIBS="-lmpich  $LIBS"
5609 cat >conftest.$ac_ext <<_ACEOF
6076  
6077 < program main
6077 > # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6078  
5613 call MPI_Init
5614 end program main
6079  
6080 +
6081 +
6082 +
6083 +
6084 +
6085 +
6086 +
6087 + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6088 +                  inttypes.h stdint.h unistd.h
6089 + do
6090 + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6091 + echo "$as_me:$LINENO: checking for $ac_header" >&5
6092 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6093 + if eval "test \"\${$as_ac_Header+set}\" = set"; then
6094 +  echo $ECHO_N "(cached) $ECHO_C" >&6
6095 + else
6096 +  cat >conftest.$ac_ext <<_ACEOF
6097 + $ac_includes_default
6098 +
6099 + #include <$ac_header>
6100   _ACEOF
6101 < rm -f conftest.$ac_objext conftest$ac_exeext
6102 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6103 <  (eval $ac_link) 2>&5
6101 > rm -f conftest.$ac_objext
6102 > if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6103 >  (eval $ac_compile) 2>&5
6104    ac_status=$?
6105    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6106    (exit $ac_status); } &&
6107 <         { ac_try='test -s conftest$ac_exeext'
6107 >         { ac_try='test -s conftest.$ac_objext'
6108    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6109    (eval $ac_try) 2>&5
6110    ac_status=$?
6111    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6112    (exit $ac_status); }; }; then
6113 <  ac_cv_lib_mpich_MPI_Init=yes
6113 >  eval "$as_ac_Header=yes"
6114   else
6115    echo "$as_me: failed program was:" >&5
6116   sed 's/^/| /' conftest.$ac_ext >&5
6117  
6118 < ac_cv_lib_mpich_MPI_Init=no
6118 > eval "$as_ac_Header=no"
6119   fi
6120 < rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5637 < LIBS=$ac_check_lib_save_LIBS
6120 > rm -f conftest.$ac_objext conftest.$ac_ext
6121   fi
6122 < echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
6123 < echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
6124 < if test $ac_cv_lib_mpich_MPI_Init = yes; then
6125 <  MPILIBS="-lmpich"
6126 < fi
6122 > echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6123 > echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6124 > if test `eval echo '${'$as_ac_Header'}'` = yes; then
6125 >  cat >>confdefs.h <<_ACEOF
6126 > #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6127 > _ACEOF
6128  
6129   fi
6130  
6131 + done
6132  
6133  
5649 F90="$acx_mpi_save_F90"
6134  
6135 + for ac_header in mpif.h
6136 + do
6137 + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6138 + if eval "test \"\${$as_ac_Header+set}\" = set"; then
6139 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
6140 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6141 + if eval "test \"\${$as_ac_Header+set}\" = set"; then
6142 +  echo $ECHO_N "(cached) $ECHO_C" >&6
6143 + fi
6144 + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6145 + echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6146 + else
6147 +  # Is the header compilable?
6148 + echo "$as_me:$LINENO: checking $ac_header usability" >&5
6149 + echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6150 + cat >conftest.$ac_ext <<_ACEOF
6151 + $ac_includes_default
6152 + #include <$ac_header>
6153 + _ACEOF
6154 + rm -f conftest.$ac_objext
6155 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6156 +  (eval $ac_compile) 2>&5
6157 +  ac_status=$?
6158 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6159 +  (exit $ac_status); } &&
6160 +         { ac_try='test -s conftest.$ac_objext'
6161 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6162 +  (eval $ac_try) 2>&5
6163 +  ac_status=$?
6164 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6165 +  (exit $ac_status); }; }; then
6166 +  ac_header_compiler=yes
6167 + else
6168 +  echo "$as_me: failed program was:" >&5
6169 + sed 's/^/| /' conftest.$ac_ext >&5
6170  
6171 + ac_header_compiler=no
6172 + fi
6173 + rm -f conftest.$ac_objext conftest.$ac_ext
6174 + echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6175 + echo "${ECHO_T}$ac_header_compiler" >&6
6176  
6177 < # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
6178 < if test x = x"$MPILIBS"; then
6177 > # Is the header present?
6178 > echo "$as_me:$LINENO: checking $ac_header presence" >&5
6179 > echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6180 > cat >conftest.$ac_ext <<_ACEOF
6181 > #include <$ac_header>
6182 > _ACEOF
6183 > if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6184 >  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6185 >  ac_status=$?
6186 >  grep -v '^ *+' conftest.er1 >conftest.err
6187 >  rm -f conftest.er1
6188 >  cat conftest.err >&5
6189 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6190 >  (exit $ac_status); } >/dev/null; then
6191 >  if test -s conftest.err; then
6192 >    ac_cpp_err=$ac_f90_preproc_warn_flag
6193 >  else
6194 >    ac_cpp_err=
6195 >  fi
6196 > else
6197 >  ac_cpp_err=yes
6198 > fi
6199 > if test -z "$ac_cpp_err"; then
6200 >  ac_header_preproc=yes
6201 > else
6202 >  echo "$as_me: failed program was:" >&5
6203 > sed 's/^/| /' conftest.$ac_ext >&5
6204  
6205 <        :
6205 >  ac_header_preproc=no
6206 > fi
6207 > rm -f conftest.err conftest.$ac_ext
6208 > echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6209 > echo "${ECHO_T}$ac_header_preproc" >&6
6210 >
6211 > # So?  What about this header?
6212 > case $ac_header_compiler:$ac_header_preproc in
6213 >  yes:no )
6214 >    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6215 > echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6216 >    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6217 > echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6218 >    (
6219 >      cat <<\_ASBOX
6220 > ## ------------------------------------ ##
6221 > ## Report this to bug-autoconf@gnu.org. ##
6222 > ## ------------------------------------ ##
6223 > _ASBOX
6224 >    ) |
6225 >      sed "s/^/$as_me: WARNING:     /" >&2
6226 >    ;;
6227 >  no:yes )
6228 >    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6229 > echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6230 >    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6231 > echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6232 >    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6233 > echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6234 >    (
6235 >      cat <<\_ASBOX
6236 > ## ------------------------------------ ##
6237 > ## Report this to bug-autoconf@gnu.org. ##
6238 > ## ------------------------------------ ##
6239 > _ASBOX
6240 >    ) |
6241 >      sed "s/^/$as_me: WARNING:     /" >&2
6242 >    ;;
6243 > esac
6244 > echo "$as_me:$LINENO: checking for $ac_header" >&5
6245 > echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6246 > if eval "test \"\${$as_ac_Header+set}\" = set"; then
6247 >  echo $ECHO_N "(cached) $ECHO_C" >&6
6248   else
6249 +  eval "$as_ac_Header=$ac_header_preproc"
6250 + fi
6251 + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6252 + echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6253  
6254 < cat >>confdefs.h <<\_ACEOF
6255 < #define HAVE_MPI 1
6254 > fi
6255 > if test `eval echo '${'$as_ac_Header'}'` = yes; then
6256 >  cat >>confdefs.h <<_ACEOF
6257 > #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6258   _ACEOF
6259  
5663        :
6260   fi
6261  
6262 + done
6263  
6264 +        ac_ext=c
6265 + ac_cpp='$CPP $CPPFLAGS'
6266 + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6267 + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6268 + ac_compiler_gnu=$ac_cv_c_compiler_gnu
6269 +
6270 +
6271 + cat >>confdefs.h <<\_ACEOF
6272 + #define MPI_H 1
6273 + _ACEOF
6274 +
6275 + fi
6276 +
6277   ac_ext=c
6278   ac_cpp='$CPP $CPPFLAGS'
6279   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
# Line 5897 | Line 6507 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
6507   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6508   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6509   ac_compiler_gnu=$ac_cv_c_compiler_gnu
5900
5901
5902 echo "$as_me:$LINENO: checking for egrep" >&5
5903 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
5904 if test "${ac_cv_prog_egrep+set}" = set; then
5905  echo $ECHO_N "(cached) $ECHO_C" >&6
5906 else
5907  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
5908    then ac_cv_prog_egrep='grep -E'
5909    else ac_cv_prog_egrep='egrep'
5910    fi
5911 fi
5912 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
5913 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
5914 EGREP=$ac_cv_prog_egrep
5915
5916
5917 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5918 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5919 if test "${ac_cv_header_stdc+set}" = set; then
5920  echo $ECHO_N "(cached) $ECHO_C" >&6
5921 else
5922  cat >conftest.$ac_ext <<_ACEOF
5923 #line $LINENO "configure"
5924 /* confdefs.h.  */
5925 _ACEOF
5926 cat confdefs.h >>conftest.$ac_ext
5927 cat >>conftest.$ac_ext <<_ACEOF
5928 /* end confdefs.h.  */
5929 #include <stdlib.h>
5930 #include <stdarg.h>
5931 #include <string.h>
5932 #include <float.h>
5933
5934 int
5935 main ()
5936 {
5937
5938  ;
5939  return 0;
5940 }
5941 _ACEOF
5942 rm -f conftest.$ac_objext
5943 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5944  (eval $ac_compile) 2>&5
5945  ac_status=$?
5946  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5947  (exit $ac_status); } &&
5948         { ac_try='test -s conftest.$ac_objext'
5949  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5950  (eval $ac_try) 2>&5
5951  ac_status=$?
5952  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5953  (exit $ac_status); }; }; then
5954  ac_cv_header_stdc=yes
5955 else
5956  echo "$as_me: failed program was:" >&5
5957 sed 's/^/| /' conftest.$ac_ext >&5
5958
5959 ac_cv_header_stdc=no
5960 fi
5961 rm -f conftest.$ac_objext conftest.$ac_ext
5962
5963 if test $ac_cv_header_stdc = yes; then
5964  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5965  cat >conftest.$ac_ext <<_ACEOF
5966 #line $LINENO "configure"
5967 /* confdefs.h.  */
5968 _ACEOF
5969 cat confdefs.h >>conftest.$ac_ext
5970 cat >>conftest.$ac_ext <<_ACEOF
5971 /* end confdefs.h.  */
5972 #include <string.h>
5973
5974 _ACEOF
5975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5976  $EGREP "memchr" >/dev/null 2>&1; then
5977  :
5978 else
5979  ac_cv_header_stdc=no
5980 fi
5981 rm -f conftest*
5982
5983 fi
5984
5985 if test $ac_cv_header_stdc = yes; then
5986  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5987  cat >conftest.$ac_ext <<_ACEOF
5988 #line $LINENO "configure"
5989 /* confdefs.h.  */
5990 _ACEOF
5991 cat confdefs.h >>conftest.$ac_ext
5992 cat >>conftest.$ac_ext <<_ACEOF
5993 /* end confdefs.h.  */
5994 #include <stdlib.h>
5995
5996 _ACEOF
5997 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5998  $EGREP "free" >/dev/null 2>&1; then
5999  :
6000 else
6001  ac_cv_header_stdc=no
6002 fi
6003 rm -f conftest*
6004
6005 fi
6006
6007 if test $ac_cv_header_stdc = yes; then
6008  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6009  if test "$cross_compiling" = yes; then
6010  :
6011 else
6012  cat >conftest.$ac_ext <<_ACEOF
6013 #line $LINENO "configure"
6014 /* confdefs.h.  */
6015 _ACEOF
6016 cat confdefs.h >>conftest.$ac_ext
6017 cat >>conftest.$ac_ext <<_ACEOF
6018 /* end confdefs.h.  */
6019 #include <ctype.h>
6020 #if ((' ' & 0x0FF) == 0x020)
6021 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6022 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6023 #else
6024 # define ISLOWER(c) \
6025                   (('a' <= (c) && (c) <= 'i') \
6026                     || ('j' <= (c) && (c) <= 'r') \
6027                     || ('s' <= (c) && (c) <= 'z'))
6028 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6029 #endif
6030
6031 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6032 int
6033 main ()
6034 {
6035  int i;
6036  for (i = 0; i < 256; i++)
6037    if (XOR (islower (i), ISLOWER (i))
6038        || toupper (i) != TOUPPER (i))
6039      exit(2);
6040  exit (0);
6041 }
6042 _ACEOF
6043 rm -f conftest$ac_exeext
6044 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6045  (eval $ac_link) 2>&5
6046  ac_status=$?
6047  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6048  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6049  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6050  (eval $ac_try) 2>&5
6051  ac_status=$?
6052  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6053  (exit $ac_status); }; }; then
6054  :
6055 else
6056  echo "$as_me: program exited with status $ac_status" >&5
6057 echo "$as_me: failed program was:" >&5
6058 sed 's/^/| /' conftest.$ac_ext >&5
6059
6060 ( exit $ac_status )
6061 ac_cv_header_stdc=no
6062 fi
6063 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6064 fi
6065 fi
6066 fi
6067 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6068 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6069 if test $ac_cv_header_stdc = yes; then
6070
6071 cat >>confdefs.h <<\_ACEOF
6072 #define STDC_HEADERS 1
6073 _ACEOF
6074
6075 fi
6076
6077 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6088                  inttypes.h stdint.h unistd.h
6089 do
6090 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6091 echo "$as_me:$LINENO: checking for $ac_header" >&5
6092 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6093 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6094  echo $ECHO_N "(cached) $ECHO_C" >&6
6095 else
6096  cat >conftest.$ac_ext <<_ACEOF
6097 #line $LINENO "configure"
6098 /* confdefs.h.  */
6099 _ACEOF
6100 cat confdefs.h >>conftest.$ac_ext
6101 cat >>conftest.$ac_ext <<_ACEOF
6102 /* end confdefs.h.  */
6103 $ac_includes_default
6104
6105 #include <$ac_header>
6106 _ACEOF
6107 rm -f conftest.$ac_objext
6108 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6109  (eval $ac_compile) 2>&5
6110  ac_status=$?
6111  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6112  (exit $ac_status); } &&
6113         { ac_try='test -s conftest.$ac_objext'
6114  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6115  (eval $ac_try) 2>&5
6116  ac_status=$?
6117  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6118  (exit $ac_status); }; }; then
6119  eval "$as_ac_Header=yes"
6120 else
6121  echo "$as_me: failed program was:" >&5
6122 sed 's/^/| /' conftest.$ac_ext >&5
6123
6124 eval "$as_ac_Header=no"
6125 fi
6126 rm -f conftest.$ac_objext conftest.$ac_ext
6127 fi
6128 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6129 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6130 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6131  cat >>confdefs.h <<_ACEOF
6132 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6133 _ACEOF
6510  
6135 fi
6511  
6137 done
6512  
6513  
6514  
6141
6142
6515   # Check whether --with-sprng_prefix or --without-sprng_prefix was given.
6516   if test "${with_sprng_prefix+set}" = set; then
6517    withval="$with_sprng_prefix"
# Line 6410 | Line 6782 | fi
6782  
6783    CPPFLAGS=$ac_save_CPPFLAGS
6784    LDFLAGS=$ac_save_LDFLAGS
6785 <  ac_ext=f90
6786 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6787 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6788 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6785 >  ac_ext=c
6786 > ac_cpp='$CPP $CPPFLAGS'
6787 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6788 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6789 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
6790  
6791  
6792    if test x_$HAVE_SPRNG != x_yes; then
# Line 6660 | Line 7033 | fi
7033  
7034    CPPFLAGS=$ac_save_CPPFLAGS
7035    LDFLAGS=$ac_save_LDFLAGS
7036 <  ac_ext=f90
7037 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
7038 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7039 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
7036 >  ac_ext=c
7037 > ac_cpp='$CPP $CPPFLAGS'
7038 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7039 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7040 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
7041  
7042  
7043    if test x_$HAVE_MKL != x_yes; then
# Line 6681 | Line 7055 | fi;
7055      echo "$as_me:$LINENO: result: no" >&5
7056   echo "${ECHO_T}no" >&6
7057  
6684 fi;
6685
6686
6687
6688
6689 # Check whether --with-mpi_f90_mods or --without-mpi_f90_mods was given.
6690 if test "${with_mpi_f90_mods+set}" = set; then
6691  withval="$with_mpi_f90_mods"
6692  mpi_f90_mods="$withval"
6693 else
6694  mpi_f90_mods="/usr/local/include/f90choice"
7058   fi;
6696
6697  echo "$as_me:$LINENO: checking for MPI F90 modules" >&5
6698 echo $ECHO_N "checking for MPI F90 modules... $ECHO_C" >&6
6699
6700
6701  ac_ext=f90
6702 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6703 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6704 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6705
6706  ac_save_F90FLAGS=$F90FLAGS
6707  if test "$mpi_f90_mods"; then
6708  F90FLAGS="${F90FLAGS} -I${mpi_f90_mods}"
6709 fi
6710
6711    cat >conftest.$ac_ext <<_ACEOF
6712
6713
6714 program main
6715
6716 use mpi
6717 integer :: ierr
6718 call MPI_Init(ierr)
6719
6720
6721 end program main
6722
6723 _ACEOF
6724 rm -f conftest.$ac_objext
6725 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6726  (eval $ac_compile) 2>&5
6727  ac_status=$?
6728  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6729  (exit $ac_status); } &&
6730         { ac_try='test -s conftest.$ac_objext'
6731  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6732  (eval $ac_try) 2>&5
6733  ac_status=$?
6734  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6735  (exit $ac_status); }; }; then
6736  HAVE_MPI_MOD=1
6737 else
6738  echo "$as_me: failed program was:" >&5
6739 sed 's/^/| /' conftest.$ac_ext >&5
6740
6741 HAVE_MPI_MOD=0
6742 fi
6743 rm -f conftest.$ac_objext conftest.$ac_ext
6744
6745  F90FLAGS=$ac_save_F90FLAGS
6746  ac_ext=f90
6747 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6748 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6749 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6750
6751
6752  if test "$HAVE_MPI_MOD" = 1; then
6753    echo "$as_me:$LINENO: result: yes" >&5
6754 echo "${ECHO_T}yes" >&6
6755
6756 cat >>confdefs.h <<\_ACEOF
6757 #define MPI_MOD 1
6758 _ACEOF
7059  
6760    MPI_F90_MODS="-I${mpi_f90_mods}"
7060  
6762    # The library name:
6763    if test -z "$MPI_LIB" ; then
6764       MPI_LIBNAME=-lmpich
6765    else
6766       MPI_LIBNAME="$MPI_LIB"
6767    fi
6768    if test -z "$MPIMODLIBNAME" ; then
6769       MPIMODLIBNAME="${MPI_LIBNAME}f90"
6770    fi
7061  
6772  else
6773    echo "$as_me:$LINENO: result: no" >&5
6774 echo "${ECHO_T}no" >&6
6775    { { echo "$as_me:$LINENO: error: Couldn't locate MPI F90 Modules" >&5
6776 echo "$as_me: error: Couldn't locate MPI F90 Modules" >&2;}
6777   { (exit 1); exit 1; }; }
6778  fi
7062  
7063  
6781
6782
6783
7064   OBJEXT=".$OBJEXT"
7065  
7066   OOPSE=oopse
# Line 6816 | Line 7096 | case $debug in
7096  
7097   case $debug in
7098    1)
6819     CFLAGS="$DEBUG $CFLAGS"
6820     CXXFLAGS="$DEBUG $CXXFLAGS"
7099       FFLAGS="$DEBUG $FFLAGS"
7100       F90FLAGS="$DEBUG $F90FLAGS"
7101       ;;
# Line 7490 | Line 7768 | s,@F90@,$F90,;t t
7768   s,@CXX@,$CXX,;t t
7769   s,@CXXFLAGS@,$CXXFLAGS,;t t
7770   s,@ac_ct_CXX@,$ac_ct_CXX,;t t
7771 + s,@OOPSE_TEMPLATE_FLAGS@,$OOPSE_TEMPLATE_FLAGS,;t t
7772 + s,@EXTRA_CC_FLAG@,$EXTRA_CC_FLAG,;t t
7773   s,@F90@,$F90,;t t
7774   s,@F90FLAGS@,$F90FLAGS,;t t
7775   s,@ac_ct_F90@,$ac_ct_F90,;t t
7776   s,@PREPFLAG@,$PREPFLAG,;t t
7777   s,@PREPDEFFLAG@,$PREPDEFFLAG,;t t
7778 + s,@F90LIBS@,$F90LIBS,;t t
7779 + s,@F90_FUNC@,$F90_FUNC,;t t
7780 + s,@F90_FUNC_@,$F90_FUNC_,;t t
7781 + s,@MOD@,$MOD,;t t
7782 + s,@F90_WORK_FILES_ARG@,$F90_WORK_FILES_ARG,;t t
7783 + s,@MODDIRFLAG@,$MODDIRFLAG,;t t
7784 + s,@F90MODINCSPEC@,$F90MODINCSPEC,;t t
7785   s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
7786   s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
7787   s,@INSTALL_DATA@,$INSTALL_DATA,;t t
# Line 7507 | Line 7794 | s,@F90LIBS@,$F90LIBS,;t t
7794   s,@LEXLIB@,$LEXLIB,;t t
7795   s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
7796   s,@AR@,$AR,;t t
7510 s,@F90LIBS@,$F90LIBS,;t t
7511 s,@F90_FUNC@,$F90_FUNC,;t t
7512 s,@F90_FUNC_@,$F90_FUNC_,;t t
7797   s,@mpi_dir@,$mpi_dir,;t t
7798   s,@MPI_LIBDIR@,$MPI_LIBDIR,;t t
7799   s,@MPI_INC@,$MPI_INC,;t t
# Line 7517 | Line 7801 | s,@CPP@,$CPP,;t t
7801   s,@MPIF77@,$MPIF77,;t t
7802   s,@MPIF90@,$MPIF90,;t t
7803   s,@MPILIBS@,$MPILIBS,;t t
7804 < s,@CPP@,$CPP,;t t
7804 > s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t
7805 > s,@MPIMODLIBNAME@,$MPIMODLIBNAME,;t t
7806   s,@EGREP@,$EGREP,;t t
7807 + s,@CPP@,$CPP,;t t
7808   s,@SPRNG_LIBDIR@,$SPRNG_LIBDIR,;t t
7809   s,@SPRNG_LIB@,$SPRNG_LIB,;t t
7810   s,@SPRNG_INC@,$SPRNG_INC,;t t
# Line 7527 | Line 7813 | s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t
7813   s,@MKL_LIB@,$MKL_LIB,;t t
7814   s,@MKL_INC@,$MKL_INC,;t t
7815   s,@HAVE_MKL@,$HAVE_MKL,;t t
7530 s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t
7531 s,@MPIMODLIBNAME@,$MPIMODLIBNAME,;t t
7816   s,@BATEXT@,$BATEXT,;t t
7817   s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
7818   s,@OOPSE@,$OOPSE,;t t

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines