source: configure.ac @ cfa0f12

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

src/mathutils.c: add aubio_is_power_of_two and aubio_next_power_of_two

  • Property mode set to 100644
File size: 8.4 KB
RevLine 
[5215c01]1dnl Process this file with autoconf to produce a configure script
[96fb8ad]2
[16109b3]3dnl Init autoconf
[96fb8ad]4AC_INIT(src/aubio.h)
5
[16109b3]6dnl Package name and version
7PACKAGE=aubio
[96fb8ad]8. $srcdir/VERSION
9AUBIO_VERSION=${AUBIO_MAJOR_VERSION}.${AUBIO_MINOR_VERSION}.${AUBIO_PATCH_VERSION}${AUBIO_VERSION_STATUS}
10VERSION=${AUBIO_VERSION}
11
[16109b3]12dnl Shared library version
[5274ee6]13SHARED_VERSION_INFO=${LIBAUBIO_LT_CUR}:${LIBAUBIO_LT_REV}:${LIBAUBIO_LT_AGE}
[9fc2c7e]14AC_SUBST(SHARED_VERSION_INFO)
15
[16109b3]16dnl Init automake
[96fb8ad]17AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
[16109b3]18
[e24b5f3]19dnl Enable silent rules, use with make V=0
[18738ad]20dnl AM_SILENT_RULES
[e24b5f3]21
[16109b3]22dnl Maintainer mode
[5215c01]23AM_MAINTAINER_MODE
[96fb8ad]24
[16109b3]25dnl Guess the host
26AC_CANONICAL_HOST
[96fb8ad]27
[ee0a1f3]28dnl Check for programs
29AC_PROG_CC
[00c522b]30AM_PROG_CC_C_O dnl compiling with per-target flag
[ee0a1f3]31if test "$ac_cv_prog_cc" = "no" ; then
32   AC_MSG_ERROR([*** No C compiler found !])
33fi
[ddfecbc]34AC_PROG_CXX
[ee0a1f3]35AC_PROG_INSTALL
36
[17db1cd]37AUBIO_CFLAGS=
38
[16109b3]39dnl Enable debugging (no)
[96fb8ad]40AC_ARG_ENABLE(debug,
[ec0d43c]41  AC_HELP_STRING([--enable-debug],[compile in debug mode [[default=no]]]),
[96fb8ad]42  with_debug="yes",
43  with_debug="no")
44if test "$with_debug" = "yes"
45then
46  AC_DEFINE(DEBUG,1,[Define to enable debug])
[098bd92]47  AUBIO_CFLAGS="$AUBIO_CFLAGS -g"
[96fb8ad]48fi
49
[16109b3]50dnl Enable full warnings (yes)
[f43867f]51AC_ARG_ENABLE(warnings,
[ec0d43c]52  AC_HELP_STRING([--enable-warnings],[compile with all gcc warnings [[default=yes]]]),
[96fb8ad]53  with_warnme="no",
54  with_warnme="yes")
55if test "$with_warnme" = "yes"
56then
[ee0a1f3]57  dnl Check for -Wextra support to allow compilation on gcc <= 3.4
58  AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra,
59  [old_CFLAGS="$CFLAGS"
60  CFLAGS="$CFLAGS -Wextra"
61  AC_COMPILE_IFELSE([void foo (void) {}],
62          ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
[17db1cd]63  CFLAGS="$old_CFLAGS"
[ee0a1f3]64  ])
65  if test "$ac_cv_cc_wextra" = "yes"
66  then
[17db1cd]67    AUBIO_CFLAGS="$AUBIO_CFLAGS -Wall -Wextra"
[ee0a1f3]68  else
[17db1cd]69    AUBIO_CFLAGS="$AUBIO_CFLAGS -Wall"
[ee0a1f3]70  fi
[96fb8ad]71fi
72
[ec0d43c]73dnl fail on compilation warnings
[f43867f]74AC_ARG_ENABLE(errorfail,
[ec0d43c]75  AC_HELP_STRING([--enable-errorfail],[fail on compilation warnings [[default=no]]]),
[f43867f]76  AUBIO_CFLAGS="$AUBIO_CFLAGS -Werror -Wmissing-prototypes -Wmissing-declarations -Wno-unused-parameter",
[ec0d43c]77  with_errorfail="no")
78
79dnl add gcov/lcov profiling and coverage flags
80AC_ARG_ENABLE(lcov,
81  AC_HELP_STRING([--enable-lcov],[compile with gcov/lcov profiling flags [[default=no]]]),
82  AUBIO_CFLAGS="$AUBIO_CFLAGS -fprofile-arcs -ftest-coverage",
83  with_lcov="no")
[96fb8ad]84
85dnl Check for libtool
86AC_LIBTOOL_DLOPEN
87dnl AC_DISABLE_STATIC
[fce58d9e]88dnl allow cross compiling
89AC_LIBTOOL_WIN32_DLL
[96fb8ad]90AC_PROG_LIBTOOL
91
92AC_CONFIG_HEADERS(src/config.h)
93AC_CONFIG_FILES(aubio.pc)
94
[be929a5]95AM_CONDITIONAL(MINGW, false)
96AM_CONDITIONAL(DARWIN, false)
[651cac8]97case "${host}" in
[cbea730]98*mingw* | *cygwin*)
[96fb8ad]99  mingw32_support="yes"
100  AC_CHECK_HEADER(windows.h)
[be929a5]101  AM_CONDITIONAL(MINGW, true)
[cbea730]102  LDFLAGS="$LDFLAGS -no-undefined"
[96fb8ad]103  ;;
[cbea730]104*darwin* | *rhapsody* | *macosx*)
[d17f63e]105  AC_ISC_POSIX
[be929a5]106  AM_CONDITIONAL(DARWIN, true)
[d17f63e]107  ;;
[96fb8ad]108*)
109  AC_ISC_POSIX
110  ;;
111esac
112
[3050cb8]113dnl Check for required libraries
[96fb8ad]114AC_CHECK_LIB(pthread, pthread_create)
115
116dnl Check for header files
[10a5413]117AC_CHECK_HEADERS([string.h stdlib.h stdio.h math.h limits.h errno.h stdarg.h unistd.h signal.h],,)
[cbea730]118AC_CHECK_HEADERS(fftw3.h,,AC_MSG_ERROR([Ouch! missing fftw3.h header]))
[237f632]119AC_ARG_ENABLE(complex,
120  AC_HELP_STRING([--enable-complex],[compile with complex.h [[default=auto]]]),
121  [with_complex=$enableval],
122  with_complex="yes")
123if test "$with_complex" = "yes"; then
124  AC_CHECK_HEADERS(complex.h,,AC_MSG_WARN([Ouch! missing complex.h header]))
125fi
[96fb8ad]126
[16109b3]127dnl Check for __VAR_ARGS__ support
[5215c01]128AC_CACHE_CHECK(for C99 __VA_ARGS__ macro,
129    ac_cv_varargs_macros,
130AC_TRY_COMPILE([
131  #include <stdio.h>
132  #define AUBIO_ERR(...)                       fprintf(stderr, __VA_ARGS__)
133],
134[
135  AUBIO_ERR("%s\n", "ERR");
136],
137        ac_cv_varargs_macros=yes,
138        ac_cv_varargs_macros=no)
139)
140if test "$ac_cv_varargs_macros" = "yes"; then
141    AC_DEFINE(HAVE_C99_VARARGS_MACROS, 1,
142            [Defined when c99 style varargs macros are supported])
143fi
144
[16109b3]145dnl Check for pkg-config
[96fb8ad]146AC_PATH_PROG(PKG_CONFIG,pkg-config,no)
147
[588ee77]148PKG_CHECK_MODULES(SNDFILE,     sndfile >= 1.0.4,       HAVE_SNDFILE=1)
149if test "${HAVE_SNDFILE}" = "1"; then
150  AC_DEFINE(HAVE_SNDFILE,1,[Define to enable libsndfile support])
151fi
[96fb8ad]152
[588ee77]153dnl Enable samplerate support (auto)
154AC_ARG_ENABLE(samplerate,
155  AC_HELP_STRING([--enable-samplerate],[compile with samplerate [[default=auto]]]),
156  [with_samplerate=$enableval],
157  with_samplerate="yes")
158if test "$with_samplerate" = "yes"; then
159  PKG_CHECK_MODULES(SAMPLERATE, samplerate  >= 0.0.15,  HAVE_SAMPLERATE=1)
160  if test "${HAVE_SAMPLERATE}" = "1"; then
161    AC_DEFINE(HAVE_SAMPLERATE,1,[Define to enable libsamplerate support])
162  fi
[96fb8ad]163fi
164
[16109b3]165dnl Check for fftw3 (required)
[96fb8ad]166AC_ARG_ENABLE(fftw3f,
[dc27a81]167  AC_HELP_STRING([--enable-fftw3f],[compile with fftw3f [[default=auto]]]),
168  [with_fftw3f=$enableval],
169  with_fftw3f="yes")
[96fb8ad]170if test "$with_fftw3f" = "yes"; then
[b511fa9]171  PKG_CHECK_MODULES(FFTWLIB,    fftw3f >= 3.0.0,     HAVE_FFTW3F=1, HAVE_FFTW3F=0)
[e50b695]172else
[b511fa9]173  PKG_CHECK_MODULES(FFTWLIB,    fftw3  >= 3.0.0,     HAVE_FFTW3=1)
[dc27a81]174fi
[b511fa9]175if test "${HAVE_FFTW3F}" = "0"; then
176  PKG_CHECK_MODULES(FFTWLIB,    fftw3  >= 3.0.0,     HAVE_FFTW3=1)
[e50b695]177fi
[b511fa9]178if test "${HAVE_FFTW3}" = "1"; then
179  AC_DEFINE(HAVE_FFTW3,1,[Define to enable fftw3 support])
[96fb8ad]180fi
[b511fa9]181if test "${HAVE_FFTW3F}" = "1"; then
182  AC_DEFINE(HAVE_FFTW3F,1,[Define to enable fftw3f support])
[96fb8ad]183fi
184
[16109b3]185dnl Enable jack support (auto)
[96fb8ad]186AC_ARG_ENABLE(jack,
[dc27a81]187  AC_HELP_STRING([--enable-jack],[compile with jack [[default=auto]]]),
188  [with_jack=$enableval],
189  with_jack="yes")
[96fb8ad]190if test "$with_jack" = "yes"
191then
[b511fa9]192  PKG_CHECK_MODULES(JACK,       jack  >= 0.15.0,     HAVE_JACK=1, HAVE_JACK=0)
193  if test "${HAVE_JACK}" = "1"; then
194    AC_DEFINE(HAVE_JACK,1,[Define to enable jack support])
[16109b3]195  fi
[96fb8ad]196fi
197
[a814968]198dnl Enable lash support
199AC_ARG_ENABLE(lash,
200  AC_HELP_STRING([--enable-lash],[compile with lash [[default=auto]]]),
201  [with_lash=$enableval],
202  with_lash="yes")
203if test "$with_lash" = "yes"
[96fb8ad]204then
[b511fa9]205  PKG_CHECK_MODULES(LASH,   lash-1.0 >= 0.5.0,   HAVE_LASH=1, HAVE_LASH=0)
206  if test "${HAVE_LASH}" = "1"; then
207    LASH_CFLAGS+="-DHAVE_LASH"
[16109b3]208  fi
[96fb8ad]209fi
210 
[16109b3]211dnl Enable unit tests
[5215c01]212AC_ARG_ENABLE(testprogs,
213  AC_HELP_STRING([--enable-testprogs],[compile test programs [[default=no]]]),
214  [with_testprogs=$enableval],
215  with_testprogs="no")
216AM_CONDITIONAL(COMPILE_TESTS,test "${with_testprogs}" != "no")
217
[5a405dd]218AC_SUBST(AUBIO_CFLAGS)
219
[16109b3]220dnl Check for swig and python
[3050cb8]221dnl should check for swig version and python headers
222AC_PATH_PROG(SWIG,swig,no)
223AM_CONDITIONAL(SWIGFOUND, test "${SWIG}" != "no")
224AM_PATH_PYTHON
225AM_CONDITIONAL(PYTHONFOUND, test "${PYTHON}" != "no")
[d09cad2]226
[16109b3]227dnl Check for docbook-to-man
[3050cb8]228AC_PATH_PROG(DOCBOOK_TO_MAN,docbook-to-man,no)
229AM_CONDITIONAL(DOCBOOKFOUND, test "${DOCBOOK_TO_MAN}" != "no")
230
[16109b3]231dnl Check for Puredata
[5215c01]232AC_CHECK_HEADER(m_pd.h,PUREDATA=y,AC_MSG_WARN([Puredata header not found.]))
[3050cb8]233AM_CONDITIONAL(PUREDATAFOUND, test "${PUREDATA}" = "y")
[96fb8ad]234
[fcc3fd2]235dnl Check for Java
236AC_CHECK_HEADER(jni.h,JAVAHEADERS=y,AC_MSG_WARN([Java header jni.h not found.]))
237AM_CONDITIONAL(JAVAFOUND, test "${JAVAHEADERS}" = "y")
238
[16109b3]239dnl Create Makefiles
[96fb8ad]240AC_OUTPUT([
[16109b3]241    Makefile
242    src/Makefile
243    ext/Makefile
244    examples/Makefile
[de2a8af]245    tests/Makefile
246    tests/src/Makefile
[445e0dca]247    tests/cpp/Makefile
[16109b3]248    sounds/Makefile
249    swig/Makefile
250    python/Makefile
251    python/aubio/Makefile
[1094f52]252    interfaces/java/Makefile
253    interfaces/java/aubio/Makefile
[7de4de0]254    interfaces/cpp/Makefile
[16109b3]255    plugins/Makefile
256    plugins/audacity/Makefile
257    plugins/audacity/plug-ins/Makefile
258    plugins/wavesurfer/Makefile
259    plugins/puredata/Makefile
260    doc/Makefile
261  ])
262
263dnl Print summary
[96fb8ad]264echo
265echo "**************************************************************"
266echo "Summary:"
[b511fa9]267if test "${HAVE_FFTW3F}" = "1"; then
[dc27a81]268  echo "Fftw3:                   yes (using fftw3f)"
[96fb8ad]269else
[b511fa9]270if test "${HAVE_FFTW3}" = "1"; then
[dc27a81]271  echo "Fftw3:                   yes (not using fftw3f)"
[96fb8ad]272else
[dc27a81]273  echo "Fftw3:                   no (that should not happen)"
[96fb8ad]274fi
275fi
[588ee77]276if test "${HAVE_SNDFILE}" = "1"; then
[96fb8ad]277  echo "Libsndfile:              yes"
278else
279  echo "Libsndfile:              no"
280fi
[b511fa9]281if test "${HAVE_SAMPLERATE}" = "1"; then
[96fb8ad]282  echo "Libsamplerate:           yes"
283else
284  echo "Libsamplerate:           no"
285fi
[b511fa9]286if test "${HAVE_JACK}" = "1"; then
[96fb8ad]287  echo "JACK:                    yes"
288else
289  echo "JACK:                    no"
290fi
[b511fa9]291if test "${HAVE_LASH}" = "1"; then
[a814968]292  echo "Lash:                    yes"
293else
294  echo "Lash:                    no"
295fi
296if test "${PUREDATA}" = "y"; then
297  echo "PureData:                yes"
298else
299  echo "PureData:                no"
[96fb8ad]300fi
301echo "**************************************************************"
302echo Configuration completed successfully. Type \'make\' to build ${PACKAGE}
Note: See TracBrowser for help on using the repository browser.