# HG changeset patch # User John W. Eaton # Date 1363511576 14400 # Node ID 5293cee91891c330738c884cbecad7744e88ce5c # Parent 8b70f6118a5ea312dc1cf4b3c9fbfc517c91a317 conditionally define HAVE_FFTW and HAVE_ZLIB in config.h * configure.ac: Conditionally define HAVE_FFTW and HAVE_ZLIB in config.h instead of defining them in oct-conf-post.h. diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -694,6 +694,11 @@ [ZLIB library not found. Octave will not be able to save or load compressed data files or HDF5 files.], [zlib.h], [gzclearerr]) +### Also define HAVE_ZLIB if libz is found. +if test $octave_cv_lib_z = yes; then + AC_DEFINE(HAVE_ZLIB, 1, [Define to 1 if ZLIB is available.]) +fi + ### Check for the LLVM library build_jit=no @@ -823,9 +828,16 @@ OCTAVE_CHECK_FFTW_THREADS(fftw3f, fftwf_plan_with_nthreads) fi +## Octave is currently unable to use FFTW unless both float +## and double versions are available. + AM_CONDITIONAL([AMCOND_HAVE_FFTW], [test -n "$FFTW3_LIBS" && test -n "$FFTW3F_LIBS"]) +if test -n "$FFTW3_LIBS" && test -n "$FFTW3F_LIBS"; then + AC_DEFINE(HAVE_FFTW, 1, [Define if you have both FFTW3 and FFTW3F libraries.]) +fi + ## Subdirectory of liboctave/cruft to build if FFTW is not found. FFT_DIR="fftpack" AC_SUBST(FFT_DIR) diff --git a/oct-conf-post.in.h b/oct-conf-post.in.h --- a/oct-conf-post.in.h +++ b/oct-conf-post.in.h @@ -112,17 +112,6 @@ #define OCTAVE_EMPTY_CPP_ARG -/* Octave is currently unable to use FFTW unless both float - and double versions are available. */ -#if defined (HAVE_FFTW3) && defined (HAVE_FFTW3F) -#define HAVE_FFTW -#endif - -/* Backward compatibility. */ -#if defined (HAVE_Z) -#define HAVE_ZLIB -#endif - /* oct-dlldefs.h */ #if defined (_MSC_VER)