dnl Init automake
AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
+dnl Enable silent rules, use with make V=0
+dnl AM_SILENT_RULES
+
dnl Maintainer mode
AM_MAINTAINER_MODE
if test "$ac_cv_prog_cc" = "no" ; then
AC_MSG_ERROR([*** No C compiler found !])
fi
-AC_PROG_CXX
AC_PROG_INSTALL
AUBIO_CFLAGS=
+dnl Enable double precision (no)
+AC_ARG_ENABLE(double,
+ AC_HELP_STRING([--enable-double],[compile in double precision [[default=no]]]),
+ with_double_precision="yes",
+ with_double_precision="no")
+if test "$with_double_precision" = "yes"
+then
+ AC_DEFINE(HAVE_AUBIO_DOUBLE,1,[Define to enable double precision])
+fi
+
dnl Enable debugging (no)
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],[compile in debug mode [[default=no]]]),
AC_CHECK_LIB(pthread, pthread_create)
dnl Check for header files
-AC_CHECK_HEADERS([string.h stdlib.h stdio.h math.h errno.h stdarg.h unistd.h signal.h],,)
+AC_CHECK_HEADERS([string.h stdlib.h stdio.h math.h limits.h errno.h stdarg.h unistd.h signal.h],,)
AC_CHECK_HEADERS(fftw3.h,,AC_MSG_ERROR([Ouch! missing fftw3.h header]))
AC_ARG_ENABLE(complex,
AC_HELP_STRING([--enable-complex],[compile with complex.h [[default=auto]]]),
[with_complex=$enableval],
- with_complex="yes")
+ with_complex="no")
if test "$with_complex" = "yes"; then
AC_CHECK_HEADERS(complex.h,,AC_MSG_WARN([Ouch! missing complex.h header]))
fi
dnl Check for pkg-config
AC_PATH_PROG(PKG_CONFIG,pkg-config,no)
-PKG_CHECK_MODULES(SNDLIB, sndfile >= 1.0.4, HAVE_SNDLIB=1)
-PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, HAVE_SAMPLERATE=1)
+PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.4, HAVE_SNDFILE=1)
+if test "${HAVE_SNDFILE}" = "1"; then
+ AC_DEFINE(HAVE_SNDFILE,1,[Define to enable libsndfile support])
+fi
-if test "${HAVE_SNDLIB}" = "1"; then
- AC_DEFINE(HAVE_SNDLIB,1,[Define to enable libsndfile support])
+dnl Enable samplerate support (auto)
+AC_ARG_ENABLE(samplerate,
+ AC_HELP_STRING([--enable-samplerate],[compile with samplerate [[default=auto]]]),
+ [with_samplerate=$enableval],
+ with_samplerate="yes")
+if test "$with_samplerate" = "yes"; then
+ PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, HAVE_SAMPLERATE=1,
+ HAVE_SAMPLERATE=0)
+ if test "${HAVE_SAMPLERATE}" = "1"; then
+ AC_DEFINE(HAVE_SAMPLERATE,1,[Define to enable libsamplerate support])
+ fi
fi
dnl Check for fftw3 (required)
+dnl if we compile in double precsion, default to fftw3, else fftw3f
+if test "$with_double_precision" = "yes"; then
+ default_fftw3f="no"
+else
+ default_fftw3f="yes"
+fi
AC_ARG_ENABLE(fftw3f,
AC_HELP_STRING([--enable-fftw3f],[compile with fftw3f [[default=auto]]]),
[with_fftw3f=$enableval],
- with_fftw3f="yes")
+ [with_fftw3f=$default_fftw3f])
if test "$with_fftw3f" = "yes"; then
PKG_CHECK_MODULES(FFTWLIB, fftw3f >= 3.0.0, HAVE_FFTW3F=1, HAVE_FFTW3F=0)
else
fi
fi
-dnl Enable alsa support (auto)
-AC_ARG_ENABLE(alsa,
- AC_HELP_STRING([--enable-alsa],[compile with alsa [[default=auto]]]),
- [with_alsa=$enableval],
- with_alsa="yes")
-if test "$with_alsa" = "yes"
-then
- if test "$with_jack" = "yes"
- then
- PKG_CHECK_MODULES(ALSA, alsa >= 0.0.9, HAVE_ALSA=1, HAVE_ALSA=0)
- if test "${HAVE_ALSA}" = "1"; then
- AC_DEFINE(HAVE_ALSA,1,[Define to enable alsa support])
- fi
- else
- AC_MSG_WARN([Disabling alsa as jack was not found])
- fi
-fi
-
dnl Enable lash support
AC_ARG_ENABLE(lash,
AC_HELP_STRING([--enable-lash],[compile with lash [[default=auto]]]),
AC_PATH_PROG(DOCBOOK_TO_MAN,docbook-to-man,no)
AM_CONDITIONAL(DOCBOOKFOUND, test "${DOCBOOK_TO_MAN}" != "no")
-dnl Check for Puredata
-AC_CHECK_HEADER(m_pd.h,PUREDATA=y,AC_MSG_WARN([Puredata header not found.]))
-AM_CONDITIONAL(PUREDATAFOUND, test "${PUREDATA}" = "y")
-
dnl Check for Java
AC_CHECK_HEADER(jni.h,JAVAHEADERS=y,AC_MSG_WARN([Java header jni.h not found.]))
AM_CONDITIONAL(JAVAFOUND, test "${JAVAHEADERS}" = "y")
AC_OUTPUT([
Makefile
src/Makefile
- ext/Makefile
- cpp/Makefile
examples/Makefile
tests/Makefile
tests/src/Makefile
- tests/cpp/Makefile
sounds/Makefile
swig/Makefile
python/Makefile
python/aubio/Makefile
- java/Makefile
- java/aubio/Makefile
- plugins/Makefile
- plugins/audacity/Makefile
- plugins/audacity/plug-ins/Makefile
- plugins/wavesurfer/Makefile
- plugins/puredata/Makefile
+ interfaces/java/Makefile
+ interfaces/java/aubio/Makefile
doc/Makefile
])
echo "Fftw3: no (that should not happen)"
fi
fi
-if test "${HAVE_SNDLIB}" = "1"; then
+if test "${HAVE_SNDFILE}" = "1"; then
echo "Libsndfile: yes"
else
echo "Libsndfile: no"
else
echo "JACK: no"
fi
-if test "${HAVE_ALSA}" = "1"; then
- echo "ALSA midi: yes"
-else
- echo "ALSA midi: no"
-fi
if test "${HAVE_LASH}" = "1"; then
echo "Lash: yes"
else
echo "Lash: no"
fi
-if test "${PUREDATA}" = "y"; then
- echo "PureData: yes"
-else
- echo "PureData: no"
-fi
echo "**************************************************************"
echo Configuration completed successfully. Type \'make\' to build ${PACKAGE}