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 1233 by gezelter, Fri Jun 4 02:38:23 2004 UTC

# Line 311 | Line 311 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKA
311   # include <unistd.h>
312   #endif"
313  
314 < ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PROGNAME debug build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX F90 F90FLAGS ac_ct_F90 PREPFLAG PREPDEFFLAG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT AR F90LIBS F90_FUNC F90_FUNC_ MOD F90_WORK_FILES_ARG MODDIRFLAG F90MODINCSPEC mpi_dir MPI_LIBDIR MPI_INC MPI_LIB MPIF77 MPIF90 MPILIBS CPP EGREP SPRNG_LIBDIR SPRNG_LIB SPRNG_INC HAVE_SPRNG MKL_LIBDIR MKL_LIB MKL_INC HAVE_MKL MPI_F90_MODS MPIMODLIBNAME BATEXT MKINSTALLDIRS OOPSE OOPSE_HOME SUBDIRS FFLAGS LIBOBJS LTLIBOBJS'
314 > ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PROGNAME debug build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX OOPSE_TEMPLATE_FLAGS EXTRA_CC_FLAG F90 F90FLAGS ac_ct_F90 PREPFLAG PREPDEFFLAG F90LIBS F90_FUNC F90_FUNC_ MOD F90_WORK_FILES_ARG MODDIRFLAG F90MODINCSPEC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT AR MPI_LIB_DIR MPI_INC_DIR MPI_F90_INC MPI_LIB MPI_F90_LIB USE_MPI CPP EGREP 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 784 | Line 784 | ac_env_MPIF77_set=${MPIF77+set}
784   ac_env_F90FLAGS_value=$F90FLAGS
785   ac_cv_env_F90FLAGS_set=${F90FLAGS+set}
786   ac_cv_env_F90FLAGS_value=$F90FLAGS
787 ac_env_MPIF77_set=${MPIF77+set}
788 ac_env_MPIF77_value=$MPIF77
789 ac_cv_env_MPIF77_set=${MPIF77+set}
790 ac_cv_env_MPIF77_value=$MPIF77
787   ac_env_CPP_set=${CPP+set}
788   ac_env_CPP_value=$CPP
789   ac_cv_env_CPP_set=${CPP+set}
# Line 874 | Line 870 | Optional Packages:
870   Optional Packages:
871    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
872    --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
873 <  --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
873 >  --with-mpi=<prefix>     compile with MPI libraries in <prefix> [default=no]
874    --with-sprng_prefix=PREFIX
875                            Prefix where SPRNG is installed
876    --with-sprng-libdir=PREFIX  SPRNG library directory
877    --with-sprng-include=PREFIX
878                            SPRNG include directory
879 <  --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
879 >  --with-mkl              Do we want MKL will check /usr/local/intel/mkl61 /opt/intel/mkl61
880  
881   Some influential environment variables:
882    CC          C compiler command
# Line 897 | Line 889 | Some influential environment variables:
889    CXXFLAGS    C++ compiler flags
890    F90         Fortran 90 compiler command
891    F90FLAGS    Fortran 90 compiler flags
900  MPIF77      MPI Fortran compiler command
892    CPP         C preprocessor
893  
894   Use these variables to override the choices made by `configure' or to help
# Line 1792 | Line 1783 | ac_configure="$SHELL $ac_aux_dir/configure" # This sho
1783   # $SHELLVAR to the Fortran 95 mangled name.  If the SHELLVAR
1784   # argument is not supplied, it defaults to NAME.
1785   # AC_F95_FUNC
1786 +
1787 +
1788 +
1789 +
1790 +
1791 +
1792 +
1793  
1794  
1795  
# Line 2566 | Line 2564 | ac_ext=cc
2564   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2565   ac_compiler_gnu=$ac_cv_c_compiler_gnu
2566  
2567 +
2568   ac_ext=cc
2569   ac_cpp='$CXXCPP $CPPFLAGS'
2570   ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2571   ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2572   ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2573   if test -n "$ac_tool_prefix"; then
2574 <  for ac_prog in $CCC icpc icc xlC CC g++ c++
2574 >  for ac_prog in $CCC icpc icc xlc++ xlC CC g++ c++
2575    do
2576      # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2577   set dummy $ac_tool_prefix$ac_prog; ac_word=$2
# Line 2614 | Line 2613 | if test -z "$CXX"; then
2613   fi
2614   if test -z "$CXX"; then
2615    ac_ct_CXX=$CXX
2616 <  for ac_prog in $CCC icpc icc xlC CC g++ c++
2616 >  for ac_prog in $CCC icpc icc xlc++ xlC CC g++ c++
2617   do
2618    # Extract the first word of "$ac_prog", so it can be a program name with args.
2619   set dummy $ac_prog; ac_word=$2
# Line 2885 | Line 2884 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
2884   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2885   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2886   ac_compiler_gnu=$ac_cv_c_compiler_gnu
2887 +
2888 +
2889 + OOPSE_TEMPLATE_FLAGS=""
2890 + if test $ac_cv_cxx_compiler_gnu = no; then
2891 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -ptused -no_prelink" >&5
2892 + echo $ECHO_N "checking checking whether ${CXX} accepts -ptused -no_prelink... $ECHO_C" >&6
2893 +  echo 'void f(){}' > conftest.cc
2894 +  if test -z "`${CXX} -ptused -no_prelink -c conftest.cc 2>&1`"; then
2895 +    echo "$as_me:$LINENO: result: yes" >&5
2896 + echo "${ECHO_T}yes" >&6
2897 +    OOPSE_TEMPLATE_FLAGS="-ptused -no_prelink"
2898 +  else
2899 +    echo "$as_me:$LINENO: result: no" >&5
2900 + echo "${ECHO_T}no" >&6
2901 +  fi
2902 +  rm -f conftest*
2903 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -instances=static" >&5
2904 + echo $ECHO_N "checking checking whether ${CXX} accepts -instances=static... $ECHO_C" >&6
2905 +  echo 'void f(){}' > conftest.cc
2906 +  if test -z "`${CXX} -instances=static -c conftest.cc 2>&1`"; then
2907 +    echo "$as_me:$LINENO: result: yes" >&5
2908 + echo "${ECHO_T}yes" >&6
2909 +    OOPSE_TEMPLATE_FLAGS="-instances=static"
2910 +  else
2911 +    echo "$as_me:$LINENO: result: no" >&5
2912 + echo "${ECHO_T}no" >&6
2913 +  fi
2914 +  rm -f conftest*
2915 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -pto" >&5
2916 + echo $ECHO_N "checking checking whether ${CXX} accepts -pto... $ECHO_C" >&6
2917 +  echo 'void f(){}' > conftest.cc
2918 +  if test -z "`${CXX} -pto -c conftest.cc 2>&1`"; then
2919 +    echo "$as_me:$LINENO: result: yes" >&5
2920 + echo "${ECHO_T}yes" >&6
2921 +    OOPSE_TEMPLATE_FLAGS="-pto"
2922 +  else
2923 +    echo "$as_me:$LINENO: result: no" >&5
2924 + echo "${ECHO_T}no" >&6
2925 +  fi
2926 +  rm -f conftest*
2927 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -LANG:std" >&5
2928 + echo $ECHO_N "checking checking whether ${CXX} accepts -LANG:std... $ECHO_C" >&6
2929 +  echo 'void f(){}' > conftest.cc
2930 +  if test -z "`${CXX} -LANG:std -c conftest.cc 2>&1`"; then
2931 +    echo "$as_me:$LINENO: result: yes" >&5
2932 + echo "${ECHO_T}yes" >&6
2933  
2934 +
2935 +    EXTRA_CC_FLAG=${EXTRA_CC_FLAG}" -LANG:std"
2936 +  else
2937 +    echo "$as_me:$LINENO: result: no" >&5
2938 + echo "${ECHO_T}no" >&6
2939 +  fi
2940 + fi
2941 +
2942 +
2943 +
2944 +
2945   ac_ext=f90
2946   ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
2947   ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2948   ac_compiler_gnu=$ac_cv_f90_compiler_gnu
2949   if test -n "$ac_tool_prefix"; then
2950 <  for ac_prog in ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2950 >  for ac_prog in ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2951    do
2952      # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2953   set dummy $ac_tool_prefix$ac_prog; ac_word=$2
# Line 2933 | Line 2989 | if test -z "$F90"; then
2989   fi
2990   if test -z "$F90"; then
2991    ac_ct_F90=$F90
2992 <  for ac_prog in ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2992 >  for ac_prog in ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2993   do
2994    # Extract the first word of "$ac_prog", so it can be a program name with args.
2995   set dummy $ac_prog; ac_word=$2
# Line 3041 | Line 3097 | if test "$ac_test_PREPFLAG" != "set"; then
3097    PREPFLAG=""
3098    case "${host_cpu}-${host_os}" in
3099  
3100 <  *linux*) if test "$F90" = ifc; then
3100 >  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
3101                      PREPFLAG="-fpp1 "
3102                  fi;;
3103    *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
# Line 3054 | Line 3110 | if test "$ac_test_PREPFLAG" != "set"; then
3110    esac
3111  
3112    if test -z "$PREPFLAG"; then
3113 <        echo ""
3114 <        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 ""
3113 >        { echo "$as_me:$LINENO: WARNING: \"Using empty PREPFLAG\"" >&5
3114 > echo "$as_me: WARNING: \"Using empty PREPFLAG\"" >&2;}
3115          PREPFLAG=""
3116    fi
3117  
# Line 3123 | Line 3174 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
3174   ac_compiler_gnu=$ac_cv_c_compiler_gnu
3175  
3176  
3126
3177    if test "$prepflagworks" = 1; then
3178      echo "$as_me:$LINENO: result: yes" >&5
3179   echo "${ECHO_T}yes" >&6
# Line 3148 | Line 3198 | if test "$ac_test_PREPDEFFLAG" != "set"; then
3198    PREPDEFFLAG=""
3199    case "${host_cpu}-${host_os}" in
3200  
3201 <  *linux*) if test "$F90" = ifc; then
3201 >  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
3202                      PREPDEFFLAG=" "
3203                  fi;;
3204    *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
# 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       ;;
4007    *)
4008 +
4009 +
4010 +
4011 +
4012 +
4013 +
4014 + echo "$as_me:$LINENO: checking whether we are *really* using GNU cc" >&5
4015 + echo $ECHO_N "checking whether we are *really* using GNU cc... $ECHO_C" >&6
4016 + if test "${ac_cv_prog_really_gcc+set}" = set; then
4017 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4018 + else
4019 +
4020 + cat > conftest.c <<EOF
4021 + #ifdef __GNUC__
4022 +  #ifndef __INTEL_COMPILER
4023 +     yes;
4024 +  #endif
4025 + #endif
4026 + EOF
4027 + if { ac_try='${CC-cc} -E conftest.c'
4028 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4029 +  (eval $ac_try) 2>&5
4030 +  ac_status=$?
4031 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4032 +  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
4033 +  ac_cv_prog_really_gcc=yes
4034 + else
4035 +  ac_cv_prog_really_gcc=no
4036 + fi
4037  
4038 + fi
4039 + echo "$as_me:$LINENO: result: $ac_cv_prog_really_gcc" >&5
4040 + echo "${ECHO_T}$ac_cv_prog_really_gcc" >&6
4041 + if test "$ac_cv_prog_really_gcc" = yes; then
4042 +        :
4043  
4044 + else
4045 +        :
4046  
4047 + fi
4048  
4049 +
4050   # Try to determine "good" native compiler flags if none specified on command
4051   # line
4052   if test "$ac_test_CFLAGS" != "set"; then
# Line 3296 | Line 4086 | if test "$ac_test_CFLAGS" != "set"; then
4086          fi;;
4087     *darwin*)
4088          if test "$CC" = xlc -o "$CC" = cc; then
4089 <                CFLAGS="-O3 -qtune=auto -w"
3300 <                echo "*******************************************************"
3301 <                echo "*  You have Darwin on an unknown powerpc system.      *"
3302 <                echo "*  It is recommended that you use                     *"
3303 <                echo "*                                                     *"
3304 <                echo "*  CFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w    *"
3305 <                echo "*                               ^^^                   *"
3306 <                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
3307 <                echo "*  PowerPC CPU you have.   For more info, man cc.     *"
3308 <                echo "*******************************************************"
4089 >                CFLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto -qaltivec"
4090          fi;;
4091    esac
4092  
4093    # use default flags for gcc on all systems
4094 <  if test $ac_cv_c_compiler_gnu = yes; then
4094 >  if test $ac_cv_prog_really_gcc = yes; then
4095       CFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic"
4096    fi
4097  
4098    # test for gcc-specific flags:
4099 <  if test $ac_cv_c_compiler_gnu = yes; then
4099 >  if test $ac_cv_prog_really_gcc = yes; then
4100      # -malign-double for x86 systems
4101  
4102  
# Line 3373 | Line 4154 | fi
4154    fi
4155  
4156    CPU_FLAGS=""
4157 <  if test "$GCC" = "yes"; then
4157 >  if test $ac_cv_prog_really_gcc = yes; then
4158                    case "${host_cpu}" in
4159            i586*)
4160  
# Line 3519 | Line 4300 | cat > conftest.c <<EOF
4300   else
4301  
4302   cat > conftest.c <<EOF
4303 < #ifdef __GNUC__
4303 > #ifdef __GNUC__ && !defined (__INTEL_COMPILER)
4304   #  if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
4305       yes;
4306   #  endif
# Line 3683 | Line 4464 | fi
4464   fi
4465  
4466  
4467 + fi
4468 +
4469 +
4470 +
4471 +
4472 +
4473 +
4474 +
4475 + echo "$as_me:$LINENO: checking whether we are *really* using GNU c++" >&5
4476 + echo $ECHO_N "checking whether we are *really* using GNU c++... $ECHO_C" >&6
4477 + if test "${ac_cv_prog_really_gxx+set}" = set; then
4478 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4479 + else
4480 +
4481 + cat > conftest.cpp <<EOF
4482 + #ifdef __GNUC__
4483 +  #ifndef __INTEL_COMPILER
4484 +     yes;
4485 +  #endif
4486 + #endif
4487 + EOF
4488 + if { ac_try='${CXX-c++} -E conftest.cpp'
4489 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4490 +  (eval $ac_try) 2>&5
4491 +  ac_status=$?
4492 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4493 +  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
4494 +  ac_cv_prog_really_gxx=yes
4495 + else
4496 +  ac_cv_prog_really_gxx=no
4497   fi
4498  
4499 + fi
4500 + echo "$as_me:$LINENO: result: $ac_cv_prog_really_gxx" >&5
4501 + echo "${ECHO_T}$ac_cv_prog_really_gxx" >&6
4502 + if test "$ac_cv_prog_really_gxx" = yes; then
4503 +        :
4504  
4505 + else
4506 +        :
4507  
4508 + fi
4509  
4510  
4511   # Try to determine "good" native compiler flags if none specified on command
# Line 3718 | Line 4537 | if test "$ac_test_CXXFLAGS" != "set"; then
4537                  echo "*******************************************************"
4538          fi;;
4539     *darwin*)
4540 <        if test "$CXX" = xlC; then
4541 <                CXXFLAGS="-O3 -qtune=auto -qansialias -w"
3723 <                echo "*******************************************************"
3724 <                echo "*  You have AIX on an unknown powerpc system.  It is  *"
3725 <                echo "*  recommended that you use                           *"
3726 <                echo "*                                                     *"
3727 <                echo "*  CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
3728 <                echo "*                                 ^^^                 *"
3729 <                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
3730 <                echo "*  PowerPC CPU you have.   For more info, man cc.     *"
3731 <                echo "*******************************************************"
4540 >        if test "$CXX" = xlc++; then
4541 >                CXXFLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto -qaltivec"
4542          fi;;
4543    esac
4544  
4545    # use default flags for gcc on all systems
4546 <  if test $ac_cv_c_compiler_gnu = yes; then
4546 >  if test $ac_cv_prog_really_gxx = yes; then
4547       CXXFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic"
4548    fi
4549  
4550    # test for gcc-specific flags:
4551 <  if test $ac_cv_c_compiler_gnu = yes; then
4551 >  if test $ac_cv_prog_really_gxx = yes; then
4552      # -malign-double for x86 systems
4553  
4554  
# Line 3796 | Line 4606 | fi
4606    fi
4607  
4608    CPU_FLAGS=""
4609 <  if test "$GCC" = "yes"; then
4609 >  if test $ac_cv_prog_really_gxx = yes; then
4610                    case "${host_cpu}" in
4611            i586*)
4612  
4613 < echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentium" >&5
4614 < echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentium... $ECHO_C" >&6
4613 > echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=pentium" >&5
4614 > echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=pentium... $ECHO_C" >&6
4615   if test "${ac_cpu_pentium+set}" = set; then
4616    echo $ECHO_N "(cached) $ECHO_C" >&6
4617   else
4618 <  echo 'void f(){}' > conftest.c
4619 < if test -z "`${CC-cc} -mcpu=pentium -c conftest.c 2>&1`"; then
4618 >  echo 'void f(){}' > conftest.cpp
4619 > if test -z "`${CXX-c++} -mcpu=pentium -c conftest.cpp 2>&1`"; then
4620          ac_cpu_pentium=yes
4621   else
4622          ac_cpu_pentium=no
# Line 3935 | Line 4745 | echo "$as_me:$LINENO: checking whether we are using gc
4745                  elif test "$cputype" = 750; then
4746  
4747  
4748 < echo "$as_me:$LINENO: checking whether we are using gcc 2.95 or later" >&5
4749 < echo $ECHO_N "checking whether we are using gcc 2.95 or later... $ECHO_C" >&6
4750 < if test "${ac_cv_prog_gcc_2_95+set}" = set; then
4748 > echo "$as_me:$LINENO: checking whether we are using g++ 2.95 or later" >&5
4749 > echo $ECHO_N "checking whether we are using g++ 2.95 or later... $ECHO_C" >&6
4750 > if test "${ac_cv_prog_gxx_2_95+set}" = set; then
4751    echo $ECHO_N "(cached) $ECHO_C" >&6
4752   else
4753  
4754 < cat > conftest.c <<EOF
4755 < #ifdef __GNUC__
4754 > cat > conftest.cpp <<EOF
4755 > #ifdef __GNUC__ && !defined (__INTEL_COMPILER)
4756   #  if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
4757       yes;
4758   #  endif
4759   #endif
4760   EOF
4761 < if { ac_try='${CC-cc} -E conftest.c'
4761 > if { ac_try='${CXX-c++} -E conftest.cpp'
4762    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4763    (eval $ac_try) 2>&5
4764    ac_status=$?
4765    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4766    (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
4767 <  ac_cv_prog_gcc_2_95=yes
4767 >  ac_cv_prog_gxx_2_95=yes
4768   else
4769 <  ac_cv_prog_gcc_2_95=no
4769 >  ac_cv_prog_gxx_2_95=no
4770   fi
4771  
4772   fi
4773 < echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_2_95" >&5
4774 < echo "${ECHO_T}$ac_cv_prog_gcc_2_95" >&6
4775 < if test "$ac_cv_prog_gcc_2_95" = yes; then
4773 > echo "$as_me:$LINENO: result: $ac_cv_prog_gxx_2_95" >&5
4774 > echo "${ECHO_T}$ac_cv_prog_gxx_2_95" >&6
4775 > if test "$ac_cv_prog_gxx_2_95" = yes; then
4776          :
4777  
4778  
# Line 4115 | Line 4925 | if test x"$F90FLAGS" == x ; then
4925   # Try to determine "good" native compiler flags if none specified on command
4926   # line
4927  
4928 < if test x"$F90FLAGS" == x ; then
4928 > if test x"$F90FLAGS" = x ; then
4929    F90FLAGS=""
4930    case "${host_cpu}-${host_os}" in
4931  
4932 <  *linux*) if test "$F90" = ifc; then
4932 >  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
4933                      F90FLAGS="-O"
4934                  fi;;
4935     rs6000*-aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
# Line 4139 | Line 4949 | if test x"$F90FLAGS" == x ; then
4949                  echo "*******************************************************"
4950          fi;;
4951     *darwin*)
4952 <        if test "$F90" = f90 -o "$F90" = xlf90; then
4953 <                F90FLAGS="-O3 -qtune=auto -w"
4144 <                echo "*********************************************************"
4145 <                echo "*  You have Darwin on an unknown powerpc system.  It is *"
4146 <                echo "*  recommended that you use                             *"
4147 <                echo "*                                                       *"
4148 <                echo "*  CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w    *"
4149 <                echo "*                                 ^^^                   *"
4150 <                echo "*  where xxx is 601, 603, 604, or whatever kind of      *"
4151 <                echo "*  PowerPC CPU you have.   For more info, man xlf.      *"
4152 <                echo "*********************************************************"
4952 >        if test "$F90" = f90 -o "$F90" = xlf90 -o "$F90" = xlf95; then
4953 >                F90FLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto"
4954          fi;;
4955    esac
4956  
# Line 4195 | Line 4996 | ac_ext=c
4996          ac_guessed_f90flags=no
4997   fi
4998   rm -f conftest*
4999 < ac_ext=c
5000 < ac_cpp='$CPP $CPPFLAGS'
5001 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5002 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4202 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
4999 > ac_ext=f90
5000 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5001 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5002 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5003  
5004  
5005   fi
# Line 4466 | Line 5266 | test -n "$YACC" || YACC="yacc"
5266   done
5267   test -n "$YACC" || YACC="yacc"
5268  
4469
5269   for ac_prog in flex lex
5270   do
5271    # Extract the first word of "$ac_prog", so it can be a program name with args.
# Line 4518 | Line 5317 | cat >conftest.$ac_ext <<_ACEOF
5317    ac_check_lib_save_LIBS=$LIBS
5318   LIBS="-lfl  $LIBS"
5319   cat >conftest.$ac_ext <<_ACEOF
5320 < #line $LINENO "configure"
5321 < /* confdefs.h.  */
4523 < _ACEOF
4524 < cat confdefs.h >>conftest.$ac_ext
4525 < cat >>conftest.$ac_ext <<_ACEOF
4526 < /* end confdefs.h.  */
5320 >
5321 > program main
5322  
5323 < /* Override any gcc2 internal prototype to avoid an error.  */
5324 < #ifdef __cplusplus
5325 < 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 < }
5323 > call yywrap
5324 > end program main
5325 >
5326   _ACEOF
5327   rm -f conftest.$ac_objext conftest$ac_exeext
5328   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 4575 | Line 5359 | cat >conftest.$ac_ext <<_ACEOF
5359    ac_check_lib_save_LIBS=$LIBS
5360   LIBS="-ll  $LIBS"
5361   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.  */
5362  
5363 < /* Override any gcc2 internal prototype to avoid an error.  */
5364 < #ifdef __cplusplus
5365 < extern "C"
5366 < #endif
5367 < /* 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 < }
5363 > program main
5364 >
5365 > call yywrap
5366 > end program main
5367 >
5368   _ACEOF
5369   rm -f conftest.$ac_objext conftest$ac_exeext
5370   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 4807 | Line 5576 | ac_ext=f90
5576    exit 1
5577   fi
5578  
4810 ac_ext=f90
4811 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
5579  
5580  
5581 <
5582 < ac_ext=f90
5583 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5584 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4820 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4821 < echo "$as_me:$LINENO: checking how to get verbose linking output from $F90" >&5
4822 < echo $ECHO_N "checking how to get verbose linking output from $F90... $ECHO_C" >&6
4823 < if test "${ac_cv_prog_f90_v+set}" = set; then
4824 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5581 > # Check whether --with-mpi or --without-mpi was given.
5582 > if test "${with_mpi+set}" = set; then
5583 >  withval="$with_mpi"
5584 >  with_mpi=$withval
5585   else
5586 +  with_mpi="no"
5587 + fi;
5588  
5589 < cat >conftest.$ac_ext <<_ACEOF
5589 > case "x$with_mpi" in
5590 >        xyes | "x")  USE_MPI=yes;;
5591 >        xno) USE_MPI=no ;;
5592 >        *) MPI="$with_mpi"; USE_MPI=yes ;;
5593 > esac
5594 > if test "$USE_MPI" = "yes" -a -z "$with_mpi"; then
5595 >        MPI="/usr/local"
5596 > fi
5597 > if test "$USE_MPI" = "yes"; then
5598 >        echo "MPI = $MPI"
5599  
4829 program main
5600  
5601 <
5602 < end program main
5603 <
4834 < _ACEOF
4835 < rm -f conftest.$ac_objext
4836 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4837 <  (eval $ac_compile) 2>&5
4838 <  ac_status=$?
4839 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4840 <  (exit $ac_status); } &&
4841 <         { ac_try='test -s conftest.$ac_objext'
4842 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4843 <  (eval $ac_try) 2>&5
4844 <  ac_status=$?
4845 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4846 <  (exit $ac_status); }; }; then
4847 <  ac_cv_prog_f90_v=
4848 < # Try some options frequently used verbose output
4849 < for ac_verb in -v -verbose --verbose -V -\#\#\#; do
4850 <  ac_ext=f90
4851 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4852 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4853 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4854 <
4855 < cat >conftest.$ac_ext <<_ACEOF
4856 <
4857 < program main
4858 <
4859 <
4860 < end program main
5601 > # Set variables...
5602 > MPI_LIB_DIR="$MPI/lib"
5603 > MPI_INC_DIR="$MPI/include"
5604  
4862 _ACEOF
5605  
4864 # Compile and link our simple test program by passing a flag (argument
4865 # 1 to this macro) to the Fortran 90 compiler in order to get
4866 # "verbose" output that we can then parse for the Fortran 90 linker
4867 # flags.
4868 ac_save_F90FLAGS=$F90FLAGS
4869 F90FLAGS="$F90FLAGS $ac_verb"
5606  
5607 < (eval echo $as_me:4871: \"$ac_link\") >&5
5608 < ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
5609 < echo "$ac_f90_v_output" >&5
5610 < F90FLAGS=$ac_save_F90FLAGS
5611 <
5612 < rm -f conftest.*
5613 < ac_ext=f90
5614 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5615 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5616 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5617 <
5618 < # If we are using xlf then replace all the commas with spaces.
5619 < if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
5620 <  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
5621 < fi
4886 <
4887 < # If we are using Cray Fortran then delete quotes.
4888 < # Use "\"" instead of '"' for font-lock-mode.
4889 < # FIXME: a more general fix for quoted arguments with spaces?
4890 < if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
4891 <  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
4892 < fi
4893 <  # look for -l* and *.a constructs in the output
4894 <  for ac_arg in $ac_f90_v_output; do
4895 <     case $ac_arg in
4896 <        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
4897 <          ac_cv_prog_f90_v=$ac_verb
4898 <          break 2 ;;
4899 <     esac
4900 <  done
4901 < done
4902 < if test -z "$ac_cv_prog_f90_v"; then
4903 <   { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F90" >&5
4904 < echo "$as_me: WARNING: cannot determine how to obtain linking information from $F90" >&2;}
4905 < fi
4906 < else
4907 <  echo "$as_me: failed program was:" >&5
4908 < sed 's/^/| /' conftest.$ac_ext >&5
4909 <
4910 < { echo "$as_me:$LINENO: WARNING: compilation failed" >&5
4911 < echo "$as_me: WARNING: compilation failed" >&2;}
4912 < fi
4913 < rm -f conftest.$ac_objext conftest.$ac_ext
4914 <
4915 < fi
4916 < echo "$as_me:$LINENO: result: $ac_cv_prog_f90_v" >&5
4917 < echo "${ECHO_T}$ac_cv_prog_f90_v" >&6
4918 < echo "$as_me:$LINENO: checking for Fortran 90 libraries" >&5
4919 < echo $ECHO_N "checking for Fortran 90 libraries... $ECHO_C" >&6
4920 < if test "${ac_cv_flibs+set}" = set; then
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
4926 <
4927 < ac_ext=f90
4928 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4929 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4930 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4931 <
4932 < cat >conftest.$ac_ext <<_ACEOF
4933 <
4934 < program main
4935 <
5607 > echo "$as_me:$LINENO: checking for mpi.h" >&5
5608 > echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6
5609 > have_mpi_h=0
5610 > echo '#include <mpi.h>' > conftest.cc
5611 > if test -z "`${CXX} -I${MPI_INC_DIR} -c conftest.cc 2>&1`"; then
5612 >        echo "$as_me:$LINENO: result: yes" >&5
5613 > echo "${ECHO_T}yes" >&6
5614 >        have_mpi_h=1
5615 > else
5616 >        echo "$as_me:$LINENO: result: no! Check MPI include paths" >&5
5617 > echo "${ECHO_T}no! Check MPI include paths" >&6
5618 >        USE_MPI="no"
5619 > fi
5620 > rm -f conftest*
5621 > if test "$have_mpi_h" = 1; then
5622  
5623 < end program main
5624 <
5623 > cat >>confdefs.h <<\_ACEOF
5624 > #define HAVE_MPI_H 1
5625   _ACEOF
5626  
4941 # Compile and link our simple test program by passing a flag (argument
4942 # 1 to this macro) to the Fortran 90 compiler in order to get
4943 # "verbose" output that we can then parse for the Fortran 90 linker
4944 # flags.
4945 ac_save_F90FLAGS=$F90FLAGS
4946 F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v"
4947
4948 (eval echo $as_me:4948: \"$ac_link\") >&5
4949 ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
4950 echo "$ac_f90_v_output" >&5
4951 F90FLAGS=$ac_save_F90FLAGS
4952
4953 rm -f conftest.*
4954 ac_ext=f90
4955 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4956 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4957 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4958
4959 # If we are using xlf then replace all the commas with spaces.
4960 if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
4961  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
5627   fi
5628  
5629 < # If we are using Cray Fortran then delete quotes.
5630 < # Use "\"" instead of '"' for font-lock-mode.
5631 < # FIXME: a more general fix for quoted arguments with spaces?
5632 < if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
5633 <  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
5629 > echo "$as_me:$LINENO: checking whether mpif.h is usable" >&5
5630 > echo $ECHO_N "checking whether mpif.h is usable... $ECHO_C" >&6
5631 > have_mpif_h=0
5632 > rm -f conftest*
5633 > cat >conftest.f90 <<EOF
5634 > program main
5635 >   include 'mpif.h'
5636 > end
5637 > EOF
5638 > if $F90 -I$MPI_INC_DIR -c conftest.f90 > conftest.out 2>&1 ; then
5639 >        echo "$as_me:$LINENO: result: yes" >&5
5640 > echo "${ECHO_T}yes" >&6
5641 >        MPI_F90_INC="$MPI_INC"
5642 >        have_mpif_h=1
5643 > else
5644 >        if test -s conftest.out ; then
5645 >                cat conftest.out >> config.log
5646 >        fi
5647 >        echo "$as_me:$LINENO: result: no! Check MPI include paths" >&5
5648 > echo "${ECHO_T}no! Check MPI include paths" >&6
5649 >        USE_MPI="no"
5650   fi
5651 + rm -f conftest*
5652  
5653 < ac_cv_f90libs=
5653 > if test "$have_mpif_h" = 1; then
5654  
5655 < # Save positional arguments (if any)
5656 < ac_save_positional="$@"
5655 > cat >>confdefs.h <<\_ACEOF
5656 > #define HAVE_MPIF_H 1
5657 > _ACEOF
5658  
4976 set X $ac_f90_v_output
4977 while test $# != 1; do
4978  shift
4979  ac_arg=$1
4980  case $ac_arg in
4981        [\\/]*.a | ?:[\\/]*.a)
4982            ac_exists=false
4983  for ac_i in $ac_cv_f90libs; do
4984    if test x"$ac_arg" = x"$ac_i"; then
4985      ac_exists=true
4986      break
4987    fi
4988  done
4989
4990  if test x"$ac_exists" = xtrue; then
4991  :
4992 else
4993  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5659   fi
5660  
5661 <          ;;
5662 <        -bI:*)
5663 <            ac_exists=false
5664 <  for ac_i in $ac_cv_f90libs; do
5665 <    if test x"$ac_arg" = x"$ac_i"; then
5001 <      ac_exists=true
5002 <      break
5003 <    fi
5004 <  done
5661 > ac_ext=c
5662 > ac_cpp='$CPP $CPPFLAGS'
5663 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5664 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5665 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
5666  
5667 <  if test x"$ac_exists" = xtrue; then
5668 <  :
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
5667 > ac_save_LDFLAGS=$LDFLAGS
5668 > LDFLAGS="${LDFLAGS} -L${MPI_LIB_DIR} "
5669  
5670 <          ;;
5671 <          # Ignore these flags.
5672 <        -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*)
5673 <          ;;
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
5670 > if test x = x"$MPI_LIB"; then
5671 >        echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5672 > echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
5673 > if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
5674    echo $ECHO_N "(cached) $ECHO_C" >&6
5675   else
5676 <  ac_ext=f90
5677 < 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
5676 >  ac_check_lib_save_LIBS=$LIBS
5677 > LIBS="-lmpi  $LIBS"
5678   cat >conftest.$ac_ext <<_ACEOF
5120 subroutine foobar()
5121 return
5122 end
5123 subroutine foo_bar()
5124 return
5125 end
5126 _ACEOF
5127 rm -f conftest.$ac_objext
5128 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5129  (eval $ac_compile) 2>&5
5130  ac_status=$?
5131  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132  (exit $ac_status); } &&
5133         { ac_try='test -s conftest.$ac_objext'
5134  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5135  (eval $ac_try) 2>&5
5136  ac_status=$?
5137  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138  (exit $ac_status); }; }; then
5139  mv conftest.$ac_objext cf90_test.$ac_objext
5140
5141  ac_ext=c
5142 ac_cpp='$CPP $CPPFLAGS'
5143 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5144 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5145 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5146
5147  ac_save_LIBS=$LIBS
5148  LIBS="cf90_test.$ac_objext $F90LIBS $LIBS"
5149
5150  ac_success=no
5151  for ac_foobar in foobar FOOBAR; do
5152    for ac_underscore in "" "_"; do
5153      ac_func="$ac_foobar$ac_underscore"
5154      cat >conftest.$ac_ext <<_ACEOF
5679   #line $LINENO "configure"
5680   /* confdefs.h.  */
5681   _ACEOF
# Line 5165 | Line 5689 | char $ac_func ();
5689   #endif
5690   /* We use char because int might match the return type of a gcc2
5691     builtin and then its argument prototype would still apply.  */
5692 < char $ac_func ();
5692 > char MPI_Init ();
5693   int
5694   main ()
5695   {
5696 < $ac_func ();
5696 > MPI_Init ();
5697    ;
5698    return 0;
5699   }
# Line 5186 | Line 5710 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5710    ac_status=$?
5711    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5712    (exit $ac_status); }; }; then
5713 <  ac_success=yes; break 2
5713 >  ac_cv_lib_mpi_MPI_Init=yes
5714   else
5715    echo "$as_me: failed program was:" >&5
5716   sed 's/^/| /' conftest.$ac_ext >&5
5717  
5718 + ac_cv_lib_mpi_MPI_Init=no
5719   fi
5720   rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5721 <    done
5722 <  done
5721 > LIBS=$ac_check_lib_save_LIBS
5722 > fi
5723 > echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5724 > echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5725 > if test $ac_cv_lib_mpi_MPI_Init = yes; then
5726 >  MPI_LIB="-lmpi"
5727 > fi
5728  
5729 <  if test "$ac_success" = "yes"; then
5730 <     case $ac_foobar in
5731 <        foobar)
5732 <           ac_case=lower
5733 <           ac_foo_bar=foo_bar
5734 <           ;;
5735 <        FOOBAR)
5736 <           ac_case=upper
5737 <           ac_foo_bar=FOO_BAR
5738 <           ;;
5209 <     esac
5210 <
5211 <     ac_success_extra=no
5212 <     for ac_extra in "" "_"; do
5213 <        ac_func="$ac_foo_bar$ac_underscore$ac_extra"
5214 <
5215 <        cat >conftest.$ac_ext <<_ACEOF
5729 > fi
5730 > if test x = x"$MPI_LIB"; then
5731 >        echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
5732 > echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
5733 > if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
5734 >  echo $ECHO_N "(cached) $ECHO_C" >&6
5735 > else
5736 >  ac_check_lib_save_LIBS=$LIBS
5737 > LIBS="-lmpich  $LIBS"
5738 > cat >conftest.$ac_ext <<_ACEOF
5739   #line $LINENO "configure"
5740   /* confdefs.h.  */
5741   _ACEOF
# Line 5226 | Line 5749 | char $ac_func ();
5749   #endif
5750   /* We use char because int might match the return type of a gcc2
5751     builtin and then its argument prototype would still apply.  */
5752 < char $ac_func ();
5752 > char MPI_Init ();
5753   int
5754   main ()
5755   {
5756 < $ac_func ();
5756 > MPI_Init ();
5757    ;
5758    return 0;
5759   }
# Line 5247 | Line 5770 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5770    ac_status=$?
5771    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5772    (exit $ac_status); }; }; then
5773 <  ac_success_extra=yes; break
5773 >  ac_cv_lib_mpich_MPI_Init=yes
5774   else
5775    echo "$as_me: failed program was:" >&5
5776   sed 's/^/| /' conftest.$ac_ext >&5
5777  
5778 + ac_cv_lib_mpich_MPI_Init=no
5779   fi
5780   rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5781 <     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 <
5781 > LIBS=$ac_check_lib_save_LIBS
5782   fi
5783 < rm -f conftest.$ac_objext conftest.$ac_ext
5784 < ac_ext=f90
5785 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5786 < 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 <
5297 < 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
5783 > echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
5784 > echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
5785 > if test $ac_cv_lib_mpich_MPI_Init = yes; then
5786 >  MPI_LIB="-lmpich"
5787   fi
5788  
5430
5431
5432
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"
5481
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
5789   fi
5790 < if test -z "MODDIRFLAG" ; then
5791 <    echo "$as_me:$LINENO: result: unknown" >&5
5491 < echo "${ECHO_T}unknown" >&6
5492 < fi
5493 <
5494 <
5495 < rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod*
5496 < if test $madedir = 1 ; then rmdir conf ; fi
5497 <
5498 <
5499 <
5500 < echo "$as_me:$LINENO: checking for mpi-directory" >&5
5501 < echo $ECHO_N "checking for mpi-directory... $ECHO_C" >&6
5502 <
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
5512 <
5513 <
5514 < echo "$as_me:$LINENO: checking for mpi-lib-directory" >&5
5515 < echo $ECHO_N "checking for mpi-lib-directory... $ECHO_C" >&6
5516 <
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
5526 <
5527 <
5528 < 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
5599 < do
5600 <  # Extract the first word of "$ac_prog", so it can be a program name with args.
5601 < set dummy $ac_prog; ac_word=$2
5602 < echo "$as_me:$LINENO: checking for $ac_word" >&5
5603 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5604 < if test "${ac_cv_prog_MPIF90+set}" = set; then
5605 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5606 < else
5607 <  if test -n "$MPIF90"; then
5608 <  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
5623 <
5624 < 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 <
5654 < _ACEOF
5655 < rm -f conftest.$ac_objext conftest$ac_exeext
5656 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5657 <  (eval $ac_link) 2>&5
5658 <  ac_status=$?
5659 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5660 <  (exit $ac_status); } &&
5661 <         { ac_try='test -s conftest$ac_exeext'
5662 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5663 <  (eval $ac_try) 2>&5
5664 <  ac_status=$?
5665 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5666 <  (exit $ac_status); }; }; then
5667 <  MPILIBS=" "
5668 <                                echo "$as_me:$LINENO: result: yes" >&5
5669 < echo "${ECHO_T}yes" >&6
5670 < else
5671 <  echo "$as_me: failed program was:" >&5
5672 < sed 's/^/| /' conftest.$ac_ext >&5
5673 <
5674 < echo "$as_me:$LINENO: result: no" >&5
5675 < echo "${ECHO_T}no" >&6
5676 < fi
5677 < rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5678 < fi
5679 < if test x = x"$MPILIBS"; then
5790 > $as_unset ac_cv_lib_mpi_MPI_Init
5791 > if test x = x"$MPI_LIB"; then
5792          echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5793   echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
5794   if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
5795    echo $ECHO_N "(cached) $ECHO_C" >&6
5796   else
5797    ac_check_lib_save_LIBS=$LIBS
5798 < LIBS="-lmpi  $LIBS"
5798 > LIBS="-lmpi "-llam" $LIBS"
5799   cat >conftest.$ac_ext <<_ACEOF
5800 + #line $LINENO "configure"
5801 + /* confdefs.h.  */
5802 + _ACEOF
5803 + cat confdefs.h >>conftest.$ac_ext
5804 + cat >>conftest.$ac_ext <<_ACEOF
5805 + /* end confdefs.h.  */
5806  
5807 < program main
5808 <
5809 < call MPI_Init
5810 < end program main
5811 <
5807 > /* Override any gcc2 internal prototype to avoid an error.  */
5808 > #ifdef __cplusplus
5809 > extern "C"
5810 > #endif
5811 > /* We use char because int might match the return type of a gcc2
5812 >   builtin and then its argument prototype would still apply.  */
5813 > char MPI_Init ();
5814 > int
5815 > main ()
5816 > {
5817 > MPI_Init ();
5818 >  ;
5819 >  return 0;
5820 > }
5821   _ACEOF
5822   rm -f conftest.$ac_objext conftest$ac_exeext
5823   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 5717 | Line 5844 | if test $ac_cv_lib_mpi_MPI_Init = yes; then
5844   echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5845   echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5846   if test $ac_cv_lib_mpi_MPI_Init = yes; then
5847 <  MPILIBS="-lmpi"
5847 >  MPI_LIB="-lmpi -llam"
5848   fi
5849  
5850   fi
5851 < if test x = x"$MPILIBS"; then
5852 <        echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
5853 < echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
5854 < if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
5851 >
5852 > $as_unset ac_cv_lib_mpi_MPI_Init
5853 > if test x = x"$MPI_LIB"; then
5854 > echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5855 > echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
5856 > if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
5857    echo $ECHO_N "(cached) $ECHO_C" >&6
5858   else
5859    ac_check_lib_save_LIBS=$LIBS
5860 < LIBS="-lmpich  $LIBS"
5860 > LIBS="-lmpi -llam -lpthread $LIBS"
5861   cat >conftest.$ac_ext <<_ACEOF
5862 + #line $LINENO "configure"
5863 + /* confdefs.h.  */
5864 + _ACEOF
5865 + cat confdefs.h >>conftest.$ac_ext
5866 + cat >>conftest.$ac_ext <<_ACEOF
5867 + /* end confdefs.h.  */
5868  
5869 < program main
5870 <
5871 < call MPI_Init
5872 < end program main
5873 <
5869 > /* Override any gcc2 internal prototype to avoid an error.  */
5870 > #ifdef __cplusplus
5871 > extern "C"
5872 > #endif
5873 > /* We use char because int might match the return type of a gcc2
5874 >   builtin and then its argument prototype would still apply.  */
5875 > char MPI_Init ();
5876 > int
5877 > main ()
5878 > {
5879 > MPI_Init ();
5880 >  ;
5881 >  return 0;
5882 > }
5883   _ACEOF
5884   rm -f conftest.$ac_objext conftest$ac_exeext
5885   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 5749 | Line 5893 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5893    ac_status=$?
5894    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895    (exit $ac_status); }; }; then
5896 <  ac_cv_lib_mpich_MPI_Init=yes
5896 >  ac_cv_lib_mpi_MPI_Init=yes
5897   else
5898    echo "$as_me: failed program was:" >&5
5899   sed 's/^/| /' conftest.$ac_ext >&5
5900  
5901 < ac_cv_lib_mpich_MPI_Init=no
5901 > ac_cv_lib_mpi_MPI_Init=no
5902   fi
5903   rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5904   LIBS=$ac_check_lib_save_LIBS
5905   fi
5906 < echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
5907 < echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
5908 < if test $ac_cv_lib_mpich_MPI_Init = yes; then
5909 <  MPILIBS="-lmpich"
5906 > echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5907 > echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5908 > if test $ac_cv_lib_mpi_MPI_Init = yes; then
5909 >  MPI_LIB="-lmpi -llam -lpthread"
5910 > else
5911 >
5912 >             { { echo "$as_me:$LINENO: error: Didn't find liblam, libmpi, or libmpich; check path for MPI package first..." >&5
5913 > echo "$as_me: error: Didn't find liblam, libmpi, or libmpich; check path for MPI package first..." >&2;}
5914 >   { (exit 1); exit 1; }; }
5915 >             USE_MPI="no"
5916 >
5917   fi
5918  
5919   fi
5920  
5921  
5922  
5923 < F90="$acx_mpi_save_F90"
5924 <
5925 <
5926 <
5927 < # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
5928 < if test x = x"$MPILIBS"; then
5929 <
5779 <        :
5923 > echo "$as_me:$LINENO: checking for MPI Fortran library" >&5
5924 > echo $ECHO_N "checking for MPI Fortran library... $ECHO_C" >&6
5925 > MPI_F90_LIB=""
5926 > if test -f "$MPI_LIB_DIR/libfmpich.a" ; then
5927 >        MPI_F90_LIB="-lfmpich"
5928 > elif test -f "$MPI_LIB_DIR/liblamf77mpi.a" ; then
5929 >        MPI_F90_LIB="-llamf77mpi"
5930   else
5931 +                        MPI_F90_LIB="  "
5932 + fi
5933 + echo "$as_me:$LINENO: result: found $MPI_F90_LIB" >&5
5934 + echo "${ECHO_T}found $MPI_F90_LIB" >&6
5935  
5782 cat >>confdefs.h <<\_ACEOF
5783 #define HAVE_MPI 1
5784 _ACEOF
5936  
5786        :
5937   fi
5938  
5939  
5940 +
5941   ac_ext=c
5942   ac_cpp='$CPP $CPPFLAGS'
5943   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
# Line 6533 | Line 6684 | fi
6684  
6685    CPPFLAGS=$ac_save_CPPFLAGS
6686    LDFLAGS=$ac_save_LDFLAGS
6687 <  ac_ext=f90
6688 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6689 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6690 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6687 >  ac_ext=c
6688 > ac_cpp='$CPP $CPPFLAGS'
6689 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6690 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6691 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
6692  
6693  
6694    if test x_$HAVE_SPRNG != x_yes; then
# Line 6557 | Line 6709 | echo "${ECHO_T}yes" >&6
6709    withval="$with_mkl"
6710       echo "$as_me:$LINENO: result: yes" >&5
6711   echo "${ECHO_T}yes" >&6
6712 <    for dir in $withval /usr/local/intel/mkl60 /opt/intel/mkl60; do
6712 >    for dir in $withval /usr/local/intel/mkl61 /opt/intel/mkl61; do
6713          mkldir="$dir"
6714          if test -f "$dir/include/mkl.h"; then
6715              found_mkl="yes";
# Line 6783 | Line 6935 | fi
6935  
6936    CPPFLAGS=$ac_save_CPPFLAGS
6937    LDFLAGS=$ac_save_LDFLAGS
6938 <  ac_ext=f90
6939 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6940 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6941 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6938 >  ac_ext=c
6939 > ac_cpp='$CPP $CPPFLAGS'
6940 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6941 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6942 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
6943  
6944  
6945    if test x_$HAVE_MKL != x_yes; then
# Line 6805 | Line 6958 | fi;
6958   echo "${ECHO_T}no" >&6
6959  
6960   fi;
6808
6809
6810
6811
6812
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
6961  
6877  if test "$HAVE_MPI_MOD" = 1; then
6878    echo "$as_me:$LINENO: result: yes" >&5
6879 echo "${ECHO_T}yes" >&6
6962  
6881 cat >>confdefs.h <<\_ACEOF
6882 #define MPI_MOD 1
6883 _ACEOF
6963  
6885    MPI_F90_MODS="${mpi_f90_mods}"
6964  
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
6965  
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
6966   OBJEXT=".$OBJEXT"
6967  
6968   OOPSE=oopse
# Line 6929 | Line 6986 | SUBDIRS="libBASS libmdtools src forceFields samples ut
6986  
6987   MKINSTALLDIRS=`pwd`/ac-tools/"shtool mkdir -p -f"
6988  
6989 < SUBDIRS="libBASS libmdtools src forceFields samples utils utils/sysbuilder staticProps"
6989 > SUBDIRS="libBASS libmdtools src forceFields samples utils utils/sysbuilder staticProps third-party "
6990  
6991   CFLAGS=${CFLAGS-""}
6992   CXXFLAGS=${CXXFLAGS-""}
# Line 6964 | Line 7021 | esac
7021  
7022  
7023  
7024 <          ac_config_headers="$ac_config_headers libmdtools/config.h"
7024 >                    ac_config_headers="$ac_config_headers libBASS/config.h libmdtools/config.h"
7025  
7026 <                                                                                                                                                      ac_config_files="$ac_config_files Makefile libBASS/Makefile libmdtools/Makefile src/Makefile utils/Makefile utils/sysbuilder/Makefile forceFields/Makefile samples/Makefile staticProps/Makefile samples/alkane/Makefile samples/argon/Makefile samples/beadLipid/Makefile samples/lipid/Makefile samples/metals/Makefile samples/water/Makefile"
7026 >                                                                                                                                                                ac_config_files="$ac_config_files Makefile libBASS/Makefile libmdtools/Makefile src/Makefile utils/Makefile utils/sysbuilder/Makefile forceFields/Makefile samples/Makefile staticProps/Makefile third-party/Makefile samples/alkane/Makefile samples/argon/Makefile samples/beadLipid/Makefile samples/lipid/Makefile samples/metals/Makefile samples/water/Makefile"
7027  
7028  
7029   cat >confcache <<\_ACEOF
# Line 7502 | Line 7559 | do
7559    "forceFields/Makefile" ) CONFIG_FILES="$CONFIG_FILES forceFields/Makefile" ;;
7560    "samples/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;;
7561    "staticProps/Makefile" ) CONFIG_FILES="$CONFIG_FILES staticProps/Makefile" ;;
7562 +  "third-party/Makefile" ) CONFIG_FILES="$CONFIG_FILES third-party/Makefile" ;;
7563    "samples/alkane/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/alkane/Makefile" ;;
7564    "samples/argon/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/argon/Makefile" ;;
7565    "samples/beadLipid/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/beadLipid/Makefile" ;;
7566    "samples/lipid/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/lipid/Makefile" ;;
7567    "samples/metals/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/metals/Makefile" ;;
7568    "samples/water/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/water/Makefile" ;;
7569 +  "libBASS/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS libBASS/config.h" ;;
7570    "libmdtools/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS libmdtools/config.h" ;;
7571    *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
7572   echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
# Line 7613 | Line 7672 | s,@F90@,$F90,;t t
7672   s,@CXX@,$CXX,;t t
7673   s,@CXXFLAGS@,$CXXFLAGS,;t t
7674   s,@ac_ct_CXX@,$ac_ct_CXX,;t t
7675 + s,@OOPSE_TEMPLATE_FLAGS@,$OOPSE_TEMPLATE_FLAGS,;t t
7676 + s,@EXTRA_CC_FLAG@,$EXTRA_CC_FLAG,;t t
7677   s,@F90@,$F90,;t t
7678   s,@F90FLAGS@,$F90FLAGS,;t t
7679   s,@ac_ct_F90@,$ac_ct_F90,;t t
7680   s,@PREPFLAG@,$PREPFLAG,;t t
7681   s,@PREPDEFFLAG@,$PREPDEFFLAG,;t t
7682 + s,@F90LIBS@,$F90LIBS,;t t
7683 + s,@F90_FUNC@,$F90_FUNC,;t t
7684 + s,@F90_FUNC_@,$F90_FUNC_,;t t
7685 + s,@MOD@,$MOD,;t t
7686 + s,@F90_WORK_FILES_ARG@,$F90_WORK_FILES_ARG,;t t
7687 + s,@MODDIRFLAG@,$MODDIRFLAG,;t t
7688 + s,@F90MODINCSPEC@,$F90MODINCSPEC,;t t
7689   s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
7690   s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
7691   s,@INSTALL_DATA@,$INSTALL_DATA,;t t
# Line 7630 | Line 7698 | s,@F90LIBS@,$F90LIBS,;t t
7698   s,@LEXLIB@,$LEXLIB,;t t
7699   s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
7700   s,@AR@,$AR,;t t
7701 < s,@F90LIBS@,$F90LIBS,;t t
7702 < s,@F90_FUNC@,$F90_FUNC,;t t
7703 < 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
7640 < s,@mpi_dir@,$mpi_dir,;t t
7641 < s,@MPI_LIBDIR@,$MPI_LIBDIR,;t t
7642 < s,@MPI_INC@,$MPI_INC,;t t
7701 > s,@MPI_LIB_DIR@,$MPI_LIB_DIR,;t t
7702 > s,@MPI_INC_DIR@,$MPI_INC_DIR,;t t
7703 > s,@MPI_F90_INC@,$MPI_F90_INC,;t t
7704   s,@MPI_LIB@,$MPI_LIB,;t t
7705 < s,@MPIF77@,$MPIF77,;t t
7706 < s,@MPIF90@,$MPIF90,;t t
7646 < s,@MPILIBS@,$MPILIBS,;t t
7705 > s,@MPI_F90_LIB@,$MPI_F90_LIB,;t t
7706 > s,@USE_MPI@,$USE_MPI,;t t
7707   s,@CPP@,$CPP,;t t
7708   s,@EGREP@,$EGREP,;t t
7709   s,@SPRNG_LIBDIR@,$SPRNG_LIBDIR,;t t
# Line 7654 | Line 7714 | s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t
7714   s,@MKL_LIB@,$MKL_LIB,;t t
7715   s,@MKL_INC@,$MKL_INC,;t t
7716   s,@HAVE_MKL@,$HAVE_MKL,;t t
7657 s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t
7658 s,@MPIMODLIBNAME@,$MPIMODLIBNAME,;t t
7717   s,@BATEXT@,$BATEXT,;t t
7718   s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
7719   s,@OOPSE@,$OOPSE,;t t

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines