source: configure.ac @ dc27a81

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

updated configure.ac to detect jack, alsa and fftw3f automatically

  • Property mode set to 100644
File size: 5.8 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  AC_ISC_POSIX
67  ;;
68*)
69  AC_ISC_POSIX
70  ;;
71esac
72
73dnl Check for required libraries
74AC_CHECK_LIB(pthread, pthread_create)
75
76dnl Check for header files
77AC_HEADER_STDC
78AC_CHECK_HEADERS([string.h stdlib.h stdio.h math.h errno.h stdarg.h unistd.h signal.h],,)
79AC_CHECK_HEADERS(complex.h,,AC_MSG_ERROR([Ouch! missing complex.h header]))
80AC_CHECK_HEADERS(fftw3.h  ,,AC_MSG_ERROR([Ouch! missing fftw3.h headeri]))
81
82dnl check for pkg-config
83AC_PATH_PROG(PKG_CONFIG,pkg-config,no)
84
85PKG_CHECK_MODULES(SNDLIB,     sndfile >= 1.0.4,       SNDLIB_SUPPORT=1)
86PKG_CHECK_MODULES(SAMPLERATE, samplerate  >= 0.0.15,  SAMPLERATE_SUPPORT=1)
87
88if test "${SNDLIB_SUPPORT}" = "1"; then
89  AC_DEFINE(SNDLIB_SUPPORT,1,[Define to enable libsndfile support])
90fi
91
92
93dnl Check for optional libraries
94AC_ARG_ENABLE(fftw3f,
95  AC_HELP_STRING([--enable-fftw3f],[compile with fftw3f [[default=auto]]]),
96  [with_fftw3f=$enableval],
97  with_fftw3f="yes")
98if test "$with_fftw3f" = "yes"; then
99        PKG_CHECK_MODULES(FFTWLIB,    fftw3f  >= 3.0.0,     FFTW3F_SUPPORT=1, FFTW3F_SUPPORT=0)
100else
101        PKG_CHECK_MODULES(FFTWLIB,    fftw3  >= 3.0.0,      FFTW3_SUPPORT=1)
102fi
103if test "${FFTW3F_SUPPORT}" = "0"; then
104        PKG_CHECK_MODULES(FFTWLIB,    fftw3  >= 3.0.0,      FFTW3_SUPPORT=1)
105fi
106if test "${FFTW3_SUPPORT}" = "1"; then
107  AC_DEFINE(FFTW3_SUPPORT,1,[Define to enable fftw3 support])
108fi
109if test "${FFTW3F_SUPPORT}" = "1"; then
110  AC_DEFINE(FFTW3F_SUPPORT,1,[Define to enable fftw3f support])
111fi
112
113AC_ARG_ENABLE(jack,
114  AC_HELP_STRING([--enable-jack],[compile with jack [[default=auto]]]),
115  [with_jack=$enableval],
116  with_jack="yes")
117if test "$with_jack" = "yes"
118then
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])
122        fi
123fi
124
125AC_ARG_ENABLE(alsa,
126  AC_HELP_STRING([--enable-alsa],[compile with alsa [[default=auto]]]),
127  [with_alsa=$enableval],
128  with_alsa="yes")
129if test "$with_alsa" = "yes"
130then
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])
134        fi
135fi
136
137AC_ARG_ENABLE(ladcca,
138  AC_HELP_STRING([--enable-ladcca],[compile with ladcca [[default=no]]]),
139  [with_ladcca=$enableval],
140  with_ladcca="no")
141if test "$with_ladcca" = "yes"
142then
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])
146        fi
147fi
148 
149dnl Check for optional programs
150
151dnl should check for swig version and python headers
152AC_PATH_PROG(SWIG,swig,no)
153AM_CONDITIONAL(SWIGFOUND, test "${SWIG}" != "no")
154AM_PATH_PYTHON
155AM_CONDITIONAL(PYTHONFOUND, test "${PYTHON}" != "no")
156
157AC_PATH_PROG(DOCBOOK_TO_MAN,docbook-to-man,no)
158AM_CONDITIONAL(DOCBOOKFOUND, test "${DOCBOOK_TO_MAN}" != "no")
159
160AC_CHECK_HEADER(m_pd.h,PUREDATA=y,AC_MSG_WARN([Ouch! puredata header not found]))
161AM_CONDITIONAL(PUREDATAFOUND, test "${PUREDATA}" = "y")
162
163AC_OUTPUT([
164                Makefile
165                src/Makefile
166                ext/Makefile
167                examples/Makefile
168                sounds/Makefile
169                swig/Makefile
170                python/Makefile
171                python/aubio/Makefile
172                plugins/Makefile
173                plugins/audacity/Makefile
174                plugins/audacity/plug-ins/Makefile
175                plugins/wavesurfer/Makefile
176                plugins/puredata/Makefile
177                doc/Makefile
178        ])
179
180echo
181echo "**************************************************************"
182echo "Summary:"
183if test "${FFTW3F_SUPPORT}" = "1"; then
184  echo "Fftw3:                   yes (using fftw3f)"
185else
186if test "${FFTW3_SUPPORT}" = "1"; then
187  echo "Fftw3:                   yes (not using fftw3f)"
188else
189  echo "Fftw3:                   no (that should not happen)"
190fi
191fi
192if test "${SNDLIB_SUPPORT}" = "1"; then
193  echo "Libsndfile:              yes"
194else
195  echo "Libsndfile:              no"
196fi
197if test "${SAMPLERATE_SUPPORT}" = "1"; then
198  echo "Libsamplerate:           yes"
199else
200  echo "Libsamplerate:           no"
201fi
202if test "${JACK_SUPPORT}" = "1"; then
203  echo "JACK:                    yes"
204else
205  echo "JACK:                    no"
206fi
207if test "${ALSA_SUPPORT}" = "1"; then
208  echo "ALSA midi:               yes"
209else
210  echo "ALSA midi:               no"
211fi
212if test "${LADCCA_SUPPORT}" = "1"; then
213  echo "Ladcca:                  yes"
214else
215  echo "Ladcca:                  no"
216fi
217echo "**************************************************************"
218echo Configuration completed successfully. Type \'make\' to build ${PACKAGE}
Note: See TracBrowser for help on using the repository browser.