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 826 by gezelter, Mon Oct 27 23:00:59 2003 UTC vs.
Revision 878 by gezelter, Fri Dec 12 15:42:13 2003 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 4115 | Line 4867 | if test x"$F90FLAGS" == x ; then
4867   # Try to determine "good" native compiler flags if none specified on command
4868   # line
4869  
4870 < if test x"$F90FLAGS" == x ; then
4870 > if test x"$F90FLAGS" = x ; then
4871    F90FLAGS=""
4872    case "${host_cpu}-${host_os}" in
4873  
# Line 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
5271 < #line $LINENO "configure"
5272 < /* confdefs.h.  */
4523 < _ACEOF
4524 < cat confdefs.h >>conftest.$ac_ext
4525 < cat >>conftest.$ac_ext <<_ACEOF
4526 < /* end confdefs.h.  */
5271 >
5272 > program main
5273  
5274 < /* Override any gcc2 internal prototype to avoid an error.  */
5275 < #ifdef __cplusplus
5276 < extern "C"
4531 < #endif
4532 < /* 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 < }
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/libmpi.a" ; then
5607 >      MPI_LIB="-lmpi"
5608 >    elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5609 >      MPI_LIB="-lmpi"
5610 >    elif test -f "$MPI_LIBDIR/libmpich.a" ; then
5611 >      MPI_LIB="-lmpich"
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 + echo "$as_me:$LINENO: result: no" >&5
5705 + echo "${ECHO_T}no" >&6
5706 + fi
5707 + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5708 + fi
5709 + if test x = x"$MPILIBS"; then
5710 +        echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5711 + echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
5712 + if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
5713 +  echo $ECHO_N "(cached) $ECHO_C" >&6
5714 + else
5715 +  ac_check_lib_save_LIBS=$LIBS
5716 + LIBS="-lmpi  $LIBS"
5717   cat >conftest.$ac_ext <<_ACEOF
5718  
5719   program main
5720  
5721 <
5721 > call MPI_Init
5722   end program main
5723  
5724   _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
5728 +  ac_status=$?
5729 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5730 +  (exit $ac_status); } &&
5731 +         { ac_try='test -s conftest$ac_exeext'
5732 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5733 +  (eval $ac_try) 2>&5
5734 +  ac_status=$?
5735 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5736 +  (exit $ac_status); }; }; then
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 < # Compile and link our simple test program by passing a flag (argument
5743 < # 1 to this macro) to the Fortran 90 compiler in order to get
5744 < # "verbose" output that we can then parse for the Fortran 90 linker
5745 < # flags.
5746 < ac_save_F90FLAGS=$F90FLAGS
5747 < F90FLAGS="$F90FLAGS $ac_verb"
5742 > ac_cv_lib_mpi_MPI_Init=no
5743 > fi
5744 > rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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 < (eval echo $as_me:4871: \"$ac_link\") >&5
5754 < ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
5755 < echo "$ac_f90_v_output" >&5
5756 < F90FLAGS=$ac_save_F90FLAGS
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 < 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
5764 > program main
5765  
5766 < # If we are using xlf then replace all the commas with spaces.
5767 < 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'`
4885 < fi
5766 > call MPI_Init
5767 > end program main
5768  
5769 < # If we are using Cray Fortran then delete quotes.
5770 < # Use "\"" instead of '"' for font-lock-mode.
5771 < # FIXME: a more general fix for quoted arguments with spaces?
5772 < if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
5773 <  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
5774 < fi
5775 <  # look for -l* and *.a constructs in the output
5776 <  for ac_arg in $ac_f90_v_output; do
5777 <     case $ac_arg in
5778 <        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
5779 <          ac_cv_prog_f90_v=$ac_verb
5780 <          break 2 ;;
5781 <     esac
5782 <  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
5769 > _ACEOF
5770 > rm -f conftest.$ac_objext conftest$ac_exeext
5771 > if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5772 >  (eval $ac_link) 2>&5
5773 >  ac_status=$?
5774 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5775 >  (exit $ac_status); } &&
5776 >         { ac_try='test -s conftest$ac_exeext'
5777 >  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5778 >  (eval $ac_try) 2>&5
5779 >  ac_status=$?
5780 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5781 >  (exit $ac_status); }; }; then
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 < { echo "$as_me:$LINENO: WARNING: compilation failed" >&5
4911 < echo "$as_me: WARNING: compilation failed" >&2;}
5787 > ac_cv_lib_mpich_MPI_Init=no
5788   fi
5789 < rm -f conftest.$ac_objext conftest.$ac_ext
5789 > rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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   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
4921  echo $ECHO_N "(cached) $ECHO_C" >&6
4922 else
4923  if test "x$F90LIBS" != "x"; then
4924  ac_cv_f90libs="$F90LIBS" # Let the user override the test.
4925 else
5799  
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
5800  
4932 cat >conftest.$ac_ext <<_ACEOF
5801  
5802 < program main
5802 > F90="$acx_mpi_save_F90"
5803  
5804  
4937 end program main
5805  
5806 + # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
5807 + if test x = x"$MPILIBS"; then
5808 +
5809 +        :
5810 + else
5811 +
5812 + cat >>confdefs.h <<\_ACEOF
5813 + #define HAVE_MPI 1
5814   _ACEOF
5815  
5816 < # Compile and link our simple test program by passing a flag (argument
5817 < # 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"
5816 >        :
5817 > fi
5818  
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
5819  
5820 < rm -f conftest.*
5821 < ac_ext=f90
5820 >
5821 >
5822 >
5823 > # Check whether --with-mpi_f90_mods or --without-mpi_f90_mods was given.
5824 > if test "${with_mpi_f90_mods+set}" = set; then
5825 >  withval="$with_mpi_f90_mods"
5826 >  mpi_f90_mods="$withval"
5827 > else
5828 >  mpi_f90_mods="/usr/local/include/f90choice"
5829 > fi;
5830 >
5831 >  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 < # 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
5840 >  ac_save_F90FLAGS=$F90FLAGS
5841  
5842 < # If we are using Cray Fortran then delete quotes.
5843 < # 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"`
5842 >  if test "$mpi_f90_mods"; then
5843 >  F90FLAGS="${F90FLAGS} ${MODDIRFLAG}${mpi_f90_mods}"
5844   fi
5845  
5846 < ac_cv_f90libs=
5846 >    cat >conftest.$ac_ext <<_ACEOF
5847  
4973 # Save positional arguments (if any)
4974 ac_save_positional="$@"
5848  
5849 < 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
5849 > program main
5850  
5851 <  if test x"$ac_exists" = xtrue; then
5852 <  :
5853 < else
4993 <  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
4994 < fi
5851 > use mpi
5852 > integer :: ierr
5853 > call MPI_Init(ierr)
5854  
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
5855  
5856 <  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
5856 > end program main
5857  
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
5858   _ACEOF
5859   rm -f conftest.$ac_objext
5860   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
# Line 5136 | Line 5868 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5868    ac_status=$?
5869    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870    (exit $ac_status); }; }; then
5871 <  mv conftest.$ac_objext cf90_test.$ac_objext
5871 >  HAVE_MPI_MOD=1
5872 > else
5873 >  echo "$as_me: failed program was:" >&5
5874 > sed 's/^/| /' conftest.$ac_ext >&5
5875  
5876 <  ac_ext=c
5877 < ac_cpp='$CPP $CPPFLAGS'
5878 < 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
5876 > HAVE_MPI_MOD=0
5877 > fi
5878 > rm -f conftest.$ac_objext conftest.$ac_ext
5879  
5880 <  ac_save_LIBS=$LIBS
5881 <  LIBS="cf90_test.$ac_objext $F90LIBS $LIBS"
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  
5886 <  ac_success=no
5887 <  for ac_foobar in foobar FOOBAR; do
5888 <    for ac_underscore in "" "_"; do
5889 <      ac_func="$ac_foobar$ac_underscore"
5890 <      cat >conftest.$ac_ext <<_ACEOF
5891 < #line $LINENO "configure"
5892 < /* confdefs.h.  */
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
5158 cat confdefs.h >>conftest.$ac_ext
5159 cat >>conftest.$ac_ext <<_ACEOF
5160 /* end confdefs.h.  */
5894  
5895 < /* Override any gcc2 internal prototype to avoid an error.  */
5896 < #ifdef __cplusplus
5897 < extern "C"
5898 < #endif
5899 < /* We use char because int might match the return type of a gcc2
5900 <   builtin and then its argument prototype would still apply.  */
5901 < char $ac_func ();
5902 < int
5903 < main ()
5904 < {
5905 < $ac_func ();
5906 <  ;
5907 <  return 0;
5908 < }
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 >       MPI_LIBNAME="$MPI_LIB"
5902 >    fi
5903 >    if test -z "$MPIMODLIBNAME" ; then
5904 >       MPIMODLIBNAME="${MPI_LIBNAME}f90"
5905 >    fi
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 < rm -f conftest.$ac_objext conftest$ac_exeext
5922 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5923 <  (eval $ac_link) 2>&5
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 >        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 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 > 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 >
5942 >
5943 > echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5944 > echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5945 > if test "${ac_cv_header_stdc+set}" = set; then
5946 >  echo $ECHO_N "(cached) $ECHO_C" >&6
5947 > else
5948 >  cat >conftest.$ac_ext <<_ACEOF
5949 >
5950 > program main
5951 > #include <stdlib.h>
5952 > #include <stdarg.h>
5953 > #include <string.h>
5954 > #include <float.h>
5955 >
5956 >
5957 > end program main
5958 >
5959 > _ACEOF
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 <  ac_success=yes; break 2
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 + ac_cv_header_stdc=no
5978   fi
5979 < rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5196 <    done
5197 <  done
5979 > rm -f conftest.$ac_objext conftest.$ac_ext
5980  
5981 <  if test "$ac_success" = "yes"; then
5982 <     case $ac_foobar in
5983 <        foobar)
5984 <           ac_case=lower
5203 <           ac_foo_bar=foo_bar
5204 <           ;;
5205 <        FOOBAR)
5206 <           ac_case=upper
5207 <           ac_foo_bar=FOO_BAR
5208 <           ;;
5209 <     esac
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 <     ac_success_extra=no
5987 <     for ac_extra in "" "_"; do
5988 <        ac_func="$ac_foo_bar$ac_underscore$ac_extra"
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 > rm -f conftest*
5994  
5995 <        cat >conftest.$ac_ext <<_ACEOF
5996 < #line $LINENO "configure"
5997 < /* confdefs.h.  */
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 < cat confdefs.h >>conftest.$ac_ext
6004 < cat >>conftest.$ac_ext <<_ACEOF
6005 < /* end confdefs.h.  */
6003 > if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6004 >  $EGREP "free" >/dev/null 2>&1; then
6005 >  :
6006 > else
6007 >  ac_cv_header_stdc=no
6008 > fi
6009 > rm -f conftest*
6010  
6011 < /* Override any gcc2 internal prototype to avoid an error.  */
6012 < #ifdef __cplusplus
6013 < extern "C"
6011 > fi
6012 >
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 < /* We use char because int might match the return type of a gcc2
6031 <   builtin and then its argument prototype would still apply.  */
5229 < char $ac_func ();
6030 >
6031 > #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6032   int
6033   main ()
6034   {
6035 < $ac_func ();
6036 <  ;
6037 <  return 0;
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); } &&
5244 <         { 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_success_extra=yes; break
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 + ( exit $ac_status )
6061 + ac_cv_header_stdc=no
6062   fi
6063 < rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5257 <     done
5258 <
5259 <     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"
5265 <
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"
5277 <
5278 <  fi
5279 <
5280 <  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
5289 <
6063 > rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6064   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
5296
6065   fi
5298 echo "$as_me:$LINENO: result: $ac_cv_f90_mangling" >&5
5299 echo "${ECHO_T}$ac_cv_f90_mangling" >&6
5300
5301
5302
5303 case $ac_cv_f90_mangling in
5304  "lower case, no underscore, no extra underscore")
5305          cat >>confdefs.h <<\_ACEOF
5306 #define F90_FUNC(name,NAME) name
5307 _ACEOF
5308
5309          cat >>confdefs.h <<\_ACEOF
5310 #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
5317
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
5326
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
5335
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
5344
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
5353
5354          cat >>confdefs.h <<\_ACEOF
5355 #define F90_FUNC_(name,NAME) NAME ## _
5356 _ACEOF
5357 ;;
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.f <<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.f > 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
5425 else
5426    echo "$as_me:$LINENO: result: unknown" >&5
5427 echo "${ECHO_T}unknown" >&6
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 <
6072 <
6073 <
5433 <
5434 < # Check for module include path (some use -I, some (Solaris) use -M, some
5435 < # (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 < madedir=0
5443 < if test ! -d conf ; then mkdir conf ; madedir=1; fi
5444 < cp $testname.$MOD conf
5445 < rm -f conftest* CONFTEST*
5446 < cat >conftest1.f <<EOF
5447 <        program main
5448 <        use conftest
5449 <        print *, n
5450 <        end
5451 < EOF
5452 < F90_WORK_FILES_ARG=""
5453 < F90MODINCSPEC=""
5454 < if $F90 -c -Iconf conftest1.f > conftest.out 2>&1 ; then
5455 <    MODDIRFLAG="-I"
5456 <    F90MODINCSPEC="-I<dir>"
5457 <    echo "$as_me:$LINENO: result: -I" >&5
5458 < echo "${ECHO_T}-I" >&6
5459 < elif $F90 -c -Mconf conftest1.f >> conftest.out 2>&1 ; then
5460 <    MODDIRFLAG="-M"
5461 <    F90MODINCSPEC="-M<dir>"
5462 <    echo "$as_me:$LINENO: result: -M" >&5
5463 < echo "${ECHO_T}-M" >&6
5464 < elif $F90 -c -pconf conftest1.f >> conftest.out 2>&1 ; then
5465 <    MODDIRFLAG="-p"
5466 <    F90MODINCSPEC="-p<dir>"
5467 <    echo "$as_me:$LINENO: result: -p" >&5
5468 < echo "${ECHO_T}-p" >&6
5469 < elif test -s work.pc ; then
5470 <     cp work.pc conf/mpimod.pc
5471 <     echo "mpimod.pc" > conf/mpimod.pcl
5472 <     echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl
5473 <     if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then
5474 <         MODDIRFLAG='-cl,mpimod.pcl'
5475 <         echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and
5476 < directories" >&5
5477 < echo "${ECHO_T}-cl,filename where filename contains a list of files and
5478 < directories" >&6
5479 <         F90_WORK_FILES_ARG="-cl,mpimod.pcl"
5480 <         F90MODINCSPEC="-cl,<dir>/<file>mod.pcl"
6071 > cat >>confdefs.h <<\_ACEOF
6072 > #define STDC_HEADERS 1
6073 > _ACEOF
6074  
5482     else
5483         # The version of the Intel compiler that I have refuses to let
5484         # you put the "work catalog" list anywhere but the current directory.
5485         # For example, you cannot in
5486         :
5487     fi
6075   fi
5489 if test -z "MODDIRFLAG" ; then
5490    echo "$as_me:$LINENO: result: unknown" >&5
5491 echo "${ECHO_T}unknown" >&6
5492 fi
6076  
6077 + # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6078  
5495 rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod*
5496 if test $madedir = 1 ; then rmdir conf ; fi
6079  
6080  
6081  
5500 echo "$as_me:$LINENO: checking for mpi-directory" >&5
5501 echo $ECHO_N "checking for mpi-directory... $ECHO_C" >&6
6082  
5503 # Check whether --with-mpi_dir or --without-mpi_dir was given.
5504 if test "${with_mpi_dir+set}" = set; then
5505  withval="$with_mpi_dir"
5506  MPI_DIR="$withval"
5507 else
5508  MPI_DIR="/usr/local"
5509 fi;
5510 echo "$as_me:$LINENO: result: $MPI_DIR" >&5
5511 echo "${ECHO_T}$MPI_DIR" >&6
6083  
6084  
5514 echo "$as_me:$LINENO: checking for mpi-lib-directory" >&5
5515 echo $ECHO_N "checking for mpi-lib-directory... $ECHO_C" >&6
6085  
5517 # Check whether --with-mpi_libdir or --without-mpi_libdir was given.
5518 if test "${with_mpi_libdir+set}" = set; then
5519  withval="$with_mpi_libdir"
5520  MPI_LIBDIR="$withval"
5521 else
5522  MPI_LIBDIR="$MPI_DIR/lib"
5523 fi;
5524 echo "$as_me:$LINENO: result: $MPI_LIBDIR" >&5
5525 echo "${ECHO_T}$MPI_LIBDIR" >&6
6086  
6087 <
6088 < echo "$as_me:$LINENO: checking for mpi-inc-directory" >&5
5529 < echo $ECHO_N "checking for mpi-inc-directory... $ECHO_C" >&6
5530 <
5531 < # Check whether --with-mpi_inc or --without-mpi_inc was given.
5532 < if test "${with_mpi_inc+set}" = set; then
5533 <  withval="$with_mpi_inc"
5534 <  MPI_INC="$withval"
5535 < else
5536 <  MPI_INC="$MPI_DIR/include"
5537 < fi;
5538 < echo "$as_me:$LINENO: result: $MPI_INC" >&5
5539 < echo "${ECHO_T}$MPI_INC" >&6
5540 <
5541 <
5542 <
5543 < echo "$as_me:$LINENO: checking for MPI library" >&5
5544 < echo $ECHO_N "checking for MPI library... $ECHO_C" >&6
5545 < MPI_LIB=""
5546 < case "$host" in
5547 <  *-ibm-aix*)
5548 <    echo "$as_me:$LINENO: checking whether to use signal-based MPI library" >&5
5549 < echo $ECHO_N "checking whether to use signal-based MPI library... $ECHO_C" >&6
5550 <    echo "$as_me:$LINENO: result: $PACX_SIGNAL" >&5
5551 < echo "${ECHO_T}$PACX_SIGNAL" >&6
5552 <    if test "x$PACX_SIGNAL" = "xyes" ; then
5553 <      if test -f "$MPI_LIBDIR/libmpi.a" ; then
5554 <        MPI_LIB="-lmpi"
5555 <      elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5556 <        MPI_LIB="-lmpi"
5557 <      elif test -f "$MPI_LIBDIR/libmpich.a" ; then
5558 <        MPI_LIB="-lmpich"
5559 <      else
5560 <        { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5
5561 < echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;}
5562 <   { (exit 1); exit 1; }; }
5563 <      fi
5564 <    else
5565 <      if test -f "$MPI_LIBDIR/libmpi_r.a" ; then
5566 <         MPI_LIB="-lmpi_r"
5567 <      else
5568 <         { { echo "$as_me:$LINENO: error: libmpi_r not found; check path for MPI package..." >&5
5569 < echo "$as_me: error: libmpi_r not found; check path for MPI package..." >&2;}
5570 <   { (exit 1); exit 1; }; }
5571 <      fi
5572 <    fi
5573 <    echo "$as_me:$LINENO: result: found $MPI_LIB" >&5
5574 < echo "${ECHO_T}found $MPI_LIB" >&6
5575 <  ;;
5576 <  *)                             if test -f "$MPI_LIBDIR/libmpi.a" ; then
5577 <      MPI_LIB="-lmpi"
5578 <    elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5579 <      MPI_LIB="-lmpi"
5580 <    elif test -f "$MPI_LIBDIR/libmpich.a" ; then
5581 <      MPI_LIB="-lmpich"
5582 <    else
5583 <      { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5
5584 < echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;}
5585 <   { (exit 1); exit 1; }; }
5586 <    fi
5587 <    echo "$as_me:$LINENO: result: found $MPI_LIB" >&5
5588 < echo "${ECHO_T}found $MPI_LIB" >&6
5589 <  ;;
5590 < esac
5591 <
5592 <
5593 <
5594 <
5595 <
5596 <
5597 <
5598 <        for ac_prog in mpif90 hf90 mpxlf90 mpf90 mpxlf95 mpxlf_r
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 <  # Extract the first word of "$ac_prog", so it can be a program name with args.
6091 < set dummy $ac_prog; ac_word=$2
6092 < echo "$as_me:$LINENO: checking for $ac_word" >&5
6093 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5604 < if test "${ac_cv_prog_MPIF90+set}" = set; then
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 <  if test -n "$MPIF90"; then
6097 <  ac_cv_prog_MPIF90="$MPIF90" # Let the user override the test.
5609 < else
5610 < as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5611 < for as_dir in $PATH
5612 < do
5613 <  IFS=$as_save_IFS
5614 <  test -z "$as_dir" && as_dir=.
5615 <  for ac_exec_ext in '' $ac_executable_extensions; do
5616 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5617 <    ac_cv_prog_MPIF90="$ac_prog"
5618 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5619 <    break 2
5620 <  fi
5621 < done
5622 < done
6096 >  cat >conftest.$ac_ext <<_ACEOF
6097 > $ac_includes_default
6098  
6099 < fi
5625 < fi
5626 < MPIF90=$ac_cv_prog_MPIF90
5627 < if test -n "$MPIF90"; then
5628 <  echo "$as_me:$LINENO: result: $MPIF90" >&5
5629 < echo "${ECHO_T}$MPIF90" >&6
5630 < else
5631 <  echo "$as_me:$LINENO: result: no" >&5
5632 < echo "${ECHO_T}no" >&6
5633 < fi
5634 <
5635 <  test -n "$MPIF90" && break
5636 < done
5637 < test -n "$MPIF90" || MPIF90="$F90"
5638 <
5639 <        acx_mpi_save_F90="$F90"
5640 <        F90="$MPIF90"
5641 <
5642 <
5643 <
5644 < if test x = x"$MPILIBS"; then
5645 <        echo "$as_me:$LINENO: checking for MPI_Init" >&5
5646 < echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6
5647 <                        cat >conftest.$ac_ext <<_ACEOF
5648 <
5649 < program main
5650 <
5651 <      call MPI_Init
5652 < end program main
5653 <
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 <  MPILIBS=" "
5668 <                                echo "$as_me:$LINENO: result: yes" >&5
5669 < echo "${ECHO_T}yes" >&6
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 < echo "$as_me:$LINENO: result: no" >&5
5675 < echo "${ECHO_T}no" >&6
6118 > eval "$as_ac_Header=no"
6119   fi
6120 < rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6120 > rm -f conftest.$ac_objext conftest.$ac_ext
6121   fi
6122 < if test x = x"$MPILIBS"; then
6123 <        echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
6124 < echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
6125 < if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
6126 <  echo $ECHO_N "(cached) $ECHO_C" >&6
6127 < else
5685 <  ac_check_lib_save_LIBS=$LIBS
5686 < LIBS="-lmpi  $LIBS"
5687 < cat >conftest.$ac_ext <<_ACEOF
5688 <
5689 < program main
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 < call MPI_Init
5692 < end program main
6129 > fi
6130  
6131 + done
6132 +
6133 +
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 conftest$ac_exeext
6155 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6156 <  (eval $ac_link) 2>&5
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_exeext'
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_cv_lib_mpi_MPI_Init=yes
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_cv_lib_mpi_MPI_Init=no
6171 > ac_header_compiler=no
6172   fi
6173 < rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6174 < LIBS=$ac_check_lib_save_LIBS
6175 < fi
5717 < echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5718 < echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5719 < if test $ac_cv_lib_mpi_MPI_Init = yes; then
5720 <  MPILIBS="-lmpi"
5721 < 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 < fi
6178 < if test x = x"$MPILIBS"; then
6179 <        echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
5726 < echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
5727 < if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
5728 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5729 < else
5730 <  ac_check_lib_save_LIBS=$LIBS
5731 < LIBS="-lmpich  $LIBS"
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 <
5734 < program main
5735 <
5736 < call MPI_Init
5737 < end program main
5738 <
6181 > #include <$ac_header>
6182   _ACEOF
6183 < rm -f conftest.$ac_objext conftest$ac_exeext
6184 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5742 <  (eval $ac_link) 2>&5
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); } &&
6191 <         { ac_try='test -s conftest$ac_exeext'
6192 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6193 <  (eval $ac_try) 2>&5
6194 <  ac_status=$?
6195 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5751 <  (exit $ac_status); }; }; then
5752 <  ac_cv_lib_mpich_MPI_Init=yes
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 < ac_cv_lib_mpich_MPI_Init=no
6205 >  ac_header_preproc=no
6206   fi
6207 < rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6208 < LIBS=$ac_check_lib_save_LIBS
6209 < fi
6210 < echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
6211 < echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
6212 < if test $ac_cv_lib_mpich_MPI_Init = yes; then
6213 <  MPILIBS="-lmpich"
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   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  
6260 + fi
6261  
6262 + done
6263  
6264 < F90="$acx_mpi_save_F90"
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  
5775
5776 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
5777 if test x = x"$MPILIBS"; then
5778
5779        :
5780 else
5781
6271   cat >>confdefs.h <<\_ACEOF
6272 < #define HAVE_MPI 1
6272 > #define MPI_H 1
6273   _ACEOF
6274  
5786        :
6275   fi
6276  
5789
6277   ac_ext=c
6278   ac_cpp='$CPP $CPPFLAGS'
6279   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
# Line 6020 | Line 6507 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
6507   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6508   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6509   ac_compiler_gnu=$ac_cv_c_compiler_gnu
6023
6024
6025 echo "$as_me:$LINENO: checking for egrep" >&5
6026 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
6027 if test "${ac_cv_prog_egrep+set}" = set; then
6028  echo $ECHO_N "(cached) $ECHO_C" >&6
6029 else
6030  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
6031    then ac_cv_prog_egrep='grep -E'
6032    else ac_cv_prog_egrep='egrep'
6033    fi
6034 fi
6035 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
6036 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
6037 EGREP=$ac_cv_prog_egrep
6038
6039
6040 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6041 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6042 if test "${ac_cv_header_stdc+set}" = set; then
6043  echo $ECHO_N "(cached) $ECHO_C" >&6
6044 else
6045  cat >conftest.$ac_ext <<_ACEOF
6046 #line $LINENO "configure"
6047 /* confdefs.h.  */
6048 _ACEOF
6049 cat confdefs.h >>conftest.$ac_ext
6050 cat >>conftest.$ac_ext <<_ACEOF
6051 /* end confdefs.h.  */
6052 #include <stdlib.h>
6053 #include <stdarg.h>
6054 #include <string.h>
6055 #include <float.h>
6056
6057 int
6058 main ()
6059 {
6060
6061  ;
6062  return 0;
6063 }
6064 _ACEOF
6065 rm -f conftest.$ac_objext
6066 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6067  (eval $ac_compile) 2>&5
6068  ac_status=$?
6069  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6070  (exit $ac_status); } &&
6071         { ac_try='test -s conftest.$ac_objext'
6072  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6073  (eval $ac_try) 2>&5
6074  ac_status=$?
6075  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076  (exit $ac_status); }; }; then
6077  ac_cv_header_stdc=yes
6078 else
6079  echo "$as_me: failed program was:" >&5
6080 sed 's/^/| /' conftest.$ac_ext >&5
6081
6082 ac_cv_header_stdc=no
6083 fi
6084 rm -f conftest.$ac_objext conftest.$ac_ext
6085
6086 if test $ac_cv_header_stdc = yes; then
6087  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6088  cat >conftest.$ac_ext <<_ACEOF
6089 #line $LINENO "configure"
6090 /* confdefs.h.  */
6091 _ACEOF
6092 cat confdefs.h >>conftest.$ac_ext
6093 cat >>conftest.$ac_ext <<_ACEOF
6094 /* end confdefs.h.  */
6095 #include <string.h>
6096
6097 _ACEOF
6098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6099  $EGREP "memchr" >/dev/null 2>&1; then
6100  :
6101 else
6102  ac_cv_header_stdc=no
6103 fi
6104 rm -f conftest*
6105
6106 fi
6107
6108 if test $ac_cv_header_stdc = yes; then
6109  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6110  cat >conftest.$ac_ext <<_ACEOF
6111 #line $LINENO "configure"
6112 /* confdefs.h.  */
6113 _ACEOF
6114 cat confdefs.h >>conftest.$ac_ext
6115 cat >>conftest.$ac_ext <<_ACEOF
6116 /* end confdefs.h.  */
6117 #include <stdlib.h>
6118
6119 _ACEOF
6120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6121  $EGREP "free" >/dev/null 2>&1; then
6122  :
6123 else
6124  ac_cv_header_stdc=no
6125 fi
6126 rm -f conftest*
6127
6128 fi
6129
6130 if test $ac_cv_header_stdc = yes; then
6131  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6132  if test "$cross_compiling" = yes; then
6133  :
6134 else
6135  cat >conftest.$ac_ext <<_ACEOF
6136 #line $LINENO "configure"
6137 /* confdefs.h.  */
6138 _ACEOF
6139 cat confdefs.h >>conftest.$ac_ext
6140 cat >>conftest.$ac_ext <<_ACEOF
6141 /* end confdefs.h.  */
6142 #include <ctype.h>
6143 #if ((' ' & 0x0FF) == 0x020)
6144 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6145 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6146 #else
6147 # define ISLOWER(c) \
6148                   (('a' <= (c) && (c) <= 'i') \
6149                     || ('j' <= (c) && (c) <= 'r') \
6150                     || ('s' <= (c) && (c) <= 'z'))
6151 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6152 #endif
6153
6154 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6155 int
6156 main ()
6157 {
6158  int i;
6159  for (i = 0; i < 256; i++)
6160    if (XOR (islower (i), ISLOWER (i))
6161        || toupper (i) != TOUPPER (i))
6162      exit(2);
6163  exit (0);
6164 }
6165 _ACEOF
6166 rm -f conftest$ac_exeext
6167 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6168  (eval $ac_link) 2>&5
6169  ac_status=$?
6170  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6171  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6172  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6173  (eval $ac_try) 2>&5
6174  ac_status=$?
6175  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6176  (exit $ac_status); }; }; then
6177  :
6178 else
6179  echo "$as_me: program exited with status $ac_status" >&5
6180 echo "$as_me: failed program was:" >&5
6181 sed 's/^/| /' conftest.$ac_ext >&5
6182
6183 ( exit $ac_status )
6184 ac_cv_header_stdc=no
6185 fi
6186 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6187 fi
6188 fi
6189 fi
6190 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6191 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6192 if test $ac_cv_header_stdc = yes; then
6193
6194 cat >>confdefs.h <<\_ACEOF
6195 #define STDC_HEADERS 1
6196 _ACEOF
6197
6198 fi
6199
6200 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6211                  inttypes.h stdint.h unistd.h
6212 do
6213 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6214 echo "$as_me:$LINENO: checking for $ac_header" >&5
6215 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6216 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6217  echo $ECHO_N "(cached) $ECHO_C" >&6
6218 else
6219  cat >conftest.$ac_ext <<_ACEOF
6220 #line $LINENO "configure"
6221 /* confdefs.h.  */
6222 _ACEOF
6223 cat confdefs.h >>conftest.$ac_ext
6224 cat >>conftest.$ac_ext <<_ACEOF
6225 /* end confdefs.h.  */
6226 $ac_includes_default
6227
6228 #include <$ac_header>
6229 _ACEOF
6230 rm -f conftest.$ac_objext
6231 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6232  (eval $ac_compile) 2>&5
6233  ac_status=$?
6234  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6235  (exit $ac_status); } &&
6236         { ac_try='test -s conftest.$ac_objext'
6237  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6238  (eval $ac_try) 2>&5
6239  ac_status=$?
6240  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6241  (exit $ac_status); }; }; then
6242  eval "$as_ac_Header=yes"
6243 else
6244  echo "$as_me: failed program was:" >&5
6245 sed 's/^/| /' conftest.$ac_ext >&5
6246
6247 eval "$as_ac_Header=no"
6248 fi
6249 rm -f conftest.$ac_objext conftest.$ac_ext
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 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6254  cat >>confdefs.h <<_ACEOF
6255 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6256 _ACEOF
6257
6258 fi
6259
6260 done
6510  
6511  
6512  
# Line 6533 | 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 6783 | 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 6810 | Line 7061 | fi;
7061  
7062  
7063  
6813 # Check whether --with-mpi_f90_mods or --without-mpi_f90_mods was given.
6814 if test "${with_mpi_f90_mods+set}" = set; then
6815  withval="$with_mpi_f90_mods"
6816  mpi_f90_mods="$withval"
6817 else
6818  mpi_f90_mods="/usr/local/include/f90choice"
6819 fi;
6820
6821  echo "$as_me:$LINENO: checking for MPI F90 modules" >&5
6822 echo $ECHO_N "checking for MPI F90 modules... $ECHO_C" >&6
6823
6824
6825  ac_ext=f90
6826 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6827 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6828 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6829
6830  ac_save_F90FLAGS=$F90FLAGS
6831
6832  if test "$mpi_f90_mods"; then
6833  F90FLAGS="${F90FLAGS} ${MODDIRFLAG}${mpi_f90_mods}"
6834 fi
6835
6836    cat >conftest.$ac_ext <<_ACEOF
6837
6838
6839 program main
6840
6841 use mpi
6842 integer :: ierr
6843 call MPI_Init(ierr)
6844
6845
6846 end program main
6847
6848 _ACEOF
6849 rm -f conftest.$ac_objext
6850 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6851  (eval $ac_compile) 2>&5
6852  ac_status=$?
6853  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6854  (exit $ac_status); } &&
6855         { ac_try='test -s conftest.$ac_objext'
6856  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6857  (eval $ac_try) 2>&5
6858  ac_status=$?
6859  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6860  (exit $ac_status); }; }; then
6861  HAVE_MPI_MOD=1
6862 else
6863  echo "$as_me: failed program was:" >&5
6864 sed 's/^/| /' conftest.$ac_ext >&5
6865
6866 HAVE_MPI_MOD=0
6867 fi
6868 rm -f conftest.$ac_objext conftest.$ac_ext
6869
6870  F90FLAGS=$ac_save_F90FLAGS
6871  ac_ext=f90
6872 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6873 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6874 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6875
6876
6877  if test "$HAVE_MPI_MOD" = 1; then
6878    echo "$as_me:$LINENO: result: yes" >&5
6879 echo "${ECHO_T}yes" >&6
6880
6881 cat >>confdefs.h <<\_ACEOF
6882 #define MPI_MOD 1
6883 _ACEOF
6884
6885    MPI_F90_MODS="${mpi_f90_mods}"
6886
6887    # The library name:
6888    if test -z "$MPI_LIB" ; then
6889       MPI_LIBNAME=-lmpich
6890    else
6891       MPI_LIBNAME="$MPI_LIB"
6892    fi
6893    if test -z "$MPIMODLIBNAME" ; then
6894       MPIMODLIBNAME="${MPI_LIBNAME}f90"
6895    fi
6896
6897  else
6898    echo "$as_me:$LINENO: result: no" >&5
6899 echo "${ECHO_T}no" >&6
6900    { { echo "$as_me:$LINENO: error: Couldn't locate MPI F90 Modules" >&5
6901 echo "$as_me: error: Couldn't locate MPI F90 Modules" >&2;}
6902   { (exit 1); exit 1; }; }
6903  fi
6904
6905
6906
6907
6908
7064   OBJEXT=".$OBJEXT"
7065  
7066   OOPSE=oopse
# Line 7613 | 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 7630 | 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
7633 s,@F90LIBS@,$F90LIBS,;t t
7634 s,@F90_FUNC@,$F90_FUNC,;t t
7635 s,@F90_FUNC_@,$F90_FUNC_,;t t
7636 s,@MOD@,$MOD,;t t
7637 s,@F90_WORK_FILES_ARG@,$F90_WORK_FILES_ARG,;t t
7638 s,@MODDIRFLAG@,$MODDIRFLAG,;t t
7639 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 7644 | 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 7654 | 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
7657 s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t
7658 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