1 dnl Process this file with autoconf to porduce a configure script
6 AUBIO_VERSION=${AUBIO_MAJOR_VERSION}.${AUBIO_MINOR_VERSION}.${AUBIO_PATCH_VERSION}${AUBIO_VERSION_STATUS}
7 VERSION=${AUBIO_VERSION}
10 AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
12 AC_PREFIX_DEFAULT(/usr)
14 dnl enable optimization
20 [ --enable-debug[[=value]] compile with debug [[default=no]]],
23 if test "$with_debug" = "yes"
25 AC_DEFINE(DEBUG,1,[Define to enable debug])
31 [ --enable-warnme[[=value]] compile with all -W [[default=yes]]],
34 if test "$with_warnme" = "yes"
36 ALL_CWARNINGS="-Wall -Werror -Wmissing-prototypes -Wmissing-declarations -Wno-char-subscripts -Wno-unknown-pragmas"
37 CFLAGS="$CFLAGS $ALL_CWARNINGS"
44 dnl Check for programs
46 if test "$ac_cv_prog_cc" = "no" ; then
47 AC_MSG_ERROR([*** No C compiler found !])
57 AC_CONFIG_HEADERS(src/config.h)
58 AC_CONFIG_FILES(aubio.pc)
63 AC_CHECK_HEADER(windows.h)
66 dnl on macosx, cosf went to -lmx
67 LDFLAGS="$LDFLAGS -lmx"
75 dnl Check for libraries
76 AC_CHECK_LIB(pthread, pthread_create)
78 dnl Check for header files
80 AC_CHECK_HEADERS([string.h stdlib.h stdio.h math.h errno.h stdarg.h unistd.h signal.h],,)
81 AC_CHECK_HEADERS(complex.h,,AC_MSG_ERROR([Ouch! missing complex.h header]))
82 AC_CHECK_HEADERS(fftw3.h ,,AC_MSG_ERROR([Ouch! missing fftw3.h headeri]))
84 dnl check for pkg-config
85 AC_PATH_PROG(PKG_CONFIG,pkg-config,no)
87 dnl Check for required libraries
88 PKG_CHECK_MODULES(FFTWLIB, fftw3 >= 3.0.0, FFTW3_SUPPORT=1)
89 if test "${FFTW3_SUPPORT}" = "1"; then
90 AC_DEFINE(FFTW3_SUPPORT,1,[Define to enable fftw3 support])
92 PKG_CHECK_MODULES(SNDLIB, sndfile >= 1.0.4, SNDLIB_SUPPORT=1)
93 PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, SAMPLERATE_SUPPORT=1)
95 if test "${SNDLIB_SUPPORT}" = "1"; then
96 AC_DEFINE(SNDLIB_SUPPORT,1,[Define to enable libsndfile support])
100 dnl Check for optional libraries
101 AC_ARG_ENABLE(fftw3f,
102 [ --enable-fftw3f[[=value]] compile with fftw3f [[default=no]]],
105 if test "$with_fftw3f" = "yes"; then
106 PKG_CHECK_MODULES(FFTWLIB, fftw3f >= 3.0.0, FFTW3F_SUPPORT=1)
108 if test "${FFTW3F_SUPPORT}" = "1"; then
109 AC_DEFINE(FFTW3F_SUPPORT,1,[Define to enable fftw3f support])
113 [ --enable-jack[[=value]] compile with jack [[default=no]]],
116 if test "$with_jack" = "yes"
118 PKG_CHECK_MODULES(JACK, jack >= 0.15.0, JACK_SUPPORT=1)
119 if test "${JACK_SUPPORT}" = "1"; then
120 AC_DEFINE(JACK_SUPPORT,1,[Define to enable jack support])
125 [ --enable-alsa[[=value]] compile with alsa [[default=no]]],
128 if test "$with_alsa" = "yes"
130 PKG_CHECK_MODULES(ALSA, alsa >= 0.0.9, ALSA_SUPPORT=1)
131 if test "${ALSA_SUPPORT}" = "1"; then
132 AC_DEFINE(ALSA_SUPPORT,1,[Define to enable alsa support])
136 AC_ARG_ENABLE(ladcca,
137 [ --enable-ladcca[[=value]] compile with ladcca [[default=no]]],
140 if test "$with_ladcca" = "yes"
142 PKG_CHECK_MODULES(LADCCA, ladcca-1.0 >= 0.4.0, LADCCA_SUPPORT=1)
143 if test "${LADCCA_SUPPORT}" = "1"; then
144 AC_DEFINE(LADCCA_SUPPORT,1,[Define to enable ladcca support])
157 python/aubio/Makefile
159 plugins/audacity/Makefile
160 plugins/audacity/plug-ins/Makefile
161 plugins/wavesurfer/Makefile
166 echo "**************************************************************"
168 if test "${FFTW3F_SUPPORT}" = "1"; then
169 echo "Fftw3: yes (fftw3f)"
171 if test "${FFTW3_SUPPORT}" = "1"; then
177 if test "${SNDLIB_SUPPORT}" = "1"; then
178 echo "Libsndfile: yes"
180 echo "Libsndfile: no"
182 if test "${SAMPLERATE_SUPPORT}" = "1"; then
183 echo "Libsamplerate: yes"
185 echo "Libsamplerate: no"
187 if test "${JACK_SUPPORT}" = "1"; then
192 if test "${ALSA_SUPPORT}" = "1"; then
193 echo "ALSA midi: yes"
197 if test "${LADCCA_SUPPORT}" = "1"; then
202 echo "**************************************************************"
203 echo Configuration completed successfully. Type \'make\' to build ${PACKAGE}