source: configure.ac @ d17f63e

feature/autosinkfeature/constantqfeature/pitchshiftfeature/pydocstringsfeature/timestretchpitchshiftsamplertimestretchyinfft+
Last change on this file since d17f63e was d17f63e, checked in by Paul Brossier <piem@altern.org>, 15 years ago

added -lmx on macosx

  • Property mode set to 100644
File size: 5.0 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
17       
18dnl Check for debug
19AC_ARG_ENABLE(debug,
20  [  --enable-debug[[=value]]   compile with debug [[default=no]]],
21  with_debug="yes",
22  with_debug="no")
23if test "$with_debug" = "yes"
24then
25  AC_DEFINE(DEBUG,1,[Define to enable debug])
26  CFLAGS="$CFLAGS -g"
27fi
28
29dnl
30AC_ARG_ENABLE(warnme,
31  [  --enable-warnme[[=value]]   compile with all -W [[default=yes]]],
32  with_warnme="no",
33  with_warnme="yes")
34if test "$with_warnme" = "yes"
35then
36        ALL_CWARNINGS="-Wall -Werror -Wmissing-prototypes -Wmissing-declarations -Wno-char-subscripts -Wno-unknown-pragmas"
37        CFLAGS="$CFLAGS $ALL_CWARNINGS"
38fi
39
40
41dnl Guess the host
42AC_CANONICAL_HOST
43
44dnl Check for programs
45AC_PROG_CC
46if test "$ac_cv_prog_cc" = "no" ; then
47   AC_MSG_ERROR([*** No C compiler found !])
48fi
49AC_PROG_INSTALL
50dnl AC_PROG_SWIG
51
52dnl Check for libtool
53AC_LIBTOOL_DLOPEN
54dnl AC_DISABLE_STATIC
55AC_PROG_LIBTOOL
56
57AC_CONFIG_HEADERS(src/config.h)
58AC_CONFIG_FILES(aubio.pc)
59
60case "${host_os}" in
61mingw*)
62  mingw32_support="yes"
63  AC_CHECK_HEADER(windows.h)
64  ;;
65darwin*)
66  dnl on macosx, cosf went to -lmx
67  LDFLAGS="$LDFLAGS -lmx"
68  AC_ISC_POSIX
69  ;;
70*)
71  AC_ISC_POSIX
72  ;;
73esac
74
75dnl Check for 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
87dnl Check for required libraries
88PKG_CHECK_MODULES(FFTWLIB,    fftw3  >= 3.0.0,        FFTW3_SUPPORT=1)
89if test "${FFTW3_SUPPORT}" = "1"; then
90  AC_DEFINE(FFTW3_SUPPORT,1,[Define to enable fftw3 support])
91fi
92PKG_CHECK_MODULES(SNDLIB,     sndfile >= 1.0.4,       SNDLIB_SUPPORT=1)
93PKG_CHECK_MODULES(SAMPLERATE, samplerate  >= 0.0.15,  SAMPLERATE_SUPPORT=1)
94
95if test "${SNDLIB_SUPPORT}" = "1"; then
96  AC_DEFINE(SNDLIB_SUPPORT,1,[Define to enable libsndfile support])
97fi
98
99
100dnl Check for optional libraries
101AC_ARG_ENABLE(fftw3f,
102  [  --enable-fftw3f[[=value]]   compile with fftw3f [[default=no]]],
103  with_fftw3f="yes",
104  with_fftw3f="no")
105if test "$with_fftw3f" = "yes"; then
106        PKG_CHECK_MODULES(FFTWLIB,    fftw3f  >= 3.0.0,     FFTW3F_SUPPORT=1)
107fi
108if test "${FFTW3F_SUPPORT}" = "1"; then
109  AC_DEFINE(FFTW3F_SUPPORT,1,[Define to enable fftw3f support])
110fi
111
112AC_ARG_ENABLE(jack,
113  [  --enable-jack[[=value]]   compile with jack [[default=no]]],
114  with_jack="yes",
115  with_jack="no")
116if test "$with_jack" = "yes"
117then
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])
121        fi
122fi
123
124AC_ARG_ENABLE(alsa,
125  [  --enable-alsa[[=value]]   compile with alsa [[default=no]]],
126  with_alsa="yes",
127  with_alsa="no")
128if test "$with_alsa" = "yes"
129then
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])
133        fi
134fi
135
136AC_ARG_ENABLE(ladcca,
137  [  --enable-ladcca[[=value]]   compile with ladcca [[default=no]]],
138  with_ladcca="yes",
139  with_ladcca="no")
140if test "$with_ladcca" = "yes"
141then
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])
145        fi
146fi
147 
148AM_PATH_PYTHON(,,)
149
150AC_OUTPUT([
151                Makefile
152                src/Makefile
153                examples/Makefile
154                sounds/Makefile
155                doc/Makefile
156                python/Makefile
157                python/aubio/Makefile
158                plugins/Makefile
159                plugins/audacity/Makefile
160                plugins/audacity/plug-ins/Makefile
161                plugins/wavesurfer/Makefile
162                swig/Makefile
163        ])
164
165echo
166echo "**************************************************************"
167echo "Summary:"
168if test "${FFTW3F_SUPPORT}" = "1"; then
169  echo "Fftw3:                   yes (fftw3f)"
170else
171if test "${FFTW3_SUPPORT}" = "1"; then
172  echo "Fftw3:                   yes"
173else
174  echo "Fftw3f:                  no"
175fi
176fi
177if test "${SNDLIB_SUPPORT}" = "1"; then
178  echo "Libsndfile:              yes"
179else
180  echo "Libsndfile:              no"
181fi
182if test "${SAMPLERATE_SUPPORT}" = "1"; then
183  echo "Libsamplerate:           yes"
184else
185  echo "Libsamplerate:           no"
186fi
187if test "${JACK_SUPPORT}" = "1"; then
188  echo "JACK:                    yes"
189else
190  echo "JACK:                    no"
191fi
192if test "${ALSA_SUPPORT}" = "1"; then
193  echo "ALSA midi:               yes"
194else
195  echo "ALSA midi:               no"
196fi
197if test "${LADCCA_SUPPORT}" = "1"; then
198  echo "Ladcca:                  yes"
199else
200  echo "Ladcca:                  no"
201fi
202echo "**************************************************************"
203echo Configuration completed successfully. Type \'make\' to build ${PACKAGE}
Note: See TracBrowser for help on using the repository browser.