1 dnl Process this file with autoconf to produce a configure script
7 AUBIO_VERSION=${AUBIO_MAJOR_VERSION}.${AUBIO_MINOR_VERSION}.${AUBIO_PATCH_VERSION}${AUBIO_VERSION_STATUS}
8 VERSION=${AUBIO_VERSION}
11 dnl shared library version
13 LIBAUBIO_LT_REVISION=0
15 SHARED_VERSION_INFO="$LIBAUBIO_LT_CURRENT:$LIBAUBIO_LT_REVISION:$LIBAUBIO_LT_AGE"
16 AC_SUBST(SHARED_VERSION_INFO)
18 AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
21 AC_PREFIX_DEFAULT(/usr)
23 dnl enable optimization
28 [ --enable-debug[[=value]] compile with debug [[default=no]]],
31 if test "$with_debug" = "yes"
33 AC_DEFINE(DEBUG,1,[Define to enable debug])
39 [ --enable-warnme[[=value]] compile with all -W [[default=yes]]],
42 if test "$with_warnme" = "yes"
44 CFLAGS="$CFLAGS -Wall -Wextra -Werror -Wmissing-prototypes -Wmissing-declarations -Wno-unused-parameter"
51 dnl Check for programs
53 if test "$ac_cv_prog_cc" = "no" ; then
54 AC_MSG_ERROR([*** No C compiler found !])
63 AC_CONFIG_HEADERS(src/config.h)
64 AC_CONFIG_FILES(aubio.pc)
69 AC_CHECK_HEADER(windows.h)
72 dnl on macosx, cosf went to -lmx
73 LDFLAGS="$LDFLAGS -lmx"
74 dnl as long double doesn't sit well with -Wall -Werror
75 CFLAGS="$CFLAGS -Wno-long-double"
83 dnl Check for required libraries
84 AC_CHECK_LIB(pthread, pthread_create)
86 dnl Check for header files
88 AC_CHECK_HEADERS([string.h stdlib.h stdio.h math.h errno.h stdarg.h unistd.h signal.h],,)
89 AC_CHECK_HEADERS(complex.h,,AC_MSG_ERROR([Ouch! missing complex.h header]))
90 AC_CHECK_HEADERS(fftw3.h ,,AC_MSG_ERROR([Ouch! missing fftw3.h header]))
92 AC_CACHE_CHECK(for C99 __VA_ARGS__ macro,
96 #define AUBIO_ERR(...) fprintf(stderr, __VA_ARGS__)
99 AUBIO_ERR("%s\n", "ERR");
101 ac_cv_varargs_macros=yes,
102 ac_cv_varargs_macros=no)
104 if test "$ac_cv_varargs_macros" = "yes"; then
105 AC_DEFINE(HAVE_C99_VARARGS_MACROS, 1,
106 [Defined when c99 style varargs macros are supported])
110 dnl check for pkg-config
111 AC_PATH_PROG(PKG_CONFIG,pkg-config,no)
113 PKG_CHECK_MODULES(SNDLIB, sndfile >= 1.0.4, SNDLIB_SUPPORT=1)
114 PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, SAMPLERATE_SUPPORT=1)
116 if test "${SNDLIB_SUPPORT}" = "1"; then
117 AC_DEFINE(SNDLIB_SUPPORT,1,[Define to enable libsndfile support])
121 dnl Check for optional libraries
122 AC_ARG_ENABLE(fftw3f,
123 AC_HELP_STRING([--enable-fftw3f],[compile with fftw3f [[default=auto]]]),
124 [with_fftw3f=$enableval],
126 if test "$with_fftw3f" = "yes"; then
127 PKG_CHECK_MODULES(FFTWLIB, fftw3f >= 3.0.0, FFTW3F_SUPPORT=1, FFTW3F_SUPPORT=0)
129 PKG_CHECK_MODULES(FFTWLIB, fftw3 >= 3.0.0, FFTW3_SUPPORT=1)
131 if test "${FFTW3F_SUPPORT}" = "0"; then
132 PKG_CHECK_MODULES(FFTWLIB, fftw3 >= 3.0.0, FFTW3_SUPPORT=1)
134 if test "${FFTW3_SUPPORT}" = "1"; then
135 AC_DEFINE(FFTW3_SUPPORT,1,[Define to enable fftw3 support])
137 if test "${FFTW3F_SUPPORT}" = "1"; then
138 AC_DEFINE(FFTW3F_SUPPORT,1,[Define to enable fftw3f support])
142 AC_HELP_STRING([--enable-jack],[compile with jack [[default=auto]]]),
143 [with_jack=$enableval],
145 if test "$with_jack" = "yes"
147 PKG_CHECK_MODULES(JACK, jack >= 0.15.0, JACK_SUPPORT=1, JACK_SUPPORT=0)
148 if test "${JACK_SUPPORT}" = "1"; then
149 AC_DEFINE(JACK_SUPPORT,1,[Define to enable jack support])
154 AC_HELP_STRING([--enable-alsa],[compile with alsa [[default=auto]]]),
155 [with_alsa=$enableval],
157 if test "$with_alsa" = "yes"
159 if test "$with_jack" = "yes"
161 PKG_CHECK_MODULES(ALSA, alsa >= 0.0.9, ALSA_SUPPORT=1, ALSA_SUPPORT=0)
162 if test "${ALSA_SUPPORT}" = "1"; then
163 AC_DEFINE(ALSA_SUPPORT,1,[Define to enable alsa support])
166 AC_MSG_WARN([Disabling alsa as jack was not found])
170 AC_ARG_ENABLE(ladcca,
171 AC_HELP_STRING([--enable-ladcca],[compile with ladcca [[default=no]]]),
172 [with_ladcca=$enableval],
174 if test "$with_ladcca" = "yes"
176 PKG_CHECK_MODULES(LADCCA, ladcca-1.0 >= 0.4.0, LADCCA_SUPPORT=1)
177 if test "${LADCCA_SUPPORT}" = "1"; then
178 AC_DEFINE(LADCCA_SUPPORT,1,[Define to enable ladcca support])
182 AC_ARG_ENABLE(testprogs,
183 AC_HELP_STRING([--enable-testprogs],[compile test programs [[default=no]]]),
184 [with_testprogs=$enableval],
186 AM_CONDITIONAL(COMPILE_TESTS,test "${with_testprogs}" != "no")
188 dnl Check for optional programs
190 dnl should check for swig version and python headers
191 AC_PATH_PROG(SWIG,swig,no)
192 AM_CONDITIONAL(SWIGFOUND, test "${SWIG}" != "no")
194 AM_CONDITIONAL(PYTHONFOUND, test "${PYTHON}" != "no")
199 SWCFLAGS="-Wno-long-double"
200 SWLDFLAGS="-bundle -framework python -L${prefix}/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
210 AC_PATH_PROG(DOCBOOK_TO_MAN,docbook-to-man,no)
211 AM_CONDITIONAL(DOCBOOKFOUND, test "${DOCBOOK_TO_MAN}" != "no")
213 AC_CHECK_HEADER(m_pd.h,PUREDATA=y,AC_MSG_WARN([Puredata header not found.]))
214 AM_CONDITIONAL(PUREDATAFOUND, test "${PUREDATA}" = "y")
221 examples/tests/Makefile
225 python/aubio/Makefile
227 plugins/audacity/Makefile
228 plugins/audacity/plug-ins/Makefile
229 plugins/wavesurfer/Makefile
230 plugins/puredata/Makefile
235 echo "**************************************************************"
237 if test "${FFTW3F_SUPPORT}" = "1"; then
238 echo "Fftw3: yes (using fftw3f)"
240 if test "${FFTW3_SUPPORT}" = "1"; then
241 echo "Fftw3: yes (not using fftw3f)"
243 echo "Fftw3: no (that should not happen)"
246 if test "${SNDLIB_SUPPORT}" = "1"; then
247 echo "Libsndfile: yes"
249 echo "Libsndfile: no"
251 if test "${SAMPLERATE_SUPPORT}" = "1"; then
252 echo "Libsamplerate: yes"
254 echo "Libsamplerate: no"
256 if test "${JACK_SUPPORT}" = "1"; then
261 if test "${ALSA_SUPPORT}" = "1"; then
262 echo "ALSA midi: yes"
266 if test "${LADCCA_SUPPORT}" = "1"; then
269 echo "**************************************************************"
270 echo Configuration completed successfully. Type \'make\' to build ${PACKAGE}