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 838 by gezelter, Wed Oct 29 03:06:51 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_ MOD F90_WORK_FILES_ARG MODDIRFLAG F90MODINCSPEC 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 2565 | Line 2565 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
2565   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
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'
# Line 2885 | Line 2886 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
2886   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
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 3054 | Line 3109 | if test "$ac_test_PREPFLAG" != "set"; then
3109    esac
3110  
3111    if test -z "$PREPFLAG"; then
3112 <        echo ""
3113 <        echo "**********************************************************"
3059 <        echo "* WARNING: Don't know the best PREPFLAG for this system  *"
3060 <        echo "* Use  make PREPFLAG=..., or edit the top level Makefile *"
3061 <        echo "* (otherwise, an empty PREPFLAG will be used)            *"
3062 <        echo "**********************************************************"
3063 <        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 3161 | Line 3211 | if test "$ac_test_PREPDEFFLAG" != "set"; then
3211    esac
3212  
3213    if test -z "$PREPDEFFLAG"; then
3214 <        echo ""
3215 <        echo "*************************************************************"
3166 <        echo "* WARNING: Don't know the best PREPDEFFLAG for this system  *"
3167 <        echo "* Use  make PREPDEFFLAG=..., or edit the top level Makefile *"
3168 <        echo "* (otherwise, an empty PREPDEFFLAG will be used)            *"
3169 <        echo "*************************************************************"
3170 <        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 3246 | 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 4195 | 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'
4202 < 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 4466 | Line 5217 | test -n "$YACC" || YACC="yacc"
5217   done
5218   test -n "$YACC" || YACC="yacc"
5219  
4469
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 4518 | Line 5268 | cat >conftest.$ac_ext <<_ACEOF
5268    ac_check_lib_save_LIBS=$LIBS
5269   LIBS="-lfl  $LIBS"
5270   cat >conftest.$ac_ext <<_ACEOF
4521 #line $LINENO "configure"
4522 /* confdefs.h.  */
4523 _ACEOF
4524 cat confdefs.h >>conftest.$ac_ext
4525 cat >>conftest.$ac_ext <<_ACEOF
4526 /* end confdefs.h.  */
5271  
5272 < /* Override any gcc2 internal prototype to avoid an error.  */
5273 < #ifdef __cplusplus
5274 < extern "C"
5275 < #endif
5276 < /* We use char because int might match the return type of a gcc2
4533 <   builtin and then its argument prototype would still apply.  */
4534 < char yywrap ();
4535 < int
4536 < main ()
4537 < {
4538 < yywrap ();
4539 <  ;
4540 <  return 0;
4541 < }
5272 > program main
5273 >
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 4575 | Line 5310 | cat >conftest.$ac_ext <<_ACEOF
5310    ac_check_lib_save_LIBS=$LIBS
5311   LIBS="-ll  $LIBS"
5312   cat >conftest.$ac_ext <<_ACEOF
4578 #line $LINENO "configure"
4579 /* confdefs.h.  */
4580 _ACEOF
4581 cat confdefs.h >>conftest.$ac_ext
4582 cat >>conftest.$ac_ext <<_ACEOF
4583 /* 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
4590 <   builtin and then its argument prototype would still apply.  */
4591 < char yywrap ();
4592 < int
4593 < main ()
4594 < {
4595 < yywrap ();
4596 <  ;
4597 <  return 0;
4598 < }
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 4807 | 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'
4812 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4813 < 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
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 >
5557 >
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 >
5571 >
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 >
5622 >
5623 >
5624 >
5625 >
5626 >
5627 >
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  
5654 < cat >conftest.$ac_ext <<_ACEOF
5654 > fi
5655 > 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:$LINENO: result: no" >&5
5662 > echo "${ECHO_T}no" >&6
5663 > fi
5664  
5665 < program main
5665 >  test -n "$MPIF90" && break
5666 > done
5667 > test -n "$MPIF90" || MPIF90="$F90"
5668  
5669 +        acx_mpi_save_F90="$F90"
5670 +        F90="$MPIF90"
5671  
5672 +
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 < rm -f conftest.$ac_objext
5686 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5687 <  (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 <  ac_cv_prog_f90_v=
5698 < # Try some options frequently used verbose output
5699 < for ac_verb in -v -verbose --verbose -V -\#\#\#; do
5700 <  ac_ext=f90
5701 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5702 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4853 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
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 < cat >conftest.$ac_ext <<_ACEOF
5705 <
4857 < program main
4858 <
4859 <
4860 < end program main
4861 <
4862 < _ACEOF
4863 <
4864 < # Compile and link our simple test program by passing a flag (argument
4865 < # 1 to this macro) to the Fortran 90 compiler in order to get
4866 < # "verbose" output that we can then parse for the Fortran 90 linker
4867 < # flags.
4868 < ac_save_F90FLAGS=$F90FLAGS
4869 < F90FLAGS="$F90FLAGS $ac_verb"
4870 <
4871 < (eval echo $as_me:4871: \"$ac_link\") >&5
4872 < ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
4873 < echo "$ac_f90_v_output" >&5
4874 < F90FLAGS=$ac_save_F90FLAGS
4875 <
4876 < rm -f conftest.*
4877 < ac_ext=f90
4878 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4879 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4880 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4881 <
4882 < # If we are using xlf then replace all the commas with spaces.
4883 < if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
4884 <  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
5704 > echo "$as_me:$LINENO: result: no" >&5
5705 > echo "${ECHO_T}no" >&6
5706   fi
5707 <
4887 < # If we are using Cray Fortran then delete quotes.
4888 < # Use "\"" instead of '"' for font-lock-mode.
4889 < # FIXME: a more general fix for quoted arguments with spaces?
4890 < if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
4891 <  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
5707 > rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5708   fi
5709 <  # look for -l* and *.a constructs in the output
5710 <  for ac_arg in $ac_f90_v_output; do
5711 <     case $ac_arg in
5712 <        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
4897 <          ac_cv_prog_f90_v=$ac_verb
4898 <          break 2 ;;
4899 <     esac
4900 <  done
4901 < done
4902 < if test -z "$ac_cv_prog_f90_v"; then
4903 <   { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F90" >&5
4904 < echo "$as_me: WARNING: cannot determine how to obtain linking information from $F90" >&2;}
4905 < fi
4906 < else
4907 <  echo "$as_me: failed program was:" >&5
4908 < sed 's/^/| /' conftest.$ac_ext >&5
4909 <
4910 < { echo "$as_me:$LINENO: WARNING: compilation failed" >&5
4911 < echo "$as_me: WARNING: compilation failed" >&2;}
4912 < fi
4913 < rm -f conftest.$ac_objext conftest.$ac_ext
4914 <
4915 < fi
4916 < echo "$as_me:$LINENO: result: $ac_cv_prog_f90_v" >&5
4917 < echo "${ECHO_T}$ac_cv_prog_f90_v" >&6
4918 < echo "$as_me:$LINENO: checking for Fortran 90 libraries" >&5
4919 < echo $ECHO_N "checking for Fortran 90 libraries... $ECHO_C" >&6
4920 < if test "${ac_cv_flibs+set}" = set; then
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 <  if test "x$F90LIBS" != "x"; then
5716 <  ac_cv_f90libs="$F90LIBS" # Let the user override the test.
4925 < else
4926 <
4927 < ac_ext=f90
4928 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4929 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4930 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4931 <
5715 >  ac_check_lib_save_LIBS=$LIBS
5716 > LIBS="-lmpi  $LIBS"
5717   cat >conftest.$ac_ext <<_ACEOF
5718  
5719   program main
5720  
5721 <
5721 > call MPI_Init
5722   end program main
5723  
5724   _ACEOF
4940
4941 # Compile and link our simple test program by passing a flag (argument
4942 # 1 to this macro) to the Fortran 90 compiler in order to get
4943 # "verbose" output that we can then parse for the Fortran 90 linker
4944 # flags.
4945 ac_save_F90FLAGS=$F90FLAGS
4946 F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v"
4947
4948 (eval echo $as_me:4948: \"$ac_link\") >&5
4949 ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
4950 echo "$ac_f90_v_output" >&5
4951 F90FLAGS=$ac_save_F90FLAGS
4952
4953 rm -f conftest.*
4954 ac_ext=f90
4955 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4956 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4957 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4958
4959 # If we are using xlf then replace all the commas with spaces.
4960 if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
4961  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
4962 fi
4963
4964 # If we are using Cray Fortran then delete quotes.
4965 # Use "\"" instead of '"' for font-lock-mode.
4966 # FIXME: a more general fix for quoted arguments with spaces?
4967 if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
4968  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
4969 fi
4970
4971 ac_cv_f90libs=
4972
4973 # Save positional arguments (if any)
4974 ac_save_positional="$@"
4975
4976 set X $ac_f90_v_output
4977 while test $# != 1; do
4978  shift
4979  ac_arg=$1
4980  case $ac_arg in
4981        [\\/]*.a | ?:[\\/]*.a)
4982            ac_exists=false
4983  for ac_i in $ac_cv_f90libs; do
4984    if test x"$ac_arg" = x"$ac_i"; then
4985      ac_exists=true
4986      break
4987    fi
4988  done
4989
4990  if test x"$ac_exists" = xtrue; then
4991  :
4992 else
4993  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
4994 fi
4995
4996          ;;
4997        -bI:*)
4998            ac_exists=false
4999  for ac_i in $ac_cv_f90libs; do
5000    if test x"$ac_arg" = x"$ac_i"; then
5001      ac_exists=true
5002      break
5003    fi
5004  done
5005
5006  if test x"$ac_exists" = xtrue; then
5007  :
5008 else
5009  if test "$ac_compiler_gnu" = yes; then
5010  for ac_link_opt in $ac_arg; do
5011    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
5012  done
5013 else
5014  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5015 fi
5016 fi
5017
5018          ;;
5019          # Ignore these flags.
5020        -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*)
5021          ;;
5022        -lkernel32)
5023          test x"$CYGWIN" != xyes && ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5024          ;;
5025        -[LRuY])
5026          # These flags, when seen by themselves, take an argument.
5027          # We remove the space between option and argument and re-iterate
5028          # unless we find an empty arg or a new option (starting with -)
5029          case $2 in
5030             "" | -*);;
5031             *)
5032                ac_arg="$ac_arg$2"
5033
5034                shift; shift
5035                set X $ac_arg "$@"
5036                ;;
5037          esac
5038          ;;
5039        -YP,*)
5040          for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
5041              ac_exists=false
5042  for ac_i in $ac_cv_f90libs; do
5043    if test x"$ac_j" = x"$ac_i"; then
5044      ac_exists=true
5045      break
5046    fi
5047  done
5048
5049  if test x"$ac_exists" = xtrue; then
5050  :
5051 else
5052  ac_arg="$ac_arg $ac_j"
5053                             ac_cv_f90libs="$ac_cv_f90libs $ac_j"
5054 fi
5055
5056          done
5057          ;;
5058        -[lLR]*)
5059            ac_exists=false
5060  for ac_i in $ac_cv_f90libs; do
5061    if test x"$ac_arg" = x"$ac_i"; then
5062      ac_exists=true
5063      break
5064    fi
5065  done
5066
5067  if test x"$ac_exists" = xtrue; then
5068  :
5069 else
5070  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5071 fi
5072
5073          ;;
5074          # Ignore everything else.
5075  esac
5076 done
5077 # restore positional arguments
5078 set X $ac_save_positional; shift
5079
5080 # We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
5081 # then we insist that the "run path" must be an absolute path (i.e. it
5082 # must begin with a "/").
5083 case `(uname -sr) 2>/dev/null` in
5084   "SunOS 5"*)
5085      ac_ld_run_path=`echo $ac_f90_v_output |
5086                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
5087      test "x$ac_ld_run_path" != x &&
5088
5089        if test "$ac_compiler_gnu" = yes; then
5090  for ac_link_opt in $ac_ld_run_path; do
5091    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
5092  done
5093 else
5094  ac_cv_f90libs="$ac_cv_f90libs $ac_ld_run_path"
5095 fi
5096      ;;
5097 esac
5098 fi # test "x$F90LIBS" = "x"
5099
5100 fi
5101 echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5
5102 echo "${ECHO_T}$ac_cv_flibs" >&6
5103 F90LIBS="$ac_cv_f90libs"
5104
5105 ac_ext=f90
5106 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5107 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5108 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5109
5110 echo "$as_me:$LINENO: checking for Fortran 90 name-mangling scheme" >&5
5111 echo $ECHO_N "checking for Fortran 90 name-mangling scheme... $ECHO_C" >&6
5112 if test "${ac_cv_f90_mangling+set}" = set; then
5113  echo $ECHO_N "(cached) $ECHO_C" >&6
5114 else
5115  ac_ext=f90
5116 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5117 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5118 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5119 cat >conftest.$ac_ext <<_ACEOF
5120 subroutine foobar()
5121 return
5122 end
5123 subroutine foo_bar()
5124 return
5125 end
5126 _ACEOF
5127 rm -f conftest.$ac_objext
5128 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5129  (eval $ac_compile) 2>&5
5130  ac_status=$?
5131  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132  (exit $ac_status); } &&
5133         { ac_try='test -s conftest.$ac_objext'
5134  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5135  (eval $ac_try) 2>&5
5136  ac_status=$?
5137  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138  (exit $ac_status); }; }; then
5139  mv conftest.$ac_objext cf90_test.$ac_objext
5140
5141  ac_ext=c
5142 ac_cpp='$CPP $CPPFLAGS'
5143 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5144 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5145 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5146
5147  ac_save_LIBS=$LIBS
5148  LIBS="cf90_test.$ac_objext $F90LIBS $LIBS"
5149
5150  ac_success=no
5151  for ac_foobar in foobar FOOBAR; do
5152    for ac_underscore in "" "_"; do
5153      ac_func="$ac_foobar$ac_underscore"
5154      cat >conftest.$ac_ext <<_ACEOF
5155 #line $LINENO "configure"
5156 /* confdefs.h.  */
5157 _ACEOF
5158 cat confdefs.h >>conftest.$ac_ext
5159 cat >>conftest.$ac_ext <<_ACEOF
5160 /* end confdefs.h.  */
5161
5162 /* Override any gcc2 internal prototype to avoid an error.  */
5163 #ifdef __cplusplus
5164 extern "C"
5165 #endif
5166 /* We use char because int might match the return type of a gcc2
5167   builtin and then its argument prototype would still apply.  */
5168 char $ac_func ();
5169 int
5170 main ()
5171 {
5172 $ac_func ();
5173  ;
5174  return 0;
5175 }
5176 _ACEOF
5725   rm -f conftest.$ac_objext conftest$ac_exeext
5726   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5727    (eval $ac_link) 2>&5
# Line 5186 | 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 <           ;;
5209 <     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
5212 <     for ac_extra in "" "_"; do
5213 <        ac_func="$ac_foo_bar$ac_underscore$ac_extra"
5764 > program main
5765  
5766 <        cat >conftest.$ac_ext <<_ACEOF
5767 < #line $LINENO "configure"
5217 < /* confdefs.h.  */
5218 < _ACEOF
5219 < cat confdefs.h >>conftest.$ac_ext
5220 < cat >>conftest.$ac_ext <<_ACEOF
5221 < /* end confdefs.h.  */
5766 > call MPI_Init
5767 > end program main
5768  
5223 /* Override any gcc2 internal prototype to avoid an error.  */
5224 #ifdef __cplusplus
5225 extern "C"
5226 #endif
5227 /* We use char because int might match the return type of a gcc2
5228   builtin and then its argument prototype would still apply.  */
5229 char $ac_func ();
5230 int
5231 main ()
5232 {
5233 $ac_func ();
5234  ;
5235  return 0;
5236 }
5769   _ACEOF
5770   rm -f conftest.$ac_objext conftest$ac_exeext
5771   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 5247 | 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
5260 <        ac_cv_f90_mangling="$ac_case case"
5261 <        if test -z "$ac_underscore"; then
5262 <           ac_cv_f90_mangling="$ac_cv_f90_mangling, no underscore"
5263 <        else
5264 <           ac_cv_f90_mangling="$ac_cv_f90_mangling, underscore"
5798 > fi
5799  
5266        fi
5267        if test -z "$ac_extra"; then
5268           ac_cv_f90_mangling="$ac_cv_f90_mangling, no extra underscore"
5269        else
5270           ac_cv_f90_mangling="$ac_cv_f90_mangling, extra underscore"
5271        fi
5272      else
5273        ac_cv_f90_mangling="unknown"
5274      fi
5275  else
5276     ac_cv_f90_mangling="unknown"
5800  
5278  fi
5801  
5802 <  LIBS=$ac_save_LIBS
5281 <  ac_ext=f90
5282 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5283 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5284 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5285 <  rm -f cf90_test* conftest*
5286 < else
5287 <  echo "$as_me: failed program was:" >&5
5288 < sed 's/^/| /' conftest.$ac_ext >&5
5802 > F90="$acx_mpi_save_F90"
5803  
5290 fi
5291 rm -f conftest.$ac_objext conftest.$ac_ext
5292 ac_ext=f90
5293 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5294 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5295 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5804  
5297 fi
5298 echo "$as_me:$LINENO: result: $ac_cv_f90_mangling" >&5
5299 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")
5305 <          cat >>confdefs.h <<\_ACEOF
5306 < #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
5311 < _ACEOF
5312 < ;;
5313 <  "lower case, no underscore, extra underscore")
5314 <          cat >>confdefs.h <<\_ACEOF
5315 < #define F90_FUNC(name,NAME) name
5316 < _ACEOF
5816 >        :
5817 > fi
5818  
5318          cat >>confdefs.h <<\_ACEOF
5319 #define F90_FUNC_(name,NAME) name ## _
5320 _ACEOF
5321 ;;
5322  "lower case, underscore, no extra underscore")
5323          cat >>confdefs.h <<\_ACEOF
5324 #define F90_FUNC(name,NAME) name ## _
5325 _ACEOF
5819  
5327          cat >>confdefs.h <<\_ACEOF
5328 #define F90_FUNC_(name,NAME) name ## _
5329 _ACEOF
5330 ;;
5331  "lower case, underscore, extra underscore")
5332          cat >>confdefs.h <<\_ACEOF
5333 #define F90_FUNC(name,NAME) name ## _
5334 _ACEOF
5820  
5336          cat >>confdefs.h <<\_ACEOF
5337 #define F90_FUNC_(name,NAME) name ## __
5338 _ACEOF
5339 ;;
5340  "upper case, no underscore, no extra underscore")
5341          cat >>confdefs.h <<\_ACEOF
5342 #define F90_FUNC(name,NAME) NAME
5343 _ACEOF
5821  
5345          cat >>confdefs.h <<\_ACEOF
5346 #define F90_FUNC_(name,NAME) NAME
5347 _ACEOF
5348 ;;
5349  "upper case, no underscore, extra underscore")
5350          cat >>confdefs.h <<\_ACEOF
5351 #define F90_FUNC(name,NAME) NAME
5352 _ACEOF
5822  
5823 <          cat >>confdefs.h <<\_ACEOF
5824 < #define F90_FUNC_(name,NAME) NAME ## _
5825 < _ACEOF
5826 < ;;
5358 <  "upper case, underscore, no extra underscore")
5359 <          cat >>confdefs.h <<\_ACEOF
5360 < #define F90_FUNC(name,NAME) NAME ## _
5361 < _ACEOF
5362 <
5363 <          cat >>confdefs.h <<\_ACEOF
5364 < #define F90_FUNC_(name,NAME) NAME ## _
5365 < _ACEOF
5366 < ;;
5367 <  "upper case, underscore, extra underscore")
5368 <          cat >>confdefs.h <<\_ACEOF
5369 < #define F90_FUNC(name,NAME) NAME ## _
5370 < _ACEOF
5371 <
5372 <          cat >>confdefs.h <<\_ACEOF
5373 < #define F90_FUNC_(name,NAME) NAME ## __
5374 < _ACEOF
5375 < ;;
5376 <  *)
5377 <          { echo "$as_me:$LINENO: WARNING: unknown Fortran 90 name-mangling scheme" >&5
5378 < echo "$as_me: WARNING: unknown Fortran 90 name-mangling scheme" >&2;}
5379 <          ;;
5380 < esac
5381 <
5382 <
5383 <
5384 <
5385 <
5386 < echo "$as_me:$LINENO: checking for module suffix" >&5
5387 < echo $ECHO_N "checking for module suffix... $ECHO_C" >&6
5388 < rm -f conftest*
5389 < # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
5390 < rm -f work*
5391 < cat >conftest.f90 <<EOF
5392 <        module conftest
5393 <        integer n
5394 <        parameter (n=1)
5395 <        end module conftest
5396 < EOF
5397 < # SGI and absoft compilers generates module name in upper case!
5398 < testname="conftest"
5399 < modcase="lower"
5400 < if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
5401 <    MOD=`ls conftest* | grep -v conftest.f | grep -v conftest.o`
5402 <    MOD=`echo "$MOD" | sed -e 's/conftest\.//g'`
5403 <    if test -z "$MOD" ; then
5404 <        MOD=`ls CONFTEST* 2>/dev/null \
5405 <                | grep -v CONFTEST.f | grep -v CONFTEST.o`
5406 <        MOD=`echo "$MOD" | sed -e 's/CONFTEST\.//g'`
5407 <        if test -n "$MOD" ; then
5408 <            testname="CONFTEST"
5409 <            modcase="upper"
5410 <        fi
5411 <    fi
5412 <    if test -z "$MOD" ; then
5413 <        echo "$as_me:$LINENO: result: unknown" >&5
5414 < echo "${ECHO_T}unknown" >&6
5415 <        # Use mod if we can't figure it out
5416 <        MOD="mod"
5417 <    else
5418 <        echo "$as_me:$LINENO: result: $MOD" >&5
5419 < echo "${ECHO_T}$MOD" >&6
5420 <    fi
5421 <    if test -s work.pcl ; then
5422 <        { echo "$as_me:$LINENO: WARNING: Compiler generates auxillery files!" >&5
5423 < echo "$as_me: WARNING: Compiler generates auxillery files!" >&2;}
5424 <    fi
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 <    echo "$as_me:$LINENO: result: unknown" >&5
5829 < echo "${ECHO_T}unknown" >&6
5428 < fi
5828 >  mpi_f90_mods="/usr/local/include/f90choice"
5829 > fi;
5830  
5831 +  echo "$as_me:$LINENO: checking for MPI F90 modules" >&5
5832 + echo $ECHO_N "checking for MPI F90 modules... $ECHO_C" >&6
5833  
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 < # Check for module include path (some use -I, some (Solaris) use -M, some
5843 < # (absoft) use -p).
5436 < # Intel compilers use a wierd system: -cl,filename.pcl .  If no file is
5437 < # specified, work.pcl and work.pc are created.  However, if you specify
5438 < # a file, it must contain a the name of a file ending in .pc .  Ugh!
5439 < # Use the module made above
5440 < echo "$as_me:$LINENO: checking for module directory path flag" >&5
5441 < echo $ECHO_N "checking for module directory path flag... $ECHO_C" >&6
5442 < rm -f conftest*
5443 < # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
5444 < rm -f work*
5445 < cat >conftest.f90 <<EOF
5446 <        module conftest
5447 <        integer n
5448 <        parameter (n=1)
5449 <        end module conftest
5450 < EOF
5451 < # SGI and absoft compilers generates module name in upper case!
5452 < testname="conftest"
5453 < if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
5454 <   mod=`ls CONFTEST* 2>/dev/null | grep -v CONFTEST.f | grep -v CONFTEST.o`
5455 <   mod=`echo "$mod" | sed -e 's/CONFTEST\.//g'`
5456 <   if test -n "$mod" ; then
5457 <      testname="CONFTEST"
5458 <   fi
5459 <   madedir=0
5460 <   if test ! -d conf ; then mkdir conf ; madedir=1; fi
5461 <   cp $testname.$MOD conf
5462 <   rm -f conftest* CONFTEST*
5463 <   cat >conftest1.f90 <<EOF
5464 <        program main
5465 <        use conftest
5466 <        print *, n
5467 <        end
5468 < EOF
5469 <   F90_WORK_FILES_ARG=""
5470 <   F90MODINCSPEC=""
5471 <   if $F90 -c -Iconf conftest1.f90 > conftest.out 2>&1 ; then
5472 <       MODDIRFLAG="-I"
5473 <       F90MODINCSPEC="-I<dir>"
5474 <       echo "$as_me:$LINENO: result: -I" >&5
5475 < echo "${ECHO_T}-I" >&6
5476 <   elif $F90 -c -Mconf conftest1.f90 >> conftest.out 2>&1 ; then
5477 <       MODDIRFLAG="-M"
5478 <       F90MODINCSPEC="-M<dir>"
5479 <       echo "$as_me:$LINENO: result: -M" >&5
5480 < echo "${ECHO_T}-M" >&6
5481 <   elif $F90 -c -pconf conftest1.f90 >> conftest.out 2>&1 ; then
5482 <       MODDIRFLAG="-p"
5483 <       F90MODINCSPEC="-p<dir>"
5484 <       echo "$as_me:$LINENO: result: -p" >&5
5485 < echo "${ECHO_T}-p" >&6
5486 <   elif test -s work.pc ; then
5487 <        cp work.pc conf/mpimod.pc
5488 <        echo "mpimod.pc" > conf/mpimod.pcl
5489 <        echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl
5490 <        if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then
5491 <            MODDIRFLAG='-cl,mpimod.pcl'
5492 <            echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and directories" >&5
5493 < echo "${ECHO_T}-cl,filename where filename contains a list of files and directories" >&6
5494 <            F90_WORK_FILES_ARG="-cl,mpimod.pcl"
5495 <            F90MODINCSPEC="-cl,<dir>/<file>mod.pcl"
5496 <
5497 <        else
5498 <            # The version of the Intel compiler that I have refuses to let
5499 <            # you put the "work catalog" list anywhere but the current
5500 <            # directory. For example, you cannot in
5501 <         :
5502 <        fi
5503 <   fi
5504 <   if test -z "MODDIRFLAG" ; then
5505 <       echo "$as_me:$LINENO: result: unknown" >&5
5506 < echo "${ECHO_T}unknown" >&6
5507 <   fi
5508 <
5509 <
5510 <   rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod*
5511 <   if test $madedir = 1 ; then rmdir conf ; fi
5842 >  if test "$mpi_f90_mods"; then
5843 >  F90FLAGS="${F90FLAGS} ${MODDIRFLAG}${mpi_f90_mods}"
5844   fi
5845  
5846 +    cat >conftest.$ac_ext <<_ACEOF
5847  
5848  
5849 < echo "$as_me:$LINENO: checking for mpi-directory" >&5
5517 < echo $ECHO_N "checking for mpi-directory... $ECHO_C" >&6
5849 > program main
5850  
5851 < # Check whether --with-mpi_dir or --without-mpi_dir was given.
5852 < if test "${with_mpi_dir+set}" = set; then
5853 <  withval="$with_mpi_dir"
5522 <  MPI_DIR="$withval"
5523 < else
5524 <  MPI_DIR="/usr/local"
5525 < fi;
5526 < echo "$as_me:$LINENO: result: $MPI_DIR" >&5
5527 < echo "${ECHO_T}$MPI_DIR" >&6
5851 > use mpi
5852 > integer :: ierr
5853 > call MPI_Init(ierr)
5854  
5855  
5856 < echo "$as_me:$LINENO: checking for mpi-lib-directory" >&5
5531 < echo $ECHO_N "checking for mpi-lib-directory... $ECHO_C" >&6
5856 > end program main
5857  
5858 < # Check whether --with-mpi_libdir or --without-mpi_libdir was given.
5859 < if test "${with_mpi_libdir+set}" = set; then
5860 <  withval="$with_mpi_libdir"
5861 <  MPI_LIBDIR="$withval"
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;
5540 < echo "$as_me:$LINENO: result: $MPI_LIBDIR" >&5
5541 < 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  
5547 # Check whether --with-mpi_inc or --without-mpi_inc was given.
5548 if test "${with_mpi_inc+set}" = set; then
5549  withval="$with_mpi_inc"
5550  MPI_INC="$withval"
5551 else
5552  MPI_INC="$MPI_DIR/include"
5553 fi;
5554 echo "$as_me:$LINENO: result: $MPI_INC" >&5
5555 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*)
5564 <    echo "$as_me:$LINENO: checking whether to use signal-based MPI library" >&5
5565 < echo $ECHO_N "checking whether to use signal-based MPI library... $ECHO_C" >&6
5566 <    echo "$as_me:$LINENO: result: $PACX_SIGNAL" >&5
5567 < echo "${ECHO_T}$PACX_SIGNAL" >&6
5568 <    if test "x$PACX_SIGNAL" = "xyes" ; then
5569 <      if test -f "$MPI_LIBDIR/libmpi.a" ; then
5570 <        MPI_LIB="-lmpi"
5571 <      elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5572 <        MPI_LIB="-lmpi"
5573 <      elif test -f "$MPI_LIBDIR/libmpich.a" ; then
5574 <        MPI_LIB="-lmpich"
5575 <      else
5576 <        { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5
5577 < echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;}
5578 <   { (exit 1); exit 1; }; }
5579 <      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
5582 <         MPI_LIB="-lmpi_r"
5583 <      else
5584 <         { { echo "$as_me:$LINENO: error: libmpi_r not found; check path for MPI package..." >&5
5585 < echo "$as_me: error: libmpi_r not found; check path for MPI package..." >&2;}
5586 <   { (exit 1); exit 1; }; }
5587 <      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
5591 <  ;;
5592 <  *)                             if test -f "$MPI_LIBDIR/libmpi.a" ; then
5593 <      MPI_LIB="-lmpi"
5594 <    elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5595 <      MPI_LIB="-lmpi"
5596 <    elif test -f "$MPI_LIBDIR/libmpich.a" ; then
5597 <      MPI_LIB="-lmpich"
5598 <    else
5599 <      { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5
5600 < echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;}
5601 <   { (exit 1); exit 1; }; }
5903 >    if test -z "$MPIMODLIBNAME" ; then
5904 >       MPIMODLIBNAME="${MPI_LIBNAME}f90"
5905      fi
5603    echo "$as_me:$LINENO: result: found $MPI_LIB" >&5
5604 echo "${ECHO_T}found $MPI_LIB" >&6
5605  ;;
5606 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.
5617 < set dummy $ac_prog; ac_word=$2
5618 < echo "$as_me:$LINENO: checking for $ac_word" >&5
5619 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5620 < 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
5627 < for as_dir in $PATH
5628 < do
5629 <  IFS=$as_save_IFS
5630 <  test -z "$as_dir" && as_dir=.
5631 <  for ac_exec_ext in '' $ac_executable_extensions; do
5632 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5633 <    ac_cv_prog_MPIF90="$ac_prog"
5634 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5635 <    break 2
5636 <  fi
5637 < done
5638 < done
5639 <
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
5644 <  echo "$as_me:$LINENO: result: $MPIF90" >&5
5645 < echo "${ECHO_T}$MPIF90" >&6
5646 < else
5647 <  echo "$as_me:$LINENO: result: no" >&5
5648 < echo "${ECHO_T}no" >&6
5649 < 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  
5651  test -n "$MPIF90" && break
5652 done
5653 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  
5658
5659
5660 if test x = x"$MPILIBS"; then
5661        echo "$as_me:$LINENO: checking for MPI_Init" >&5
5662 echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6
5663                        cat >conftest.$ac_ext <<_ACEOF
5664
5950   program main
5951 + #include <stdlib.h>
5952 + #include <stdarg.h>
5953 + #include <string.h>
5954 + #include <float.h>
5955  
5956 <      call MPI_Init
5956 >
5957   end program main
5958  
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=" "
5684 <                                echo "$as_me:$LINENO: result: yes" >&5
5685 < 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
5691 < 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); } &&
5717 <         { 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
5731 < 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
5733 echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5734 echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5735 if test $ac_cv_lib_mpi_MPI_Init = yes; then
5736  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
6076 < if test x = x"$MPILIBS"; then
6077 <        echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
6078 < echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
6079 < if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
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 <  ac_check_lib_save_LIBS=$LIBS
6097 < LIBS="-lmpich  $LIBS"
5748 < cat >conftest.$ac_ext <<_ACEOF
6096 >  cat >conftest.$ac_ext <<_ACEOF
6097 > $ac_includes_default
6098  
6099 < program main
5751 <
5752 < call MPI_Init
5753 < end program main
5754 <
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
5776 < 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  
5788 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  
5802        :
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 6038 | Line 6509 | echo "$as_me:$LINENO: checking for egrep" >&5
6509   ac_compiler_gnu=$ac_cv_c_compiler_gnu
6510  
6511  
6041 echo "$as_me:$LINENO: checking for egrep" >&5
6042 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
6043 if test "${ac_cv_prog_egrep+set}" = set; then
6044  echo $ECHO_N "(cached) $ECHO_C" >&6
6045 else
6046  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
6047    then ac_cv_prog_egrep='grep -E'
6048    else ac_cv_prog_egrep='egrep'
6049    fi
6050 fi
6051 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
6052 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
6053 EGREP=$ac_cv_prog_egrep
6054
6055
6056 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6057 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6058 if test "${ac_cv_header_stdc+set}" = set; then
6059  echo $ECHO_N "(cached) $ECHO_C" >&6
6060 else
6061  cat >conftest.$ac_ext <<_ACEOF
6062 #line $LINENO "configure"
6063 /* confdefs.h.  */
6064 _ACEOF
6065 cat confdefs.h >>conftest.$ac_ext
6066 cat >>conftest.$ac_ext <<_ACEOF
6067 /* end confdefs.h.  */
6068 #include <stdlib.h>
6069 #include <stdarg.h>
6070 #include <string.h>
6071 #include <float.h>
6072
6073 int
6074 main ()
6075 {
6076
6077  ;
6078  return 0;
6079 }
6080 _ACEOF
6081 rm -f conftest.$ac_objext
6082 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6083  (eval $ac_compile) 2>&5
6084  ac_status=$?
6085  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6086  (exit $ac_status); } &&
6087         { ac_try='test -s conftest.$ac_objext'
6088  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6089  (eval $ac_try) 2>&5
6090  ac_status=$?
6091  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6092  (exit $ac_status); }; }; then
6093  ac_cv_header_stdc=yes
6094 else
6095  echo "$as_me: failed program was:" >&5
6096 sed 's/^/| /' conftest.$ac_ext >&5
6097
6098 ac_cv_header_stdc=no
6099 fi
6100 rm -f conftest.$ac_objext conftest.$ac_ext
6101
6102 if test $ac_cv_header_stdc = yes; then
6103  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6104  cat >conftest.$ac_ext <<_ACEOF
6105 #line $LINENO "configure"
6106 /* confdefs.h.  */
6107 _ACEOF
6108 cat confdefs.h >>conftest.$ac_ext
6109 cat >>conftest.$ac_ext <<_ACEOF
6110 /* end confdefs.h.  */
6111 #include <string.h>
6112
6113 _ACEOF
6114 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6115  $EGREP "memchr" >/dev/null 2>&1; then
6116  :
6117 else
6118  ac_cv_header_stdc=no
6119 fi
6120 rm -f conftest*
6121
6122 fi
6123
6124 if test $ac_cv_header_stdc = yes; then
6125  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6126  cat >conftest.$ac_ext <<_ACEOF
6127 #line $LINENO "configure"
6128 /* confdefs.h.  */
6129 _ACEOF
6130 cat confdefs.h >>conftest.$ac_ext
6131 cat >>conftest.$ac_ext <<_ACEOF
6132 /* end confdefs.h.  */
6133 #include <stdlib.h>
6134
6135 _ACEOF
6136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6137  $EGREP "free" >/dev/null 2>&1; then
6138  :
6139 else
6140  ac_cv_header_stdc=no
6141 fi
6142 rm -f conftest*
6143
6144 fi
6145
6146 if test $ac_cv_header_stdc = yes; then
6147  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6148  if test "$cross_compiling" = yes; then
6149  :
6150 else
6151  cat >conftest.$ac_ext <<_ACEOF
6152 #line $LINENO "configure"
6153 /* confdefs.h.  */
6154 _ACEOF
6155 cat confdefs.h >>conftest.$ac_ext
6156 cat >>conftest.$ac_ext <<_ACEOF
6157 /* end confdefs.h.  */
6158 #include <ctype.h>
6159 #if ((' ' & 0x0FF) == 0x020)
6160 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6161 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6162 #else
6163 # define ISLOWER(c) \
6164                   (('a' <= (c) && (c) <= 'i') \
6165                     || ('j' <= (c) && (c) <= 'r') \
6166                     || ('s' <= (c) && (c) <= 'z'))
6167 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6168 #endif
6169
6170 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6171 int
6172 main ()
6173 {
6174  int i;
6175  for (i = 0; i < 256; i++)
6176    if (XOR (islower (i), ISLOWER (i))
6177        || toupper (i) != TOUPPER (i))
6178      exit(2);
6179  exit (0);
6180 }
6181 _ACEOF
6182 rm -f conftest$ac_exeext
6183 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6184  (eval $ac_link) 2>&5
6185  ac_status=$?
6186  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6188  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6189  (eval $ac_try) 2>&5
6190  ac_status=$?
6191  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6192  (exit $ac_status); }; }; then
6193  :
6194 else
6195  echo "$as_me: program exited with status $ac_status" >&5
6196 echo "$as_me: failed program was:" >&5
6197 sed 's/^/| /' conftest.$ac_ext >&5
6198
6199 ( exit $ac_status )
6200 ac_cv_header_stdc=no
6201 fi
6202 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6203 fi
6204 fi
6205 fi
6206 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6207 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6208 if test $ac_cv_header_stdc = yes; then
6209
6210 cat >>confdefs.h <<\_ACEOF
6211 #define STDC_HEADERS 1
6212 _ACEOF
6213
6214 fi
6215
6216 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6227                  inttypes.h stdint.h unistd.h
6228 do
6229 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6230 echo "$as_me:$LINENO: checking for $ac_header" >&5
6231 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6232 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6233  echo $ECHO_N "(cached) $ECHO_C" >&6
6234 else
6235  cat >conftest.$ac_ext <<_ACEOF
6236 #line $LINENO "configure"
6237 /* confdefs.h.  */
6238 _ACEOF
6239 cat confdefs.h >>conftest.$ac_ext
6240 cat >>conftest.$ac_ext <<_ACEOF
6241 /* end confdefs.h.  */
6242 $ac_includes_default
6512  
6244 #include <$ac_header>
6245 _ACEOF
6246 rm -f conftest.$ac_objext
6247 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6248  (eval $ac_compile) 2>&5
6249  ac_status=$?
6250  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6251  (exit $ac_status); } &&
6252         { ac_try='test -s conftest.$ac_objext'
6253  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6254  (eval $ac_try) 2>&5
6255  ac_status=$?
6256  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6257  (exit $ac_status); }; }; then
6258  eval "$as_ac_Header=yes"
6259 else
6260  echo "$as_me: failed program was:" >&5
6261 sed 's/^/| /' conftest.$ac_ext >&5
6513  
6263 eval "$as_ac_Header=no"
6264 fi
6265 rm -f conftest.$ac_objext conftest.$ac_ext
6266 fi
6267 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6268 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6269 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6270  cat >>confdefs.h <<_ACEOF
6271 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6272 _ACEOF
6514  
6274 fi
6275
6276 done
6277
6278
6279
6280
6281
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 6549 | 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 6799 | 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 6819 | Line 7054 | echo "${ECHO_T}no" >&6
7054  
7055      echo "$as_me:$LINENO: result: no" >&5
7056   echo "${ECHO_T}no" >&6
6822
6823 fi;
6824
7057  
6826
6827
6828
6829 # Check whether --with-mpi_f90_mods or --without-mpi_f90_mods was given.
6830 if test "${with_mpi_f90_mods+set}" = set; then
6831  withval="$with_mpi_f90_mods"
6832  mpi_f90_mods="$withval"
6833 else
6834  mpi_f90_mods="/usr/local/include/f90choice"
7058   fi;
6836
6837  echo "$as_me:$LINENO: checking for MPI F90 modules" >&5
6838 echo $ECHO_N "checking for MPI F90 modules... $ECHO_C" >&6
6839
6840
6841  ac_ext=f90
6842 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6843 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6844 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6845
6846  ac_save_F90FLAGS=$F90FLAGS
6847
6848  if test "$mpi_f90_mods"; then
6849  F90FLAGS="${F90FLAGS} ${MODDIRFLAG}${mpi_f90_mods}"
6850 fi
6851
6852    cat >conftest.$ac_ext <<_ACEOF
6853
6854
6855 program main
6856
6857 use mpi
6858 integer :: ierr
6859 call MPI_Init(ierr)
6860
6861
6862 end program main
6863
6864 _ACEOF
6865 rm -f conftest.$ac_objext
6866 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6867  (eval $ac_compile) 2>&5
6868  ac_status=$?
6869  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6870  (exit $ac_status); } &&
6871         { ac_try='test -s conftest.$ac_objext'
6872  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6873  (eval $ac_try) 2>&5
6874  ac_status=$?
6875  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6876  (exit $ac_status); }; }; then
6877  HAVE_MPI_MOD=1
6878 else
6879  echo "$as_me: failed program was:" >&5
6880 sed 's/^/| /' conftest.$ac_ext >&5
6881
6882 HAVE_MPI_MOD=0
6883 fi
6884 rm -f conftest.$ac_objext conftest.$ac_ext
6885
6886  F90FLAGS=$ac_save_F90FLAGS
6887  ac_ext=f90
6888 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6889 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6890 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6891
6892
6893  if test "$HAVE_MPI_MOD" = 1; then
6894    echo "$as_me:$LINENO: result: yes" >&5
6895 echo "${ECHO_T}yes" >&6
6896
6897 cat >>confdefs.h <<\_ACEOF
6898 #define MPI_MOD 1
6899 _ACEOF
7059  
6901    MPI_F90_MODS="${mpi_f90_mods}"
7060  
6903    # The library name:
6904    if test -z "$MPI_LIB" ; then
6905       MPI_LIBNAME=-lmpich
6906    else
6907       MPI_LIBNAME="$MPI_LIB"
6908    fi
6909    if test -z "$MPIMODLIBNAME" ; then
6910       MPIMODLIBNAME="${MPI_LIBNAME}f90"
6911    fi
7061  
6913  else
6914    echo "$as_me:$LINENO: result: no" >&5
6915 echo "${ECHO_T}no" >&6
6916    { { echo "$as_me:$LINENO: error: Couldn't locate MPI F90 Modules" >&5
6917 echo "$as_me: error: Couldn't locate MPI F90 Modules" >&2;}
6918   { (exit 1); exit 1; }; }
6919  fi
7062  
7063  
6922
6923
6924
7064   OBJEXT=".$OBJEXT"
7065  
7066   OOPSE=oopse
# Line 7629 | 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 7646 | 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
7649 s,@F90LIBS@,$F90LIBS,;t t
7650 s,@F90_FUNC@,$F90_FUNC,;t t
7651 s,@F90_FUNC_@,$F90_FUNC_,;t t
7652 s,@MOD@,$MOD,;t t
7653 s,@F90_WORK_FILES_ARG@,$F90_WORK_FILES_ARG,;t t
7654 s,@MODDIRFLAG@,$MODDIRFLAG,;t t
7655 s,@F90MODINCSPEC@,$F90MODINCSPEC,;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 7660 | 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 7670 | 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
7673 s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t
7674 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