--- trunk/OOPSE/configure 2003/09/29 22:05:56 791 +++ trunk/OOPSE/configure 2004/05/21 14:23:20 1182 @@ -1,11 +1,10 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57 for OOPSE 1.0. +# Generated by GNU Autoconf 2.59 for OOPSE 1.0. # # Report bugs to . # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -22,9 +21,10 @@ fi elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false @@ -43,7 +43,7 @@ do LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var @@ -220,16 +220,17 @@ else if mkdir -p . 2>/dev/null; then as_mkdir_p=: else + test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -311,7 +312,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 MPI_LIBDIR MPI_INC MPI_F90INC MPI_LIB MPI_F90LIB CPP EGREP SPRNG_LIBDIR SPRNG_LIB SPRNG_INC HAVE_SPRNG MKL_LIBDIR MKL_LIB MKL_INC HAVE_MKL BATEXT MKINSTALLDIRS OOPSE OOPSE_HOME SUBDIRS FFLAGS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -670,7 +671,7 @@ for ac_var in bindir sbindir libexecdir datadir syscon # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir + localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in @@ -710,10 +711,10 @@ $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -784,10 +785,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} @@ -825,9 +822,9 @@ Installation directories: cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -874,17 +871,15 @@ 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=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-inc=dir give the path for MPI-include-files MPI_DIR/include --with-sprng_prefix=PREFIX Prefix where SPRNG is installed - --with-sprng_lib_prefix=PREFIX SPRNG library directory - --with-sprng_include_prefix=PREFIX + --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 +892,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 @@ -937,12 +931,45 @@ esac ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. @@ -953,7 +980,7 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir & echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then + test -f $ac_srcdir/configure.in; then echo $ac_configure --help else @@ -967,10 +994,9 @@ generated by GNU Autoconf 2.57 if $ac_init_version; then cat <<\_ACEOF OOPSE configure 1.0 -generated by GNU Autoconf 2.57 +generated by GNU Autoconf 2.59 -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -982,7 +1008,7 @@ generated by GNU Autoconf 2.57. Invocation command li running configure, to aid debugging if configure makes a mistake. It was created by OOPSE $as_me 1.0, which was -generated by GNU Autoconf 2.57. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1059,19 +1085,19 @@ do 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. + ac_must_keep_next=false # Got value, back to normal. else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. @@ -1105,12 +1131,12 @@ _ASBOX case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } @@ -1139,7 +1165,7 @@ _ASBOX for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1158,7 +1184,7 @@ _ASBOX echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core core.* *.core && + rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 @@ -1238,7 +1264,7 @@ for ac_var in `(set) 2>&1 | # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" @@ -1255,13 +1281,13 @@ echo "$as_me: error: \`$ac_var' was not set in the pre ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. @@ -1828,22 +1854,39 @@ 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" @@ -2025,7 +2068,6 @@ cat >conftest.$ac_ext <<_ACEOF (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2045,8 +2087,8 @@ echo "$as_me:$LINENO: checking for C compiler default # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output" >&5 -echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 @@ -2066,23 +2108,23 @@ do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; + ;; conftest.$ac_ext ) - # This is the source file. - ;; + # This is the source file. + ;; [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; + # We found the default executable, but exeext='' is most + # certainly right. + break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; * ) - break;; + break;; esac done else @@ -2156,8 +2198,8 @@ for ac_file in conftest.exe conftest conftest.*; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; + export ac_cv_exeext + break;; * ) break;; esac done @@ -2182,7 +2224,6 @@ else echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2233,7 +2274,6 @@ else echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2253,15 +2293,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_compiler_gnu=yes else @@ -2270,7 +2320,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_compiler_gnu=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi @@ -2286,7 +2336,6 @@ else echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2303,15 +2352,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_cc_g=yes else @@ -2320,7 +2379,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_prog_cc_g=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 @@ -2347,7 +2406,6 @@ cat >conftest.$ac_ext <<_ACEOF ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2375,6 +2433,16 @@ int test (int i, double x); va_end (v); return s; } + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2401,15 +2469,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_cc_stdc=$ac_arg break @@ -2418,7 +2496,7 @@ rm -f conftest.$ac_objext sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext +rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC @@ -2446,19 +2524,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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 for ac_declaration in \ - ''\ - '#include ' \ + '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ @@ -2466,14 +2553,13 @@ do 'void exit (int);' do 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. */ -#include $ac_declaration +#include int main () { @@ -2484,15 +2570,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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 : else @@ -2501,9 +2597,8 @@ rm -f conftest.$ac_objext conftest.$ac_ext continue fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2520,15 +2615,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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 break else @@ -2536,7 +2641,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then @@ -2550,7 +2655,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2558,444 +2663,13 @@ 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_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 g++ c++ + for ac_prog in $CCC icpc icc 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 +2711,7 @@ if test -z "$CXX"; then fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in $CCC icpc icc xlC g++ c++ + for ac_prog in $CCC icpc icc 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 @@ -3108,7 +2782,6 @@ else echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3128,15 +2801,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_compiler_gnu=yes else @@ -3145,7 +2828,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_compiler_gnu=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi @@ -3161,7 +2844,6 @@ else echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3178,15 +2860,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_cxx_g=yes else @@ -3195,7 +2887,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_prog_cxx_g=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 @@ -3215,8 +2907,7 @@ for ac_declaration in \ fi fi for ac_declaration in \ - ''\ - '#include ' \ + '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ @@ -3224,14 +2915,13 @@ do 'void exit (int);' do 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. */ -#include $ac_declaration +#include int main () { @@ -3242,15 +2932,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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 : else @@ -3259,9 +2959,8 @@ rm -f conftest.$ac_objext conftest.$ac_ext continue fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3278,15 +2977,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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 break else @@ -3294,7 +3003,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then @@ -3310,108 +3019,1336 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compiler_gnu=$ac_cv_c_compiler_gnu +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 + 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 + 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 - -# 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" + EXTRA_CC_FLAG=${EXTRA_CC_FLAG}" -LANG:std" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +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 + +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 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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_F90+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 + if test -n "$F90"; then + ac_cv_prog_F90="$F90" # Let the user override the test. else - ac_align_double=no -fi -rm -f conftest* +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_F90="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done 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" +fi +F90=$ac_cv_prog_F90 +if test -n "$F90"; then + echo "$as_me:$LINENO: result: $F90" >&5 +echo "${ECHO_T}$F90" >&6 else - : - + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 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 + test -n "$F90" && break + done +fi +if test -z "$F90"; then + ac_ct_F90=$F90 + 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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_F90+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 + if test -n "$ac_ct_F90"; then + ac_cv_prog_ac_ct_F90="$ac_ct_F90" # Let the user override the test. else - ac_fstrict_aliasing=no +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_ac_ct_F90="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi +fi +ac_ct_F90=$ac_cv_prog_ac_ct_F90 +if test -n "$ac_ct_F90"; then + echo "$as_me:$LINENO: result: $ac_ct_F90" >&5 +echo "${ECHO_T}$ac_ct_F90" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_F90" && break +done + + F90=$ac_ct_F90 +fi + + +# If we don't use `.F90' as extension, the preprocessor is not run on the +# input file. +ac_save_ext=$ac_ext +ac_ext=F90 +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 90 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 90 compiler... $ECHO_C" >&6 +if test "${ac_cv_f90_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + +program main + +#ifndef __GNUC__ + 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>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f90_werror_flag" + || test ! -s conftest.err' + { (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); }; } && + { 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_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f90_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f90_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f90_compiler_gnu" >&6 +ac_ext=$ac_save_ext +G95=`test $ac_compiler_gnu = yes && echo yes` +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 + + + + + +# 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 + + *linux*) if test "$F90" = ifc -o "$F90" = ifort; 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 + + if test -z "$PREPFLAG"; then + { echo "$as_me:$LINENO: WARNING: \"Using empty PREPFLAG\"" >&5 +echo "$as_me: WARNING: \"Using empty PREPFLAG\"" >&2;} + PREPFLAG="" + 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 + + + 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 "$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>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f90_werror_flag" + || test ! -s conftest.err' + { (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); }; } && + { 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.err 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>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f90_werror_flag" + || test ! -s conftest.err' + { (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); }; } && + { 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.err 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>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f90_werror_flag" + || test ! -s conftest.err' + { (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); }; } && + { 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:3530: \"$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.err 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:3607: \"$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>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f90_werror_flag" + || test ! -s conftest.err' + { (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); }; } && + { 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 +/* 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>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (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); }; } && + { 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.err 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 +/* 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>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (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); }; } && + { 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.err 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.err 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 -Q=20 -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 : - CXXFLAGS="$CXXFLAGS -fstrict-aliasing" + CFLAGS="$CFLAGS -fstrict-aliasing" else : @@ -3420,7 +4357,7 @@ fi fi CPU_FLAGS="" - if test "$GCC" = "yes"; then + if test $ac_cv_prog_really_gcc = yes; then case "${host_cpu}" in i586*) @@ -3447,13 +4384,13 @@ echo "$as_me:$LINENO: checking whether ${CXX-c++} acce : -echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpentium" >&5 -echo $ECHO_N "checking whether ${CXX-c++} accepts -mpentium... $ECHO_C" >&6 +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.cpp -if test -z "`${CXX-c++} -mpentium -c conftest.cpp 2>&1`"; then + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -mpentium -c conftest.c 2>&1`"; then ac_pentium=yes else ac_pentium=no @@ -3476,13 +4413,13 @@ echo "$as_me:$LINENO: checking whether ${CXX-c++} acce ;; 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 +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.cpp -if test -z "`${CXX-c++} -mcpu=pentiumpro -c conftest.cpp 2>&1`"; then + 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 @@ -3499,13 +4436,13 @@ echo "$as_me:$LINENO: checking whether ${CXX-c++} acce : -echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpentiumpro" >&5 -echo $ECHO_N "checking whether ${CXX-c++} accepts -mpentiumpro... $ECHO_C" >&6 +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.cpp -if test -z "`${CXX-c++} -mpentiumpro -c conftest.cpp 2>&1`"; then + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -mpentiumpro -c conftest.c 2>&1`"; then ac_pentiumpro=yes else ac_pentiumpro=no @@ -3532,13 +4469,13 @@ echo "$as_me:$LINENO: checking whether ${CXX-c++} acce 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 +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.cpp -if test -z "`${CXX-c++} -mcpu=$cputype -c conftest.cpp 2>&1`"; then + 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 @@ -3566,7 +4503,7 @@ cat > conftest.c < conftest.c < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) yes; # endif @@ -3590,13 +4527,13 @@ echo "$as_me:$LINENO: checking whether ${CXX-c++} acce : -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 +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.cpp -if test -z "`${CXX-c++} -mcpu=750 -c conftest.cpp 2>&1`"; then + 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 @@ -3623,13 +4560,13 @@ echo "$as_me:$LINENO: checking whether ${CXX-c++} acce 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 +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.cpp -if test -z "`${CXX-c++} -mcpu=powerpc -c conftest.cpp 2>&1`"; then + 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 @@ -3651,13 +4588,13 @@ echo "$as_me:$LINENO: checking whether ${CXX-c++} acce 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 +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.cpp -if test -z "`${CXX-c++} -mpowerpc -c conftest.cpp 2>&1`"; then + 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 @@ -3680,313 +4617,504 @@ fi fi if test -n "$CPU_FLAGS"; then - CXXFLAGS="$CXXFLAGS $CPU_FLAGS" + CFLAGS="$CFLAGS $CPU_FLAGS" fi - if test -z "$CXXFLAGS"; then + if test -z "$CFLAGS"; 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 "********************************************************" + 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 "" - CXXFLAGS="-O3" + CFLAGS="-O3" 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 "$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.cpp -if test -z "`${CXX-c++} ${CXXFLAGS} -c conftest.cpp 2>&1`"; then - ac_guessed_cxxflags=yes + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} ${CFLAGS} -c conftest.c 2>&1`"; then + ac_guessed_cflags=yes else - ac_guessed_cxxflags=no + ac_guessed_cflags=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 +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 CXXFLAGS don't seem to work with *" - echo "* your compiler. *" - echo "* Use make CXXFLAGS=..., or edit the top level Makefile *" - 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 "" - CXXFLAGS="" + CFLAGS="" 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 - 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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_F90+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$F90"; then - ac_cv_prog_F90="$F90" # 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_F90="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -fi -fi -F90=$ac_cv_prog_F90 -if test -n "$F90"; then - echo "$as_me:$LINENO: result: $F90" >&5 -echo "${ECHO_T}$F90" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - test -n "$F90" && break - done -fi -if test -z "$F90"; then - ac_ct_F90=$F90 - for ac_prog in 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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_F90+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_F90"; then - ac_cv_prog_ac_ct_F90="$ac_ct_F90" # 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_ac_ct_F90="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -fi -fi -ac_ct_F90=$ac_cv_prog_ac_ct_F90 -if test -n "$ac_ct_F90"; then - echo "$as_me:$LINENO: result: $ac_ct_F90" >&5 -echo "${ECHO_T}$ac_ct_F90" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - test -n "$ac_ct_F90" && break -done - F90=$ac_ct_F90 -fi -# If we don't use `.F90' as extension, the preprocessor is not run on the -# input file. -ac_save_ext=$ac_ext -ac_ext=F90 -echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 90 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 90 compiler... $ECHO_C" >&6 -if test "${ac_cv_f90_compiler_gnu+set}" = set; then +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.$ac_ext <<_ACEOF -program main - -#ifndef __GNUC__ - choke me +cat > conftest.cpp <&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' +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 - ac_compiler_gnu=yes + (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_really_gxx=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_prog_really_gxx=no +fi -ac_compiler_gnu=no fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_cv_f90_compiler_gnu=$ac_compiler_gnu +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 -echo "$as_me:$LINENO: result: $ac_cv_f90_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f90_compiler_gnu" >&6 -ac_ext=$ac_save_ext -G95=`test $ac_compiler_gnu = yes && echo yes` -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 - - - # Try to determine "good" native compiler flags if none specified on command # line - -if test "$ac_test_F90FLAGS" != "set"; then - F90FLAGS="" +if test "$ac_test_CXXFLAGS" != "set"; then + CXXFLAGS="" case "${host_cpu}-${host_os}" in - *linux*) if test "$F90" = ifc; then - F90FLAGS="-O" + *linux*) if test "$CXX" = icc -o "$CXX" = icpc; then + CXXFLAGS="-O" fi;; - rs6000*-aix*) if test "$F90" = xlf90 -o "$F90" = f90; then - F90FLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w" + 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 "$F90" = f90 -o "$F90" = xlf90; then - F90FLAGS="-O3 -qarch=ppc -qansialias -w" + 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 "* F90FLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w *" + 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 "* PowerPC CPU you have. For more info, man cc. *" echo "*******************************************************" 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 "*********************************************************" + if test "$CXX" = xlC; then + CXXFLAGS="-qthreaded -O5 -Q=20 -qtune=auto -qarch=auto -qunroll=auto -qaltivec" fi;; esac - if test -n "$CPU_FLAGS"; then - F90FLAGS="$F90FLAGS $CPU_FLAGS" + # 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 - 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" + # 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 +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 + fi + CPU_FLAGS="" + if test $ac_cv_prog_really_gxx = yes; then + case "${host_cpu}" in + i586*) -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 "$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 + : -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 -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* -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 +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 - ac_guessed_f90flags=no + : + 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* -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 +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 -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_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 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); }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gxx_2_95=yes +else + ac_cv_prog_gxx_2_95=no +fi + +fi +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 + : + + +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 + 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 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" + 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 F90FLAGS don't seem to work with *" + echo "* WARNING: The guessed CXXFLAGS don't seem to work with *" echo "* your compiler. *" - echo "* Use make F90FLAGS=..., or edit the top level Makefile *" + echo "* Use make CXXFLAGS=..., or edit the top level Makefile *" echo "**********************************************************" echo "" - F90FLAGS="" + CXXFLAGS="" fi @@ -3997,220 +5125,112 @@ fi -# Try to determine native compiler flags that allow us to use F90 suffix -# for preprocessed f90 source. +# Try to determine "good" native compiler flags if none specified on command +# line -if test "$ac_test_PREPFLAG" != "set"; then - PREPFLAG="" +if test x"$F90FLAGS" = x ; then + F90FLAGS="" case "${host_cpu}-${host_os}" in - *linux*) if test "$F90" = ifc; then - PREPFLAG="-fpp1 " + *linux*) if test "$F90" = ifc -o "$F90" = ifort; then + F90FLAGS="-O" fi;; - *aix*) if test "$F90" = xlf90 -o "$F90" = f90; then - PREPFLAG="-qsuffix=cpp=F90 " + rs6000*-aix*) if test "$F90" = xlf90 -o "$F90" = f90; then + F90FLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w" fi;; - *darwin*) + 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; then - PREPFLAG="-qsuffix=cpp=F90 " + F90FLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto" fi;; esac - if test -z "$PREPFLAG"; then + 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 PREPFLAG for this system *" - echo "* Use make PREPFLAG=..., or edit the top level Makefile *" - echo "* (otherwise, an empty PREPFLAG will be used) *" + 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 "" - PREPFLAG="" + 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 - 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 +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 - prepflagworks=1 + (exit $ac_status); }; then + ac_guessed_f90flags=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -prepflagworks=0 + ac_guessed_f90flags=no 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; 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 "" - 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 "" - 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 +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 - ac_save_ext=$ac_ext - ac_ext=F90 - ac_save_F90FLAGS=$F90FLAGS - if test "$PREPDEFFLAG"; then - F90FLAGS="${F90FLAGS} ${PREPFLAG} ${PREPDEFFLAG}-DTEST" fi +echo "$as_me:$LINENO: result: $ac_guessed_f90flags" >&5 +echo "${ECHO_T}$ac_guessed_f90flags" >&6 +if test "$ac_guessed_f90flags" = yes; then + : - 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 + 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="" - 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 +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: @@ -4222,6 +5242,7 @@ fi # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 @@ -4238,6 +5259,7 @@ case $as_dir/ in case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -4245,20 +5267,20 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi done done ;; @@ -4301,7 +5323,7 @@ set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4449,7 +5471,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,39 +5522,34 @@ 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 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_f90_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_lib_fl_yywrap=yes else @@ -4542,7 +5558,8 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest. ac_cv_lib_fl_yywrap=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 @@ -4558,39 +5575,34 @@ 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 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_f90_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_lib_l_yywrap=yes else @@ -4599,7 +5611,8 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest. ac_cv_lib_l_yywrap=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5 @@ -4661,15 +5674,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_f90_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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 @@ -4677,7 +5700,8 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest. sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS rm -f "${LEX_OUTPUT_ROOT}.c" @@ -4761,13 +5785,13 @@ _ACEOF # `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" + "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" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | @@ -4790,587 +5814,12 @@ ac_ext=f90 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 - : -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 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" +# Check whether --with-mpi or --without-mpi was given. +if test "${with_mpi+set}" = set; then + withval="$with_mpi" MPI_DIR="$withval" else MPI_DIR="/usr/local" @@ -5396,7 +5845,7 @@ echo $ECHO_N "checking for mpi-inc-directory... $ECHO_ 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. +# 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" @@ -5407,170 +5856,243 @@ echo "${ECHO_T}$MPI_INC" >&6 echo "${ECHO_T}$MPI_INC" >&6 +echo "$as_me:$LINENO: checking for mpi.h" >&5 +echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6 +HAVE_MPIDOTH_C="no" +echo '#include ' > conftest.cc +if test -z "`${CXX} -I${MPI_INC} -c conftest.cc 2>&1`"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + HAVE_MPIDOTH_C="yes" +else + echo "$as_me:$LINENO: result: no! Check MPI include paths" >&5 +echo "${ECHO_T}no! Check MPI include paths" >&6 +fi +rm -f conftest* -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 +echo "$as_me:$LINENO: checking whether mpif.h is usable" >&5 +echo $ECHO_N "checking whether mpif.h is usable... $ECHO_C" >&6 +HAVE_MPIFDOTH_F90="no" +rm -f conftest* +cat >conftest.f90 < conftest.out 2>&1 ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + MPI_F90INC="$MPI_INC" + HAVE_MPIFDOTH_F90="yes" +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 +fi +rm -f conftest* +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_LDFLAGS=$LDFLAGS +LDFLAGS="${LDFLAGS} -L${MPI_LIBDIR} " - - - - 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 +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 - if test -n "$MPIF90"; then - ac_cv_prog_MPIF90="$MPIF90" # Let the user override the test. + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpi $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* 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 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 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (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); }; } && + { 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_lib_mpi_MPI_Init=yes 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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_mpi_MPI_Init=no fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS 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 +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 - test -n "$MPIF90" && break -done -test -n "$MPIF90" || MPIF90="$F90" +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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - 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 - +/* 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 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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 + ac_cv_lib_mpich_MPI_Init=yes 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 +ac_cv_lib_mpich_MPI_Init=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if test x = x"$MPILIBS"; then - echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 +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 + +fi +$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 +/* 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 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_lib_mpi_MPI_Init=yes else @@ -5579,80 +6101,113 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest. ac_cv_lib_mpi_MPI_Init=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext 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 - 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 +/* 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 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_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 +rm -f conftest.err 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; }; } fi fi +echo "$as_me:$LINENO: result: found $MPI_LIB" >&5 +echo "${ECHO_T}found $MPI_LIB" >&6 -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_F90LIB="" +if test -f "$MPI_LIBDIR/libfmpich.a" ; then + MPI_F90LIB="-lfmpich" +elif test -f "$MPI_LIBDIR/liblamf77mpi.a" ; then + MPI_F90LIB="-llamf77mpi" else + # nothing special found, we'll assume that the C library is all we need + MPI_F90LIB=" " +fi +echo "$as_me:$LINENO: result: found $MPI_F90LIB" >&5 +echo "${ECHO_T}found $MPI_F90LIB" >&6 -cat >>confdefs.h <<\_ACEOF -#define HAVE_MPI 1 -_ACEOF - : -fi ac_ext=c @@ -5683,7 +6238,6 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5694,7 +6248,7 @@ cat >>conftest.$ac_ext <<_ACEOF #else # include #endif - Syntax error + Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -5706,6 +6260,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$a (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -5726,7 +6281,6 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5744,6 +6298,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$a (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -5790,7 +6345,6 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5801,7 +6355,7 @@ cat >>conftest.$ac_ext <<_ACEOF #else # include #endif - Syntax error + Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -5813,6 +6367,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$a (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -5833,7 +6388,6 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5851,6 +6405,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$a (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -5911,7 +6466,6 @@ else echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5932,15 +6486,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_header_stdc=yes else @@ -5949,12 +6513,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_header_stdc=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5976,7 +6539,6 @@ if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6001,7 +6563,6 @@ else : else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6013,9 +6574,9 @@ cat >>conftest.$ac_ext <<_ACEOF # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif @@ -6026,7 +6587,7 @@ main () int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) + || toupper (i) != TOUPPER (i)) exit(2); exit (0); } @@ -6051,7 +6612,7 @@ rm -f core core.* *.core gmon.out bb.out conftest$ac_e ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -6076,7 +6637,7 @@ for ac_header in sys/types.h sys/stat.h stdlib.h strin for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h + inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -6085,7 +6646,6 @@ else echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6097,15 +6657,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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 eval "$as_ac_Header=yes" else @@ -6114,7 +6684,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext eval "$as_ac_Header=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -6139,33 +6709,33 @@ fi; sprng_prefix="/usr/local" fi; -# Check whether --with-sprng_lib_prefix or --without-sprng_lib_prefix was given. -if test "${with_sprng_lib_prefix+set}" = set; then - withval="$with_sprng_lib_prefix" - sprng_lib_prefix="$withval" +# Check whether --with-sprng-libdir or --without-sprng-libdir was given. +if test "${with_sprng_libdir+set}" = set; then + withval="$with_sprng_libdir" + sprng_libdir="$withval" else - sprng_lib_prefix="/usr/local/lib" + sprng_libdir="/usr/local/lib" fi; -# Check whether --with-sprng_include_prefix or --without-sprng_include_prefix was given. -if test "${with_sprng_include_prefix+set}" = set; then - withval="$with_sprng_include_prefix" - sprng_include_prefix="$withval" +# Check whether --with-sprng-include or --without-sprng-include was given. +if test "${with_sprng_include+set}" = set; then + withval="$with_sprng_include" + sprng_include="$withval" else - sprng_include_prefix="/usr/local/include/sprng" + sprng_include="/usr/local/include/sprng" fi; - if test x$sprng_lib_prefix = x ; then - sprng_lib_prefix=${sprng_prefix}/lib + if test x$sprng_libdir = x ; then + sprng_libdir=${sprng_prefix}/lib fi - if test x$sprng_include_prefix = x ; then - sprng_include_prefix=${sprng_prefix}/include + if test x$sprng_include = x ; then + sprng_include=${sprng_prefix}/include fi - echo "$as_me:$LINENO: checking for SPRNG include files in $sprng_include_prefix" >&5 -echo $ECHO_N "checking for SPRNG include files in $sprng_include_prefix... $ECHO_C" >&6 - if test -f ${sprng_include_prefix}/sprng.h; then + echo "$as_me:$LINENO: checking for SPRNG include files in $sprng_include" >&5 +echo $ECHO_N "checking for SPRNG include files in $sprng_include... $ECHO_C" >&6 + if test -f ${sprng_include}/sprng.h; then have_sprngincl=yes echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 @@ -6178,9 +6748,9 @@ echo "$as_me: error: Could not locate the SPRNG includ { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for SPRNG libraries in $sprng_lib_prefix" >&5 -echo $ECHO_N "checking for SPRNG libraries in $sprng_lib_prefix... $ECHO_C" >&6 - if test -f ${sprng_lib_prefix}/libsprng.a; then + echo "$as_me:$LINENO: checking for SPRNG libraries in $sprng_libdir" >&5 +echo $ECHO_N "checking for SPRNG libraries in $sprng_libdir... $ECHO_C" >&6 + if test -f ${sprng_libdir}/libsprng.a; then have_sprnglib=yes echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 @@ -6202,9 +6772,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="${CPPFLAGS} -I${sprng_include_prefix}" + CPPFLAGS="${CPPFLAGS} -I${sprng_include}" ac_save_LDFLAGS=$LDFLAGS - LDFLAGS="${LDFLAGS} -L${sprng_lib_prefix} -lsprng" + LDFLAGS="${LDFLAGS} -L${sprng_libdir} -lsprng" if test "${ac_cv_header_sprng_h+set}" = set; then echo "$as_me:$LINENO: checking for sprng.h" >&5 echo $ECHO_N "checking for sprng.h... $ECHO_C" >&6 @@ -6218,7 +6788,6 @@ cat >conftest.$ac_ext <<_ACEOF echo "$as_me:$LINENO: checking sprng.h usability" >&5 echo $ECHO_N "checking sprng.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6229,15 +6798,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_header_compiler=yes else @@ -6246,7 +6825,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -6254,7 +6833,6 @@ cat >conftest.$ac_ext <<_ACEOF echo "$as_me:$LINENO: checking sprng.h presence" >&5 echo $ECHO_N "checking sprng.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6272,6 +6850,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$a (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -6291,33 +6870,32 @@ case $ac_header_compiler:$ac_header_preproc in echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: sprng.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: sprng.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sprng.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sprng.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { echo "$as_me:$LINENO: WARNING: sprng.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sprng.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes ;; - no:yes ) + no:yes:* ) { echo "$as_me:$LINENO: WARNING: sprng.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: sprng.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sprng.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sprng.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sprng.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sprng.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sprng.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sprng.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sprng.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sprng.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: sprng.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: sprng.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sprng.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sprng.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## +## ------------------------------ ## +## Report this to gezelter@nd.edu ## +## ------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -6344,7 +6922,6 @@ cat >conftest.$ac_ext <<_ACEOF ac_check_lib_save_LIBS=$LIBS LIBS="-lsprng $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6368,15 +6945,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_lib_sprng_init_rng=yes else @@ -6385,14 +6972,15 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest. ac_cv_lib_sprng_init_rng=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_sprng_init_rng" >&5 echo "${ECHO_T}$ac_cv_lib_sprng_init_rng" >&6 if test $ac_cv_lib_sprng_init_rng = yes; then - SPRNG_LIBDIR="${sprng_lib_prefix}" - SPRNG_LIB="-lsprng" SPRNG_INC="-I${sprng_include_prefix}" + SPRNG_LIBDIR="${sprng_libdir}" + SPRNG_LIB="-lsprng" SPRNG_INC="-I${sprng_include}" HAVE_SPRNG="yes" fi @@ -6401,10 +6989,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 +7014,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"; @@ -6465,7 +7054,6 @@ cat >conftest.$ac_ext <<_ACEOF echo "$as_me:$LINENO: checking mkl.h usability" >&5 echo $ECHO_N "checking mkl.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6476,15 +7064,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_header_compiler=yes else @@ -6493,7 +7091,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -6501,7 +7099,6 @@ cat >conftest.$ac_ext <<_ACEOF echo "$as_me:$LINENO: checking mkl.h presence" >&5 echo $ECHO_N "checking mkl.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6519,6 +7116,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$a (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -6538,33 +7136,32 @@ case $ac_header_compiler:$ac_header_preproc in echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: mkl.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: mkl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: mkl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: mkl.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { echo "$as_me:$LINENO: WARNING: mkl.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: mkl.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes ;; - no:yes ) + no:yes:* ) { echo "$as_me:$LINENO: WARNING: mkl.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: mkl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: mkl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: mkl.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: mkl.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: mkl.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: mkl.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: mkl.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: mkl.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: mkl.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: mkl.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: mkl.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mkl.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: mkl.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## +## ------------------------------ ## +## Report this to gezelter@nd.edu ## +## ------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -6591,7 +7188,6 @@ cat >conftest.$ac_ext <<_ACEOF ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6615,15 +7211,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (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); }; } && + { 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_lib_mkl_vslNewStream=yes else @@ -6632,7 +7238,8 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest. ac_cv_lib_mkl_vslNewStream=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_mkl_vslNewStream" >&5 @@ -6651,10 +7258,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 @@ -6672,106 +7280,12 @@ fi; echo "$as_me:$LINENO: result: no" >&5 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,28 +7309,22 @@ SUBDIRS="libBASS libmdtools src forceFields samples ut MKINSTALLDIRS=`pwd`/ac-tools/"shtool mkdir -p -f" -SUBDIRS="libBASS libmdtools src forceFields samples utils utils/sysbuilder" +SUBDIRS="libBASS libmdtools src forceFields samples utils utils/sysbuilder staticProps third-party shapes" -#CFLAGS=${CFLAGS-""} -#CXXFLAGS=${CXXFLAGS-""} -#CPPFLAGS=${CPPFLAGS-""} -#FFLAGS=${FFLAGS-""} -#LDFLAGS=${LDFLAGS-""} -#OPTIMIZE=${OPTIMIZE-"-O"} -#DEBUG=${DEBUG-"-g"} +CFLAGS=${CFLAGS-""} +CXXFLAGS=${CXXFLAGS-""} +CPPFLAGS=${CPPFLAGS-""} +FFLAGS=${FFLAGS-""} +F90FLAGS=${F90FLAGS-""} +LDFLAGS=${LDFLAGS-""} +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 @@ -6838,7 +7346,7 @@ esac ac_config_headers="$ac_config_headers 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 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 shapes/Makefile" cat >confcache <<\_ACEOF @@ -6869,13 +7377,13 @@ _ACEOF # `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" + "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" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | @@ -6905,13 +7413,13 @@ if test "x$srcdir" = x.; then # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ + ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; +s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; -s/^[^=]*=[ ]*$//; +s/^[^=]*=[ ]*$//; }' fi @@ -6922,7 +7430,7 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && conti for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' @@ -6966,9 +7474,10 @@ fi elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false @@ -6987,7 +7496,7 @@ do LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var @@ -7166,16 +7675,17 @@ else if mkdir -p . 2>/dev/null; then as_mkdir_p=: else + test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -7202,7 +7712,7 @@ generated by GNU Autoconf 2.57. Invocation command li cat >&5 <<_CSEOF This file was extended by OOPSE $as_me 1.0, which was -generated by GNU Autoconf 2.57. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -7246,9 +7756,9 @@ Usage: $0 [OPTIONS] [FILE]... -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + instantiate the configuration file FILE --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + instantiate the configuration header FILE Configuration files: $config_files @@ -7262,11 +7772,10 @@ configured by $0, generated by GNU Autoconf 2.57, cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ OOPSE config.status 1.0 -configured by $0, generated by GNU Autoconf 2.57, +configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir @@ -7373,12 +7882,15 @@ do "utils/sysbuilder/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/sysbuilder/Makefile" ;; "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" ;; + "shapes/Makefile" ) CONFIG_FILES="$CONFIG_FILES shapes/Makefile" ;; "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;} @@ -7465,7 +7977,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 @@ -7484,11 +7996,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 @@ -7501,16 +8022,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@,$mpi,;t t s,@MPI_LIBDIR@,$MPI_LIBDIR,;t t s,@MPI_INC@,$MPI_INC,;t t +s,@MPI_F90INC@,$MPI_F90INC,;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_F90LIB@,$MPI_F90LIB,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@SPRNG_LIBDIR@,$SPRNG_LIBDIR,;t t @@ -7521,8 +8038,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 @@ -7560,9 +8075,9 @@ _ACEOF (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end @@ -7580,21 +8095,21 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -7610,10 +8125,10 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -7651,12 +8166,45 @@ esac ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac case $INSTALL in @@ -7678,7 +8226,7 @@ echo "$as_me: creating $ac_file" >&6;} configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -7687,24 +8235,24 @@ echo "$as_me: creating $ac_file" >&6;} case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } _ACEOF @@ -7746,12 +8294,12 @@ ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' @@ -7760,11 +8308,11 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac @@ -7778,28 +8326,29 @@ echo "$as_me: creating $ac_file" >&6;} case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF @@ -7822,9 +8371,9 @@ s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]* s,[\\$`],\\&,g t clear : clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times @@ -7838,13 +8387,13 @@ s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail @@ -7853,7 +8402,7 @@ do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS @@ -7880,7 +8429,7 @@ do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS @@ -7914,10 +8463,10 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -7933,10 +8482,10 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; }