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 816 by gezelter, Fri Oct 24 17:36:02 2003 UTC vs.
Revision 1233 by gezelter, Fri Jun 4 02:38:23 2004 UTC

# Line 311 | Line 311 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKA
311   # include <unistd.h>
312   #endif"
313  
314 < ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PROGNAME DEBUG build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX F90 F90FLAGS ac_ct_F90 PREPFLAG PREPDEFFLAG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT AR F90LIBS F90_FUNC F90_FUNC_ mpi_dir MPI_LIBDIR MPI_INC MPI_LIB MPIF77 MPIF90 MPILIBS CPP EGREP SPRNG_LIBDIR SPRNG_LIB SPRNG_INC HAVE_SPRNG MKL_LIBDIR MKL_LIB MKL_INC HAVE_MKL MPI_F90_MODS MPIMODLIBNAME BATEXT MKINSTALLDIRS OOPSE OOPSE_HOME SUBDIRS FFLAGS LIBOBJS LTLIBOBJS'
314 > ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PROGNAME debug build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX OOPSE_TEMPLATE_FLAGS EXTRA_CC_FLAG F90 F90FLAGS ac_ct_F90 PREPFLAG PREPDEFFLAG F90LIBS F90_FUNC F90_FUNC_ MOD F90_WORK_FILES_ARG MODDIRFLAG F90MODINCSPEC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT AR MPI_LIB_DIR MPI_INC_DIR MPI_F90_INC MPI_LIB MPI_F90_LIB USE_MPI CPP EGREP SPRNG_LIBDIR SPRNG_LIB SPRNG_INC HAVE_SPRNG MKL_LIBDIR MKL_LIB MKL_INC HAVE_MKL BATEXT MKINSTALLDIRS OOPSE OOPSE_HOME SUBDIRS FFLAGS LIBOBJS LTLIBOBJS'
315   ac_subst_files=''
316  
317   # Initialize some variables set by options.
# Line 784 | Line 784 | ac_env_MPIF77_set=${MPIF77+set}
784   ac_env_F90FLAGS_value=$F90FLAGS
785   ac_cv_env_F90FLAGS_set=${F90FLAGS+set}
786   ac_cv_env_F90FLAGS_value=$F90FLAGS
787 ac_env_MPIF77_set=${MPIF77+set}
788 ac_env_MPIF77_value=$MPIF77
789 ac_cv_env_MPIF77_set=${MPIF77+set}
790 ac_cv_env_MPIF77_value=$MPIF77
787   ac_env_CPP_set=${CPP+set}
788   ac_env_CPP_value=$CPP
789   ac_cv_env_CPP_set=${CPP+set}
# Line 874 | Line 870 | Optional Packages:
870   Optional Packages:
871    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
872    --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
873 <  --with-mpi_dir=MPIDIR   give the path for MPI /usr/local
878 <  --with-mpi-libdir=dir  give the path for MPI-libraries MPI_DIR/lib
879 <  --with-mpi_inc=dir  give the path for MPI-include-files MPI_DIR/include
873 >  --with-mpi=<prefix>     compile with MPI libraries in <prefix> [default=no]
874    --with-sprng_prefix=PREFIX
875                            Prefix where SPRNG is installed
876    --with-sprng-libdir=PREFIX  SPRNG library directory
877    --with-sprng-include=PREFIX
878                            SPRNG include directory
879 <  --with-mkl              Do we want MKL will check /usr/local/intel/mkl60 /opt/intel/mkl60
886 <  --with-mpi_f90_mods=<dir>
887 <                          Location where MPI f90 modules are installed
879 >  --with-mkl              Do we want MKL will check /usr/local/intel/mkl61 /opt/intel/mkl61
880  
881   Some influential environment variables:
882    CC          C compiler command
# Line 897 | Line 889 | Some influential environment variables:
889    CXXFLAGS    C++ compiler flags
890    F90         Fortran 90 compiler command
891    F90FLAGS    Fortran 90 compiler flags
900  MPIF77      MPI Fortran compiler command
892    CPP         C preprocessor
893  
894   Use these variables to override the choices made by `configure' or to help
# Line 1828 | Line 1819 | ac_configure="$SHELL $ac_aux_dir/configure" # This sho
1819  
1820  
1821  
1822 < # what should I build?
1822 >
1823  
1824 < # Check whether --enable-debug or --disable-debug was given.
1825 < if test "${enable_debug+set}" = set; then
1826 <  enableval="$enable_debug"
1827 <  DEBUG=1
1828 < fi;
1824 >
1825 >
1826 >
1827 >
1828 >
1829 >
1830 >
1831 >
1832 >
1833 >
1834 >
1835  
1836 +
1837   # set program name
1838   PROGNAME="oopse"
1839  
1840  
1841 + # there are two ways to do debugging.  One with the --enable-debug flag
1842 + # and one using the DEBUG environment variable
1843 +
1844 + debug=0
1845 + # Check whether --enable-debug or --disable-debug was given.
1846 + if test "${enable_debug+set}" = set; then
1847 +  enableval="$enable_debug"
1848 +  debug=1
1849 + fi;
1850   if test "${DEBUG}"; then
1851  
1852   cat >>confdefs.h <<\_ACEOF
1853 < #define DEBUG 1
1853 > #define debug 1
1854   _ACEOF
1855  
1856    msg="$msg, debug mode"
# Line 2556 | Line 2563 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
2563   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2564   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2565   ac_compiler_gnu=$ac_cv_c_compiler_gnu
2559
2560
2561
2562
2563
2564 # Try to determine "good" native compiler flags if none specified on command
2565 # line
2566 if test "$ac_test_CFLAGS" != "set"; then
2567  CFLAGS=""
2568  case "${host_cpu}-${host_os}" in
2569
2570  *linux*) if test "$CC" = icc; then
2571                    CFLAGS="-O"
2572                fi;;
2573  sparc-solaris2*) if test "$CC" = cc; then
2574                    CFLAGS="-native -fast -xO5 -dalign"
2575                 fi;;
2576
2577  alpha*-osf*)  if test "$CC" = cc; then
2578                    CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host -arch host -std1"
2579                fi;;
2580
2581  hppa*-hpux*)  if test "$CC" = cc; then
2582                    CFLAGS="-Ae +O3 +Oall"
2583                fi;;
2584
2585   rs6000*-aix*)  if test "$CC" = cc -o "$CC" = xlc; then
2586                    CFLAGS="-O3 -qtune=auto -qansialias -w"
2587                fi;;
2588   powerpc*-aix*)
2589        if test "$CC" = cc -o "$CC" = xlc; then
2590                CFLAGS="-O3 -qtune=auto -qansialias -w"
2591                echo "*******************************************************"
2592                echo "*  You have AIX on an unknown powerpc system.  It is  *"
2593                echo "*  recommended that you use                           *"
2594                echo "*                                                     *"
2595                echo "*    CFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
2596                echo "*                                 ^^^                 *"
2597                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
2598                echo "*  PowerPC CPU you have.   For more info, man cc.     *"
2599                echo "*******************************************************"
2600        fi;;
2601   *darwin*)
2602        if test "$CC" = xlc -o "$CC" = cc; then
2603                CFLAGS="-O3 -qtune=auto -w"
2604                echo "*******************************************************"
2605                echo "*  You have Darwin on an unknown powerpc system.      *"
2606                echo "*  It is recommended that you use                     *"
2607                echo "*                                                     *"
2608                echo "*  CFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w    *"
2609                echo "*                               ^^^                   *"
2610                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
2611                echo "*  PowerPC CPU you have.   For more info, man cc.     *"
2612                echo "*******************************************************"
2613        fi;;
2614  esac
2615
2616  # use default flags for gcc on all systems
2617  if test $ac_cv_c_compiler_gnu = yes; then
2618     CFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic"
2619  fi
2620
2621  # test for gcc-specific flags:
2622  if test $ac_cv_c_compiler_gnu = yes; then
2623    # -malign-double for x86 systems
2624
2625
2626 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -malign-double" >&5
2627 echo $ECHO_N "checking whether ${CC-cc} accepts -malign-double... $ECHO_C" >&6
2628 if test "${ac_align_double+set}" = set; then
2629  echo $ECHO_N "(cached) $ECHO_C" >&6
2630 else
2631  echo 'void f(){}' > conftest.c
2632 if test -z "`${CC-cc} -malign-double -c conftest.c 2>&1`"; then
2633        ac_align_double=yes
2634 else
2635        ac_align_double=no
2636 fi
2637 rm -f conftest*
2638
2639 fi
2640 echo "$as_me:$LINENO: result: $ac_align_double" >&5
2641 echo "${ECHO_T}$ac_align_double" >&6
2642 if test "$ac_align_double" = yes; then
2643        :
2644        CFLAGS="$CFLAGS -malign-double"
2645 else
2646        :
2647
2648 fi
2649
2650    # -fstrict-aliasing for gcc-2.95+
2651
2652
2653 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -fstrict-aliasing" >&5
2654 echo $ECHO_N "checking whether ${CC-cc} accepts -fstrict-aliasing... $ECHO_C" >&6
2655 if test "${ac_fstrict_aliasing+set}" = set; then
2656  echo $ECHO_N "(cached) $ECHO_C" >&6
2657 else
2658  echo 'void f(){}' > conftest.c
2659 if test -z "`${CC-cc} -fstrict-aliasing -c conftest.c 2>&1`"; then
2660        ac_fstrict_aliasing=yes
2661 else
2662        ac_fstrict_aliasing=no
2663 fi
2664 rm -f conftest*
2665
2666 fi
2667 echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5
2668 echo "${ECHO_T}$ac_fstrict_aliasing" >&6
2669 if test "$ac_fstrict_aliasing" = yes; then
2670        :
2671        CFLAGS="$CFLAGS -fstrict-aliasing"
2672 else
2673        :
2674
2675 fi
2676
2677  fi
2678
2679  CPU_FLAGS=""
2680  if test "$GCC" = "yes"; then
2681                  case "${host_cpu}" in
2682          i586*)
2683
2684 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentium" >&5
2685 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentium... $ECHO_C" >&6
2686 if test "${ac_cpu_pentium+set}" = set; then
2687  echo $ECHO_N "(cached) $ECHO_C" >&6
2688 else
2689  echo 'void f(){}' > conftest.c
2690 if test -z "`${CC-cc} -mcpu=pentium -c conftest.c 2>&1`"; then
2691        ac_cpu_pentium=yes
2692 else
2693        ac_cpu_pentium=no
2694 fi
2695 rm -f conftest*
2696
2697 fi
2698 echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5
2699 echo "${ECHO_T}$ac_cpu_pentium" >&6
2700 if test "$ac_cpu_pentium" = yes; then
2701        :
2702        CPU_FLAGS=-mcpu=pentium
2703 else
2704        :
2705
2706
2707 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpentium" >&5
2708 echo $ECHO_N "checking whether ${CC-cc} accepts -mpentium... $ECHO_C" >&6
2709 if test "${ac_pentium+set}" = set; then
2710  echo $ECHO_N "(cached) $ECHO_C" >&6
2711 else
2712  echo 'void f(){}' > conftest.c
2713 if test -z "`${CC-cc} -mpentium -c conftest.c 2>&1`"; then
2714        ac_pentium=yes
2715 else
2716        ac_pentium=no
2717 fi
2718 rm -f conftest*
2719
2720 fi
2721 echo "$as_me:$LINENO: result: $ac_pentium" >&5
2722 echo "${ECHO_T}$ac_pentium" >&6
2723 if test "$ac_pentium" = yes; then
2724        :
2725        CPU_FLAGS=-mpentium
2726 else
2727        :
2728
2729 fi
2730
2731 fi
2732
2733                  ;;
2734          i686*)
2735
2736 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentiumpro" >&5
2737 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentiumpro... $ECHO_C" >&6
2738 if test "${ac_cpu_pentiumpro+set}" = set; then
2739  echo $ECHO_N "(cached) $ECHO_C" >&6
2740 else
2741  echo 'void f(){}' > conftest.c
2742 if test -z "`${CC-cc} -mcpu=pentiumpro -c conftest.c 2>&1`"; then
2743        ac_cpu_pentiumpro=yes
2744 else
2745        ac_cpu_pentiumpro=no
2746 fi
2747 rm -f conftest*
2748
2749 fi
2750 echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5
2751 echo "${ECHO_T}$ac_cpu_pentiumpro" >&6
2752 if test "$ac_cpu_pentiumpro" = yes; then
2753        :
2754        CPU_FLAGS=-mcpu=pentiumpro
2755 else
2756        :
2757
2758
2759 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpentiumpro" >&5
2760 echo $ECHO_N "checking whether ${CC-cc} accepts -mpentiumpro... $ECHO_C" >&6
2761 if test "${ac_pentiumpro+set}" = set; then
2762  echo $ECHO_N "(cached) $ECHO_C" >&6
2763 else
2764  echo 'void f(){}' > conftest.c
2765 if test -z "`${CC-cc} -mpentiumpro -c conftest.c 2>&1`"; then
2766        ac_pentiumpro=yes
2767 else
2768        ac_pentiumpro=no
2769 fi
2770 rm -f conftest*
2771
2772 fi
2773 echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5
2774 echo "${ECHO_T}$ac_pentiumpro" >&6
2775 if test "$ac_pentiumpro" = yes; then
2776        :
2777        CPU_FLAGS=-mpentiumpro
2778 else
2779        :
2780
2781 fi
2782
2783 fi
2784
2785                  ;;
2786          powerpc*)
2787                cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null`
2788                is60x=`echo $cputype | egrep "^600-9e?$"`
2789                if test -n "$is60x"; then
2790
2791
2792 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=$cputype" >&5
2793 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=$cputype... $ECHO_C" >&6
2794 if test "${ac_m_cpu_60x+set}" = set; then
2795  echo $ECHO_N "(cached) $ECHO_C" >&6
2796 else
2797  echo 'void f(){}' > conftest.c
2798 if test -z "`${CC-cc} -mcpu=$cputype -c conftest.c 2>&1`"; then
2799        ac_m_cpu_60x=yes
2800 else
2801        ac_m_cpu_60x=no
2802 fi
2803 rm -f conftest*
2804
2805 fi
2806 echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5
2807 echo "${ECHO_T}$ac_m_cpu_60x" >&6
2808 if test "$ac_m_cpu_60x" = yes; then
2809        :
2810        CPU_FLAGS=-mcpu=$cputype
2811 else
2812        :
2813
2814 fi
2815
2816                elif test "$cputype" = 750; then
2817
2818
2819 echo "$as_me:$LINENO: checking whether we are using gcc 2.95 or later" >&5
2820 echo $ECHO_N "checking whether we are using gcc 2.95 or later... $ECHO_C" >&6
2821 if test "${ac_cv_prog_gcc_2_95+set}" = set; then
2822  echo $ECHO_N "(cached) $ECHO_C" >&6
2823 else
2824
2825 cat > conftest.c <<EOF
2826 #ifdef __GNUC__
2827 #  if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
2828     yes;
2829 #  endif
2830 #endif
2831 EOF
2832 if { ac_try='${CC-cc} -E conftest.c'
2833  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2834  (eval $ac_try) 2>&5
2835  ac_status=$?
2836  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2837  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
2838  ac_cv_prog_gcc_2_95=yes
2839 else
2840  ac_cv_prog_gcc_2_95=no
2841 fi
2842
2843 fi
2844 echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_2_95" >&5
2845 echo "${ECHO_T}$ac_cv_prog_gcc_2_95" >&6
2846 if test "$ac_cv_prog_gcc_2_95" = yes; then
2847        :
2848
2849
2850 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=750" >&5
2851 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=750... $ECHO_C" >&6
2852 if test "${ac_m_cpu_750+set}" = set; then
2853  echo $ECHO_N "(cached) $ECHO_C" >&6
2854 else
2855  echo 'void f(){}' > conftest.c
2856 if test -z "`${CC-cc} -mcpu=750 -c conftest.c 2>&1`"; then
2857        ac_m_cpu_750=yes
2858 else
2859        ac_m_cpu_750=no
2860 fi
2861 rm -f conftest*
2862
2863 fi
2864 echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5
2865 echo "${ECHO_T}$ac_m_cpu_750" >&6
2866 if test "$ac_m_cpu_750" = yes; then
2867        :
2868        CPU_FLAGS=-mcpu=750
2869 else
2870        :
2871
2872 fi
2873
2874 else
2875        :
2876
2877 fi
2878
2879                fi
2880                if test -z "$CPU_FLAGS"; then
2881
2882
2883 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=powerpc" >&5
2884 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=powerpc... $ECHO_C" >&6
2885 if test "${ac_m_cpu_powerpc+set}" = set; then
2886  echo $ECHO_N "(cached) $ECHO_C" >&6
2887 else
2888  echo 'void f(){}' > conftest.c
2889 if test -z "`${CC-cc} -mcpu=powerpc -c conftest.c 2>&1`"; then
2890        ac_m_cpu_powerpc=yes
2891 else
2892        ac_m_cpu_powerpc=no
2893 fi
2894 rm -f conftest*
2895
2896 fi
2897 echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5
2898 echo "${ECHO_T}$ac_m_cpu_powerpc" >&6
2899 if test "$ac_m_cpu_powerpc" = yes; then
2900        :
2901        CPU_FLAGS=-mcpu=powerpc
2902 else
2903        :
2904
2905 fi
2906
2907                fi
2908                if test -z "$CPU_FLAGS"; then
2909
2910
2911 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpowerpc" >&5
2912 echo $ECHO_N "checking whether ${CC-cc} accepts -mpowerpc... $ECHO_C" >&6
2913 if test "${ac_m_powerpc+set}" = set; then
2914  echo $ECHO_N "(cached) $ECHO_C" >&6
2915 else
2916  echo 'void f(){}' > conftest.c
2917 if test -z "`${CC-cc} -mpowerpc -c conftest.c 2>&1`"; then
2918        ac_m_powerpc=yes
2919 else
2920        ac_m_powerpc=no
2921 fi
2922 rm -f conftest*
2923
2924 fi
2925 echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5
2926 echo "${ECHO_T}$ac_m_powerpc" >&6
2927 if test "$ac_m_powerpc" = yes; then
2928        :
2929        CPU_FLAGS=-mpowerpc
2930 else
2931        :
2932
2933 fi
2934
2935                fi
2936          esac
2937  fi
2938
2939  if test -n "$CPU_FLAGS"; then
2940        CFLAGS="$CFLAGS $CPU_FLAGS"
2941  fi
2942
2943  if test -z "$CFLAGS"; then
2944        echo ""
2945        echo "********************************************************"
2946        echo "* WARNING: Don't know the best CFLAGS for this system  *"
2947        echo "* Use  make CFLAGS=..., or edit the top level Makefile *"
2948        echo "* (otherwise, a default of CFLAGS=-O3 will be used)    *"
2949        echo "********************************************************"
2950        echo ""
2951        CFLAGS="-O3"
2952  fi
2953
2954
2955
2956 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts ${CFLAGS}" >&5
2957 echo $ECHO_N "checking whether ${CC-cc} accepts ${CFLAGS}... $ECHO_C" >&6
2958 if test "${ac_guessed_cflags+set}" = set; then
2959  echo $ECHO_N "(cached) $ECHO_C" >&6
2960 else
2961  echo 'void f(){}' > conftest.c
2962 if test -z "`${CC-cc} ${CFLAGS} -c conftest.c 2>&1`"; then
2963        ac_guessed_cflags=yes
2964 else
2965        ac_guessed_cflags=no
2966 fi
2967 rm -f conftest*
2968
2969 fi
2970 echo "$as_me:$LINENO: result: $ac_guessed_cflags" >&5
2971 echo "${ECHO_T}$ac_guessed_cflags" >&6
2972 if test "$ac_guessed_cflags" = yes; then
2973        :
2566  
2975 else
2976        :
2567  
2978        echo ""
2979        echo "********************************************************"
2980        echo "* WARNING: The guessed CFLAGS don't seem to work with  *"
2981        echo "* your compiler.                                       *"
2982        echo "* Use  make CFLAGS=..., or edit the top level Makefile *"
2983        echo "********************************************************"
2984        echo ""
2985        CFLAGS=""
2986
2987 fi
2988
2989
2990 fi
2991
2568   ac_ext=cc
2569   ac_cpp='$CXXCPP $CPPFLAGS'
2570   ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2571   ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2572   ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2573   if test -n "$ac_tool_prefix"; then
2574 <  for ac_prog in $CCC icpc icc xlC CC g++ c++
2574 >  for ac_prog in $CCC icpc icc xlc++ xlC CC g++ c++
2575    do
2576      # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2577   set dummy $ac_tool_prefix$ac_prog; ac_word=$2
# Line 3037 | Line 2613 | if test -z "$CXX"; then
2613   fi
2614   if test -z "$CXX"; then
2615    ac_ct_CXX=$CXX
2616 <  for ac_prog in $CCC icpc icc xlC CC g++ c++
2616 >  for ac_prog in $CCC icpc icc xlc++ xlC CC g++ c++
2617   do
2618    # Extract the first word of "$ac_prog", so it can be a program name with args.
2619   set dummy $ac_prog; ac_word=$2
# Line 3310 | Line 2886 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
2886   ac_compiler_gnu=$ac_cv_c_compiler_gnu
2887  
2888  
2889 <
2890 <
2891 <
2892 < # Try to determine "good" native compiler flags if none specified on command
2893 < # line
2894 < if test "$ac_test_CXXFLAGS" != "set"; then
2895 <  CXXFLAGS=""
2896 <  case "${host_cpu}-${host_os}" in
2897 <
2898 <  *linux*) if test "$CXX" = icc -o "$CXX" = icpc; then
2899 <                    CXXFLAGS="-O"
2900 <                fi;;
3325 <  sparc-solaris2*) if test "$CXX" = CC; then
3326 <                    CXXFLAGS="-native -fast -xO5 -dalign"
3327 <                 fi;;
3328 <   rs6000*-aix*)  if test "$CXX" = xlC; then
3329 <                    CXXFLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w"
3330 <                fi;;
3331 <   powerpc*-aix*)
3332 <        if test "$CXX" = xlC; then
3333 <                CXXFLAGS="-O3 -qarch=ppc -qansialias -w"
3334 <                echo "*******************************************************"
3335 <                echo "*  You have AIX on an unknown powerpc system.  It is  *"
3336 <                echo "*  recommended that you use                           *"
3337 <                echo "*                                                     *"
3338 <                echo "*  CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
3339 <                echo "*                                 ^^^                 *"
3340 <                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
3341 <                echo "*  PowerPC CPU you have.   For more info, man cc.     *"
3342 <                echo "*******************************************************"
3343 <        fi;;
3344 <   *darwin*)
3345 <        if test "$CXX" = xlC; then
3346 <                CXXFLAGS="-O3 -qtune=auto -qansialias -w"
3347 <                echo "*******************************************************"
3348 <                echo "*  You have AIX on an unknown powerpc system.  It is  *"
3349 <                echo "*  recommended that you use                           *"
3350 <                echo "*                                                     *"
3351 <                echo "*  CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
3352 <                echo "*                                 ^^^                 *"
3353 <                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
3354 <                echo "*  PowerPC CPU you have.   For more info, man cc.     *"
3355 <                echo "*******************************************************"
3356 <        fi;;
3357 <  esac
3358 <
3359 <  # use default flags for gcc on all systems
3360 <  if test $ac_cv_c_compiler_gnu = yes; then
3361 <     CXXFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic"
2889 > OOPSE_TEMPLATE_FLAGS=""
2890 > if test $ac_cv_cxx_compiler_gnu = no; then
2891 >  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -ptused -no_prelink" >&5
2892 > echo $ECHO_N "checking checking whether ${CXX} accepts -ptused -no_prelink... $ECHO_C" >&6
2893 >  echo 'void f(){}' > conftest.cc
2894 >  if test -z "`${CXX} -ptused -no_prelink -c conftest.cc 2>&1`"; then
2895 >    echo "$as_me:$LINENO: result: yes" >&5
2896 > echo "${ECHO_T}yes" >&6
2897 >    OOPSE_TEMPLATE_FLAGS="-ptused -no_prelink"
2898 >  else
2899 >    echo "$as_me:$LINENO: result: no" >&5
2900 > echo "${ECHO_T}no" >&6
2901    fi
2902 <
2903 <  # test for gcc-specific flags:
2904 <  if test $ac_cv_c_compiler_gnu = yes; then
2905 <    # -malign-double for x86 systems
2906 <
2907 <
2908 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -malign-double" >&5
2909 < echo $ECHO_N "checking whether ${CXX-c++} accepts -malign-double... $ECHO_C" >&6
2910 < if test "${ac_align_double+set}" = set; then
2911 <  echo $ECHO_N "(cached) $ECHO_C" >&6
2912 < else
3374 <  echo 'void f(){}' > conftest.cpp
3375 < if test -z "`${CXX-c++} -malign-double -c conftest.cpp 2>&1`"; then
3376 <        ac_align_double=yes
3377 < else
3378 <        ac_align_double=no
3379 < fi
3380 < rm -f conftest*
3381 <
3382 < fi
3383 < echo "$as_me:$LINENO: result: $ac_align_double" >&5
3384 < echo "${ECHO_T}$ac_align_double" >&6
3385 < if test "$ac_align_double" = yes; then
3386 <        :
3387 <        CXXFLAGS="$CXXFLAGS -malign-double"
3388 < else
3389 <        :
3390 <
3391 < fi
3392 <
3393 <    # -fstrict-aliasing for gcc-2.95+
3394 <
3395 <
3396 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -fstrict-aliasing" >&5
3397 < echo $ECHO_N "checking whether ${CXX-c++} accepts -fstrict-aliasing... $ECHO_C" >&6
3398 < if test "${ac_fstrict_aliasing+set}" = set; then
3399 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3400 < else
3401 <  echo 'void f(){}' > conftest.cpp
3402 < if test -z "`${CXX-c++} -fstrict-aliasing -c conftest.cpp 2>&1`"; then
3403 <        ac_fstrict_aliasing=yes
3404 < else
3405 <        ac_fstrict_aliasing=no
3406 < fi
3407 < rm -f conftest*
3408 <
3409 < fi
3410 < echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5
3411 < echo "${ECHO_T}$ac_fstrict_aliasing" >&6
3412 < if test "$ac_fstrict_aliasing" = yes; then
3413 <        :
3414 <        CXXFLAGS="$CXXFLAGS -fstrict-aliasing"
3415 < else
3416 <        :
3417 <
3418 < fi
3419 <
2902 >  rm -f conftest*
2903 >  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -instances=static" >&5
2904 > echo $ECHO_N "checking checking whether ${CXX} accepts -instances=static... $ECHO_C" >&6
2905 >  echo 'void f(){}' > conftest.cc
2906 >  if test -z "`${CXX} -instances=static -c conftest.cc 2>&1`"; then
2907 >    echo "$as_me:$LINENO: result: yes" >&5
2908 > echo "${ECHO_T}yes" >&6
2909 >    OOPSE_TEMPLATE_FLAGS="-instances=static"
2910 >  else
2911 >    echo "$as_me:$LINENO: result: no" >&5
2912 > echo "${ECHO_T}no" >&6
2913    fi
2914 <
2915 <  CPU_FLAGS=""
2916 <  if test "$GCC" = "yes"; then
2917 <                  case "${host_cpu}" in
2918 <          i586*)
2919 <
2920 < echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentium" >&5
2921 < echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentium... $ECHO_C" >&6
2922 < if test "${ac_cpu_pentium+set}" = set; then
2923 <  echo $ECHO_N "(cached) $ECHO_C" >&6
2924 < else
3432 <  echo 'void f(){}' > conftest.c
3433 < if test -z "`${CC-cc} -mcpu=pentium -c conftest.c 2>&1`"; then
3434 <        ac_cpu_pentium=yes
3435 < else
3436 <        ac_cpu_pentium=no
3437 < fi
3438 < rm -f conftest*
3439 <
3440 < fi
3441 < echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5
3442 < echo "${ECHO_T}$ac_cpu_pentium" >&6
3443 < if test "$ac_cpu_pentium" = yes; then
3444 <        :
3445 <        CPU_FLAGS=-mcpu=pentium
3446 < else
3447 <        :
3448 <
3449 <
3450 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpentium" >&5
3451 < echo $ECHO_N "checking whether ${CXX-c++} accepts -mpentium... $ECHO_C" >&6
3452 < if test "${ac_pentium+set}" = set; then
3453 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3454 < else
3455 <  echo 'void f(){}' > conftest.cpp
3456 < if test -z "`${CXX-c++} -mpentium -c conftest.cpp 2>&1`"; then
3457 <        ac_pentium=yes
3458 < else
3459 <        ac_pentium=no
3460 < fi
3461 < rm -f conftest*
3462 <
3463 < fi
3464 < echo "$as_me:$LINENO: result: $ac_pentium" >&5
3465 < echo "${ECHO_T}$ac_pentium" >&6
3466 < if test "$ac_pentium" = yes; then
3467 <        :
3468 <        CPU_FLAGS=-mpentium
3469 < else
3470 <        :
3471 <
3472 < fi
3473 <
3474 < fi
3475 <
3476 <                  ;;
3477 <          i686*)
3478 <
3479 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=pentiumpro" >&5
3480 < echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=pentiumpro... $ECHO_C" >&6
3481 < if test "${ac_cpu_pentiumpro+set}" = set; then
3482 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3483 < else
3484 <  echo 'void f(){}' > conftest.cpp
3485 < if test -z "`${CXX-c++} -mcpu=pentiumpro -c conftest.cpp 2>&1`"; then
3486 <        ac_cpu_pentiumpro=yes
3487 < else
3488 <        ac_cpu_pentiumpro=no
3489 < fi
3490 < rm -f conftest*
3491 <
3492 < fi
3493 < echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5
3494 < echo "${ECHO_T}$ac_cpu_pentiumpro" >&6
3495 < if test "$ac_cpu_pentiumpro" = yes; then
3496 <        :
3497 <        CPU_FLAGS=-mcpu=pentiumpro
3498 < else
3499 <        :
3500 <
3501 <
3502 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpentiumpro" >&5
3503 < echo $ECHO_N "checking whether ${CXX-c++} accepts -mpentiumpro... $ECHO_C" >&6
3504 < if test "${ac_pentiumpro+set}" = set; then
3505 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3506 < else
3507 <  echo 'void f(){}' > conftest.cpp
3508 < if test -z "`${CXX-c++} -mpentiumpro -c conftest.cpp 2>&1`"; then
3509 <        ac_pentiumpro=yes
3510 < else
3511 <        ac_pentiumpro=no
3512 < fi
3513 < rm -f conftest*
3514 <
3515 < fi
3516 < echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5
3517 < echo "${ECHO_T}$ac_pentiumpro" >&6
3518 < if test "$ac_pentiumpro" = yes; then
3519 <        :
3520 <        CPU_FLAGS=-mpentiumpro
3521 < else
3522 <        :
3523 <
3524 < fi
3525 <
3526 < fi
3527 <
3528 <                  ;;
3529 <          powerpc*)
3530 <                cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null`
3531 <                is60x=`echo $cputype | egrep "^600-9e?$"`
3532 <                if test -n "$is60x"; then
3533 <
3534 <
3535 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=$cputype" >&5
3536 < echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=$cputype... $ECHO_C" >&6
3537 < if test "${ac_m_cpu_60x+set}" = set; then
3538 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3539 < else
3540 <  echo 'void f(){}' > conftest.cpp
3541 < if test -z "`${CXX-c++} -mcpu=$cputype -c conftest.cpp 2>&1`"; then
3542 <        ac_m_cpu_60x=yes
3543 < else
3544 <        ac_m_cpu_60x=no
3545 < fi
3546 < rm -f conftest*
3547 <
3548 < fi
3549 < echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5
3550 < echo "${ECHO_T}$ac_m_cpu_60x" >&6
3551 < if test "$ac_m_cpu_60x" = yes; then
3552 <        :
3553 <        CPU_FLAGS=-mcpu=$cputype
3554 < else
3555 <        :
3556 <
3557 < fi
3558 <
3559 <                elif test "$cputype" = 750; then
3560 <
3561 <
3562 < echo "$as_me:$LINENO: checking whether we are using gcc 2.95 or later" >&5
3563 < echo $ECHO_N "checking whether we are using gcc 2.95 or later... $ECHO_C" >&6
3564 < if test "${ac_cv_prog_gcc_2_95+set}" = set; then
3565 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3566 < else
3567 <
3568 < cat > conftest.c <<EOF
3569 < #ifdef __GNUC__
3570 < #  if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
3571 <     yes;
3572 < #  endif
3573 < #endif
3574 < EOF
3575 < if { ac_try='${CC-cc} -E conftest.c'
3576 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3577 <  (eval $ac_try) 2>&5
3578 <  ac_status=$?
3579 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3580 <  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
3581 <  ac_cv_prog_gcc_2_95=yes
3582 < else
3583 <  ac_cv_prog_gcc_2_95=no
3584 < fi
3585 <
3586 < fi
3587 < echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_2_95" >&5
3588 < echo "${ECHO_T}$ac_cv_prog_gcc_2_95" >&6
3589 < if test "$ac_cv_prog_gcc_2_95" = yes; then
3590 <        :
3591 <
3592 <
3593 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=750" >&5
3594 < echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=750... $ECHO_C" >&6
3595 < if test "${ac_m_cpu_750+set}" = set; then
3596 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3597 < else
3598 <  echo 'void f(){}' > conftest.cpp
3599 < if test -z "`${CXX-c++} -mcpu=750 -c conftest.cpp 2>&1`"; then
3600 <        ac_m_cpu_750=yes
3601 < else
3602 <        ac_m_cpu_750=no
3603 < fi
3604 < rm -f conftest*
3605 <
3606 < fi
3607 < echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5
3608 < echo "${ECHO_T}$ac_m_cpu_750" >&6
3609 < if test "$ac_m_cpu_750" = yes; then
3610 <        :
3611 <        CPU_FLAGS=-mcpu=750
3612 < else
3613 <        :
3614 <
3615 < fi
3616 <
3617 < else
3618 <        :
3619 <
3620 < fi
3621 <
3622 <                fi
3623 <                if test -z "$CPU_FLAGS"; then
3624 <
3625 <
3626 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=powerpc" >&5
3627 < echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=powerpc... $ECHO_C" >&6
3628 < if test "${ac_m_cpu_powerpc+set}" = set; then
3629 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3630 < else
3631 <  echo 'void f(){}' > conftest.cpp
3632 < if test -z "`${CXX-c++} -mcpu=powerpc -c conftest.cpp 2>&1`"; then
3633 <        ac_m_cpu_powerpc=yes
3634 < else
3635 <        ac_m_cpu_powerpc=no
3636 < fi
3637 < rm -f conftest*
3638 <
3639 < fi
3640 < echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5
3641 < echo "${ECHO_T}$ac_m_cpu_powerpc" >&6
3642 < if test "$ac_m_cpu_powerpc" = yes; then
3643 <        :
3644 <        CPU_FLAGS=-mcpu=powerpc
3645 < else
3646 <        :
3647 <
3648 < fi
3649 <
3650 <                fi
3651 <                if test -z "$CPU_FLAGS"; then
3652 <
3653 <
3654 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpowerpc" >&5
3655 < echo $ECHO_N "checking whether ${CXX-c++} accepts -mpowerpc... $ECHO_C" >&6
3656 < if test "${ac_m_powerpc+set}" = set; then
3657 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3658 < else
3659 <  echo 'void f(){}' > conftest.cpp
3660 < if test -z "`${CXX-c++} -mpowerpc -c conftest.cpp 2>&1`"; then
3661 <        ac_m_powerpc=yes
3662 < else
3663 <        ac_m_powerpc=no
3664 < fi
3665 < rm -f conftest*
3666 <
3667 < fi
3668 < echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5
3669 < echo "${ECHO_T}$ac_m_powerpc" >&6
3670 < if test "$ac_m_powerpc" = yes; then
3671 <        :
3672 <        CPU_FLAGS=-mpowerpc
3673 < else
3674 <        :
3675 <
3676 < fi
3677 <
3678 <                fi
3679 <          esac
2914 >  rm -f conftest*
2915 >  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -pto" >&5
2916 > echo $ECHO_N "checking checking whether ${CXX} accepts -pto... $ECHO_C" >&6
2917 >  echo 'void f(){}' > conftest.cc
2918 >  if test -z "`${CXX} -pto -c conftest.cc 2>&1`"; then
2919 >    echo "$as_me:$LINENO: result: yes" >&5
2920 > echo "${ECHO_T}yes" >&6
2921 >    OOPSE_TEMPLATE_FLAGS="-pto"
2922 >  else
2923 >    echo "$as_me:$LINENO: result: no" >&5
2924 > echo "${ECHO_T}no" >&6
2925    fi
2926 +  rm -f conftest*
2927 +  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -LANG:std" >&5
2928 + echo $ECHO_N "checking checking whether ${CXX} accepts -LANG:std... $ECHO_C" >&6
2929 +  echo 'void f(){}' > conftest.cc
2930 +  if test -z "`${CXX} -LANG:std -c conftest.cc 2>&1`"; then
2931 +    echo "$as_me:$LINENO: result: yes" >&5
2932 + echo "${ECHO_T}yes" >&6
2933  
3682  if test -n "$CPU_FLAGS"; then
3683        CXXFLAGS="$CXXFLAGS $CPU_FLAGS"
3684  fi
2934  
2935 <  if test -z "$CXXFLAGS"; then
2936 <        echo ""
2937 <        echo "**********************************************************"
2938 <        echo "* WARNING: Don't know the best CXXFLAGS for this system  *"
3690 <        echo "* Use  make CXXFLAGS=..., or edit the top level Makefile *"
3691 <        echo "* (otherwise, a default of CXXFLAGS=-O3 will be used)    *"
3692 <        echo "**********************************************************"
3693 <        echo ""
3694 <        CXXFLAGS="-O3"
2935 >    EXTRA_CC_FLAG=${EXTRA_CC_FLAG}" -LANG:std"
2936 >  else
2937 >    echo "$as_me:$LINENO: result: no" >&5
2938 > echo "${ECHO_T}no" >&6
2939    fi
3696
3697
3698
3699 echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts ${CXXFLAGS}" >&5
3700 echo $ECHO_N "checking whether ${CXX-c++} accepts ${CXXFLAGS}... $ECHO_C" >&6
3701 if test "${ac_guessed_cxxflags+set}" = set; then
3702  echo $ECHO_N "(cached) $ECHO_C" >&6
3703 else
3704  echo 'void f(){}' > conftest.cpp
3705 if test -z "`${CXX-c++} ${CXXFLAGS} -c conftest.cpp 2>&1`"; then
3706        ac_guessed_cxxflags=yes
3707 else
3708        ac_guessed_cxxflags=no
2940   fi
3710 rm -f conftest*
2941  
3712 fi
3713 echo "$as_me:$LINENO: result: $ac_guessed_cxxflags" >&5
3714 echo "${ECHO_T}$ac_guessed_cxxflags" >&6
3715 if test "$ac_guessed_cxxflags" = yes; then
3716        :
2942  
3718 else
3719        :
2943  
3721        echo ""
3722        echo "**********************************************************"
3723        echo "* WARNING: The guessed CXXFLAGS don't seem to work with  *"
3724        echo "* your compiler.                                         *"
3725        echo "* Use  make CXXFLAGS=..., or edit the top level Makefile *"
3726        echo "**********************************************************"
3727        echo ""
3728        CXXFLAGS=""
2944  
3730 fi
3731
3732
3733 fi
3734
2945   ac_ext=f90
2946   ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
2947   ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2948   ac_compiler_gnu=$ac_cv_f90_compiler_gnu
2949   if test -n "$ac_tool_prefix"; then
2950 <  for ac_prog in ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2950 >  for ac_prog in ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2951    do
2952      # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2953   set dummy $ac_tool_prefix$ac_prog; ac_word=$2
# Line 3779 | Line 2989 | if test -z "$F90"; then
2989   fi
2990   if test -z "$F90"; then
2991    ac_ct_F90=$F90
2992 <  for ac_prog in ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2992 >  for ac_prog in ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2993   do
2994    # Extract the first word of "$ac_prog", so it can be a program name with args.
2995   set dummy $ac_prog; ac_word=$2
# Line 3880 | Line 3090 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
3090  
3091  
3092  
3093 < # Try to determine "good" native compiler flags if none specified on command
3094 < # line
3093 > # Try to determine native compiler flags that allow us to use F90 suffix
3094 > # for preprocessed f90 source.
3095  
3096 < if test x"$F90FLAGS" == x ; then
3097 <  F90FLAGS=""
3096 > if test "$ac_test_PREPFLAG" != "set"; then
3097 >  PREPFLAG=""
3098    case "${host_cpu}-${host_os}" in
3099  
3100 <  *linux*) if test "$F90" = ifc; then
3101 <                    F90FLAGS="-O"
3100 >  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
3101 >                    PREPFLAG="-fpp1 "
3102                  fi;;
3103 <   rs6000*-aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
3104 <                    F90FLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w"
3103 >  *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
3104 >                    PREPFLAG="-qsuffix=cpp=F90 "
3105                  fi;;
3106 <   powerpc*-aix*)
3106 >  *darwin*)
3107          if test "$F90" = f90 -o "$F90" = xlf90; then
3108 <                F90FLAGS="-O3 -qarch=ppc -qansialias -w"
3899 <                echo "*******************************************************"
3900 <                echo "*  You have AIX on an unknown powerpc system.  It is  *"
3901 <                echo "*  recommended that you use                           *"
3902 <                echo "*                                                     *"
3903 <                echo "*  F90FLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
3904 <                echo "*                                 ^^^                 *"
3905 <                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
3906 <                echo "*  PowerPC CPU you have.   For more info, man xlf.    *"
3907 <                echo "*******************************************************"
3108 >                PREPFLAG="-qsuffix=cpp=F90 "
3109          fi;;
3909   *darwin*)
3910        if test "$F90" = f90 -o "$F90" = xlf90; then
3911                F90FLAGS="-O3 -qtune=auto -w"
3912                echo "*********************************************************"
3913                echo "*  You have Darwin on an unknown powerpc system.  It is *"
3914                echo "*  recommended that you use                             *"
3915                echo "*                                                       *"
3916                echo "*  CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w    *"
3917                echo "*                                 ^^^                   *"
3918                echo "*  where xxx is 601, 603, 604, or whatever kind of      *"
3919                echo "*  PowerPC CPU you have.   For more info, man xlf.      *"
3920                echo "*********************************************************"
3921        fi;;
3110    esac
3111  
3112 <  if test -n "$CPU_FLAGS"; then
3113 <        F90FLAGS="$F90FLAGS $CPU_FLAGS"
3112 >  if test -z "$PREPFLAG"; then
3113 >        { echo "$as_me:$LINENO: WARNING: \"Using empty PREPFLAG\"" >&5
3114 > echo "$as_me: WARNING: \"Using empty PREPFLAG\"" >&2;}
3115 >        PREPFLAG=""
3116    fi
3117  
3118 <  if test -z "$F90FLAGS"; then
3119 <        echo ""
3930 <        echo "**********************************************************"
3931 <        echo "* WARNING: Don't know the best F90FLAGS for this system  *"
3932 <        echo "* Use  make F90FLAGS=..., or edit the top level Makefile *"
3933 <        echo "* (otherwise, a default of F90FLAGS=-O3 will be used)    *"
3934 <        echo "**********************************************************"
3935 <        echo ""
3936 <        F90FLAGS="-O3"
3937 <  fi
3118 >  echo "$as_me:$LINENO: checking to make sure F90 preprocessor flag works" >&5
3119 > echo $ECHO_N "checking to make sure F90 preprocessor flag works... $ECHO_C" >&6
3120  
3121  
3122 < echo "$as_me:$LINENO: checking whether ${F90-f90} accepts ${F90FLAGS}" >&5
3941 < echo $ECHO_N "checking whether ${F90-f90} accepts ${F90FLAGS}... $ECHO_C" >&6
3942 < if test "${ac_guessed_f90flags+set}" = set; then
3943 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3944 < else
3945 <
3946 <
3947 <
3948 < ac_ext=f90
3122 >  ac_ext=f90
3123   ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3124   ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3125   ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3126  
3127 < echo 'program main' > conftest.$ac_ext
3128 < echo 'end program main' >> conftest.$ac_ext
3129 < ac_compile='${F90-f90} -c ${F90FLAGS} $F90FLAGS conftest.$ac_ext 1>&5'
3130 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3131 <  (eval $ac_compile) 2>&5
3132 <  ac_status=$?
3133 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3134 <  (exit $ac_status); }; then
3135 <        ac_guessed_f90flags=yes
3136 < else
3137 <        ac_guessed_f90flags=no
3138 < fi
3139 < rm -f conftest*
3140 < ac_ext=c
3141 < ac_cpp='$CPP $CPPFLAGS'
3127 >  ac_save_ext=$ac_ext
3128 >  ac_ext=F90
3129 >  ac_save_F90FLAGS=$F90FLAGS
3130 >
3131 >  if test "$PREPFLAG"; then
3132 >  F90FLAGS="${F90FLAGS} ${PREPFLAG}-DTEST"
3133 > fi
3134 >
3135 >    cat >conftest.$ac_ext <<_ACEOF
3136 >
3137 >
3138 > program main
3139 >
3140 >  integer :: i
3141 >  i = 1
3142 >
3143 >
3144 > end program main
3145 >
3146 > _ACEOF
3147 > rm -f conftest.$ac_objext
3148 > if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3149 >  (eval $ac_compile) 2>&5
3150 >  ac_status=$?
3151 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3152 >  (exit $ac_status); } &&
3153 >         { ac_try='test -s conftest.$ac_objext'
3154 >  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3155 >  (eval $ac_try) 2>&5
3156 >  ac_status=$?
3157 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3158 >  (exit $ac_status); }; }; then
3159 >  prepflagworks=1
3160 > else
3161 >  echo "$as_me: failed program was:" >&5
3162 > sed 's/^/| /' conftest.$ac_ext >&5
3163 >
3164 > prepflagworks=0
3165 > fi
3166 > rm -f conftest.$ac_objext conftest.$ac_ext
3167 >
3168 >  F90FLAGS=$ac_save_F90FLAGS
3169 >  ac_ext=$ac_save_ext
3170 >  ac_ext=c
3171 > ac_cpp='$CPP $CPPFLAGS'
3172 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3173 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3174 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
3175 >
3176 >
3177 >  if test "$prepflagworks" = 1; then
3178 >    echo "$as_me:$LINENO: result: yes" >&5
3179 > echo "${ECHO_T}yes" >&6
3180 >
3181 >  else
3182 >    echo "$as_me:$LINENO: result: no" >&5
3183 > echo "${ECHO_T}no" >&6
3184 >    { { echo "$as_me:$LINENO: error: Can't figure out working Fortran90 preprocessor flag" >&5
3185 > echo "$as_me: error: Can't figure out working Fortran90 preprocessor flag" >&2;}
3186 >   { (exit 1); exit 1; }; }
3187 >  fi
3188 > fi
3189 >
3190 >
3191 >
3192 >
3193 >
3194 > # Try to determine native compiler flags that allow us to use F90 suffix
3195 > # for preprocessed f90 source with -D type defines
3196 >
3197 > if test "$ac_test_PREPDEFFLAG" != "set"; then
3198 >  PREPDEFFLAG=""
3199 >  case "${host_cpu}-${host_os}" in
3200 >
3201 >  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
3202 >                    PREPDEFFLAG=" "
3203 >                fi;;
3204 >  *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
3205 >                    PREPDEFFLAG="-WF,"
3206 >                fi;;
3207 >  *darwin*)
3208 >        if test "$F90" = f90 -o "$F90" = xlf90; then
3209 >                PREPDEFFLAG="-WF,"
3210 >        fi;;
3211 >  esac
3212 >
3213 >  if test -z "$PREPDEFFLAG"; then
3214 >        { echo "$as_me:$LINENO: WARNING: \"Using empty PREPDEFFLAG\"" >&5
3215 > echo "$as_me: WARNING: \"Using empty PREPDEFFLAG\"" >&2;}
3216 >        PREPDEFFLAG=" "
3217 >  fi
3218 >
3219 >  echo "$as_me:$LINENO: checking to make sure F90 preprocessor define flag works" >&5
3220 > echo $ECHO_N "checking to make sure F90 preprocessor define flag works... $ECHO_C" >&6
3221 >
3222 >
3223 >  ac_ext=f90
3224 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3225 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3226 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3227 >
3228 >  ac_save_ext=$ac_ext
3229 >  ac_ext=F90
3230 >  ac_save_F90FLAGS=$F90FLAGS
3231 >
3232 >  if test "$PREPDEFFLAG"; then
3233 >  F90FLAGS="${F90FLAGS} ${PREPFLAG} ${PREPDEFFLAG}-DTEST"
3234 > fi
3235 >
3236 >    cat >conftest.$ac_ext <<_ACEOF
3237 >
3238 >
3239 > program main
3240 >
3241 >  integer :: i
3242 > #ifdef TEST
3243 >  i = 1
3244 > #else
3245 >  choke me
3246 > #endif
3247 >
3248 >
3249 > end program main
3250 >
3251 > _ACEOF
3252 > rm -f conftest.$ac_objext
3253 > if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3254 >  (eval $ac_compile) 2>&5
3255 >  ac_status=$?
3256 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3257 >  (exit $ac_status); } &&
3258 >         { ac_try='test -s conftest.$ac_objext'
3259 >  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3260 >  (eval $ac_try) 2>&5
3261 >  ac_status=$?
3262 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3263 >  (exit $ac_status); }; }; then
3264 >  prepdefflagworks=1
3265 > else
3266 >  echo "$as_me: failed program was:" >&5
3267 > sed 's/^/| /' conftest.$ac_ext >&5
3268 >
3269 > prepdefflagworks=0
3270 > fi
3271 > rm -f conftest.$ac_objext conftest.$ac_ext
3272 >
3273 >  F90FLAGS=$ac_save_F90FLAGS
3274 >  ac_ext=$ac_save_ext
3275 >  ac_ext=c
3276 > ac_cpp='$CPP $CPPFLAGS'
3277 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3278 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3279 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
3280 >
3281 >
3282 >
3283 >  if test "$prepdefflagworks" = 1; then
3284 >    echo "$as_me:$LINENO: result: yes" >&5
3285 > echo "${ECHO_T}yes" >&6
3286 >
3287 >  else
3288 >    echo "$as_me:$LINENO: result: no" >&5
3289 > echo "${ECHO_T}no" >&6
3290 >    { { echo "$as_me:$LINENO: error: Can't figure out working Fortran90 preprocessor define flag" >&5
3291 > echo "$as_me: error: Can't figure out working Fortran90 preprocessor define flag" >&2;}
3292 >   { (exit 1); exit 1; }; }
3293 >  fi
3294 > fi
3295 >
3296 > ac_ext=f90
3297 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3298 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3299 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3300 >
3301 >
3302 >
3303 > ac_ext=f90
3304 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3305 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3306 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3307 > echo "$as_me:$LINENO: checking how to get verbose linking output from $F90" >&5
3308 > echo $ECHO_N "checking how to get verbose linking output from $F90... $ECHO_C" >&6
3309 > if test "${ac_cv_prog_f90_v+set}" = set; then
3310 >  echo $ECHO_N "(cached) $ECHO_C" >&6
3311 > else
3312 >
3313 > cat >conftest.$ac_ext <<_ACEOF
3314 >
3315 > program main
3316 >
3317 >
3318 > end program main
3319 >
3320 > _ACEOF
3321 > rm -f conftest.$ac_objext
3322 > if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3323 >  (eval $ac_compile) 2>&5
3324 >  ac_status=$?
3325 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3326 >  (exit $ac_status); } &&
3327 >         { ac_try='test -s conftest.$ac_objext'
3328 >  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3329 >  (eval $ac_try) 2>&5
3330 >  ac_status=$?
3331 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3332 >  (exit $ac_status); }; }; then
3333 >  ac_cv_prog_f90_v=
3334 > # Try some options frequently used verbose output
3335 > for ac_verb in -v -verbose --verbose -V -\#\#\#; do
3336 >  ac_ext=f90
3337 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3338 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3339 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3340 >
3341 > cat >conftest.$ac_ext <<_ACEOF
3342 >
3343 > program main
3344 >
3345 >
3346 > end program main
3347 >
3348 > _ACEOF
3349 >
3350 > # Compile and link our simple test program by passing a flag (argument
3351 > # 1 to this macro) to the Fortran 90 compiler in order to get
3352 > # "verbose" output that we can then parse for the Fortran 90 linker
3353 > # flags.
3354 > ac_save_F90FLAGS=$F90FLAGS
3355 > F90FLAGS="$F90FLAGS $ac_verb"
3356 >
3357 > (eval echo $as_me:3357: \"$ac_link\") >&5
3358 > ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
3359 > echo "$ac_f90_v_output" >&5
3360 > F90FLAGS=$ac_save_F90FLAGS
3361 >
3362 > rm -f conftest.*
3363 > ac_ext=f90
3364 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3365 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3366 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3367 >
3368 > # If we are using xlf then replace all the commas with spaces.
3369 > if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
3370 >  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
3371 > fi
3372 >
3373 > # If we are using Cray Fortran then delete quotes.
3374 > # Use "\"" instead of '"' for font-lock-mode.
3375 > # FIXME: a more general fix for quoted arguments with spaces?
3376 > if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
3377 >  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
3378 > fi
3379 >  # look for -l* and *.a constructs in the output
3380 >  for ac_arg in $ac_f90_v_output; do
3381 >     case $ac_arg in
3382 >        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
3383 >          ac_cv_prog_f90_v=$ac_verb
3384 >          break 2 ;;
3385 >     esac
3386 >  done
3387 > done
3388 > if test -z "$ac_cv_prog_f90_v"; then
3389 >   { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F90" >&5
3390 > echo "$as_me: WARNING: cannot determine how to obtain linking information from $F90" >&2;}
3391 > fi
3392 > else
3393 >  echo "$as_me: failed program was:" >&5
3394 > sed 's/^/| /' conftest.$ac_ext >&5
3395 >
3396 > { echo "$as_me:$LINENO: WARNING: compilation failed" >&5
3397 > echo "$as_me: WARNING: compilation failed" >&2;}
3398 > fi
3399 > rm -f conftest.$ac_objext conftest.$ac_ext
3400 >
3401 > fi
3402 > echo "$as_me:$LINENO: result: $ac_cv_prog_f90_v" >&5
3403 > echo "${ECHO_T}$ac_cv_prog_f90_v" >&6
3404 > echo "$as_me:$LINENO: checking for Fortran 90 libraries" >&5
3405 > echo $ECHO_N "checking for Fortran 90 libraries... $ECHO_C" >&6
3406 > if test "${ac_cv_flibs+set}" = set; then
3407 >  echo $ECHO_N "(cached) $ECHO_C" >&6
3408 > else
3409 >  if test "x$F90LIBS" != "x"; then
3410 >  ac_cv_f90libs="$F90LIBS" # Let the user override the test.
3411 > else
3412 >
3413 > ac_ext=f90
3414 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3415 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3416 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3417 >
3418 > cat >conftest.$ac_ext <<_ACEOF
3419 >
3420 > program main
3421 >
3422 >
3423 > end program main
3424 >
3425 > _ACEOF
3426 >
3427 > # Compile and link our simple test program by passing a flag (argument
3428 > # 1 to this macro) to the Fortran 90 compiler in order to get
3429 > # "verbose" output that we can then parse for the Fortran 90 linker
3430 > # flags.
3431 > ac_save_F90FLAGS=$F90FLAGS
3432 > F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v"
3433 >
3434 > (eval echo $as_me:3434: \"$ac_link\") >&5
3435 > ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
3436 > echo "$ac_f90_v_output" >&5
3437 > F90FLAGS=$ac_save_F90FLAGS
3438 >
3439 > rm -f conftest.*
3440 > ac_ext=f90
3441 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3442 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3443 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3444 >
3445 > # If we are using xlf then replace all the commas with spaces.
3446 > if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
3447 >  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
3448 > fi
3449 >
3450 > # If we are using Cray Fortran then delete quotes.
3451 > # Use "\"" instead of '"' for font-lock-mode.
3452 > # FIXME: a more general fix for quoted arguments with spaces?
3453 > if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
3454 >  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
3455 > fi
3456 >
3457 > ac_cv_f90libs=
3458 >
3459 > # Save positional arguments (if any)
3460 > ac_save_positional="$@"
3461 >
3462 > set X $ac_f90_v_output
3463 > while test $# != 1; do
3464 >  shift
3465 >  ac_arg=$1
3466 >  case $ac_arg in
3467 >        [\\/]*.a | ?:[\\/]*.a)
3468 >            ac_exists=false
3469 >  for ac_i in $ac_cv_f90libs; do
3470 >    if test x"$ac_arg" = x"$ac_i"; then
3471 >      ac_exists=true
3472 >      break
3473 >    fi
3474 >  done
3475 >
3476 >  if test x"$ac_exists" = xtrue; then
3477 >  :
3478 > else
3479 >  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3480 > fi
3481 >
3482 >          ;;
3483 >        -bI:*)
3484 >            ac_exists=false
3485 >  for ac_i in $ac_cv_f90libs; do
3486 >    if test x"$ac_arg" = x"$ac_i"; then
3487 >      ac_exists=true
3488 >      break
3489 >    fi
3490 >  done
3491 >
3492 >  if test x"$ac_exists" = xtrue; then
3493 >  :
3494 > else
3495 >  if test "$ac_compiler_gnu" = yes; then
3496 >  for ac_link_opt in $ac_arg; do
3497 >    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
3498 >  done
3499 > else
3500 >  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3501 > fi
3502 > fi
3503 >
3504 >          ;;
3505 >          # Ignore these flags.
3506 >        -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*)
3507 >          ;;
3508 >        -lkernel32)
3509 >          test x"$CYGWIN" != xyes && ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3510 >          ;;
3511 >        -[LRuY])
3512 >          # These flags, when seen by themselves, take an argument.
3513 >          # We remove the space between option and argument and re-iterate
3514 >          # unless we find an empty arg or a new option (starting with -)
3515 >          case $2 in
3516 >             "" | -*);;
3517 >             *)
3518 >                ac_arg="$ac_arg$2"
3519 >
3520 >                shift; shift
3521 >                set X $ac_arg "$@"
3522 >                ;;
3523 >          esac
3524 >          ;;
3525 >        -YP,*)
3526 >          for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
3527 >              ac_exists=false
3528 >  for ac_i in $ac_cv_f90libs; do
3529 >    if test x"$ac_j" = x"$ac_i"; then
3530 >      ac_exists=true
3531 >      break
3532 >    fi
3533 >  done
3534 >
3535 >  if test x"$ac_exists" = xtrue; then
3536 >  :
3537 > else
3538 >  ac_arg="$ac_arg $ac_j"
3539 >                             ac_cv_f90libs="$ac_cv_f90libs $ac_j"
3540 > fi
3541 >
3542 >          done
3543 >          ;;
3544 >        -[lLR]*)
3545 >            ac_exists=false
3546 >  for ac_i in $ac_cv_f90libs; do
3547 >    if test x"$ac_arg" = x"$ac_i"; then
3548 >      ac_exists=true
3549 >      break
3550 >    fi
3551 >  done
3552 >
3553 >  if test x"$ac_exists" = xtrue; then
3554 >  :
3555 > else
3556 >  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3557 > fi
3558 >
3559 >          ;;
3560 >          # Ignore everything else.
3561 >  esac
3562 > done
3563 > # restore positional arguments
3564 > set X $ac_save_positional; shift
3565 >
3566 > # We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
3567 > # then we insist that the "run path" must be an absolute path (i.e. it
3568 > # must begin with a "/").
3569 > case `(uname -sr) 2>/dev/null` in
3570 >   "SunOS 5"*)
3571 >      ac_ld_run_path=`echo $ac_f90_v_output |
3572 >                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
3573 >      test "x$ac_ld_run_path" != x &&
3574 >
3575 >        if test "$ac_compiler_gnu" = yes; then
3576 >  for ac_link_opt in $ac_ld_run_path; do
3577 >    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
3578 >  done
3579 > else
3580 >  ac_cv_f90libs="$ac_cv_f90libs $ac_ld_run_path"
3581 > fi
3582 >      ;;
3583 > esac
3584 > fi # test "x$F90LIBS" = "x"
3585 >
3586 > fi
3587 > echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5
3588 > echo "${ECHO_T}$ac_cv_flibs" >&6
3589 > F90LIBS="$ac_cv_f90libs"
3590 >
3591 > ac_ext=f90
3592 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3593 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3594 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3595 >
3596 >
3597 > echo "$as_me:$LINENO: checking for Fortran 90 name-mangling scheme" >&5
3598 > echo $ECHO_N "checking for Fortran 90 name-mangling scheme... $ECHO_C" >&6
3599 > if test "${ac_cv_f90_mangling+set}" = set; then
3600 >  echo $ECHO_N "(cached) $ECHO_C" >&6
3601 > else
3602 >  ac_ext=f90
3603 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3604 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3605 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3606 > cat >conftest.$ac_ext <<_ACEOF
3607 > subroutine foobar()
3608 > return
3609 > end
3610 > subroutine foo_bar()
3611 > return
3612 > end
3613 > _ACEOF
3614 > rm -f conftest.$ac_objext
3615 > if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3616 >  (eval $ac_compile) 2>&5
3617 >  ac_status=$?
3618 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3619 >  (exit $ac_status); } &&
3620 >         { ac_try='test -s conftest.$ac_objext'
3621 >  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3622 >  (eval $ac_try) 2>&5
3623 >  ac_status=$?
3624 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3625 >  (exit $ac_status); }; }; then
3626 >  mv conftest.$ac_objext cf90_test.$ac_objext
3627 >
3628 >  ac_ext=c
3629 > ac_cpp='$CPP $CPPFLAGS'
3630   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3631   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3632   ac_compiler_gnu=$ac_cv_c_compiler_gnu
3633 +
3634 +  ac_save_LIBS=$LIBS
3635 +  LIBS="cf90_test.$ac_objext $F90LIBS $LIBS"
3636 +
3637 +  ac_success=no
3638 +  for ac_foobar in foobar FOOBAR; do
3639 +    for ac_underscore in "" "_"; do
3640 +      ac_func="$ac_foobar$ac_underscore"
3641 +      cat >conftest.$ac_ext <<_ACEOF
3642 + #line $LINENO "configure"
3643 + /* confdefs.h.  */
3644 + _ACEOF
3645 + cat confdefs.h >>conftest.$ac_ext
3646 + cat >>conftest.$ac_ext <<_ACEOF
3647 + /* end confdefs.h.  */
3648 +
3649 + /* Override any gcc2 internal prototype to avoid an error.  */
3650 + #ifdef __cplusplus
3651 + extern "C"
3652 + #endif
3653 + /* We use char because int might match the return type of a gcc2
3654 +   builtin and then its argument prototype would still apply.  */
3655 + char $ac_func ();
3656 + int
3657 + main ()
3658 + {
3659 + $ac_func ();
3660 +  ;
3661 +  return 0;
3662 + }
3663 + _ACEOF
3664 + rm -f conftest.$ac_objext conftest$ac_exeext
3665 + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3666 +  (eval $ac_link) 2>&5
3667 +  ac_status=$?
3668 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3669 +  (exit $ac_status); } &&
3670 +         { ac_try='test -s conftest$ac_exeext'
3671 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3672 +  (eval $ac_try) 2>&5
3673 +  ac_status=$?
3674 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3675 +  (exit $ac_status); }; }; then
3676 +  ac_success=yes; break 2
3677 + else
3678 +  echo "$as_me: failed program was:" >&5
3679 + sed 's/^/| /' conftest.$ac_ext >&5
3680 +
3681 + fi
3682 + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3683 +    done
3684 +  done
3685 +
3686 +  if test "$ac_success" = "yes"; then
3687 +     case $ac_foobar in
3688 +        foobar)
3689 +           ac_case=lower
3690 +           ac_foo_bar=foo_bar
3691 +           ;;
3692 +        FOOBAR)
3693 +           ac_case=upper
3694 +           ac_foo_bar=FOO_BAR
3695 +           ;;
3696 +     esac
3697 +
3698 +     ac_success_extra=no
3699 +     for ac_extra in "" "_"; do
3700 +        ac_func="$ac_foo_bar$ac_underscore$ac_extra"
3701 +
3702 +        cat >conftest.$ac_ext <<_ACEOF
3703 + #line $LINENO "configure"
3704 + /* confdefs.h.  */
3705 + _ACEOF
3706 + cat confdefs.h >>conftest.$ac_ext
3707 + cat >>conftest.$ac_ext <<_ACEOF
3708 + /* end confdefs.h.  */
3709 +
3710 + /* Override any gcc2 internal prototype to avoid an error.  */
3711 + #ifdef __cplusplus
3712 + extern "C"
3713 + #endif
3714 + /* We use char because int might match the return type of a gcc2
3715 +   builtin and then its argument prototype would still apply.  */
3716 + char $ac_func ();
3717 + int
3718 + main ()
3719 + {
3720 + $ac_func ();
3721 +  ;
3722 +  return 0;
3723 + }
3724 + _ACEOF
3725 + rm -f conftest.$ac_objext conftest$ac_exeext
3726 + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3727 +  (eval $ac_link) 2>&5
3728 +  ac_status=$?
3729 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3730 +  (exit $ac_status); } &&
3731 +         { ac_try='test -s conftest$ac_exeext'
3732 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3733 +  (eval $ac_try) 2>&5
3734 +  ac_status=$?
3735 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3736 +  (exit $ac_status); }; }; then
3737 +  ac_success_extra=yes; break
3738 + else
3739 +  echo "$as_me: failed program was:" >&5
3740 + sed 's/^/| /' conftest.$ac_ext >&5
3741 +
3742 + fi
3743 + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3744 +     done
3745 +
3746 +     if test "$ac_success_extra" = "yes"; then
3747 +        ac_cv_f90_mangling="$ac_case case"
3748 +        if test -z "$ac_underscore"; then
3749 +           ac_cv_f90_mangling="$ac_cv_f90_mangling, no underscore"
3750 +        else
3751 +           ac_cv_f90_mangling="$ac_cv_f90_mangling, underscore"
3752 +
3753 +        fi
3754 +        if test -z "$ac_extra"; then
3755 +           ac_cv_f90_mangling="$ac_cv_f90_mangling, no extra underscore"
3756 +        else
3757 +           ac_cv_f90_mangling="$ac_cv_f90_mangling, extra underscore"
3758 +        fi
3759 +      else
3760 +        ac_cv_f90_mangling="unknown"
3761 +      fi
3762 +  else
3763 +     ac_cv_f90_mangling="unknown"
3764 +
3765 +  fi
3766 +
3767 +  LIBS=$ac_save_LIBS
3768 +  ac_ext=f90
3769 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3770 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3771 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3772 +  rm -f cf90_test* conftest*
3773 + else
3774 +  echo "$as_me: failed program was:" >&5
3775 + sed 's/^/| /' conftest.$ac_ext >&5
3776 +
3777 + fi
3778 + rm -f conftest.$ac_objext conftest.$ac_ext
3779 + ac_ext=f90
3780 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3781 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3782 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3783 +
3784 + fi
3785 + echo "$as_me:$LINENO: result: $ac_cv_f90_mangling" >&5
3786 + echo "${ECHO_T}$ac_cv_f90_mangling" >&6
3787 +
3788 +
3789 +
3790 + case $ac_cv_f90_mangling in
3791 +  "lower case, no underscore, no extra underscore")
3792 +          cat >>confdefs.h <<\_ACEOF
3793 + #define F90_FUNC(name,NAME) name
3794 + _ACEOF
3795 +
3796 +          cat >>confdefs.h <<\_ACEOF
3797 + #define F90_FUNC_(name,NAME) name
3798 + _ACEOF
3799 + ;;
3800 +  "lower case, no underscore, extra underscore")
3801 +          cat >>confdefs.h <<\_ACEOF
3802 + #define F90_FUNC(name,NAME) name
3803 + _ACEOF
3804 +
3805 +          cat >>confdefs.h <<\_ACEOF
3806 + #define F90_FUNC_(name,NAME) name ## _
3807 + _ACEOF
3808 + ;;
3809 +  "lower case, underscore, no extra underscore")
3810 +          cat >>confdefs.h <<\_ACEOF
3811 + #define F90_FUNC(name,NAME) name ## _
3812 + _ACEOF
3813 +
3814 +          cat >>confdefs.h <<\_ACEOF
3815 + #define F90_FUNC_(name,NAME) name ## _
3816 + _ACEOF
3817 + ;;
3818 +  "lower case, underscore, extra underscore")
3819 +          cat >>confdefs.h <<\_ACEOF
3820 + #define F90_FUNC(name,NAME) name ## _
3821 + _ACEOF
3822 +
3823 +          cat >>confdefs.h <<\_ACEOF
3824 + #define F90_FUNC_(name,NAME) name ## __
3825 + _ACEOF
3826 + ;;
3827 +  "upper case, no underscore, no extra underscore")
3828 +          cat >>confdefs.h <<\_ACEOF
3829 + #define F90_FUNC(name,NAME) NAME
3830 + _ACEOF
3831 +
3832 +          cat >>confdefs.h <<\_ACEOF
3833 + #define F90_FUNC_(name,NAME) NAME
3834 + _ACEOF
3835 + ;;
3836 +  "upper case, no underscore, extra underscore")
3837 +          cat >>confdefs.h <<\_ACEOF
3838 + #define F90_FUNC(name,NAME) NAME
3839 + _ACEOF
3840 +
3841 +          cat >>confdefs.h <<\_ACEOF
3842 + #define F90_FUNC_(name,NAME) NAME ## _
3843 + _ACEOF
3844 + ;;
3845 +  "upper case, underscore, no extra underscore")
3846 +          cat >>confdefs.h <<\_ACEOF
3847 + #define F90_FUNC(name,NAME) NAME ## _
3848 + _ACEOF
3849 +
3850 +          cat >>confdefs.h <<\_ACEOF
3851 + #define F90_FUNC_(name,NAME) NAME ## _
3852 + _ACEOF
3853 + ;;
3854 +  "upper case, underscore, extra underscore")
3855 +          cat >>confdefs.h <<\_ACEOF
3856 + #define F90_FUNC(name,NAME) NAME ## _
3857 + _ACEOF
3858 +
3859 +          cat >>confdefs.h <<\_ACEOF
3860 + #define F90_FUNC_(name,NAME) NAME ## __
3861 + _ACEOF
3862 + ;;
3863 +  *)
3864 +          { echo "$as_me:$LINENO: WARNING: unknown Fortran 90 name-mangling scheme" >&5
3865 + echo "$as_me: WARNING: unknown Fortran 90 name-mangling scheme" >&2;}
3866 +          ;;
3867 + esac
3868 +
3869 +
3870 +
3871 +
3872 +
3873 + echo "$as_me:$LINENO: checking for module suffix" >&5
3874 + echo $ECHO_N "checking for module suffix... $ECHO_C" >&6
3875 + rm -f conftest*
3876 + # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
3877 + rm -f work*
3878 + cat >conftest.f90 <<EOF
3879 +        module conftest
3880 +        integer n
3881 +        parameter (n=1)
3882 +        end module conftest
3883 + EOF
3884 + # SGI and absoft compilers generates module name in upper case!
3885 + testname="conftest"
3886 + modcase="lower"
3887 + if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
3888 +    MOD=`ls conftest* | grep -v conftest.f | grep -v conftest.o`
3889 +    MOD=`echo "$MOD" | sed -e 's/conftest\.//g'`
3890 +    if test -z "$MOD" ; then
3891 +        MOD=`ls CONFTEST* 2>/dev/null \
3892 +                | grep -v CONFTEST.f | grep -v CONFTEST.o`
3893 +        MOD=`echo "$MOD" | sed -e 's/CONFTEST\.//g'`
3894 +        if test -n "$MOD" ; then
3895 +            testname="CONFTEST"
3896 +            modcase="upper"
3897 +        fi
3898 +    fi
3899 +    if test -z "$MOD" ; then
3900 +        echo "$as_me:$LINENO: result: unknown" >&5
3901 + echo "${ECHO_T}unknown" >&6
3902 +        # Use mod if we can't figure it out
3903 +        MOD="mod"
3904 +    else
3905 +        echo "$as_me:$LINENO: result: $MOD" >&5
3906 + echo "${ECHO_T}$MOD" >&6
3907 +    fi
3908 +    if test -s work.pcl ; then
3909 +        { echo "$as_me:$LINENO: WARNING: Compiler generates auxillery files!" >&5
3910 + echo "$as_me: WARNING: Compiler generates auxillery files!" >&2;}
3911 +    fi
3912 + else
3913 +    echo "$as_me:$LINENO: result: unknown" >&5
3914 + echo "${ECHO_T}unknown" >&6
3915 + fi
3916 +
3917 +
3918 +
3919 +
3920 +
3921 + # Check for module include path (some use -I, some (Solaris) use -M, some
3922 + # (absoft) use -p).
3923 + # Intel compilers use a wierd system: -cl,filename.pcl .  If no file is
3924 + # specified, work.pcl and work.pc are created.  However, if you specify
3925 + # a file, it must contain a the name of a file ending in .pc .  Ugh!
3926 + # Use the module made above
3927 + echo "$as_me:$LINENO: checking for module directory path flag" >&5
3928 + echo $ECHO_N "checking for module directory path flag... $ECHO_C" >&6
3929 + rm -f conftest*
3930 + # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
3931 + rm -f work*
3932 + cat >conftest.f90 <<EOF
3933 +        module conftest
3934 +        integer n
3935 +        parameter (n=1)
3936 +        end module conftest
3937 + EOF
3938 + # SGI and absoft compilers generates module name in upper case!
3939 + testname="conftest"
3940 + if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
3941 +   mod=`ls CONFTEST* 2>/dev/null | grep -v CONFTEST.f | grep -v CONFTEST.o`
3942 +   mod=`echo "$mod" | sed -e 's/CONFTEST\.//g'`
3943 +   if test -n "$mod" ; then
3944 +      testname="CONFTEST"
3945 +   fi
3946 +   madedir=0
3947 +   if test ! -d conf ; then mkdir conf ; madedir=1; fi
3948 +   cp $testname.$MOD conf
3949 +   rm -f conftest* CONFTEST*
3950 +   cat >conftest1.f90 <<EOF
3951 +        program main
3952 +        use conftest
3953 +        print *, n
3954 +        end
3955 + EOF
3956 +   F90_WORK_FILES_ARG=""
3957 +   F90MODINCSPEC=""
3958 +   if $F90 -c -Iconf conftest1.f90 > conftest.out 2>&1 ; then
3959 +       MODDIRFLAG="-I"
3960 +       F90MODINCSPEC="-I<dir>"
3961 +       echo "$as_me:$LINENO: result: -I" >&5
3962 + echo "${ECHO_T}-I" >&6
3963 +   elif $F90 -c -Mconf conftest1.f90 >> conftest.out 2>&1 ; then
3964 +       MODDIRFLAG="-M"
3965 +       F90MODINCSPEC="-M<dir>"
3966 +       echo "$as_me:$LINENO: result: -M" >&5
3967 + echo "${ECHO_T}-M" >&6
3968 +   elif $F90 -c -pconf conftest1.f90 >> conftest.out 2>&1 ; then
3969 +       MODDIRFLAG="-p"
3970 +       F90MODINCSPEC="-p<dir>"
3971 +       echo "$as_me:$LINENO: result: -p" >&5
3972 + echo "${ECHO_T}-p" >&6
3973 +   elif test -s work.pc ; then
3974 +        cp work.pc conf/mpimod.pc
3975 +        echo "mpimod.pc" > conf/mpimod.pcl
3976 +        echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl
3977 +        if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then
3978 +            MODDIRFLAG='-cl,mpimod.pcl'
3979 +            echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and directories" >&5
3980 + echo "${ECHO_T}-cl,filename where filename contains a list of files and directories" >&6
3981 +            F90_WORK_FILES_ARG="-cl,mpimod.pcl"
3982 +            F90MODINCSPEC="-cl,<dir>/<file>mod.pcl"
3983 +
3984 +        else
3985 +            # The version of the Intel compiler that I have refuses to let
3986 +            # you put the "work catalog" list anywhere but the current
3987 +            # directory. For example, you cannot in
3988 +         :
3989 +        fi
3990 +   fi
3991 +   if test -z "MODDIRFLAG" ; then
3992 +       echo "$as_me:$LINENO: result: unknown" >&5
3993 + echo "${ECHO_T}unknown" >&6
3994 +   fi
3995 +
3996 +
3997 +   rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod*
3998 +   if test $madedir = 1 ; then rmdir conf ; fi
3999 + fi
4000 +
4001 +
4002 +
4003 +
4004 + case $debug in
4005 +  1)
4006 +     ;;
4007 +  *)
4008 +
4009 +
4010 +
4011 +
4012 +
4013 +
4014 + echo "$as_me:$LINENO: checking whether we are *really* using GNU cc" >&5
4015 + echo $ECHO_N "checking whether we are *really* using GNU cc... $ECHO_C" >&6
4016 + if test "${ac_cv_prog_really_gcc+set}" = set; then
4017 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4018 + else
4019 +
4020 + cat > conftest.c <<EOF
4021 + #ifdef __GNUC__
4022 +  #ifndef __INTEL_COMPILER
4023 +     yes;
4024 +  #endif
4025 + #endif
4026 + EOF
4027 + if { ac_try='${CC-cc} -E conftest.c'
4028 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4029 +  (eval $ac_try) 2>&5
4030 +  ac_status=$?
4031 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4032 +  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
4033 +  ac_cv_prog_really_gcc=yes
4034 + else
4035 +  ac_cv_prog_really_gcc=no
4036 + fi
4037 +
4038 + fi
4039 + echo "$as_me:$LINENO: result: $ac_cv_prog_really_gcc" >&5
4040 + echo "${ECHO_T}$ac_cv_prog_really_gcc" >&6
4041 + if test "$ac_cv_prog_really_gcc" = yes; then
4042 +        :
4043 +
4044 + else
4045 +        :
4046 +
4047 + fi
4048 +
4049 +
4050 + # Try to determine "good" native compiler flags if none specified on command
4051 + # line
4052 + if test "$ac_test_CFLAGS" != "set"; then
4053 +  CFLAGS=""
4054 +  case "${host_cpu}-${host_os}" in
4055 +
4056 +  *linux*) if test "$CC" = icc; then
4057 +                    CFLAGS="-O"
4058 +                fi;;
4059 +  sparc-solaris2*) if test "$CC" = cc; then
4060 +                    CFLAGS="-native -fast -xO5 -dalign"
4061 +                 fi;;
4062 +
4063 +  alpha*-osf*)  if test "$CC" = cc; then
4064 +                    CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host -arch host -std1"
4065 +                fi;;
4066 +
4067 +  hppa*-hpux*)  if test "$CC" = cc; then
4068 +                    CFLAGS="-Ae +O3 +Oall"
4069 +                fi;;
4070 +
4071 +   rs6000*-aix*)  if test "$CC" = cc -o "$CC" = xlc; then
4072 +                    CFLAGS="-O3 -qtune=auto -qansialias -w"
4073 +                fi;;
4074 +   powerpc*-aix*)
4075 +        if test "$CC" = cc -o "$CC" = xlc; then
4076 +                CFLAGS="-O3 -qtune=auto -qansialias -w"
4077 +                echo "*******************************************************"
4078 +                echo "*  You have AIX on an unknown powerpc system.  It is  *"
4079 +                echo "*  recommended that you use                           *"
4080 +                echo "*                                                     *"
4081 +                echo "*    CFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
4082 +                echo "*                                 ^^^                 *"
4083 +                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
4084 +                echo "*  PowerPC CPU you have.   For more info, man cc.     *"
4085 +                echo "*******************************************************"
4086 +        fi;;
4087 +   *darwin*)
4088 +        if test "$CC" = xlc -o "$CC" = cc; then
4089 +                CFLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto -qaltivec"
4090 +        fi;;
4091 +  esac
4092 +
4093 +  # use default flags for gcc on all systems
4094 +  if test $ac_cv_prog_really_gcc = yes; then
4095 +     CFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic"
4096 +  fi
4097 +
4098 +  # test for gcc-specific flags:
4099 +  if test $ac_cv_prog_really_gcc = yes; then
4100 +    # -malign-double for x86 systems
4101 +
4102 +
4103 + echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -malign-double" >&5
4104 + echo $ECHO_N "checking whether ${CC-cc} accepts -malign-double... $ECHO_C" >&6
4105 + if test "${ac_align_double+set}" = set; then
4106 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4107 + else
4108 +  echo 'void f(){}' > conftest.c
4109 + if test -z "`${CC-cc} -malign-double -c conftest.c 2>&1`"; then
4110 +        ac_align_double=yes
4111 + else
4112 +        ac_align_double=no
4113 + fi
4114 + rm -f conftest*
4115 +
4116 + fi
4117 + echo "$as_me:$LINENO: result: $ac_align_double" >&5
4118 + echo "${ECHO_T}$ac_align_double" >&6
4119 + if test "$ac_align_double" = yes; then
4120 +        :
4121 +        CFLAGS="$CFLAGS -malign-double"
4122 + else
4123 +        :
4124 +
4125 + fi
4126 +
4127 +    # -fstrict-aliasing for gcc-2.95+
4128 +
4129 +
4130 + echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -fstrict-aliasing" >&5
4131 + echo $ECHO_N "checking whether ${CC-cc} accepts -fstrict-aliasing... $ECHO_C" >&6
4132 + if test "${ac_fstrict_aliasing+set}" = set; then
4133 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4134 + else
4135 +  echo 'void f(){}' > conftest.c
4136 + if test -z "`${CC-cc} -fstrict-aliasing -c conftest.c 2>&1`"; then
4137 +        ac_fstrict_aliasing=yes
4138 + else
4139 +        ac_fstrict_aliasing=no
4140 + fi
4141 + rm -f conftest*
4142 +
4143 + fi
4144 + echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5
4145 + echo "${ECHO_T}$ac_fstrict_aliasing" >&6
4146 + if test "$ac_fstrict_aliasing" = yes; then
4147 +        :
4148 +        CFLAGS="$CFLAGS -fstrict-aliasing"
4149 + else
4150 +        :
4151 +
4152 + fi
4153 +
4154 +  fi
4155 +
4156 +  CPU_FLAGS=""
4157 +  if test $ac_cv_prog_really_gcc = yes; then
4158 +                  case "${host_cpu}" in
4159 +          i586*)
4160 +
4161 + echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentium" >&5
4162 + echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentium... $ECHO_C" >&6
4163 + if test "${ac_cpu_pentium+set}" = set; then
4164 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4165 + else
4166 +  echo 'void f(){}' > conftest.c
4167 + if test -z "`${CC-cc} -mcpu=pentium -c conftest.c 2>&1`"; then
4168 +        ac_cpu_pentium=yes
4169 + else
4170 +        ac_cpu_pentium=no
4171 + fi
4172 + rm -f conftest*
4173 +
4174 + fi
4175 + echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5
4176 + echo "${ECHO_T}$ac_cpu_pentium" >&6
4177 + if test "$ac_cpu_pentium" = yes; then
4178 +        :
4179 +        CPU_FLAGS=-mcpu=pentium
4180 + else
4181 +        :
4182 +
4183 +
4184 + echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpentium" >&5
4185 + echo $ECHO_N "checking whether ${CC-cc} accepts -mpentium... $ECHO_C" >&6
4186 + if test "${ac_pentium+set}" = set; then
4187 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4188 + else
4189 +  echo 'void f(){}' > conftest.c
4190 + if test -z "`${CC-cc} -mpentium -c conftest.c 2>&1`"; then
4191 +        ac_pentium=yes
4192 + else
4193 +        ac_pentium=no
4194 + fi
4195 + rm -f conftest*
4196 +
4197 + fi
4198 + echo "$as_me:$LINENO: result: $ac_pentium" >&5
4199 + echo "${ECHO_T}$ac_pentium" >&6
4200 + if test "$ac_pentium" = yes; then
4201 +        :
4202 +        CPU_FLAGS=-mpentium
4203 + else
4204 +        :
4205 +
4206 + fi
4207 +
4208 + fi
4209 +
4210 +                  ;;
4211 +          i686*)
4212 +
4213 + echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentiumpro" >&5
4214 + echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentiumpro... $ECHO_C" >&6
4215 + if test "${ac_cpu_pentiumpro+set}" = set; then
4216 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4217 + else
4218 +  echo 'void f(){}' > conftest.c
4219 + if test -z "`${CC-cc} -mcpu=pentiumpro -c conftest.c 2>&1`"; then
4220 +        ac_cpu_pentiumpro=yes
4221 + else
4222 +        ac_cpu_pentiumpro=no
4223 + fi
4224 + rm -f conftest*
4225 +
4226 + fi
4227 + echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5
4228 + echo "${ECHO_T}$ac_cpu_pentiumpro" >&6
4229 + if test "$ac_cpu_pentiumpro" = yes; then
4230 +        :
4231 +        CPU_FLAGS=-mcpu=pentiumpro
4232 + else
4233 +        :
4234 +
4235 +
4236 + echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpentiumpro" >&5
4237 + echo $ECHO_N "checking whether ${CC-cc} accepts -mpentiumpro... $ECHO_C" >&6
4238 + if test "${ac_pentiumpro+set}" = set; then
4239 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4240 + else
4241 +  echo 'void f(){}' > conftest.c
4242 + if test -z "`${CC-cc} -mpentiumpro -c conftest.c 2>&1`"; then
4243 +        ac_pentiumpro=yes
4244 + else
4245 +        ac_pentiumpro=no
4246 + fi
4247 + rm -f conftest*
4248 +
4249 + fi
4250 + echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5
4251 + echo "${ECHO_T}$ac_pentiumpro" >&6
4252 + if test "$ac_pentiumpro" = yes; then
4253 +        :
4254 +        CPU_FLAGS=-mpentiumpro
4255 + else
4256 +        :
4257 +
4258 + fi
4259 +
4260 + fi
4261 +
4262 +                  ;;
4263 +          powerpc*)
4264 +                cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null`
4265 +                is60x=`echo $cputype | egrep "^600-9e?$"`
4266 +                if test -n "$is60x"; then
4267 +
4268 +
4269 + echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=$cputype" >&5
4270 + echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=$cputype... $ECHO_C" >&6
4271 + if test "${ac_m_cpu_60x+set}" = set; then
4272 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4273 + else
4274 +  echo 'void f(){}' > conftest.c
4275 + if test -z "`${CC-cc} -mcpu=$cputype -c conftest.c 2>&1`"; then
4276 +        ac_m_cpu_60x=yes
4277 + else
4278 +        ac_m_cpu_60x=no
4279 + fi
4280 + rm -f conftest*
4281 +
4282 + fi
4283 + echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5
4284 + echo "${ECHO_T}$ac_m_cpu_60x" >&6
4285 + if test "$ac_m_cpu_60x" = yes; then
4286 +        :
4287 +        CPU_FLAGS=-mcpu=$cputype
4288 + else
4289 +        :
4290 +
4291 + fi
4292 +
4293 +                elif test "$cputype" = 750; then
4294 +
4295 +
4296 + echo "$as_me:$LINENO: checking whether we are using gcc 2.95 or later" >&5
4297 + echo $ECHO_N "checking whether we are using gcc 2.95 or later... $ECHO_C" >&6
4298 + if test "${ac_cv_prog_gcc_2_95+set}" = set; then
4299 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4300 + else
4301 +
4302 + cat > conftest.c <<EOF
4303 + #ifdef __GNUC__ && !defined (__INTEL_COMPILER)
4304 + #  if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
4305 +     yes;
4306 + #  endif
4307 + #endif
4308 + EOF
4309 + if { ac_try='${CC-cc} -E conftest.c'
4310 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4311 +  (eval $ac_try) 2>&5
4312 +  ac_status=$?
4313 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4314 +  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
4315 +  ac_cv_prog_gcc_2_95=yes
4316 + else
4317 +  ac_cv_prog_gcc_2_95=no
4318 + fi
4319 +
4320 + fi
4321 + echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_2_95" >&5
4322 + echo "${ECHO_T}$ac_cv_prog_gcc_2_95" >&6
4323 + if test "$ac_cv_prog_gcc_2_95" = yes; then
4324 +        :
4325 +
4326 +
4327 + echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=750" >&5
4328 + echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=750... $ECHO_C" >&6
4329 + if test "${ac_m_cpu_750+set}" = set; then
4330 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4331 + else
4332 +  echo 'void f(){}' > conftest.c
4333 + if test -z "`${CC-cc} -mcpu=750 -c conftest.c 2>&1`"; then
4334 +        ac_m_cpu_750=yes
4335 + else
4336 +        ac_m_cpu_750=no
4337 + fi
4338 + rm -f conftest*
4339 +
4340 + fi
4341 + echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5
4342 + echo "${ECHO_T}$ac_m_cpu_750" >&6
4343 + if test "$ac_m_cpu_750" = yes; then
4344 +        :
4345 +        CPU_FLAGS=-mcpu=750
4346 + else
4347 +        :
4348 +
4349 + fi
4350 +
4351 + else
4352 +        :
4353 +
4354 + fi
4355 +
4356 +                fi
4357 +                if test -z "$CPU_FLAGS"; then
4358 +
4359 +
4360 + echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=powerpc" >&5
4361 + echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=powerpc... $ECHO_C" >&6
4362 + if test "${ac_m_cpu_powerpc+set}" = set; then
4363 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4364 + else
4365 +  echo 'void f(){}' > conftest.c
4366 + if test -z "`${CC-cc} -mcpu=powerpc -c conftest.c 2>&1`"; then
4367 +        ac_m_cpu_powerpc=yes
4368 + else
4369 +        ac_m_cpu_powerpc=no
4370 + fi
4371 + rm -f conftest*
4372 +
4373 + fi
4374 + echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5
4375 + echo "${ECHO_T}$ac_m_cpu_powerpc" >&6
4376 + if test "$ac_m_cpu_powerpc" = yes; then
4377 +        :
4378 +        CPU_FLAGS=-mcpu=powerpc
4379 + else
4380 +        :
4381 +
4382 + fi
4383 +
4384 +                fi
4385 +                if test -z "$CPU_FLAGS"; then
4386 +
4387 +
4388 + echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpowerpc" >&5
4389 + echo $ECHO_N "checking whether ${CC-cc} accepts -mpowerpc... $ECHO_C" >&6
4390 + if test "${ac_m_powerpc+set}" = set; then
4391 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4392 + else
4393 +  echo 'void f(){}' > conftest.c
4394 + if test -z "`${CC-cc} -mpowerpc -c conftest.c 2>&1`"; then
4395 +        ac_m_powerpc=yes
4396 + else
4397 +        ac_m_powerpc=no
4398 + fi
4399 + rm -f conftest*
4400 +
4401 + fi
4402 + echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5
4403 + echo "${ECHO_T}$ac_m_powerpc" >&6
4404 + if test "$ac_m_powerpc" = yes; then
4405 +        :
4406 +        CPU_FLAGS=-mpowerpc
4407 + else
4408 +        :
4409 +
4410 + fi
4411 +
4412 +                fi
4413 +          esac
4414 +  fi
4415 +
4416 +  if test -n "$CPU_FLAGS"; then
4417 +        CFLAGS="$CFLAGS $CPU_FLAGS"
4418 +  fi
4419 +
4420 +  if test -z "$CFLAGS"; then
4421 +        echo ""
4422 +        echo "********************************************************"
4423 +        echo "* WARNING: Don't know the best CFLAGS for this system  *"
4424 +        echo "* Use  make CFLAGS=..., or edit the top level Makefile *"
4425 +        echo "* (otherwise, a default of CFLAGS=-O3 will be used)    *"
4426 +        echo "********************************************************"
4427 +        echo ""
4428 +        CFLAGS="-O3"
4429 +  fi
4430 +
4431 +
4432 +
4433 + echo "$as_me:$LINENO: checking whether ${CC-cc} accepts ${CFLAGS}" >&5
4434 + echo $ECHO_N "checking whether ${CC-cc} accepts ${CFLAGS}... $ECHO_C" >&6
4435 + if test "${ac_guessed_cflags+set}" = set; then
4436 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4437 + else
4438 +  echo 'void f(){}' > conftest.c
4439 + if test -z "`${CC-cc} ${CFLAGS} -c conftest.c 2>&1`"; then
4440 +        ac_guessed_cflags=yes
4441 + else
4442 +        ac_guessed_cflags=no
4443 + fi
4444 + rm -f conftest*
4445 +
4446 + fi
4447 + echo "$as_me:$LINENO: result: $ac_guessed_cflags" >&5
4448 + echo "${ECHO_T}$ac_guessed_cflags" >&6
4449 + if test "$ac_guessed_cflags" = yes; then
4450 +        :
4451 +
4452 + else
4453 +        :
4454 +
4455 +        echo ""
4456 +        echo "********************************************************"
4457 +        echo "* WARNING: The guessed CFLAGS don't seem to work with  *"
4458 +        echo "* your compiler.                                       *"
4459 +        echo "* Use  make CFLAGS=..., or edit the top level Makefile *"
4460 +        echo "********************************************************"
4461 +        echo ""
4462 +        CFLAGS=""
4463 +
4464 + fi
4465 +
4466 +
4467 + fi
4468 +
4469 +
4470 +
4471 +
4472 +
4473 +
4474 +
4475 + echo "$as_me:$LINENO: checking whether we are *really* using GNU c++" >&5
4476 + echo $ECHO_N "checking whether we are *really* using GNU c++... $ECHO_C" >&6
4477 + if test "${ac_cv_prog_really_gxx+set}" = set; then
4478 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4479 + else
4480 +
4481 + cat > conftest.cpp <<EOF
4482 + #ifdef __GNUC__
4483 +  #ifndef __INTEL_COMPILER
4484 +     yes;
4485 +  #endif
4486 + #endif
4487 + EOF
4488 + if { ac_try='${CXX-c++} -E conftest.cpp'
4489 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4490 +  (eval $ac_try) 2>&5
4491 +  ac_status=$?
4492 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4493 +  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
4494 +  ac_cv_prog_really_gxx=yes
4495 + else
4496 +  ac_cv_prog_really_gxx=no
4497 + fi
4498 +
4499 + fi
4500 + echo "$as_me:$LINENO: result: $ac_cv_prog_really_gxx" >&5
4501 + echo "${ECHO_T}$ac_cv_prog_really_gxx" >&6
4502 + if test "$ac_cv_prog_really_gxx" = yes; then
4503 +        :
4504 +
4505 + else
4506 +        :
4507 +
4508 + fi
4509 +
4510 +
4511 + # Try to determine "good" native compiler flags if none specified on command
4512 + # line
4513 + if test "$ac_test_CXXFLAGS" != "set"; then
4514 +  CXXFLAGS=""
4515 +  case "${host_cpu}-${host_os}" in
4516 +
4517 +  *linux*) if test "$CXX" = icc -o "$CXX" = icpc; then
4518 +                    CXXFLAGS="-O"
4519 +                fi;;
4520 +  sparc-solaris2*) if test "$CXX" = CC; then
4521 +                    CXXFLAGS="-native -fast -xO5 -dalign"
4522 +                 fi;;
4523 +   rs6000*-aix*)  if test "$CXX" = xlC; then
4524 +                    CXXFLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w"
4525 +                fi;;
4526 +   powerpc*-aix*)
4527 +        if test "$CXX" = xlC; then
4528 +                CXXFLAGS="-O3 -qarch=ppc -qansialias -w"
4529 +                echo "*******************************************************"
4530 +                echo "*  You have AIX on an unknown powerpc system.  It is  *"
4531 +                echo "*  recommended that you use                           *"
4532 +                echo "*                                                     *"
4533 +                echo "*  CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
4534 +                echo "*                                 ^^^                 *"
4535 +                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
4536 +                echo "*  PowerPC CPU you have.   For more info, man cc.     *"
4537 +                echo "*******************************************************"
4538 +        fi;;
4539 +   *darwin*)
4540 +        if test "$CXX" = xlc++; then
4541 +                CXXFLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto -qaltivec"
4542 +        fi;;
4543 +  esac
4544  
4545 +  # use default flags for gcc on all systems
4546 +  if test $ac_cv_prog_really_gxx = yes; then
4547 +     CXXFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic"
4548 +  fi
4549  
4550 +  # test for gcc-specific flags:
4551 +  if test $ac_cv_prog_really_gxx = yes; then
4552 +    # -malign-double for x86 systems
4553 +
4554 +
4555 + echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -malign-double" >&5
4556 + echo $ECHO_N "checking whether ${CXX-c++} accepts -malign-double... $ECHO_C" >&6
4557 + if test "${ac_align_double+set}" = set; then
4558 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4559 + else
4560 +  echo 'void f(){}' > conftest.cpp
4561 + if test -z "`${CXX-c++} -malign-double -c conftest.cpp 2>&1`"; then
4562 +        ac_align_double=yes
4563 + else
4564 +        ac_align_double=no
4565   fi
4566 < echo "$as_me:$LINENO: result: $ac_guessed_f90flags" >&5
3975 < echo "${ECHO_T}$ac_guessed_f90flags" >&6
3976 < if test "$ac_guessed_f90flags" = yes; then
3977 <        :
4566 > rm -f conftest*
4567  
4568 + fi
4569 + echo "$as_me:$LINENO: result: $ac_align_double" >&5
4570 + echo "${ECHO_T}$ac_align_double" >&6
4571 + if test "$ac_align_double" = yes; then
4572 +        :
4573 +        CXXFLAGS="$CXXFLAGS -malign-double"
4574   else
4575          :
4576  
4577 <        echo ""
3983 <        echo "**********************************************************"
3984 <        echo "* WARNING: The guessed F90FLAGS don't seem to work with  *"
3985 <        echo "* your compiler.                                         *"
3986 <        echo "* Use  make F90FLAGS=..., or edit the top level Makefile *"
3987 <        echo "**********************************************************"
3988 <        echo ""
3989 <        F90FLAGS=""
4577 > fi
4578  
4579 +    # -fstrict-aliasing for gcc-2.95+
4580 +
4581 +
4582 + echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -fstrict-aliasing" >&5
4583 + echo $ECHO_N "checking whether ${CXX-c++} accepts -fstrict-aliasing... $ECHO_C" >&6
4584 + if test "${ac_fstrict_aliasing+set}" = set; then
4585 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4586 + else
4587 +  echo 'void f(){}' > conftest.cpp
4588 + if test -z "`${CXX-c++} -fstrict-aliasing -c conftest.cpp 2>&1`"; then
4589 +        ac_fstrict_aliasing=yes
4590 + else
4591 +        ac_fstrict_aliasing=no
4592   fi
4593 + rm -f conftest*
4594  
4595 + fi
4596 + echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5
4597 + echo "${ECHO_T}$ac_fstrict_aliasing" >&6
4598 + if test "$ac_fstrict_aliasing" = yes; then
4599 +        :
4600 +        CXXFLAGS="$CXXFLAGS -fstrict-aliasing"
4601 + else
4602 +        :
4603  
4604   fi
4605  
4606 +  fi
4607  
4608 +  CPU_FLAGS=""
4609 +  if test $ac_cv_prog_really_gxx = yes; then
4610 +                  case "${host_cpu}" in
4611 +          i586*)
4612  
4613 + echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=pentium" >&5
4614 + echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=pentium... $ECHO_C" >&6
4615 + if test "${ac_cpu_pentium+set}" = set; then
4616 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4617 + else
4618 +  echo 'void f(){}' > conftest.cpp
4619 + if test -z "`${CXX-c++} -mcpu=pentium -c conftest.cpp 2>&1`"; then
4620 +        ac_cpu_pentium=yes
4621 + else
4622 +        ac_cpu_pentium=no
4623 + fi
4624 + rm -f conftest*
4625  
4626 + fi
4627 + echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5
4628 + echo "${ECHO_T}$ac_cpu_pentium" >&6
4629 + if test "$ac_cpu_pentium" = yes; then
4630 +        :
4631 +        CPU_FLAGS=-mcpu=pentium
4632 + else
4633 +        :
4634  
4000 # Try to determine native compiler flags that allow us to use F90 suffix
4001 # for preprocessed f90 source.
4635  
4636 < if test "$ac_test_PREPFLAG" != "set"; then
4637 <  PREPFLAG=""
4638 <  case "${host_cpu}-${host_os}" in
4636 > echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpentium" >&5
4637 > echo $ECHO_N "checking whether ${CXX-c++} accepts -mpentium... $ECHO_C" >&6
4638 > if test "${ac_pentium+set}" = set; then
4639 >  echo $ECHO_N "(cached) $ECHO_C" >&6
4640 > else
4641 >  echo 'void f(){}' > conftest.cpp
4642 > if test -z "`${CXX-c++} -mpentium -c conftest.cpp 2>&1`"; then
4643 >        ac_pentium=yes
4644 > else
4645 >        ac_pentium=no
4646 > fi
4647 > rm -f conftest*
4648  
4649 <  *linux*) if test "$F90" = ifc; then
4650 <                    PREPFLAG="-fpp1 "
4651 <                fi;;
4652 <  *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
4653 <                    PREPFLAG="-qsuffix=cpp=F90 "
4654 <                fi;;
4655 <  *darwin*)
4656 <        if test "$F90" = f90 -o "$F90" = xlf90; then
4015 <                PREPFLAG="-qsuffix=cpp=F90 "
4016 <        fi;;
4017 <  esac
4649 > fi
4650 > echo "$as_me:$LINENO: result: $ac_pentium" >&5
4651 > echo "${ECHO_T}$ac_pentium" >&6
4652 > if test "$ac_pentium" = yes; then
4653 >        :
4654 >        CPU_FLAGS=-mpentium
4655 > else
4656 >        :
4657  
4658 <  if test -z "$PREPFLAG"; then
4020 <        echo ""
4021 <        echo "**********************************************************"
4022 <        echo "* WARNING: Don't know the best PREPFLAG for this system  *"
4023 <        echo "* Use  make PREPFLAG=..., or edit the top level Makefile *"
4024 <        echo "* (otherwise, an empty PREPFLAG will be used)            *"
4025 <        echo "**********************************************************"
4026 <        echo ""
4027 <        PREPFLAG=""
4028 <  fi
4658 > fi
4659  
4660 <  echo "$as_me:$LINENO: checking to make sure F90 preprocessor flag works" >&5
4031 < echo $ECHO_N "checking to make sure F90 preprocessor flag works... $ECHO_C" >&6
4660 > fi
4661  
4662 +                  ;;
4663 +          i686*)
4664  
4665 <  ac_ext=f90
4666 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4667 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4668 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4665 > echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=pentiumpro" >&5
4666 > echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=pentiumpro... $ECHO_C" >&6
4667 > if test "${ac_cpu_pentiumpro+set}" = set; then
4668 >  echo $ECHO_N "(cached) $ECHO_C" >&6
4669 > else
4670 >  echo 'void f(){}' > conftest.cpp
4671 > if test -z "`${CXX-c++} -mcpu=pentiumpro -c conftest.cpp 2>&1`"; then
4672 >        ac_cpu_pentiumpro=yes
4673 > else
4674 >        ac_cpu_pentiumpro=no
4675 > fi
4676 > rm -f conftest*
4677  
4678 <  ac_save_ext=$ac_ext
4679 <  ac_ext=F90
4680 <  ac_save_F90FLAGS=$F90FLAGS
4678 > fi
4679 > echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5
4680 > echo "${ECHO_T}$ac_cpu_pentiumpro" >&6
4681 > if test "$ac_cpu_pentiumpro" = yes; then
4682 >        :
4683 >        CPU_FLAGS=-mcpu=pentiumpro
4684 > else
4685 >        :
4686  
4687 <  if test "$PREPFLAG"; then
4688 <  F90FLAGS="${F90FLAGS} ${PREPFLAG}-DTEST"
4687 >
4688 > echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpentiumpro" >&5
4689 > echo $ECHO_N "checking whether ${CXX-c++} accepts -mpentiumpro... $ECHO_C" >&6
4690 > if test "${ac_pentiumpro+set}" = set; then
4691 >  echo $ECHO_N "(cached) $ECHO_C" >&6
4692 > else
4693 >  echo 'void f(){}' > conftest.cpp
4694 > if test -z "`${CXX-c++} -mpentiumpro -c conftest.cpp 2>&1`"; then
4695 >        ac_pentiumpro=yes
4696 > else
4697 >        ac_pentiumpro=no
4698   fi
4699 + rm -f conftest*
4700  
4701 <    cat >conftest.$ac_ext <<_ACEOF
4701 > fi
4702 > echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5
4703 > echo "${ECHO_T}$ac_pentiumpro" >&6
4704 > if test "$ac_pentiumpro" = yes; then
4705 >        :
4706 >        CPU_FLAGS=-mpentiumpro
4707 > else
4708 >        :
4709  
4710 + fi
4711  
4712 < program main
4712 > fi
4713  
4714 <  integer :: i
4715 <  i = 1
4714 >                  ;;
4715 >          powerpc*)
4716 >                cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null`
4717 >                is60x=`echo $cputype | egrep "^600-9e?$"`
4718 >                if test -n "$is60x"; then
4719  
4720  
4721 < end program main
4721 > echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=$cputype" >&5
4722 > echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=$cputype... $ECHO_C" >&6
4723 > if test "${ac_m_cpu_60x+set}" = set; then
4724 >  echo $ECHO_N "(cached) $ECHO_C" >&6
4725 > else
4726 >  echo 'void f(){}' > conftest.cpp
4727 > if test -z "`${CXX-c++} -mcpu=$cputype -c conftest.cpp 2>&1`"; then
4728 >        ac_m_cpu_60x=yes
4729 > else
4730 >        ac_m_cpu_60x=no
4731 > fi
4732 > rm -f conftest*
4733  
4734 < _ACEOF
4735 < rm -f conftest.$ac_objext
4736 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4737 <  (eval $ac_compile) 2>&5
4738 <  ac_status=$?
4739 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4740 <  (exit $ac_status); } &&
4741 <         { ac_try='test -s conftest.$ac_objext'
4734 > fi
4735 > echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5
4736 > echo "${ECHO_T}$ac_m_cpu_60x" >&6
4737 > if test "$ac_m_cpu_60x" = yes; then
4738 >        :
4739 >        CPU_FLAGS=-mcpu=$cputype
4740 > else
4741 >        :
4742 >
4743 > fi
4744 >
4745 >                elif test "$cputype" = 750; then
4746 >
4747 >
4748 > echo "$as_me:$LINENO: checking whether we are using g++ 2.95 or later" >&5
4749 > echo $ECHO_N "checking whether we are using g++ 2.95 or later... $ECHO_C" >&6
4750 > if test "${ac_cv_prog_gxx_2_95+set}" = set; then
4751 >  echo $ECHO_N "(cached) $ECHO_C" >&6
4752 > else
4753 >
4754 > cat > conftest.cpp <<EOF
4755 > #ifdef __GNUC__ && !defined (__INTEL_COMPILER)
4756 > #  if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
4757 >     yes;
4758 > #  endif
4759 > #endif
4760 > EOF
4761 > if { ac_try='${CXX-c++} -E conftest.cpp'
4762    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4763    (eval $ac_try) 2>&5
4764    ac_status=$?
4765    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4766 <  (exit $ac_status); }; }; then
4767 <  prepflagworks=1
4766 >  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
4767 >  ac_cv_prog_gxx_2_95=yes
4768   else
4769 <  echo "$as_me: failed program was:" >&5
4770 < sed 's/^/| /' conftest.$ac_ext >&5
4769 >  ac_cv_prog_gxx_2_95=no
4770 > fi
4771  
4076 prepflagworks=0
4772   fi
4773 < rm -f conftest.$ac_objext conftest.$ac_ext
4773 > echo "$as_me:$LINENO: result: $ac_cv_prog_gxx_2_95" >&5
4774 > echo "${ECHO_T}$ac_cv_prog_gxx_2_95" >&6
4775 > if test "$ac_cv_prog_gxx_2_95" = yes; then
4776 >        :
4777  
4080  F90FLAGS=$ac_save_F90FLAGS
4081  ac_ext=$ac_save_ext
4082  ac_ext=c
4083 ac_cpp='$CPP $CPPFLAGS'
4084 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4085 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4086 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4778  
4779 + echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=750" >&5
4780 + echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=750... $ECHO_C" >&6
4781 + if test "${ac_m_cpu_750+set}" = set; then
4782 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4783 + else
4784 +  echo 'void f(){}' > conftest.cpp
4785 + if test -z "`${CXX-c++} -mcpu=750 -c conftest.cpp 2>&1`"; then
4786 +        ac_m_cpu_750=yes
4787 + else
4788 +        ac_m_cpu_750=no
4789 + fi
4790 + rm -f conftest*
4791  
4792 + fi
4793 + echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5
4794 + echo "${ECHO_T}$ac_m_cpu_750" >&6
4795 + if test "$ac_m_cpu_750" = yes; then
4796 +        :
4797 +        CPU_FLAGS=-mcpu=750
4798 + else
4799 +        :
4800  
4801 <  if test "$prepflagworks" = 1; then
4091 <    echo "$as_me:$LINENO: result: yes" >&5
4092 < echo "${ECHO_T}yes" >&6
4801 > fi
4802  
4803 <  else
4804 <    echo "$as_me:$LINENO: result: no" >&5
4805 < echo "${ECHO_T}no" >&6
4097 <    { { echo "$as_me:$LINENO: error: Can't figure out working Fortran90 preprocessor flag" >&5
4098 < echo "$as_me: error: Can't figure out working Fortran90 preprocessor flag" >&2;}
4099 <   { (exit 1); exit 1; }; }
4100 <  fi
4803 > else
4804 >        :
4805 >
4806   fi
4807  
4808 +                fi
4809 +                if test -z "$CPU_FLAGS"; then
4810  
4811  
4812 + echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=powerpc" >&5
4813 + echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=powerpc... $ECHO_C" >&6
4814 + if test "${ac_m_cpu_powerpc+set}" = set; then
4815 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4816 + else
4817 +  echo 'void f(){}' > conftest.cpp
4818 + if test -z "`${CXX-c++} -mcpu=powerpc -c conftest.cpp 2>&1`"; then
4819 +        ac_m_cpu_powerpc=yes
4820 + else
4821 +        ac_m_cpu_powerpc=no
4822 + fi
4823 + rm -f conftest*
4824  
4825 + fi
4826 + echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5
4827 + echo "${ECHO_T}$ac_m_cpu_powerpc" >&6
4828 + if test "$ac_m_cpu_powerpc" = yes; then
4829 +        :
4830 +        CPU_FLAGS=-mcpu=powerpc
4831 + else
4832 +        :
4833  
4834 < # Try to determine native compiler flags that allow us to use F90 suffix
4108 < # for preprocessed f90 source with -D type defines
4834 > fi
4835  
4836 < if test "$ac_test_PREPDEFFLAG" != "set"; then
4837 <  PREPDEFFLAG=""
4112 <  case "${host_cpu}-${host_os}" in
4836 >                fi
4837 >                if test -z "$CPU_FLAGS"; then
4838  
4114  *linux*) if test "$F90" = ifc; then
4115                    PREPDEFFLAG=" "
4116                fi;;
4117  *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
4118                    PREPDEFFLAG="-WF,"
4119                fi;;
4120  *darwin*)
4121        if test "$F90" = f90 -o "$F90" = xlf90; then
4122                PREPDEFFLAG="-WF,"
4123        fi;;
4124  esac
4839  
4840 <  if test -z "$PREPDEFFLAG"; then
4840 > echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpowerpc" >&5
4841 > echo $ECHO_N "checking whether ${CXX-c++} accepts -mpowerpc... $ECHO_C" >&6
4842 > if test "${ac_m_powerpc+set}" = set; then
4843 >  echo $ECHO_N "(cached) $ECHO_C" >&6
4844 > else
4845 >  echo 'void f(){}' > conftest.cpp
4846 > if test -z "`${CXX-c++} -mpowerpc -c conftest.cpp 2>&1`"; then
4847 >        ac_m_powerpc=yes
4848 > else
4849 >        ac_m_powerpc=no
4850 > fi
4851 > rm -f conftest*
4852 >
4853 > fi
4854 > echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5
4855 > echo "${ECHO_T}$ac_m_powerpc" >&6
4856 > if test "$ac_m_powerpc" = yes; then
4857 >        :
4858 >        CPU_FLAGS=-mpowerpc
4859 > else
4860 >        :
4861 >
4862 > fi
4863 >
4864 >                fi
4865 >          esac
4866 >  fi
4867 >
4868 >  if test -n "$CPU_FLAGS"; then
4869 >        CXXFLAGS="$CXXFLAGS $CPU_FLAGS"
4870 >  fi
4871 >
4872 >  if test -z "$CXXFLAGS"; then
4873          echo ""
4874 <        echo "*************************************************************"
4875 <        echo "* WARNING: Don't know the best PREPDEFFLAG for this system  *"
4876 <        echo "* Use  make PREPDEFFLAG=..., or edit the top level Makefile *"
4877 <        echo "* (otherwise, an empty PREPDEFFLAG will be used)            *"
4878 <        echo "*************************************************************"
4874 >        echo "**********************************************************"
4875 >        echo "* WARNING: Don't know the best CXXFLAGS for this system  *"
4876 >        echo "* Use  make CXXFLAGS=..., or edit the top level Makefile *"
4877 >        echo "* (otherwise, a default of CXXFLAGS=-O3 will be used)    *"
4878 >        echo "**********************************************************"
4879          echo ""
4880 <        PREPDEFFLAG=" "
4880 >        CXXFLAGS="-O3"
4881    fi
4882  
4137  echo "$as_me:$LINENO: checking to make sure F90 preprocessor define flag works" >&5
4138 echo $ECHO_N "checking to make sure F90 preprocessor define flag works... $ECHO_C" >&6
4883  
4884  
4885 <  ac_ext=f90
4886 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4887 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4888 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4885 > echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts ${CXXFLAGS}" >&5
4886 > echo $ECHO_N "checking whether ${CXX-c++} accepts ${CXXFLAGS}... $ECHO_C" >&6
4887 > if test "${ac_guessed_cxxflags+set}" = set; then
4888 >  echo $ECHO_N "(cached) $ECHO_C" >&6
4889 > else
4890 >  echo 'void f(){}' > conftest.cpp
4891 > if test -z "`${CXX-c++} ${CXXFLAGS} -c conftest.cpp 2>&1`"; then
4892 >        ac_guessed_cxxflags=yes
4893 > else
4894 >        ac_guessed_cxxflags=no
4895 > fi
4896 > rm -f conftest*
4897  
4898 <  ac_save_ext=$ac_ext
4899 <  ac_ext=F90
4900 <  ac_save_F90FLAGS=$F90FLAGS
4898 > fi
4899 > echo "$as_me:$LINENO: result: $ac_guessed_cxxflags" >&5
4900 > echo "${ECHO_T}$ac_guessed_cxxflags" >&6
4901 > if test "$ac_guessed_cxxflags" = yes; then
4902 >        :
4903  
4904 <  if test "$PREPDEFFLAG"; then
4905 <  F90FLAGS="${F90FLAGS} ${PREPFLAG} ${PREPDEFFLAG}-DTEST"
4904 > else
4905 >        :
4906 >
4907 >        echo ""
4908 >        echo "**********************************************************"
4909 >        echo "* WARNING: The guessed CXXFLAGS don't seem to work with  *"
4910 >        echo "* your compiler.                                         *"
4911 >        echo "* Use  make CXXFLAGS=..., or edit the top level Makefile *"
4912 >        echo "**********************************************************"
4913 >        echo ""
4914 >        CXXFLAGS=""
4915 >
4916   fi
4917  
4154    cat >conftest.$ac_ext <<_ACEOF
4918  
4919 + fi
4920  
4157 program main
4921  
4159  integer :: i
4160 #ifdef TEST
4161  i = 1
4162 #else
4163  choke me
4164 #endif
4922  
4923  
4167 end program main
4924  
4925 < _ACEOF
4926 < rm -f conftest.$ac_objext
4925 > # Try to determine "good" native compiler flags if none specified on command
4926 > # line
4927 >
4928 > if test x"$F90FLAGS" = x ; then
4929 >  F90FLAGS=""
4930 >  case "${host_cpu}-${host_os}" in
4931 >
4932 >  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
4933 >                    F90FLAGS="-O"
4934 >                fi;;
4935 >   rs6000*-aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
4936 >                    F90FLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w"
4937 >                fi;;
4938 >   powerpc*-aix*)
4939 >        if test "$F90" = f90 -o "$F90" = xlf90; then
4940 >                F90FLAGS="-O3 -qarch=ppc -qansialias -w"
4941 >                echo "*******************************************************"
4942 >                echo "*  You have AIX on an unknown powerpc system.  It is  *"
4943 >                echo "*  recommended that you use                           *"
4944 >                echo "*                                                     *"
4945 >                echo "*  F90FLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
4946 >                echo "*                                 ^^^                 *"
4947 >                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
4948 >                echo "*  PowerPC CPU you have.   For more info, man xlf.    *"
4949 >                echo "*******************************************************"
4950 >        fi;;
4951 >   *darwin*)
4952 >        if test "$F90" = f90 -o "$F90" = xlf90 -o "$F90" = xlf95; then
4953 >                F90FLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto"
4954 >        fi;;
4955 >  esac
4956 >
4957 >  if test -n "$CPU_FLAGS"; then
4958 >        F90FLAGS="$F90FLAGS $CPU_FLAGS"
4959 >  fi
4960 >
4961 >  if test -z "$F90FLAGS"; then
4962 >        echo ""
4963 >        echo "**********************************************************"
4964 >        echo "* WARNING: Don't know the best F90FLAGS for this system  *"
4965 >        echo "* Use  make F90FLAGS=..., or edit the top level Makefile *"
4966 >        echo "* (otherwise, a default of F90FLAGS=-O3 will be used)    *"
4967 >        echo "**********************************************************"
4968 >        echo ""
4969 >        F90FLAGS="-O3"
4970 >  fi
4971 >
4972 >
4973 > echo "$as_me:$LINENO: checking whether ${F90-f90} accepts ${F90FLAGS}" >&5
4974 > echo $ECHO_N "checking whether ${F90-f90} accepts ${F90FLAGS}... $ECHO_C" >&6
4975 > if test "${ac_guessed_f90flags+set}" = set; then
4976 >  echo $ECHO_N "(cached) $ECHO_C" >&6
4977 > else
4978 >
4979 >
4980 >
4981 > ac_ext=f90
4982 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4983 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4984 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4985 >
4986 > echo 'program main' > conftest.$ac_ext
4987 > echo 'end program main' >> conftest.$ac_ext
4988 > ac_compile='${F90-f90} -c ${F90FLAGS} $F90FLAGS conftest.$ac_ext 1>&5'
4989   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4990    (eval $ac_compile) 2>&5
4991    ac_status=$?
4992    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4993 <  (exit $ac_status); } &&
4994 <         { ac_try='test -s conftest.$ac_objext'
4177 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4178 <  (eval $ac_try) 2>&5
4179 <  ac_status=$?
4180 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4181 <  (exit $ac_status); }; }; then
4182 <  prepdefflagworks=1
4993 >  (exit $ac_status); }; then
4994 >        ac_guessed_f90flags=yes
4995   else
4996 <  echo "$as_me: failed program was:" >&5
4997 < sed 's/^/| /' conftest.$ac_ext >&5
4996 >        ac_guessed_f90flags=no
4997 > fi
4998 > rm -f conftest*
4999 > ac_ext=f90
5000 > ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5001 > ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5002 > ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5003  
5004 < prepdefflagworks=0
5004 >
5005   fi
5006 < rm -f conftest.$ac_objext conftest.$ac_ext
5006 > echo "$as_me:$LINENO: result: $ac_guessed_f90flags" >&5
5007 > echo "${ECHO_T}$ac_guessed_f90flags" >&6
5008 > if test "$ac_guessed_f90flags" = yes; then
5009 >        :
5010  
5011 <  F90FLAGS=$ac_save_F90FLAGS
5012 <  ac_ext=$ac_save_ext
4193 <  ac_ext=c
4194 < ac_cpp='$CPP $CPPFLAGS'
4195 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4196 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4197 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
5011 > else
5012 >        :
5013  
5014 +        echo ""
5015 +        echo "**********************************************************"
5016 +        echo "* WARNING: The guessed F90FLAGS don't seem to work with  *"
5017 +        echo "* your compiler.                                         *"
5018 +        echo "* Use  make F90FLAGS=..., or edit the top level Makefile *"
5019 +        echo "**********************************************************"
5020 +        echo ""
5021 +        F90FLAGS=""
5022  
5023 + fi
5024  
4201  if test "$prepdefflagworks" = 1; then
4202    echo "$as_me:$LINENO: result: yes" >&5
4203 echo "${ECHO_T}yes" >&6
5025  
4205  else
4206    echo "$as_me:$LINENO: result: no" >&5
4207 echo "${ECHO_T}no" >&6
4208    { { echo "$as_me:$LINENO: error: Can't figure out working Fortran90 preprocessor define flag" >&5
4209 echo "$as_me: error: Can't figure out working Fortran90 preprocessor define flag" >&2;}
4210   { (exit 1); exit 1; }; }
4211  fi
5026   fi
5027  
5028 +     ;;
5029 + esac
5030 +
5031   # Find a good install program.  We prefer a C program (faster),
5032   # so one script is as good as another.  But avoid the broken or
5033   # incompatible versions:
# Line 4449 | Line 5266 | test -n "$YACC" || YACC="yacc"
5266   done
5267   test -n "$YACC" || YACC="yacc"
5268  
4452
5269   for ac_prog in flex lex
5270   do
5271    # Extract the first word of "$ac_prog", so it can be a program name with args.
# Line 4501 | Line 5317 | cat >conftest.$ac_ext <<_ACEOF
5317    ac_check_lib_save_LIBS=$LIBS
5318   LIBS="-lfl  $LIBS"
5319   cat >conftest.$ac_ext <<_ACEOF
4504 #line $LINENO "configure"
4505 /* confdefs.h.  */
4506 _ACEOF
4507 cat confdefs.h >>conftest.$ac_ext
4508 cat >>conftest.$ac_ext <<_ACEOF
4509 /* end confdefs.h.  */
5320  
5321 < /* Override any gcc2 internal prototype to avoid an error.  */
5322 < #ifdef __cplusplus
5323 < extern "C"
5324 < #endif
5325 < /* We use char because int might match the return type of a gcc2
4516 <   builtin and then its argument prototype would still apply.  */
4517 < char yywrap ();
4518 < int
4519 < main ()
4520 < {
4521 < yywrap ();
4522 <  ;
4523 <  return 0;
4524 < }
5321 > program main
5322 >
5323 > call yywrap
5324 > end program main
5325 >
5326   _ACEOF
5327   rm -f conftest.$ac_objext conftest$ac_exeext
5328   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 4558 | Line 5359 | cat >conftest.$ac_ext <<_ACEOF
5359    ac_check_lib_save_LIBS=$LIBS
5360   LIBS="-ll  $LIBS"
5361   cat >conftest.$ac_ext <<_ACEOF
4561 #line $LINENO "configure"
4562 /* confdefs.h.  */
4563 _ACEOF
4564 cat confdefs.h >>conftest.$ac_ext
4565 cat >>conftest.$ac_ext <<_ACEOF
4566 /* end confdefs.h.  */
5362  
5363 < /* Override any gcc2 internal prototype to avoid an error.  */
5364 < #ifdef __cplusplus
5365 < extern "C"
5366 < #endif
5367 < /* We use char because int might match the return type of a gcc2
4573 <   builtin and then its argument prototype would still apply.  */
4574 < char yywrap ();
4575 < int
4576 < main ()
4577 < {
4578 < yywrap ();
4579 <  ;
4580 <  return 0;
4581 < }
5363 > program main
5364 >
5365 > call yywrap
5366 > end program main
5367 >
5368   _ACEOF
5369   rm -f conftest.$ac_objext conftest$ac_exeext
5370   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 4628 | Line 5414 | _ACEOF
5414    (eval $LEX conftest.l) 2>&5
5415    ac_status=$?
5416    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5417 <  (exit $ac_status); }
5418 < if test -f lex.yy.c; then
5419 <  ac_cv_prog_lex_root=lex.yy
5420 < elif test -f lexyy.c; then
5421 <  ac_cv_prog_lex_root=lexyy
4636 < else
4637 <  { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
4638 < echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
4639 <   { (exit 1); exit 1; }; }
4640 < fi
4641 < fi
4642 < echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
4643 < echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
4644 < rm -f conftest.l
4645 < LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
4646 <
4647 < echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
4648 < echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
4649 < if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
4650 <  echo $ECHO_N "(cached) $ECHO_C" >&6
4651 < else
4652 <  # POSIX says lex can declare yytext either as a pointer or an array; the
4653 < # default is implementation-dependent. Figure out which it is, since
4654 < # not all implementations provide the %pointer and %array declarations.
4655 < ac_cv_prog_lex_yytext_pointer=no
4656 < echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
4657 < ac_save_LIBS=$LIBS
4658 < LIBS="$LIBS $LEXLIB"
4659 < cat >conftest.$ac_ext <<_ACEOF
4660 < `cat $LEX_OUTPUT_ROOT.c`
4661 < _ACEOF
4662 < rm -f conftest.$ac_objext conftest$ac_exeext
4663 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4664 <  (eval $ac_link) 2>&5
4665 <  ac_status=$?
4666 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4667 <  (exit $ac_status); } &&
4668 <         { ac_try='test -s conftest$ac_exeext'
4669 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4670 <  (eval $ac_try) 2>&5
4671 <  ac_status=$?
4672 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4673 <  (exit $ac_status); }; }; then
4674 <  ac_cv_prog_lex_yytext_pointer=yes
4675 < else
4676 <  echo "$as_me: failed program was:" >&5
4677 < sed 's/^/| /' conftest.$ac_ext >&5
4678 <
4679 < fi
4680 < rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4681 < LIBS=$ac_save_LIBS
4682 < rm -f "${LEX_OUTPUT_ROOT}.c"
4683 <
4684 < fi
4685 < echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
4686 < echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
4687 < if test $ac_cv_prog_lex_yytext_pointer = yes; then
4688 <
4689 < cat >>confdefs.h <<\_ACEOF
4690 < #define YYTEXT_POINTER 1
4691 < _ACEOF
4692 <
4693 < fi
4694 <
4695 < fi
4696 < # Extract the first word of "ar", so it can be a program name with args.
4697 < set dummy ar; ac_word=$2
4698 < echo "$as_me:$LINENO: checking for $ac_word" >&5
4699 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4700 < if test "${ac_cv_prog_AR+set}" = set; then
4701 <  echo $ECHO_N "(cached) $ECHO_C" >&6
4702 < else
4703 <  if test -n "$AR"; then
4704 <  ac_cv_prog_AR="$AR" # Let the user override the test.
4705 < else
4706 < as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4707 < for as_dir in $PATH
4708 < do
4709 <  IFS=$as_save_IFS
4710 <  test -z "$as_dir" && as_dir=.
4711 <  for ac_exec_ext in '' $ac_executable_extensions; do
4712 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4713 <    ac_cv_prog_AR="ar"
4714 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4715 <    break 2
4716 <  fi
4717 < done
4718 < done
4719 <
4720 <  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="NONE"
4721 < fi
4722 < fi
4723 < AR=$ac_cv_prog_AR
4724 < if test -n "$AR"; then
4725 <  echo "$as_me:$LINENO: result: $AR" >&5
4726 < echo "${ECHO_T}$AR" >&6
4727 < else
4728 <  echo "$as_me:$LINENO: result: no" >&5
4729 < echo "${ECHO_T}no" >&6
4730 < fi
4731 <
4732 < if test "$AR" = "NONE"; then
4733 <  { { echo "$as_me:$LINENO: error: --> Can't find \`ar'!" >&5
4734 < echo "$as_me: error: --> Can't find \`ar'!" >&2;}
4735 <   { (exit 1); exit 1; }; }
4736 <  cat >confcache <<\_ACEOF
4737 < # This file is a shell script that caches the results of configure
4738 < # tests run on this system so they can be shared between configure
4739 < # scripts and configure runs, see configure's option --config-cache.
4740 < # It is not useful on other systems.  If it contains results you don't
4741 < # want to keep, you may remove or edit it.
4742 < #
4743 < # config.status only pays attention to the cache file if you give it
4744 < # the --recheck option to rerun configure.
4745 < #
4746 < # `ac_cv_env_foo' variables (set or unset) will be overridden when
4747 < # loading this file, other *unset* `ac_cv_foo' will be assigned the
4748 < # following values.
4749 <
4750 < _ACEOF
4751 <
4752 < # The following way of writing the cache mishandles newlines in values,
4753 < # but we know of no workaround that is simple, portable, and efficient.
4754 < # So, don't put newlines in cache variables' values.
4755 < # Ultrix sh set writes to stderr and can't be redirected directly,
4756 < # and sets the high bit in the cache file unless we assign to the vars.
4757 < {
4758 <  (set) 2>&1 |
4759 <    case `(ac_space=' '; set | grep ac_space) 2>&1` in
4760 <    *ac_space=\ *)
4761 <      # `set' does not quote correctly, so add quotes (double-quote
4762 <      # substitution turns \\\\ into \\, and sed turns \\ into \).
4763 <      sed -n \
4764 <        "s/'/'\\\\''/g;
4765 <          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
4766 <      ;;
4767 <    *)
4768 <      # `set' quotes correctly as required by POSIX, so do not add quotes.
4769 <      sed -n \
4770 <        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
4771 <      ;;
4772 <    esac;
4773 < } |
4774 <  sed '
4775 <     t clear
4776 <     : clear
4777 <     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
4778 <     t end
4779 <     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
4780 <     : end' >>confcache
4781 < if diff $cache_file confcache >/dev/null 2>&1; then :; else
4782 <  if test -w $cache_file; then
4783 <    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
4784 <    cat confcache >$cache_file
4785 <  else
4786 <    echo "not updating unwritable cache $cache_file"
4787 <  fi
4788 < fi
4789 < rm -f confcache
4790 <  exit 1
4791 < fi
4792 <
4793 < ac_ext=f90
4794 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4795 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4796 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4797 <
4798 <
4799 <
4800 < ac_ext=f90
4801 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4802 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4803 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4804 < echo "$as_me:$LINENO: checking how to get verbose linking output from $F90" >&5
4805 < echo $ECHO_N "checking how to get verbose linking output from $F90... $ECHO_C" >&6
4806 < if test "${ac_cv_prog_f90_v+set}" = set; then
4807 <  echo $ECHO_N "(cached) $ECHO_C" >&6
4808 < else
4809 <
4810 < cat >conftest.$ac_ext <<_ACEOF
4811 <
4812 < program main
4813 <
4814 <
4815 < end program main
4816 <
4817 < _ACEOF
4818 < rm -f conftest.$ac_objext
4819 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4820 <  (eval $ac_compile) 2>&5
4821 <  ac_status=$?
4822 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823 <  (exit $ac_status); } &&
4824 <         { ac_try='test -s conftest.$ac_objext'
4825 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4826 <  (eval $ac_try) 2>&5
4827 <  ac_status=$?
4828 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4829 <  (exit $ac_status); }; }; then
4830 <  ac_cv_prog_f90_v=
4831 < # Try some options frequently used verbose output
4832 < for ac_verb in -v -verbose --verbose -V -\#\#\#; do
4833 <  ac_ext=f90
4834 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4835 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4836 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4837 <
4838 < cat >conftest.$ac_ext <<_ACEOF
4839 <
4840 < program main
4841 <
4842 <
4843 < end program main
4844 <
4845 < _ACEOF
4846 <
4847 < # Compile and link our simple test program by passing a flag (argument
4848 < # 1 to this macro) to the Fortran 90 compiler in order to get
4849 < # "verbose" output that we can then parse for the Fortran 90 linker
4850 < # flags.
4851 < ac_save_F90FLAGS=$F90FLAGS
4852 < F90FLAGS="$F90FLAGS $ac_verb"
4853 <
4854 < (eval echo $as_me:4854: \"$ac_link\") >&5
4855 < ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
4856 < echo "$ac_f90_v_output" >&5
4857 < F90FLAGS=$ac_save_F90FLAGS
4858 <
4859 < rm -f conftest.*
4860 < ac_ext=f90
4861 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4862 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4863 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4864 <
4865 < # If we are using xlf then replace all the commas with spaces.
4866 < if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
4867 <  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
4868 < fi
4869 <
4870 < # If we are using Cray Fortran then delete quotes.
4871 < # Use "\"" instead of '"' for font-lock-mode.
4872 < # FIXME: a more general fix for quoted arguments with spaces?
4873 < if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
4874 <  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
4875 < fi
4876 <  # look for -l* and *.a constructs in the output
4877 <  for ac_arg in $ac_f90_v_output; do
4878 <     case $ac_arg in
4879 <        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
4880 <          ac_cv_prog_f90_v=$ac_verb
4881 <          break 2 ;;
4882 <     esac
4883 <  done
4884 < done
4885 < if test -z "$ac_cv_prog_f90_v"; then
4886 <   { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F90" >&5
4887 < echo "$as_me: WARNING: cannot determine how to obtain linking information from $F90" >&2;}
4888 < fi
4889 < else
4890 <  echo "$as_me: failed program was:" >&5
4891 < sed 's/^/| /' conftest.$ac_ext >&5
4892 <
4893 < { echo "$as_me:$LINENO: WARNING: compilation failed" >&5
4894 < echo "$as_me: WARNING: compilation failed" >&2;}
4895 < fi
4896 < rm -f conftest.$ac_objext conftest.$ac_ext
4897 <
4898 < fi
4899 < echo "$as_me:$LINENO: result: $ac_cv_prog_f90_v" >&5
4900 < echo "${ECHO_T}$ac_cv_prog_f90_v" >&6
4901 < echo "$as_me:$LINENO: checking for Fortran 90 libraries" >&5
4902 < echo $ECHO_N "checking for Fortran 90 libraries... $ECHO_C" >&6
4903 < if test "${ac_cv_flibs+set}" = set; then
4904 <  echo $ECHO_N "(cached) $ECHO_C" >&6
4905 < else
4906 <  if test "x$F90LIBS" != "x"; then
4907 <  ac_cv_f90libs="$F90LIBS" # Let the user override the test.
4908 < else
4909 <
4910 < ac_ext=f90
4911 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4912 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4913 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4914 <
4915 < cat >conftest.$ac_ext <<_ACEOF
4916 <
4917 < program main
4918 <
4919 <
4920 < end program main
4921 <
4922 < _ACEOF
4923 <
4924 < # Compile and link our simple test program by passing a flag (argument
4925 < # 1 to this macro) to the Fortran 90 compiler in order to get
4926 < # "verbose" output that we can then parse for the Fortran 90 linker
4927 < # flags.
4928 < ac_save_F90FLAGS=$F90FLAGS
4929 < F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v"
4930 <
4931 < (eval echo $as_me:4931: \"$ac_link\") >&5
4932 < ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
4933 < echo "$ac_f90_v_output" >&5
4934 < F90FLAGS=$ac_save_F90FLAGS
4935 <
4936 < rm -f conftest.*
4937 < ac_ext=f90
4938 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4939 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4940 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4941 <
4942 < # If we are using xlf then replace all the commas with spaces.
4943 < if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
4944 <  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
4945 < fi
4946 <
4947 < # If we are using Cray Fortran then delete quotes.
4948 < # Use "\"" instead of '"' for font-lock-mode.
4949 < # FIXME: a more general fix for quoted arguments with spaces?
4950 < if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
4951 <  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
4952 < fi
4953 <
4954 < ac_cv_f90libs=
4955 <
4956 < # Save positional arguments (if any)
4957 < ac_save_positional="$@"
4958 <
4959 < set X $ac_f90_v_output
4960 < while test $# != 1; do
4961 <  shift
4962 <  ac_arg=$1
4963 <  case $ac_arg in
4964 <        [\\/]*.a | ?:[\\/]*.a)
4965 <            ac_exists=false
4966 <  for ac_i in $ac_cv_f90libs; do
4967 <    if test x"$ac_arg" = x"$ac_i"; then
4968 <      ac_exists=true
4969 <      break
4970 <    fi
4971 <  done
4972 <
4973 <  if test x"$ac_exists" = xtrue; then
4974 <  :
5417 >  (exit $ac_status); }
5418 > if test -f lex.yy.c; then
5419 >  ac_cv_prog_lex_root=lex.yy
5420 > elif test -f lexyy.c; then
5421 >  ac_cv_prog_lex_root=lexyy
5422   else
5423 <  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5423 >  { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
5424 > echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
5425 >   { (exit 1); exit 1; }; }
5426   fi
5427 + fi
5428 + echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
5429 + echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
5430 + rm -f conftest.l
5431 + LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
5432  
5433 <          ;;
5434 <        -bI:*)
5435 <            ac_exists=false
5436 <  for ac_i in $ac_cv_f90libs; do
4983 <    if test x"$ac_arg" = x"$ac_i"; then
4984 <      ac_exists=true
4985 <      break
4986 <    fi
4987 <  done
4988 <
4989 <  if test x"$ac_exists" = xtrue; then
4990 <  :
5433 > echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
5434 > echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
5435 > if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
5436 >  echo $ECHO_N "(cached) $ECHO_C" >&6
5437   else
5438 <  if test "$ac_compiler_gnu" = yes; then
5439 <  for ac_link_opt in $ac_arg; do
5440 <    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
5441 <  done
5438 >  # POSIX says lex can declare yytext either as a pointer or an array; the
5439 > # default is implementation-dependent. Figure out which it is, since
5440 > # not all implementations provide the %pointer and %array declarations.
5441 > ac_cv_prog_lex_yytext_pointer=no
5442 > echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
5443 > ac_save_LIBS=$LIBS
5444 > LIBS="$LIBS $LEXLIB"
5445 > cat >conftest.$ac_ext <<_ACEOF
5446 > `cat $LEX_OUTPUT_ROOT.c`
5447 > _ACEOF
5448 > rm -f conftest.$ac_objext conftest$ac_exeext
5449 > if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5450 >  (eval $ac_link) 2>&5
5451 >  ac_status=$?
5452 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5453 >  (exit $ac_status); } &&
5454 >         { ac_try='test -s conftest$ac_exeext'
5455 >  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5456 >  (eval $ac_try) 2>&5
5457 >  ac_status=$?
5458 >  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5459 >  (exit $ac_status); }; }; then
5460 >  ac_cv_prog_lex_yytext_pointer=yes
5461   else
5462 <  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5462 >  echo "$as_me: failed program was:" >&5
5463 > sed 's/^/| /' conftest.$ac_ext >&5
5464 >
5465   fi
5466 + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5467 + LIBS=$ac_save_LIBS
5468 + rm -f "${LEX_OUTPUT_ROOT}.c"
5469 +
5470   fi
5471 + echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
5472 + echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
5473 + if test $ac_cv_prog_lex_yytext_pointer = yes; then
5474  
5475 <          ;;
5476 <          # Ignore these flags.
5477 <        -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*)
5004 <          ;;
5005 <        -lkernel32)
5006 <          test x"$CYGWIN" != xyes && ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5007 <          ;;
5008 <        -[LRuY])
5009 <          # These flags, when seen by themselves, take an argument.
5010 <          # We remove the space between option and argument and re-iterate
5011 <          # unless we find an empty arg or a new option (starting with -)
5012 <          case $2 in
5013 <             "" | -*);;
5014 <             *)
5015 <                ac_arg="$ac_arg$2"
5475 > cat >>confdefs.h <<\_ACEOF
5476 > #define YYTEXT_POINTER 1
5477 > _ACEOF
5478  
5479 <                shift; shift
5018 <                set X $ac_arg "$@"
5019 <                ;;
5020 <          esac
5021 <          ;;
5022 <        -YP,*)
5023 <          for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
5024 <              ac_exists=false
5025 <  for ac_i in $ac_cv_f90libs; do
5026 <    if test x"$ac_j" = x"$ac_i"; then
5027 <      ac_exists=true
5028 <      break
5029 <    fi
5030 <  done
5479 > fi
5480  
5032  if test x"$ac_exists" = xtrue; then
5033  :
5034 else
5035  ac_arg="$ac_arg $ac_j"
5036                             ac_cv_f90libs="$ac_cv_f90libs $ac_j"
5481   fi
5482 + # Extract the first word of "ar", so it can be a program name with args.
5483 + set dummy ar; ac_word=$2
5484 + echo "$as_me:$LINENO: checking for $ac_word" >&5
5485 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5486 + if test "${ac_cv_prog_AR+set}" = set; then
5487 +  echo $ECHO_N "(cached) $ECHO_C" >&6
5488 + else
5489 +  if test -n "$AR"; then
5490 +  ac_cv_prog_AR="$AR" # Let the user override the test.
5491 + else
5492 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5493 + for as_dir in $PATH
5494 + do
5495 +  IFS=$as_save_IFS
5496 +  test -z "$as_dir" && as_dir=.
5497 +  for ac_exec_ext in '' $ac_executable_extensions; do
5498 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5499 +    ac_cv_prog_AR="ar"
5500 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5501 +    break 2
5502 +  fi
5503 + done
5504 + done
5505  
5506 <          done
5507 <          ;;
5508 <        -[lLR]*)
5509 <            ac_exists=false
5510 <  for ac_i in $ac_cv_f90libs; do
5511 <    if test x"$ac_arg" = x"$ac_i"; then
5512 <      ac_exists=true
5046 <      break
5047 <    fi
5048 <  done
5049 <
5050 <  if test x"$ac_exists" = xtrue; then
5051 <  :
5506 >  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="NONE"
5507 > fi
5508 > fi
5509 > AR=$ac_cv_prog_AR
5510 > if test -n "$AR"; then
5511 >  echo "$as_me:$LINENO: result: $AR" >&5
5512 > echo "${ECHO_T}$AR" >&6
5513   else
5514 <  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
5514 >  echo "$as_me:$LINENO: result: no" >&5
5515 > echo "${ECHO_T}no" >&6
5516   fi
5517  
5518 <          ;;
5519 <          # Ignore everything else.
5520 <  esac
5521 < done
5522 < # restore positional arguments
5523 < set X $ac_save_positional; shift
5518 > if test "$AR" = "NONE"; then
5519 >  { { echo "$as_me:$LINENO: error: --> Can't find \`ar'!" >&5
5520 > echo "$as_me: error: --> Can't find \`ar'!" >&2;}
5521 >   { (exit 1); exit 1; }; }
5522 >  cat >confcache <<\_ACEOF
5523 > # This file is a shell script that caches the results of configure
5524 > # tests run on this system so they can be shared between configure
5525 > # scripts and configure runs, see configure's option --config-cache.
5526 > # It is not useful on other systems.  If it contains results you don't
5527 > # want to keep, you may remove or edit it.
5528 > #
5529 > # config.status only pays attention to the cache file if you give it
5530 > # the --recheck option to rerun configure.
5531 > #
5532 > # `ac_cv_env_foo' variables (set or unset) will be overridden when
5533 > # loading this file, other *unset* `ac_cv_foo' will be assigned the
5534 > # following values.
5535  
5536 < # We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
5064 < # then we insist that the "run path" must be an absolute path (i.e. it
5065 < # must begin with a "/").
5066 < case `(uname -sr) 2>/dev/null` in
5067 <   "SunOS 5"*)
5068 <      ac_ld_run_path=`echo $ac_f90_v_output |
5069 <                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
5070 <      test "x$ac_ld_run_path" != x &&
5536 > _ACEOF
5537  
5538 <        if test "$ac_compiler_gnu" = yes; then
5539 <  for ac_link_opt in $ac_ld_run_path; do
5540 <    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
5541 <  done
5542 < else
5543 <  ac_cv_f90libs="$ac_cv_f90libs $ac_ld_run_path"
5544 < fi
5538 > # The following way of writing the cache mishandles newlines in values,
5539 > # but we know of no workaround that is simple, portable, and efficient.
5540 > # So, don't put newlines in cache variables' values.
5541 > # Ultrix sh set writes to stderr and can't be redirected directly,
5542 > # and sets the high bit in the cache file unless we assign to the vars.
5543 > {
5544 >  (set) 2>&1 |
5545 >    case `(ac_space=' '; set | grep ac_space) 2>&1` in
5546 >    *ac_space=\ *)
5547 >      # `set' does not quote correctly, so add quotes (double-quote
5548 >      # substitution turns \\\\ into \\, and sed turns \\ into \).
5549 >      sed -n \
5550 >        "s/'/'\\\\''/g;
5551 >          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5552        ;;
5553 < esac
5554 < fi # test "x$F90LIBS" = "x"
5555 <
5553 >    *)
5554 >      # `set' quotes correctly as required by POSIX, so do not add quotes.
5555 >      sed -n \
5556 >        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
5557 >      ;;
5558 >    esac;
5559 > } |
5560 >  sed '
5561 >     t clear
5562 >     : clear
5563 >     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
5564 >     t end
5565 >     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
5566 >     : end' >>confcache
5567 > if diff $cache_file confcache >/dev/null 2>&1; then :; else
5568 >  if test -w $cache_file; then
5569 >    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
5570 >    cat confcache >$cache_file
5571 >  else
5572 >    echo "not updating unwritable cache $cache_file"
5573 >  fi
5574   fi
5575 < echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5
5576 < echo "${ECHO_T}$ac_cv_flibs" >&6
5577 < F90LIBS="$ac_cv_f90libs"
5575 > rm -f confcache
5576 >  exit 1
5577 > fi
5578  
5088 ac_ext=f90
5089 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5090 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5091 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5579  
5580 < echo "$as_me:$LINENO: checking for Fortran 90 name-mangling scheme" >&5
5581 < echo $ECHO_N "checking for Fortran 90 name-mangling scheme... $ECHO_C" >&6
5582 < if test "${ac_cv_f90_mangling+set}" = set; then
5583 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5580 >
5581 > # Check whether --with-mpi or --without-mpi was given.
5582 > if test "${with_mpi+set}" = set; then
5583 >  withval="$with_mpi"
5584 >  with_mpi=$withval
5585   else
5586 <  ac_ext=f90
5587 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5588 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5589 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5590 < cat >conftest.$ac_ext <<_ACEOF
5591 < subroutine foobar()
5592 < return
5586 >  with_mpi="no"
5587 > fi;
5588 >
5589 > case "x$with_mpi" in
5590 >        xyes | "x")  USE_MPI=yes;;
5591 >        xno) USE_MPI=no ;;
5592 >        *) MPI="$with_mpi"; USE_MPI=yes ;;
5593 > esac
5594 > if test "$USE_MPI" = "yes" -a -z "$with_mpi"; then
5595 >        MPI="/usr/local"
5596 > fi
5597 > if test "$USE_MPI" = "yes"; then
5598 >        echo "MPI = $MPI"
5599 >
5600 >
5601 > # Set variables...
5602 > MPI_LIB_DIR="$MPI/lib"
5603 > MPI_INC_DIR="$MPI/include"
5604 >
5605 >
5606 >
5607 > echo "$as_me:$LINENO: checking for mpi.h" >&5
5608 > echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6
5609 > have_mpi_h=0
5610 > echo '#include <mpi.h>' > conftest.cc
5611 > if test -z "`${CXX} -I${MPI_INC_DIR} -c conftest.cc 2>&1`"; then
5612 >        echo "$as_me:$LINENO: result: yes" >&5
5613 > echo "${ECHO_T}yes" >&6
5614 >        have_mpi_h=1
5615 > else
5616 >        echo "$as_me:$LINENO: result: no! Check MPI include paths" >&5
5617 > echo "${ECHO_T}no! Check MPI include paths" >&6
5618 >        USE_MPI="no"
5619 > fi
5620 > rm -f conftest*
5621 > if test "$have_mpi_h" = 1; then
5622 >
5623 > cat >>confdefs.h <<\_ACEOF
5624 > #define HAVE_MPI_H 1
5625 > _ACEOF
5626 >
5627 > fi
5628 >
5629 > echo "$as_me:$LINENO: checking whether mpif.h is usable" >&5
5630 > echo $ECHO_N "checking whether mpif.h is usable... $ECHO_C" >&6
5631 > have_mpif_h=0
5632 > rm -f conftest*
5633 > cat >conftest.f90 <<EOF
5634 > program main
5635 >   include 'mpif.h'
5636   end
5637 < subroutine foo_bar()
5638 < return
5639 < end
5637 > EOF
5638 > if $F90 -I$MPI_INC_DIR -c conftest.f90 > conftest.out 2>&1 ; then
5639 >        echo "$as_me:$LINENO: result: yes" >&5
5640 > echo "${ECHO_T}yes" >&6
5641 >        MPI_F90_INC="$MPI_INC"
5642 >        have_mpif_h=1
5643 > else
5644 >        if test -s conftest.out ; then
5645 >                cat conftest.out >> config.log
5646 >        fi
5647 >        echo "$as_me:$LINENO: result: no! Check MPI include paths" >&5
5648 > echo "${ECHO_T}no! Check MPI include paths" >&6
5649 >        USE_MPI="no"
5650 > fi
5651 > rm -f conftest*
5652 >
5653 > if test "$have_mpif_h" = 1; then
5654 >
5655 > cat >>confdefs.h <<\_ACEOF
5656 > #define HAVE_MPIF_H 1
5657   _ACEOF
5110 rm -f conftest.$ac_objext
5111 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5112  (eval $ac_compile) 2>&5
5113  ac_status=$?
5114  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5115  (exit $ac_status); } &&
5116         { ac_try='test -s conftest.$ac_objext'
5117  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5118  (eval $ac_try) 2>&5
5119  ac_status=$?
5120  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5121  (exit $ac_status); }; }; then
5122  mv conftest.$ac_objext cf90_test.$ac_objext
5658  
5659 <  ac_ext=c
5659 > fi
5660 >
5661 > ac_ext=c
5662   ac_cpp='$CPP $CPPFLAGS'
5663   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5664   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5665   ac_compiler_gnu=$ac_cv_c_compiler_gnu
5666  
5667 <  ac_save_LIBS=$LIBS
5668 <  LIBS="cf90_test.$ac_objext $F90LIBS $LIBS"
5667 > ac_save_LDFLAGS=$LDFLAGS
5668 > LDFLAGS="${LDFLAGS} -L${MPI_LIB_DIR} "
5669  
5670 <  ac_success=no
5671 <  for ac_foobar in foobar FOOBAR; do
5672 <    for ac_underscore in "" "_"; do
5673 <      ac_func="$ac_foobar$ac_underscore"
5674 <      cat >conftest.$ac_ext <<_ACEOF
5670 > if test x = x"$MPI_LIB"; then
5671 >        echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5672 > echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
5673 > if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
5674 >  echo $ECHO_N "(cached) $ECHO_C" >&6
5675 > else
5676 >  ac_check_lib_save_LIBS=$LIBS
5677 > LIBS="-lmpi  $LIBS"
5678 > cat >conftest.$ac_ext <<_ACEOF
5679   #line $LINENO "configure"
5680   /* confdefs.h.  */
5681   _ACEOF
# Line 5148 | Line 5689 | char $ac_func ();
5689   #endif
5690   /* We use char because int might match the return type of a gcc2
5691     builtin and then its argument prototype would still apply.  */
5692 < char $ac_func ();
5692 > char MPI_Init ();
5693   int
5694   main ()
5695   {
5696 < $ac_func ();
5696 > MPI_Init ();
5697    ;
5698    return 0;
5699   }
# Line 5169 | Line 5710 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5710    ac_status=$?
5711    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5712    (exit $ac_status); }; }; then
5713 <  ac_success=yes; break 2
5713 >  ac_cv_lib_mpi_MPI_Init=yes
5714   else
5715    echo "$as_me: failed program was:" >&5
5716   sed 's/^/| /' conftest.$ac_ext >&5
5717  
5718 + ac_cv_lib_mpi_MPI_Init=no
5719   fi
5720   rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5721 <    done
5722 <  done
5721 > LIBS=$ac_check_lib_save_LIBS
5722 > fi
5723 > echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5724 > echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5725 > if test $ac_cv_lib_mpi_MPI_Init = yes; then
5726 >  MPI_LIB="-lmpi"
5727 > fi
5728  
5729 <  if test "$ac_success" = "yes"; then
5730 <     case $ac_foobar in
5731 <        foobar)
5732 <           ac_case=lower
5733 <           ac_foo_bar=foo_bar
5734 <           ;;
5735 <        FOOBAR)
5736 <           ac_case=upper
5737 <           ac_foo_bar=FOO_BAR
5738 <           ;;
5192 <     esac
5193 <
5194 <     ac_success_extra=no
5195 <     for ac_extra in "" "_"; do
5196 <        ac_func="$ac_foo_bar$ac_underscore$ac_extra"
5197 <
5198 <        cat >conftest.$ac_ext <<_ACEOF
5729 > fi
5730 > if test x = x"$MPI_LIB"; then
5731 >        echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
5732 > echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
5733 > if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
5734 >  echo $ECHO_N "(cached) $ECHO_C" >&6
5735 > else
5736 >  ac_check_lib_save_LIBS=$LIBS
5737 > LIBS="-lmpich  $LIBS"
5738 > cat >conftest.$ac_ext <<_ACEOF
5739   #line $LINENO "configure"
5740   /* confdefs.h.  */
5741   _ACEOF
# Line 5209 | Line 5749 | char $ac_func ();
5749   #endif
5750   /* We use char because int might match the return type of a gcc2
5751     builtin and then its argument prototype would still apply.  */
5752 < char $ac_func ();
5752 > char MPI_Init ();
5753   int
5754   main ()
5755   {
5756 < $ac_func ();
5756 > MPI_Init ();
5757    ;
5758    return 0;
5759   }
# Line 5230 | Line 5770 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5770    ac_status=$?
5771    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5772    (exit $ac_status); }; }; then
5773 <  ac_success_extra=yes; break
5773 >  ac_cv_lib_mpich_MPI_Init=yes
5774   else
5775    echo "$as_me: failed program was:" >&5
5776   sed 's/^/| /' conftest.$ac_ext >&5
5777  
5778 + ac_cv_lib_mpich_MPI_Init=no
5779   fi
5780   rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5781 <     done
5241 <
5242 <     if test "$ac_success_extra" = "yes"; then
5243 <        ac_cv_f90_mangling="$ac_case case"
5244 <        if test -z "$ac_underscore"; then
5245 <           ac_cv_f90_mangling="$ac_cv_f90_mangling, no underscore"
5246 <        else
5247 <           ac_cv_f90_mangling="$ac_cv_f90_mangling, underscore"
5248 <
5249 <        fi
5250 <        if test -z "$ac_extra"; then
5251 <           ac_cv_f90_mangling="$ac_cv_f90_mangling, no extra underscore"
5252 <        else
5253 <           ac_cv_f90_mangling="$ac_cv_f90_mangling, extra underscore"
5254 <        fi
5255 <      else
5256 <        ac_cv_f90_mangling="unknown"
5257 <      fi
5258 <  else
5259 <     ac_cv_f90_mangling="unknown"
5260 <
5261 <  fi
5262 <
5263 <  LIBS=$ac_save_LIBS
5264 <  ac_ext=f90
5265 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5266 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5267 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5268 <  rm -f cf90_test* conftest*
5269 < else
5270 <  echo "$as_me: failed program was:" >&5
5271 < sed 's/^/| /' conftest.$ac_ext >&5
5272 <
5781 > LIBS=$ac_check_lib_save_LIBS
5782   fi
5783 < rm -f conftest.$ac_objext conftest.$ac_ext
5784 < ac_ext=f90
5785 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5786 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5278 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5279 <
5783 > echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
5784 > echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
5785 > if test $ac_cv_lib_mpich_MPI_Init = yes; then
5786 >  MPI_LIB="-lmpich"
5787   fi
5281 echo "$as_me:$LINENO: result: $ac_cv_f90_mangling" >&5
5282 echo "${ECHO_T}$ac_cv_f90_mangling" >&6
5788  
5284
5285
5286 case $ac_cv_f90_mangling in
5287  "lower case, no underscore, no extra underscore")
5288          cat >>confdefs.h <<\_ACEOF
5289 #define F90_FUNC(name,NAME) name
5290 _ACEOF
5291
5292          cat >>confdefs.h <<\_ACEOF
5293 #define F90_FUNC_(name,NAME) name
5294 _ACEOF
5295 ;;
5296  "lower case, no underscore, extra underscore")
5297          cat >>confdefs.h <<\_ACEOF
5298 #define F90_FUNC(name,NAME) name
5299 _ACEOF
5300
5301          cat >>confdefs.h <<\_ACEOF
5302 #define F90_FUNC_(name,NAME) name ## _
5303 _ACEOF
5304 ;;
5305  "lower case, underscore, no extra underscore")
5306          cat >>confdefs.h <<\_ACEOF
5307 #define F90_FUNC(name,NAME) name ## _
5308 _ACEOF
5309
5310          cat >>confdefs.h <<\_ACEOF
5311 #define F90_FUNC_(name,NAME) name ## _
5312 _ACEOF
5313 ;;
5314  "lower case, underscore, extra underscore")
5315          cat >>confdefs.h <<\_ACEOF
5316 #define F90_FUNC(name,NAME) name ## _
5317 _ACEOF
5318
5319          cat >>confdefs.h <<\_ACEOF
5320 #define F90_FUNC_(name,NAME) name ## __
5321 _ACEOF
5322 ;;
5323  "upper case, no underscore, no extra underscore")
5324          cat >>confdefs.h <<\_ACEOF
5325 #define F90_FUNC(name,NAME) NAME
5326 _ACEOF
5327
5328          cat >>confdefs.h <<\_ACEOF
5329 #define F90_FUNC_(name,NAME) NAME
5330 _ACEOF
5331 ;;
5332  "upper case, no underscore, extra underscore")
5333          cat >>confdefs.h <<\_ACEOF
5334 #define F90_FUNC(name,NAME) NAME
5335 _ACEOF
5336
5337          cat >>confdefs.h <<\_ACEOF
5338 #define F90_FUNC_(name,NAME) NAME ## _
5339 _ACEOF
5340 ;;
5341  "upper case, underscore, no extra underscore")
5342          cat >>confdefs.h <<\_ACEOF
5343 #define F90_FUNC(name,NAME) NAME ## _
5344 _ACEOF
5345
5346          cat >>confdefs.h <<\_ACEOF
5347 #define F90_FUNC_(name,NAME) NAME ## _
5348 _ACEOF
5349 ;;
5350  "upper case, underscore, extra underscore")
5351          cat >>confdefs.h <<\_ACEOF
5352 #define F90_FUNC(name,NAME) NAME ## _
5353 _ACEOF
5354
5355          cat >>confdefs.h <<\_ACEOF
5356 #define F90_FUNC_(name,NAME) NAME ## __
5357 _ACEOF
5358 ;;
5359  *)
5360          { echo "$as_me:$LINENO: WARNING: unknown Fortran 90 name-mangling scheme" >&5
5361 echo "$as_me: WARNING: unknown Fortran 90 name-mangling scheme" >&2;}
5362          ;;
5363 esac
5364
5365
5366
5367
5368 echo "$as_me:$LINENO: checking for mpi-directory" >&5
5369 echo $ECHO_N "checking for mpi-directory... $ECHO_C" >&6
5370
5371 # Check whether --with-mpi_dir or --without-mpi_dir was given.
5372 if test "${with_mpi_dir+set}" = set; then
5373  withval="$with_mpi_dir"
5374  MPI_DIR="$withval"
5375 else
5376  MPI_DIR="/usr/local"
5377 fi;
5378 echo "$as_me:$LINENO: result: $MPI_DIR" >&5
5379 echo "${ECHO_T}$MPI_DIR" >&6
5380
5381
5382 echo "$as_me:$LINENO: checking for mpi-lib-directory" >&5
5383 echo $ECHO_N "checking for mpi-lib-directory... $ECHO_C" >&6
5384
5385 # Check whether --with-mpi_libdir or --without-mpi_libdir was given.
5386 if test "${with_mpi_libdir+set}" = set; then
5387  withval="$with_mpi_libdir"
5388  MPI_LIBDIR="$withval"
5389 else
5390  MPI_LIBDIR="$MPI_DIR/lib"
5391 fi;
5392 echo "$as_me:$LINENO: result: $MPI_LIBDIR" >&5
5393 echo "${ECHO_T}$MPI_LIBDIR" >&6
5394
5395
5396 echo "$as_me:$LINENO: checking for mpi-inc-directory" >&5
5397 echo $ECHO_N "checking for mpi-inc-directory... $ECHO_C" >&6
5398
5399 # Check whether --with-mpi_inc or --without-mpi_inc was given.
5400 if test "${with_mpi_inc+set}" = set; then
5401  withval="$with_mpi_inc"
5402  MPI_INC="$withval"
5403 else
5404  MPI_INC="$MPI_DIR/include"
5405 fi;
5406 echo "$as_me:$LINENO: result: $MPI_INC" >&5
5407 echo "${ECHO_T}$MPI_INC" >&6
5408
5409
5410
5411 echo "$as_me:$LINENO: checking for MPI library" >&5
5412 echo $ECHO_N "checking for MPI library... $ECHO_C" >&6
5413 MPI_LIB=""
5414 case "$host" in
5415  *-ibm-aix*)
5416    echo "$as_me:$LINENO: checking whether to use signal-based MPI library" >&5
5417 echo $ECHO_N "checking whether to use signal-based MPI library... $ECHO_C" >&6
5418    echo "$as_me:$LINENO: result: $PACX_SIGNAL" >&5
5419 echo "${ECHO_T}$PACX_SIGNAL" >&6
5420    if test "x$PACX_SIGNAL" = "xyes" ; then
5421      if test -f "$MPI_LIBDIR/libmpi.a" ; then
5422        MPI_LIB="-lmpi"
5423      elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5424        MPI_LIB="-lmpi"
5425      elif test -f "$MPI_LIBDIR/libmpich.a" ; then
5426        MPI_LIB="-lmpich"
5427      else
5428        { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5
5429 echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;}
5430   { (exit 1); exit 1; }; }
5431      fi
5432    else
5433      if test -f "$MPI_LIBDIR/libmpi_r.a" ; then
5434         MPI_LIB="-lmpi_r"
5435      else
5436         { { echo "$as_me:$LINENO: error: libmpi_r not found; check path for MPI package..." >&5
5437 echo "$as_me: error: libmpi_r not found; check path for MPI package..." >&2;}
5438   { (exit 1); exit 1; }; }
5439      fi
5440    fi
5441    echo "$as_me:$LINENO: result: found $MPI_LIB" >&5
5442 echo "${ECHO_T}found $MPI_LIB" >&6
5443  ;;
5444  *)                             if test -f "$MPI_LIBDIR/libmpi.a" ; then
5445      MPI_LIB="-lmpi"
5446    elif test -f "$MPI_LIBDIR/libmpi.so" ; then
5447      MPI_LIB="-lmpi"
5448    elif test -f "$MPI_LIBDIR/libmpich.a" ; then
5449      MPI_LIB="-lmpich"
5450    else
5451      { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5
5452 echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;}
5453   { (exit 1); exit 1; }; }
5454    fi
5455    echo "$as_me:$LINENO: result: found $MPI_LIB" >&5
5456 echo "${ECHO_T}found $MPI_LIB" >&6
5457  ;;
5458 esac
5459
5460
5461
5462
5463
5464
5465
5466        for ac_prog in mpif90 hf90 mpxlf90 mpf90 mpxlf95 mpxlf_r
5467 do
5468  # Extract the first word of "$ac_prog", so it can be a program name with args.
5469 set dummy $ac_prog; ac_word=$2
5470 echo "$as_me:$LINENO: checking for $ac_word" >&5
5471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5472 if test "${ac_cv_prog_MPIF90+set}" = set; then
5473  echo $ECHO_N "(cached) $ECHO_C" >&6
5474 else
5475  if test -n "$MPIF90"; then
5476  ac_cv_prog_MPIF90="$MPIF90" # Let the user override the test.
5477 else
5478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5479 for as_dir in $PATH
5480 do
5481  IFS=$as_save_IFS
5482  test -z "$as_dir" && as_dir=.
5483  for ac_exec_ext in '' $ac_executable_extensions; do
5484  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5485    ac_cv_prog_MPIF90="$ac_prog"
5486    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5487    break 2
5488  fi
5489 done
5490 done
5491
5789   fi
5790 < fi
5791 < MPIF90=$ac_cv_prog_MPIF90
5495 < if test -n "$MPIF90"; then
5496 <  echo "$as_me:$LINENO: result: $MPIF90" >&5
5497 < echo "${ECHO_T}$MPIF90" >&6
5498 < else
5499 <  echo "$as_me:$LINENO: result: no" >&5
5500 < echo "${ECHO_T}no" >&6
5501 < fi
5502 <
5503 <  test -n "$MPIF90" && break
5504 < done
5505 < test -n "$MPIF90" || MPIF90="$F90"
5506 <
5507 <        acx_mpi_save_F90="$F90"
5508 <        F90="$MPIF90"
5509 <
5510 <
5511 <
5512 < if test x = x"$MPILIBS"; then
5513 <        echo "$as_me:$LINENO: checking for MPI_Init" >&5
5514 < echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6
5515 <                        cat >conftest.$ac_ext <<_ACEOF
5516 <
5517 < program main
5518 <
5519 <      call MPI_Init
5520 < end program main
5521 <
5522 < _ACEOF
5523 < rm -f conftest.$ac_objext conftest$ac_exeext
5524 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5525 <  (eval $ac_link) 2>&5
5526 <  ac_status=$?
5527 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5528 <  (exit $ac_status); } &&
5529 <         { ac_try='test -s conftest$ac_exeext'
5530 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5531 <  (eval $ac_try) 2>&5
5532 <  ac_status=$?
5533 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5534 <  (exit $ac_status); }; }; then
5535 <  MPILIBS=" "
5536 <                                echo "$as_me:$LINENO: result: yes" >&5
5537 < echo "${ECHO_T}yes" >&6
5538 < else
5539 <  echo "$as_me: failed program was:" >&5
5540 < sed 's/^/| /' conftest.$ac_ext >&5
5541 <
5542 < echo "$as_me:$LINENO: result: no" >&5
5543 < echo "${ECHO_T}no" >&6
5544 < fi
5545 < rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5546 < fi
5547 < if test x = x"$MPILIBS"; then
5790 > $as_unset ac_cv_lib_mpi_MPI_Init
5791 > if test x = x"$MPI_LIB"; then
5792          echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5793   echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
5794   if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
5795    echo $ECHO_N "(cached) $ECHO_C" >&6
5796   else
5797    ac_check_lib_save_LIBS=$LIBS
5798 < LIBS="-lmpi  $LIBS"
5798 > LIBS="-lmpi "-llam" $LIBS"
5799   cat >conftest.$ac_ext <<_ACEOF
5800 + #line $LINENO "configure"
5801 + /* confdefs.h.  */
5802 + _ACEOF
5803 + cat confdefs.h >>conftest.$ac_ext
5804 + cat >>conftest.$ac_ext <<_ACEOF
5805 + /* end confdefs.h.  */
5806  
5807 < program main
5808 <
5809 < call MPI_Init
5810 < end program main
5811 <
5807 > /* Override any gcc2 internal prototype to avoid an error.  */
5808 > #ifdef __cplusplus
5809 > extern "C"
5810 > #endif
5811 > /* We use char because int might match the return type of a gcc2
5812 >   builtin and then its argument prototype would still apply.  */
5813 > char MPI_Init ();
5814 > int
5815 > main ()
5816 > {
5817 > MPI_Init ();
5818 >  ;
5819 >  return 0;
5820 > }
5821   _ACEOF
5822   rm -f conftest.$ac_objext conftest$ac_exeext
5823   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 5585 | Line 5844 | if test $ac_cv_lib_mpi_MPI_Init = yes; then
5844   echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5845   echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5846   if test $ac_cv_lib_mpi_MPI_Init = yes; then
5847 <  MPILIBS="-lmpi"
5847 >  MPI_LIB="-lmpi -llam"
5848   fi
5849  
5850   fi
5851 < if test x = x"$MPILIBS"; then
5852 <        echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
5853 < echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
5854 < if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
5851 >
5852 > $as_unset ac_cv_lib_mpi_MPI_Init
5853 > if test x = x"$MPI_LIB"; then
5854 > echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
5855 > echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
5856 > if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
5857    echo $ECHO_N "(cached) $ECHO_C" >&6
5858   else
5859    ac_check_lib_save_LIBS=$LIBS
5860 < LIBS="-lmpich  $LIBS"
5860 > LIBS="-lmpi -llam -lpthread $LIBS"
5861   cat >conftest.$ac_ext <<_ACEOF
5862 + #line $LINENO "configure"
5863 + /* confdefs.h.  */
5864 + _ACEOF
5865 + cat confdefs.h >>conftest.$ac_ext
5866 + cat >>conftest.$ac_ext <<_ACEOF
5867 + /* end confdefs.h.  */
5868  
5869 < program main
5870 <
5871 < call MPI_Init
5872 < end program main
5873 <
5869 > /* Override any gcc2 internal prototype to avoid an error.  */
5870 > #ifdef __cplusplus
5871 > extern "C"
5872 > #endif
5873 > /* We use char because int might match the return type of a gcc2
5874 >   builtin and then its argument prototype would still apply.  */
5875 > char MPI_Init ();
5876 > int
5877 > main ()
5878 > {
5879 > MPI_Init ();
5880 >  ;
5881 >  return 0;
5882 > }
5883   _ACEOF
5884   rm -f conftest.$ac_objext conftest$ac_exeext
5885   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# Line 5617 | Line 5893 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5893    ac_status=$?
5894    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895    (exit $ac_status); }; }; then
5896 <  ac_cv_lib_mpich_MPI_Init=yes
5896 >  ac_cv_lib_mpi_MPI_Init=yes
5897   else
5898    echo "$as_me: failed program was:" >&5
5899   sed 's/^/| /' conftest.$ac_ext >&5
5900  
5901 < ac_cv_lib_mpich_MPI_Init=no
5901 > ac_cv_lib_mpi_MPI_Init=no
5902   fi
5903   rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5904   LIBS=$ac_check_lib_save_LIBS
5905   fi
5906 < echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
5907 < echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
5908 < if test $ac_cv_lib_mpich_MPI_Init = yes; then
5909 <  MPILIBS="-lmpich"
5906 > echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
5907 > echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
5908 > if test $ac_cv_lib_mpi_MPI_Init = yes; then
5909 >  MPI_LIB="-lmpi -llam -lpthread"
5910 > else
5911 >
5912 >             { { echo "$as_me:$LINENO: error: Didn't find liblam, libmpi, or libmpich; check path for MPI package first..." >&5
5913 > echo "$as_me: error: Didn't find liblam, libmpi, or libmpich; check path for MPI package first..." >&2;}
5914 >   { (exit 1); exit 1; }; }
5915 >             USE_MPI="no"
5916 >
5917   fi
5918  
5919   fi
5920  
5921  
5922  
5923 < F90="$acx_mpi_save_F90"
5924 <
5925 <
5926 <
5927 < # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
5928 < if test x = x"$MPILIBS"; then
5929 <
5647 <        :
5923 > echo "$as_me:$LINENO: checking for MPI Fortran library" >&5
5924 > echo $ECHO_N "checking for MPI Fortran library... $ECHO_C" >&6
5925 > MPI_F90_LIB=""
5926 > if test -f "$MPI_LIB_DIR/libfmpich.a" ; then
5927 >        MPI_F90_LIB="-lfmpich"
5928 > elif test -f "$MPI_LIB_DIR/liblamf77mpi.a" ; then
5929 >        MPI_F90_LIB="-llamf77mpi"
5930   else
5931 +                        MPI_F90_LIB="  "
5932 + fi
5933 + echo "$as_me:$LINENO: result: found $MPI_F90_LIB" >&5
5934 + echo "${ECHO_T}found $MPI_F90_LIB" >&6
5935  
5936 < cat >>confdefs.h <<\_ACEOF
5651 < #define HAVE_MPI 1
5652 < _ACEOF
5653 <
5654 <        :
5936 >
5937   fi
5938  
5939  
5940 +
5941   ac_ext=c
5942   ac_cpp='$CPP $CPPFLAGS'
5943   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
# Line 6401 | Line 6684 | fi
6684  
6685    CPPFLAGS=$ac_save_CPPFLAGS
6686    LDFLAGS=$ac_save_LDFLAGS
6687 <  ac_ext=f90
6688 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6689 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6690 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6687 >  ac_ext=c
6688 > ac_cpp='$CPP $CPPFLAGS'
6689 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6690 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6691 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
6692  
6693  
6694    if test x_$HAVE_SPRNG != x_yes; then
# Line 6425 | Line 6709 | echo "${ECHO_T}yes" >&6
6709    withval="$with_mkl"
6710       echo "$as_me:$LINENO: result: yes" >&5
6711   echo "${ECHO_T}yes" >&6
6712 <    for dir in $withval /usr/local/intel/mkl60 /opt/intel/mkl60; do
6712 >    for dir in $withval /usr/local/intel/mkl61 /opt/intel/mkl61; do
6713          mkldir="$dir"
6714          if test -f "$dir/include/mkl.h"; then
6715              found_mkl="yes";
# Line 6651 | Line 6935 | fi
6935  
6936    CPPFLAGS=$ac_save_CPPFLAGS
6937    LDFLAGS=$ac_save_LDFLAGS
6938 <  ac_ext=f90
6939 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6940 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6941 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6938 >  ac_ext=c
6939 > ac_cpp='$CPP $CPPFLAGS'
6940 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6941 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6942 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
6943  
6944  
6945    if test x_$HAVE_MKL != x_yes; then
# Line 6673 | Line 6958 | fi;
6958   echo "${ECHO_T}no" >&6
6959  
6960   fi;
6676
6677
6678
6679
6680 # Check whether --with-mpi_f90_mods or --without-mpi_f90_mods was given.
6681 if test "${with_mpi_f90_mods+set}" = set; then
6682  withval="$with_mpi_f90_mods"
6683  mpi_f90_mods="$withval"
6684 else
6685  mpi_f90_mods="/usr/local/include/f90choice"
6686 fi;
6687
6688  echo "$as_me:$LINENO: checking for MPI F90 modules" >&5
6689 echo $ECHO_N "checking for MPI F90 modules... $ECHO_C" >&6
6690
6691
6692  ac_ext=f90
6693 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6694 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6695 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6696
6697  ac_save_F90FLAGS=$F90FLAGS
6698  if test "$mpi_f90_mods"; then
6699  F90FLAGS="${F90FLAGS} -I${mpi_f90_mods}"
6700 fi
6961  
6702    cat >conftest.$ac_ext <<_ACEOF
6962  
6963  
6705 program main
6964  
6707 use mpi
6708 integer :: ierr
6709 call MPI_Init(ierr)
6965  
6711
6712 end program main
6713
6714 _ACEOF
6715 rm -f conftest.$ac_objext
6716 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6717  (eval $ac_compile) 2>&5
6718  ac_status=$?
6719  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6720  (exit $ac_status); } &&
6721         { ac_try='test -s conftest.$ac_objext'
6722  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6723  (eval $ac_try) 2>&5
6724  ac_status=$?
6725  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6726  (exit $ac_status); }; }; then
6727  HAVE_MPI_MOD=1
6728 else
6729  echo "$as_me: failed program was:" >&5
6730 sed 's/^/| /' conftest.$ac_ext >&5
6731
6732 HAVE_MPI_MOD=0
6733 fi
6734 rm -f conftest.$ac_objext conftest.$ac_ext
6735
6736  F90FLAGS=$ac_save_F90FLAGS
6737  ac_ext=f90
6738 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
6739 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6740 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6741
6742
6743  if test "$HAVE_MPI_MOD" = 1; then
6744    echo "$as_me:$LINENO: result: yes" >&5
6745 echo "${ECHO_T}yes" >&6
6746
6747 cat >>confdefs.h <<\_ACEOF
6748 #define MPI_MOD 1
6749 _ACEOF
6750
6751    MPI_F90_MODS="-I${mpi_f90_mods}"
6752
6753    # The library name:
6754    if test -z "$MPI_LIB" ; then
6755       MPI_LIBNAME=-lmpich
6756    else
6757       MPI_LIBNAME="$MPI_LIB"
6758    fi
6759    if test -z "$MPIMODLIBNAME" ; then
6760       MPIMODLIBNAME="${MPI_LIBNAME}f90"
6761    fi
6762
6763  else
6764    echo "$as_me:$LINENO: result: no" >&5
6765 echo "${ECHO_T}no" >&6
6766    { { echo "$as_me:$LINENO: error: Couldn't locate MPI F90 Modules" >&5
6767 echo "$as_me: error: Couldn't locate MPI F90 Modules" >&2;}
6768   { (exit 1); exit 1; }; }
6769  fi
6770
6771
6772
6773
6774
6966   OBJEXT=".$OBJEXT"
6967  
6968   OOPSE=oopse
# Line 6795 | Line 6986 | SUBDIRS="libBASS libmdtools src forceFields samples ut
6986  
6987   MKINSTALLDIRS=`pwd`/ac-tools/"shtool mkdir -p -f"
6988  
6989 < SUBDIRS="libBASS libmdtools src forceFields samples utils utils/sysbuilder staticProps"
6989 > SUBDIRS="libBASS libmdtools src forceFields samples utils utils/sysbuilder staticProps third-party "
6990  
6991   CFLAGS=${CFLAGS-""}
6992   CXXFLAGS=${CXXFLAGS-""}
# Line 6803 | Line 6994 | OPTIMIZE=${OPTIMIZE-"-O"}
6994   FFLAGS=${FFLAGS-""}
6995   F90FLAGS=${F90FLAGS-""}
6996   LDFLAGS=${LDFLAGS-""}
6806 OPTIMIZE=${OPTIMIZE-"-O"}
6997   DEBUG=${DEBUG-"-g"}
6998  
6999   case $debug in
7000 <  true)
6811 <     CFLAGS="$DEBUG $CFLAGS"
6812 <     CXXFLAGS="$DEBUG $CXXFLAGS"
7000 >  1)
7001       FFLAGS="$DEBUG $FFLAGS"
7002       F90FLAGS="$DEBUG $F90FLAGS"
7003       ;;
7004    *)
6817     CFLAGS="$OPTIMIZE $CFLAGS"
6818     CXXFLAGS="$OPTIMIZE $CXXFLAGS"
6819     FFLAGS="$OPTIMIZE $FFLAGS"
6820     F90FLAGS="$OPTIMIZE $F90FLAGS"
7005       ;;
7006   esac
7007  
# Line 6837 | Line 7021 | esac
7021  
7022  
7023  
7024 <          ac_config_headers="$ac_config_headers libmdtools/config.h"
7024 >                    ac_config_headers="$ac_config_headers libBASS/config.h libmdtools/config.h"
7025  
7026 <                                                                                                                                                      ac_config_files="$ac_config_files Makefile libBASS/Makefile libmdtools/Makefile src/Makefile utils/Makefile utils/sysbuilder/Makefile forceFields/Makefile samples/Makefile staticProps/Makefile samples/alkane/Makefile samples/argon/Makefile samples/beadLipid/Makefile samples/lipid/Makefile samples/metals/Makefile samples/water/Makefile"
7026 >                                                                                                                                                                ac_config_files="$ac_config_files Makefile libBASS/Makefile libmdtools/Makefile src/Makefile utils/Makefile utils/sysbuilder/Makefile forceFields/Makefile samples/Makefile staticProps/Makefile third-party/Makefile samples/alkane/Makefile samples/argon/Makefile samples/beadLipid/Makefile samples/lipid/Makefile samples/metals/Makefile samples/water/Makefile"
7027  
7028  
7029   cat >confcache <<\_ACEOF
# Line 7375 | Line 7559 | do
7559    "forceFields/Makefile" ) CONFIG_FILES="$CONFIG_FILES forceFields/Makefile" ;;
7560    "samples/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;;
7561    "staticProps/Makefile" ) CONFIG_FILES="$CONFIG_FILES staticProps/Makefile" ;;
7562 +  "third-party/Makefile" ) CONFIG_FILES="$CONFIG_FILES third-party/Makefile" ;;
7563    "samples/alkane/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/alkane/Makefile" ;;
7564    "samples/argon/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/argon/Makefile" ;;
7565    "samples/beadLipid/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/beadLipid/Makefile" ;;
7566    "samples/lipid/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/lipid/Makefile" ;;
7567    "samples/metals/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/metals/Makefile" ;;
7568    "samples/water/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/water/Makefile" ;;
7569 +  "libBASS/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS libBASS/config.h" ;;
7570    "libmdtools/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS libmdtools/config.h" ;;
7571    *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
7572   echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
# Line 7467 | Line 7653 | s,@DEBUG@,$DEBUG,;t t
7653   s,@ECHO_T@,$ECHO_T,;t t
7654   s,@LIBS@,$LIBS,;t t
7655   s,@PROGNAME@,$PROGNAME,;t t
7656 < s,@DEBUG@,$DEBUG,;t t
7656 > s,@debug@,$debug,;t t
7657   s,@build@,$build,;t t
7658   s,@build_cpu@,$build_cpu,;t t
7659   s,@build_vendor@,$build_vendor,;t t
# Line 7486 | Line 7672 | s,@F90@,$F90,;t t
7672   s,@CXX@,$CXX,;t t
7673   s,@CXXFLAGS@,$CXXFLAGS,;t t
7674   s,@ac_ct_CXX@,$ac_ct_CXX,;t t
7675 + s,@OOPSE_TEMPLATE_FLAGS@,$OOPSE_TEMPLATE_FLAGS,;t t
7676 + s,@EXTRA_CC_FLAG@,$EXTRA_CC_FLAG,;t t
7677   s,@F90@,$F90,;t t
7678   s,@F90FLAGS@,$F90FLAGS,;t t
7679   s,@ac_ct_F90@,$ac_ct_F90,;t t
7680   s,@PREPFLAG@,$PREPFLAG,;t t
7681   s,@PREPDEFFLAG@,$PREPDEFFLAG,;t t
7682 + s,@F90LIBS@,$F90LIBS,;t t
7683 + s,@F90_FUNC@,$F90_FUNC,;t t
7684 + s,@F90_FUNC_@,$F90_FUNC_,;t t
7685 + s,@MOD@,$MOD,;t t
7686 + s,@F90_WORK_FILES_ARG@,$F90_WORK_FILES_ARG,;t t
7687 + s,@MODDIRFLAG@,$MODDIRFLAG,;t t
7688 + s,@F90MODINCSPEC@,$F90MODINCSPEC,;t t
7689   s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
7690   s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
7691   s,@INSTALL_DATA@,$INSTALL_DATA,;t t
# Line 7503 | Line 7698 | s,@F90LIBS@,$F90LIBS,;t t
7698   s,@LEXLIB@,$LEXLIB,;t t
7699   s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
7700   s,@AR@,$AR,;t t
7701 < s,@F90LIBS@,$F90LIBS,;t t
7702 < s,@F90_FUNC@,$F90_FUNC,;t t
7703 < s,@F90_FUNC_@,$F90_FUNC_,;t t
7509 < s,@mpi_dir@,$mpi_dir,;t t
7510 < s,@MPI_LIBDIR@,$MPI_LIBDIR,;t t
7511 < s,@MPI_INC@,$MPI_INC,;t t
7701 > s,@MPI_LIB_DIR@,$MPI_LIB_DIR,;t t
7702 > s,@MPI_INC_DIR@,$MPI_INC_DIR,;t t
7703 > s,@MPI_F90_INC@,$MPI_F90_INC,;t t
7704   s,@MPI_LIB@,$MPI_LIB,;t t
7705 < s,@MPIF77@,$MPIF77,;t t
7706 < s,@MPIF90@,$MPIF90,;t t
7515 < s,@MPILIBS@,$MPILIBS,;t t
7705 > s,@MPI_F90_LIB@,$MPI_F90_LIB,;t t
7706 > s,@USE_MPI@,$USE_MPI,;t t
7707   s,@CPP@,$CPP,;t t
7708   s,@EGREP@,$EGREP,;t t
7709   s,@SPRNG_LIBDIR@,$SPRNG_LIBDIR,;t t
# Line 7523 | Line 7714 | s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t
7714   s,@MKL_LIB@,$MKL_LIB,;t t
7715   s,@MKL_INC@,$MKL_INC,;t t
7716   s,@HAVE_MKL@,$HAVE_MKL,;t t
7526 s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t
7527 s,@MPIMODLIBNAME@,$MPIMODLIBNAME,;t t
7717   s,@BATEXT@,$BATEXT,;t t
7718   s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
7719   s,@OOPSE@,$OOPSE,;t t

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines