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
19 [ --enable-debug[[=value]] compile with debug [[default=no]]],
22 if test "$with_debug" = "yes"
24 AC_DEFINE(DEBUG,1,[Define to enable debug])
30 [ --enable-warnme[[=value]] compile with all -W [[default=yes]]],
33 if test "$with_warnme" = "yes"
35 ALL_CWARNINGS="-Wall -Werror -Wmissing-prototypes -Wmissing-declarations -Wno-char-subscripts -Wno-unknown-pragmas"
36 CFLAGS="$CFLAGS $ALL_CWARNINGS"
43 dnl Check for programs
45 if test "$ac_cv_prog_cc" = "no" ; then
46 AC_MSG_ERROR([*** No C compiler found !])
55 AC_CONFIG_HEADERS(src/config.h)
56 AC_CONFIG_FILES(aubio.pc)
61 AC_CHECK_HEADER(windows.h)
64 dnl on macosx, cosf went to -lmx
65 LDFLAGS="$LDFLAGS -lmx"
73 dnl Check for required libraries
74 AC_CHECK_LIB(pthread, pthread_create)
76 dnl Check for header files
78 AC_CHECK_HEADERS([string.h stdlib.h stdio.h math.h errno.h stdarg.h unistd.h signal.h],,)
79 AC_CHECK_HEADERS(complex.h,,AC_MSG_ERROR([Ouch! missing complex.h header]))
80 AC_CHECK_HEADERS(fftw3.h ,,AC_MSG_ERROR([Ouch! missing fftw3.h headeri]))
82 dnl check for pkg-config
83 AC_PATH_PROG(PKG_CONFIG,pkg-config,no)
85 PKG_CHECK_MODULES(SNDLIB, sndfile >= 1.0.4, SNDLIB_SUPPORT=1)
86 PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, SAMPLERATE_SUPPORT=1)
88 if test "${SNDLIB_SUPPORT}" = "1"; then
89 AC_DEFINE(SNDLIB_SUPPORT,1,[Define to enable libsndfile support])
93 dnl Check for optional libraries
95 AC_HELP_STRING([--enable-fftw3f],[compile with fftw3f [[default=auto]]]),
96 [with_fftw3f=$enableval],
98 if test "$with_fftw3f" = "yes"; then
99 PKG_CHECK_MODULES(FFTWLIB, fftw3f >= 3.0.0, FFTW3F_SUPPORT=1, FFTW3F_SUPPORT=0)
101 PKG_CHECK_MODULES(FFTWLIB, fftw3 >= 3.0.0, FFTW3_SUPPORT=1)
103 if test "${FFTW3F_SUPPORT}" = "0"; then
104 PKG_CHECK_MODULES(FFTWLIB, fftw3 >= 3.0.0, FFTW3_SUPPORT=1)
106 if test "${FFTW3_SUPPORT}" = "1"; then
107 AC_DEFINE(FFTW3_SUPPORT,1,[Define to enable fftw3 support])
109 if test "${FFTW3F_SUPPORT}" = "1"; then
110 AC_DEFINE(FFTW3F_SUPPORT,1,[Define to enable fftw3f support])
114 AC_HELP_STRING([--enable-jack],[compile with jack [[default=auto]]]),
115 [with_jack=$enableval],
117 if test "$with_jack" = "yes"
119 PKG_CHECK_MODULES(JACK, jack >= 0.15.0, JACK_SUPPORT=1, JACK_SUPPORT=0)
120 if test "${JACK_SUPPORT}" = "1"; then
121 AC_DEFINE(JACK_SUPPORT,1,[Define to enable jack support])
126 AC_HELP_STRING([--enable-alsa],[compile with alsa [[default=auto]]]),
127 [with_alsa=$enableval],
129 if test "$with_alsa" = "yes"
131 PKG_CHECK_MODULES(ALSA, alsa >= 0.0.9, ALSA_SUPPORT=1, ALSA_SUPPORT=0)
132 if test "${ALSA_SUPPORT}" = "1"; then
133 AC_DEFINE(ALSA_SUPPORT,1,[Define to enable alsa support])
137 AC_ARG_ENABLE(ladcca,
138 AC_HELP_STRING([--enable-ladcca],[compile with ladcca [[default=no]]]),
139 [with_ladcca=$enableval],
141 if test "$with_ladcca" = "yes"
143 PKG_CHECK_MODULES(LADCCA, ladcca-1.0 >= 0.4.0, LADCCA_SUPPORT=1)
144 if test "${LADCCA_SUPPORT}" = "1"; then
145 AC_DEFINE(LADCCA_SUPPORT,1,[Define to enable ladcca support])
149 dnl Check for optional programs
151 dnl should check for swig version and python headers
152 AC_PATH_PROG(SWIG,swig,no)
153 AM_CONDITIONAL(SWIGFOUND, test "${SWIG}" != "no")
155 AM_CONDITIONAL(PYTHONFOUND, test "${PYTHON}" != "no")
157 AC_PATH_PROG(DOCBOOK_TO_MAN,docbook-to-man,no)
158 AM_CONDITIONAL(DOCBOOKFOUND, test "${DOCBOOK_TO_MAN}" != "no")
160 AC_CHECK_HEADER(m_pd.h,PUREDATA=y,AC_MSG_WARN([Ouch! puredata header not found]))
161 AM_CONDITIONAL(PUREDATAFOUND, test "${PUREDATA}" = "y")
171 python/aubio/Makefile
173 plugins/audacity/Makefile
174 plugins/audacity/plug-ins/Makefile
175 plugins/wavesurfer/Makefile
176 plugins/puredata/Makefile
181 echo "**************************************************************"
183 if test "${FFTW3F_SUPPORT}" = "1"; then
184 echo "Fftw3: yes (using fftw3f)"
186 if test "${FFTW3_SUPPORT}" = "1"; then
187 echo "Fftw3: yes (not using fftw3f)"
189 echo "Fftw3: no (that should not happen)"
192 if test "${SNDLIB_SUPPORT}" = "1"; then
193 echo "Libsndfile: yes"
195 echo "Libsndfile: no"
197 if test "${SAMPLERATE_SUPPORT}" = "1"; then
198 echo "Libsamplerate: yes"
200 echo "Libsamplerate: no"
202 if test "${JACK_SUPPORT}" = "1"; then
207 if test "${ALSA_SUPPORT}" = "1"; then
208 echo "ALSA midi: yes"
212 if test "${LADCCA_SUPPORT}" = "1"; then
217 echo "**************************************************************"
218 echo Configuration completed successfully. Type \'make\' to build ${PACKAGE}