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

Comparing trunk/OOPSE/configure (file contents):
Revision 838 by gezelter, Wed Oct 29 03:06:51 2003 UTC vs.
Revision 1202 by gezelter, Thu May 27 16:20:36 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 MPI_LIBDIR MPI_INC MPI_F90INC MPI_LIB MPI_F90LIB 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
873 >  --with-mpi=MPIDIR   give the path for MPI /usr/local
874    --with-mpi-libdir=dir  give the path for MPI-libraries MPI_DIR/lib
875 <  --with-mpi_inc=dir  give the path for MPI-include-files MPI_DIR/include
875 >  --with-mpi-inc=dir  give the path for MPI-include-files MPI_DIR/include
876    --with-sprng_prefix=PREFIX
877                            Prefix where SPRNG is installed
878    --with-sprng-libdir=PREFIX  SPRNG library directory
879    --with-sprng-include=PREFIX
880                            SPRNG include directory
881 <  --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
881 >  --with-mkl              Do we want MKL will check /usr/local/intel/mkl61 /opt/intel/mkl61
882  
883   Some influential environment variables:
884    CC          C compiler command
# Line 897 | Line 891 | Some influential environment variables:
891    CXXFLAGS    C++ compiler flags
892    F90         Fortran 90 compiler command
893    F90FLAGS    Fortran 90 compiler flags
900  MPIF77      MPI Fortran compiler command
894    CPP         C preprocessor
895  
896   Use these variables to override the choices made by `configure' or to help
# Line 1792 | Line 1785 | ac_configure="$SHELL $ac_aux_dir/configure" # This sho
1785   # $SHELLVAR to the Fortran 95 mangled name.  If the SHELLVAR
1786   # argument is not supplied, it defaults to NAME.
1787   # AC_F95_FUNC
1788 +
1789 +
1790  
1791  
1792  
# Line 1836 | Line 1831 | ac_configure="$SHELL $ac_aux_dir/configure" # This sho
1831  
1832  
1833  
1834 +
1835 +
1836 +
1837 +
1838 +
1839 +
1840   # set program name
1841   PROGNAME="oopse"
1842  
# Line 2566 | Line 2567 | ac_ext=cc
2567   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2568   ac_compiler_gnu=$ac_cv_c_compiler_gnu
2569  
2570 +
2571   ac_ext=cc
2572   ac_cpp='$CXXCPP $CPPFLAGS'
2573   ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2574   ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2575   ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2576   if test -n "$ac_tool_prefix"; then
2577 <  for ac_prog in $CCC icpc icc xlC CC g++ c++
2577 >  for ac_prog in $CCC icpc icc xlc++ xlC CC g++ c++
2578    do
2579      # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2580   set dummy $ac_tool_prefix$ac_prog; ac_word=$2
# Line 2614 | Line 2616 | if test -z "$CXX"; then
2616   fi
2617   if test -z "$CXX"; then
2618    ac_ct_CXX=$CXX
2619 <  for ac_prog in $CCC icpc icc xlC CC g++ c++
2619 >  for ac_prog in $CCC icpc icc xlc++ xlC CC g++ c++
2620   do
2621    # Extract the first word of "$ac_prog", so it can be a program name with args.
2622   set dummy $ac_prog; ac_word=$2
# Line 2885 | Line 2887 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
2887   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2888   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2889   ac_compiler_gnu=$ac_cv_c_compiler_gnu
2890 +
2891 +
2892 + OOPSE_TEMPLATE_FLAGS=""
2893 + if test $ac_cv_cxx_compiler_gnu = no; then
2894 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -ptused -no_prelink" >&5
2895 + echo $ECHO_N "checking checking whether ${CXX} accepts -ptused -no_prelink... $ECHO_C" >&6
2896 +  echo 'void f(){}' > conftest.cc
2897 +  if test -z "`${CXX} -ptused -no_prelink -c conftest.cc 2>&1`"; then
2898 +    echo "$as_me:$LINENO: result: yes" >&5
2899 + echo "${ECHO_T}yes" >&6
2900 +    OOPSE_TEMPLATE_FLAGS="-ptused -no_prelink"
2901 +  else
2902 +    echo "$as_me:$LINENO: result: no" >&5
2903 + echo "${ECHO_T}no" >&6
2904 +  fi
2905 +  rm -f conftest*
2906 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -instances=static" >&5
2907 + echo $ECHO_N "checking checking whether ${CXX} accepts -instances=static... $ECHO_C" >&6
2908 +  echo 'void f(){}' > conftest.cc
2909 +  if test -z "`${CXX} -instances=static -c conftest.cc 2>&1`"; then
2910 +    echo "$as_me:$LINENO: result: yes" >&5
2911 + echo "${ECHO_T}yes" >&6
2912 +    OOPSE_TEMPLATE_FLAGS="-instances=static"
2913 +  else
2914 +    echo "$as_me:$LINENO: result: no" >&5
2915 + echo "${ECHO_T}no" >&6
2916 +  fi
2917 +  rm -f conftest*
2918 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -pto" >&5
2919 + echo $ECHO_N "checking checking whether ${CXX} accepts -pto... $ECHO_C" >&6
2920 +  echo 'void f(){}' > conftest.cc
2921 +  if test -z "`${CXX} -pto -c conftest.cc 2>&1`"; then
2922 +    echo "$as_me:$LINENO: result: yes" >&5
2923 + echo "${ECHO_T}yes" >&6
2924 +    OOPSE_TEMPLATE_FLAGS="-pto"
2925 +  else
2926 +    echo "$as_me:$LINENO: result: no" >&5
2927 + echo "${ECHO_T}no" >&6
2928 +  fi
2929 +  rm -f conftest*
2930 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -LANG:std" >&5
2931 + echo $ECHO_N "checking checking whether ${CXX} accepts -LANG:std... $ECHO_C" >&6
2932 +  echo 'void f(){}' > conftest.cc
2933 +  if test -z "`${CXX} -LANG:std -c conftest.cc 2>&1`"; then
2934 +    echo "$as_me:$LINENO: result: yes" >&5
2935 + echo "${ECHO_T}yes" >&6
2936  
2937 +
2938 +    EXTRA_CC_FLAG=${EXTRA_CC_FLAG}" -LANG:std"
2939 +  else
2940 +    echo "$as_me:$LINENO: result: no" >&5
2941 + echo "${ECHO_T}no" >&6
2942 +  fi
2943 + fi
2944 +
2945 +
2946 +
2947 +
2948   ac_ext=f90
2949   ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
2950   ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2951   ac_compiler_gnu=$ac_cv_f90_compiler_gnu
2952   if test -n "$ac_tool_prefix"; then
2953 <  for ac_prog in ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2953 >  for ac_prog in ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2954    do
2955      # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2956   set dummy $ac_tool_prefix$ac_prog; ac_word=$2
# Line 2933 | Line 2992 | if test -z "$F90"; then
2992   fi
2993   if test -z "$F90"; then
2994    ac_ct_F90=$F90
2995 <  for ac_prog in ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2995 >  for ac_prog in ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2996   do
2997    # Extract the first word of "$ac_prog", so it can be a program name with args.
2998   set dummy $ac_prog; ac_word=$2
# Line 3041 | Line 3100 | if test "$ac_test_PREPFLAG" != "set"; then
3100    PREPFLAG=""
3101    case "${host_cpu}-${host_os}" in
3102  
3103 <  *linux*) if test "$F90" = ifc; then
3103 >  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
3104                      PREPFLAG="-fpp1 "
3105                  fi;;
3106    *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
# Line 3054 | Line 3113 | if test "$ac_test_PREPFLAG" != "set"; then
3113    esac
3114  
3115    if test -z "$PREPFLAG"; then
3116 <        echo ""
3117 <        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 ""
3116 >        { echo "$as_me:$LINENO: WARNING: \"Using empty PREPFLAG\"" >&5
3117 > echo "$as_me: WARNING: \"Using empty PREPFLAG\"" >&2;}
3118          PREPFLAG=""
3119    fi
3120  
# Line 3123 | Line 3177 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
3177   ac_compiler_gnu=$ac_cv_c_compiler_gnu
3178  
3179  
3126
3180    if test "$prepflagworks" = 1; then
3181      echo "$as_me:$LINENO: result: yes" >&5
3182   echo "${ECHO_T}yes" >&6
# Line 3148 | Line 3201 | if test "$ac_test_PREPDEFFLAG" != "set"; then
3201    PREPDEFFLAG=""
3202    case "${host_cpu}-${host_os}" in
3203  
3204 <  *linux*) if test "$F90" = ifc; then
3204 >  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
3205                      PREPDEFFLAG=" "
3206                  fi;;
3207    *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
# Line 3161 | Line 3214 | if test "$ac_test_PREPDEFFLAG" != "set"; then
3214    esac
3215  
3216    if test -z "$PREPDEFFLAG"; then
3217 <        echo ""
3218 <        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 ""
3217 >        { echo "$as_me:$LINENO: WARNING: \"Using empty PREPDEFFLAG\"" >&5
3218 > echo "$as_me: WARNING: \"Using empty PREPDEFFLAG\"" >&2;}
3219          PREPDEFFLAG=" "
3220    fi
3221  
# Line 3246 | Line 3294 | fi
3294   echo "$as_me: error: Can't figure out working Fortran90 preprocessor define flag" >&2;}
3295     { (exit 1); exit 1; }; }
3296    fi
3297 + fi
3298 +
3299 + ac_ext=f90
3300 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3301 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3302 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3303 +
3304 +
3305 +
3306 + ac_ext=f90
3307 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3308 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3309 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3310 + echo "$as_me:$LINENO: checking how to get verbose linking output from $F90" >&5
3311 + echo $ECHO_N "checking how to get verbose linking output from $F90... $ECHO_C" >&6
3312 + if test "${ac_cv_prog_f90_v+set}" = set; then
3313 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3314 + else
3315 +
3316 + cat >conftest.$ac_ext <<_ACEOF
3317 +
3318 + program main
3319 +
3320 +
3321 + end program main
3322 +
3323 + _ACEOF
3324 + rm -f conftest.$ac_objext
3325 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3326 +  (eval $ac_compile) 2>&5
3327 +  ac_status=$?
3328 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3329 +  (exit $ac_status); } &&
3330 +         { ac_try='test -s conftest.$ac_objext'
3331 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3332 +  (eval $ac_try) 2>&5
3333 +  ac_status=$?
3334 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3335 +  (exit $ac_status); }; }; then
3336 +  ac_cv_prog_f90_v=
3337 + # Try some options frequently used verbose output
3338 + for ac_verb in -v -verbose --verbose -V -\#\#\#; do
3339 +  ac_ext=f90
3340 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3341 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3342 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3343 +
3344 + cat >conftest.$ac_ext <<_ACEOF
3345 +
3346 + program main
3347 +
3348 +
3349 + end program main
3350 +
3351 + _ACEOF
3352 +
3353 + # Compile and link our simple test program by passing a flag (argument
3354 + # 1 to this macro) to the Fortran 90 compiler in order to get
3355 + # "verbose" output that we can then parse for the Fortran 90 linker
3356 + # flags.
3357 + ac_save_F90FLAGS=$F90FLAGS
3358 + F90FLAGS="$F90FLAGS $ac_verb"
3359 +
3360 + (eval echo $as_me:3360: \"$ac_link\") >&5
3361 + ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
3362 + echo "$ac_f90_v_output" >&5
3363 + F90FLAGS=$ac_save_F90FLAGS
3364 +
3365 + rm -f conftest.*
3366 + ac_ext=f90
3367 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3368 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3369 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3370 +
3371 + # If we are using xlf then replace all the commas with spaces.
3372 + if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
3373 +  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
3374   fi
3375  
3376 + # If we are using Cray Fortran then delete quotes.
3377 + # Use "\"" instead of '"' for font-lock-mode.
3378 + # FIXME: a more general fix for quoted arguments with spaces?
3379 + if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
3380 +  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
3381 + fi
3382 +  # look for -l* and *.a constructs in the output
3383 +  for ac_arg in $ac_f90_v_output; do
3384 +     case $ac_arg in
3385 +        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
3386 +          ac_cv_prog_f90_v=$ac_verb
3387 +          break 2 ;;
3388 +     esac
3389 +  done
3390 + done
3391 + if test -z "$ac_cv_prog_f90_v"; then
3392 +   { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F90" >&5
3393 + echo "$as_me: WARNING: cannot determine how to obtain linking information from $F90" >&2;}
3394 + fi
3395 + else
3396 +  echo "$as_me: failed program was:" >&5
3397 + sed 's/^/| /' conftest.$ac_ext >&5
3398  
3399 + { echo "$as_me:$LINENO: WARNING: compilation failed" >&5
3400 + echo "$as_me: WARNING: compilation failed" >&2;}
3401 + fi
3402 + rm -f conftest.$ac_objext conftest.$ac_ext
3403 +
3404 + fi
3405 + echo "$as_me:$LINENO: result: $ac_cv_prog_f90_v" >&5
3406 + echo "${ECHO_T}$ac_cv_prog_f90_v" >&6
3407 + echo "$as_me:$LINENO: checking for Fortran 90 libraries" >&5
3408 + echo $ECHO_N "checking for Fortran 90 libraries... $ECHO_C" >&6
3409 + if test "${ac_cv_flibs+set}" = set; then
3410 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3411 + else
3412 +  if test "x$F90LIBS" != "x"; then
3413 +  ac_cv_f90libs="$F90LIBS" # Let the user override the test.
3414 + else
3415 +
3416 + ac_ext=f90
3417 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3418 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3419 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3420 +
3421 + cat >conftest.$ac_ext <<_ACEOF
3422 +
3423 + program main
3424 +
3425 +
3426 + end program main
3427 +
3428 + _ACEOF
3429 +
3430 + # Compile and link our simple test program by passing a flag (argument
3431 + # 1 to this macro) to the Fortran 90 compiler in order to get
3432 + # "verbose" output that we can then parse for the Fortran 90 linker
3433 + # flags.
3434 + ac_save_F90FLAGS=$F90FLAGS
3435 + F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v"
3436 +
3437 + (eval echo $as_me:3437: \"$ac_link\") >&5
3438 + ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
3439 + echo "$ac_f90_v_output" >&5
3440 + F90FLAGS=$ac_save_F90FLAGS
3441 +
3442 + rm -f conftest.*
3443 + ac_ext=f90
3444 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3445 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3446 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3447 +
3448 + # If we are using xlf then replace all the commas with spaces.
3449 + if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
3450 +  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
3451 + fi
3452 +
3453 + # If we are using Cray Fortran then delete quotes.
3454 + # Use "\"" instead of '"' for font-lock-mode.
3455 + # FIXME: a more general fix for quoted arguments with spaces?
3456 + if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
3457 +  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
3458 + fi
3459 +
3460 + ac_cv_f90libs=
3461 +
3462 + # Save positional arguments (if any)
3463 + ac_save_positional="$@"
3464 +
3465 + set X $ac_f90_v_output
3466 + while test $# != 1; do
3467 +  shift
3468 +  ac_arg=$1
3469 +  case $ac_arg in
3470 +        [\\/]*.a | ?:[\\/]*.a)
3471 +            ac_exists=false
3472 +  for ac_i in $ac_cv_f90libs; do
3473 +    if test x"$ac_arg" = x"$ac_i"; then
3474 +      ac_exists=true
3475 +      break
3476 +    fi
3477 +  done
3478 +
3479 +  if test x"$ac_exists" = xtrue; then
3480 +  :
3481 + else
3482 +  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3483 + fi
3484 +
3485 +          ;;
3486 +        -bI:*)
3487 +            ac_exists=false
3488 +  for ac_i in $ac_cv_f90libs; do
3489 +    if test x"$ac_arg" = x"$ac_i"; then
3490 +      ac_exists=true
3491 +      break
3492 +    fi
3493 +  done
3494 +
3495 +  if test x"$ac_exists" = xtrue; then
3496 +  :
3497 + else
3498 +  if test "$ac_compiler_gnu" = yes; then
3499 +  for ac_link_opt in $ac_arg; do
3500 +    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
3501 +  done
3502 + else
3503 +  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3504 + fi
3505 + fi
3506 +
3507 +          ;;
3508 +          # Ignore these flags.
3509 +        -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*)
3510 +          ;;
3511 +        -lkernel32)
3512 +          test x"$CYGWIN" != xyes && ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3513 +          ;;
3514 +        -[LRuY])
3515 +          # These flags, when seen by themselves, take an argument.
3516 +          # We remove the space between option and argument and re-iterate
3517 +          # unless we find an empty arg or a new option (starting with -)
3518 +          case $2 in
3519 +             "" | -*);;
3520 +             *)
3521 +                ac_arg="$ac_arg$2"
3522 +
3523 +                shift; shift
3524 +                set X $ac_arg "$@"
3525 +                ;;
3526 +          esac
3527 +          ;;
3528 +        -YP,*)
3529 +          for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
3530 +              ac_exists=false
3531 +  for ac_i in $ac_cv_f90libs; do
3532 +    if test x"$ac_j" = x"$ac_i"; then
3533 +      ac_exists=true
3534 +      break
3535 +    fi
3536 +  done
3537 +
3538 +  if test x"$ac_exists" = xtrue; then
3539 +  :
3540 + else
3541 +  ac_arg="$ac_arg $ac_j"
3542 +                             ac_cv_f90libs="$ac_cv_f90libs $ac_j"
3543 + fi
3544 +
3545 +          done
3546 +          ;;
3547 +        -[lLR]*)
3548 +            ac_exists=false
3549 +  for ac_i in $ac_cv_f90libs; do
3550 +    if test x"$ac_arg" = x"$ac_i"; then
3551 +      ac_exists=true
3552 +      break
3553 +    fi
3554 +  done
3555 +
3556 +  if test x"$ac_exists" = xtrue; then
3557 +  :
3558 + else
3559 +  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3560 + fi
3561 +
3562 +          ;;
3563 +          # Ignore everything else.
3564 +  esac
3565 + done
3566 + # restore positional arguments
3567 + set X $ac_save_positional; shift
3568 +
3569 + # We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
3570 + # then we insist that the "run path" must be an absolute path (i.e. it
3571 + # must begin with a "/").
3572 + case `(uname -sr) 2>/dev/null` in
3573 +   "SunOS 5"*)
3574 +      ac_ld_run_path=`echo $ac_f90_v_output |
3575 +                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
3576 +      test "x$ac_ld_run_path" != x &&
3577 +
3578 +        if test "$ac_compiler_gnu" = yes; then
3579 +  for ac_link_opt in $ac_ld_run_path; do
3580 +    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
3581 +  done
3582 + else
3583 +  ac_cv_f90libs="$ac_cv_f90libs $ac_ld_run_path"
3584 + fi
3585 +      ;;
3586 + esac
3587 + fi # test "x$F90LIBS" = "x"
3588 +
3589 + fi
3590 + echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5
3591 + echo "${ECHO_T}$ac_cv_flibs" >&6
3592 + F90LIBS="$ac_cv_f90libs"
3593 +
3594 + ac_ext=f90
3595 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3596 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3597 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3598 +
3599 +
3600 + echo "$as_me:$LINENO: checking for Fortran 90 name-mangling scheme" >&5
3601 + echo $ECHO_N "checking for Fortran 90 name-mangling scheme... $ECHO_C" >&6
3602 + if test "${ac_cv_f90_mangling+set}" = set; then
3603 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3604 + else
3605 +  ac_ext=f90
3606 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3607 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3608 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3609 + cat >conftest.$ac_ext <<_ACEOF
3610 + subroutine foobar()
3611 + return
3612 + end
3613 + subroutine foo_bar()
3614 + return
3615 + end
3616 + _ACEOF
3617 + rm -f conftest.$ac_objext
3618 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3619 +  (eval $ac_compile) 2>&5
3620 +  ac_status=$?
3621 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3622 +  (exit $ac_status); } &&
3623 +         { ac_try='test -s conftest.$ac_objext'
3624 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3625 +  (eval $ac_try) 2>&5
3626 +  ac_status=$?
3627 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3628 +  (exit $ac_status); }; }; then
3629 +  mv conftest.$ac_objext cf90_test.$ac_objext
3630 +
3631 +  ac_ext=c
3632 + ac_cpp='$CPP $CPPFLAGS'
3633 + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3634 + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3635 + ac_compiler_gnu=$ac_cv_c_compiler_gnu
3636 +
3637 +  ac_save_LIBS=$LIBS
3638 +  LIBS="cf90_test.$ac_objext $F90LIBS $LIBS"
3639 +
3640 +  ac_success=no
3641 +  for ac_foobar in foobar FOOBAR; do
3642 +    for ac_underscore in "" "_"; do
3643 +      ac_func="$ac_foobar$ac_underscore"
3644 +      cat >conftest.$ac_ext <<_ACEOF
3645 + #line $LINENO "configure"
3646 + /* confdefs.h.  */
3647 + _ACEOF
3648 + cat confdefs.h >>conftest.$ac_ext
3649 + cat >>conftest.$ac_ext <<_ACEOF
3650 + /* end confdefs.h.  */
3651 +
3652 + /* Override any gcc2 internal prototype to avoid an error.  */
3653 + #ifdef __cplusplus
3654 + extern "C"
3655 + #endif
3656 + /* We use char because int might match the return type of a gcc2
3657 +   builtin and then its argument prototype would still apply.  */
3658 + char $ac_func ();
3659 + int
3660 + main ()
3661 + {
3662 + $ac_func ();
3663 +  ;
3664 +  return 0;
3665 + }
3666 + _ACEOF
3667 + rm -f conftest.$ac_objext conftest$ac_exeext
3668 + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3669 +  (eval $ac_link) 2>&5
3670 +  ac_status=$?
3671 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3672 +  (exit $ac_status); } &&
3673 +         { ac_try='test -s conftest$ac_exeext'
3674 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3675 +  (eval $ac_try) 2>&5
3676 +  ac_status=$?
3677 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3678 +  (exit $ac_status); }; }; then
3679 +  ac_success=yes; break 2
3680 + else
3681 +  echo "$as_me: failed program was:" >&5
3682 + sed 's/^/| /' conftest.$ac_ext >&5
3683 +
3684 + fi
3685 + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3686 +    done
3687 +  done
3688 +
3689 +  if test "$ac_success" = "yes"; then
3690 +     case $ac_foobar in
3691 +        foobar)
3692 +           ac_case=lower
3693 +           ac_foo_bar=foo_bar
3694 +           ;;
3695 +        FOOBAR)
3696 +           ac_case=upper
3697 +           ac_foo_bar=FOO_BAR
3698 +           ;;
3699 +     esac
3700 +
3701 +     ac_success_extra=no
3702 +     for ac_extra in "" "_"; do
3703 +        ac_func="$ac_foo_bar$ac_underscore$ac_extra"
3704 +
3705 +        cat >conftest.$ac_ext <<_ACEOF
3706 + #line $LINENO "configure"
3707 + /* confdefs.h.  */
3708 + _ACEOF
3709 + cat confdefs.h >>conftest.$ac_ext
3710 + cat >>conftest.$ac_ext <<_ACEOF
3711 + /* end confdefs.h.  */
3712 +
3713 + /* Override any gcc2 internal prototype to avoid an error.  */
3714 + #ifdef __cplusplus
3715 + extern "C"
3716 + #endif
3717 + /* We use char because int might match the return type of a gcc2
3718 +   builtin and then its argument prototype would still apply.  */
3719 + char $ac_func ();
3720 + int
3721 + main ()
3722 + {
3723 + $ac_func ();
3724 +  ;
3725 +  return 0;
3726 + }
3727 + _ACEOF
3728 + rm -f conftest.$ac_objext conftest$ac_exeext
3729 + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3730 +  (eval $ac_link) 2>&5
3731 +  ac_status=$?
3732 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3733 +  (exit $ac_status); } &&
3734 +         { ac_try='test -s conftest$ac_exeext'
3735 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3736 +  (eval $ac_try) 2>&5
3737 +  ac_status=$?
3738 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3739 +  (exit $ac_status); }; }; then
3740 +  ac_success_extra=yes; break
3741 + else
3742 +  echo "$as_me: failed program was:" >&5
3743 + sed 's/^/| /' conftest.$ac_ext >&5
3744 +
3745 + fi
3746 + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3747 +     done
3748 +
3749 +     if test "$ac_success_extra" = "yes"; then
3750 +        ac_cv_f90_mangling="$ac_case case"
3751 +        if test -z "$ac_underscore"; then
3752 +           ac_cv_f90_mangling="$ac_cv_f90_mangling, no underscore"
3753 +        else
3754 +           ac_cv_f90_mangling="$ac_cv_f90_mangling, underscore"
3755 +
3756 +        fi
3757 +        if test -z "$ac_extra"; then
3758 +           ac_cv_f90_mangling="$ac_cv_f90_mangling, no extra underscore"
3759 +        else
3760 +           ac_cv_f90_mangling="$ac_cv_f90_mangling, extra underscore"
3761 +        fi
3762 +      else
3763 +        ac_cv_f90_mangling="unknown"
3764 +      fi
3765 +  else
3766 +     ac_cv_f90_mangling="unknown"
3767 +
3768 +  fi
3769 +
3770 +  LIBS=$ac_save_LIBS
3771 +  ac_ext=f90
3772 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3773 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3774 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3775 +  rm -f cf90_test* conftest*
3776 + else
3777 +  echo "$as_me: failed program was:" >&5
3778 + sed 's/^/| /' conftest.$ac_ext >&5
3779 +
3780 + fi
3781 + rm -f conftest.$ac_objext conftest.$ac_ext
3782 + ac_ext=f90
3783 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3784 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3785 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3786 +
3787 + fi
3788 + echo "$as_me:$LINENO: result: $ac_cv_f90_mangling" >&5
3789 + echo "${ECHO_T}$ac_cv_f90_mangling" >&6
3790 +
3791 +
3792 +
3793 + case $ac_cv_f90_mangling in
3794 +  "lower case, no underscore, no extra underscore")
3795 +          cat >>confdefs.h <<\_ACEOF
3796 + #define F90_FUNC(name,NAME) name
3797 + _ACEOF
3798 +
3799 +          cat >>confdefs.h <<\_ACEOF
3800 + #define F90_FUNC_(name,NAME) name
3801 + _ACEOF
3802 + ;;
3803 +  "lower case, no underscore, extra underscore")
3804 +          cat >>confdefs.h <<\_ACEOF
3805 + #define F90_FUNC(name,NAME) name
3806 + _ACEOF
3807 +
3808 +          cat >>confdefs.h <<\_ACEOF
3809 + #define F90_FUNC_(name,NAME) name ## _
3810 + _ACEOF
3811 + ;;
3812 +  "lower case, underscore, no extra underscore")
3813 +          cat >>confdefs.h <<\_ACEOF
3814 + #define F90_FUNC(name,NAME) name ## _
3815 + _ACEOF
3816 +
3817 +          cat >>confdefs.h <<\_ACEOF
3818 + #define F90_FUNC_(name,NAME) name ## _
3819 + _ACEOF
3820 + ;;
3821 +  "lower case, underscore, extra underscore")
3822 +          cat >>confdefs.h <<\_ACEOF
3823 + #define F90_FUNC(name,NAME) name ## _
3824 + _ACEOF
3825 +
3826 +          cat >>confdefs.h <<\_ACEOF
3827 + #define F90_FUNC_(name,NAME) name ## __
3828 + _ACEOF
3829 + ;;
3830 +  "upper case, no underscore, no extra underscore")
3831 +          cat >>confdefs.h <<\_ACEOF
3832 + #define F90_FUNC(name,NAME) NAME
3833 + _ACEOF
3834 +
3835 +          cat >>confdefs.h <<\_ACEOF
3836 + #define F90_FUNC_(name,NAME) NAME
3837 + _ACEOF
3838 + ;;
3839 +  "upper case, no underscore, extra underscore")
3840 +          cat >>confdefs.h <<\_ACEOF
3841 + #define F90_FUNC(name,NAME) NAME
3842 + _ACEOF
3843 +
3844 +          cat >>confdefs.h <<\_ACEOF
3845 + #define F90_FUNC_(name,NAME) NAME ## _
3846 + _ACEOF
3847 + ;;
3848 +  "upper case, underscore, no extra underscore")
3849 +          cat >>confdefs.h <<\_ACEOF
3850 + #define F90_FUNC(name,NAME) NAME ## _
3851 + _ACEOF
3852 +
3853 +          cat >>confdefs.h <<\_ACEOF
3854 + #define F90_FUNC_(name,NAME) NAME ## _
3855 + _ACEOF
3856 + ;;
3857 +  "upper case, underscore, extra underscore")
3858 +          cat >>confdefs.h <<\_ACEOF
3859 + #define F90_FUNC(name,NAME) NAME ## _
3860 + _ACEOF
3861 +
3862 +          cat >>confdefs.h <<\_ACEOF
3863 + #define F90_FUNC_(name,NAME) NAME ## __
3864 + _ACEOF
3865 + ;;
3866 +  *)
3867 +          { echo "$as_me:$LINENO: WARNING: unknown Fortran 90 name-mangling scheme" >&5
3868 + echo "$as_me: WARNING: unknown Fortran 90 name-mangling scheme" >&2;}
3869 +          ;;
3870 + esac
3871 +
3872 +
3873 +
3874 +
3875 +
3876 + echo "$as_me:$LINENO: checking for module suffix" >&5
3877 + echo $ECHO_N "checking for module suffix... $ECHO_C" >&6
3878 + rm -f conftest*
3879 + # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
3880 + rm -f work*
3881 + cat >conftest.f90 <<EOF
3882 +        module conftest
3883 +        integer n
3884 +        parameter (n=1)
3885 +        end module conftest
3886 + EOF
3887 + # SGI and absoft compilers generates module name in upper case!
3888 + testname="conftest"
3889 + modcase="lower"
3890 + if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
3891 +    MOD=`ls conftest* | grep -v conftest.f | grep -v conftest.o`
3892 +    MOD=`echo "$MOD" | sed -e 's/conftest\.//g'`
3893 +    if test -z "$MOD" ; then
3894 +        MOD=`ls CONFTEST* 2>/dev/null \
3895 +                | grep -v CONFTEST.f | grep -v CONFTEST.o`
3896 +        MOD=`echo "$MOD" | sed -e 's/CONFTEST\.//g'`
3897 +        if test -n "$MOD" ; then
3898 +            testname="CONFTEST"
3899 +            modcase="upper"
3900 +        fi
3901 +    fi
3902 +    if test -z "$MOD" ; then
3903 +        echo "$as_me:$LINENO: result: unknown" >&5
3904 + echo "${ECHO_T}unknown" >&6
3905 +        # Use mod if we can't figure it out
3906 +        MOD="mod"
3907 +    else
3908 +        echo "$as_me:$LINENO: result: $MOD" >&5
3909 + echo "${ECHO_T}$MOD" >&6
3910 +    fi
3911 +    if test -s work.pcl ; then
3912 +        { echo "$as_me:$LINENO: WARNING: Compiler generates auxillery files!" >&5
3913 + echo "$as_me: WARNING: Compiler generates auxillery files!" >&2;}
3914 +    fi
3915 + else
3916 +    echo "$as_me:$LINENO: result: unknown" >&5
3917 + echo "${ECHO_T}unknown" >&6
3918 + fi
3919 +
3920 +
3921 +
3922 +
3923 +
3924 + # Check for module include path (some use -I, some (Solaris) use -M, some
3925 + # (absoft) use -p).
3926 + # Intel compilers use a wierd system: -cl,filename.pcl .  If no file is
3927 + # specified, work.pcl and work.pc are created.  However, if you specify
3928 + # a file, it must contain a the name of a file ending in .pc .  Ugh!
3929 + # Use the module made above
3930 + echo "$as_me:$LINENO: checking for module directory path flag" >&5
3931 + echo $ECHO_N "checking for module directory path flag... $ECHO_C" >&6
3932 + rm -f conftest*
3933 + # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
3934 + rm -f work*
3935 + cat >conftest.f90 <<EOF
3936 +        module conftest
3937 +        integer n
3938 +        parameter (n=1)
3939 +        end module conftest
3940 + EOF
3941 + # SGI and absoft compilers generates module name in upper case!
3942 + testname="conftest"
3943 + if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
3944 +   mod=`ls CONFTEST* 2>/dev/null | grep -v CONFTEST.f | grep -v CONFTEST.o`
3945 +   mod=`echo "$mod" | sed -e 's/CONFTEST\.//g'`
3946 +   if test -n "$mod" ; then
3947 +      testname="CONFTEST"
3948 +   fi
3949 +   madedir=0
3950 +   if test ! -d conf ; then mkdir conf ; madedir=1; fi
3951 +   cp $testname.$MOD conf
3952 +   rm -f conftest* CONFTEST*
3953 +   cat >conftest1.f90 <<EOF
3954 +        program main
3955 +        use conftest
3956 +        print *, n
3957 +        end
3958 + EOF
3959 +   F90_WORK_FILES_ARG=""
3960 +   F90MODINCSPEC=""
3961 +   if $F90 -c -Iconf conftest1.f90 > conftest.out 2>&1 ; then
3962 +       MODDIRFLAG="-I"
3963 +       F90MODINCSPEC="-I<dir>"
3964 +       echo "$as_me:$LINENO: result: -I" >&5
3965 + echo "${ECHO_T}-I" >&6
3966 +   elif $F90 -c -Mconf conftest1.f90 >> conftest.out 2>&1 ; then
3967 +       MODDIRFLAG="-M"
3968 +       F90MODINCSPEC="-M<dir>"
3969 +       echo "$as_me:$LINENO: result: -M" >&5
3970 + echo "${ECHO_T}-M" >&6
3971 +   elif $F90 -c -pconf conftest1.f90 >> conftest.out 2>&1 ; then
3972 +       MODDIRFLAG="-p"
3973 +       F90MODINCSPEC="-p<dir>"
3974 +       echo "$as_me:$LINENO: result: -p" >&5
3975 + echo "${ECHO_T}-p" >&6
3976 +   elif test -s work.pc ; then
3977 +        cp work.pc conf/mpimod.pc
3978 +        echo "mpimod.pc" > conf/mpimod.pcl
3979 +        echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl
3980 +        if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then
3981 +            MODDIRFLAG='-cl,mpimod.pcl'
3982 +            echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and directories" >&5
3983 + echo "${ECHO_T}-cl,filename where filename contains a list of files and directories" >&6
3984 +            F90_WORK_FILES_ARG="-cl,mpimod.pcl"
3985 +            F90MODINCSPEC="-cl,<dir>/<file>mod.pcl"
3986 +
3987 +        else
3988 +            # The version of the Intel compiler that I have refuses to let
3989 +            # you put the "work catalog" list anywhere but the current
3990 +            # directory. For example, you cannot in
3991 +         :
3992 +        fi
3993 +   fi
3994 +   if test -z "MODDIRFLAG" ; then
3995 +       echo "$as_me:$LINENO: result: unknown" >&5
3996 + echo "${ECHO_T}unknown" >&6
3997 +   fi
3998 +
3999 +
4000 +   rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod*
4001 +   if test $madedir = 1 ; then rmdir conf ; fi
4002 + fi
4003 +
4004 +
4005 +
4006 +
4007   case $debug in
4008    1)
4009       ;;
4010    *)
4011 +
4012 +
4013 +
4014 +
4015 +
4016 +
4017 + echo "$as_me:$LINENO: checking whether we are *really* using GNU cc" >&5
4018 + echo $ECHO_N "checking whether we are *really* using GNU cc... $ECHO_C" >&6
4019 + if test "${ac_cv_prog_really_gcc+set}" = set; then
4020 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4021 + else
4022 +
4023 + cat > conftest.c <<EOF
4024 + #ifdef __GNUC__
4025 +  #ifndef __INTEL_COMPILER
4026 +     yes;
4027 +  #endif
4028 + #endif
4029 + EOF
4030 + if { ac_try='${CC-cc} -E conftest.c'
4031 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4032 +  (eval $ac_try) 2>&5
4033 +  ac_status=$?
4034 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4035 +  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
4036 +  ac_cv_prog_really_gcc=yes
4037 + else
4038 +  ac_cv_prog_really_gcc=no
4039 + fi
4040  
4041 + fi
4042 + echo "$as_me:$LINENO: result: $ac_cv_prog_really_gcc" >&5
4043 + echo "${ECHO_T}$ac_cv_prog_really_gcc" >&6
4044 + if test "$ac_cv_prog_really_gcc" = yes; then
4045 +        :
4046  
4047 + else
4048 +        :
4049  
4050 + fi
4051  
4052 +
4053   # Try to determine "good" native compiler flags if none specified on command
4054   # line
4055   if test "$ac_test_CFLAGS" != "set"; then
# Line 3296 | Line 4089 | if test "$ac_test_CFLAGS" != "set"; then
4089          fi;;
4090     *darwin*)
4091          if test "$CC" = xlc -o "$CC" = cc; then
4092 <                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 "*******************************************************"
4092 >                CFLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto -qaltivec"
4093          fi;;
4094    esac
4095  
4096    # use default flags for gcc on all systems
4097 <  if test $ac_cv_c_compiler_gnu = yes; then
4097 >  if test $ac_cv_prog_really_gcc = yes; then
4098       CFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic"
4099    fi
4100  
4101    # test for gcc-specific flags:
4102 <  if test $ac_cv_c_compiler_gnu = yes; then
4102 >  if test $ac_cv_prog_really_gcc = yes; then
4103      # -malign-double for x86 systems
4104  
4105  
# Line 3373 | Line 4157 | fi
4157    fi
4158  
4159    CPU_FLAGS=""
4160 <  if test "$GCC" = "yes"; then
4160 >  if test $ac_cv_prog_really_gcc = yes; then
4161                    case "${host_cpu}" in
4162            i586*)
4163  
# Line 3519 | Line 4303 | cat > conftest.c <<EOF
4303   else
4304  
4305   cat > conftest.c <<EOF
4306 < #ifdef __GNUC__
4306 > #ifdef __GNUC__ && !defined (__INTEL_COMPILER)
4307   #  if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
4308       yes;
4309   #  endif
# Line 3683 | Line 4467 | fi
4467   fi
4468  
4469  
4470 + fi
4471 +
4472 +
4473 +
4474 +
4475 +
4476 +
4477 +
4478 + echo "$as_me:$LINENO: checking whether we are *really* using GNU c++" >&5
4479 + echo $ECHO_N "checking whether we are *really* using GNU c++... $ECHO_C" >&6
4480 + if test "${ac_cv_prog_really_gxx+set}" = set; then
4481 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4482 + else
4483 +
4484 + cat > conftest.cpp <<EOF
4485 + #ifdef __GNUC__
4486 +  #ifndef __INTEL_COMPILER
4487 +     yes;
4488 +  #endif
4489 + #endif
4490 + EOF
4491 + if { ac_try='${CXX-c++} -E conftest.cpp'
4492 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4493 +  (eval $ac_try) 2>&5
4494 +  ac_status=$?
4495 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4496 +  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
4497 +  ac_cv_prog_really_gxx=yes
4498 + else
4499 +  ac_cv_prog_really_gxx=no
4500   fi
4501  
4502 + fi
4503 + echo "$as_me:$LINENO: result: $ac_cv_prog_really_gxx" >&5
4504 + echo "${ECHO_T}$ac_cv_prog_really_gxx" >&6
4505 + if test "$ac_cv_prog_really_gxx" = yes; then
4506 +        :
4507  
4508 + else
4509 +        :
4510  
4511 + fi
4512  
4513  
4514   # Try to determine "good" native compiler flags if none specified on command
# Line 3718 | Line 4540 | if test "$ac_test_CXXFLAGS" != "set"; then
4540                  echo "*******************************************************"
4541          fi;;
4542     *darwin*)
4543 <        if test "$CXX" = xlC; then
4544 <                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 "*******************************************************"
4543 >        if test "$CXX" = xlc++; then
4544 >                CXXFLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto -qaltivec"
4545          fi;;
4546    esac
4547  
4548    # use default flags for gcc on all systems
4549 <  if test $ac_cv_c_compiler_gnu = yes; then
4549 >  if test $ac_cv_prog_really_gxx = yes; then
4550       CXXFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic"
4551    fi
4552  
4553    # test for gcc-specific flags:
4554 <  if test $ac_cv_c_compiler_gnu = yes; then
4554 >  if test $ac_cv_prog_really_gxx = yes; then
4555      # -malign-double for x86 systems
4556  
4557  
# Line 3796 | Line 4609 | fi
4609    fi
4610  
4611    CPU_FLAGS=""
4612 <  if test "$GCC" = "yes"; then
4612 >  if test $ac_cv_prog_really_gxx = yes; then
4613                    case "${host_cpu}" in
4614            i586*)
4615  
4616 < echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentium" >&5
4617 < echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentium... $ECHO_C" >&6
4616 > echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=pentium" >&5
4617 > echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=pentium... $ECHO_C" >&6
4618   if test "${ac_cpu_pentium+set}" = set; then
4619    echo $ECHO_N "(cached) $ECHO_C" >&6
4620   else
4621 <  echo 'void f(){}' > conftest.c
4622 < if test -z "`${CC-cc} -mcpu=pentium -c conftest.c 2>&1`"; then
4621 >  echo 'void f(){}' > conftest.cpp
4622 > if test -z "`${CXX-c++} -mcpu=pentium -c conftest.cpp 2>&1`"; then
4623          ac_cpu_pentium=yes
4624   else
4625          ac_cpu_pentium=no
# Line 3935 | Line 4748 | echo "$as_me:$LINENO: checking whether we are using gc
4748                  elif test "$cputype" = 750; then
4749  
4750  
4751 < echo "$as_me:$LINENO: checking whether we are using gcc 2.95 or later" >&5
4752 < echo $ECHO_N "checking whether we are using gcc 2.95 or later... $ECHO_C" >&6
4753 < if test "${ac_cv_prog_gcc_2_95+set}" = set; then
4751 > echo "$as_me:$LINENO: checking whether we are using g++ 2.95 or later" >&5
4752 > echo $ECHO_N "checking whether we are using g++ 2.95 or later... $ECHO_C" >&6
4753 > if test "${ac_cv_prog_gxx_2_95+set}" = set; then
4754    echo $ECHO_N "(cached) $ECHO_C" >&6
4755   else
4756  
4757 < cat > conftest.c <<EOF
4758 < #ifdef __GNUC__
4757 > cat > conftest.cpp <<EOF
4758 > #ifdef __GNUC__ && !defined (__INTEL_COMPILER)
4759   #  if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
4760       yes;
4761   #  endif
4762   #endif
4763   EOF
4764 < if { ac_try='${CC-cc} -E conftest.c'
4764 > if { ac_try='${CXX-c++} -E conftest.cpp'
4765    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4766    (eval $ac_try) 2>&5
4767    ac_status=$?
4768    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4769    (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
4770 <  ac_cv_prog_gcc_2_95=yes
4770 >  ac_cv_prog_gxx_2_95=yes
4771   else
4772 <  ac_cv_prog_gcc_2_95=no
4772 >  ac_cv_prog_gxx_2_95=no
4773   fi
4774  
4775   fi
4776 < echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_2_95" >&5
4777 < echo "${ECHO_T}$ac_cv_prog_gcc_2_95" >&6
4778 < if test "$ac_cv_prog_gcc_2_95" = yes; then
4776 > echo "$as_me:$LINENO: result: $ac_cv_prog_gxx_2_95" >&5
4777 > echo "${ECHO_T}$ac_cv_prog_gxx_2_95" >&6
4778 > if test "$ac_cv_prog_gxx_2_95" = yes; then
4779          :
4780  
4781  
# Line 4119 | Line 4932 | if test x"$F90FLAGS" = x ; then
4932    F90FLAGS=""
4933    case "${host_cpu}-${host_os}" in
4934  
4935 <  *linux*) if test "$F90" = ifc; then
4935 >  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
4936                      F90FLAGS="-O"
4937                  fi;;
4938     rs6000*-aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
# Line 4139 | Line 4952 | if test x"$F90FLAGS" = x ; then
4952                  echo "*******************************************************"
4953          fi;;
4954     *darwin*)
4955 <        if test "$F90" = f90 -o "$F90" = xlf90; then
4956 <                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 "*********************************************************"
4955 >        if test "$F90" = f90 -o "$F90" = xlf90 -o "$F90" = xlf95; then
4956 >                F90FLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto"
4957          fi;;
4958    esac
4959  
# Line 4195 | Line 4999 | ac_ext=c
4999          ac_guessed_f90flags=no
5000   fi
5001   rm -f conftest*
5002 < ac_ext=c
5003 < ac_cpp='$CPP $CPPFLAGS'
5004 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5005 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4202 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
5002 > ac_ext=f90
5003 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5004 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5005 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5006  
5007  
5008   fi
# Line 4466 | Line 5269 | test -n "$YACC" || YACC="yacc"
5269   done
5270   test -n "$YACC" || YACC="yacc"
5271  
4469
5272   for ac_prog in flex lex
5273   do
5274    # Extract the first word of "$ac_prog", so it can be a program name with args.
# Line 4518 | Line 5320 | cat >conftest.$ac_ext <<_ACEOF
5320    ac_check_lib_save_LIBS=$LIBS
5321   LIBS="-lfl  $LIBS"
5322   cat >conftest.$ac_ext <<_ACEOF
5323 < #line $LINENO "configure"
5324 < /* confdefs.h.  */
4523 < _ACEOF
4524 < cat confdefs.h >>conftest.$ac_ext
4525 < cat >>conftest.$ac_ext <<_ACEOF
4526 < /* end confdefs.h.  */
5323 >
5324 > program main
5325  
5326 < /* Override any gcc2 internal prototype to avoid an error.  */
5327 < #ifdef __cplusplus
5328 < 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 < }
5326 > call yywrap
5327 > end program main
5328 >
5329   _ACEOF
5330   rm -f conftest.$ac_objext conftest$ac_exeext
5331   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 4575 | Line 5362 | cat >conftest.$ac_ext <<_ACEOF
5362    ac_check_lib_save_LIBS=$LIBS
5363   LIBS="-ll  $LIBS"
5364   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.  */
5365  
5366 < /* Override any gcc2 internal prototype to avoid an error.  */
5367 < #ifdef __cplusplus
5368 < extern "C"
5369 < #endif
5370 < /* 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 < }
5366 > program main
5367 >
5368 > call yywrap
5369 > end program main
5370 >
5371   _ACEOF
5372   rm -f conftest.$ac_objext conftest$ac_exeext
5373   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 4807 | Line 5579 | ac_ext=f90
5579    exit 1
5580   fi
5581  
5582 < ac_ext=f90
5583 < 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
5582 > echo "$as_me:$LINENO: checking for mpi-directory" >&5
5583 > echo $ECHO_N "checking for mpi-directory... $ECHO_C" >&6
5584  
5585 <
5586 <
5587 < ac_ext=f90
5588 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4819 < 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
5585 > # Check whether --with-mpi or --without-mpi was given.
5586 > if test "${with_mpi+set}" = set; then
5587 >  withval="$with_mpi"
5588 >  MPI_DIR="$withval"
5589   else
5590 +  MPI_DIR="/usr/local"
5591 + fi;
5592 + echo "$as_me:$LINENO: result: $MPI_DIR" >&5
5593 + echo "${ECHO_T}$MPI_DIR" >&6
5594  
4827 cat >conftest.$ac_ext <<_ACEOF
5595  
5596 < program main
5596 > echo "$as_me:$LINENO: checking for mpi-lib-directory" >&5
5597 > echo $ECHO_N "checking for mpi-lib-directory... $ECHO_C" >&6
5598  
5599 + # Check whether --with-mpi_libdir or --without-mpi_libdir was given.
5600 + if test "${with_mpi_libdir+set}" = set; then
5601 +  withval="$with_mpi_libdir"
5602 +  MPI_LIBDIR="$withval"
5603 + else
5604 +  MPI_LIBDIR="$MPI_DIR/lib"
5605 + fi;
5606 + echo "$as_me:$LINENO: result: $MPI_LIBDIR" >&5
5607 + echo "${ECHO_T}$MPI_LIBDIR" >&6
5608  
4832 end program main
5609  
5610 < _ACEOF
5611 < 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
5610 > echo "$as_me:$LINENO: checking for mpi-inc-directory" >&5
5611 > echo $ECHO_N "checking for mpi-inc-directory... $ECHO_C" >&6
5612  
5613 < cat >conftest.$ac_ext <<_ACEOF
5614 <
5615 < program main
5616 <
4859 <
4860 < end program main
4861 <
4862 < _ACEOF
4863 <
4864 < # Compile and link our simple test program by passing a flag (argument
4865 < # 1 to this macro) to the Fortran 90 compiler in order to get
4866 < # "verbose" output that we can then parse for the Fortran 90 linker
4867 < # flags.
4868 < ac_save_F90FLAGS=$F90FLAGS
4869 < F90FLAGS="$F90FLAGS $ac_verb"
4870 <
4871 < (eval echo $as_me:4871: \"$ac_link\") >&5
4872 < ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
4873 < echo "$ac_f90_v_output" >&5
4874 < F90FLAGS=$ac_save_F90FLAGS
4875 <
4876 < rm -f conftest.*
4877 < ac_ext=f90
4878 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4879 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4880 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4881 <
4882 < # If we are using xlf then replace all the commas with spaces.
4883 < if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
4884 <  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
4885 < 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
5613 > # Check whether --with-mpi-inc or --without-mpi-inc was given.
5614 > if test "${with_mpi_inc+set}" = set; then
5615 >  withval="$with_mpi_inc"
5616 >  MPI_INC="$withval"
5617   else
5618 <  echo "$as_me: failed program was:" >&5
5619 < sed 's/^/| /' conftest.$ac_ext >&5
5618 >  MPI_INC="$MPI_DIR/include"
5619 > fi;
5620 > echo "$as_me:$LINENO: result: $MPI_INC" >&5
5621 > echo "${ECHO_T}$MPI_INC" >&6
5622  
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
5623  
5624 < fi
5625 < echo "$as_me:$LINENO: result: $ac_cv_prog_f90_v" >&5
5626 < echo "${ECHO_T}$ac_cv_prog_f90_v" >&6
5627 < echo "$as_me:$LINENO: checking for Fortran 90 libraries" >&5
5628 < echo $ECHO_N "checking for Fortran 90 libraries... $ECHO_C" >&6
5629 < if test "${ac_cv_flibs+set}" = set; then
5630 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5631 < else
4923 <  if test "x$F90LIBS" != "x"; then
4924 <  ac_cv_f90libs="$F90LIBS" # Let the user override the test.
5624 > echo "$as_me:$LINENO: checking for mpi.h" >&5
5625 > echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6
5626 > HAVE_MPIDOTH_C="no"
5627 > echo '#include <mpi.h>' > conftest.cc
5628 > if test -z "`${CXX} -I${MPI_INC} -c conftest.cc 2>&1`"; then
5629 >  echo "$as_me:$LINENO: result: yes" >&5
5630 > echo "${ECHO_T}yes" >&6
5631 >  HAVE_MPIDOTH_C="yes"
5632   else
5633 <
5634 < 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 <
4936 <
4937 < end program main
4938 <
4939 < _ACEOF
4940 <
4941 < # Compile and link our simple test program by passing a flag (argument
4942 < # 1 to this macro) to the Fortran 90 compiler in order to get
4943 < # "verbose" output that we can then parse for the Fortran 90 linker
4944 < # flags.
4945 < ac_save_F90FLAGS=$F90FLAGS
4946 < F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v"
4947 <
4948 < (eval echo $as_me:4948: \"$ac_link\") >&5
4949 < ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
4950 < echo "$ac_f90_v_output" >&5
4951 < F90FLAGS=$ac_save_F90FLAGS
4952 <
4953 < rm -f conftest.*
4954 < ac_ext=f90
4955 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4956 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4957 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4958 <
4959 < # If we are using xlf then replace all the commas with spaces.
4960 < if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
4961 <  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
5633 >  echo "$as_me:$LINENO: result: no! Check MPI include paths" >&5
5634 > echo "${ECHO_T}no! Check MPI include paths" >&6
5635   fi
5636 + rm -f conftest*
5637  
5638 < # If we are using Cray Fortran then delete quotes.
5639 < # Use "\"" instead of '"' for font-lock-mode.
5640 < # FIXME: a more general fix for quoted arguments with spaces?
5641 < if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
5642 <  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
5643 < fi
5644 <
5645 < ac_cv_f90libs=
5646 <
5647 < # Save positional arguments (if any)
5648 < ac_save_positional="$@"
5649 <
5650 < set X $ac_f90_v_output
5651 < 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 <  :
5638 > echo "$as_me:$LINENO: checking whether mpif.h is usable" >&5
5639 > echo $ECHO_N "checking whether mpif.h is usable... $ECHO_C" >&6
5640 > HAVE_MPIFDOTH_F90="no"
5641 > rm -f conftest*
5642 > cat >conftest.f90 <<EOF
5643 > program main
5644 >  include 'mpif.h'
5645 > end
5646 > EOF
5647 > if $F90 -I$MPI_INC -c conftest.f90 > conftest.out 2>&1 ; then
5648 >   echo "$as_me:$LINENO: result: yes" >&5
5649 > echo "${ECHO_T}yes" >&6
5650 >   MPI_F90INC="$MPI_INC"
5651 >   HAVE_MPIFDOTH_F90="yes"
5652   else
5653 <  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5653 >   if test -s conftest.out ; then cat conftest.out >> config.log ; fi
5654 >   echo "$as_me:$LINENO: result: no! Check MPI include paths" >&5
5655 > echo "${ECHO_T}no! Check MPI include paths" >&6
5656   fi
5657 + rm -f conftest*
5658  
4996          ;;
4997        -bI:*)
4998            ac_exists=false
4999  for ac_i in $ac_cv_f90libs; do
5000    if test x"$ac_arg" = x"$ac_i"; then
5001      ac_exists=true
5002      break
5003    fi
5004  done
5659  
5660 <  if test x"$ac_exists" = xtrue; then
5661 <  :
5662 < else
5663 <  if test "$ac_compiler_gnu" = yes; then
5664 <  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
5660 > ac_ext=c
5661 > ac_cpp='$CPP $CPPFLAGS'
5662 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5663 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5664 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
5665  
5666 <          ;;
5667 <          # Ignore these flags.
5020 <        -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*)
5021 <          ;;
5022 <        -lkernel32)
5023 <          test x"$CYGWIN" != xyes && ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5024 <          ;;
5025 <        -[LRuY])
5026 <          # These flags, when seen by themselves, take an argument.
5027 <          # We remove the space between option and argument and re-iterate
5028 <          # unless we find an empty arg or a new option (starting with -)
5029 <          case $2 in
5030 <             "" | -*);;
5031 <             *)
5032 <                ac_arg="$ac_arg$2"
5666 > ac_save_LDFLAGS=$LDFLAGS
5667 > LDFLAGS="${LDFLAGS} -L${MPI_LIBDIR} "
5668  
5669 <                shift; shift
5670 <                set X $ac_arg "$@"
5671 <                ;;
5672 <          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
5669 > if test x = x"$MPI_LIB"; then
5670 >   echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5671 > echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
5672 > if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
5673    echo $ECHO_N "(cached) $ECHO_C" >&6
5674   else
5675 <  ac_ext=f90
5676 < 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
5675 >  ac_check_lib_save_LIBS=$LIBS
5676 > LIBS="-lmpi  $LIBS"
5677   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
5678   #line $LINENO "configure"
5679   /* confdefs.h.  */
5680   _ACEOF
# Line 5165 | Line 5688 | char $ac_func ();
5688   #endif
5689   /* We use char because int might match the return type of a gcc2
5690     builtin and then its argument prototype would still apply.  */
5691 < char $ac_func ();
5691 > char MPI_Init ();
5692   int
5693   main ()
5694   {
5695 < $ac_func ();
5695 > MPI_Init ();
5696    ;
5697    return 0;
5698   }
# Line 5186 | Line 5709 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5709    ac_status=$?
5710    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5711    (exit $ac_status); }; }; then
5712 <  ac_success=yes; break 2
5712 >  ac_cv_lib_mpi_MPI_Init=yes
5713   else
5714    echo "$as_me: failed program was:" >&5
5715   sed 's/^/| /' conftest.$ac_ext >&5
5716  
5717 + ac_cv_lib_mpi_MPI_Init=no
5718   fi
5719   rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5720 <    done
5721 <  done
5720 > LIBS=$ac_check_lib_save_LIBS
5721 > fi
5722 > echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5723 > echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5724 > if test $ac_cv_lib_mpi_MPI_Init = yes; then
5725 >  MPI_LIB="-lmpi"
5726 > fi
5727  
5728 <  if test "$ac_success" = "yes"; then
5729 <     case $ac_foobar in
5730 <        foobar)
5731 <           ac_case=lower
5732 <           ac_foo_bar=foo_bar
5733 <           ;;
5734 <        FOOBAR)
5735 <           ac_case=upper
5736 <           ac_foo_bar=FOO_BAR
5737 <           ;;
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
5728 > fi
5729 > if test x = x"$MPI_LIB"; then
5730 >   echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
5731 > echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
5732 > if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
5733 >  echo $ECHO_N "(cached) $ECHO_C" >&6
5734 > else
5735 >  ac_check_lib_save_LIBS=$LIBS
5736 > LIBS="-lmpich  $LIBS"
5737 > cat >conftest.$ac_ext <<_ACEOF
5738   #line $LINENO "configure"
5739   /* confdefs.h.  */
5740   _ACEOF
# Line 5226 | Line 5748 | char $ac_func ();
5748   #endif
5749   /* We use char because int might match the return type of a gcc2
5750     builtin and then its argument prototype would still apply.  */
5751 < char $ac_func ();
5751 > char MPI_Init ();
5752   int
5753   main ()
5754   {
5755 < $ac_func ();
5755 > MPI_Init ();
5756    ;
5757    return 0;
5758   }
# Line 5247 | Line 5769 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5769    ac_status=$?
5770    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5771    (exit $ac_status); }; }; then
5772 <  ac_success_extra=yes; break
5772 >  ac_cv_lib_mpich_MPI_Init=yes
5773   else
5774    echo "$as_me: failed program was:" >&5
5775   sed 's/^/| /' conftest.$ac_ext >&5
5776  
5777 + ac_cv_lib_mpich_MPI_Init=no
5778   fi
5779   rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5780 <     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 <
5780 > LIBS=$ac_check_lib_save_LIBS
5781   fi
5782 < rm -f conftest.$ac_objext conftest.$ac_ext
5783 < ac_ext=f90
5784 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5785 < 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.f90 <<EOF
5392 <        module conftest
5393 <        integer n
5394 <        parameter (n=1)
5395 <        end module conftest
5396 < EOF
5397 < # SGI and absoft compilers generates module name in upper case!
5398 < testname="conftest"
5399 < modcase="lower"
5400 < if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
5401 <    MOD=`ls conftest* | grep -v conftest.f | grep -v conftest.o`
5402 <    MOD=`echo "$MOD" | sed -e 's/conftest\.//g'`
5403 <    if test -z "$MOD" ; then
5404 <        MOD=`ls CONFTEST* 2>/dev/null \
5405 <                | grep -v CONFTEST.f | grep -v CONFTEST.o`
5406 <        MOD=`echo "$MOD" | sed -e 's/CONFTEST\.//g'`
5407 <        if test -n "$MOD" ; then
5408 <            testname="CONFTEST"
5409 <            modcase="upper"
5410 <        fi
5411 <    fi
5412 <    if test -z "$MOD" ; then
5413 <        echo "$as_me:$LINENO: result: unknown" >&5
5414 < echo "${ECHO_T}unknown" >&6
5415 <        # Use mod if we can't figure it out
5416 <        MOD="mod"
5417 <    else
5418 <        echo "$as_me:$LINENO: result: $MOD" >&5
5419 < echo "${ECHO_T}$MOD" >&6
5420 <    fi
5421 <    if test -s work.pcl ; then
5422 <        { echo "$as_me:$LINENO: WARNING: Compiler generates auxillery files!" >&5
5423 < echo "$as_me: WARNING: Compiler generates auxillery files!" >&2;}
5424 <    fi
5425 < else
5426 <    echo "$as_me:$LINENO: result: unknown" >&5
5427 < echo "${ECHO_T}unknown" >&6
5782 > echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
5783 > echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
5784 > if test $ac_cv_lib_mpich_MPI_Init = yes; then
5785 >  MPI_LIB="-lmpich"
5786   fi
5787  
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 rm -f conftest*
5443 # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
5444 rm -f work*
5445 cat >conftest.f90 <<EOF
5446        module conftest
5447        integer n
5448        parameter (n=1)
5449        end module conftest
5450 EOF
5451 # SGI and absoft compilers generates module name in upper case!
5452 testname="conftest"
5453 if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
5454   mod=`ls CONFTEST* 2>/dev/null | grep -v CONFTEST.f | grep -v CONFTEST.o`
5455   mod=`echo "$mod" | sed -e 's/CONFTEST\.//g'`
5456   if test -n "$mod" ; then
5457      testname="CONFTEST"
5458   fi
5459   madedir=0
5460   if test ! -d conf ; then mkdir conf ; madedir=1; fi
5461   cp $testname.$MOD conf
5462   rm -f conftest* CONFTEST*
5463   cat >conftest1.f90 <<EOF
5464        program main
5465        use conftest
5466        print *, n
5467        end
5468 EOF
5469   F90_WORK_FILES_ARG=""
5470   F90MODINCSPEC=""
5471   if $F90 -c -Iconf conftest1.f90 > conftest.out 2>&1 ; then
5472       MODDIRFLAG="-I"
5473       F90MODINCSPEC="-I<dir>"
5474       echo "$as_me:$LINENO: result: -I" >&5
5475 echo "${ECHO_T}-I" >&6
5476   elif $F90 -c -Mconf conftest1.f90 >> conftest.out 2>&1 ; then
5477       MODDIRFLAG="-M"
5478       F90MODINCSPEC="-M<dir>"
5479       echo "$as_me:$LINENO: result: -M" >&5
5480 echo "${ECHO_T}-M" >&6
5481   elif $F90 -c -pconf conftest1.f90 >> conftest.out 2>&1 ; then
5482       MODDIRFLAG="-p"
5483       F90MODINCSPEC="-p<dir>"
5484       echo "$as_me:$LINENO: result: -p" >&5
5485 echo "${ECHO_T}-p" >&6
5486   elif test -s work.pc ; then
5487        cp work.pc conf/mpimod.pc
5488        echo "mpimod.pc" > conf/mpimod.pcl
5489        echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl
5490        if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then
5491            MODDIRFLAG='-cl,mpimod.pcl'
5492            echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and directories" >&5
5493 echo "${ECHO_T}-cl,filename where filename contains a list of files and directories" >&6
5494            F90_WORK_FILES_ARG="-cl,mpimod.pcl"
5495            F90MODINCSPEC="-cl,<dir>/<file>mod.pcl"
5496
5497        else
5498            # The version of the Intel compiler that I have refuses to let
5499            # you put the "work catalog" list anywhere but the current
5500            # directory. For example, you cannot in
5501         :
5502        fi
5503   fi
5504   if test -z "MODDIRFLAG" ; then
5505       echo "$as_me:$LINENO: result: unknown" >&5
5506 echo "${ECHO_T}unknown" >&6
5507   fi
5508
5509
5510   rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod*
5511   if test $madedir = 1 ; then rmdir conf ; fi
5788   fi
5789 <
5790 <
5791 <
5516 < echo "$as_me:$LINENO: checking for mpi-directory" >&5
5517 < echo $ECHO_N "checking for mpi-directory... $ECHO_C" >&6
5518 <
5519 < # Check whether --with-mpi_dir or --without-mpi_dir was given.
5520 < if test "${with_mpi_dir+set}" = set; then
5521 <  withval="$with_mpi_dir"
5522 <  MPI_DIR="$withval"
5523 < else
5524 <  MPI_DIR="/usr/local"
5525 < fi;
5526 < echo "$as_me:$LINENO: result: $MPI_DIR" >&5
5527 < echo "${ECHO_T}$MPI_DIR" >&6
5528 <
5529 <
5530 < echo "$as_me:$LINENO: checking for mpi-lib-directory" >&5
5531 < echo $ECHO_N "checking for mpi-lib-directory... $ECHO_C" >&6
5532 <
5533 < # Check whether --with-mpi_libdir or --without-mpi_libdir was given.
5534 < if test "${with_mpi_libdir+set}" = set; then
5535 <  withval="$with_mpi_libdir"
5536 <  MPI_LIBDIR="$withval"
5537 < else
5538 <  MPI_LIBDIR="$MPI_DIR/lib"
5539 < fi;
5540 < echo "$as_me:$LINENO: result: $MPI_LIBDIR" >&5
5541 < echo "${ECHO_T}$MPI_LIBDIR" >&6
5542 <
5543 <
5544 < echo "$as_me:$LINENO: checking for mpi-inc-directory" >&5
5545 < echo $ECHO_N "checking for mpi-inc-directory... $ECHO_C" >&6
5546 <
5547 < # Check whether --with-mpi_inc or --without-mpi_inc was given.
5548 < if test "${with_mpi_inc+set}" = set; then
5549 <  withval="$with_mpi_inc"
5550 <  MPI_INC="$withval"
5551 < else
5552 <  MPI_INC="$MPI_DIR/include"
5553 < fi;
5554 < echo "$as_me:$LINENO: result: $MPI_INC" >&5
5555 < echo "${ECHO_T}$MPI_INC" >&6
5556 <
5557 <
5558 <
5559 < echo "$as_me:$LINENO: checking for MPI library" >&5
5560 < echo $ECHO_N "checking for MPI library... $ECHO_C" >&6
5561 < MPI_LIB=""
5562 < case "$host" in
5563 <  *-ibm-aix*)
5564 <    echo "$as_me:$LINENO: checking whether to use signal-based MPI library" >&5
5565 < echo $ECHO_N "checking whether to use signal-based MPI library... $ECHO_C" >&6
5566 <    echo "$as_me:$LINENO: result: $PACX_SIGNAL" >&5
5567 < echo "${ECHO_T}$PACX_SIGNAL" >&6
5568 <    if test "x$PACX_SIGNAL" = "xyes" ; then
5569 <      if test -f "$MPI_LIBDIR/libmpi.a" ; then
5570 <        MPI_LIB="-lmpi"
5571 <      elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5572 <        MPI_LIB="-lmpi"
5573 <      elif test -f "$MPI_LIBDIR/libmpich.a" ; then
5574 <        MPI_LIB="-lmpich"
5575 <      else
5576 <        { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5
5577 < echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;}
5578 <   { (exit 1); exit 1; }; }
5579 <      fi
5580 <    else
5581 <      if test -f "$MPI_LIBDIR/libmpi_r.a" ; then
5582 <         MPI_LIB="-lmpi_r"
5583 <      else
5584 <         { { echo "$as_me:$LINENO: error: libmpi_r not found; check path for MPI package..." >&5
5585 < echo "$as_me: error: libmpi_r not found; check path for MPI package..." >&2;}
5586 <   { (exit 1); exit 1; }; }
5587 <      fi
5588 <    fi
5589 <    echo "$as_me:$LINENO: result: found $MPI_LIB" >&5
5590 < echo "${ECHO_T}found $MPI_LIB" >&6
5591 <  ;;
5592 <  *)                             if test -f "$MPI_LIBDIR/libmpi.a" ; then
5593 <      MPI_LIB="-lmpi"
5594 <    elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5595 <      MPI_LIB="-lmpi"
5596 <    elif test -f "$MPI_LIBDIR/libmpich.a" ; then
5597 <      MPI_LIB="-lmpich"
5598 <    else
5599 <      { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5
5600 < echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;}
5601 <   { (exit 1); exit 1; }; }
5602 <    fi
5603 <    echo "$as_me:$LINENO: result: found $MPI_LIB" >&5
5604 < echo "${ECHO_T}found $MPI_LIB" >&6
5605 <  ;;
5606 < esac
5607 <
5608 <
5609 <
5610 <
5611 <
5612 <
5613 <
5614 <        for ac_prog in mpif90 hf90 mpxlf90 mpf90 mpxlf95 mpxlf_r
5615 < do
5616 <  # Extract the first word of "$ac_prog", so it can be a program name with args.
5617 < set dummy $ac_prog; ac_word=$2
5618 < echo "$as_me:$LINENO: checking for $ac_word" >&5
5619 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5620 < if test "${ac_cv_prog_MPIF90+set}" = set; then
5621 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5622 < else
5623 <  if test -n "$MPIF90"; then
5624 <  ac_cv_prog_MPIF90="$MPIF90" # Let the user override the test.
5625 < else
5626 < as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5627 < for as_dir in $PATH
5628 < do
5629 <  IFS=$as_save_IFS
5630 <  test -z "$as_dir" && as_dir=.
5631 <  for ac_exec_ext in '' $ac_executable_extensions; do
5632 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5633 <    ac_cv_prog_MPIF90="$ac_prog"
5634 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5635 <    break 2
5636 <  fi
5637 < done
5638 < done
5639 <
5640 < fi
5641 < fi
5642 < MPIF90=$ac_cv_prog_MPIF90
5643 < if test -n "$MPIF90"; then
5644 <  echo "$as_me:$LINENO: result: $MPIF90" >&5
5645 < echo "${ECHO_T}$MPIF90" >&6
5646 < else
5647 <  echo "$as_me:$LINENO: result: no" >&5
5648 < echo "${ECHO_T}no" >&6
5649 < fi
5650 <
5651 <  test -n "$MPIF90" && break
5652 < done
5653 < test -n "$MPIF90" || MPIF90="$F90"
5654 <
5655 <        acx_mpi_save_F90="$F90"
5656 <        F90="$MPIF90"
5657 <
5658 <
5659 <
5660 < if test x = x"$MPILIBS"; then
5661 <        echo "$as_me:$LINENO: checking for MPI_Init" >&5
5662 < echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6
5663 <                        cat >conftest.$ac_ext <<_ACEOF
5664 <
5665 < program main
5666 <
5667 <      call MPI_Init
5668 < end program main
5669 <
5670 < _ACEOF
5671 < rm -f conftest.$ac_objext conftest$ac_exeext
5672 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5673 <  (eval $ac_link) 2>&5
5674 <  ac_status=$?
5675 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5676 <  (exit $ac_status); } &&
5677 <         { ac_try='test -s conftest$ac_exeext'
5678 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5679 <  (eval $ac_try) 2>&5
5680 <  ac_status=$?
5681 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5682 <  (exit $ac_status); }; }; then
5683 <  MPILIBS=" "
5684 <                                echo "$as_me:$LINENO: result: yes" >&5
5685 < echo "${ECHO_T}yes" >&6
5686 < else
5687 <  echo "$as_me: failed program was:" >&5
5688 < sed 's/^/| /' conftest.$ac_ext >&5
5689 <
5690 < echo "$as_me:$LINENO: result: no" >&5
5691 < echo "${ECHO_T}no" >&6
5692 < fi
5693 < rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5694 < fi
5695 < if test x = x"$MPILIBS"; then
5696 <        echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5789 > $as_unset ac_cv_lib_mpi_MPI_Init
5790 > if test x = x"$MPI_LIB"; then
5791 >   echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5792   echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
5793   if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
5794    echo $ECHO_N "(cached) $ECHO_C" >&6
5795   else
5796    ac_check_lib_save_LIBS=$LIBS
5797 < LIBS="-lmpi  $LIBS"
5797 > LIBS="-lmpi "-llam" $LIBS"
5798   cat >conftest.$ac_ext <<_ACEOF
5799 + #line $LINENO "configure"
5800 + /* confdefs.h.  */
5801 + _ACEOF
5802 + cat confdefs.h >>conftest.$ac_ext
5803 + cat >>conftest.$ac_ext <<_ACEOF
5804 + /* end confdefs.h.  */
5805  
5806 < program main
5807 <
5808 < call MPI_Init
5809 < end program main
5810 <
5806 > /* Override any gcc2 internal prototype to avoid an error.  */
5807 > #ifdef __cplusplus
5808 > extern "C"
5809 > #endif
5810 > /* We use char because int might match the return type of a gcc2
5811 >   builtin and then its argument prototype would still apply.  */
5812 > char MPI_Init ();
5813 > int
5814 > main ()
5815 > {
5816 > MPI_Init ();
5817 >  ;
5818 >  return 0;
5819 > }
5820   _ACEOF
5821   rm -f conftest.$ac_objext conftest$ac_exeext
5822   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 5733 | Line 5843 | if test $ac_cv_lib_mpi_MPI_Init = yes; then
5843   echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5844   echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5845   if test $ac_cv_lib_mpi_MPI_Init = yes; then
5846 <  MPILIBS="-lmpi"
5846 >  MPI_LIB="-lmpi -llam"
5847   fi
5848  
5849   fi
5850 < if test x = x"$MPILIBS"; then
5851 <        echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
5852 < echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
5853 < if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
5850 >
5851 > $as_unset ac_cv_lib_mpi_MPI_Init
5852 > if test x = x"$MPI_LIB"; then
5853 >   echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5854 > echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
5855 > if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
5856    echo $ECHO_N "(cached) $ECHO_C" >&6
5857   else
5858    ac_check_lib_save_LIBS=$LIBS
5859 < LIBS="-lmpich  $LIBS"
5859 > LIBS="-lmpi -llam -lpthread $LIBS"
5860   cat >conftest.$ac_ext <<_ACEOF
5861 <
5862 < program main
5861 > #line $LINENO "configure"
5862 > /* confdefs.h.  */
5863 > _ACEOF
5864 > cat confdefs.h >>conftest.$ac_ext
5865 > cat >>conftest.$ac_ext <<_ACEOF
5866 > /* end confdefs.h.  */
5867  
5868 < call MPI_Init
5869 < end program main
5870 <
5868 > /* Override any gcc2 internal prototype to avoid an error.  */
5869 > #ifdef __cplusplus
5870 > extern "C"
5871 > #endif
5872 > /* We use char because int might match the return type of a gcc2
5873 >   builtin and then its argument prototype would still apply.  */
5874 > char MPI_Init ();
5875 > int
5876 > main ()
5877 > {
5878 > MPI_Init ();
5879 >  ;
5880 >  return 0;
5881 > }
5882   _ACEOF
5883   rm -f conftest.$ac_objext conftest$ac_exeext
5884   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 5765 | Line 5892 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5892    ac_status=$?
5893    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5894    (exit $ac_status); }; }; then
5895 <  ac_cv_lib_mpich_MPI_Init=yes
5895 >  ac_cv_lib_mpi_MPI_Init=yes
5896   else
5897    echo "$as_me: failed program was:" >&5
5898   sed 's/^/| /' conftest.$ac_ext >&5
5899  
5900 < ac_cv_lib_mpich_MPI_Init=no
5900 > ac_cv_lib_mpi_MPI_Init=no
5901   fi
5902   rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5903   LIBS=$ac_check_lib_save_LIBS
5904   fi
5905 < echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
5906 < echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
5907 < if test $ac_cv_lib_mpich_MPI_Init = yes; then
5908 <  MPILIBS="-lmpich"
5905 > echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5906 > echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5907 > if test $ac_cv_lib_mpi_MPI_Init = yes; then
5908 >  MPI_LIB="-lmpi -llam -lpthread"
5909 > else
5910 >  { { echo "$as_me:$LINENO: error: Didn't find liblam, libmpi, or libmpich; check path for MPI package first..." >&5
5911 > echo "$as_me: error: Didn't find liblam, libmpi, or libmpich; check path for MPI package first..." >&2;}
5912 >   { (exit 1); exit 1; }; }
5913   fi
5914  
5915   fi
5916  
5917 + echo "$as_me:$LINENO: result: found $MPI_LIB" >&5
5918 + echo "${ECHO_T}found $MPI_LIB" >&6
5919  
5920  
5921 < F90="$acx_mpi_save_F90"
5922 <
5923 <
5924 <
5925 < # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
5926 < if test x = x"$MPILIBS"; then
5927 <
5795 <        :
5921 > echo "$as_me:$LINENO: checking for MPI Fortran library" >&5
5922 > echo $ECHO_N "checking for MPI Fortran library... $ECHO_C" >&6
5923 > MPI_F90LIB=""
5924 > if test -f "$MPI_LIBDIR/libfmpich.a" ; then
5925 >  MPI_F90LIB="-lfmpich"
5926 > elif test -f "$MPI_LIBDIR/liblamf77mpi.a" ; then
5927 >  MPI_F90LIB="-llamf77mpi"
5928   else
5929 +  # nothing special found, we'll assume that the C library is all we need
5930 +  MPI_F90LIB="  "
5931 + fi
5932 + echo "$as_me:$LINENO: result: found $MPI_F90LIB" >&5
5933 + echo "${ECHO_T}found $MPI_F90LIB" >&6
5934  
5798 cat >>confdefs.h <<\_ACEOF
5799 #define HAVE_MPI 1
5800 _ACEOF
5935  
5802        :
5803 fi
5936  
5937  
5938   ac_ext=c
# Line 6549 | Line 6681 | fi
6681  
6682    CPPFLAGS=$ac_save_CPPFLAGS
6683    LDFLAGS=$ac_save_LDFLAGS
6684 <  ac_ext=f90
6685 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6686 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6687 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6684 >  ac_ext=c
6685 > ac_cpp='$CPP $CPPFLAGS'
6686 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6687 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6688 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
6689  
6690  
6691    if test x_$HAVE_SPRNG != x_yes; then
# Line 6573 | Line 6706 | echo "${ECHO_T}yes" >&6
6706    withval="$with_mkl"
6707       echo "$as_me:$LINENO: result: yes" >&5
6708   echo "${ECHO_T}yes" >&6
6709 <    for dir in $withval /usr/local/intel/mkl60 /opt/intel/mkl60; do
6709 >    for dir in $withval /usr/local/intel/mkl61 /opt/intel/mkl61; do
6710          mkldir="$dir"
6711          if test -f "$dir/include/mkl.h"; then
6712              found_mkl="yes";
# Line 6799 | Line 6932 | fi
6932  
6933    CPPFLAGS=$ac_save_CPPFLAGS
6934    LDFLAGS=$ac_save_LDFLAGS
6935 <  ac_ext=f90
6936 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6937 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6938 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6935 >  ac_ext=c
6936 > ac_cpp='$CPP $CPPFLAGS'
6937 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6938 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6939 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
6940  
6941  
6942    if test x_$HAVE_MKL != x_yes; then
# Line 6821 | Line 6955 | fi;
6955   echo "${ECHO_T}no" >&6
6956  
6957   fi;
6824
6825
6826
6827
6828
6829 # Check whether --with-mpi_f90_mods or --without-mpi_f90_mods was given.
6830 if test "${with_mpi_f90_mods+set}" = set; then
6831  withval="$with_mpi_f90_mods"
6832  mpi_f90_mods="$withval"
6833 else
6834  mpi_f90_mods="/usr/local/include/f90choice"
6835 fi;
6836
6837  echo "$as_me:$LINENO: checking for MPI F90 modules" >&5
6838 echo $ECHO_N "checking for MPI F90 modules... $ECHO_C" >&6
6839
6840
6841  ac_ext=f90
6842 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6843 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6844 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6845
6846  ac_save_F90FLAGS=$F90FLAGS
6958  
6848  if test "$mpi_f90_mods"; then
6849  F90FLAGS="${F90FLAGS} ${MODDIRFLAG}${mpi_f90_mods}"
6850 fi
6959  
6852    cat >conftest.$ac_ext <<_ACEOF
6960  
6961  
6855 program main
6962  
6857 use mpi
6858 integer :: ierr
6859 call MPI_Init(ierr)
6860
6861
6862 end program main
6863
6864 _ACEOF
6865 rm -f conftest.$ac_objext
6866 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6867  (eval $ac_compile) 2>&5
6868  ac_status=$?
6869  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6870  (exit $ac_status); } &&
6871         { ac_try='test -s conftest.$ac_objext'
6872  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6873  (eval $ac_try) 2>&5
6874  ac_status=$?
6875  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6876  (exit $ac_status); }; }; then
6877  HAVE_MPI_MOD=1
6878 else
6879  echo "$as_me: failed program was:" >&5
6880 sed 's/^/| /' conftest.$ac_ext >&5
6881
6882 HAVE_MPI_MOD=0
6883 fi
6884 rm -f conftest.$ac_objext conftest.$ac_ext
6885
6886  F90FLAGS=$ac_save_F90FLAGS
6887  ac_ext=f90
6888 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6889 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6890 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6891
6892
6893  if test "$HAVE_MPI_MOD" = 1; then
6894    echo "$as_me:$LINENO: result: yes" >&5
6895 echo "${ECHO_T}yes" >&6
6896
6897 cat >>confdefs.h <<\_ACEOF
6898 #define MPI_MOD 1
6899 _ACEOF
6900
6901    MPI_F90_MODS="${mpi_f90_mods}"
6902
6903    # The library name:
6904    if test -z "$MPI_LIB" ; then
6905       MPI_LIBNAME=-lmpich
6906    else
6907       MPI_LIBNAME="$MPI_LIB"
6908    fi
6909    if test -z "$MPIMODLIBNAME" ; then
6910       MPIMODLIBNAME="${MPI_LIBNAME}f90"
6911    fi
6912
6913  else
6914    echo "$as_me:$LINENO: result: no" >&5
6915 echo "${ECHO_T}no" >&6
6916    { { echo "$as_me:$LINENO: error: Couldn't locate MPI F90 Modules" >&5
6917 echo "$as_me: error: Couldn't locate MPI F90 Modules" >&2;}
6918   { (exit 1); exit 1; }; }
6919  fi
6920
6921
6922
6923
6924
6963   OBJEXT=".$OBJEXT"
6964  
6965   OOPSE=oopse
# Line 6945 | Line 6983 | SUBDIRS="libBASS libmdtools src forceFields samples ut
6983  
6984   MKINSTALLDIRS=`pwd`/ac-tools/"shtool mkdir -p -f"
6985  
6986 < SUBDIRS="libBASS libmdtools src forceFields samples utils utils/sysbuilder staticProps"
6986 > SUBDIRS="libBASS libmdtools src forceFields samples utils utils/sysbuilder staticProps third-party shapes"
6987  
6988   CFLAGS=${CFLAGS-""}
6989   CXXFLAGS=${CXXFLAGS-""}
# Line 6982 | Line 7020 | esac
7020  
7021            ac_config_headers="$ac_config_headers libmdtools/config.h"
7022  
7023 <                                                                                                                                                      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"
7023 >                                                                                                                                                                          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 shapes/Makefile"
7024  
7025  
7026   cat >confcache <<\_ACEOF
# Line 7518 | Line 7556 | do
7556    "forceFields/Makefile" ) CONFIG_FILES="$CONFIG_FILES forceFields/Makefile" ;;
7557    "samples/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;;
7558    "staticProps/Makefile" ) CONFIG_FILES="$CONFIG_FILES staticProps/Makefile" ;;
7559 +  "third-party/Makefile" ) CONFIG_FILES="$CONFIG_FILES third-party/Makefile" ;;
7560    "samples/alkane/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/alkane/Makefile" ;;
7561    "samples/argon/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/argon/Makefile" ;;
7562    "samples/beadLipid/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/beadLipid/Makefile" ;;
7563    "samples/lipid/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/lipid/Makefile" ;;
7564    "samples/metals/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/metals/Makefile" ;;
7565    "samples/water/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/water/Makefile" ;;
7566 +  "shapes/Makefile" ) CONFIG_FILES="$CONFIG_FILES shapes/Makefile" ;;
7567    "libmdtools/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS libmdtools/config.h" ;;
7568    *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
7569   echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
# Line 7629 | Line 7669 | s,@F90@,$F90,;t t
7669   s,@CXX@,$CXX,;t t
7670   s,@CXXFLAGS@,$CXXFLAGS,;t t
7671   s,@ac_ct_CXX@,$ac_ct_CXX,;t t
7672 + s,@OOPSE_TEMPLATE_FLAGS@,$OOPSE_TEMPLATE_FLAGS,;t t
7673 + s,@EXTRA_CC_FLAG@,$EXTRA_CC_FLAG,;t t
7674   s,@F90@,$F90,;t t
7675   s,@F90FLAGS@,$F90FLAGS,;t t
7676   s,@ac_ct_F90@,$ac_ct_F90,;t t
7677   s,@PREPFLAG@,$PREPFLAG,;t t
7678   s,@PREPDEFFLAG@,$PREPDEFFLAG,;t t
7679 + s,@F90LIBS@,$F90LIBS,;t t
7680 + s,@F90_FUNC@,$F90_FUNC,;t t
7681 + s,@F90_FUNC_@,$F90_FUNC_,;t t
7682 + s,@MOD@,$MOD,;t t
7683 + s,@F90_WORK_FILES_ARG@,$F90_WORK_FILES_ARG,;t t
7684 + s,@MODDIRFLAG@,$MODDIRFLAG,;t t
7685 + s,@F90MODINCSPEC@,$F90MODINCSPEC,;t t
7686   s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
7687   s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
7688   s,@INSTALL_DATA@,$INSTALL_DATA,;t t
# Line 7646 | Line 7695 | s,@F90LIBS@,$F90LIBS,;t t
7695   s,@LEXLIB@,$LEXLIB,;t t
7696   s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
7697   s,@AR@,$AR,;t t
7698 < s,@F90LIBS@,$F90LIBS,;t t
7650 < s,@F90_FUNC@,$F90_FUNC,;t t
7651 < s,@F90_FUNC_@,$F90_FUNC_,;t t
7652 < s,@MOD@,$MOD,;t t
7653 < s,@F90_WORK_FILES_ARG@,$F90_WORK_FILES_ARG,;t t
7654 < s,@MODDIRFLAG@,$MODDIRFLAG,;t t
7655 < s,@F90MODINCSPEC@,$F90MODINCSPEC,;t t
7656 < s,@mpi_dir@,$mpi_dir,;t t
7698 > s,@mpi@,$mpi,;t t
7699   s,@MPI_LIBDIR@,$MPI_LIBDIR,;t t
7700   s,@MPI_INC@,$MPI_INC,;t t
7701 + s,@MPI_F90INC@,$MPI_F90INC,;t t
7702   s,@MPI_LIB@,$MPI_LIB,;t t
7703 < s,@MPIF77@,$MPIF77,;t t
7661 < s,@MPIF90@,$MPIF90,;t t
7662 < s,@MPILIBS@,$MPILIBS,;t t
7703 > s,@MPI_F90LIB@,$MPI_F90LIB,;t t
7704   s,@CPP@,$CPP,;t t
7705   s,@EGREP@,$EGREP,;t t
7706   s,@SPRNG_LIBDIR@,$SPRNG_LIBDIR,;t t
# Line 7670 | Line 7711 | s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t
7711   s,@MKL_LIB@,$MKL_LIB,;t t
7712   s,@MKL_INC@,$MKL_INC,;t t
7713   s,@HAVE_MKL@,$HAVE_MKL,;t t
7673 s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t
7674 s,@MPIMODLIBNAME@,$MPIMODLIBNAME,;t t
7714   s,@BATEXT@,$BATEXT,;t t
7715   s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
7716   s,@OOPSE@,$OOPSE,;t t

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines