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 838 by gezelter, Wed Oct 29 03:06:51 2003 UTC

# Line 311 | Line 311 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKA
311   # include <unistd.h>
312   #endif"
313  
314 < ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PROGNAME DEBUG build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX F90 F90FLAGS ac_ct_F90 PREPFLAG PREPDEFFLAG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT AR F90LIBS F90_FUNC F90_FUNC_ 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 F90 F90FLAGS ac_ct_F90 PREPFLAG PREPDEFFLAG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT AR F90LIBS F90_FUNC F90_FUNC_ MOD F90_WORK_FILES_ARG MODDIRFLAG F90MODINCSPEC mpi_dir MPI_LIBDIR MPI_INC MPI_LIB MPIF77 MPIF90 MPILIBS CPP EGREP SPRNG_LIBDIR SPRNG_LIB SPRNG_INC HAVE_SPRNG MKL_LIBDIR MKL_LIB MKL_INC HAVE_MKL MPI_F90_MODS MPIMODLIBNAME BATEXT MKINSTALLDIRS OOPSE OOPSE_HOME SUBDIRS FFLAGS LIBOBJS LTLIBOBJS'
315   ac_subst_files=''
316  
317   # Initialize some variables set by options.
# Line 1828 | Line 1828 | ac_configure="$SHELL $ac_aux_dir/configure" # This sho
1828  
1829  
1830  
1831 # what should I build?
1831  
1832 < # Check whether --enable-debug or --disable-debug was given.
1833 < if test "${enable_debug+set}" = set; then
1834 <  enableval="$enable_debug"
1835 <  DEBUG=1
1836 < fi;
1832 >
1833 >
1834 >
1835 >
1836 >
1837  
1838 +
1839   # set program name
1840   PROGNAME="oopse"
1841  
1842  
1843 + # there are two ways to do debugging.  One with the --enable-debug flag
1844 + # and one using the DEBUG environment variable
1845 +
1846 + debug=0
1847 + # Check whether --enable-debug or --disable-debug was given.
1848 + if test "${enable_debug+set}" = set; then
1849 +  enableval="$enable_debug"
1850 +  debug=1
1851 + fi;
1852   if test "${DEBUG}"; then
1853  
1854   cat >>confdefs.h <<\_ACEOF
1855 < #define DEBUG 1
1855 > #define debug 1
1856   _ACEOF
1857  
1858    msg="$msg, debug mode"
# Line 2457 | Line 2466 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2466    echo "$as_me:$LINENO: \$? = $ac_status" >&5
2467    (exit $ac_status); }; }; then
2468    for ac_declaration in \
2469 +   ''\
2470 +   '#include <stdlib.h>' \
2471 +   'extern "C" void std::exit (int) throw (); using std::exit;' \
2472 +   'extern "C" void std::exit (int); using std::exit;' \
2473 +   'extern "C" void exit (int) throw ();' \
2474 +   'extern "C" void exit (int);' \
2475 +   'void exit (int);'
2476 + do
2477 +  cat >conftest.$ac_ext <<_ACEOF
2478 + #line $LINENO "configure"
2479 + /* confdefs.h.  */
2480 + _ACEOF
2481 + cat confdefs.h >>conftest.$ac_ext
2482 + cat >>conftest.$ac_ext <<_ACEOF
2483 + /* end confdefs.h.  */
2484 + #include <stdlib.h>
2485 + $ac_declaration
2486 + int
2487 + main ()
2488 + {
2489 + exit (42);
2490 +  ;
2491 +  return 0;
2492 + }
2493 + _ACEOF
2494 + rm -f conftest.$ac_objext
2495 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2496 +  (eval $ac_compile) 2>&5
2497 +  ac_status=$?
2498 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2499 +  (exit $ac_status); } &&
2500 +         { ac_try='test -s conftest.$ac_objext'
2501 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2502 +  (eval $ac_try) 2>&5
2503 +  ac_status=$?
2504 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2505 +  (exit $ac_status); }; }; then
2506 +  :
2507 + else
2508 +  echo "$as_me: failed program was:" >&5
2509 + sed 's/^/| /' conftest.$ac_ext >&5
2510 +
2511 + continue
2512 + fi
2513 + rm -f conftest.$ac_objext conftest.$ac_ext
2514 +  cat >conftest.$ac_ext <<_ACEOF
2515 + #line $LINENO "configure"
2516 + /* confdefs.h.  */
2517 + _ACEOF
2518 + cat confdefs.h >>conftest.$ac_ext
2519 + cat >>conftest.$ac_ext <<_ACEOF
2520 + /* end confdefs.h.  */
2521 + $ac_declaration
2522 + int
2523 + main ()
2524 + {
2525 + exit (42);
2526 +  ;
2527 +  return 0;
2528 + }
2529 + _ACEOF
2530 + rm -f conftest.$ac_objext
2531 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2532 +  (eval $ac_compile) 2>&5
2533 +  ac_status=$?
2534 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2535 +  (exit $ac_status); } &&
2536 +         { ac_try='test -s conftest.$ac_objext'
2537 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2538 +  (eval $ac_try) 2>&5
2539 +  ac_status=$?
2540 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2541 +  (exit $ac_status); }; }; then
2542 +  break
2543 + else
2544 +  echo "$as_me: failed program was:" >&5
2545 + sed 's/^/| /' conftest.$ac_ext >&5
2546 +
2547 + fi
2548 + rm -f conftest.$ac_objext conftest.$ac_ext
2549 + done
2550 + rm -f conftest*
2551 + if test -n "$ac_declaration"; then
2552 +  echo '#ifdef __cplusplus' >>confdefs.h
2553 +  echo $ac_declaration      >>confdefs.h
2554 +  echo '#endif'             >>confdefs.h
2555 + fi
2556 +
2557 + else
2558 +  echo "$as_me: failed program was:" >&5
2559 + sed 's/^/| /' conftest.$ac_ext >&5
2560 +
2561 + fi
2562 + rm -f conftest.$ac_objext conftest.$ac_ext
2563 + ac_ext=c
2564 + ac_cpp='$CPP $CPPFLAGS'
2565 + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2566 + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2567 + ac_compiler_gnu=$ac_cv_c_compiler_gnu
2568 +
2569 + ac_ext=cc
2570 + ac_cpp='$CXXCPP $CPPFLAGS'
2571 + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2572 + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2573 + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2574 + if test -n "$ac_tool_prefix"; then
2575 +  for ac_prog in $CCC icpc icc xlC CC g++ c++
2576 +  do
2577 +    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2578 + set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2579 + echo "$as_me:$LINENO: checking for $ac_word" >&5
2580 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2581 + if test "${ac_cv_prog_CXX+set}" = set; then
2582 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2583 + else
2584 +  if test -n "$CXX"; then
2585 +  ac_cv_prog_CXX="$CXX" # Let the user override the test.
2586 + else
2587 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2588 + for as_dir in $PATH
2589 + do
2590 +  IFS=$as_save_IFS
2591 +  test -z "$as_dir" && as_dir=.
2592 +  for ac_exec_ext in '' $ac_executable_extensions; do
2593 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2594 +    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2595 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2596 +    break 2
2597 +  fi
2598 + done
2599 + done
2600 +
2601 + fi
2602 + fi
2603 + CXX=$ac_cv_prog_CXX
2604 + if test -n "$CXX"; then
2605 +  echo "$as_me:$LINENO: result: $CXX" >&5
2606 + echo "${ECHO_T}$CXX" >&6
2607 + else
2608 +  echo "$as_me:$LINENO: result: no" >&5
2609 + echo "${ECHO_T}no" >&6
2610 + fi
2611 +
2612 +    test -n "$CXX" && break
2613 +  done
2614 + fi
2615 + if test -z "$CXX"; then
2616 +  ac_ct_CXX=$CXX
2617 +  for ac_prog in $CCC icpc icc xlC CC g++ c++
2618 + do
2619 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
2620 + set dummy $ac_prog; ac_word=$2
2621 + echo "$as_me:$LINENO: checking for $ac_word" >&5
2622 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2623 + if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2624 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2625 + else
2626 +  if test -n "$ac_ct_CXX"; then
2627 +  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2628 + else
2629 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2630 + for as_dir in $PATH
2631 + do
2632 +  IFS=$as_save_IFS
2633 +  test -z "$as_dir" && as_dir=.
2634 +  for ac_exec_ext in '' $ac_executable_extensions; do
2635 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2636 +    ac_cv_prog_ac_ct_CXX="$ac_prog"
2637 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2638 +    break 2
2639 +  fi
2640 + done
2641 + done
2642 +
2643 + fi
2644 + fi
2645 + ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2646 + if test -n "$ac_ct_CXX"; then
2647 +  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
2648 + echo "${ECHO_T}$ac_ct_CXX" >&6
2649 + else
2650 +  echo "$as_me:$LINENO: result: no" >&5
2651 + echo "${ECHO_T}no" >&6
2652 + fi
2653 +
2654 +  test -n "$ac_ct_CXX" && break
2655 + done
2656 + test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2657 +
2658 +  CXX=$ac_ct_CXX
2659 + fi
2660 +
2661 +
2662 + # Provide some information about the compiler.
2663 + echo "$as_me:$LINENO:" \
2664 +     "checking for C++ compiler version" >&5
2665 + ac_compiler=`set X $ac_compile; echo $2`
2666 + { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2667 +  (eval $ac_compiler --version </dev/null >&5) 2>&5
2668 +  ac_status=$?
2669 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2670 +  (exit $ac_status); }
2671 + { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2672 +  (eval $ac_compiler -v </dev/null >&5) 2>&5
2673 +  ac_status=$?
2674 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2675 +  (exit $ac_status); }
2676 + { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2677 +  (eval $ac_compiler -V </dev/null >&5) 2>&5
2678 +  ac_status=$?
2679 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2680 +  (exit $ac_status); }
2681 +
2682 + echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
2683 + echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2684 + if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2685 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2686 + else
2687 +  cat >conftest.$ac_ext <<_ACEOF
2688 + #line $LINENO "configure"
2689 + /* confdefs.h.  */
2690 + _ACEOF
2691 + cat confdefs.h >>conftest.$ac_ext
2692 + cat >>conftest.$ac_ext <<_ACEOF
2693 + /* end confdefs.h.  */
2694 +
2695 + int
2696 + main ()
2697 + {
2698 + #ifndef __GNUC__
2699 +       choke me
2700 + #endif
2701 +
2702 +  ;
2703 +  return 0;
2704 + }
2705 + _ACEOF
2706 + rm -f conftest.$ac_objext
2707 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2708 +  (eval $ac_compile) 2>&5
2709 +  ac_status=$?
2710 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2711 +  (exit $ac_status); } &&
2712 +         { ac_try='test -s conftest.$ac_objext'
2713 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2714 +  (eval $ac_try) 2>&5
2715 +  ac_status=$?
2716 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2717 +  (exit $ac_status); }; }; then
2718 +  ac_compiler_gnu=yes
2719 + else
2720 +  echo "$as_me: failed program was:" >&5
2721 + sed 's/^/| /' conftest.$ac_ext >&5
2722 +
2723 + ac_compiler_gnu=no
2724 + fi
2725 + rm -f conftest.$ac_objext conftest.$ac_ext
2726 + ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2727 +
2728 + fi
2729 + echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
2730 + echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2731 + GXX=`test $ac_compiler_gnu = yes && echo yes`
2732 + ac_test_CXXFLAGS=${CXXFLAGS+set}
2733 + ac_save_CXXFLAGS=$CXXFLAGS
2734 + CXXFLAGS="-g"
2735 + echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
2736 + echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2737 + if test "${ac_cv_prog_cxx_g+set}" = set; then
2738 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2739 + else
2740 +  cat >conftest.$ac_ext <<_ACEOF
2741 + #line $LINENO "configure"
2742 + /* confdefs.h.  */
2743 + _ACEOF
2744 + cat confdefs.h >>conftest.$ac_ext
2745 + cat >>conftest.$ac_ext <<_ACEOF
2746 + /* end confdefs.h.  */
2747 +
2748 + int
2749 + main ()
2750 + {
2751 +
2752 +  ;
2753 +  return 0;
2754 + }
2755 + _ACEOF
2756 + rm -f conftest.$ac_objext
2757 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2758 +  (eval $ac_compile) 2>&5
2759 +  ac_status=$?
2760 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2761 +  (exit $ac_status); } &&
2762 +         { ac_try='test -s conftest.$ac_objext'
2763 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2764 +  (eval $ac_try) 2>&5
2765 +  ac_status=$?
2766 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2767 +  (exit $ac_status); }; }; then
2768 +  ac_cv_prog_cxx_g=yes
2769 + else
2770 +  echo "$as_me: failed program was:" >&5
2771 + sed 's/^/| /' conftest.$ac_ext >&5
2772 +
2773 + ac_cv_prog_cxx_g=no
2774 + fi
2775 + rm -f conftest.$ac_objext conftest.$ac_ext
2776 + fi
2777 + echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
2778 + echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2779 + if test "$ac_test_CXXFLAGS" = set; then
2780 +  CXXFLAGS=$ac_save_CXXFLAGS
2781 + elif test $ac_cv_prog_cxx_g = yes; then
2782 +  if test "$GXX" = yes; then
2783 +    CXXFLAGS="-g -O2"
2784 +  else
2785 +    CXXFLAGS="-g"
2786 +  fi
2787 + else
2788 +  if test "$GXX" = yes; then
2789 +    CXXFLAGS="-O2"
2790 +  else
2791 +    CXXFLAGS=
2792 +  fi
2793 + fi
2794 + for ac_declaration in \
2795     ''\
2796     '#include <stdlib.h>' \
2797     'extern "C" void std::exit (int) throw (); using std::exit;' \
# Line 2543 | Line 2878 | fi
2878    echo '#ifdef __cplusplus' >>confdefs.h
2879    echo $ac_declaration      >>confdefs.h
2880    echo '#endif'             >>confdefs.h
2881 + fi
2882 +
2883 + ac_ext=c
2884 + ac_cpp='$CPP $CPPFLAGS'
2885 + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2886 + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2887 + ac_compiler_gnu=$ac_cv_c_compiler_gnu
2888 +
2889 + ac_ext=f90
2890 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
2891 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2892 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
2893 + if test -n "$ac_tool_prefix"; then
2894 +  for ac_prog in ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2895 +  do
2896 +    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2897 + set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2898 + echo "$as_me:$LINENO: checking for $ac_word" >&5
2899 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2900 + if test "${ac_cv_prog_F90+set}" = set; then
2901 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2902 + else
2903 +  if test -n "$F90"; then
2904 +  ac_cv_prog_F90="$F90" # Let the user override the test.
2905 + else
2906 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2907 + for as_dir in $PATH
2908 + do
2909 +  IFS=$as_save_IFS
2910 +  test -z "$as_dir" && as_dir=.
2911 +  for ac_exec_ext in '' $ac_executable_extensions; do
2912 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2913 +    ac_cv_prog_F90="$ac_tool_prefix$ac_prog"
2914 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2915 +    break 2
2916 +  fi
2917 + done
2918 + done
2919 +
2920   fi
2921 + fi
2922 + F90=$ac_cv_prog_F90
2923 + if test -n "$F90"; then
2924 +  echo "$as_me:$LINENO: result: $F90" >&5
2925 + echo "${ECHO_T}$F90" >&6
2926 + else
2927 +  echo "$as_me:$LINENO: result: no" >&5
2928 + echo "${ECHO_T}no" >&6
2929 + fi
2930  
2931 +    test -n "$F90" && break
2932 +  done
2933 + fi
2934 + if test -z "$F90"; then
2935 +  ac_ct_F90=$F90
2936 +  for ac_prog in ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
2937 + do
2938 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
2939 + set dummy $ac_prog; ac_word=$2
2940 + echo "$as_me:$LINENO: checking for $ac_word" >&5
2941 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2942 + if test "${ac_cv_prog_ac_ct_F90+set}" = set; then
2943 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2944   else
2945 +  if test -n "$ac_ct_F90"; then
2946 +  ac_cv_prog_ac_ct_F90="$ac_ct_F90" # Let the user override the test.
2947 + else
2948 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2949 + for as_dir in $PATH
2950 + do
2951 +  IFS=$as_save_IFS
2952 +  test -z "$as_dir" && as_dir=.
2953 +  for ac_exec_ext in '' $ac_executable_extensions; do
2954 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2955 +    ac_cv_prog_ac_ct_F90="$ac_prog"
2956 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2957 +    break 2
2958 +  fi
2959 + done
2960 + done
2961 +
2962 + fi
2963 + fi
2964 + ac_ct_F90=$ac_cv_prog_ac_ct_F90
2965 + if test -n "$ac_ct_F90"; then
2966 +  echo "$as_me:$LINENO: result: $ac_ct_F90" >&5
2967 + echo "${ECHO_T}$ac_ct_F90" >&6
2968 + else
2969 +  echo "$as_me:$LINENO: result: no" >&5
2970 + echo "${ECHO_T}no" >&6
2971 + fi
2972 +
2973 +  test -n "$ac_ct_F90" && break
2974 + done
2975 +
2976 +  F90=$ac_ct_F90
2977 + fi
2978 +
2979 +
2980 + # If we don't use `.F90' as extension, the preprocessor is not run on the
2981 + # input file.
2982 + ac_save_ext=$ac_ext
2983 + ac_ext=F90
2984 + echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 90 compiler" >&5
2985 + echo $ECHO_N "checking whether we are using the GNU Fortran 90 compiler... $ECHO_C" >&6
2986 + if test "${ac_cv_f90_compiler_gnu+set}" = set; then
2987 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2988 + else
2989 +  cat >conftest.$ac_ext <<_ACEOF
2990 +
2991 + program main
2992 +
2993 + #ifndef __GNUC__
2994 +       choke me
2995 + #endif
2996 +
2997 + end program main
2998 +
2999 + _ACEOF
3000 + rm -f conftest.$ac_objext
3001 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3002 +  (eval $ac_compile) 2>&5
3003 +  ac_status=$?
3004 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3005 +  (exit $ac_status); } &&
3006 +         { ac_try='test -s conftest.$ac_objext'
3007 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3008 +  (eval $ac_try) 2>&5
3009 +  ac_status=$?
3010 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3011 +  (exit $ac_status); }; }; then
3012 +  ac_compiler_gnu=yes
3013 + else
3014    echo "$as_me: failed program was:" >&5
3015   sed 's/^/| /' conftest.$ac_ext >&5
3016  
3017 + ac_compiler_gnu=no
3018   fi
3019   rm -f conftest.$ac_objext conftest.$ac_ext
3020 + ac_cv_f90_compiler_gnu=$ac_compiler_gnu
3021 +
3022 + fi
3023 + echo "$as_me:$LINENO: result: $ac_cv_f90_compiler_gnu" >&5
3024 + echo "${ECHO_T}$ac_cv_f90_compiler_gnu" >&6
3025 + ac_ext=$ac_save_ext
3026 + G95=`test $ac_compiler_gnu = yes && echo yes`
3027   ac_ext=c
3028   ac_cpp='$CPP $CPPFLAGS'
3029   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
# Line 2561 | Line 3034 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
3034  
3035  
3036  
3037 + # Try to determine native compiler flags that allow us to use F90 suffix
3038 + # for preprocessed f90 source.
3039 +
3040 + if test "$ac_test_PREPFLAG" != "set"; then
3041 +  PREPFLAG=""
3042 +  case "${host_cpu}-${host_os}" in
3043 +
3044 +  *linux*) if test "$F90" = ifc; then
3045 +                    PREPFLAG="-fpp1 "
3046 +                fi;;
3047 +  *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
3048 +                    PREPFLAG="-qsuffix=cpp=F90 "
3049 +                fi;;
3050 +  *darwin*)
3051 +        if test "$F90" = f90 -o "$F90" = xlf90; then
3052 +                PREPFLAG="-qsuffix=cpp=F90 "
3053 +        fi;;
3054 +  esac
3055 +
3056 +  if test -z "$PREPFLAG"; then
3057 +        echo ""
3058 +        echo "**********************************************************"
3059 +        echo "* WARNING: Don't know the best PREPFLAG for this system  *"
3060 +        echo "* Use  make PREPFLAG=..., or edit the top level Makefile *"
3061 +        echo "* (otherwise, an empty PREPFLAG will be used)            *"
3062 +        echo "**********************************************************"
3063 +        echo ""
3064 +        PREPFLAG=""
3065 +  fi
3066 +
3067 +  echo "$as_me:$LINENO: checking to make sure F90 preprocessor flag works" >&5
3068 + echo $ECHO_N "checking to make sure F90 preprocessor flag works... $ECHO_C" >&6
3069 +
3070 +
3071 +  ac_ext=f90
3072 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3073 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3074 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3075 +
3076 +  ac_save_ext=$ac_ext
3077 +  ac_ext=F90
3078 +  ac_save_F90FLAGS=$F90FLAGS
3079 +
3080 +  if test "$PREPFLAG"; then
3081 +  F90FLAGS="${F90FLAGS} ${PREPFLAG}-DTEST"
3082 + fi
3083 +
3084 +    cat >conftest.$ac_ext <<_ACEOF
3085 +
3086 +
3087 + program main
3088 +
3089 +  integer :: i
3090 +  i = 1
3091 +
3092 +
3093 + end program main
3094 +
3095 + _ACEOF
3096 + rm -f conftest.$ac_objext
3097 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3098 +  (eval $ac_compile) 2>&5
3099 +  ac_status=$?
3100 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3101 +  (exit $ac_status); } &&
3102 +         { ac_try='test -s conftest.$ac_objext'
3103 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3104 +  (eval $ac_try) 2>&5
3105 +  ac_status=$?
3106 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3107 +  (exit $ac_status); }; }; then
3108 +  prepflagworks=1
3109 + else
3110 +  echo "$as_me: failed program was:" >&5
3111 + sed 's/^/| /' conftest.$ac_ext >&5
3112 +
3113 + prepflagworks=0
3114 + fi
3115 + rm -f conftest.$ac_objext conftest.$ac_ext
3116 +
3117 +  F90FLAGS=$ac_save_F90FLAGS
3118 +  ac_ext=$ac_save_ext
3119 +  ac_ext=c
3120 + ac_cpp='$CPP $CPPFLAGS'
3121 + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3122 + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3123 + ac_compiler_gnu=$ac_cv_c_compiler_gnu
3124 +
3125 +
3126 +
3127 +  if test "$prepflagworks" = 1; then
3128 +    echo "$as_me:$LINENO: result: yes" >&5
3129 + echo "${ECHO_T}yes" >&6
3130 +
3131 +  else
3132 +    echo "$as_me:$LINENO: result: no" >&5
3133 + echo "${ECHO_T}no" >&6
3134 +    { { echo "$as_me:$LINENO: error: Can't figure out working Fortran90 preprocessor flag" >&5
3135 + echo "$as_me: error: Can't figure out working Fortran90 preprocessor flag" >&2;}
3136 +   { (exit 1); exit 1; }; }
3137 +  fi
3138 + fi
3139 +
3140 +
3141 +
3142 +
3143 +
3144 + # Try to determine native compiler flags that allow us to use F90 suffix
3145 + # for preprocessed f90 source with -D type defines
3146 +
3147 + if test "$ac_test_PREPDEFFLAG" != "set"; then
3148 +  PREPDEFFLAG=""
3149 +  case "${host_cpu}-${host_os}" in
3150 +
3151 +  *linux*) if test "$F90" = ifc; then
3152 +                    PREPDEFFLAG=" "
3153 +                fi;;
3154 +  *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
3155 +                    PREPDEFFLAG="-WF,"
3156 +                fi;;
3157 +  *darwin*)
3158 +        if test "$F90" = f90 -o "$F90" = xlf90; then
3159 +                PREPDEFFLAG="-WF,"
3160 +        fi;;
3161 +  esac
3162 +
3163 +  if test -z "$PREPDEFFLAG"; then
3164 +        echo ""
3165 +        echo "*************************************************************"
3166 +        echo "* WARNING: Don't know the best PREPDEFFLAG for this system  *"
3167 +        echo "* Use  make PREPDEFFLAG=..., or edit the top level Makefile *"
3168 +        echo "* (otherwise, an empty PREPDEFFLAG will be used)            *"
3169 +        echo "*************************************************************"
3170 +        echo ""
3171 +        PREPDEFFLAG=" "
3172 +  fi
3173 +
3174 +  echo "$as_me:$LINENO: checking to make sure F90 preprocessor define flag works" >&5
3175 + echo $ECHO_N "checking to make sure F90 preprocessor define flag works... $ECHO_C" >&6
3176 +
3177 +
3178 +  ac_ext=f90
3179 + ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3180 + ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3181 + ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3182 +
3183 +  ac_save_ext=$ac_ext
3184 +  ac_ext=F90
3185 +  ac_save_F90FLAGS=$F90FLAGS
3186 +
3187 +  if test "$PREPDEFFLAG"; then
3188 +  F90FLAGS="${F90FLAGS} ${PREPFLAG} ${PREPDEFFLAG}-DTEST"
3189 + fi
3190 +
3191 +    cat >conftest.$ac_ext <<_ACEOF
3192 +
3193 +
3194 + program main
3195 +
3196 +  integer :: i
3197 + #ifdef TEST
3198 +  i = 1
3199 + #else
3200 +  choke me
3201 + #endif
3202 +
3203 +
3204 + end program main
3205 +
3206 + _ACEOF
3207 + rm -f conftest.$ac_objext
3208 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3209 +  (eval $ac_compile) 2>&5
3210 +  ac_status=$?
3211 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3212 +  (exit $ac_status); } &&
3213 +         { ac_try='test -s conftest.$ac_objext'
3214 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3215 +  (eval $ac_try) 2>&5
3216 +  ac_status=$?
3217 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3218 +  (exit $ac_status); }; }; then
3219 +  prepdefflagworks=1
3220 + else
3221 +  echo "$as_me: failed program was:" >&5
3222 + sed 's/^/| /' conftest.$ac_ext >&5
3223 +
3224 + prepdefflagworks=0
3225 + fi
3226 + rm -f conftest.$ac_objext conftest.$ac_ext
3227 +
3228 +  F90FLAGS=$ac_save_F90FLAGS
3229 +  ac_ext=$ac_save_ext
3230 +  ac_ext=c
3231 + ac_cpp='$CPP $CPPFLAGS'
3232 + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3233 + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3234 + ac_compiler_gnu=$ac_cv_c_compiler_gnu
3235 +
3236 +
3237 +
3238 +  if test "$prepdefflagworks" = 1; then
3239 +    echo "$as_me:$LINENO: result: yes" >&5
3240 + echo "${ECHO_T}yes" >&6
3241 +
3242 +  else
3243 +    echo "$as_me:$LINENO: result: no" >&5
3244 + echo "${ECHO_T}no" >&6
3245 +    { { echo "$as_me:$LINENO: error: Can't figure out working Fortran90 preprocessor define flag" >&5
3246 + echo "$as_me: error: Can't figure out working Fortran90 preprocessor define flag" >&2;}
3247 +   { (exit 1); exit 1; }; }
3248 +  fi
3249 + fi
3250 +
3251 +
3252 + case $debug in
3253 +  1)
3254 +     ;;
3255 +  *)
3256 +
3257 +
3258 +
3259 +
3260   # Try to determine "good" native compiler flags if none specified on command
3261   # line
3262   if test "$ac_test_CFLAGS" != "set"; then
# Line 2989 | Line 3685 | ac_ext=cc
3685  
3686   fi
3687  
2992 ac_ext=cc
2993 ac_cpp='$CXXCPP $CPPFLAGS'
2994 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2995 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2996 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2997 if test -n "$ac_tool_prefix"; then
2998  for ac_prog in $CCC icpc icc xlC CC g++ c++
2999  do
3000    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3001 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3002 echo "$as_me:$LINENO: checking for $ac_word" >&5
3003 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3004 if test "${ac_cv_prog_CXX+set}" = set; then
3005  echo $ECHO_N "(cached) $ECHO_C" >&6
3006 else
3007  if test -n "$CXX"; then
3008  ac_cv_prog_CXX="$CXX" # Let the user override the test.
3009 else
3010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3011 for as_dir in $PATH
3012 do
3013  IFS=$as_save_IFS
3014  test -z "$as_dir" && as_dir=.
3015  for ac_exec_ext in '' $ac_executable_extensions; do
3016  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3017    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3018    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3019    break 2
3020  fi
3021 done
3022 done
3688  
3024 fi
3025 fi
3026 CXX=$ac_cv_prog_CXX
3027 if test -n "$CXX"; then
3028  echo "$as_me:$LINENO: result: $CXX" >&5
3029 echo "${ECHO_T}$CXX" >&6
3030 else
3031  echo "$as_me:$LINENO: result: no" >&5
3032 echo "${ECHO_T}no" >&6
3033 fi
3689  
3035    test -n "$CXX" && break
3036  done
3037 fi
3038 if test -z "$CXX"; then
3039  ac_ct_CXX=$CXX
3040  for ac_prog in $CCC icpc icc xlC CC g++ c++
3041 do
3042  # Extract the first word of "$ac_prog", so it can be a program name with args.
3043 set dummy $ac_prog; ac_word=$2
3044 echo "$as_me:$LINENO: checking for $ac_word" >&5
3045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3046 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3047  echo $ECHO_N "(cached) $ECHO_C" >&6
3048 else
3049  if test -n "$ac_ct_CXX"; then
3050  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3051 else
3052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3053 for as_dir in $PATH
3054 do
3055  IFS=$as_save_IFS
3056  test -z "$as_dir" && as_dir=.
3057  for ac_exec_ext in '' $ac_executable_extensions; do
3058  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3059    ac_cv_prog_ac_ct_CXX="$ac_prog"
3060    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3061    break 2
3062  fi
3063 done
3064 done
3065
3066 fi
3067 fi
3068 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3069 if test -n "$ac_ct_CXX"; then
3070  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
3071 echo "${ECHO_T}$ac_ct_CXX" >&6
3072 else
3073  echo "$as_me:$LINENO: result: no" >&5
3074 echo "${ECHO_T}no" >&6
3075 fi
3076
3077  test -n "$ac_ct_CXX" && break
3078 done
3079 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3080
3081  CXX=$ac_ct_CXX
3082 fi
3083
3084
3085 # Provide some information about the compiler.
3086 echo "$as_me:$LINENO:" \
3087     "checking for C++ compiler version" >&5
3088 ac_compiler=`set X $ac_compile; echo $2`
3089 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
3090  (eval $ac_compiler --version </dev/null >&5) 2>&5
3091  ac_status=$?
3092  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3093  (exit $ac_status); }
3094 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
3095  (eval $ac_compiler -v </dev/null >&5) 2>&5
3096  ac_status=$?
3097  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3098  (exit $ac_status); }
3099 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
3100  (eval $ac_compiler -V </dev/null >&5) 2>&5
3101  ac_status=$?
3102  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3103  (exit $ac_status); }
3104
3105 echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
3106 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3107 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3108  echo $ECHO_N "(cached) $ECHO_C" >&6
3109 else
3110  cat >conftest.$ac_ext <<_ACEOF
3111 #line $LINENO "configure"
3112 /* confdefs.h.  */
3113 _ACEOF
3114 cat confdefs.h >>conftest.$ac_ext
3115 cat >>conftest.$ac_ext <<_ACEOF
3116 /* end confdefs.h.  */
3117
3118 int
3119 main ()
3120 {
3121 #ifndef __GNUC__
3122       choke me
3123 #endif
3124
3125  ;
3126  return 0;
3127 }
3128 _ACEOF
3129 rm -f conftest.$ac_objext
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); } &&
3135         { ac_try='test -s conftest.$ac_objext'
3136  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3137  (eval $ac_try) 2>&5
3138  ac_status=$?
3139  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3140  (exit $ac_status); }; }; then
3141  ac_compiler_gnu=yes
3142 else
3143  echo "$as_me: failed program was:" >&5
3144 sed 's/^/| /' conftest.$ac_ext >&5
3145
3146 ac_compiler_gnu=no
3147 fi
3148 rm -f conftest.$ac_objext conftest.$ac_ext
3149 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3150
3151 fi
3152 echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
3153 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3154 GXX=`test $ac_compiler_gnu = yes && echo yes`
3155 ac_test_CXXFLAGS=${CXXFLAGS+set}
3156 ac_save_CXXFLAGS=$CXXFLAGS
3157 CXXFLAGS="-g"
3158 echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
3159 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3160 if test "${ac_cv_prog_cxx_g+set}" = set; then
3161  echo $ECHO_N "(cached) $ECHO_C" >&6
3162 else
3163  cat >conftest.$ac_ext <<_ACEOF
3164 #line $LINENO "configure"
3165 /* confdefs.h.  */
3166 _ACEOF
3167 cat confdefs.h >>conftest.$ac_ext
3168 cat >>conftest.$ac_ext <<_ACEOF
3169 /* end confdefs.h.  */
3170
3171 int
3172 main ()
3173 {
3174
3175  ;
3176  return 0;
3177 }
3178 _ACEOF
3179 rm -f conftest.$ac_objext
3180 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3181  (eval $ac_compile) 2>&5
3182  ac_status=$?
3183  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3184  (exit $ac_status); } &&
3185         { ac_try='test -s conftest.$ac_objext'
3186  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3187  (eval $ac_try) 2>&5
3188  ac_status=$?
3189  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3190  (exit $ac_status); }; }; then
3191  ac_cv_prog_cxx_g=yes
3192 else
3193  echo "$as_me: failed program was:" >&5
3194 sed 's/^/| /' conftest.$ac_ext >&5
3195
3196 ac_cv_prog_cxx_g=no
3197 fi
3198 rm -f conftest.$ac_objext conftest.$ac_ext
3199 fi
3200 echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
3201 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3202 if test "$ac_test_CXXFLAGS" = set; then
3203  CXXFLAGS=$ac_save_CXXFLAGS
3204 elif test $ac_cv_prog_cxx_g = yes; then
3205  if test "$GXX" = yes; then
3206    CXXFLAGS="-g -O2"
3207  else
3208    CXXFLAGS="-g"
3209  fi
3210 else
3211  if test "$GXX" = yes; then
3212    CXXFLAGS="-O2"
3213  else
3214    CXXFLAGS=
3215  fi
3216 fi
3217 for ac_declaration in \
3218   ''\
3219   '#include <stdlib.h>' \
3220   'extern "C" void std::exit (int) throw (); using std::exit;' \
3221   'extern "C" void std::exit (int); using std::exit;' \
3222   'extern "C" void exit (int) throw ();' \
3223   'extern "C" void exit (int);' \
3224   'void exit (int);'
3225 do
3226  cat >conftest.$ac_ext <<_ACEOF
3227 #line $LINENO "configure"
3228 /* confdefs.h.  */
3229 _ACEOF
3230 cat confdefs.h >>conftest.$ac_ext
3231 cat >>conftest.$ac_ext <<_ACEOF
3232 /* end confdefs.h.  */
3233 #include <stdlib.h>
3234 $ac_declaration
3235 int
3236 main ()
3237 {
3238 exit (42);
3239  ;
3240  return 0;
3241 }
3242 _ACEOF
3243 rm -f conftest.$ac_objext
3244 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3245  (eval $ac_compile) 2>&5
3246  ac_status=$?
3247  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3248  (exit $ac_status); } &&
3249         { ac_try='test -s conftest.$ac_objext'
3250  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3251  (eval $ac_try) 2>&5
3252  ac_status=$?
3253  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3254  (exit $ac_status); }; }; then
3255  :
3256 else
3257  echo "$as_me: failed program was:" >&5
3258 sed 's/^/| /' conftest.$ac_ext >&5
3259
3260 continue
3261 fi
3262 rm -f conftest.$ac_objext conftest.$ac_ext
3263  cat >conftest.$ac_ext <<_ACEOF
3264 #line $LINENO "configure"
3265 /* confdefs.h.  */
3266 _ACEOF
3267 cat confdefs.h >>conftest.$ac_ext
3268 cat >>conftest.$ac_ext <<_ACEOF
3269 /* end confdefs.h.  */
3270 $ac_declaration
3271 int
3272 main ()
3273 {
3274 exit (42);
3275  ;
3276  return 0;
3277 }
3278 _ACEOF
3279 rm -f conftest.$ac_objext
3280 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3281  (eval $ac_compile) 2>&5
3282  ac_status=$?
3283  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3284  (exit $ac_status); } &&
3285         { ac_try='test -s conftest.$ac_objext'
3286  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3287  (eval $ac_try) 2>&5
3288  ac_status=$?
3289  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3290  (exit $ac_status); }; }; then
3291  break
3292 else
3293  echo "$as_me: failed program was:" >&5
3294 sed 's/^/| /' conftest.$ac_ext >&5
3295
3296 fi
3297 rm -f conftest.$ac_objext conftest.$ac_ext
3298 done
3299 rm -f conftest*
3300 if test -n "$ac_declaration"; then
3301  echo '#ifdef __cplusplus' >>confdefs.h
3302  echo $ac_declaration      >>confdefs.h
3303  echo '#endif'             >>confdefs.h
3304 fi
3690  
3306 ac_ext=c
3307 ac_cpp='$CPP $CPPFLAGS'
3308 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3309 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3310 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3691  
3312
3313
3314
3315
3692   # Try to determine "good" native compiler flags if none specified on command
3693   # line
3694   if test "$ac_test_CXXFLAGS" != "set"; then
# Line 3729 | Line 4105 | fi
4105  
4106   fi
4107  
3732
3733 fi
3734
3735 ac_ext=f90
3736 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3737 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3738 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3739 if test -n "$ac_tool_prefix"; then
3740  for ac_prog in ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
3741  do
3742    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3743 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3744 echo "$as_me:$LINENO: checking for $ac_word" >&5
3745 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3746 if test "${ac_cv_prog_F90+set}" = set; then
3747  echo $ECHO_N "(cached) $ECHO_C" >&6
3748 else
3749  if test -n "$F90"; then
3750  ac_cv_prog_F90="$F90" # Let the user override the test.
3751 else
3752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3753 for as_dir in $PATH
3754 do
3755  IFS=$as_save_IFS
3756  test -z "$as_dir" && as_dir=.
3757  for ac_exec_ext in '' $ac_executable_extensions; do
3758  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3759    ac_cv_prog_F90="$ac_tool_prefix$ac_prog"
3760    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3761    break 2
3762  fi
3763 done
3764 done
3765
3766 fi
3767 fi
3768 F90=$ac_cv_prog_F90
3769 if test -n "$F90"; then
3770  echo "$as_me:$LINENO: result: $F90" >&5
3771 echo "${ECHO_T}$F90" >&6
3772 else
3773  echo "$as_me:$LINENO: result: no" >&5
3774 echo "${ECHO_T}no" >&6
3775 fi
3776
3777    test -n "$F90" && break
3778  done
3779 fi
3780 if test -z "$F90"; then
3781  ac_ct_F90=$F90
3782  for ac_prog in ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
3783 do
3784  # Extract the first word of "$ac_prog", so it can be a program name with args.
3785 set dummy $ac_prog; ac_word=$2
3786 echo "$as_me:$LINENO: checking for $ac_word" >&5
3787 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3788 if test "${ac_cv_prog_ac_ct_F90+set}" = set; then
3789  echo $ECHO_N "(cached) $ECHO_C" >&6
3790 else
3791  if test -n "$ac_ct_F90"; then
3792  ac_cv_prog_ac_ct_F90="$ac_ct_F90" # Let the user override the test.
3793 else
3794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3795 for as_dir in $PATH
3796 do
3797  IFS=$as_save_IFS
3798  test -z "$as_dir" && as_dir=.
3799  for ac_exec_ext in '' $ac_executable_extensions; do
3800  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3801    ac_cv_prog_ac_ct_F90="$ac_prog"
3802    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3803    break 2
3804  fi
3805 done
3806 done
3807
3808 fi
3809 fi
3810 ac_ct_F90=$ac_cv_prog_ac_ct_F90
3811 if test -n "$ac_ct_F90"; then
3812  echo "$as_me:$LINENO: result: $ac_ct_F90" >&5
3813 echo "${ECHO_T}$ac_ct_F90" >&6
3814 else
3815  echo "$as_me:$LINENO: result: no" >&5
3816 echo "${ECHO_T}no" >&6
3817 fi
3818
3819  test -n "$ac_ct_F90" && break
3820 done
3821
3822  F90=$ac_ct_F90
3823 fi
3824
3825
3826 # If we don't use `.F90' as extension, the preprocessor is not run on the
3827 # input file.
3828 ac_save_ext=$ac_ext
3829 ac_ext=F90
3830 echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 90 compiler" >&5
3831 echo $ECHO_N "checking whether we are using the GNU Fortran 90 compiler... $ECHO_C" >&6
3832 if test "${ac_cv_f90_compiler_gnu+set}" = set; then
3833  echo $ECHO_N "(cached) $ECHO_C" >&6
3834 else
3835  cat >conftest.$ac_ext <<_ACEOF
3836
3837 program main
3838
3839 #ifndef __GNUC__
3840       choke me
3841 #endif
3842
3843 end program main
3844
3845 _ACEOF
3846 rm -f conftest.$ac_objext
3847 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3848  (eval $ac_compile) 2>&5
3849  ac_status=$?
3850  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3851  (exit $ac_status); } &&
3852         { ac_try='test -s conftest.$ac_objext'
3853  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3854  (eval $ac_try) 2>&5
3855  ac_status=$?
3856  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3857  (exit $ac_status); }; }; then
3858  ac_compiler_gnu=yes
3859 else
3860  echo "$as_me: failed program was:" >&5
3861 sed 's/^/| /' conftest.$ac_ext >&5
3862
3863 ac_compiler_gnu=no
3864 fi
3865 rm -f conftest.$ac_objext conftest.$ac_ext
3866 ac_cv_f90_compiler_gnu=$ac_compiler_gnu
4108  
4109   fi
3869 echo "$as_me:$LINENO: result: $ac_cv_f90_compiler_gnu" >&5
3870 echo "${ECHO_T}$ac_cv_f90_compiler_gnu" >&6
3871 ac_ext=$ac_save_ext
3872 G95=`test $ac_compiler_gnu = yes && echo yes`
3873 ac_ext=c
3874 ac_cpp='$CPP $CPPFLAGS'
3875 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3876 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3877 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4110  
4111  
4112  
# Line 3883 | Line 4115 | if test x"$F90FLAGS" == x ; then
4115   # Try to determine "good" native compiler flags if none specified on command
4116   # line
4117  
4118 < if test x"$F90FLAGS" == x ; then
4118 > if test x"$F90FLAGS" = x ; then
4119    F90FLAGS=""
4120    case "${host_cpu}-${host_os}" in
4121  
# Line 3993 | Line 4225 | fi
4225  
4226   fi
4227  
4228 <
4229 <
3998 <
3999 <
4000 < # Try to determine native compiler flags that allow us to use F90 suffix
4001 < # for preprocessed f90 source.
4002 <
4003 < if test "$ac_test_PREPFLAG" != "set"; then
4004 <  PREPFLAG=""
4005 <  case "${host_cpu}-${host_os}" in
4006 <
4007 <  *linux*) if test "$F90" = ifc; then
4008 <                    PREPFLAG="-fpp1 "
4009 <                fi;;
4010 <  *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
4011 <                    PREPFLAG="-qsuffix=cpp=F90 "
4012 <                fi;;
4013 <  *darwin*)
4014 <        if test "$F90" = f90 -o "$F90" = xlf90; then
4015 <                PREPFLAG="-qsuffix=cpp=F90 "
4016 <        fi;;
4017 <  esac
4018 <
4019 <  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
4029 <
4030 <  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
4032 <
4033 <
4034 <  ac_ext=f90
4035 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4036 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4037 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4038 <
4039 <  ac_save_ext=$ac_ext
4040 <  ac_ext=F90
4041 <  ac_save_F90FLAGS=$F90FLAGS
4042 <
4043 <  if test "$PREPFLAG"; then
4044 <  F90FLAGS="${F90FLAGS} ${PREPFLAG}-DTEST"
4045 < fi
4046 <
4047 <    cat >conftest.$ac_ext <<_ACEOF
4048 <
4049 <
4050 < program main
4051 <
4052 <  integer :: i
4053 <  i = 1
4054 <
4055 <
4056 < end program main
4057 <
4058 < _ACEOF
4059 < rm -f conftest.$ac_objext
4060 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4061 <  (eval $ac_compile) 2>&5
4062 <  ac_status=$?
4063 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4064 <  (exit $ac_status); } &&
4065 <         { ac_try='test -s conftest.$ac_objext'
4066 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4067 <  (eval $ac_try) 2>&5
4068 <  ac_status=$?
4069 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4070 <  (exit $ac_status); }; }; then
4071 <  prepflagworks=1
4072 < else
4073 <  echo "$as_me: failed program was:" >&5
4074 < sed 's/^/| /' conftest.$ac_ext >&5
4075 <
4076 < prepflagworks=0
4077 < fi
4078 < rm -f conftest.$ac_objext conftest.$ac_ext
4079 <
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
4087 <
4088 <
4089 <
4090 <  if test "$prepflagworks" = 1; then
4091 <    echo "$as_me:$LINENO: result: yes" >&5
4092 < echo "${ECHO_T}yes" >&6
4093 <
4094 <  else
4095 <    echo "$as_me:$LINENO: result: no" >&5
4096 < 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
4101 < fi
4102 <
4103 <
4104 <
4105 <
4106 <
4107 < # Try to determine native compiler flags that allow us to use F90 suffix
4108 < # for preprocessed f90 source with -D type defines
4109 <
4110 < if test "$ac_test_PREPDEFFLAG" != "set"; then
4111 <  PREPDEFFLAG=""
4112 <  case "${host_cpu}-${host_os}" in
4113 <
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
4125 <
4126 <  if test -z "$PREPDEFFLAG"; then
4127 <        echo ""
4128 <        echo "*************************************************************"
4129 <        echo "* WARNING: Don't know the best PREPDEFFLAG for this system  *"
4130 <        echo "* Use  make PREPDEFFLAG=..., or edit the top level Makefile *"
4131 <        echo "* (otherwise, an empty PREPDEFFLAG will be used)            *"
4132 <        echo "*************************************************************"
4133 <        echo ""
4134 <        PREPDEFFLAG=" "
4135 <  fi
4136 <
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
4139 <
4140 <
4141 <  ac_ext=f90
4142 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4143 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4144 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4145 <
4146 <  ac_save_ext=$ac_ext
4147 <  ac_ext=F90
4148 <  ac_save_F90FLAGS=$F90FLAGS
4149 <
4150 <  if test "$PREPDEFFLAG"; then
4151 <  F90FLAGS="${F90FLAGS} ${PREPFLAG} ${PREPDEFFLAG}-DTEST"
4152 < fi
4153 <
4154 <    cat >conftest.$ac_ext <<_ACEOF
4155 <
4156 <
4157 < program main
4158 <
4159 <  integer :: i
4160 < #ifdef TEST
4161 <  i = 1
4162 < #else
4163 <  choke me
4164 < #endif
4165 <
4166 <
4167 < end program main
4168 <
4169 < _ACEOF
4170 < rm -f conftest.$ac_objext
4171 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4172 <  (eval $ac_compile) 2>&5
4173 <  ac_status=$?
4174 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4175 <  (exit $ac_status); } &&
4176 <         { 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
4183 < else
4184 <  echo "$as_me: failed program was:" >&5
4185 < sed 's/^/| /' conftest.$ac_ext >&5
4186 <
4187 < prepdefflagworks=0
4188 < fi
4189 < rm -f conftest.$ac_objext conftest.$ac_ext
4190 <
4191 <  F90FLAGS=$ac_save_F90FLAGS
4192 <  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
4198 <
4199 <
4200 <
4201 <  if test "$prepdefflagworks" = 1; then
4202 <    echo "$as_me:$LINENO: result: yes" >&5
4203 < echo "${ECHO_T}yes" >&6
4228 >     ;;
4229 > esac
4230  
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
4212 fi
4213
4231   # Find a good install program.  We prefer a C program (faster),
4232   # so one script is as good as another.  But avoid the broken or
4233   # incompatible versions:
# Line 4851 | Line 4868 | F90FLAGS="$F90FLAGS $ac_verb"
4868   ac_save_F90FLAGS=$F90FLAGS
4869   F90FLAGS="$F90FLAGS $ac_verb"
4870  
4871 < (eval echo $as_me:4854: \"$ac_link\") >&5
4871 > (eval echo $as_me:4871: \"$ac_link\") >&5
4872   ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
4873   echo "$ac_f90_v_output" >&5
4874   F90FLAGS=$ac_save_F90FLAGS
# Line 4928 | Line 4945 | F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v"
4945   ac_save_F90FLAGS=$F90FLAGS
4946   F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v"
4947  
4948 < (eval echo $as_me:4931: \"$ac_link\") >&5
4948 > (eval echo $as_me:4948: \"$ac_link\") >&5
4949   ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
4950   echo "$ac_f90_v_output" >&5
4951   F90FLAGS=$ac_save_F90FLAGS
# Line 5361 | Line 5378 | esac
5378   echo "$as_me: WARNING: unknown Fortran 90 name-mangling scheme" >&2;}
5379            ;;
5380   esac
5381 +
5382 +
5383 +
5384 +
5385 +
5386 + echo "$as_me:$LINENO: checking for module suffix" >&5
5387 + echo $ECHO_N "checking for module suffix... $ECHO_C" >&6
5388 + rm -f conftest*
5389 + # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
5390 + rm -f work*
5391 + cat >conftest.f90 <<EOF
5392 +        module conftest
5393 +        integer n
5394 +        parameter (n=1)
5395 +        end module conftest
5396 + EOF
5397 + # SGI and absoft compilers generates module name in upper case!
5398 + testname="conftest"
5399 + modcase="lower"
5400 + if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
5401 +    MOD=`ls conftest* | grep -v conftest.f | grep -v conftest.o`
5402 +    MOD=`echo "$MOD" | sed -e 's/conftest\.//g'`
5403 +    if test -z "$MOD" ; then
5404 +        MOD=`ls CONFTEST* 2>/dev/null \
5405 +                | grep -v CONFTEST.f | grep -v CONFTEST.o`
5406 +        MOD=`echo "$MOD" | sed -e 's/CONFTEST\.//g'`
5407 +        if test -n "$MOD" ; then
5408 +            testname="CONFTEST"
5409 +            modcase="upper"
5410 +        fi
5411 +    fi
5412 +    if test -z "$MOD" ; then
5413 +        echo "$as_me:$LINENO: result: unknown" >&5
5414 + echo "${ECHO_T}unknown" >&6
5415 +        # Use mod if we can't figure it out
5416 +        MOD="mod"
5417 +    else
5418 +        echo "$as_me:$LINENO: result: $MOD" >&5
5419 + echo "${ECHO_T}$MOD" >&6
5420 +    fi
5421 +    if test -s work.pcl ; then
5422 +        { echo "$as_me:$LINENO: WARNING: Compiler generates auxillery files!" >&5
5423 + echo "$as_me: WARNING: Compiler generates auxillery files!" >&2;}
5424 +    fi
5425 + else
5426 +    echo "$as_me:$LINENO: result: unknown" >&5
5427 + echo "${ECHO_T}unknown" >&6
5428 + fi
5429  
5430  
5431  
5432  
5433 +
5434 + # Check for module include path (some use -I, some (Solaris) use -M, some
5435 + # (absoft) use -p).
5436 + # Intel compilers use a wierd system: -cl,filename.pcl .  If no file is
5437 + # specified, work.pcl and work.pc are created.  However, if you specify
5438 + # a file, it must contain a the name of a file ending in .pc .  Ugh!
5439 + # Use the module made above
5440 + echo "$as_me:$LINENO: checking for module directory path flag" >&5
5441 + echo $ECHO_N "checking for module directory path flag... $ECHO_C" >&6
5442 + rm -f conftest*
5443 + # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
5444 + rm -f work*
5445 + cat >conftest.f90 <<EOF
5446 +        module conftest
5447 +        integer n
5448 +        parameter (n=1)
5449 +        end module conftest
5450 + EOF
5451 + # SGI and absoft compilers generates module name in upper case!
5452 + testname="conftest"
5453 + if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
5454 +   mod=`ls CONFTEST* 2>/dev/null | grep -v CONFTEST.f | grep -v CONFTEST.o`
5455 +   mod=`echo "$mod" | sed -e 's/CONFTEST\.//g'`
5456 +   if test -n "$mod" ; then
5457 +      testname="CONFTEST"
5458 +   fi
5459 +   madedir=0
5460 +   if test ! -d conf ; then mkdir conf ; madedir=1; fi
5461 +   cp $testname.$MOD conf
5462 +   rm -f conftest* CONFTEST*
5463 +   cat >conftest1.f90 <<EOF
5464 +        program main
5465 +        use conftest
5466 +        print *, n
5467 +        end
5468 + EOF
5469 +   F90_WORK_FILES_ARG=""
5470 +   F90MODINCSPEC=""
5471 +   if $F90 -c -Iconf conftest1.f90 > conftest.out 2>&1 ; then
5472 +       MODDIRFLAG="-I"
5473 +       F90MODINCSPEC="-I<dir>"
5474 +       echo "$as_me:$LINENO: result: -I" >&5
5475 + echo "${ECHO_T}-I" >&6
5476 +   elif $F90 -c -Mconf conftest1.f90 >> conftest.out 2>&1 ; then
5477 +       MODDIRFLAG="-M"
5478 +       F90MODINCSPEC="-M<dir>"
5479 +       echo "$as_me:$LINENO: result: -M" >&5
5480 + echo "${ECHO_T}-M" >&6
5481 +   elif $F90 -c -pconf conftest1.f90 >> conftest.out 2>&1 ; then
5482 +       MODDIRFLAG="-p"
5483 +       F90MODINCSPEC="-p<dir>"
5484 +       echo "$as_me:$LINENO: result: -p" >&5
5485 + echo "${ECHO_T}-p" >&6
5486 +   elif test -s work.pc ; then
5487 +        cp work.pc conf/mpimod.pc
5488 +        echo "mpimod.pc" > conf/mpimod.pcl
5489 +        echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl
5490 +        if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then
5491 +            MODDIRFLAG='-cl,mpimod.pcl'
5492 +            echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and directories" >&5
5493 + echo "${ECHO_T}-cl,filename where filename contains a list of files and directories" >&6
5494 +            F90_WORK_FILES_ARG="-cl,mpimod.pcl"
5495 +            F90MODINCSPEC="-cl,<dir>/<file>mod.pcl"
5496 +
5497 +        else
5498 +            # The version of the Intel compiler that I have refuses to let
5499 +            # you put the "work catalog" list anywhere but the current
5500 +            # directory. For example, you cannot in
5501 +         :
5502 +        fi
5503 +   fi
5504 +   if test -z "MODDIRFLAG" ; then
5505 +       echo "$as_me:$LINENO: result: unknown" >&5
5506 + echo "${ECHO_T}unknown" >&6
5507 +   fi
5508 +
5509 +
5510 +   rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod*
5511 +   if test $madedir = 1 ; then rmdir conf ; fi
5512 + fi
5513 +
5514 +
5515 +
5516   echo "$as_me:$LINENO: checking for mpi-directory" >&5
5517   echo $ECHO_N "checking for mpi-directory... $ECHO_C" >&6
5518  
# Line 6673 | Line 6821 | fi;
6821   echo "${ECHO_T}no" >&6
6822  
6823   fi;
6824 +
6825  
6826  
6827  
# Line 6695 | Line 6844 | ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6844   ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6845  
6846    ac_save_F90FLAGS=$F90FLAGS
6847 +
6848    if test "$mpi_f90_mods"; then
6849 <  F90FLAGS="${F90FLAGS} -I${mpi_f90_mods}"
6849 >  F90FLAGS="${F90FLAGS} ${MODDIRFLAG}${mpi_f90_mods}"
6850   fi
6851  
6852      cat >conftest.$ac_ext <<_ACEOF
# Line 6748 | Line 6898 | _ACEOF
6898   #define MPI_MOD 1
6899   _ACEOF
6900  
6901 <    MPI_F90_MODS="-I${mpi_f90_mods}"
6901 >    MPI_F90_MODS="${mpi_f90_mods}"
6902  
6903      # The library name:
6904      if test -z "$MPI_LIB" ; then
# Line 6803 | Line 6953 | OPTIMIZE=${OPTIMIZE-"-O"}
6953   FFLAGS=${FFLAGS-""}
6954   F90FLAGS=${F90FLAGS-""}
6955   LDFLAGS=${LDFLAGS-""}
6806 OPTIMIZE=${OPTIMIZE-"-O"}
6956   DEBUG=${DEBUG-"-g"}
6957  
6958   case $debug in
6959 <  true)
6811 <     CFLAGS="$DEBUG $CFLAGS"
6812 <     CXXFLAGS="$DEBUG $CXXFLAGS"
6959 >  1)
6960       FFLAGS="$DEBUG $FFLAGS"
6961       F90FLAGS="$DEBUG $F90FLAGS"
6962       ;;
6963    *)
6817     CFLAGS="$OPTIMIZE $CFLAGS"
6818     CXXFLAGS="$OPTIMIZE $CXXFLAGS"
6819     FFLAGS="$OPTIMIZE $FFLAGS"
6820     F90FLAGS="$OPTIMIZE $F90FLAGS"
6964       ;;
6965   esac
6966  
# Line 7467 | Line 7610 | s,@DEBUG@,$DEBUG,;t t
7610   s,@ECHO_T@,$ECHO_T,;t t
7611   s,@LIBS@,$LIBS,;t t
7612   s,@PROGNAME@,$PROGNAME,;t t
7613 < s,@DEBUG@,$DEBUG,;t t
7613 > s,@debug@,$debug,;t t
7614   s,@build@,$build,;t t
7615   s,@build_cpu@,$build_cpu,;t t
7616   s,@build_vendor@,$build_vendor,;t t
# Line 7506 | Line 7649 | s,@mpi_dir@,$mpi_dir,;t t
7649   s,@F90LIBS@,$F90LIBS,;t t
7650   s,@F90_FUNC@,$F90_FUNC,;t t
7651   s,@F90_FUNC_@,$F90_FUNC_,;t t
7652 + s,@MOD@,$MOD,;t t
7653 + s,@F90_WORK_FILES_ARG@,$F90_WORK_FILES_ARG,;t t
7654 + s,@MODDIRFLAG@,$MODDIRFLAG,;t t
7655 + s,@F90MODINCSPEC@,$F90MODINCSPEC,;t t
7656   s,@mpi_dir@,$mpi_dir,;t t
7657   s,@MPI_LIBDIR@,$MPI_LIBDIR,;t t
7658   s,@MPI_INC@,$MPI_INC,;t t

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines