source: configure.ac @ c73268a

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since c73268a was d09cad2, checked in by Paul Brossier <piem@altern.org>, 20 years ago

fix compilation of swig/python on macosx

  • Property mode set to 100644
File size: 6.3 KB
Line 
1dnl Process this file with autoconf to porduce a configure script
2
3AC_INIT(src/aubio.h)
4
5. $srcdir/VERSION
6AUBIO_VERSION=${AUBIO_MAJOR_VERSION}.${AUBIO_MINOR_VERSION}.${AUBIO_PATCH_VERSION}${AUBIO_VERSION_STATUS}
7VERSION=${AUBIO_VERSION}
8PACKAGE=aubio
9
10AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
11
12AC_PREFIX_DEFAULT(/usr)
13
14dnl enable optimization
15CFLAGS="$CFLAGS -O2"
16
17dnl Check for debug
18AC_ARG_ENABLE(debug,
19  [  --enable-debug[[=value]]   compile with debug [[default=no]]],
20  with_debug="yes",
21  with_debug="no")
22if test "$with_debug" = "yes"
23then
24  AC_DEFINE(DEBUG,1,[Define to enable debug])
25  CFLAGS="$CFLAGS -g"
26fi
27
28dnl
29AC_ARG_ENABLE(warnme,
30  [  --enable-warnme[[=value]]   compile with all -W [[default=yes]]],
31  with_warnme="no",
32  with_warnme="yes")
33if test "$with_warnme" = "yes"
34then
35  ALL_CWARNINGS="-Wall -Werror -Wmissing-prototypes -Wmissing-declarations -Wno-char-subscripts -Wno-unknown-pragmas"
36  CFLAGS="$CFLAGS $ALL_CWARNINGS"
37fi
38
39
40dnl Guess the host
41AC_CANONICAL_HOST
42
43dnl Check for programs
44AC_PROG_CC
45if test "$ac_cv_prog_cc" = "no" ; then
46   AC_MSG_ERROR([*** No C compiler found !])
47fi
48AC_PROG_INSTALL
49
50dnl Check for libtool
51AC_LIBTOOL_DLOPEN
52dnl AC_DISABLE_STATIC
53AC_PROG_LIBTOOL
54
55AC_CONFIG_HEADERS(src/config.h)
56AC_CONFIG_FILES(aubio.pc)
57
58case "${host_os}" in
59mingw*)
60  mingw32_support="yes"
61  AC_CHECK_HEADER(windows.h)
62  ;;
63darwin*)
64  dnl on macosx, cosf went to -lmx
65  LDFLAGS="$LDFLAGS -lmx"
66  dnl as long double doesn't sit well with -Wall -Werror
67  CFLAGS="$CLFAGS -Wno-long-double"
68  AC_ISC_POSIX
69  ;;
70*)
71  AC_ISC_POSIX
72  ;;
73esac
74
75dnl Check for required libraries
76AC_CHECK_LIB(pthread, pthread_create)
77
78dnl Check for header files
79AC_HEADER_STDC
80AC_CHECK_HEADERS([string.h stdlib.h stdio.h math.h errno.h stdarg.h unistd.h signal.h],,)
81AC_CHECK_HEADERS(complex.h,,AC_MSG_ERROR([Ouch! missing complex.h header]))
82AC_CHECK_HEADERS(fftw3.h  ,,AC_MSG_ERROR([Ouch! missing fftw3.h headeri]))
83
84dnl check for pkg-config
85AC_PATH_PROG(PKG_CONFIG,pkg-config,no)
86
87PKG_CHECK_MODULES(SNDLIB,     sndfile >= 1.0.4,       SNDLIB_SUPPORT=1)
88PKG_CHECK_MODULES(SAMPLERATE, samplerate  >= 0.0.15,  SAMPLERATE_SUPPORT=1)
89
90if test "${SNDLIB_SUPPORT}" = "1"; then
91  AC_DEFINE(SNDLIB_SUPPORT,1,[Define to enable libsndfile support])
92fi
93
94
95dnl Check for optional libraries
96AC_ARG_ENABLE(fftw3f,
97  AC_HELP_STRING([--enable-fftw3f],[compile with fftw3f [[default=auto]]]),
98  [with_fftw3f=$enableval],
99  with_fftw3f="yes")
100if test "$with_fftw3f" = "yes"; then
101        PKG_CHECK_MODULES(FFTWLIB,    fftw3f  >= 3.0.0,     FFTW3F_SUPPORT=1, FFTW3F_SUPPORT=0)
102else
103        PKG_CHECK_MODULES(FFTWLIB,    fftw3  >= 3.0.0,      FFTW3_SUPPORT=1)
104fi
105if test "${FFTW3F_SUPPORT}" = "0"; then
106        PKG_CHECK_MODULES(FFTWLIB,    fftw3  >= 3.0.0,      FFTW3_SUPPORT=1)
107fi
108if test "${FFTW3_SUPPORT}" = "1"; then
109  AC_DEFINE(FFTW3_SUPPORT,1,[Define to enable fftw3 support])
110fi
111if test "${FFTW3F_SUPPORT}" = "1"; then
112  AC_DEFINE(FFTW3F_SUPPORT,1,[Define to enable fftw3f support])
113fi
114
115AC_ARG_ENABLE(jack,
116  AC_HELP_STRING([--enable-jack],[compile with jack [[default=auto]]]),
117  [with_jack=$enableval],
118  with_jack="yes")
119if test "$with_jack" = "yes"
120then
121        PKG_CHECK_MODULES(JACK,       jack  >= 0.15.0,        JACK_SUPPORT=1, JACK_SUPPORT=0)
122        if test "${JACK_SUPPORT}" = "1"; then
123          AC_DEFINE(JACK_SUPPORT,1,[Define to enable jack support])
124        fi
125fi
126
127AC_ARG_ENABLE(alsa,
128  AC_HELP_STRING([--enable-alsa],[compile with alsa [[default=auto]]]),
129  [with_alsa=$enableval],
130  with_alsa="yes")
131if test "$with_alsa" = "yes"
132then
133        if test "$with_jack" = "yes"
134        then
135        PKG_CHECK_MODULES(ALSA,       alsa >= 0.0.9,          ALSA_SUPPORT=1, ALSA_SUPPORT=0)
136        if test "${ALSA_SUPPORT}" = "1"; then
137          AC_DEFINE(ALSA_SUPPORT,1,[Define to enable alsa support])
138        fi
139        else
140        AC_MSG_WARN([Disabling alsa as jack was not found])
141        fi
142fi
143
144AC_ARG_ENABLE(ladcca,
145  AC_HELP_STRING([--enable-ladcca],[compile with ladcca [[default=no]]]),
146  [with_ladcca=$enableval],
147  with_ladcca="no")
148if test "$with_ladcca" = "yes"
149then
150        PKG_CHECK_MODULES(LADCCA,       ladcca-1.0 >= 0.4.0,          LADCCA_SUPPORT=1)
151        if test "${LADCCA_SUPPORT}" = "1"; then
152          AC_DEFINE(LADCCA_SUPPORT,1,[Define to enable ladcca support])
153        fi
154fi
155 
156dnl Check for optional programs
157
158dnl should check for swig version and python headers
159AC_PATH_PROG(SWIG,swig,no)
160AM_CONDITIONAL(SWIGFOUND, test "${SWIG}" != "no")
161AM_PATH_PYTHON
162AM_CONDITIONAL(PYTHONFOUND, test "${PYTHON}" != "no")
163
164#if PYTHONFOUND
165case "${host_os}" in
166darwin*)
167  SWCFLAGS="-Wno-long-double"
168  SWLDFLAGS="-bundle -framework python -L${prefix}/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
169  ;;
170*)
171  SWLDFLAGS="-shared"
172  ;;
173esac
174
175AC_SUBST(SWCFLAGS)
176AC_SUBST(SWLDFLAGS)
177
178AC_PATH_PROG(DOCBOOK_TO_MAN,docbook-to-man,no)
179AM_CONDITIONAL(DOCBOOKFOUND, test "${DOCBOOK_TO_MAN}" != "no")
180
181AC_CHECK_HEADER(m_pd.h,PUREDATA=y,AC_MSG_WARN([Ouch! puredata header not found]))
182AM_CONDITIONAL(PUREDATAFOUND, test "${PUREDATA}" = "y")
183
184AC_OUTPUT([
185                Makefile
186                src/Makefile
187                ext/Makefile
188                examples/Makefile
189                sounds/Makefile
190                swig/Makefile
191                python/Makefile
192                python/aubio/Makefile
193                plugins/Makefile
194                plugins/audacity/Makefile
195                plugins/audacity/plug-ins/Makefile
196                plugins/wavesurfer/Makefile
197                plugins/puredata/Makefile
198                doc/Makefile
199        ])
200
201echo
202echo "**************************************************************"
203echo "Summary:"
204if test "${FFTW3F_SUPPORT}" = "1"; then
205  echo "Fftw3:                   yes (using fftw3f)"
206else
207if test "${FFTW3_SUPPORT}" = "1"; then
208  echo "Fftw3:                   yes (not using fftw3f)"
209else
210  echo "Fftw3:                   no (that should not happen)"
211fi
212fi
213if test "${SNDLIB_SUPPORT}" = "1"; then
214  echo "Libsndfile:              yes"
215else
216  echo "Libsndfile:              no"
217fi
218if test "${SAMPLERATE_SUPPORT}" = "1"; then
219  echo "Libsamplerate:           yes"
220else
221  echo "Libsamplerate:           no"
222fi
223if test "${JACK_SUPPORT}" = "1"; then
224  echo "JACK:                    yes"
225else
226  echo "JACK:                    no"
227fi
228if test "${ALSA_SUPPORT}" = "1"; then
229  echo "ALSA midi:               yes"
230else
231  echo "ALSA midi:               no"
232fi
233if test "${LADCCA_SUPPORT}" = "1"; then
234  echo "Ladcca:                  yes"
235else
236  echo "Ladcca:                  no"
237fi
238echo "**************************************************************"
239echo Configuration completed successfully. Type \'make\' to build ${PACKAGE}
Note: See TracBrowser for help on using the repository browser.