From a976a2c9428001dab4be92276dd24ccb06de7d82 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Fri, 18 Jul 2008 09:08:40 +0000 Subject: [PATCH] mld2p4: Make.inc.in configure.ac configure mlprec/mld_cprecinit.F90 mlprec/mld_cprecinit.f90 mlprec/mld_dprecinit.F90 mlprec/mld_dprecinit.f90 mlprec/mld_sprecinit.F90 mlprec/mld_sprecinit.f90 mlprec/mld_zprecinit.F90 mlprec/mld_zprecinit.f90 Started work to make defaults in PRECINIT dependent on configure parameters. --- Make.inc.in | 2 +- configure | 421 ++++++++++++++---- configure.ac | 13 +- .../{mld_cprecinit.f90 => mld_cprecinit.F90} | 0 .../{mld_dprecinit.f90 => mld_dprecinit.F90} | 0 .../{mld_sprecinit.f90 => mld_sprecinit.F90} | 0 .../{mld_zprecinit.f90 => mld_zprecinit.F90} | 0 7 files changed, 354 insertions(+), 82 deletions(-) rename mlprec/{mld_cprecinit.f90 => mld_cprecinit.F90} (100%) rename mlprec/{mld_dprecinit.f90 => mld_dprecinit.F90} (100%) rename mlprec/{mld_sprecinit.f90 => mld_sprecinit.F90} (100%) rename mlprec/{mld_zprecinit.f90 => mld_zprecinit.F90} (100%) diff --git a/Make.inc.in b/Make.inc.in index 550d4f82..0cd83ca8 100644 --- a/Make.inc.in +++ b/Make.inc.in @@ -48,4 +48,4 @@ LDLIBS=$(SLULIBS) $(SLUDISTLIBS) $(UMFLIBS) $(PSBLDLIBS) # CDEFINES=$(SLUFLAGS) $(UMFFLAGS) $(SLUDISTFLAGS) $(PSBCDEFINES) -FDEFINES=$(PSBFDEFINES) +FDEFINES=@FDEFINES@ $(PSBFDEFINES) diff --git a/configure b/configure index e0591f0e..2a583a27 100755 --- a/configure +++ b/configure @@ -655,13 +655,16 @@ target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA +FC +FCFLAGS +LDFLAGS +ac_ct_FC +EXEEXT +OBJEXT CC CFLAGS -LDFLAGS CPPFLAGS ac_ct_CC -EXEEXT -OBJEXT CPP GREP EGREP @@ -678,16 +681,19 @@ UMF_FLAGS UMF_LIBS SLUDIST_FLAGS SLUDIST_LIBS +FDEFINES LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias -CC -CFLAGS +FC +FCFLAGS LDFLAGS LIBS +CC +CFLAGS CPPFLAGS CPP MPICC' @@ -1292,11 +1298,13 @@ Optional Packages: includes. Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags + FC Fortran compiler command + FCFLAGS Fortran compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l + CC C compiler command + CFLAGS C compiler flags CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor @@ -1944,23 +1952,22 @@ echo "${ECHO_T}$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR" >&6; } # Compilers detection: FC,F77,CC should be set, if found. ############################################################################### -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=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in xlc pgcc icc gcc + for ac_prog in xlf95 xlf90 xlf pgf95 pgf90 ifort ifc gfortran 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_CC+set}" = set; then +if test "${ac_cv_prog_FC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + if test -n "$FC"; then + ac_cv_prog_FC="$FC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -1969,7 +1976,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + ac_cv_prog_FC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -1979,32 +1986,32 @@ IFS=$as_save_IFS fi fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } +FC=$ac_cv_prog_FC +if test -n "$FC"; then + { echo "$as_me:$LINENO: result: $FC" >&5 +echo "${ECHO_T}$FC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi - test -n "$CC" && break + test -n "$FC" && break done fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in xlc pgcc icc gcc +if test -z "$FC"; then + ac_ct_FC=$FC + for ac_prog in xlf95 xlf90 xlf pgf95 pgf90 ifort ifc gfortran 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_CC+set}" = set; then +if test "${ac_cv_prog_ac_ct_FC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + if test -n "$ac_ct_FC"; then + ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -2013,7 +2020,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" + ac_cv_prog_ac_ct_FC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -2023,21 +2030,21 @@ IFS=$as_save_IFS fi fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } +ac_ct_FC=$ac_cv_prog_ac_ct_FC +if test -n "$ac_ct_FC"; then + { echo "$as_me:$LINENO: result: $ac_ct_FC" >&5 +echo "${ECHO_T}$ac_ct_FC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi - test -n "$ac_ct_CC" && break + test -n "$ac_ct_FC" && break done - if test "x$ac_ct_CC" = x; then - CC="" + if test "x$ac_ct_FC" = x; then + FC="" else case $cross_compiling:$ac_tool_warned in yes:) @@ -2049,19 +2056,13 @@ whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac - CC=$ac_ct_CC + FC=$ac_ct_FC fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for Fortran compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in @@ -2093,29 +2094,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } +rm -f a.out cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ + program main - ; - return 0; -} + end _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # 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 file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for Fortran compiler default output file name" >&5 +echo $ECHO_N "checking for Fortran compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. @@ -2188,9 +2180,9 @@ if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { echo "$as_me:$LINENO: error: Fortran compiler cannot create executables See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables +echo "$as_me: error: Fortran compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi @@ -2199,8 +2191,8 @@ ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking whether the Fortran compiler works" >&5 +echo $ECHO_N "checking whether the Fortran compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then @@ -2219,10 +2211,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { echo "$as_me:$LINENO: error: cannot run Fortran compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. +echo "$as_me: error: cannot run Fortran compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } @@ -2287,19 +2279,9 @@ if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + program main -int -main () -{ - - ; - return 0; -} + end _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" @@ -2337,6 +2319,271 @@ fi echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran compiler... $ECHO_C" >&6; } +if test "${ac_cv_fc_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 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; 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 core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_fc_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_fc_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_fc_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FCFLAGS+set} +ac_save_FFLAGS=$FCFLAGS +FCFLAGS= +{ echo "$as_me:$LINENO: checking whether $FC accepts -g" >&5 +echo $ECHO_N "checking whether $FC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_fc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FCFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_fc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_fc_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_fc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FCFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_fc_g = yes; then + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-g -O2" + else + FCFLAGS="-g" + fi +else + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-O2" + else + FCFLAGS= + fi +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_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 -n "$ac_tool_prefix"; then + for ac_prog in xlc pgcc icc gcc + 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_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in xlc pgcc icc gcc +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_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then @@ -2673,6 +2920,14 @@ if test "X$CC" == "X" ; then echo "$as_me: error: Problem : No C compiler specified nor found!" >&2;} { (exit 1); exit 1; }; } fi +if eval "$FC -qversion 2>&1 | grep XL 2>/dev/null" ; then + # Some configurations of the XLF want "-WF," prepended to -D.. flags. + # TODO : discover the exact conditions when the usage of -WF is needed. + mld_cv_define_prepend="-WF," + # Note : there coule be problems with old xlf compiler versions ( <10.1 ) + # since (as far as it is known to us) -WF, is not used in earlier versions. + # More problems could be undocumented yet. +fi { echo "$as_me:$LINENO: checking whether additional libraries are needed" >&5 echo $ECHO_N "checking whether additional libraries are needed... $ECHO_C" >&6; } @@ -3677,6 +3932,7 @@ CPPFLAGS="$SAVE_CPPFLAGS"; if test "x$mld2p4_cv_have_umfpack" == "xyes" ; then UMF_FLAGS="-DHave_UMF_ $UMF_INCLUDES" + FDEFINES="$mld_cv_define_prepend-DHAVE_UMF_ $FDEFINES" else UMF_FLAGS="" fi @@ -4309,6 +4565,7 @@ CPPFLAGS="$SAVE_CPPFLAGS"; if test "x$mld2p4_cv_have_superlu" == "xyes" ; then SLU_FLAGS="-DHave_SLU_ $SLU_INCLUDES" + FDEFINES="$mld_cv_define_prepend-DHAVE_SLU_ $FDEFINES" else SLU_FLAGS="" fi @@ -5255,13 +5512,16 @@ target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim +FC!$FC$ac_delim +FCFLAGS!$FCFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +ac_ct_FC!$ac_ct_FC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim @@ -5278,11 +5538,12 @@ UMF_FLAGS!$UMF_FLAGS$ac_delim UMF_LIBS!$UMF_LIBS$ac_delim SLUDIST_FLAGS!$SLUDIST_FLAGS$ac_delim SLUDIST_LIBS!$SLUDIST_LIBS$ac_delim +FDEFINES!$FDEFINES$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 65; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 69; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.ac b/configure.ac index a6523b4f..a660aa3c 100755 --- a/configure.ac +++ b/configure.ac @@ -112,12 +112,21 @@ AC_MSG_RESULT([$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR]) # Compilers detection: FC,F77,CC should be set, if found. ############################################################################### +AC_PROG_FC([xlf95 xlf90 xlf pgf95 pgf90 ifort ifc gfortran]) AC_PROG_CC([xlc pgcc icc gcc ]) dnl AC_PROG_CXX if test "X$CC" == "X" ; then AC_MSG_ERROR([Problem : No C compiler specified nor found!]) fi +if eval "$FC -qversion 2>&1 | grep XL 2>/dev/null" ; then + # Some configurations of the XLF want "-WF," prepended to -D.. flags. + # TODO : discover the exact conditions when the usage of -WF is needed. + mld_cv_define_prepend="-WF," + # Note : there coule be problems with old xlf compiler versions ( <10.1 ) + # since (as far as it is known to us) -WF, is not used in earlier versions. + # More problems could be undocumented yet. +fi PAC_ARG_WITH_LIBS PAC_ARG_WITH_FLAGS(clibs,CLIBS) PAC_ARG_WITH_FLAGS(flibs,FLIBS) @@ -158,6 +167,7 @@ dnl AC_MSG_RESULT([$mld2p4_cv_have_superlu]) PAC_CHECK_UMFPACK if test "x$mld2p4_cv_have_umfpack" == "xyes" ; then UMF_FLAGS="-DHave_UMF_ $UMF_INCLUDES" + FDEFINES="$mld_cv_define_prepend-DHAVE_UMF_ $FDEFINES" else UMF_FLAGS="" fi @@ -172,6 +182,7 @@ ACX_MPI([], [AC_MSG_ERROR([[Cannot find any suitable MPI implementation for C]]) PAC_CHECK_SUPERLU if test "x$mld2p4_cv_have_superlu" == "xyes" ; then SLU_FLAGS="-DHave_SLU_ $SLU_INCLUDES" + FDEFINES="$mld_cv_define_prepend-DHAVE_SLU_ $FDEFINES" else SLU_FLAGS="" fi @@ -208,7 +219,7 @@ AC_SUBST(UMF_FLAGS) AC_SUBST(UMF_LIBS) AC_SUBST(SLUDIST_FLAGS) AC_SUBST(SLUDIST_LIBS) - +AC_SUBST(FDEFINES) ############################################################################### # the following files will be created by Automake diff --git a/mlprec/mld_cprecinit.f90 b/mlprec/mld_cprecinit.F90 similarity index 100% rename from mlprec/mld_cprecinit.f90 rename to mlprec/mld_cprecinit.F90 diff --git a/mlprec/mld_dprecinit.f90 b/mlprec/mld_dprecinit.F90 similarity index 100% rename from mlprec/mld_dprecinit.f90 rename to mlprec/mld_dprecinit.F90 diff --git a/mlprec/mld_sprecinit.f90 b/mlprec/mld_sprecinit.F90 similarity index 100% rename from mlprec/mld_sprecinit.f90 rename to mlprec/mld_sprecinit.F90 diff --git a/mlprec/mld_zprecinit.f90 b/mlprec/mld_zprecinit.F90 similarity index 100% rename from mlprec/mld_zprecinit.f90 rename to mlprec/mld_zprecinit.F90