--- trunk/OOPSE/configure 2003/10/29 03:06:51 838 +++ trunk/OOPSE/configure 2003/10/29 14:29:12 840 @@ -311,7 +311,7 @@ ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKA # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PROGNAME debug build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX F90 F90FLAGS ac_ct_F90 PREPFLAG PREPDEFFLAG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT AR F90LIBS F90_FUNC F90_FUNC_ MOD F90_WORK_FILES_ARG MODDIRFLAG F90MODINCSPEC mpi_dir MPI_LIBDIR MPI_INC MPI_LIB MPIF77 MPIF90 MPILIBS CPP EGREP SPRNG_LIBDIR SPRNG_LIB SPRNG_INC HAVE_SPRNG MKL_LIBDIR MKL_LIB MKL_INC HAVE_MKL MPI_F90_MODS MPIMODLIBNAME BATEXT MKINSTALLDIRS OOPSE OOPSE_HOME SUBDIRS FFLAGS LIBOBJS LTLIBOBJS' +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_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_files='' # Initialize some variables set by options. @@ -2565,6 +2565,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' @@ -2885,7 +2886,61 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +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 + EXTRA_CC_FLAG=${EXTRA_CC_FLAG}" -LANG:std" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + 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' @@ -3246,9 +3301,716 @@ fi echo "$as_me: error: Can't figure out working Fortran90 preprocessor define flag" >&2;} { (exit 1); exit 1; }; } fi +fi + +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + + + +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu +echo "$as_me:$LINENO: checking how to get verbose linking output from $F90" >&5 +echo $ECHO_N "checking how to get verbose linking output from $F90... $ECHO_C" >&6 +if test "${ac_cv_prog_f90_v+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat >conftest.$ac_ext <<_ACEOF + +program main + + +end program main + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_f90_v= +# Try some options frequently used verbose output +for ac_verb in -v -verbose --verbose -V -\#\#\#; do + ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + +cat >conftest.$ac_ext <<_ACEOF + +program main + + +end program main + +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran 90 compiler in order to get +# "verbose" output that we can then parse for the Fortran 90 linker +# flags. +ac_save_F90FLAGS=$F90FLAGS +F90FLAGS="$F90FLAGS $ac_verb" + +(eval echo $as_me:3367: \"$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:3444: \"$ac_link\") >&5 +ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` +echo "$ac_f90_v_output" >&5 +F90FLAGS=$ac_save_F90FLAGS + +rm -f conftest.* +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + +# If we are using xlf then replace all the commas with spaces. +if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then + ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'` fi +# If we are using Cray Fortran then delete quotes. +# Use "\"" instead of '"' for font-lock-mode. +# FIXME: a more general fix for quoted arguments with spaces? +if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then + ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"` +fi +ac_cv_f90libs= + +# Save positional arguments (if any) +ac_save_positional="$@" + +set X $ac_f90_v_output +while test $# != 1; do + shift + ac_arg=$1 + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a) + ac_exists=false + for ac_i in $ac_cv_f90libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_cv_f90libs="$ac_cv_f90libs $ac_arg" +fi + + ;; + -bI:*) + ac_exists=false + for ac_i in $ac_cv_f90libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_arg; do + ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt" + done +else + ac_cv_f90libs="$ac_cv_f90libs $ac_arg" +fi +fi + + ;; + # Ignore these flags. + -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*) + ;; + -lkernel32) + test x"$CYGWIN" != xyes && ac_cv_f90libs="$ac_cv_f90libs $ac_arg" + ;; + -[LRuY]) + # These flags, when seen by themselves, take an argument. + # We remove the space between option and argument and re-iterate + # unless we find an empty arg or a new option (starting with -) + case $2 in + "" | -*);; + *) + ac_arg="$ac_arg$2" + + shift; shift + set X $ac_arg "$@" + ;; + esac + ;; + -YP,*) + for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + ac_exists=false + for ac_i in $ac_cv_f90libs; do + if test x"$ac_j" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_arg="$ac_arg $ac_j" + ac_cv_f90libs="$ac_cv_f90libs $ac_j" +fi + + done + ;; + -[lLR]*) + ac_exists=false + for ac_i in $ac_cv_f90libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_cv_f90libs="$ac_cv_f90libs $ac_arg" +fi + + ;; + # Ignore everything else. + esac +done +# restore positional arguments +set X $ac_save_positional; shift + +# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, +# then we insist that the "run path" must be an absolute path (i.e. it +# must begin with a "/"). +case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + ac_ld_run_path=`echo $ac_f90_v_output | + sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` + test "x$ac_ld_run_path" != x && + + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_ld_run_path; do + ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt" + done +else + ac_cv_f90libs="$ac_cv_f90libs $ac_ld_run_path" +fi + ;; +esac +fi # test "x$F90LIBS" = "x" + +fi +echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5 +echo "${ECHO_T}$ac_cv_flibs" >&6 +F90LIBS="$ac_cv_f90libs" + +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + + +echo "$as_me:$LINENO: checking for Fortran 90 name-mangling scheme" >&5 +echo $ECHO_N "checking for Fortran 90 name-mangling scheme... $ECHO_C" >&6 +if test "${ac_cv_f90_mangling+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu +cat >conftest.$ac_ext <<_ACEOF +subroutine foobar() +return +end +subroutine foo_bar() +return +end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + mv conftest.$ac_objext cf90_test.$ac_objext + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_save_LIBS=$LIBS + LIBS="cf90_test.$ac_objext $F90LIBS $LIBS" + + ac_success=no + for ac_foobar in foobar FOOBAR; do + for ac_underscore in "" "_"; do + ac_func="$ac_foobar$ac_underscore" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +int +main () +{ +$ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_success=yes; break 2 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done + done + + if test "$ac_success" = "yes"; then + case $ac_foobar in + foobar) + ac_case=lower + ac_foo_bar=foo_bar + ;; + FOOBAR) + ac_case=upper + ac_foo_bar=FOO_BAR + ;; + esac + + ac_success_extra=no + for ac_extra in "" "_"; do + ac_func="$ac_foo_bar$ac_underscore$ac_extra" + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +int +main () +{ +$ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_success_extra=yes; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done + + if test "$ac_success_extra" = "yes"; then + ac_cv_f90_mangling="$ac_case case" + if test -z "$ac_underscore"; then + ac_cv_f90_mangling="$ac_cv_f90_mangling, no underscore" + else + ac_cv_f90_mangling="$ac_cv_f90_mangling, underscore" + + fi + if test -z "$ac_extra"; then + ac_cv_f90_mangling="$ac_cv_f90_mangling, no extra underscore" + else + ac_cv_f90_mangling="$ac_cv_f90_mangling, extra underscore" + fi + else + ac_cv_f90_mangling="unknown" + fi + else + ac_cv_f90_mangling="unknown" + + fi + + LIBS=$ac_save_LIBS + ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + rm -f cf90_test* conftest* +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=f90 +ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' +ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f90_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f90_mangling" >&5 +echo "${ECHO_T}$ac_cv_f90_mangling" >&6 + + + +case $ac_cv_f90_mangling in + "lower case, no underscore, no extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) name +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) name +_ACEOF + ;; + "lower case, no underscore, extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) name +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) name ## _ +_ACEOF + ;; + "lower case, underscore, no extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) name ## _ +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) name ## _ +_ACEOF + ;; + "lower case, underscore, extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) name ## _ +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) name ## __ +_ACEOF + ;; + "upper case, no underscore, no extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) NAME +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) NAME +_ACEOF + ;; + "upper case, no underscore, extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) NAME +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) NAME ## _ +_ACEOF + ;; + "upper case, underscore, no extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) NAME ## _ +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) NAME ## _ +_ACEOF + ;; + "upper case, underscore, extra underscore") + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC(name,NAME) NAME ## _ +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define F90_FUNC_(name,NAME) NAME ## __ +_ACEOF + ;; + *) + { echo "$as_me:$LINENO: WARNING: unknown Fortran 90 name-mangling scheme" >&5 +echo "$as_me: WARNING: unknown Fortran 90 name-mangling scheme" >&2;} + ;; +esac + + + + + +echo "$as_me:$LINENO: checking for module suffix" >&5 +echo $ECHO_N "checking for module suffix... $ECHO_C" >&6 +rm -f conftest* +# Intel ifc compiler generates files by the name of work.pc and work.pcl (!) +rm -f work* +cat >conftest.f90 < conftest.out 2>&1 ; then + MOD=`ls conftest* | grep -v conftest.f | grep -v conftest.o` + MOD=`echo "$MOD" | sed -e 's/conftest\.//g'` + if test -z "$MOD" ; then + MOD=`ls CONFTEST* 2>/dev/null \ + | grep -v CONFTEST.f | grep -v CONFTEST.o` + MOD=`echo "$MOD" | sed -e 's/CONFTEST\.//g'` + if test -n "$MOD" ; then + testname="CONFTEST" + modcase="upper" + fi + fi + if test -z "$MOD" ; then + echo "$as_me:$LINENO: result: unknown" >&5 +echo "${ECHO_T}unknown" >&6 + # Use mod if we can't figure it out + MOD="mod" + else + echo "$as_me:$LINENO: result: $MOD" >&5 +echo "${ECHO_T}$MOD" >&6 + fi + if test -s work.pcl ; then + { echo "$as_me:$LINENO: WARNING: Compiler generates auxillery files!" >&5 +echo "$as_me: WARNING: Compiler generates auxillery files!" >&2;} + fi +else + echo "$as_me:$LINENO: result: unknown" >&5 +echo "${ECHO_T}unknown" >&6 +fi + + + + + +# Check for module include path (some use -I, some (Solaris) use -M, some +# (absoft) use -p). +# Intel compilers use a wierd system: -cl,filename.pcl . If no file is +# specified, work.pcl and work.pc are created. However, if you specify +# a file, it must contain a the name of a file ending in .pc . Ugh! +# Use the module made above +echo "$as_me:$LINENO: checking for module directory path flag" >&5 +echo $ECHO_N "checking for module directory path flag... $ECHO_C" >&6 +rm -f conftest* +# Intel ifc compiler generates files by the name of work.pc and work.pcl (!) +rm -f work* +cat >conftest.f90 < conftest.out 2>&1 ; then + mod=`ls CONFTEST* 2>/dev/null | grep -v CONFTEST.f | grep -v CONFTEST.o` + mod=`echo "$mod" | sed -e 's/CONFTEST\.//g'` + if test -n "$mod" ; then + testname="CONFTEST" + fi + madedir=0 + if test ! -d conf ; then mkdir conf ; madedir=1; fi + cp $testname.$MOD conf + rm -f conftest* CONFTEST* + cat >conftest1.f90 < conftest.out 2>&1 ; then + MODDIRFLAG="-I" + F90MODINCSPEC="-I" + echo "$as_me:$LINENO: result: -I" >&5 +echo "${ECHO_T}-I" >&6 + elif $F90 -c -Mconf conftest1.f90 >> conftest.out 2>&1 ; then + MODDIRFLAG="-M" + F90MODINCSPEC="-M" + echo "$as_me:$LINENO: result: -M" >&5 +echo "${ECHO_T}-M" >&6 + elif $F90 -c -pconf conftest1.f90 >> conftest.out 2>&1 ; then + MODDIRFLAG="-p" + F90MODINCSPEC="-p" + echo "$as_me:$LINENO: result: -p" >&5 +echo "${ECHO_T}-p" >&6 + elif test -s work.pc ; then + cp work.pc conf/mpimod.pc + echo "mpimod.pc" > conf/mpimod.pcl + echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl + if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then + MODDIRFLAG='-cl,mpimod.pcl' + echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and directories" >&5 +echo "${ECHO_T}-cl,filename where filename contains a list of files and directories" >&6 + F90_WORK_FILES_ARG="-cl,mpimod.pcl" + F90MODINCSPEC="-cl,/mod.pcl" + + else + # The version of the Intel compiler that I have refuses to let + # you put the "work catalog" list anywhere but the current + # directory. For example, you cannot in + : + fi + fi + if test -z "MODDIRFLAG" ; then + echo "$as_me:$LINENO: result: unknown" >&5 +echo "${ECHO_T}unknown" >&6 + fi + + + rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod* + if test $madedir = 1 ; then rmdir conf ; fi +fi + + + + case $debug in 1) ;; @@ -4195,11 +4957,10 @@ ac_ext=c ac_guessed_f90flags=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 +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 @@ -4466,7 +5227,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. @@ -4518,27 +5278,12 @@ cat >conftest.$ac_ext <<_ACEOF ac_check_lib_save_LIBS=$LIBS LIBS="-lfl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char yywrap (); -int -main () -{ -yywrap (); - ; - return 0; -} +program main + +call yywrap +end program main + _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -4575,27 +5320,12 @@ cat >conftest.$ac_ext <<_ACEOF ac_check_lib_save_LIBS=$LIBS LIBS="-ll $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char yywrap (); -int -main () -{ -yywrap (); - ; - return 0; -} +program main + +call yywrap +end program main + _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -4805,714 +5535,8 @@ fi fi rm -f confcache exit 1 -fi - -ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - - - -ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu -echo "$as_me:$LINENO: checking how to get verbose linking output from $F90" >&5 -echo $ECHO_N "checking how to get verbose linking output from $F90... $ECHO_C" >&6 -if test "${ac_cv_prog_f90_v+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -cat >conftest.$ac_ext <<_ACEOF - -program main - - -end program main - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_f90_v= -# Try some options frequently used verbose output -for ac_verb in -v -verbose --verbose -V -\#\#\#; do - ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - -cat >conftest.$ac_ext <<_ACEOF - -program main - - -end program main - -_ACEOF - -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran 90 compiler in order to get -# "verbose" output that we can then parse for the Fortran 90 linker -# flags. -ac_save_F90FLAGS=$F90FLAGS -F90FLAGS="$F90FLAGS $ac_verb" - -(eval echo $as_me:4871: \"$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:4948: \"$ac_link\") >&5 -ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` -echo "$ac_f90_v_output" >&5 -F90FLAGS=$ac_save_F90FLAGS - -rm -f conftest.* -ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - -# If we are using xlf then replace all the commas with spaces. -if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then - ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'` fi -# If we are using Cray Fortran then delete quotes. -# Use "\"" instead of '"' for font-lock-mode. -# FIXME: a more general fix for quoted arguments with spaces? -if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then - ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"` -fi - -ac_cv_f90libs= - -# Save positional arguments (if any) -ac_save_positional="$@" - -set X $ac_f90_v_output -while test $# != 1; do - shift - ac_arg=$1 - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a) - ac_exists=false - for ac_i in $ac_cv_f90libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then - : -else - ac_cv_f90libs="$ac_cv_f90libs $ac_arg" -fi - - ;; - -bI:*) - ac_exists=false - for ac_i in $ac_cv_f90libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then - : -else - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_arg; do - ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt" - done -else - ac_cv_f90libs="$ac_cv_f90libs $ac_arg" -fi -fi - - ;; - # Ignore these flags. - -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*) - ;; - -lkernel32) - test x"$CYGWIN" != xyes && ac_cv_f90libs="$ac_cv_f90libs $ac_arg" - ;; - -[LRuY]) - # These flags, when seen by themselves, take an argument. - # We remove the space between option and argument and re-iterate - # unless we find an empty arg or a new option (starting with -) - case $2 in - "" | -*);; - *) - ac_arg="$ac_arg$2" - - shift; shift - set X $ac_arg "$@" - ;; - esac - ;; - -YP,*) - for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do - ac_exists=false - for ac_i in $ac_cv_f90libs; do - if test x"$ac_j" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then - : -else - ac_arg="$ac_arg $ac_j" - ac_cv_f90libs="$ac_cv_f90libs $ac_j" -fi - - done - ;; - -[lLR]*) - ac_exists=false - for ac_i in $ac_cv_f90libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then - : -else - ac_cv_f90libs="$ac_cv_f90libs $ac_arg" -fi - - ;; - # Ignore everything else. - esac -done -# restore positional arguments -set X $ac_save_positional; shift - -# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, -# then we insist that the "run path" must be an absolute path (i.e. it -# must begin with a "/"). -case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - ac_ld_run_path=`echo $ac_f90_v_output | - sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` - test "x$ac_ld_run_path" != x && - - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_ld_run_path; do - ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt" - done -else - ac_cv_f90libs="$ac_cv_f90libs $ac_ld_run_path" -fi - ;; -esac -fi # test "x$F90LIBS" = "x" - -fi -echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5 -echo "${ECHO_T}$ac_cv_flibs" >&6 -F90LIBS="$ac_cv_f90libs" - -ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - -echo "$as_me:$LINENO: checking for Fortran 90 name-mangling scheme" >&5 -echo $ECHO_N "checking for Fortran 90 name-mangling scheme... $ECHO_C" >&6 -if test "${ac_cv_f90_mangling+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu -cat >conftest.$ac_ext <<_ACEOF -subroutine foobar() -return -end -subroutine foo_bar() -return -end -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - mv conftest.$ac_objext cf90_test.$ac_objext - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ac_save_LIBS=$LIBS - LIBS="cf90_test.$ac_objext $F90LIBS $LIBS" - - ac_success=no - for ac_foobar in foobar FOOBAR; do - for ac_underscore in "" "_"; do - ac_func="$ac_foobar$ac_underscore" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -int -main () -{ -$ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_success=yes; break 2 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - done - done - - if test "$ac_success" = "yes"; then - case $ac_foobar in - foobar) - ac_case=lower - ac_foo_bar=foo_bar - ;; - FOOBAR) - ac_case=upper - ac_foo_bar=FOO_BAR - ;; - esac - - ac_success_extra=no - for ac_extra in "" "_"; do - ac_func="$ac_foo_bar$ac_underscore$ac_extra" - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -int -main () -{ -$ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_success_extra=yes; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - done - - if test "$ac_success_extra" = "yes"; then - ac_cv_f90_mangling="$ac_case case" - if test -z "$ac_underscore"; then - ac_cv_f90_mangling="$ac_cv_f90_mangling, no underscore" - else - ac_cv_f90_mangling="$ac_cv_f90_mangling, underscore" - - fi - if test -z "$ac_extra"; then - ac_cv_f90_mangling="$ac_cv_f90_mangling, no extra underscore" - else - ac_cv_f90_mangling="$ac_cv_f90_mangling, extra underscore" - fi - else - ac_cv_f90_mangling="unknown" - fi - else - ac_cv_f90_mangling="unknown" - - fi - - LIBS=$ac_save_LIBS - ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - rm -f cf90_test* conftest* -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=f90 -ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5' -ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f90_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_f90_mangling" >&5 -echo "${ECHO_T}$ac_cv_f90_mangling" >&6 - - - -case $ac_cv_f90_mangling in - "lower case, no underscore, no extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) name -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) name -_ACEOF - ;; - "lower case, no underscore, extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) name -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) name ## _ -_ACEOF - ;; - "lower case, underscore, no extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) name ## _ -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) name ## _ -_ACEOF - ;; - "lower case, underscore, extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) name ## _ -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) name ## __ -_ACEOF - ;; - "upper case, no underscore, no extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) NAME -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) NAME -_ACEOF - ;; - "upper case, no underscore, extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) NAME -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) NAME ## _ -_ACEOF - ;; - "upper case, underscore, no extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) NAME ## _ -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) NAME ## _ -_ACEOF - ;; - "upper case, underscore, extra underscore") - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC(name,NAME) NAME ## _ -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define F90_FUNC_(name,NAME) NAME ## __ -_ACEOF - ;; - *) - { echo "$as_me:$LINENO: WARNING: unknown Fortran 90 name-mangling scheme" >&5 -echo "$as_me: WARNING: unknown Fortran 90 name-mangling scheme" >&2;} - ;; -esac - - - - - -echo "$as_me:$LINENO: checking for module suffix" >&5 -echo $ECHO_N "checking for module suffix... $ECHO_C" >&6 -rm -f conftest* -# Intel ifc compiler generates files by the name of work.pc and work.pcl (!) -rm -f work* -cat >conftest.f90 < conftest.out 2>&1 ; then - MOD=`ls conftest* | grep -v conftest.f | grep -v conftest.o` - MOD=`echo "$MOD" | sed -e 's/conftest\.//g'` - if test -z "$MOD" ; then - MOD=`ls CONFTEST* 2>/dev/null \ - | grep -v CONFTEST.f | grep -v CONFTEST.o` - MOD=`echo "$MOD" | sed -e 's/CONFTEST\.//g'` - if test -n "$MOD" ; then - testname="CONFTEST" - modcase="upper" - fi - fi - if test -z "$MOD" ; then - echo "$as_me:$LINENO: result: unknown" >&5 -echo "${ECHO_T}unknown" >&6 - # Use mod if we can't figure it out - MOD="mod" - else - echo "$as_me:$LINENO: result: $MOD" >&5 -echo "${ECHO_T}$MOD" >&6 - fi - if test -s work.pcl ; then - { echo "$as_me:$LINENO: WARNING: Compiler generates auxillery files!" >&5 -echo "$as_me: WARNING: Compiler generates auxillery files!" >&2;} - fi -else - echo "$as_me:$LINENO: result: unknown" >&5 -echo "${ECHO_T}unknown" >&6 -fi - - - - - -# Check for module include path (some use -I, some (Solaris) use -M, some -# (absoft) use -p). -# Intel compilers use a wierd system: -cl,filename.pcl . If no file is -# specified, work.pcl and work.pc are created. However, if you specify -# a file, it must contain a the name of a file ending in .pc . Ugh! -# Use the module made above -echo "$as_me:$LINENO: checking for module directory path flag" >&5 -echo $ECHO_N "checking for module directory path flag... $ECHO_C" >&6 -rm -f conftest* -# Intel ifc compiler generates files by the name of work.pc and work.pcl (!) -rm -f work* -cat >conftest.f90 < conftest.out 2>&1 ; then - mod=`ls CONFTEST* 2>/dev/null | grep -v CONFTEST.f | grep -v CONFTEST.o` - mod=`echo "$mod" | sed -e 's/CONFTEST\.//g'` - if test -n "$mod" ; then - testname="CONFTEST" - fi - madedir=0 - if test ! -d conf ; then mkdir conf ; madedir=1; fi - cp $testname.$MOD conf - rm -f conftest* CONFTEST* - cat >conftest1.f90 < conftest.out 2>&1 ; then - MODDIRFLAG="-I" - F90MODINCSPEC="-I" - echo "$as_me:$LINENO: result: -I" >&5 -echo "${ECHO_T}-I" >&6 - elif $F90 -c -Mconf conftest1.f90 >> conftest.out 2>&1 ; then - MODDIRFLAG="-M" - F90MODINCSPEC="-M" - echo "$as_me:$LINENO: result: -M" >&5 -echo "${ECHO_T}-M" >&6 - elif $F90 -c -pconf conftest1.f90 >> conftest.out 2>&1 ; then - MODDIRFLAG="-p" - F90MODINCSPEC="-p" - echo "$as_me:$LINENO: result: -p" >&5 -echo "${ECHO_T}-p" >&6 - elif test -s work.pc ; then - cp work.pc conf/mpimod.pc - echo "mpimod.pc" > conf/mpimod.pcl - echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl - if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then - MODDIRFLAG='-cl,mpimod.pcl' - echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and directories" >&5 -echo "${ECHO_T}-cl,filename where filename contains a list of files and directories" >&6 - F90_WORK_FILES_ARG="-cl,mpimod.pcl" - F90MODINCSPEC="-cl,/mod.pcl" - - else - # The version of the Intel compiler that I have refuses to let - # you put the "work catalog" list anywhere but the current - # directory. For example, you cannot in - : - fi - fi - if test -z "MODDIRFLAG" ; then - echo "$as_me:$LINENO: result: unknown" >&5 -echo "${ECHO_T}unknown" >&6 - fi - - - rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod* - if test $madedir = 1 ; then rmdir conf ; fi -fi - - - echo "$as_me:$LINENO: checking for mpi-directory" >&5 echo $ECHO_N "checking for mpi-directory... $ECHO_C" >&6 @@ -7629,11 +7653,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 @@ -7646,13 +7679,6 @@ 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,@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,@mpi_dir@,$mpi_dir,;t t s,@MPI_LIBDIR@,$MPI_LIBDIR,;t t s,@MPI_INC@,$MPI_INC,;t t