--- trunk/OOPSE/configure 2003/10/24 17:36:02 816 +++ trunk/OOPSE/configure 2004/06/04 02:38:23 1233 @@ -311,7 +311,7 @@ ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKA # include #endif" -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' +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' ac_subst_files='' # Initialize some variables set by options. @@ -784,10 +784,6 @@ ac_env_MPIF77_set=${MPIF77+set} ac_env_F90FLAGS_value=$F90FLAGS ac_cv_env_F90FLAGS_set=${F90FLAGS+set} ac_cv_env_F90FLAGS_value=$F90FLAGS -ac_env_MPIF77_set=${MPIF77+set} -ac_env_MPIF77_value=$MPIF77 -ac_cv_env_MPIF77_set=${MPIF77+set} -ac_cv_env_MPIF77_value=$MPIF77 ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} @@ -874,17 +870,13 @@ Optional Packages: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-mpi_dir=MPIDIR give the path for MPI /usr/local - --with-mpi-libdir=dir give the path for MPI-libraries MPI_DIR/lib - --with-mpi_inc=dir give the path for MPI-include-files MPI_DIR/include + --with-mpi= compile with MPI libraries in [default=no] --with-sprng_prefix=PREFIX Prefix where SPRNG is installed --with-sprng-libdir=PREFIX SPRNG library directory --with-sprng-include=PREFIX SPRNG include directory - --with-mkl Do we want MKL will check /usr/local/intel/mkl60 /opt/intel/mkl60 - --with-mpi_f90_mods= - Location where MPI f90 modules are installed + --with-mkl Do we want MKL will check /usr/local/intel/mkl61 /opt/intel/mkl61 Some influential environment variables: CC C compiler command @@ -897,7 +889,6 @@ Some influential environment variables: CXXFLAGS C++ compiler flags F90 Fortran 90 compiler command F90FLAGS Fortran 90 compiler flags - MPIF77 MPI Fortran compiler command CPP C preprocessor Use these variables to override the choices made by `configure' or to help @@ -1828,22 +1819,38 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This sho -# what should I build? + -# Check whether --enable-debug or --disable-debug was given. -if test "${enable_debug+set}" = set; then - enableval="$enable_debug" - DEBUG=1 -fi; + + + + + + + + + + + + # set program name PROGNAME="oopse" +# there are two ways to do debugging. One with the --enable-debug flag +# and one using the DEBUG environment variable + +debug=0 +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + debug=1 +fi; if test "${DEBUG}"; then cat >>confdefs.h <<\_ACEOF -#define DEBUG 1 +#define debug 1 _ACEOF msg="$msg, debug mode" @@ -2556,446 +2563,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - -# Try to determine "good" native compiler flags if none specified on command -# line -if test "$ac_test_CFLAGS" != "set"; then - CFLAGS="" - case "${host_cpu}-${host_os}" in - - *linux*) if test "$CC" = icc; then - CFLAGS="-O" - fi;; - sparc-solaris2*) if test "$CC" = cc; then - CFLAGS="-native -fast -xO5 -dalign" - fi;; - - alpha*-osf*) if test "$CC" = cc; then - CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host -arch host -std1" - fi;; - - hppa*-hpux*) if test "$CC" = cc; then - CFLAGS="-Ae +O3 +Oall" - fi;; - - rs6000*-aix*) if test "$CC" = cc -o "$CC" = xlc; then - CFLAGS="-O3 -qtune=auto -qansialias -w" - fi;; - powerpc*-aix*) - if test "$CC" = cc -o "$CC" = xlc; then - CFLAGS="-O3 -qtune=auto -qansialias -w" - echo "*******************************************************" - echo "* You have AIX on an unknown powerpc system. It is *" - echo "* recommended that you use *" - echo "* *" - echo "* CFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w *" - echo "* ^^^ *" - echo "* where xxx is 601, 603, 604, or whatever kind of *" - echo "* PowerPC CPU you have. For more info, man cc. *" - echo "*******************************************************" - fi;; - *darwin*) - if test "$CC" = xlc -o "$CC" = cc; then - CFLAGS="-O3 -qtune=auto -w" - echo "*******************************************************" - echo "* You have Darwin on an unknown powerpc system. *" - echo "* It is recommended that you use *" - echo "* *" - echo "* CFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w *" - echo "* ^^^ *" - echo "* where xxx is 601, 603, 604, or whatever kind of *" - echo "* PowerPC CPU you have. For more info, man cc. *" - echo "*******************************************************" - fi;; - esac - - # use default flags for gcc on all systems - if test $ac_cv_c_compiler_gnu = yes; then - CFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic" - fi - - # test for gcc-specific flags: - if test $ac_cv_c_compiler_gnu = yes; then - # -malign-double for x86 systems - - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -malign-double" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -malign-double... $ECHO_C" >&6 -if test "${ac_align_double+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -malign-double -c conftest.c 2>&1`"; then - ac_align_double=yes -else - ac_align_double=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_align_double" >&5 -echo "${ECHO_T}$ac_align_double" >&6 -if test "$ac_align_double" = yes; then - : - CFLAGS="$CFLAGS -malign-double" -else - : - -fi - - # -fstrict-aliasing for gcc-2.95+ - - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -fstrict-aliasing" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -fstrict-aliasing... $ECHO_C" >&6 -if test "${ac_fstrict_aliasing+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -fstrict-aliasing -c conftest.c 2>&1`"; then - ac_fstrict_aliasing=yes -else - ac_fstrict_aliasing=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5 -echo "${ECHO_T}$ac_fstrict_aliasing" >&6 -if test "$ac_fstrict_aliasing" = yes; then - : - CFLAGS="$CFLAGS -fstrict-aliasing" -else - : - -fi - - fi - - CPU_FLAGS="" - if test "$GCC" = "yes"; then - case "${host_cpu}" in - i586*) - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentium" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentium... $ECHO_C" >&6 -if test "${ac_cpu_pentium+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -mcpu=pentium -c conftest.c 2>&1`"; then - ac_cpu_pentium=yes -else - ac_cpu_pentium=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5 -echo "${ECHO_T}$ac_cpu_pentium" >&6 -if test "$ac_cpu_pentium" = yes; then - : - CPU_FLAGS=-mcpu=pentium -else - : - - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpentium" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -mpentium... $ECHO_C" >&6 -if test "${ac_pentium+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -mpentium -c conftest.c 2>&1`"; then - ac_pentium=yes -else - ac_pentium=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_pentium" >&5 -echo "${ECHO_T}$ac_pentium" >&6 -if test "$ac_pentium" = yes; then - : - CPU_FLAGS=-mpentium -else - : - -fi - -fi - - ;; - i686*) - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentiumpro" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentiumpro... $ECHO_C" >&6 -if test "${ac_cpu_pentiumpro+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -mcpu=pentiumpro -c conftest.c 2>&1`"; then - ac_cpu_pentiumpro=yes -else - ac_cpu_pentiumpro=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5 -echo "${ECHO_T}$ac_cpu_pentiumpro" >&6 -if test "$ac_cpu_pentiumpro" = yes; then - : - CPU_FLAGS=-mcpu=pentiumpro -else - : - - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpentiumpro" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -mpentiumpro... $ECHO_C" >&6 -if test "${ac_pentiumpro+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -mpentiumpro -c conftest.c 2>&1`"; then - ac_pentiumpro=yes -else - ac_pentiumpro=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5 -echo "${ECHO_T}$ac_pentiumpro" >&6 -if test "$ac_pentiumpro" = yes; then - : - CPU_FLAGS=-mpentiumpro -else - : - -fi - -fi - - ;; - powerpc*) - cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null` - is60x=`echo $cputype | egrep "^600-9e?$"` - if test -n "$is60x"; then - - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=$cputype" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=$cputype... $ECHO_C" >&6 -if test "${ac_m_cpu_60x+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -mcpu=$cputype -c conftest.c 2>&1`"; then - ac_m_cpu_60x=yes -else - ac_m_cpu_60x=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5 -echo "${ECHO_T}$ac_m_cpu_60x" >&6 -if test "$ac_m_cpu_60x" = yes; then - : - CPU_FLAGS=-mcpu=$cputype -else - : - -fi - - elif test "$cputype" = 750; then - - -echo "$as_me:$LINENO: checking whether we are using gcc 2.95 or later" >&5 -echo $ECHO_N "checking whether we are using gcc 2.95 or later... $ECHO_C" >&6 -if test "${ac_cv_prog_gcc_2_95+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -cat > conftest.c < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) - yes; -# endif -#endif -EOF -if { ac_try='${CC-cc} -E conftest.c' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc_2_95=yes -else - ac_cv_prog_gcc_2_95=no -fi - -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_2_95" >&5 -echo "${ECHO_T}$ac_cv_prog_gcc_2_95" >&6 -if test "$ac_cv_prog_gcc_2_95" = yes; then - : - - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=750" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=750... $ECHO_C" >&6 -if test "${ac_m_cpu_750+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -mcpu=750 -c conftest.c 2>&1`"; then - ac_m_cpu_750=yes -else - ac_m_cpu_750=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5 -echo "${ECHO_T}$ac_m_cpu_750" >&6 -if test "$ac_m_cpu_750" = yes; then - : - CPU_FLAGS=-mcpu=750 -else - : - -fi - -else - : - -fi - - fi - if test -z "$CPU_FLAGS"; then - - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=powerpc" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=powerpc... $ECHO_C" >&6 -if test "${ac_m_cpu_powerpc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -mcpu=powerpc -c conftest.c 2>&1`"; then - ac_m_cpu_powerpc=yes -else - ac_m_cpu_powerpc=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5 -echo "${ECHO_T}$ac_m_cpu_powerpc" >&6 -if test "$ac_m_cpu_powerpc" = yes; then - : - CPU_FLAGS=-mcpu=powerpc -else - : - -fi - - fi - if test -z "$CPU_FLAGS"; then - - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpowerpc" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -mpowerpc... $ECHO_C" >&6 -if test "${ac_m_powerpc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -mpowerpc -c conftest.c 2>&1`"; then - ac_m_powerpc=yes -else - ac_m_powerpc=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5 -echo "${ECHO_T}$ac_m_powerpc" >&6 -if test "$ac_m_powerpc" = yes; then - : - CPU_FLAGS=-mpowerpc -else - : - -fi - - fi - esac - fi - - if test -n "$CPU_FLAGS"; then - CFLAGS="$CFLAGS $CPU_FLAGS" - fi - - if test -z "$CFLAGS"; then - echo "" - echo "********************************************************" - echo "* WARNING: Don't know the best CFLAGS for this system *" - echo "* Use make CFLAGS=..., or edit the top level Makefile *" - echo "* (otherwise, a default of CFLAGS=-O3 will be used) *" - echo "********************************************************" - echo "" - CFLAGS="-O3" - fi - - - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts ${CFLAGS}" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts ${CFLAGS}... $ECHO_C" >&6 -if test "${ac_guessed_cflags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} ${CFLAGS} -c conftest.c 2>&1`"; then - ac_guessed_cflags=yes -else - ac_guessed_cflags=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_guessed_cflags" >&5 -echo "${ECHO_T}$ac_guessed_cflags" >&6 -if test "$ac_guessed_cflags" = yes; then - : -else - : - echo "" - echo "********************************************************" - echo "* WARNING: The guessed CFLAGS don't seem to work with *" - echo "* your compiler. *" - echo "* Use make CFLAGS=..., or edit the top level Makefile *" - echo "********************************************************" - echo "" - CFLAGS="" - -fi - - -fi - ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in $CCC icpc icc xlC CC g++ c++ + for ac_prog in $CCC icpc icc xlc++ xlC CC g++ c++ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -3037,7 +2613,7 @@ if test -z "$CXX"; then fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in $CCC icpc icc xlC CC g++ c++ + for ac_prog in $CCC icpc icc xlc++ xlC CC g++ c++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -3310,434 +2886,68 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# Try to determine "good" native compiler flags if none specified on command -# line -if test "$ac_test_CXXFLAGS" != "set"; then - CXXFLAGS="" - case "${host_cpu}-${host_os}" in - - *linux*) if test "$CXX" = icc -o "$CXX" = icpc; then - CXXFLAGS="-O" - fi;; - sparc-solaris2*) if test "$CXX" = CC; then - CXXFLAGS="-native -fast -xO5 -dalign" - fi;; - rs6000*-aix*) if test "$CXX" = xlC; then - CXXFLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w" - fi;; - powerpc*-aix*) - if test "$CXX" = xlC; then - CXXFLAGS="-O3 -qarch=ppc -qansialias -w" - echo "*******************************************************" - echo "* You have AIX on an unknown powerpc system. It is *" - echo "* recommended that you use *" - echo "* *" - echo "* CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w *" - echo "* ^^^ *" - echo "* where xxx is 601, 603, 604, or whatever kind of *" - echo "* PowerPC CPU you have. For more info, man cc. *" - echo "*******************************************************" - fi;; - *darwin*) - if test "$CXX" = xlC; then - CXXFLAGS="-O3 -qtune=auto -qansialias -w" - echo "*******************************************************" - echo "* You have AIX on an unknown powerpc system. It is *" - echo "* recommended that you use *" - echo "* *" - echo "* CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w *" - echo "* ^^^ *" - echo "* where xxx is 601, 603, 604, or whatever kind of *" - echo "* PowerPC CPU you have. For more info, man cc. *" - echo "*******************************************************" - fi;; - esac - - # use default flags for gcc on all systems - if test $ac_cv_c_compiler_gnu = yes; then - CXXFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic" +OOPSE_TEMPLATE_FLAGS="" +if test $ac_cv_cxx_compiler_gnu = no; then + echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -ptused -no_prelink" >&5 +echo $ECHO_N "checking checking whether ${CXX} accepts -ptused -no_prelink... $ECHO_C" >&6 + echo 'void f(){}' > conftest.cc + if test -z "`${CXX} -ptused -no_prelink -c conftest.cc 2>&1`"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + OOPSE_TEMPLATE_FLAGS="-ptused -no_prelink" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - - # test for gcc-specific flags: - if test $ac_cv_c_compiler_gnu = yes; then - # -malign-double for x86 systems - - -echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -malign-double" >&5 -echo $ECHO_N "checking whether ${CXX-c++} accepts -malign-double... $ECHO_C" >&6 -if test "${ac_align_double+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.cpp -if test -z "`${CXX-c++} -malign-double -c conftest.cpp 2>&1`"; then - ac_align_double=yes -else - ac_align_double=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_align_double" >&5 -echo "${ECHO_T}$ac_align_double" >&6 -if test "$ac_align_double" = yes; then - : - CXXFLAGS="$CXXFLAGS -malign-double" -else - : - -fi - - # -fstrict-aliasing for gcc-2.95+ - - -echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -fstrict-aliasing" >&5 -echo $ECHO_N "checking whether ${CXX-c++} accepts -fstrict-aliasing... $ECHO_C" >&6 -if test "${ac_fstrict_aliasing+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.cpp -if test -z "`${CXX-c++} -fstrict-aliasing -c conftest.cpp 2>&1`"; then - ac_fstrict_aliasing=yes -else - ac_fstrict_aliasing=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5 -echo "${ECHO_T}$ac_fstrict_aliasing" >&6 -if test "$ac_fstrict_aliasing" = yes; then - : - CXXFLAGS="$CXXFLAGS -fstrict-aliasing" -else - : - -fi - + rm -f conftest* + echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -instances=static" >&5 +echo $ECHO_N "checking checking whether ${CXX} accepts -instances=static... $ECHO_C" >&6 + echo 'void f(){}' > conftest.cc + if test -z "`${CXX} -instances=static -c conftest.cc 2>&1`"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + OOPSE_TEMPLATE_FLAGS="-instances=static" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - - CPU_FLAGS="" - if test "$GCC" = "yes"; then - case "${host_cpu}" in - i586*) - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentium" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentium... $ECHO_C" >&6 -if test "${ac_cpu_pentium+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -mcpu=pentium -c conftest.c 2>&1`"; then - ac_cpu_pentium=yes -else - ac_cpu_pentium=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5 -echo "${ECHO_T}$ac_cpu_pentium" >&6 -if test "$ac_cpu_pentium" = yes; then - : - CPU_FLAGS=-mcpu=pentium -else - : - - -echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpentium" >&5 -echo $ECHO_N "checking whether ${CXX-c++} accepts -mpentium... $ECHO_C" >&6 -if test "${ac_pentium+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.cpp -if test -z "`${CXX-c++} -mpentium -c conftest.cpp 2>&1`"; then - ac_pentium=yes -else - ac_pentium=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_pentium" >&5 -echo "${ECHO_T}$ac_pentium" >&6 -if test "$ac_pentium" = yes; then - : - CPU_FLAGS=-mpentium -else - : - -fi - -fi - - ;; - i686*) - -echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=pentiumpro" >&5 -echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=pentiumpro... $ECHO_C" >&6 -if test "${ac_cpu_pentiumpro+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.cpp -if test -z "`${CXX-c++} -mcpu=pentiumpro -c conftest.cpp 2>&1`"; then - ac_cpu_pentiumpro=yes -else - ac_cpu_pentiumpro=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5 -echo "${ECHO_T}$ac_cpu_pentiumpro" >&6 -if test "$ac_cpu_pentiumpro" = yes; then - : - CPU_FLAGS=-mcpu=pentiumpro -else - : - - -echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpentiumpro" >&5 -echo $ECHO_N "checking whether ${CXX-c++} accepts -mpentiumpro... $ECHO_C" >&6 -if test "${ac_pentiumpro+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.cpp -if test -z "`${CXX-c++} -mpentiumpro -c conftest.cpp 2>&1`"; then - ac_pentiumpro=yes -else - ac_pentiumpro=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5 -echo "${ECHO_T}$ac_pentiumpro" >&6 -if test "$ac_pentiumpro" = yes; then - : - CPU_FLAGS=-mpentiumpro -else - : - -fi - -fi - - ;; - powerpc*) - cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null` - is60x=`echo $cputype | egrep "^600-9e?$"` - if test -n "$is60x"; then - - -echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=$cputype" >&5 -echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=$cputype... $ECHO_C" >&6 -if test "${ac_m_cpu_60x+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.cpp -if test -z "`${CXX-c++} -mcpu=$cputype -c conftest.cpp 2>&1`"; then - ac_m_cpu_60x=yes -else - ac_m_cpu_60x=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5 -echo "${ECHO_T}$ac_m_cpu_60x" >&6 -if test "$ac_m_cpu_60x" = yes; then - : - CPU_FLAGS=-mcpu=$cputype -else - : - -fi - - elif test "$cputype" = 750; then - - -echo "$as_me:$LINENO: checking whether we are using gcc 2.95 or later" >&5 -echo $ECHO_N "checking whether we are using gcc 2.95 or later... $ECHO_C" >&6 -if test "${ac_cv_prog_gcc_2_95+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -cat > conftest.c < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) - yes; -# endif -#endif -EOF -if { ac_try='${CC-cc} -E conftest.c' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc_2_95=yes -else - ac_cv_prog_gcc_2_95=no -fi - -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_2_95" >&5 -echo "${ECHO_T}$ac_cv_prog_gcc_2_95" >&6 -if test "$ac_cv_prog_gcc_2_95" = yes; then - : - - -echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=750" >&5 -echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=750... $ECHO_C" >&6 -if test "${ac_m_cpu_750+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.cpp -if test -z "`${CXX-c++} -mcpu=750 -c conftest.cpp 2>&1`"; then - ac_m_cpu_750=yes -else - ac_m_cpu_750=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5 -echo "${ECHO_T}$ac_m_cpu_750" >&6 -if test "$ac_m_cpu_750" = yes; then - : - CPU_FLAGS=-mcpu=750 -else - : - -fi - -else - : - -fi - - fi - if test -z "$CPU_FLAGS"; then - - -echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=powerpc" >&5 -echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=powerpc... $ECHO_C" >&6 -if test "${ac_m_cpu_powerpc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.cpp -if test -z "`${CXX-c++} -mcpu=powerpc -c conftest.cpp 2>&1`"; then - ac_m_cpu_powerpc=yes -else - ac_m_cpu_powerpc=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5 -echo "${ECHO_T}$ac_m_cpu_powerpc" >&6 -if test "$ac_m_cpu_powerpc" = yes; then - : - CPU_FLAGS=-mcpu=powerpc -else - : - -fi - - fi - if test -z "$CPU_FLAGS"; then - - -echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpowerpc" >&5 -echo $ECHO_N "checking whether ${CXX-c++} accepts -mpowerpc... $ECHO_C" >&6 -if test "${ac_m_powerpc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.cpp -if test -z "`${CXX-c++} -mpowerpc -c conftest.cpp 2>&1`"; then - ac_m_powerpc=yes -else - ac_m_powerpc=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5 -echo "${ECHO_T}$ac_m_powerpc" >&6 -if test "$ac_m_powerpc" = yes; then - : - CPU_FLAGS=-mpowerpc -else - : - -fi - - fi - esac + rm -f conftest* + echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -pto" >&5 +echo $ECHO_N "checking checking whether ${CXX} accepts -pto... $ECHO_C" >&6 + echo 'void f(){}' > conftest.cc + if test -z "`${CXX} -pto -c conftest.cc 2>&1`"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + OOPSE_TEMPLATE_FLAGS="-pto" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi + rm -f conftest* + echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -LANG:std" >&5 +echo $ECHO_N "checking checking whether ${CXX} accepts -LANG:std... $ECHO_C" >&6 + echo 'void f(){}' > conftest.cc + if test -z "`${CXX} -LANG:std -c conftest.cc 2>&1`"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 - if test -n "$CPU_FLAGS"; then - CXXFLAGS="$CXXFLAGS $CPU_FLAGS" - fi - if test -z "$CXXFLAGS"; then - echo "" - echo "**********************************************************" - echo "* WARNING: Don't know the best CXXFLAGS for this system *" - echo "* Use make CXXFLAGS=..., or edit the top level Makefile *" - echo "* (otherwise, a default of CXXFLAGS=-O3 will be used) *" - echo "**********************************************************" - echo "" - CXXFLAGS="-O3" + EXTRA_CC_FLAG=${EXTRA_CC_FLAG}" -LANG:std" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - - - -echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts ${CXXFLAGS}" >&5 -echo $ECHO_N "checking whether ${CXX-c++} accepts ${CXXFLAGS}... $ECHO_C" >&6 -if test "${ac_guessed_cxxflags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - echo 'void f(){}' > conftest.cpp -if test -z "`${CXX-c++} ${CXXFLAGS} -c conftest.cpp 2>&1`"; then - ac_guessed_cxxflags=yes -else - ac_guessed_cxxflags=no fi -rm -f conftest* -fi -echo "$as_me:$LINENO: result: $ac_guessed_cxxflags" >&5 -echo "${ECHO_T}$ac_guessed_cxxflags" >&6 -if test "$ac_guessed_cxxflags" = yes; then - : -else - : - echo "" - echo "**********************************************************" - echo "* WARNING: The guessed CXXFLAGS don't seem to work with *" - echo "* your compiler. *" - echo "* Use make CXXFLAGS=..., or edit the top level Makefile *" - echo "**********************************************************" - echo "" - CXXFLAGS="" -fi - - -fi - ac_ext=f90 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f90_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95 + for ac_prog in ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -3779,7 +2989,7 @@ if test -z "$F90"; then fi if test -z "$F90"; then ac_ct_F90=$F90 - for ac_prog in ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95 + for ac_prog in ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -3880,337 +3090,1944 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Try to determine "good" native compiler flags if none specified on command -# line +# Try to determine native compiler flags that allow us to use F90 suffix +# for preprocessed f90 source. -if test x"$F90FLAGS" == x ; then - F90FLAGS="" +if test "$ac_test_PREPFLAG" != "set"; then + PREPFLAG="" case "${host_cpu}-${host_os}" in - *linux*) if test "$F90" = ifc; then - F90FLAGS="-O" + *linux*) if test "$F90" = ifc -o "$F90" = ifort; then + PREPFLAG="-fpp1 " fi;; - rs6000*-aix*) if test "$F90" = xlf90 -o "$F90" = f90; then - F90FLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w" + *aix*) if test "$F90" = xlf90 -o "$F90" = f90; then + PREPFLAG="-qsuffix=cpp=F90 " fi;; - powerpc*-aix*) + *darwin*) if test "$F90" = f90 -o "$F90" = xlf90; then - F90FLAGS="-O3 -qarch=ppc -qansialias -w" - echo "*******************************************************" - echo "* You have AIX on an unknown powerpc system. It is *" - echo "* recommended that you use *" - echo "* *" - echo "* F90FLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w *" - echo "* ^^^ *" - echo "* where xxx is 601, 603, 604, or whatever kind of *" - echo "* PowerPC CPU you have. For more info, man xlf. *" - echo "*******************************************************" + PREPFLAG="-qsuffix=cpp=F90 " fi;; - *darwin*) - if test "$F90" = f90 -o "$F90" = xlf90; then - F90FLAGS="-O3 -qtune=auto -w" - echo "*********************************************************" - echo "* You have Darwin on an unknown powerpc system. It is *" - echo "* recommended that you use *" - echo "* *" - echo "* CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w *" - echo "* ^^^ *" - echo "* where xxx is 601, 603, 604, or whatever kind of *" - echo "* PowerPC CPU you have. For more info, man xlf. *" - echo "*********************************************************" - fi;; esac - if test -n "$CPU_FLAGS"; then - F90FLAGS="$F90FLAGS $CPU_FLAGS" + if test -z "$PREPFLAG"; then + { echo "$as_me:$LINENO: WARNING: \"Using empty PREPFLAG\"" >&5 +echo "$as_me: WARNING: \"Using empty PREPFLAG\"" >&2;} + PREPFLAG="" fi - if test -z "$F90FLAGS"; then - echo "" - echo "**********************************************************" - echo "* WARNING: Don't know the best F90FLAGS for this system *" - echo "* Use make F90FLAGS=..., or edit the top level Makefile *" - echo "* (otherwise, a default of F90FLAGS=-O3 will be used) *" - echo "**********************************************************" - echo "" - F90FLAGS="-O3" - fi + echo "$as_me:$LINENO: checking to make sure F90 preprocessor flag works" >&5 +echo $ECHO_N "checking to make sure F90 preprocessor flag works... $ECHO_C" >&6 -echo "$as_me:$LINENO: checking whether ${F90-f90} accepts ${F90FLAGS}" >&5 -echo $ECHO_N "checking whether ${F90-f90} accepts ${F90FLAGS}... $ECHO_C" >&6 -if test "${ac_guessed_f90flags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - - -ac_ext=f90 + ac_ext=f90 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f90_compiler_gnu -echo 'program main' > conftest.$ac_ext -echo 'end program main' >> conftest.$ac_ext -ac_compile='${F90-f90} -c ${F90FLAGS} $F90FLAGS conftest.$ac_ext 1>&5' -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - ac_guessed_f90flags=yes -else - ac_guessed_f90flags=no -fi -rm -f conftest* -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' + ac_save_ext=$ac_ext + ac_ext=F90 + ac_save_F90FLAGS=$F90FLAGS + + if test "$PREPFLAG"; then + F90FLAGS="${F90FLAGS} ${PREPFLAG}-DTEST" +fi + + cat >conftest.$ac_ext <<_ACEOF + + +program main + + integer :: i + i = 1 + + +end program main + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + prepflagworks=1 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +prepflagworks=0 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + + F90FLAGS=$ac_save_F90FLAGS + ac_ext=$ac_save_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + if test "$prepflagworks" = 1; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: Can't figure out working Fortran90 preprocessor flag" >&5 +echo "$as_me: error: Can't figure out working Fortran90 preprocessor flag" >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + + + +# Try to determine native compiler flags that allow us to use F90 suffix +# for preprocessed f90 source with -D type defines + +if test "$ac_test_PREPDEFFLAG" != "set"; then + PREPDEFFLAG="" + case "${host_cpu}-${host_os}" in + + *linux*) if test "$F90" = ifc -o "$F90" = ifort; then + PREPDEFFLAG=" " + fi;; + *aix*) if test "$F90" = xlf90 -o "$F90" = f90; then + PREPDEFFLAG="-WF," + fi;; + *darwin*) + if test "$F90" = f90 -o "$F90" = xlf90; then + PREPDEFFLAG="-WF," + fi;; + esac + + if test -z "$PREPDEFFLAG"; then + { echo "$as_me:$LINENO: WARNING: \"Using empty PREPDEFFLAG\"" >&5 +echo "$as_me: WARNING: \"Using empty PREPDEFFLAG\"" >&2;} + PREPDEFFLAG=" " + fi + + echo "$as_me:$LINENO: checking to make sure F90 preprocessor define flag works" >&5 +echo $ECHO_N "checking to make sure F90 preprocessor define flag works... $ECHO_C" >&6 + + + ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + + ac_save_ext=$ac_ext + ac_ext=F90 + ac_save_F90FLAGS=$F90FLAGS + + if test "$PREPDEFFLAG"; then + F90FLAGS="${F90FLAGS} ${PREPFLAG} ${PREPDEFFLAG}-DTEST" +fi + + cat >conftest.$ac_ext <<_ACEOF + + +program main + + integer :: i +#ifdef TEST + i = 1 +#else + choke me +#endif + + +end program main + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + prepdefflagworks=1 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +prepdefflagworks=0 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + + F90FLAGS=$ac_save_F90FLAGS + ac_ext=$ac_save_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + if test "$prepdefflagworks" = 1; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: Can't figure out working Fortran90 preprocessor define flag" >&5 +echo "$as_me: error: Can't figure out working Fortran90 preprocessor define flag" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + + + +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu +echo "$as_me:$LINENO: checking how to get verbose linking output from $F90" >&5 +echo $ECHO_N "checking how to get verbose linking output from $F90... $ECHO_C" >&6 +if test "${ac_cv_prog_f90_v+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat >conftest.$ac_ext <<_ACEOF + +program main + + +end program main + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_f90_v= +# Try some options frequently used verbose output +for ac_verb in -v -verbose --verbose -V -\#\#\#; do + ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + +cat >conftest.$ac_ext <<_ACEOF + +program main + + +end program main + +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran 90 compiler in order to get +# "verbose" output that we can then parse for the Fortran 90 linker +# flags. +ac_save_F90FLAGS=$F90FLAGS +F90FLAGS="$F90FLAGS $ac_verb" + +(eval echo $as_me:3357: \"$ac_link\") >&5 +ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` +echo "$ac_f90_v_output" >&5 +F90FLAGS=$ac_save_F90FLAGS + +rm -f conftest.* +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + +# If we are using xlf then replace all the commas with spaces. +if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then + ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'` +fi + +# If we are using Cray Fortran then delete quotes. +# Use "\"" instead of '"' for font-lock-mode. +# FIXME: a more general fix for quoted arguments with spaces? +if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then + ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"` +fi + # look for -l* and *.a constructs in the output + for ac_arg in $ac_f90_v_output; do + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) + ac_cv_prog_f90_v=$ac_verb + break 2 ;; + esac + done +done +if test -z "$ac_cv_prog_f90_v"; then + { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F90" >&5 +echo "$as_me: WARNING: cannot determine how to obtain linking information from $F90" >&2;} +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ echo "$as_me:$LINENO: WARNING: compilation failed" >&5 +echo "$as_me: WARNING: compilation failed" >&2;} +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f90_v" >&5 +echo "${ECHO_T}$ac_cv_prog_f90_v" >&6 +echo "$as_me:$LINENO: checking for Fortran 90 libraries" >&5 +echo $ECHO_N "checking for Fortran 90 libraries... $ECHO_C" >&6 +if test "${ac_cv_flibs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$F90LIBS" != "x"; then + ac_cv_f90libs="$F90LIBS" # Let the user override the test. +else + +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + +cat >conftest.$ac_ext <<_ACEOF + +program main + + +end program main + +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran 90 compiler in order to get +# "verbose" output that we can then parse for the Fortran 90 linker +# flags. +ac_save_F90FLAGS=$F90FLAGS +F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v" + +(eval echo $as_me:3434: \"$ac_link\") >&5 +ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` +echo "$ac_f90_v_output" >&5 +F90FLAGS=$ac_save_F90FLAGS + +rm -f conftest.* +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + +# If we are using xlf then replace all the commas with spaces. +if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then + ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'` +fi + +# If we are using Cray Fortran then delete quotes. +# Use "\"" instead of '"' for font-lock-mode. +# FIXME: a more general fix for quoted arguments with spaces? +if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then + ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"` +fi + +ac_cv_f90libs= + +# Save positional arguments (if any) +ac_save_positional="$@" + +set X $ac_f90_v_output +while test $# != 1; do + shift + ac_arg=$1 + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a) + ac_exists=false + for ac_i in $ac_cv_f90libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_cv_f90libs="$ac_cv_f90libs $ac_arg" +fi + + ;; + -bI:*) + ac_exists=false + for ac_i in $ac_cv_f90libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_arg; do + ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt" + done +else + ac_cv_f90libs="$ac_cv_f90libs $ac_arg" +fi +fi + + ;; + # Ignore these flags. + -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*) + ;; + -lkernel32) + test x"$CYGWIN" != xyes && ac_cv_f90libs="$ac_cv_f90libs $ac_arg" + ;; + -[LRuY]) + # These flags, when seen by themselves, take an argument. + # We remove the space between option and argument and re-iterate + # unless we find an empty arg or a new option (starting with -) + case $2 in + "" | -*);; + *) + ac_arg="$ac_arg$2" + + shift; shift + set X $ac_arg "$@" + ;; + esac + ;; + -YP,*) + for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + ac_exists=false + for ac_i in $ac_cv_f90libs; do + if test x"$ac_j" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_arg="$ac_arg $ac_j" + ac_cv_f90libs="$ac_cv_f90libs $ac_j" +fi + + done + ;; + -[lLR]*) + ac_exists=false + for ac_i in $ac_cv_f90libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_cv_f90libs="$ac_cv_f90libs $ac_arg" +fi + + ;; + # Ignore everything else. + esac +done +# restore positional arguments +set X $ac_save_positional; shift + +# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, +# then we insist that the "run path" must be an absolute path (i.e. it +# must begin with a "/"). +case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + ac_ld_run_path=`echo $ac_f90_v_output | + sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` + test "x$ac_ld_run_path" != x && + + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_ld_run_path; do + ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt" + done +else + ac_cv_f90libs="$ac_cv_f90libs $ac_ld_run_path" +fi + ;; +esac +fi # test "x$F90LIBS" = "x" + +fi +echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5 +echo "${ECHO_T}$ac_cv_flibs" >&6 +F90LIBS="$ac_cv_f90libs" + +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + + +echo "$as_me:$LINENO: checking for Fortran 90 name-mangling scheme" >&5 +echo $ECHO_N "checking for Fortran 90 name-mangling scheme... $ECHO_C" >&6 +if test "${ac_cv_f90_mangling+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu +cat >conftest.$ac_ext <<_ACEOF +subroutine foobar() +return +end +subroutine foo_bar() +return +end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + mv conftest.$ac_objext cf90_test.$ac_objext + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_save_LIBS=$LIBS + LIBS="cf90_test.$ac_objext $F90LIBS $LIBS" + + ac_success=no + for ac_foobar in foobar FOOBAR; do + for ac_underscore in "" "_"; do + ac_func="$ac_foobar$ac_underscore" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +int +main () +{ +$ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_success=yes; break 2 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done + done + + if test "$ac_success" = "yes"; then + case $ac_foobar in + foobar) + ac_case=lower + ac_foo_bar=foo_bar + ;; + FOOBAR) + ac_case=upper + ac_foo_bar=FOO_BAR + ;; + esac + + ac_success_extra=no + for ac_extra in "" "_"; do + ac_func="$ac_foo_bar$ac_underscore$ac_extra" + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +int +main () +{ +$ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_success_extra=yes; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done + + if test "$ac_success_extra" = "yes"; then + ac_cv_f90_mangling="$ac_case case" + if test -z "$ac_underscore"; then + ac_cv_f90_mangling="$ac_cv_f90_mangling, no underscore" + else + ac_cv_f90_mangling="$ac_cv_f90_mangling, underscore" + + fi + if test -z "$ac_extra"; then + ac_cv_f90_mangling="$ac_cv_f90_mangling, no extra underscore" + else + ac_cv_f90_mangling="$ac_cv_f90_mangling, extra underscore" + fi + else + ac_cv_f90_mangling="unknown" + fi + else + ac_cv_f90_mangling="unknown" + + fi + + LIBS=$ac_save_LIBS + ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + rm -f cf90_test* conftest* +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f90_mangling" >&5 +echo "${ECHO_T}$ac_cv_f90_mangling" >&6 + + + +case $ac_cv_f90_mangling in + "lower case, no underscore, no extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) name +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) name +_ACEOF + ;; + "lower case, no underscore, extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) name +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) name ## _ +_ACEOF + ;; + "lower case, underscore, no extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) name ## _ +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) name ## _ +_ACEOF + ;; + "lower case, underscore, extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) name ## _ +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) name ## __ +_ACEOF + ;; + "upper case, no underscore, no extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) NAME +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) NAME +_ACEOF + ;; + "upper case, no underscore, extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) NAME +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) NAME ## _ +_ACEOF + ;; + "upper case, underscore, no extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) NAME ## _ +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) NAME ## _ +_ACEOF + ;; + "upper case, underscore, extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) NAME ## _ +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) NAME ## __ +_ACEOF + ;; + *) + { echo "$as_me:$LINENO: WARNING: unknown Fortran 90 name-mangling scheme" >&5 +echo "$as_me: WARNING: unknown Fortran 90 name-mangling scheme" >&2;} + ;; +esac + + + + + +echo "$as_me:$LINENO: checking for module suffix" >&5 +echo $ECHO_N "checking for module suffix... $ECHO_C" >&6 +rm -f conftest* +# Intel ifc compiler generates files by the name of work.pc and work.pcl (!) +rm -f work* +cat >conftest.f90 < conftest.out 2>&1 ; then + MOD=`ls conftest* | grep -v conftest.f | grep -v conftest.o` + MOD=`echo "$MOD" | sed -e 's/conftest\.//g'` + if test -z "$MOD" ; then + MOD=`ls CONFTEST* 2>/dev/null \ + | grep -v CONFTEST.f | grep -v CONFTEST.o` + MOD=`echo "$MOD" | sed -e 's/CONFTEST\.//g'` + if test -n "$MOD" ; then + testname="CONFTEST" + modcase="upper" + fi + fi + if test -z "$MOD" ; then + echo "$as_me:$LINENO: result: unknown" >&5 +echo "${ECHO_T}unknown" >&6 + # Use mod if we can't figure it out + MOD="mod" + else + echo "$as_me:$LINENO: result: $MOD" >&5 +echo "${ECHO_T}$MOD" >&6 + fi + if test -s work.pcl ; then + { echo "$as_me:$LINENO: WARNING: Compiler generates auxillery files!" >&5 +echo "$as_me: WARNING: Compiler generates auxillery files!" >&2;} + fi +else + echo "$as_me:$LINENO: result: unknown" >&5 +echo "${ECHO_T}unknown" >&6 +fi + + + + + +# Check for module include path (some use -I, some (Solaris) use -M, some +# (absoft) use -p). +# Intel compilers use a wierd system: -cl,filename.pcl . If no file is +# specified, work.pcl and work.pc are created. However, if you specify +# a file, it must contain a the name of a file ending in .pc . Ugh! +# Use the module made above +echo "$as_me:$LINENO: checking for module directory path flag" >&5 +echo $ECHO_N "checking for module directory path flag... $ECHO_C" >&6 +rm -f conftest* +# Intel ifc compiler generates files by the name of work.pc and work.pcl (!) +rm -f work* +cat >conftest.f90 < conftest.out 2>&1 ; then + mod=`ls CONFTEST* 2>/dev/null | grep -v CONFTEST.f | grep -v CONFTEST.o` + mod=`echo "$mod" | sed -e 's/CONFTEST\.//g'` + if test -n "$mod" ; then + testname="CONFTEST" + fi + madedir=0 + if test ! -d conf ; then mkdir conf ; madedir=1; fi + cp $testname.$MOD conf + rm -f conftest* CONFTEST* + cat >conftest1.f90 < conftest.out 2>&1 ; then + MODDIRFLAG="-I" + F90MODINCSPEC="-I" + echo "$as_me:$LINENO: result: -I" >&5 +echo "${ECHO_T}-I" >&6 + elif $F90 -c -Mconf conftest1.f90 >> conftest.out 2>&1 ; then + MODDIRFLAG="-M" + F90MODINCSPEC="-M" + echo "$as_me:$LINENO: result: -M" >&5 +echo "${ECHO_T}-M" >&6 + elif $F90 -c -pconf conftest1.f90 >> conftest.out 2>&1 ; then + MODDIRFLAG="-p" + F90MODINCSPEC="-p" + echo "$as_me:$LINENO: result: -p" >&5 +echo "${ECHO_T}-p" >&6 + elif test -s work.pc ; then + cp work.pc conf/mpimod.pc + echo "mpimod.pc" > conf/mpimod.pcl + echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl + if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then + MODDIRFLAG='-cl,mpimod.pcl' + echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and directories" >&5 +echo "${ECHO_T}-cl,filename where filename contains a list of files and directories" >&6 + F90_WORK_FILES_ARG="-cl,mpimod.pcl" + F90MODINCSPEC="-cl,/mod.pcl" + + else + # The version of the Intel compiler that I have refuses to let + # you put the "work catalog" list anywhere but the current + # directory. For example, you cannot in + : + fi + fi + if test -z "MODDIRFLAG" ; then + echo "$as_me:$LINENO: result: unknown" >&5 +echo "${ECHO_T}unknown" >&6 + fi + + + rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod* + if test $madedir = 1 ; then rmdir conf ; fi +fi + + + + +case $debug in + 1) + ;; + *) + + + + + + +echo "$as_me:$LINENO: checking whether we are *really* using GNU cc" >&5 +echo $ECHO_N "checking whether we are *really* using GNU cc... $ECHO_C" >&6 +if test "${ac_cv_prog_really_gcc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_really_gcc=yes +else + ac_cv_prog_really_gcc=no +fi + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_really_gcc" >&5 +echo "${ECHO_T}$ac_cv_prog_really_gcc" >&6 +if test "$ac_cv_prog_really_gcc" = yes; then + : + +else + : + +fi + + +# Try to determine "good" native compiler flags if none specified on command +# line +if test "$ac_test_CFLAGS" != "set"; then + CFLAGS="" + case "${host_cpu}-${host_os}" in + + *linux*) if test "$CC" = icc; then + CFLAGS="-O" + fi;; + sparc-solaris2*) if test "$CC" = cc; then + CFLAGS="-native -fast -xO5 -dalign" + fi;; + + alpha*-osf*) if test "$CC" = cc; then + CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host -arch host -std1" + fi;; + + hppa*-hpux*) if test "$CC" = cc; then + CFLAGS="-Ae +O3 +Oall" + fi;; + + rs6000*-aix*) if test "$CC" = cc -o "$CC" = xlc; then + CFLAGS="-O3 -qtune=auto -qansialias -w" + fi;; + powerpc*-aix*) + if test "$CC" = cc -o "$CC" = xlc; then + CFLAGS="-O3 -qtune=auto -qansialias -w" + echo "*******************************************************" + echo "* You have AIX on an unknown powerpc system. It is *" + echo "* recommended that you use *" + echo "* *" + echo "* CFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w *" + echo "* ^^^ *" + echo "* where xxx is 601, 603, 604, or whatever kind of *" + echo "* PowerPC CPU you have. For more info, man cc. *" + echo "*******************************************************" + fi;; + *darwin*) + if test "$CC" = xlc -o "$CC" = cc; then + CFLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto -qaltivec" + fi;; + esac + + # use default flags for gcc on all systems + if test $ac_cv_prog_really_gcc = yes; then + CFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic" + fi + + # test for gcc-specific flags: + if test $ac_cv_prog_really_gcc = yes; then + # -malign-double for x86 systems + + +echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -malign-double" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts -malign-double... $ECHO_C" >&6 +if test "${ac_align_double+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -malign-double -c conftest.c 2>&1`"; then + ac_align_double=yes +else + ac_align_double=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_align_double" >&5 +echo "${ECHO_T}$ac_align_double" >&6 +if test "$ac_align_double" = yes; then + : + CFLAGS="$CFLAGS -malign-double" +else + : + +fi + + # -fstrict-aliasing for gcc-2.95+ + + +echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -fstrict-aliasing" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts -fstrict-aliasing... $ECHO_C" >&6 +if test "${ac_fstrict_aliasing+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -fstrict-aliasing -c conftest.c 2>&1`"; then + ac_fstrict_aliasing=yes +else + ac_fstrict_aliasing=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5 +echo "${ECHO_T}$ac_fstrict_aliasing" >&6 +if test "$ac_fstrict_aliasing" = yes; then + : + CFLAGS="$CFLAGS -fstrict-aliasing" +else + : + +fi + + fi + + CPU_FLAGS="" + if test $ac_cv_prog_really_gcc = yes; then + case "${host_cpu}" in + i586*) + +echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentium" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentium... $ECHO_C" >&6 +if test "${ac_cpu_pentium+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -mcpu=pentium -c conftest.c 2>&1`"; then + ac_cpu_pentium=yes +else + ac_cpu_pentium=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5 +echo "${ECHO_T}$ac_cpu_pentium" >&6 +if test "$ac_cpu_pentium" = yes; then + : + CPU_FLAGS=-mcpu=pentium +else + : + + +echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpentium" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts -mpentium... $ECHO_C" >&6 +if test "${ac_pentium+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -mpentium -c conftest.c 2>&1`"; then + ac_pentium=yes +else + ac_pentium=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_pentium" >&5 +echo "${ECHO_T}$ac_pentium" >&6 +if test "$ac_pentium" = yes; then + : + CPU_FLAGS=-mpentium +else + : + +fi + +fi + + ;; + i686*) + +echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentiumpro" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentiumpro... $ECHO_C" >&6 +if test "${ac_cpu_pentiumpro+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -mcpu=pentiumpro -c conftest.c 2>&1`"; then + ac_cpu_pentiumpro=yes +else + ac_cpu_pentiumpro=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5 +echo "${ECHO_T}$ac_cpu_pentiumpro" >&6 +if test "$ac_cpu_pentiumpro" = yes; then + : + CPU_FLAGS=-mcpu=pentiumpro +else + : + + +echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpentiumpro" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts -mpentiumpro... $ECHO_C" >&6 +if test "${ac_pentiumpro+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -mpentiumpro -c conftest.c 2>&1`"; then + ac_pentiumpro=yes +else + ac_pentiumpro=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5 +echo "${ECHO_T}$ac_pentiumpro" >&6 +if test "$ac_pentiumpro" = yes; then + : + CPU_FLAGS=-mpentiumpro +else + : + +fi + +fi + + ;; + powerpc*) + cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null` + is60x=`echo $cputype | egrep "^600-9e?$"` + if test -n "$is60x"; then + + +echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=$cputype" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=$cputype... $ECHO_C" >&6 +if test "${ac_m_cpu_60x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -mcpu=$cputype -c conftest.c 2>&1`"; then + ac_m_cpu_60x=yes +else + ac_m_cpu_60x=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5 +echo "${ECHO_T}$ac_m_cpu_60x" >&6 +if test "$ac_m_cpu_60x" = yes; then + : + CPU_FLAGS=-mcpu=$cputype +else + : + +fi + + elif test "$cputype" = 750; then + + +echo "$as_me:$LINENO: checking whether we are using gcc 2.95 or later" >&5 +echo $ECHO_N "checking whether we are using gcc 2.95 or later... $ECHO_C" >&6 +if test "${ac_cv_prog_gcc_2_95+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat > conftest.c < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) + yes; +# endif +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc_2_95=yes +else + ac_cv_prog_gcc_2_95=no +fi + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_2_95" >&5 +echo "${ECHO_T}$ac_cv_prog_gcc_2_95" >&6 +if test "$ac_cv_prog_gcc_2_95" = yes; then + : + + +echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=750" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=750... $ECHO_C" >&6 +if test "${ac_m_cpu_750+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -mcpu=750 -c conftest.c 2>&1`"; then + ac_m_cpu_750=yes +else + ac_m_cpu_750=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5 +echo "${ECHO_T}$ac_m_cpu_750" >&6 +if test "$ac_m_cpu_750" = yes; then + : + CPU_FLAGS=-mcpu=750 +else + : + +fi + +else + : + +fi + + fi + if test -z "$CPU_FLAGS"; then + + +echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=powerpc" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=powerpc... $ECHO_C" >&6 +if test "${ac_m_cpu_powerpc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -mcpu=powerpc -c conftest.c 2>&1`"; then + ac_m_cpu_powerpc=yes +else + ac_m_cpu_powerpc=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5 +echo "${ECHO_T}$ac_m_cpu_powerpc" >&6 +if test "$ac_m_cpu_powerpc" = yes; then + : + CPU_FLAGS=-mcpu=powerpc +else + : + +fi + + fi + if test -z "$CPU_FLAGS"; then + + +echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpowerpc" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts -mpowerpc... $ECHO_C" >&6 +if test "${ac_m_powerpc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -mpowerpc -c conftest.c 2>&1`"; then + ac_m_powerpc=yes +else + ac_m_powerpc=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5 +echo "${ECHO_T}$ac_m_powerpc" >&6 +if test "$ac_m_powerpc" = yes; then + : + CPU_FLAGS=-mpowerpc +else + : + +fi + + fi + esac + fi + + if test -n "$CPU_FLAGS"; then + CFLAGS="$CFLAGS $CPU_FLAGS" + fi + + if test -z "$CFLAGS"; then + echo "" + echo "********************************************************" + echo "* WARNING: Don't know the best CFLAGS for this system *" + echo "* Use make CFLAGS=..., or edit the top level Makefile *" + echo "* (otherwise, a default of CFLAGS=-O3 will be used) *" + echo "********************************************************" + echo "" + CFLAGS="-O3" + fi + + + +echo "$as_me:$LINENO: checking whether ${CC-cc} accepts ${CFLAGS}" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts ${CFLAGS}... $ECHO_C" >&6 +if test "${ac_guessed_cflags+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} ${CFLAGS} -c conftest.c 2>&1`"; then + ac_guessed_cflags=yes +else + ac_guessed_cflags=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_guessed_cflags" >&5 +echo "${ECHO_T}$ac_guessed_cflags" >&6 +if test "$ac_guessed_cflags" = yes; then + : + +else + : + + echo "" + echo "********************************************************" + echo "* WARNING: The guessed CFLAGS don't seem to work with *" + echo "* your compiler. *" + echo "* Use make CFLAGS=..., or edit the top level Makefile *" + echo "********************************************************" + echo "" + CFLAGS="" + +fi + + +fi + + + + + + + +echo "$as_me:$LINENO: checking whether we are *really* using GNU c++" >&5 +echo $ECHO_N "checking whether we are *really* using GNU c++... $ECHO_C" >&6 +if test "${ac_cv_prog_really_gxx+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat > conftest.cpp <&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_really_gxx=yes +else + ac_cv_prog_really_gxx=no +fi + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_really_gxx" >&5 +echo "${ECHO_T}$ac_cv_prog_really_gxx" >&6 +if test "$ac_cv_prog_really_gxx" = yes; then + : + +else + : + +fi + + +# Try to determine "good" native compiler flags if none specified on command +# line +if test "$ac_test_CXXFLAGS" != "set"; then + CXXFLAGS="" + case "${host_cpu}-${host_os}" in + + *linux*) if test "$CXX" = icc -o "$CXX" = icpc; then + CXXFLAGS="-O" + fi;; + sparc-solaris2*) if test "$CXX" = CC; then + CXXFLAGS="-native -fast -xO5 -dalign" + fi;; + rs6000*-aix*) if test "$CXX" = xlC; then + CXXFLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w" + fi;; + powerpc*-aix*) + if test "$CXX" = xlC; then + CXXFLAGS="-O3 -qarch=ppc -qansialias -w" + echo "*******************************************************" + echo "* You have AIX on an unknown powerpc system. It is *" + echo "* recommended that you use *" + echo "* *" + echo "* CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w *" + echo "* ^^^ *" + echo "* where xxx is 601, 603, 604, or whatever kind of *" + echo "* PowerPC CPU you have. For more info, man cc. *" + echo "*******************************************************" + fi;; + *darwin*) + if test "$CXX" = xlc++; then + CXXFLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto -qaltivec" + fi;; + esac + # use default flags for gcc on all systems + if test $ac_cv_prog_really_gxx = yes; then + CXXFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic" + fi + # test for gcc-specific flags: + if test $ac_cv_prog_really_gxx = yes; then + # -malign-double for x86 systems + + +echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -malign-double" >&5 +echo $ECHO_N "checking whether ${CXX-c++} accepts -malign-double... $ECHO_C" >&6 +if test "${ac_align_double+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.cpp +if test -z "`${CXX-c++} -malign-double -c conftest.cpp 2>&1`"; then + ac_align_double=yes +else + ac_align_double=no fi -echo "$as_me:$LINENO: result: $ac_guessed_f90flags" >&5 -echo "${ECHO_T}$ac_guessed_f90flags" >&6 -if test "$ac_guessed_f90flags" = yes; then - : +rm -f conftest* +fi +echo "$as_me:$LINENO: result: $ac_align_double" >&5 +echo "${ECHO_T}$ac_align_double" >&6 +if test "$ac_align_double" = yes; then + : + CXXFLAGS="$CXXFLAGS -malign-double" else : - echo "" - echo "**********************************************************" - echo "* WARNING: The guessed F90FLAGS don't seem to work with *" - echo "* your compiler. *" - echo "* Use make F90FLAGS=..., or edit the top level Makefile *" - echo "**********************************************************" - echo "" - F90FLAGS="" +fi + # -fstrict-aliasing for gcc-2.95+ + + +echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -fstrict-aliasing" >&5 +echo $ECHO_N "checking whether ${CXX-c++} accepts -fstrict-aliasing... $ECHO_C" >&6 +if test "${ac_fstrict_aliasing+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.cpp +if test -z "`${CXX-c++} -fstrict-aliasing -c conftest.cpp 2>&1`"; then + ac_fstrict_aliasing=yes +else + ac_fstrict_aliasing=no fi +rm -f conftest* +fi +echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5 +echo "${ECHO_T}$ac_fstrict_aliasing" >&6 +if test "$ac_fstrict_aliasing" = yes; then + : + CXXFLAGS="$CXXFLAGS -fstrict-aliasing" +else + : fi + fi + CPU_FLAGS="" + if test $ac_cv_prog_really_gxx = yes; then + case "${host_cpu}" in + i586*) +echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=pentium" >&5 +echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=pentium... $ECHO_C" >&6 +if test "${ac_cpu_pentium+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.cpp +if test -z "`${CXX-c++} -mcpu=pentium -c conftest.cpp 2>&1`"; then + ac_cpu_pentium=yes +else + ac_cpu_pentium=no +fi +rm -f conftest* +fi +echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5 +echo "${ECHO_T}$ac_cpu_pentium" >&6 +if test "$ac_cpu_pentium" = yes; then + : + CPU_FLAGS=-mcpu=pentium +else + : -# Try to determine native compiler flags that allow us to use F90 suffix -# for preprocessed f90 source. -if test "$ac_test_PREPFLAG" != "set"; then - PREPFLAG="" - case "${host_cpu}-${host_os}" in +echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpentium" >&5 +echo $ECHO_N "checking whether ${CXX-c++} accepts -mpentium... $ECHO_C" >&6 +if test "${ac_pentium+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.cpp +if test -z "`${CXX-c++} -mpentium -c conftest.cpp 2>&1`"; then + ac_pentium=yes +else + ac_pentium=no +fi +rm -f conftest* - *linux*) if test "$F90" = ifc; then - PREPFLAG="-fpp1 " - fi;; - *aix*) if test "$F90" = xlf90 -o "$F90" = f90; then - PREPFLAG="-qsuffix=cpp=F90 " - fi;; - *darwin*) - if test "$F90" = f90 -o "$F90" = xlf90; then - PREPFLAG="-qsuffix=cpp=F90 " - fi;; - esac +fi +echo "$as_me:$LINENO: result: $ac_pentium" >&5 +echo "${ECHO_T}$ac_pentium" >&6 +if test "$ac_pentium" = yes; then + : + CPU_FLAGS=-mpentium +else + : - if test -z "$PREPFLAG"; then - echo "" - echo "**********************************************************" - echo "* WARNING: Don't know the best PREPFLAG for this system *" - echo "* Use make PREPFLAG=..., or edit the top level Makefile *" - echo "* (otherwise, an empty PREPFLAG will be used) *" - echo "**********************************************************" - echo "" - PREPFLAG="" - fi +fi - echo "$as_me:$LINENO: checking to make sure F90 preprocessor flag works" >&5 -echo $ECHO_N "checking to make sure F90 preprocessor flag works... $ECHO_C" >&6 +fi + ;; + i686*) - ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu +echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=pentiumpro" >&5 +echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=pentiumpro... $ECHO_C" >&6 +if test "${ac_cpu_pentiumpro+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.cpp +if test -z "`${CXX-c++} -mcpu=pentiumpro -c conftest.cpp 2>&1`"; then + ac_cpu_pentiumpro=yes +else + ac_cpu_pentiumpro=no +fi +rm -f conftest* - ac_save_ext=$ac_ext - ac_ext=F90 - ac_save_F90FLAGS=$F90FLAGS +fi +echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5 +echo "${ECHO_T}$ac_cpu_pentiumpro" >&6 +if test "$ac_cpu_pentiumpro" = yes; then + : + CPU_FLAGS=-mcpu=pentiumpro +else + : - if test "$PREPFLAG"; then - F90FLAGS="${F90FLAGS} ${PREPFLAG}-DTEST" + +echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpentiumpro" >&5 +echo $ECHO_N "checking whether ${CXX-c++} accepts -mpentiumpro... $ECHO_C" >&6 +if test "${ac_pentiumpro+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.cpp +if test -z "`${CXX-c++} -mpentiumpro -c conftest.cpp 2>&1`"; then + ac_pentiumpro=yes +else + ac_pentiumpro=no fi +rm -f conftest* - cat >conftest.$ac_ext <<_ACEOF +fi +echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5 +echo "${ECHO_T}$ac_pentiumpro" >&6 +if test "$ac_pentiumpro" = yes; then + : + CPU_FLAGS=-mpentiumpro +else + : +fi -program main +fi - integer :: i - i = 1 + ;; + powerpc*) + cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null` + is60x=`echo $cputype | egrep "^600-9e?$"` + if test -n "$is60x"; then -end program main +echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=$cputype" >&5 +echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=$cputype... $ECHO_C" >&6 +if test "${ac_m_cpu_60x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.cpp +if test -z "`${CXX-c++} -mcpu=$cputype -c conftest.cpp 2>&1`"; then + ac_m_cpu_60x=yes +else + ac_m_cpu_60x=no +fi +rm -f conftest* -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' +fi +echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5 +echo "${ECHO_T}$ac_m_cpu_60x" >&6 +if test "$ac_m_cpu_60x" = yes; then + : + CPU_FLAGS=-mcpu=$cputype +else + : + +fi + + elif test "$cputype" = 750; then + + +echo "$as_me:$LINENO: checking whether we are using g++ 2.95 or later" >&5 +echo $ECHO_N "checking whether we are using g++ 2.95 or later... $ECHO_C" >&6 +if test "${ac_cv_prog_gxx_2_95+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat > conftest.cpp < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) + yes; +# endif +#endif +EOF +if { ac_try='${CXX-c++} -E conftest.cpp' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - prepflagworks=1 + (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gxx_2_95=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_prog_gxx_2_95=no +fi -prepflagworks=0 fi -rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_cv_prog_gxx_2_95" >&5 +echo "${ECHO_T}$ac_cv_prog_gxx_2_95" >&6 +if test "$ac_cv_prog_gxx_2_95" = yes; then + : - F90FLAGS=$ac_save_F90FLAGS - ac_ext=$ac_save_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=750" >&5 +echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=750... $ECHO_C" >&6 +if test "${ac_m_cpu_750+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.cpp +if test -z "`${CXX-c++} -mcpu=750 -c conftest.cpp 2>&1`"; then + ac_m_cpu_750=yes +else + ac_m_cpu_750=no +fi +rm -f conftest* +fi +echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5 +echo "${ECHO_T}$ac_m_cpu_750" >&6 +if test "$ac_m_cpu_750" = yes; then + : + CPU_FLAGS=-mcpu=750 +else + : - if test "$prepflagworks" = 1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +fi - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: Can't figure out working Fortran90 preprocessor flag" >&5 -echo "$as_me: error: Can't figure out working Fortran90 preprocessor flag" >&2;} - { (exit 1); exit 1; }; } - fi +else + : + fi + fi + if test -z "$CPU_FLAGS"; then +echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=powerpc" >&5 +echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=powerpc... $ECHO_C" >&6 +if test "${ac_m_cpu_powerpc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.cpp +if test -z "`${CXX-c++} -mcpu=powerpc -c conftest.cpp 2>&1`"; then + ac_m_cpu_powerpc=yes +else + ac_m_cpu_powerpc=no +fi +rm -f conftest* +fi +echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5 +echo "${ECHO_T}$ac_m_cpu_powerpc" >&6 +if test "$ac_m_cpu_powerpc" = yes; then + : + CPU_FLAGS=-mcpu=powerpc +else + : -# Try to determine native compiler flags that allow us to use F90 suffix -# for preprocessed f90 source with -D type defines +fi -if test "$ac_test_PREPDEFFLAG" != "set"; then - PREPDEFFLAG="" - case "${host_cpu}-${host_os}" in + fi + if test -z "$CPU_FLAGS"; then - *linux*) if test "$F90" = ifc; then - PREPDEFFLAG=" " - fi;; - *aix*) if test "$F90" = xlf90 -o "$F90" = f90; then - PREPDEFFLAG="-WF," - fi;; - *darwin*) - if test "$F90" = f90 -o "$F90" = xlf90; then - PREPDEFFLAG="-WF," - fi;; - esac - if test -z "$PREPDEFFLAG"; then +echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpowerpc" >&5 +echo $ECHO_N "checking whether ${CXX-c++} accepts -mpowerpc... $ECHO_C" >&6 +if test "${ac_m_powerpc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.cpp +if test -z "`${CXX-c++} -mpowerpc -c conftest.cpp 2>&1`"; then + ac_m_powerpc=yes +else + ac_m_powerpc=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5 +echo "${ECHO_T}$ac_m_powerpc" >&6 +if test "$ac_m_powerpc" = yes; then + : + CPU_FLAGS=-mpowerpc +else + : + +fi + + fi + esac + fi + + if test -n "$CPU_FLAGS"; then + CXXFLAGS="$CXXFLAGS $CPU_FLAGS" + fi + + if test -z "$CXXFLAGS"; then echo "" - echo "*************************************************************" - echo "* WARNING: Don't know the best PREPDEFFLAG for this system *" - echo "* Use make PREPDEFFLAG=..., or edit the top level Makefile *" - echo "* (otherwise, an empty PREPDEFFLAG will be used) *" - echo "*************************************************************" + echo "**********************************************************" + echo "* WARNING: Don't know the best CXXFLAGS for this system *" + echo "* Use make CXXFLAGS=..., or edit the top level Makefile *" + echo "* (otherwise, a default of CXXFLAGS=-O3 will be used) *" + echo "**********************************************************" echo "" - PREPDEFFLAG=" " + CXXFLAGS="-O3" fi - echo "$as_me:$LINENO: checking to make sure F90 preprocessor define flag works" >&5 -echo $ECHO_N "checking to make sure F90 preprocessor define flag works... $ECHO_C" >&6 - ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu +echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts ${CXXFLAGS}" >&5 +echo $ECHO_N "checking whether ${CXX-c++} accepts ${CXXFLAGS}... $ECHO_C" >&6 +if test "${ac_guessed_cxxflags+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo 'void f(){}' > conftest.cpp +if test -z "`${CXX-c++} ${CXXFLAGS} -c conftest.cpp 2>&1`"; then + ac_guessed_cxxflags=yes +else + ac_guessed_cxxflags=no +fi +rm -f conftest* - ac_save_ext=$ac_ext - ac_ext=F90 - ac_save_F90FLAGS=$F90FLAGS +fi +echo "$as_me:$LINENO: result: $ac_guessed_cxxflags" >&5 +echo "${ECHO_T}$ac_guessed_cxxflags" >&6 +if test "$ac_guessed_cxxflags" = yes; then + : - if test "$PREPDEFFLAG"; then - F90FLAGS="${F90FLAGS} ${PREPFLAG} ${PREPDEFFLAG}-DTEST" +else + : + + echo "" + echo "**********************************************************" + echo "* WARNING: The guessed CXXFLAGS don't seem to work with *" + echo "* your compiler. *" + echo "* Use make CXXFLAGS=..., or edit the top level Makefile *" + echo "**********************************************************" + echo "" + CXXFLAGS="" + fi - cat >conftest.$ac_ext <<_ACEOF +fi -program main - integer :: i -#ifdef TEST - i = 1 -#else - choke me -#endif -end program main -_ACEOF -rm -f conftest.$ac_objext +# Try to determine "good" native compiler flags if none specified on command +# line + +if test x"$F90FLAGS" = x ; then + F90FLAGS="" + case "${host_cpu}-${host_os}" in + + *linux*) if test "$F90" = ifc -o "$F90" = ifort; then + F90FLAGS="-O" + fi;; + rs6000*-aix*) if test "$F90" = xlf90 -o "$F90" = f90; then + F90FLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w" + fi;; + powerpc*-aix*) + if test "$F90" = f90 -o "$F90" = xlf90; then + F90FLAGS="-O3 -qarch=ppc -qansialias -w" + echo "*******************************************************" + echo "* You have AIX on an unknown powerpc system. It is *" + echo "* recommended that you use *" + echo "* *" + echo "* F90FLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w *" + echo "* ^^^ *" + echo "* where xxx is 601, 603, 604, or whatever kind of *" + echo "* PowerPC CPU you have. For more info, man xlf. *" + echo "*******************************************************" + fi;; + *darwin*) + if test "$F90" = f90 -o "$F90" = xlf90 -o "$F90" = xlf95; then + F90FLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto" + fi;; + esac + + if test -n "$CPU_FLAGS"; then + F90FLAGS="$F90FLAGS $CPU_FLAGS" + fi + + if test -z "$F90FLAGS"; then + echo "" + echo "**********************************************************" + echo "* WARNING: Don't know the best F90FLAGS for this system *" + echo "* Use make F90FLAGS=..., or edit the top level Makefile *" + echo "* (otherwise, a default of F90FLAGS=-O3 will be used) *" + echo "**********************************************************" + echo "" + F90FLAGS="-O3" + fi + + +echo "$as_me:$LINENO: checking whether ${F90-f90} accepts ${F90FLAGS}" >&5 +echo $ECHO_N "checking whether ${F90-f90} accepts ${F90FLAGS}... $ECHO_C" >&6 +if test "${ac_guessed_f90flags+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + +echo 'program main' > conftest.$ac_ext +echo 'end program main' >> conftest.$ac_ext +ac_compile='${F90-f90} -c ${F90FLAGS} $F90FLAGS conftest.$ac_ext 1>&5' if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - prepdefflagworks=1 + (exit $ac_status); }; then + ac_guessed_f90flags=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_guessed_f90flags=no +fi +rm -f conftest* +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu -prepdefflagworks=0 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_guessed_f90flags" >&5 +echo "${ECHO_T}$ac_guessed_f90flags" >&6 +if test "$ac_guessed_f90flags" = yes; then + : - F90FLAGS=$ac_save_F90FLAGS - ac_ext=$ac_save_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +else + : + echo "" + echo "**********************************************************" + echo "* WARNING: The guessed F90FLAGS don't seem to work with *" + echo "* your compiler. *" + echo "* Use make F90FLAGS=..., or edit the top level Makefile *" + echo "**********************************************************" + echo "" + F90FLAGS="" +fi - if test "$prepdefflagworks" = 1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: Can't figure out working Fortran90 preprocessor define flag" >&5 -echo "$as_me: error: Can't figure out working Fortran90 preprocessor define flag" >&2;} - { (exit 1); exit 1; }; } - fi fi + ;; +esac + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -4449,7 +5266,6 @@ test -n "$YACC" || YACC="yacc" done test -n "$YACC" || YACC="yacc" - for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -4501,27 +5317,12 @@ cat >conftest.$ac_ext <<_ACEOF ac_check_lib_save_LIBS=$LIBS LIBS="-lfl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char yywrap (); -int -main () -{ -yywrap (); - ; - return 0; -} +program main + +call yywrap +end program main + _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -4558,27 +5359,12 @@ cat >conftest.$ac_ext <<_ACEOF ac_check_lib_save_LIBS=$LIBS LIBS="-ll $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char yywrap (); -int -main () -{ -yywrap (); - ; - return 0; -} +program main + +call yywrap +end program main + _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -4628,513 +5414,268 @@ _ACEOF (eval $LEX conftest.l) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -else - { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 -echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} - { (exit 1); exit 1; }; } -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 -echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 -rm -f conftest.l -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - -echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 -echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 -if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c -ac_save_LIBS=$LIBS -LIBS="$LIBS $LEXLIB" -cat >conftest.$ac_ext <<_ACEOF -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_lex_yytext_pointer=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_save_LIBS -rm -f "${LEX_OUTPUT_ROOT}.c" - -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 -echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6 -if test $ac_cv_prog_lex_yytext_pointer = yes; then - -cat >>confdefs.h <<\_ACEOF -#define YYTEXT_POINTER 1 -_ACEOF - -fi - -fi -# Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="NONE" -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -if test "$AR" = "NONE"; then - { { echo "$as_me:$LINENO: error: --> Can't find \`ar'!" >&5 -echo "$as_me: error: --> Can't find \`ar'!" >&2;} - { (exit 1); exit 1; }; } - cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -{ - (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - exit 1 -fi - -ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - - - -ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu -echo "$as_me:$LINENO: checking how to get verbose linking output from $F90" >&5 -echo $ECHO_N "checking how to get verbose linking output from $F90... $ECHO_C" >&6 -if test "${ac_cv_prog_f90_v+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -cat >conftest.$ac_ext <<_ACEOF - -program main - - -end program main - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_f90_v= -# Try some options frequently used verbose output -for ac_verb in -v -verbose --verbose -V -\#\#\#; do - ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - -cat >conftest.$ac_ext <<_ACEOF - -program main - - -end program main - -_ACEOF - -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran 90 compiler in order to get -# "verbose" output that we can then parse for the Fortran 90 linker -# flags. -ac_save_F90FLAGS=$F90FLAGS -F90FLAGS="$F90FLAGS $ac_verb" - -(eval echo $as_me:4854: \"$ac_link\") >&5 -ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` -echo "$ac_f90_v_output" >&5 -F90FLAGS=$ac_save_F90FLAGS - -rm -f conftest.* -ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - -# If we are using xlf then replace all the commas with spaces. -if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then - ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'` -fi - -# If we are using Cray Fortran then delete quotes. -# Use "\"" instead of '"' for font-lock-mode. -# FIXME: a more general fix for quoted arguments with spaces? -if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then - ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"` -fi - # look for -l* and *.a constructs in the output - for ac_arg in $ac_f90_v_output; do - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) - ac_cv_prog_f90_v=$ac_verb - break 2 ;; - esac - done -done -if test -z "$ac_cv_prog_f90_v"; then - { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F90" >&5 -echo "$as_me: WARNING: cannot determine how to obtain linking information from $F90" >&2;} -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ echo "$as_me:$LINENO: WARNING: compilation failed" >&5 -echo "$as_me: WARNING: compilation failed" >&2;} -fi -rm -f conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_f90_v" >&5 -echo "${ECHO_T}$ac_cv_prog_f90_v" >&6 -echo "$as_me:$LINENO: checking for Fortran 90 libraries" >&5 -echo $ECHO_N "checking for Fortran 90 libraries... $ECHO_C" >&6 -if test "${ac_cv_flibs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$F90LIBS" != "x"; then - ac_cv_f90libs="$F90LIBS" # Let the user override the test. -else - -ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - -cat >conftest.$ac_ext <<_ACEOF - -program main - - -end program main - -_ACEOF - -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran 90 compiler in order to get -# "verbose" output that we can then parse for the Fortran 90 linker -# flags. -ac_save_F90FLAGS=$F90FLAGS -F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v" - -(eval echo $as_me:4931: \"$ac_link\") >&5 -ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` -echo "$ac_f90_v_output" >&5 -F90FLAGS=$ac_save_F90FLAGS - -rm -f conftest.* -ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - -# If we are using xlf then replace all the commas with spaces. -if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then - ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'` -fi - -# If we are using Cray Fortran then delete quotes. -# Use "\"" instead of '"' for font-lock-mode. -# FIXME: a more general fix for quoted arguments with spaces? -if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then - ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"` -fi - -ac_cv_f90libs= - -# Save positional arguments (if any) -ac_save_positional="$@" - -set X $ac_f90_v_output -while test $# != 1; do - shift - ac_arg=$1 - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a) - ac_exists=false - for ac_i in $ac_cv_f90libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then - : + (exit $ac_status); } +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy else - ac_cv_f90libs="$ac_cv_f90libs $ac_arg" + { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 +echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 +rm -f conftest.l +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - ;; - -bI:*) - ac_exists=false - for ac_i in $ac_cv_f90libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then - : +echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 +echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_arg; do - ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt" - done + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c +ac_save_LIBS=$LIBS +LIBS="$LIBS $LEXLIB" +cat >conftest.$ac_ext <<_ACEOF +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_lex_yytext_pointer=yes else - ac_cv_f90libs="$ac_cv_f90libs $ac_arg" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS +rm -f "${LEX_OUTPUT_ROOT}.c" + fi +echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6 +if test $ac_cv_prog_lex_yytext_pointer = yes; then - ;; - # Ignore these flags. - -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*) - ;; - -lkernel32) - test x"$CYGWIN" != xyes && ac_cv_f90libs="$ac_cv_f90libs $ac_arg" - ;; - -[LRuY]) - # These flags, when seen by themselves, take an argument. - # We remove the space between option and argument and re-iterate - # unless we find an empty arg or a new option (starting with -) - case $2 in - "" | -*);; - *) - ac_arg="$ac_arg$2" +cat >>confdefs.h <<\_ACEOF +#define YYTEXT_POINTER 1 +_ACEOF - shift; shift - set X $ac_arg "$@" - ;; - esac - ;; - -YP,*) - for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do - ac_exists=false - for ac_i in $ac_cv_f90libs; do - if test x"$ac_j" = x"$ac_i"; then - ac_exists=true - break - fi - done +fi - if test x"$ac_exists" = xtrue; then - : -else - ac_arg="$ac_arg $ac_j" - ac_cv_f90libs="$ac_cv_f90libs $ac_j" fi +# Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - done - ;; - -[lLR]*) - ac_exists=false - for ac_i in $ac_cv_f90libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then - : + test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="NONE" +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - ac_cv_f90libs="$ac_cv_f90libs $ac_arg" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - ;; - # Ignore everything else. - esac -done -# restore positional arguments -set X $ac_save_positional; shift +if test "$AR" = "NONE"; then + { { echo "$as_me:$LINENO: error: --> Can't find \`ar'!" >&5 +echo "$as_me: error: --> Can't find \`ar'!" >&2;} + { (exit 1); exit 1; }; } + cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. -# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, -# then we insist that the "run path" must be an absolute path (i.e. it -# must begin with a "/"). -case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - ac_ld_run_path=`echo $ac_f90_v_output | - sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` - test "x$ac_ld_run_path" != x && +_ACEOF - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_ld_run_path; do - ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt" - done -else - ac_cv_f90libs="$ac_cv_f90libs $ac_ld_run_path" -fi +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; -esac -fi # test "x$F90LIBS" = "x" - + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi fi -echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5 -echo "${ECHO_T}$ac_cv_flibs" >&6 -F90LIBS="$ac_cv_f90libs" +rm -f confcache + exit 1 +fi -ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu -echo "$as_me:$LINENO: checking for Fortran 90 name-mangling scheme" >&5 -echo $ECHO_N "checking for Fortran 90 name-mangling scheme... $ECHO_C" >&6 -if test "${ac_cv_f90_mangling+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +# Check whether --with-mpi or --without-mpi was given. +if test "${with_mpi+set}" = set; then + withval="$with_mpi" + with_mpi=$withval else - ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu -cat >conftest.$ac_ext <<_ACEOF -subroutine foobar() -return + with_mpi="no" +fi; + +case "x$with_mpi" in + xyes | "x") USE_MPI=yes;; + xno) USE_MPI=no ;; + *) MPI="$with_mpi"; USE_MPI=yes ;; +esac +if test "$USE_MPI" = "yes" -a -z "$with_mpi"; then + MPI="/usr/local" +fi +if test "$USE_MPI" = "yes"; then + echo "MPI = $MPI" + + +# Set variables... +MPI_LIB_DIR="$MPI/lib" +MPI_INC_DIR="$MPI/include" + + + +echo "$as_me:$LINENO: checking for mpi.h" >&5 +echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6 +have_mpi_h=0 +echo '#include ' > conftest.cc +if test -z "`${CXX} -I${MPI_INC_DIR} -c conftest.cc 2>&1`"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + have_mpi_h=1 +else + echo "$as_me:$LINENO: result: no! Check MPI include paths" >&5 +echo "${ECHO_T}no! Check MPI include paths" >&6 + USE_MPI="no" +fi +rm -f conftest* +if test "$have_mpi_h" = 1; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MPI_H 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether mpif.h is usable" >&5 +echo $ECHO_N "checking whether mpif.h is usable... $ECHO_C" >&6 +have_mpif_h=0 +rm -f conftest* +cat >conftest.f90 < conftest.out 2>&1 ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + MPI_F90_INC="$MPI_INC" + have_mpif_h=1 +else + if test -s conftest.out ; then + cat conftest.out >> config.log + fi + echo "$as_me:$LINENO: result: no! Check MPI include paths" >&5 +echo "${ECHO_T}no! Check MPI include paths" >&6 + USE_MPI="no" +fi +rm -f conftest* + +if test "$have_mpif_h" = 1; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MPIF_H 1 _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - mv conftest.$ac_objext cf90_test.$ac_objext - ac_ext=c +fi + +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_save_LIBS=$LIBS - LIBS="cf90_test.$ac_objext $F90LIBS $LIBS" +ac_save_LDFLAGS=$LDFLAGS +LDFLAGS="${LDFLAGS} -L${MPI_LIB_DIR} " - ac_success=no - for ac_foobar in foobar FOOBAR; do - for ac_underscore in "" "_"; do - ac_func="$ac_foobar$ac_underscore" - cat >conftest.$ac_ext <<_ACEOF +if test x = x"$MPI_LIB"; then + echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 +echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6 +if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpi $LIBS" +cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF @@ -5148,11 +5689,11 @@ char $ac_func (); #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char $ac_func (); +char MPI_Init (); int main () { -$ac_func (); +MPI_Init (); ; return 0; } @@ -5169,33 +5710,32 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_success=yes; break 2 + ac_cv_lib_mpi_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_mpi_MPI_Init=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - done - done +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 +echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6 +if test $ac_cv_lib_mpi_MPI_Init = yes; then + MPI_LIB="-lmpi" +fi - if test "$ac_success" = "yes"; then - case $ac_foobar in - foobar) - ac_case=lower - ac_foo_bar=foo_bar - ;; - FOOBAR) - ac_case=upper - ac_foo_bar=FOO_BAR - ;; - esac - - ac_success_extra=no - for ac_extra in "" "_"; do - ac_func="$ac_foo_bar$ac_underscore$ac_extra" - - cat >conftest.$ac_ext <<_ACEOF +fi +if test x = x"$MPI_LIB"; then + echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 +echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6 +if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpich $LIBS" +cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF @@ -5209,11 +5749,11 @@ char $ac_func (); #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char $ac_func (); +char MPI_Init (); int main () { -$ac_func (); +MPI_Init (); ; return 0; } @@ -5230,335 +5770,54 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_success_extra=yes; break + ac_cv_lib_mpich_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_mpich_MPI_Init=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - done - - if test "$ac_success_extra" = "yes"; then - ac_cv_f90_mangling="$ac_case case" - if test -z "$ac_underscore"; then - ac_cv_f90_mangling="$ac_cv_f90_mangling, no underscore" - else - ac_cv_f90_mangling="$ac_cv_f90_mangling, underscore" - - fi - if test -z "$ac_extra"; then - ac_cv_f90_mangling="$ac_cv_f90_mangling, no extra underscore" - else - ac_cv_f90_mangling="$ac_cv_f90_mangling, extra underscore" - fi - else - ac_cv_f90_mangling="unknown" - fi - else - ac_cv_f90_mangling="unknown" - - fi - - LIBS=$ac_save_LIBS - ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - rm -f cf90_test* conftest* -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +LIBS=$ac_check_lib_save_LIBS fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - +echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 +echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6 +if test $ac_cv_lib_mpich_MPI_Init = yes; then + MPI_LIB="-lmpich" fi -echo "$as_me:$LINENO: result: $ac_cv_f90_mangling" >&5 -echo "${ECHO_T}$ac_cv_f90_mangling" >&6 - - -case $ac_cv_f90_mangling in - "lower case, no underscore, no extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) name -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) name -_ACEOF - ;; - "lower case, no underscore, extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) name -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) name ## _ -_ACEOF - ;; - "lower case, underscore, no extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) name ## _ -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) name ## _ -_ACEOF - ;; - "lower case, underscore, extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) name ## _ -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) name ## __ -_ACEOF - ;; - "upper case, no underscore, no extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) NAME -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) NAME -_ACEOF - ;; - "upper case, no underscore, extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) NAME -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) NAME ## _ -_ACEOF - ;; - "upper case, underscore, no extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) NAME ## _ -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) NAME ## _ -_ACEOF - ;; - "upper case, underscore, extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) NAME ## _ -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) NAME ## __ -_ACEOF - ;; - *) - { echo "$as_me:$LINENO: WARNING: unknown Fortran 90 name-mangling scheme" >&5 -echo "$as_me: WARNING: unknown Fortran 90 name-mangling scheme" >&2;} - ;; -esac - - - - -echo "$as_me:$LINENO: checking for mpi-directory" >&5 -echo $ECHO_N "checking for mpi-directory... $ECHO_C" >&6 - -# Check whether --with-mpi_dir or --without-mpi_dir was given. -if test "${with_mpi_dir+set}" = set; then - withval="$with_mpi_dir" - MPI_DIR="$withval" -else - MPI_DIR="/usr/local" -fi; -echo "$as_me:$LINENO: result: $MPI_DIR" >&5 -echo "${ECHO_T}$MPI_DIR" >&6 - - -echo "$as_me:$LINENO: checking for mpi-lib-directory" >&5 -echo $ECHO_N "checking for mpi-lib-directory... $ECHO_C" >&6 - -# Check whether --with-mpi_libdir or --without-mpi_libdir was given. -if test "${with_mpi_libdir+set}" = set; then - withval="$with_mpi_libdir" - MPI_LIBDIR="$withval" -else - MPI_LIBDIR="$MPI_DIR/lib" -fi; -echo "$as_me:$LINENO: result: $MPI_LIBDIR" >&5 -echo "${ECHO_T}$MPI_LIBDIR" >&6 - - -echo "$as_me:$LINENO: checking for mpi-inc-directory" >&5 -echo $ECHO_N "checking for mpi-inc-directory... $ECHO_C" >&6 - -# Check whether --with-mpi_inc or --without-mpi_inc was given. -if test "${with_mpi_inc+set}" = set; then - withval="$with_mpi_inc" - MPI_INC="$withval" -else - MPI_INC="$MPI_DIR/include" -fi; -echo "$as_me:$LINENO: result: $MPI_INC" >&5 -echo "${ECHO_T}$MPI_INC" >&6 - - - -echo "$as_me:$LINENO: checking for MPI library" >&5 -echo $ECHO_N "checking for MPI library... $ECHO_C" >&6 -MPI_LIB="" -case "$host" in - *-ibm-aix*) - echo "$as_me:$LINENO: checking whether to use signal-based MPI library" >&5 -echo $ECHO_N "checking whether to use signal-based MPI library... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $PACX_SIGNAL" >&5 -echo "${ECHO_T}$PACX_SIGNAL" >&6 - if test "x$PACX_SIGNAL" = "xyes" ; then - if test -f "$MPI_LIBDIR/libmpi.a" ; then - MPI_LIB="-lmpi" - elif test -f "$MPI_LIBDIR/libmpi.so" ; then - MPI_LIB="-lmpi" - elif test -f "$MPI_LIBDIR/libmpich.a" ; then - MPI_LIB="-lmpich" - else - { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5 -echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;} - { (exit 1); exit 1; }; } - fi - else - if test -f "$MPI_LIBDIR/libmpi_r.a" ; then - MPI_LIB="-lmpi_r" - else - { { echo "$as_me:$LINENO: error: libmpi_r not found; check path for MPI package..." >&5 -echo "$as_me: error: libmpi_r not found; check path for MPI package..." >&2;} - { (exit 1); exit 1; }; } - fi - fi - echo "$as_me:$LINENO: result: found $MPI_LIB" >&5 -echo "${ECHO_T}found $MPI_LIB" >&6 - ;; - *) if test -f "$MPI_LIBDIR/libmpi.a" ; then - MPI_LIB="-lmpi" - elif test -f "$MPI_LIBDIR/libmpi.so" ; then - MPI_LIB="-lmpi" - elif test -f "$MPI_LIBDIR/libmpich.a" ; then - MPI_LIB="-lmpich" - else - { { echo "$as_me:$LINENO: error: neither libmpi nor libmpich found; check path for MPI package first..." >&5 -echo "$as_me: error: neither libmpi nor libmpich found; check path for MPI package first..." >&2;} - { (exit 1); exit 1; }; } - fi - echo "$as_me:$LINENO: result: found $MPI_LIB" >&5 -echo "${ECHO_T}found $MPI_LIB" >&6 - ;; -esac - - - - - - - - for ac_prog in mpif90 hf90 mpxlf90 mpf90 mpxlf95 mpxlf_r -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_MPIF90+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$MPIF90"; then - ac_cv_prog_MPIF90="$MPIF90" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MPIF90="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - fi -fi -MPIF90=$ac_cv_prog_MPIF90 -if test -n "$MPIF90"; then - echo "$as_me:$LINENO: result: $MPIF90" >&5 -echo "${ECHO_T}$MPIF90" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$MPIF90" && break -done -test -n "$MPIF90" || MPIF90="$F90" - - acx_mpi_save_F90="$F90" - F90="$MPIF90" - - - -if test x = x"$MPILIBS"; then - echo "$as_me:$LINENO: checking for MPI_Init" >&5 -echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF - -program main - - call MPI_Init -end program main - -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - MPILIBS=" " - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -if test x = x"$MPILIBS"; then +$as_unset ac_cv_lib_mpi_MPI_Init +if test x = x"$MPI_LIB"; then echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6 if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpi $LIBS" +LIBS="-lmpi "-llam" $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -program main - -call MPI_Init -end program main - +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char MPI_Init (); +int +main () +{ +MPI_Init (); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -5585,25 +5844,42 @@ if test $ac_cv_lib_mpi_MPI_Init = yes; then echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6 if test $ac_cv_lib_mpi_MPI_Init = yes; then - MPILIBS="-lmpi" + MPI_LIB="-lmpi -llam" fi fi -if test x = x"$MPILIBS"; then - echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 -echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6 -if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then + +$as_unset ac_cv_lib_mpi_MPI_Init +if test x = x"$MPI_LIB"; then +echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 +echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6 +if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpich $LIBS" +LIBS="-lmpi -llam -lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -program main - -call MPI_Init -end program main - +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char MPI_Init (); +int +main () +{ +MPI_Init (); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -5617,44 +5893,51 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_mpich_MPI_Init=yes + ac_cv_lib_mpi_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_mpich_MPI_Init=no +ac_cv_lib_mpi_MPI_Init=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6 -if test $ac_cv_lib_mpich_MPI_Init = yes; then - MPILIBS="-lmpich" +echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 +echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6 +if test $ac_cv_lib_mpi_MPI_Init = yes; then + MPI_LIB="-lmpi -llam -lpthread" +else + + { { echo "$as_me:$LINENO: error: Didn't find liblam, libmpi, or libmpich; check path for MPI package first..." >&5 +echo "$as_me: error: Didn't find liblam, libmpi, or libmpich; check path for MPI package first..." >&2;} + { (exit 1); exit 1; }; } + USE_MPI="no" + fi fi -F90="$acx_mpi_save_F90" - - - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x = x"$MPILIBS"; then - - : +echo "$as_me:$LINENO: checking for MPI Fortran library" >&5 +echo $ECHO_N "checking for MPI Fortran library... $ECHO_C" >&6 +MPI_F90_LIB="" +if test -f "$MPI_LIB_DIR/libfmpich.a" ; then + MPI_F90_LIB="-lfmpich" +elif test -f "$MPI_LIB_DIR/liblamf77mpi.a" ; then + MPI_F90_LIB="-llamf77mpi" else + MPI_F90_LIB=" " +fi +echo "$as_me:$LINENO: result: found $MPI_F90_LIB" >&5 +echo "${ECHO_T}found $MPI_F90_LIB" >&6 -cat >>confdefs.h <<\_ACEOF -#define HAVE_MPI 1 -_ACEOF - - : + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6401,10 +6684,11 @@ fi CPPFLAGS=$ac_save_CPPFLAGS LDFLAGS=$ac_save_LDFLAGS - ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu if test x_$HAVE_SPRNG != x_yes; then @@ -6425,7 +6709,7 @@ echo "${ECHO_T}yes" >&6 withval="$with_mkl" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - for dir in $withval /usr/local/intel/mkl60 /opt/intel/mkl60; do + for dir in $withval /usr/local/intel/mkl61 /opt/intel/mkl61; do mkldir="$dir" if test -f "$dir/include/mkl.h"; then found_mkl="yes"; @@ -6651,10 +6935,11 @@ fi CPPFLAGS=$ac_save_CPPFLAGS LDFLAGS=$ac_save_LDFLAGS - ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu if test x_$HAVE_MKL != x_yes; then @@ -6673,105 +6958,11 @@ fi; echo "${ECHO_T}no" >&6 fi; - - - - -# Check whether --with-mpi_f90_mods or --without-mpi_f90_mods was given. -if test "${with_mpi_f90_mods+set}" = set; then - withval="$with_mpi_f90_mods" - mpi_f90_mods="$withval" -else - mpi_f90_mods="/usr/local/include/f90choice" -fi; - - echo "$as_me:$LINENO: checking for MPI F90 modules" >&5 -echo $ECHO_N "checking for MPI F90 modules... $ECHO_C" >&6 - - - ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - - ac_save_F90FLAGS=$F90FLAGS - if test "$mpi_f90_mods"; then - F90FLAGS="${F90FLAGS} -I${mpi_f90_mods}" -fi - cat >conftest.$ac_ext <<_ACEOF -program main -use mpi -integer :: ierr -call MPI_Init(ierr) - -end program main - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - HAVE_MPI_MOD=1 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -HAVE_MPI_MOD=0 -fi -rm -f conftest.$ac_objext conftest.$ac_ext - - F90FLAGS=$ac_save_F90FLAGS - ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - - - if test "$HAVE_MPI_MOD" = 1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define MPI_MOD 1 -_ACEOF - - MPI_F90_MODS="-I${mpi_f90_mods}" - - # The library name: - if test -z "$MPI_LIB" ; then - MPI_LIBNAME=-lmpich - else - MPI_LIBNAME="$MPI_LIB" - fi - if test -z "$MPIMODLIBNAME" ; then - MPIMODLIBNAME="${MPI_LIBNAME}f90" - fi - - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: Couldn't locate MPI F90 Modules" >&5 -echo "$as_me: error: Couldn't locate MPI F90 Modules" >&2;} - { (exit 1); exit 1; }; } - fi - - - - - OBJEXT=".$OBJEXT" OOPSE=oopse @@ -6795,7 +6986,7 @@ SUBDIRS="libBASS libmdtools src forceFields samples ut MKINSTALLDIRS=`pwd`/ac-tools/"shtool mkdir -p -f" -SUBDIRS="libBASS libmdtools src forceFields samples utils utils/sysbuilder staticProps" +SUBDIRS="libBASS libmdtools src forceFields samples utils utils/sysbuilder staticProps third-party " CFLAGS=${CFLAGS-""} CXXFLAGS=${CXXFLAGS-""} @@ -6803,21 +6994,14 @@ OPTIMIZE=${OPTIMIZE-"-O"} FFLAGS=${FFLAGS-""} F90FLAGS=${F90FLAGS-""} LDFLAGS=${LDFLAGS-""} -OPTIMIZE=${OPTIMIZE-"-O"} DEBUG=${DEBUG-"-g"} case $debug in - true) - CFLAGS="$DEBUG $CFLAGS" - CXXFLAGS="$DEBUG $CXXFLAGS" + 1) FFLAGS="$DEBUG $FFLAGS" F90FLAGS="$DEBUG $F90FLAGS" ;; *) - CFLAGS="$OPTIMIZE $CFLAGS" - CXXFLAGS="$OPTIMIZE $CXXFLAGS" - FFLAGS="$OPTIMIZE $FFLAGS" - F90FLAGS="$OPTIMIZE $F90FLAGS" ;; esac @@ -6837,9 +7021,9 @@ esac - ac_config_headers="$ac_config_headers libmdtools/config.h" + ac_config_headers="$ac_config_headers libBASS/config.h libmdtools/config.h" - 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" + 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" cat >confcache <<\_ACEOF @@ -7375,12 +7559,14 @@ do "forceFields/Makefile" ) CONFIG_FILES="$CONFIG_FILES forceFields/Makefile" ;; "samples/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;; "staticProps/Makefile" ) CONFIG_FILES="$CONFIG_FILES staticProps/Makefile" ;; + "third-party/Makefile" ) CONFIG_FILES="$CONFIG_FILES third-party/Makefile" ;; "samples/alkane/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/alkane/Makefile" ;; "samples/argon/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/argon/Makefile" ;; "samples/beadLipid/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/beadLipid/Makefile" ;; "samples/lipid/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/lipid/Makefile" ;; "samples/metals/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/metals/Makefile" ;; "samples/water/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/water/Makefile" ;; + "libBASS/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS libBASS/config.h" ;; "libmdtools/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS libmdtools/config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} @@ -7467,7 +7653,7 @@ s,@DEBUG@,$DEBUG,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@PROGNAME@,$PROGNAME,;t t -s,@DEBUG@,$DEBUG,;t t +s,@debug@,$debug,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t @@ -7486,11 +7672,20 @@ s,@F90@,$F90,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@OOPSE_TEMPLATE_FLAGS@,$OOPSE_TEMPLATE_FLAGS,;t t +s,@EXTRA_CC_FLAG@,$EXTRA_CC_FLAG,;t t s,@F90@,$F90,;t t s,@F90FLAGS@,$F90FLAGS,;t t s,@ac_ct_F90@,$ac_ct_F90,;t t s,@PREPFLAG@,$PREPFLAG,;t t s,@PREPDEFFLAG@,$PREPDEFFLAG,;t t +s,@F90LIBS@,$F90LIBS,;t t +s,@F90_FUNC@,$F90_FUNC,;t t +s,@F90_FUNC_@,$F90_FUNC_,;t t +s,@MOD@,$MOD,;t t +s,@F90_WORK_FILES_ARG@,$F90_WORK_FILES_ARG,;t t +s,@MODDIRFLAG@,$MODDIRFLAG,;t t +s,@F90MODINCSPEC@,$F90MODINCSPEC,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t @@ -7503,16 +7698,12 @@ s,@F90LIBS@,$F90LIBS,;t t s,@LEXLIB@,$LEXLIB,;t t s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t s,@AR@,$AR,;t t -s,@F90LIBS@,$F90LIBS,;t t -s,@F90_FUNC@,$F90_FUNC,;t t -s,@F90_FUNC_@,$F90_FUNC_,;t t -s,@mpi_dir@,$mpi_dir,;t t -s,@MPI_LIBDIR@,$MPI_LIBDIR,;t t -s,@MPI_INC@,$MPI_INC,;t t +s,@MPI_LIB_DIR@,$MPI_LIB_DIR,;t t +s,@MPI_INC_DIR@,$MPI_INC_DIR,;t t +s,@MPI_F90_INC@,$MPI_F90_INC,;t t s,@MPI_LIB@,$MPI_LIB,;t t -s,@MPIF77@,$MPIF77,;t t -s,@MPIF90@,$MPIF90,;t t -s,@MPILIBS@,$MPILIBS,;t t +s,@MPI_F90_LIB@,$MPI_F90_LIB,;t t +s,@USE_MPI@,$USE_MPI,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@SPRNG_LIBDIR@,$SPRNG_LIBDIR,;t t @@ -7523,8 +7714,6 @@ s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t s,@MKL_LIB@,$MKL_LIB,;t t s,@MKL_INC@,$MKL_INC,;t t s,@HAVE_MKL@,$HAVE_MKL,;t t -s,@MPI_F90_MODS@,$MPI_F90_MODS,;t t -s,@MPIMODLIBNAME@,$MPIMODLIBNAME,;t t s,@BATEXT@,$BATEXT,;t t s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t s,@OOPSE@,$OOPSE,;t t