1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
|
AC_INIT([ambix],[0.1.2],[https://git.iem.at/ambisonics/libambix],
[libambix],[http://ambisonics.iem.at/xchange/format])
AM_INIT_AUTOMAKE([foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([libambix/Makefile libambix/src/Makefile libambix/tests/Makefile libambix/tests/data/Makefile])
AC_CONFIG_FILES([libambix/libambix.pc])
AC_CONFIG_FILES([utils/Makefile utils/jcommon/Makefile])
AC_CONFIG_FILES([doc/Makefile])
AC_CONFIG_FILES([replacement/Makefile])
AC_CONFIG_FILES([samples/Makefile])
AC_CONFIG_FILES([samples/pd/Makefile samples/pd/ambix-meta.pd])
AC_CONFIG_FILES([build/Makefile build/w32-vs2008/Makefile])
IEM_OPERATING_SYSTEM
AC_PROG_INSTALL
AC_LANG_C
AC_PROG_CC
AC_PROG_MAKE_SET
AM_PROG_CC_C_O
m4_ifdef([AC_PROG_OBJC], [AC_PROG_OBJC])
#------------------------------------------------------------------------------------
# Rules for library version information:
#
# 1. Start with version information of `0:0:0' for each libtool library.
# 2. Update the version information only immediately before a public release of
# your software. More frequent updates are unnecessary, and only guarantee
# that the current interface number gets larger faster.
# 3. If the library source code has changed at all since the last update, then
# increment revision (`c:r:a' becomes `c:r+1:a').
# 4. If any interfaces have been added, removed, or changed since the last update,
# increment current, and set revision to 0.
# 5. If any interfaces have been added since the last public release, then increment
# age.
# 6. If any interfaces have been removed since the last public release, then set age
# to 0.
CLEAN_VERSION=`echo $PACKAGE_VERSION | $SED "s/p.*//"`
VERSION_MINOR=`echo $CLEAN_VERSION | $SED "s/.*\.//"`
SHARED_VERSION_INFO="0:$VERSION_MINOR:0"
AC_SUBST(SHARED_VERSION_INFO)
have_pd="no"
IEM_CHECK_RTE
AM_CONDITIONAL(HAVE_PUREDATA, [test "x$have_pd" = "xyes"])
AC_HEADER_STDC
AM_CONDITIONAL(DISABLED, [test "xno" = "xyes"])
AM_CONDITIONAL(ENABLED, [test "xyes" = "xyes"])
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[enable debugging build, default: no]),
AS_CASE(["$enableval"],
yes, debug=true,
no, debug=false,
AC_MSG_ERROR([bad value ${enableval} for --enable-debug])),
[debug=false])
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
## check for math
AC_CHECK_LIB([m],[sqrt])
## checks for libsndfile
AC_ARG_WITH([sndfile],
[AS_HELP_STRING([--with-sndfile],
[use libsndfile as backend for reading ambix-files])],
[],
[with_sndfile=yes])
have_sndfile="no"
AS_IF([test "x$with_sndfile" != xno], [
tmp_sndfile_CFLAGS="$CFLAGS"
tmp_sndfile_LIBS="$LIBS"
PKG_CHECK_MODULES([SNDFILE], [sndfile], [have_sndfile="yes"], [have_sndfile="no"])
if test "x$have_sndfile" = "xyes"; then
CFLAGS="$CFLAGS $SNDFILE_CFLAGS"
LIBS="$LIBS $SNDFILE_LIBS"
AC_CHECK_HEADERS(sndfile.h)
AC_SEARCH_LIBS([sf_set_chunk], [sndfile], [AC_DEFINE([HAVE_SF_SET_CHUNK], [1], [Define to 1 if libsndfile can set custom chunks using sf_set_chunk()])])
AC_SEARCH_LIBS([sf_get_chunk_iterator], [sndfile], [AC_DEFINE([HAVE_SF_GET_CHUNK_ITERATOR], [1], [Define to 1 if libsndfile can get custom chunks via an iterator])])
AC_CHECK_TYPES([SF_CHUNK_INFO], [], [], [[#include <sndfile.h>]])
dnl a custom version of libsndfile used sf_command to write UUID-chunks
AC_CHECK_TYPES([SF_UUID_INFO], [], [], [[#include <sndfile.h>]])
fi
CFLAGS="$tmp_sndfile_CFLAGS"
LIBS="$tmp_sndfile_LIBS"
])
AM_CONDITIONAL(HAVE_SNDFILE, [test "x$have_sndfile" = "xyes"])
## checks for CoreAudio frameworks
AC_ARG_WITH([CoreAudio],
[AS_HELP_STRING([--with-CoreAudio],
[use CoreAudio as backend for reading ambix-files])],
[],
[with_CoreAudio=check])
have_audiotoolbox="no"
AS_IF([test "x$with_CoreAudio" != xno],
[
IEM_CHECK_FRAMEWORK([Foundation],
IEM_CHECK_FRAMEWORK([AudioToolbox],
[have_audiotoolbox="yes"])
)
]
)
AM_CONDITIONAL([HAVE_FRAMEWORK_AUDIOTOOLBOX], [test "x$have_audiotoolbox" = "xyes"])
## checks for jack
AC_ARG_WITH([jack],
[AS_HELP_STRING([--with-jack],
[use JACK for playback/recording of live sound])],
[],
[with_jack=yes])
have_jack="no"
AS_IF([test "x$with_jack" != xno], [
tmp_jack_CFLAGS="$CFLAGS"
tmp_jack_LIBS="$LIBS"
PKG_CHECK_MODULES([JACK], [jack], [have_jack="yes"], [have_jack="no"])
CFLAGS="$tmp_jack_CFLAGS"
LIBS="$tmp_jack_LIBS"
])
AM_CONDITIONAL(HAVE_JACK, [test "x$have_jack" = "xyes"])
## checks for samplerate
AC_ARG_WITH([samplerate],
[AS_HELP_STRING([--with-samplerate],
[use libsamplerate for samplerate-conversion])],
[],
[with_samplerate=yes])
have_samplerate="no"
AS_IF([test "x$with_samplerate" != xno], [
tmp_samplerate_CFLAGS="$CFLAGS"
tmp_samplerate_LIBS="$LIBS"
PKG_CHECK_MODULES([SAMPLERATE], [samplerate], [have_samplerate="yes"], [have_samplerate="no"])
CFLAGS="$tmp_samplerate_CFLAGS"
LIBS="$tmp_samplerate_LIBS"
])
AM_CONDITIONAL(HAVE_SAMPLERATE, [test "x$have_samplerate" = "xyes"])
AC_CHECK_PROGS([DOXYGEN], [doxygen], [true])
AM_CONDITIONAL(HAVE_DOXYGEN, [test "x${DOXYGEN}" != "xtrue"])
AC_SUBST(DOXYGEN)
AC_CHECK_FUNCS([strndup])
AX_PTHREAD
# run unitttests in valgrind
AC_SUBST(VALGRIND_CHECK_RULES)
m4_ifdef([AX_VALGRIND_CHECK], [AX_VALGRIND_CHECK])
AC_OUTPUT
|