--- trunk/OOPSE-4/configure 2006/05/16 02:06:37 2752 +++ trunk/OOPSE-4/configure 2006/07/07 19:44:54 2926 @@ -312,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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os PROGNAME debug CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC FC FCFLAGS ac_ct_FC CPP EGREP LN_S SET_MAKE RANLIB ac_ct_RANLIB PERLINTERP PERL_SHEBANG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR PS FCFLAGS_F90 FCFLAGS_SRCEXT PREPDEFFLAG FCLIBS FC_FUNC FC_FUNC_ MOD F90_WORK_FILES_ARG MODDIRFLAG F90MODINCSPEC F90_MODULE_NAMES LIBOBJS POW_LIB CXXCPP __func__ MPI_LIB_DIR MPI_INC_DIR MPI_F90_INC MPI_LIB MPI_F90_LIB USE_MPI USE_CGAL CGAL_INC_DIR CGAL_LIB_DIR CGAL_RLIB_DIR CGAL_DEFINES CGAL_CXXFLAGS CGAL_LIBS DOXYGEN DOT DOC enable_dot enable_html_docs enable_latex_docs BATEXT MKINSTALLDIRS OOPSE OOPSE_HOME SUBDIRS 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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os PROGNAME debug USE_SINGLE_PRECISION CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC FC FCFLAGS ac_ct_FC CPP EGREP LN_S SET_MAKE RANLIB ac_ct_RANLIB PERLINTERP PERL_SHEBANG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR PS FCFLAGS_F90 FCFLAGS_SRCEXT PREPDEFFLAG FCLIBS FC_FUNC FC_FUNC_ MOD F90_WORK_FILES_ARG MODDIRFLAG F90MODINCSPEC F90_MODULE_NAMES ZLIB_INC_DIR ZLIB_LIB_DIR ZLIB FFTW_INC_DIR FFTW_LIB_DIR FFTW_LIBS LIBOBJS POW_LIB CXXCPP __func__ MPI_LIB_DIR MPI_INC_DIR MPI_F90_INC MPI_LIB MPI_F90_LIB USE_MPI USE_CGAL CGAL_INC_DIR CGAL_LIB_DIR CGAL_RLIB_DIR CGAL_DEFINES CGAL_CXXFLAGS CGAL_LIBS DOXYGEN DOT DOC enable_dot enable_html_docs enable_latex_docs BATEXT MKINSTALLDIRS OOPSE OOPSE_HOME SUBDIRS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -871,6 +871,8 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-oopse-home=DIR define oopse home dir PREFIX/oopse --enable-debug Compile OOPSE in debug mode + --enable-single compile OOPSE in single precision + --enable-float synonym for --enable-single --enable-doxygen enable documentation generation with doxygen (auto) --enable-dot use 'dot' to generate graphs in doxygen (auto) --enable-html-docs enable HTML generation with doxygen (yes) @@ -881,10 +883,10 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-perl-shebang override what perl thinks is the way for the kernel to start it (seldom needed) - --with-zlib=DIR root directory path of zlib installation defaults to - /usr/local or /usr if not found in /usr/local - --without-zlib to disable zlib usage completely - --without-fftw if you turn this off you cannot compute undulation spectra + --with-zlib=DIR root directory path of zlib installation (defaults + to /usr/local or /usr if not found in /usr/local) + --with-fftw=DIR root directory path of fftw installation (defaults + to /usr/local or /usr if not found in /usr/local) --with-mpi= compile with MPI installed in [default=no] --with-cgal-makefile=FILE CGAL makefile that should be used @@ -1414,13 +1416,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This sho -# ACX_CHECK_FFTW() -# ---------------- -# This macro checks for fftw header files and libraries, -# including the possible prefixing with s or d to determine precision. -# Arg 1 is the fftw header/library name to check for, without -# prefix or anything else (e.g. rfftw_mpi for real MPI transforms) -# Arg 2 is the size of the real variable used. @@ -1429,13 +1424,13 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This sho +# +# +# -# -# -# # AC_F90_MODULE_NAMES @@ -1444,6 +1439,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This sho # Figure out how the Fortran 90 compiler constructs module file names # # AC_F90_MODULE_NAMES + + @@ -1480,6 +1477,56 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This sho + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # who am i # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || @@ -1577,7 +1624,29 @@ fi msg="$msg, debug mode" fi + + +# Check whether --enable-single or --disable-single was given. +if test "${enable_single+set}" = set; then + enableval="$enable_single" + ok=$enableval +else + ok=no +fi; +# Check whether --enable-float or --disable-float was given. +if test "${enable_float+set}" = set; then + enableval="$enable_float" + ok=$enableval +fi; +if test "$ok" = "yes"; then +cat >>confdefs.h <<\_ACEOF +#define SINGLE_PRECISION 1 +_ACEOF + + USE_SINGLE_PRECISION=yes + +fi # Checks for programs. ac_ext=cc @@ -1586,7 +1655,7 @@ if test -n "$ac_tool_prefix"; then 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 pgCC pathCC c++ xlc++ xlC g++ CC + for ac_prog in $CCC mpicxx icpc pathCC pgCC c++ xlc++ xlC g++ CC 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 @@ -1628,7 +1697,7 @@ if test -z "$CXX"; then fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in $CCC icpc icc pgCC pathCC c++ xlc++ xlC g++ CC + for ac_prog in $CCC mpicxx icpc pathCC pgCC c++ xlc++ xlC g++ CC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -2142,7 +2211,7 @@ if test -n "$ac_tool_prefix"; then 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 icc pgcc pathcc cc xlc gcc + for ac_prog in mpicc icc pathcc pgcc cc xlc 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 @@ -2184,7 +2253,7 @@ if test -z "$CC"; then fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in icc pgcc pathcc cc xlc gcc + for ac_prog in mpicc icc pathcc pgcc cc xlc 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 @@ -2653,7 +2722,7 @@ if test -n "$ac_tool_prefix"; then ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $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 ifort ifc pgf95 pathf95 xlf95 lf95 epcf90 pathf90 xlf90 f95 f90 gfortran g95 fort + for ac_prog in mpif90 ifort ifc pathf95 pgf95 xlf95 lf95 epcf90 pathf90 xlf90 f95 f90 gfortran g95 fort 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 @@ -2695,7 +2764,7 @@ if test -z "$FC"; then fi if test -z "$FC"; then ac_ct_FC=$FC - for ac_prog in ifort ifc pgf95 pathf95 xlf95 lf95 epcf90 pathf90 xlf90 f95 f90 gfortran g95 fort + for ac_prog in mpif90 ifort ifc pathf95 pgf95 xlf95 lf95 epcf90 pathf90 xlf90 f95 f90 gfortran g95 fort do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -2740,7 +2809,7 @@ echo "$as_me:2743:" \ # Provide some information about the compiler. -echo "$as_me:2743:" \ +echo "$as_me:2812:" \ "checking for Fortran compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -3492,9 +3561,6 @@ if test "$AR" = "NONE"; then fi if test "$AR" = "NONE"; then - { { echo "$as_me:$LINENO: error: --> Can't find \`ar'!" >&5 -echo "$as_me: error: --> Can't find \`ar'!" >&2;} - { (exit 1); exit 1; }; } cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -3991,7 +4057,7 @@ FCFLAGS="$FCFLAGS $ac_verb" # flags. ac_save_FFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_verb" -(eval echo $as_me:3994: \"$ac_link\") >&5 +(eval echo $as_me:4060: \"$ac_link\") >&5 ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` echo "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FFLAGS @@ -4069,7 +4135,7 @@ FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" # flags. ac_save_FFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" -(eval echo $as_me:4072: \"$ac_link\") >&5 +(eval echo $as_me:4138: \"$ac_link\") >&5 ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` echo "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FFLAGS @@ -4805,7 +4871,7 @@ FCFLAGS="$FCFLAGS $ac_verb" # flags. ac_save_FFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_verb" -(eval echo $as_me:4808: \"$ac_link\") >&5 +(eval echo $as_me:4874: \"$ac_link\") >&5 ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` echo "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FFLAGS @@ -4883,7 +4949,7 @@ FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" # flags. ac_save_FFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" -(eval echo $as_me:4886: \"$ac_link\") >&5 +(eval echo $as_me:4952: \"$ac_link\") >&5 ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` echo "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FFLAGS @@ -5760,27 +5826,25 @@ echo "$as_me:$LINENO: checking if zlib is wanted" >&5 # # Handle user hints # -echo "$as_me:$LINENO: checking if zlib is wanted" >&5 -echo $ECHO_N "checking if zlib is wanted... $ECHO_C" >&6 # Check whether --with-zlib or --without-zlib was given. if test "${with_zlib+set}" = set; then withval="$with_zlib" - if test "$withval" != no ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - if test -d "$withval" + zlib_dir="$withval" +else + zlib_dir="not_set" +fi; +if test "$zlib_dir" != "no"; then + +if test "$zlib_dir" != "not_set" ; then + if test -d "$zlib_dir" then - ZLIB_HOME="$withval" + ZLIB_HOME="$zlib_dir" else - { echo "$as_me:$LINENO: WARNING: Sorry, $withval does not exist, checking usual places" >&5 -echo "$as_me: WARNING: Sorry, $withval does not exist, checking usual places" >&2;} + { echo "$as_me:$LINENO: WARNING: Sorry, $zlib_dir does not exist, checking usual places" >&5 +echo "$as_me: WARNING: Sorry, $zlib_dir does not exist, checking usual places" >&2;} fi -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 fi -fi; ZLIB_HOME=/usr/local if test ! -f "${ZLIB_HOME}/include/zlib.h" @@ -6033,222 +6097,115 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes" - then - # - # If both library and header were found, use them - # -echo "$as_me:$LINENO: checking for inflateEnd in -lz" >&5 -echo $ECHO_N "checking for inflateEnd in -lz... $ECHO_C" >&6 -if test "${ac_cv_lib_z_inflateEnd+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes"; then -/* 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 inflateEnd (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -inflateEnd (); - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZLIB_H 1 _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_z_inflateEnd=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + -ac_cv_lib_z_inflateEnd=no -fi -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_z_inflateEnd" >&5 -echo "${ECHO_T}$ac_cv_lib_z_inflateEnd" >&6 -if test $ac_cv_lib_z_inflateEnd = yes; then - cat >>confdefs.h <<_ACEOF +cat >>confdefs.h <<\_ACEOF #define HAVE_LIBZ 1 _ACEOF - LIBS="-lz $LIBS" - -fi - - echo "$as_me:$LINENO: checking zlib in ${ZLIB_HOME}" >&5 -echo $ECHO_N "checking zlib in ${ZLIB_HOME}... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + ZLIB_INC_DIR="${ZLIB_HOME}/include" + ZLIB_LIB_DIR="${ZLIB_HOME}/lib" + ZLIB="-lz" else - # - # If either header or library was not found, revert and bomb - # echo "$as_me:$LINENO: checking zlib in ${ZLIB_HOME}" >&5 echo $ECHO_N "checking zlib in ${ZLIB_HOME}... $ECHO_C" >&6 + ZLIB_INC_DIR= + ZLIB_LIB_DIR= + ZLIB= LDFLAGS="$ZLIB_OLD_LDFLAGS" CPPFLAGS="$ZLIB_OLD_CPPFLAGS" echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 - { { echo "$as_me:$LINENO: error: either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib" >&5 -echo "$as_me: error: either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib" >&2;} - { (exit 1); exit 1; }; } + echo "" + echo "*********************************************************" + echo "* WARNING: Could not find a working zlib installation *" + echo "* If you need OOPSE to be able to deal with compressed *" + echo "* trajectory dump files be sure to specify a valid zlib *" + echo "* installation with --with-zlib=DIR *" + echo "* *" + echo "* OOPSE will still work without zlib installed. *" + echo "*********************************************************" + echo "" fi -fi +fi +fi + +# +# Handle user hints +# + # Check whether --with-fftw or --without-fftw was given. if test "${with_fftw+set}" = set; then withval="$with_fftw" - + fftw_dir="$withval" else - with_fftw=yes + fftw_dir="not_set" fi; -if test "$with_fftw" = "no"; then +if test "$fftw_dir" != "no"; then -cat >>confdefs.h <<\_ACEOF -#define WITHOUT_FFTW -_ACEOF - +if test "$fftw_dir" != "not_set" ; then + if test -d "$fftw_dir" + then + FFTW_HOME="$fftw_dir" + else + { echo "$as_me:$LINENO: WARNING: Sorry, $fftw_dir does not exist, checking usual places" >&5 +echo "$as_me: WARNING: Sorry, $fftw_dir does not exist, checking usual places" >&2;} + fi fi -if test "$with_fftw" = "yes"; then - sizeof_real=8 - -if test -z "$ac_fftw_firstname"; then - -sizeof_real=$sizeof_real -if test $sizeof_real = 8; then - prec="double" - fftwcheckprefix=d -else - prec="single" - fftwcheckprefix=s +FFTW_HOME=/usr/local +if test ! -f "${FFTW_HOME}/include/fftw3.h" -o -f "${FFTW_HOME}/include/fftw.h" -o -f "${FFTW_HOME}/include/dfftw.h" +then + FFTW_HOME=/usr fi -xfftwname=${fftwcheckprefix}fftw3 +# +# Locate fftw, if wanted +# +if test -n "${FFTW_HOME}" +then + FFTW_OLD_LDFLAGS=$LDFLAGS + FFTW_OLD_CPPFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -L${FFTW_HOME}/lib" + CPPFLAGS="$CPPFLAGS -I${FFTW_HOME}/include" -ok="no" -# check header doesn't work, since we must use mpicc to get includes, -# we cant trust cpp. -echo "$as_me:$LINENO: checking for $xfftwname.h" >&5 -echo $ECHO_N "checking for $xfftwname.h... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$xfftwname.h> -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_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_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_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 -fftwname=$xfftwname -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - + echo "$as_me:$LINENO: checking for fftw_execute in -lfftw3" >&5 +echo $ECHO_N "checking for fftw_execute in -lfftw3... $ECHO_C" >&6 +if test "${ac_cv_lib_fftw3_fftw_execute+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -# fftwname was set if we found a header - -if test -n "$fftwname"; then -# we cannot run the code since an MPI program might not be allowed -# on a login node of a supercomputer + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfftw3 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$fftwname.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 fftw_execute (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -6260,14 +6217,14 @@ int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_ int main () { -int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)]; +fftw_execute (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +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 @@ -6281,50 +6238,51 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + { 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 - -ok=yes -usedprefix=$fftwcheckprefix - + ac_cv_lib_fftw3_fftw_execute=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ok=no +ac_cv_lib_fftw3_fftw_execute=no fi -rm -f conftest.err conftest.$ac_objext 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_fftw3_fftw_execute" >&5 +echo "${ECHO_T}$ac_cv_lib_fftw3_fftw_execute" >&6 +if test $ac_cv_lib_fftw3_fftw_execute = yes; then + fftw_cv_libfftw3=yes +else + fftw_cv_libfftw3=no +fi -if test "$ok" != "yes"; then + if test "${ac_cv_header_fftw3_h+set}" = set; then echo "$as_me:$LINENO: checking for fftw3.h" >&5 echo $ECHO_N "checking for fftw3.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +if test "${ac_cv_header_fftw3_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_fftw3_h" >&5 +echo "${ECHO_T}$ac_cv_header_fftw3_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking fftw3.h usability" >&5 +echo $ECHO_N "checking fftw3.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default #include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -6348,43 +6306,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + ac_header_compiler=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 -{ { echo "$as_me:$LINENO: error: Cannot find any $prec precision $xfftwname.h or fftw3.h -Do you have $prec precision FFTW installed? If you are using packages, -note that you also need fftw-devel to use FFTW with OOPSE. You can find the -software at www.fftw.org. -If you compiled FFTW yourself: -Note that the default FFTW setup is double precision. If you want MPI support, -use --with-mpi. It is a good idea to install both single & double. -If you have installed FFTW in a non-standard location, you should -provide the correct paths in the CPPFLAGS and LDFLAGS environment -variables before running configure. -That is also necessary to do if your compiler doesn't search -/usr/local/include and /usr/local/lib by default." >&5 -echo "$as_me: error: Cannot find any $prec precision $xfftwname.h or fftw3.h -Do you have $prec precision FFTW installed? If you are using packages, -note that you also need fftw-devel to use FFTW with OOPSE. You can find the -software at www.fftw.org. -If you compiled FFTW yourself: -Note that the default FFTW setup is double precision. If you want MPI support, -use --with-mpi. It is a good idea to install both single & double. -If you have installed FFTW in a non-standard location, you should -provide the correct paths in the CPPFLAGS and LDFLAGS environment -variables before running configure. -That is also necessary to do if your compiler doesn't search -/usr/local/include and /usr/local/lib by default." >&2;} - { (exit 1); exit 1; }; } - +ac_header_compiler=no fi 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 + +# Is the header present? +echo "$as_me:$LINENO: checking fftw3.h presence" >&5 +echo $ECHO_N "checking fftw3.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6392,227 +6327,109 @@ cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)]; - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 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_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 - -usedprefix="" -fftwname=fftw3 - + (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 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -{ { echo "$as_me:$LINENO: error: Cannot find any $prec precision $xfftwname.h or fftw3.h -Do you have $prec precision FFTW installed? If you are using packages, -note that you also need fftw-devel to use FFTW with OOPSE. You can find the -software at www.fftw.org. -If you compiled FFTW yourself: -Note that the default FFTW setup is double precision. If you want MPI support, -use --with-mpi. It is a good idea to install both single & double. -If you have installed FFTW in a non-standard location, you should -provide the correct paths in the CPPFLAGS and LDFLAGS environment -variables before running configure. -That is also necessary to do if your compiler doesn't search -/usr/local/include and /usr/local/lib by default." >&5 -echo "$as_me: error: Cannot find any $prec precision $xfftwname.h or fftw3.h -Do you have $prec precision FFTW installed? If you are using packages, -note that you also need fftw-devel to use FFTW with OOPSE. You can find the -software at www.fftw.org. -If you compiled FFTW yourself: -Note that the default FFTW setup is double precision. If you want MPI support, -use --with-mpi. It is a good idea to install both single & double. -If you have installed FFTW in a non-standard location, you should -provide the correct paths in the CPPFLAGS and LDFLAGS environment -variables before running configure. -That is also necessary to do if your compiler doesn't search -/usr/local/include and /usr/local/lib by default." >&2;} - { (exit 1); exit 1; }; } + ac_cpp_err=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - -as_ac_Lib=`echo "ac_cv_lib_$fftwname''_main" | $as_tr_sh` -echo "$as_me:$LINENO: checking for main in -l$fftwname" >&5 -echo $ECHO_N "checking for main in -l$fftwname... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Lib+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$fftwname $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -main (); - ; - 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 - eval "$as_ac_Lib=yes" +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Lib=no" + ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: fftw3.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: fftw3.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: fftw3.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: fftw3.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: fftw3.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: fftw3.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: fftw3.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: fftw3.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: fftw3.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: fftw3.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: fftw3.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: fftw3.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: fftw3.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: fftw3.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: fftw3.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: fftw3.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to gezelter@nd.edu ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for fftw3.h" >&5 +echo $ECHO_N "checking for fftw3.h... $ECHO_C" >&6 +if test "${ac_cv_header_fftw3_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_fftw3_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_LIB$fftwname" | $as_tr_cpp` 1 -_ACEOF +echo "$as_me:$LINENO: result: $ac_cv_header_fftw3_h" >&5 +echo "${ECHO_T}$ac_cv_header_fftw3_h" >&6 - LIBS="-l$fftwname $LIBS" - +fi +if test $ac_cv_header_fftw3_h = yes; then + fftw_cv_fftw3_h=yes else - { { echo "$as_me:$LINENO: error: Can't find a library to match the $fftwname header" >&5 -echo "$as_me: error: Can't find a library to match the $fftwname header" >&2;} - { (exit 1); exit 1; }; } + fftw_cv_fftw3_h=no fi -ac_fftw_savedprefix=$usedprefix -ac_fftw_firstname=$fftwname + if test "$fftw_cv_libfftw3" = "no" -o "$fftw_cv_fftw3_h" = "no" + then + echo "$as_me:$LINENO: checking for fftwnd_one in -lfftw" >&5 +echo $ECHO_N "checking for fftwnd_one in -lfftw... $ECHO_C" >&6 +if test "${ac_cv_lib_fftw_fftwnd_one+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -fftwname=${ac_fftw_savedprefix}fftw3 -echo "$as_me:$LINENO: checking for $fftwname.h" >&5 -echo $ECHO_N "checking for $fftwname.h... $ECHO_C" >&6 + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfftw $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$fftwname.h> -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_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_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 - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -LIBS="-l$fftwname $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 fftwnd_one (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -6624,7 +6441,7 @@ main (); int main () { -main (); +fftwnd_one (); ; return 0; } @@ -6651,76 +6468,45 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - : + ac_cv_lib_fftw_fftwnd_one=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_fftw_fftwnd_one=no fi 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_fftw_fftwnd_one" >&5 +echo "${ECHO_T}$ac_cv_lib_fftw_fftwnd_one" >&6 +if test $ac_cv_lib_fftw_fftwnd_one = yes; then + fftw_cv_libfftw=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 -{ { echo "$as_me:$LINENO: error: Cant find $fftwname.h header. Make sure all your -fftw prefixes match - we already use $ac_fftw_firstname.h" >&5 -echo "$as_me: error: Cant find $fftwname.h header. Make sure all your -fftw prefixes match - we already use $ac_fftw_firstname.h" >&2;} - { (exit 1); exit 1; }; } - + fftw_cv_libfftw=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + if test "${ac_cv_header_fftw_h+set}" = set; then + echo "$as_me:$LINENO: checking for fftw.h" >&5 +echo $ECHO_N "checking for fftw.h... $ECHO_C" >&6 +if test "${ac_cv_header_fftw_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi - - - - if test "$with_mpi" = "yes"; then - -if test -z "$ac_fftw_firstname"; then - -sizeof_real=$sizeof_real -if test $sizeof_real = 8; then - prec="double" - fftwcheckprefix=d +echo "$as_me:$LINENO: result: $ac_cv_header_fftw_h" >&5 +echo "${ECHO_T}$ac_cv_header_fftw_h" >&6 else - prec="single" - fftwcheckprefix=s -fi - -xfftwname=${fftwcheckprefix}fftw3_mpi - -ok="no" -# check header doesn't work, since we must use mpicc to get includes, -# we cant trust cpp. -echo "$as_me:$LINENO: checking for $xfftwname.h" >&5 -echo $ECHO_N "checking for $xfftwname.h... $ECHO_C" >&6 + # Is the header compilable? +echo "$as_me:$LINENO: checking fftw.h usability" >&5 +echo $ECHO_N "checking fftw.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$xfftwname.h> -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} +$ac_includes_default +#include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -6744,260 +6530,116 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - -fftwname=$xfftwname -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - + ac_header_compiler=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_header_compiler=no fi 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 -# fftwname was set if we found a header - -if test -n "$fftwname"; then -# we cannot run the code since an MPI program might not be allowed -# on a login node of a supercomputer +# Is the header present? +echo "$as_me:$LINENO: checking fftw.h presence" >&5 +echo $ECHO_N "checking fftw.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$fftwname.h> -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)]; - ; - return 0; -} +#include _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 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_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 - -ok=yes -usedprefix=$fftwcheckprefix - + (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 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ok=no + ac_cpp_err=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -if test "$ok" != "yes"; then - echo "$as_me:$LINENO: checking for fftw3_mpi.h" >&5 -echo $ECHO_N "checking for fftw3_mpi.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_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_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 - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if test -z "$ac_cpp_err"; then + ac_header_preproc=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 -{ { echo "$as_me:$LINENO: error: Cannot find any $prec precision $xfftwname.h or fftw3_mpi.h -Do you have $prec precision FFTW installed? If you are using packages, -note that you also need fftw-devel to use FFTW with OOPSE. You can find the -software at www.fftw.org. -If you compiled FFTW yourself: -Note that the default FFTW setup is double precision. If you want MPI support, -use --with-mpi. It is a good idea to install both single & double. -If you have installed FFTW in a non-standard location, you should -provide the correct paths in the CPPFLAGS and LDFLAGS environment -variables before running configure. -That is also necessary to do if your compiler doesn't search -/usr/local/include and /usr/local/lib by default." >&5 -echo "$as_me: error: Cannot find any $prec precision $xfftwname.h or fftw3_mpi.h -Do you have $prec precision FFTW installed? If you are using packages, -note that you also need fftw-devel to use FFTW with OOPSE. You can find the -software at www.fftw.org. -If you compiled FFTW yourself: -Note that the default FFTW setup is double precision. If you want MPI support, -use --with-mpi. It is a good idea to install both single & double. -If you have installed FFTW in a non-standard location, you should -provide the correct paths in the CPPFLAGS and LDFLAGS environment -variables before running configure. -That is also necessary to do if your compiler doesn't search -/usr/local/include and /usr/local/lib by default." >&2;} - { (exit 1); exit 1; }; } - + ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)]; - ; - return 0; -} -_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_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 +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -usedprefix="" -fftwname=fftw3_mpi - +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: fftw.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: fftw.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: fftw.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: fftw.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: fftw.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: fftw.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: fftw.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: fftw.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: fftw.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: fftw.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: fftw.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: fftw.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: fftw.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: fftw.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: fftw.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: fftw.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to gezelter@nd.edu ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for fftw.h" >&5 +echo $ECHO_N "checking for fftw.h... $ECHO_C" >&6 +if test "${ac_cv_header_fftw_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_fftw_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_fftw_h" >&5 +echo "${ECHO_T}$ac_cv_header_fftw_h" >&6 - -{ { echo "$as_me:$LINENO: error: Cannot find any $prec precision $xfftwname.h or fftw3_mpi.h -Do you have $prec precision FFTW installed? If you are using packages, -note that you also need fftw-devel to use FFTW with OOPSE. You can find the -software at www.fftw.org. -If you compiled FFTW yourself: -Note that the default FFTW setup is double precision. If you want MPI support, -use --with-mpi. It is a good idea to install both single & double. -If you have installed FFTW in a non-standard location, you should -provide the correct paths in the CPPFLAGS and LDFLAGS environment -variables before running configure. -That is also necessary to do if your compiler doesn't search -/usr/local/include and /usr/local/lib by default." >&5 -echo "$as_me: error: Cannot find any $prec precision $xfftwname.h or fftw3_mpi.h -Do you have $prec precision FFTW installed? If you are using packages, -note that you also need fftw-devel to use FFTW with OOPSE. You can find the -software at www.fftw.org. -If you compiled FFTW yourself: -Note that the default FFTW setup is double precision. If you want MPI support, -use --with-mpi. It is a good idea to install both single & double. -If you have installed FFTW in a non-standard location, you should -provide the correct paths in the CPPFLAGS and LDFLAGS environment -variables before running configure. -That is also necessary to do if your compiler doesn't search -/usr/local/include and /usr/local/lib by default." >&2;} - { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +if test $ac_cv_header_fftw_h = yes; then + fftw_cv_fftw_h=yes +else + fftw_cv_fftw_h=no fi -as_ac_Lib=`echo "ac_cv_lib_$fftwname''_main" | $as_tr_sh` -echo "$as_me:$LINENO: checking for main in -l$fftwname" >&5 -echo $ECHO_N "checking for main in -l$fftwname... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Lib+set}\" = set"; then + if test "$fftw_cv_libfftw" = "no" -o "$fftw_cv_fftw_h" = "no" + then + echo "$as_me:$LINENO: checking for fftwnd_one in -ldfftw" >&5 +echo $ECHO_N "checking for fftwnd_one in -ldfftw... $ECHO_C" >&6 +if test "${ac_cv_lib_dfftw_fftwnd_one+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-l$fftwname $LIBS" +LIBS="-ldfftw $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7005,7 +6647,13 @@ cat >>conftest.$ac_ext <<_ACEOF 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 fftwnd_one (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -7017,7 +6665,7 @@ main (); int main () { -main (); +fftwnd_one (); ; return 0; } @@ -7044,62 +6692,45 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_Lib=yes" + ac_cv_lib_dfftw_fftwnd_one=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Lib=no" +ac_cv_lib_dfftw_fftwnd_one=no fi 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: `eval echo '${'$as_ac_Lib'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_LIB$fftwname" | $as_tr_cpp` 1 -_ACEOF - - LIBS="-l$fftwname $LIBS" - +echo "$as_me:$LINENO: result: $ac_cv_lib_dfftw_fftwnd_one" >&5 +echo "${ECHO_T}$ac_cv_lib_dfftw_fftwnd_one" >&6 +if test $ac_cv_lib_dfftw_fftwnd_one = yes; then + fftw_cv_libdfftw=yes else - { { echo "$as_me:$LINENO: error: Can't find a library to match the $fftwname header" >&5 -echo "$as_me: error: Can't find a library to match the $fftwname header" >&2;} - { (exit 1); exit 1; }; } + fftw_cv_libdfftw=no fi -ac_fftw_savedprefix=$usedprefix -ac_fftw_firstname=$fftwname - + if test "${ac_cv_header_dfftw_h+set}" = set; then + echo "$as_me:$LINENO: checking for dfftw.h" >&5 +echo $ECHO_N "checking for dfftw.h... $ECHO_C" >&6 +if test "${ac_cv_header_dfftw_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_dfftw_h" >&5 +echo "${ECHO_T}$ac_cv_header_dfftw_h" >&6 else - -fftwname=${ac_fftw_savedprefix}fftw3_mpi -echo "$as_me:$LINENO: checking for $fftwname.h" >&5 -echo $ECHO_N "checking for $fftwname.h... $ECHO_C" >&6 + # Is the header compilable? +echo "$as_me:$LINENO: checking dfftw.h usability" >&5 +echo $ECHO_N "checking dfftw.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$fftwname.h> -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} +$ac_includes_default +#include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -7123,105 +6754,179 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -LIBS="-l$fftwname $LIBS" + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +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 + +# Is the header present? +echo "$as_me:$LINENO: checking dfftw.h presence" >&5 +echo $ECHO_N "checking dfftw.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -main (); - ; - return 0; -} +#include _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 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 - : + (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 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cpp_err=yes fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -{ { echo "$as_me:$LINENO: error: Cant find $fftwname.h header. Make sure all your -fftw prefixes match - we already use $ac_fftw_firstname.h" >&5 -echo "$as_me: error: Cant find $fftwname.h header. Make sure all your -fftw prefixes match - we already use $ac_fftw_firstname.h" >&2;} - { (exit 1); exit 1; }; } - +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: dfftw.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: dfftw.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: dfftw.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: dfftw.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: dfftw.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: dfftw.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: dfftw.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: dfftw.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: dfftw.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: dfftw.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: dfftw.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: dfftw.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: dfftw.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: dfftw.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: dfftw.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: dfftw.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to gezelter@nd.edu ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for dfftw.h" >&5 +echo $ECHO_N "checking for dfftw.h... $ECHO_C" >&6 +if test "${ac_cv_header_dfftw_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_dfftw_h=$ac_header_preproc fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_cv_header_dfftw_h" >&5 +echo "${ECHO_T}$ac_cv_header_dfftw_h" >&6 fi +if test $ac_cv_header_dfftw_h = yes; then + fftw_cv_dfftw_h=yes +else + fftw_cv_dfftw_h=no +fi - fi + 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 - case ${ac_fftw_savedprefix} in - d) + + if test "$fftw_cv_libfftw3" = "yes" -a "$fftw_cv_fftw3_h" = "yes" + then + cat >>confdefs.h <<\_ACEOF -#define FFTW_NAME_DFFTW +#define HAVE_FFTW3_H 1 _ACEOF - ;; - *) + + FFTW_INC_DIR="${FFTW_HOME}/include" + FFTW_LIB_DIR="${FFTW_HOME}/lib" + FFTW_LIBS="-lfftw3" + else + if test "$fftw_cv_libfftw" = "yes" -a "$fftw_cv_fftw_h" = "yes" + then + cat >>confdefs.h <<\_ACEOF -#define FFTW_NAME_FFTW +#define HAVE_FFTW_H 1 _ACEOF - ;; - esac -else - echo "*******************************************************************" - echo "* FFTW libraries and include files are required for computing *" - echo "* undulation spectra with the staticProps program. If you don't *" - echo "* fftw turned on, OOPSE will still work, but you won't be able to *" - echo "* analyze your trajectories for this property. *" - echo "*******************************************************************" -fi # end of fftw check + + FFTW_INC_DIR="${FFTW_HOME}/include" + FFTW_LIB_DIR="${FFTW_HOME}/lib" + FFTW_LIBS="-lfftw" + else + if test "$fftw_cv_libdfftw" = "yes" -a "$fftw_cv_dfftw_h" = "yes" + then +cat >>confdefs.h <<\_ACEOF +#define HAVE_DFFTW_H 1 +_ACEOF + + FFTW_INC_DIR="${FFTW_HOME}/include" + FFTW_LIB_DIR="${FFTW_HOME}/lib" + FFTW_LIBS="-ldfftw" + else + echo "$as_me:$LINENO: checking fftw in ${FFTW_HOME}" >&5 +echo $ECHO_N "checking fftw in ${FFTW_HOME}... $ECHO_C" >&6 + FFTW_INC_DIR= + FFTW_LIB_DIR= + FFTW_LIBS= + LDFLAGS="$FFTW_OLD_LDFLAGS" + CPPFLAGS="$FFTW_OLD_CPPFLAGS" + echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6 + echo "" + echo "*********************************************************" + echo "* WARNING: Could not find a working FFTW installation *" + echo "* If you need the staticProps program to be able to *" + echo "* compute undulation spectra, be sure to specify a *" + echo "* valid fftw installation with --with-fftw=DIR *" + echo "* *" + echo "* OOPSE will still work without fftw installed. *" + echo "*********************************************************" + echo "" + fi + fi + fi + + + +fi +fi + + + # Checks for header files. echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 @@ -13293,13 +12998,19 @@ MPI_INC_DIR="$MPI/include" MPI_INC_DIR="$MPI/include" + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for mpi.h" >&5 echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6 have_mpi_h=0 rm -f conftest* -echo '#include ' > conftest.cc -if ${CXX} -I${MPI_INC_DIR} -c conftest.cc 2>&1 ; then +echo '#include ' > conftest.c +if ${CC} -I${MPI_INC_DIR} -c conftest.c 2>&1 ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 have_mpi_h=1 @@ -13322,6 +13033,16 @@ have_mpif_h=0 echo "$as_me:$LINENO: checking whether mpif.h is usable" >&5 echo $ECHO_N "checking whether mpif.h is usable... $ECHO_C" >&6 + + +ac_ext=${FC_SRCEXT-f} +ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +ac_save_ext=$ac_ext +ac_ext=F90 +ac_save_FCFLAGS=$FCFLAGS have_mpif_h=0 rm -f conftest* cat >conftest.$ac_ext <&5 @@ -13439,14 +13168,15 @@ if test x = x"$MPI_LIB"; then fi fi +$as_unset ac_cv_lib_mpich_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 "$as_me:$LINENO: checking for MPI_Init in -lpmpich" >&5 +echo $ECHO_N "checking for MPI_Init in -lpmpich... $ECHO_C" >&6 +if test "${ac_cv_lib_pmpich_MPI_Init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpi $LIBS" +LIBS="-lpmpich -lmpich -lpmpich -lmpich $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13499,25 +13229,24 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_mpi_MPI_Init=yes + ac_cv_lib_pmpich_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_mpi_MPI_Init=no +ac_cv_lib_pmpich_MPI_Init=no fi 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 - MPI_LIB="-lmpi" +echo "$as_me:$LINENO: result: $ac_cv_lib_pmpich_MPI_Init" >&5 +echo "${ECHO_T}$ac_cv_lib_pmpich_MPI_Init" >&6 +if test $ac_cv_lib_pmpich_MPI_Init = yes; then + MPI_LIB="-lpmpich -lmpich -lpmpich -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 @@ -13525,7 +13254,7 @@ LIBS="-lmpi "-llam" $LIBS" echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpi "-llam" $LIBS" +LIBS="-lmpi $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13592,19 +13321,19 @@ if test $ac_cv_lib_mpi_MPI_Init = yes; then echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6 if test $ac_cv_lib_mpi_MPI_Init = yes; then - MPI_LIB="-lmpi -llam" + MPI_LIB="-lmpi" fi fi -$as_unset ac_cv_lib_mpich_MPI_Init +$as_unset ac_cv_lib_mpi_MPI_Init 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 "$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 "-lpmpich" $LIBS" +LIBS="-lmpi -llam $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13657,25 +13386,24 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_mpich_MPI_Init=yes + ac_cv_lib_mpi_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_mpich_MPI_Init=no +ac_cv_lib_mpi_MPI_Init=no fi rm -f conftest.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 - MPI_LIB="-lpmpich -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" 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 @@ -13783,7 +13511,6 @@ fi - USE_CGAL=no cgal_makefile=auto @@ -14238,7 +13965,6 @@ CGAL_RLIB_DIR=${CGAL_RLIBDIR} - # Check whether --enable-doxygen or --disable-doxygen was given. if test "${enable_doxygen+set}" = set; then enableval="$enable_doxygen" @@ -15024,6 +14750,7 @@ s,@CXX@,$CXX,;t t s,@host_os@,$host_os,;t t s,@PROGNAME@,$PROGNAME,;t t s,@debug@,$debug,;t t +s,@USE_SINGLE_PRECISION@,$USE_SINGLE_PRECISION,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t @@ -15061,6 +14788,12 @@ s,@LIBOBJS@,$LIBOBJS,;t t s,@MODDIRFLAG@,$MODDIRFLAG,;t t s,@F90MODINCSPEC@,$F90MODINCSPEC,;t t s,@F90_MODULE_NAMES@,$F90_MODULE_NAMES,;t t +s,@ZLIB_INC_DIR@,$ZLIB_INC_DIR,;t t +s,@ZLIB_LIB_DIR@,$ZLIB_LIB_DIR,;t t +s,@ZLIB@,$ZLIB,;t t +s,@FFTW_INC_DIR@,$FFTW_INC_DIR,;t t +s,@FFTW_LIB_DIR@,$FFTW_LIB_DIR,;t t +s,@FFTW_LIBS@,$FFTW_LIBS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@POW_LIB@,$POW_LIB,;t t s,@CXXCPP@,$CXXCPP,;t t