changeset 16332:5293cee91891

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.
author John W. Eaton <jwe@octave.org>
date Sun, 17 Mar 2013 05:12:56 -0400
parents 8b70f6118a5e
children 100a7bd2590e
files configure.ac oct-conf-post.in.h
diffstat 2 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Sun Mar 17 05:01:00 2013 -0400
+++ b/configure.ac	Sun Mar 17 05:12:56 2013 -0400
@@ -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)
--- a/oct-conf-post.in.h	Sun Mar 17 05:01:00 2013 -0400
+++ b/oct-conf-post.in.h	Sun Mar 17 05:12:56 2013 -0400
@@ -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)