[96fb8ad] | 1 | dnl Process this file with autoconf to porduce a configure script |
---|
| 2 | |
---|
| 3 | AC_INIT(src/aubio.h) |
---|
| 4 | |
---|
| 5 | . $srcdir/VERSION |
---|
| 6 | AUBIO_VERSION=${AUBIO_MAJOR_VERSION}.${AUBIO_MINOR_VERSION}.${AUBIO_PATCH_VERSION}${AUBIO_VERSION_STATUS} |
---|
| 7 | VERSION=${AUBIO_VERSION} |
---|
| 8 | PACKAGE=aubio |
---|
| 9 | |
---|
| 10 | AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION}) |
---|
| 11 | |
---|
| 12 | AC_PREFIX_DEFAULT(/usr) |
---|
| 13 | |
---|
| 14 | dnl enable optimization |
---|
| 15 | CFLAGS="$CFLAGS -O2" |
---|
[d17f63e] | 16 | |
---|
[96fb8ad] | 17 | |
---|
| 18 | dnl Check for debug |
---|
| 19 | AC_ARG_ENABLE(debug, |
---|
| 20 | [ --enable-debug[[=value]] compile with debug [[default=no]]], |
---|
| 21 | with_debug="yes", |
---|
| 22 | with_debug="no") |
---|
| 23 | if test "$with_debug" = "yes" |
---|
| 24 | then |
---|
| 25 | AC_DEFINE(DEBUG,1,[Define to enable debug]) |
---|
| 26 | CFLAGS="$CFLAGS -g" |
---|
| 27 | fi |
---|
| 28 | |
---|
| 29 | dnl |
---|
| 30 | AC_ARG_ENABLE(warnme, |
---|
| 31 | [ --enable-warnme[[=value]] compile with all -W [[default=yes]]], |
---|
| 32 | with_warnme="no", |
---|
| 33 | with_warnme="yes") |
---|
| 34 | if test "$with_warnme" = "yes" |
---|
| 35 | then |
---|
| 36 | ALL_CWARNINGS="-Wall -Werror -Wmissing-prototypes -Wmissing-declarations -Wno-char-subscripts -Wno-unknown-pragmas" |
---|
| 37 | CFLAGS="$CFLAGS $ALL_CWARNINGS" |
---|
| 38 | fi |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | dnl Guess the host |
---|
| 42 | AC_CANONICAL_HOST |
---|
| 43 | |
---|
| 44 | dnl Check for programs |
---|
| 45 | AC_PROG_CC |
---|
| 46 | if test "$ac_cv_prog_cc" = "no" ; then |
---|
| 47 | AC_MSG_ERROR([*** No C compiler found !]) |
---|
| 48 | fi |
---|
| 49 | AC_PROG_INSTALL |
---|
| 50 | dnl AC_PROG_SWIG |
---|
| 51 | |
---|
| 52 | dnl Check for libtool |
---|
| 53 | AC_LIBTOOL_DLOPEN |
---|
| 54 | dnl AC_DISABLE_STATIC |
---|
| 55 | AC_PROG_LIBTOOL |
---|
| 56 | |
---|
| 57 | AC_CONFIG_HEADERS(src/config.h) |
---|
| 58 | AC_CONFIG_FILES(aubio.pc) |
---|
| 59 | |
---|
| 60 | case "${host_os}" in |
---|
| 61 | mingw*) |
---|
| 62 | mingw32_support="yes" |
---|
| 63 | AC_CHECK_HEADER(windows.h) |
---|
| 64 | ;; |
---|
[d17f63e] | 65 | darwin*) |
---|
| 66 | dnl on macosx, cosf went to -lmx |
---|
| 67 | LDFLAGS="$LDFLAGS -lmx" |
---|
| 68 | AC_ISC_POSIX |
---|
| 69 | ;; |
---|
[96fb8ad] | 70 | *) |
---|
| 71 | AC_ISC_POSIX |
---|
| 72 | ;; |
---|
| 73 | esac |
---|
| 74 | |
---|
| 75 | dnl Check for libraries |
---|
| 76 | AC_CHECK_LIB(pthread, pthread_create) |
---|
| 77 | |
---|
| 78 | dnl Check for header files |
---|
| 79 | AC_HEADER_STDC |
---|
| 80 | AC_CHECK_HEADERS([string.h stdlib.h stdio.h math.h errno.h stdarg.h unistd.h signal.h],,) |
---|
| 81 | AC_CHECK_HEADERS(complex.h,,AC_MSG_ERROR([Ouch! missing complex.h header])) |
---|
| 82 | AC_CHECK_HEADERS(fftw3.h ,,AC_MSG_ERROR([Ouch! missing fftw3.h headeri])) |
---|
| 83 | |
---|
| 84 | dnl check for pkg-config |
---|
| 85 | AC_PATH_PROG(PKG_CONFIG,pkg-config,no) |
---|
| 86 | |
---|
| 87 | dnl Check for required libraries |
---|
| 88 | PKG_CHECK_MODULES(FFTWLIB, fftw3 >= 3.0.0, FFTW3_SUPPORT=1) |
---|
| 89 | if test "${FFTW3_SUPPORT}" = "1"; then |
---|
| 90 | AC_DEFINE(FFTW3_SUPPORT,1,[Define to enable fftw3 support]) |
---|
| 91 | fi |
---|
| 92 | PKG_CHECK_MODULES(SNDLIB, sndfile >= 1.0.4, SNDLIB_SUPPORT=1) |
---|
| 93 | PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, SAMPLERATE_SUPPORT=1) |
---|
| 94 | |
---|
| 95 | if test "${SNDLIB_SUPPORT}" = "1"; then |
---|
| 96 | AC_DEFINE(SNDLIB_SUPPORT,1,[Define to enable libsndfile support]) |
---|
| 97 | fi |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | dnl Check for optional libraries |
---|
| 101 | AC_ARG_ENABLE(fftw3f, |
---|
| 102 | [ --enable-fftw3f[[=value]] compile with fftw3f [[default=no]]], |
---|
| 103 | with_fftw3f="yes", |
---|
| 104 | with_fftw3f="no") |
---|
| 105 | if test "$with_fftw3f" = "yes"; then |
---|
| 106 | PKG_CHECK_MODULES(FFTWLIB, fftw3f >= 3.0.0, FFTW3F_SUPPORT=1) |
---|
| 107 | fi |
---|
| 108 | if test "${FFTW3F_SUPPORT}" = "1"; then |
---|
| 109 | AC_DEFINE(FFTW3F_SUPPORT,1,[Define to enable fftw3f support]) |
---|
| 110 | fi |
---|
| 111 | |
---|
| 112 | AC_ARG_ENABLE(jack, |
---|
| 113 | [ --enable-jack[[=value]] compile with jack [[default=no]]], |
---|
| 114 | with_jack="yes", |
---|
| 115 | with_jack="no") |
---|
| 116 | if test "$with_jack" = "yes" |
---|
| 117 | then |
---|
| 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 |
---|
| 122 | fi |
---|
| 123 | |
---|
| 124 | AC_ARG_ENABLE(alsa, |
---|
| 125 | [ --enable-alsa[[=value]] compile with alsa [[default=no]]], |
---|
| 126 | with_alsa="yes", |
---|
| 127 | with_alsa="no") |
---|
| 128 | if test "$with_alsa" = "yes" |
---|
| 129 | then |
---|
| 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 |
---|
| 134 | fi |
---|
| 135 | |
---|
| 136 | AC_ARG_ENABLE(ladcca, |
---|
| 137 | [ --enable-ladcca[[=value]] compile with ladcca [[default=no]]], |
---|
| 138 | with_ladcca="yes", |
---|
| 139 | with_ladcca="no") |
---|
| 140 | if test "$with_ladcca" = "yes" |
---|
| 141 | then |
---|
| 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 |
---|
| 146 | fi |
---|
| 147 | |
---|
| 148 | AM_PATH_PYTHON(,,) |
---|
| 149 | |
---|
| 150 | AC_OUTPUT([ |
---|
| 151 | Makefile |
---|
| 152 | src/Makefile |
---|
[b60dd4ae] | 153 | ext/Makefile |
---|
[96fb8ad] | 154 | examples/Makefile |
---|
| 155 | sounds/Makefile |
---|
| 156 | doc/Makefile |
---|
| 157 | python/Makefile |
---|
| 158 | python/aubio/Makefile |
---|
| 159 | plugins/Makefile |
---|
| 160 | plugins/audacity/Makefile |
---|
| 161 | plugins/audacity/plug-ins/Makefile |
---|
| 162 | plugins/wavesurfer/Makefile |
---|
[30cbd419] | 163 | plugins/puredata/Makefile |
---|
[96fb8ad] | 164 | swig/Makefile |
---|
| 165 | ]) |
---|
| 166 | |
---|
| 167 | echo |
---|
| 168 | echo "**************************************************************" |
---|
| 169 | echo "Summary:" |
---|
| 170 | if test "${FFTW3F_SUPPORT}" = "1"; then |
---|
| 171 | echo "Fftw3: yes (fftw3f)" |
---|
| 172 | else |
---|
| 173 | if test "${FFTW3_SUPPORT}" = "1"; then |
---|
| 174 | echo "Fftw3: yes" |
---|
| 175 | else |
---|
| 176 | echo "Fftw3f: no" |
---|
| 177 | fi |
---|
| 178 | fi |
---|
| 179 | if test "${SNDLIB_SUPPORT}" = "1"; then |
---|
| 180 | echo "Libsndfile: yes" |
---|
| 181 | else |
---|
| 182 | echo "Libsndfile: no" |
---|
| 183 | fi |
---|
| 184 | if test "${SAMPLERATE_SUPPORT}" = "1"; then |
---|
| 185 | echo "Libsamplerate: yes" |
---|
| 186 | else |
---|
| 187 | echo "Libsamplerate: no" |
---|
| 188 | fi |
---|
| 189 | if test "${JACK_SUPPORT}" = "1"; then |
---|
| 190 | echo "JACK: yes" |
---|
| 191 | else |
---|
| 192 | echo "JACK: no" |
---|
| 193 | fi |
---|
| 194 | if test "${ALSA_SUPPORT}" = "1"; then |
---|
| 195 | echo "ALSA midi: yes" |
---|
| 196 | else |
---|
| 197 | echo "ALSA midi: no" |
---|
| 198 | fi |
---|
| 199 | if test "${LADCCA_SUPPORT}" = "1"; then |
---|
| 200 | echo "Ladcca: yes" |
---|
| 201 | else |
---|
| 202 | echo "Ladcca: no" |
---|
| 203 | fi |
---|
| 204 | echo "**************************************************************" |
---|
| 205 | echo Configuration completed successfully. Type \'make\' to build ${PACKAGE} |
---|