--- trunk/OOPSE/configure 2003/10/27 16:20:59 822 +++ trunk/OOPSE/configure 2003/10/27 23:00:59 826 @@ -311,7 +311,7 @@ ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKA # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PROGNAME debug build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX F90 F90FLAGS ac_ct_F90 PREPFLAG PREPDEFFLAG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT AR F90LIBS F90_FUNC F90_FUNC_ mpi_dir MPI_LIBDIR MPI_INC MPI_LIB MPIF77 MPIF90 MPILIBS CPP EGREP SPRNG_LIBDIR SPRNG_LIB SPRNG_INC HAVE_SPRNG MKL_LIBDIR MKL_LIB MKL_INC HAVE_MKL MPI_F90_MODS MPIMODLIBNAME BATEXT MKINSTALLDIRS OOPSE OOPSE_HOME SUBDIRS FFLAGS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PROGNAME debug build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX 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_files='' # Initialize some variables set by options. @@ -1792,6 +1792,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This sho # $SHELLVAR to the Fortran 95 mangled name. If the SHELLVAR # argument is not supplied, it defaults to NAME. # AC_F95_FUNC + + + @@ -1828,6 +1831,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This sho + + + + + # set program name PROGNAME="oopse" @@ -4860,7 +4868,7 @@ F90FLAGS="$F90FLAGS $ac_verb" ac_save_F90FLAGS=$F90FLAGS F90FLAGS="$F90FLAGS $ac_verb" -(eval echo $as_me:4863: \"$ac_link\") >&5 +(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 @@ -4937,7 +4945,7 @@ F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v" ac_save_F90FLAGS=$F90FLAGS F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v" -(eval echo $as_me:4940: \"$ac_link\") >&5 +(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 @@ -5370,10 +5378,125 @@ esac 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.f < 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 +madedir=0 +if test ! -d conf ; then mkdir conf ; madedir=1; fi +cp $testname.$MOD conf +rm -f conftest* CONFTEST* +cat >conftest1.f < 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.f >> 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.f >> 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 + + + echo "$as_me:$LINENO: checking for mpi-directory" >&5 echo $ECHO_N "checking for mpi-directory... $ECHO_C" >&6 @@ -6686,6 +6809,7 @@ 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" @@ -6704,8 +6828,9 @@ ac_compiler_gnu=$ac_cv_f90_compiler_gnu ac_compiler_gnu=$ac_cv_f90_compiler_gnu ac_save_F90FLAGS=$F90FLAGS + if test "$mpi_f90_mods"; then - F90FLAGS="${F90FLAGS} -I${mpi_f90_mods}" + F90FLAGS="${F90FLAGS} ${MODDIRFLAG}${mpi_f90_mods}" fi cat >conftest.$ac_ext <<_ACEOF @@ -6757,7 +6882,7 @@ _ACEOF #define MPI_MOD 1 _ACEOF - MPI_F90_MODS="-I${mpi_f90_mods}" + MPI_F90_MODS="${mpi_f90_mods}" # The library name: if test -z "$MPI_LIB" ; then @@ -6816,8 +6941,6 @@ case $debug in case $debug in 1) - CFLAGS="$DEBUG $CFLAGS" - CXXFLAGS="$DEBUG $CXXFLAGS" FFLAGS="$DEBUG $FFLAGS" F90FLAGS="$DEBUG $F90FLAGS" ;; @@ -7510,6 +7633,10 @@ s,@mpi_dir@,$mpi_dir,;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