2021-01-24 12:22:23 +00:00
|
|
|
dnl Copyright (C) 1999-2021 Erik de Castro Lopo <erikd@mega-nerd.com>.
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl Require autoconf version >= 2.69
|
|
|
|
AC_PREREQ([2.69])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2021-01-24 12:22:23 +00:00
|
|
|
AC_INIT([libsndfile],[1.0.31],[sndfile@mega-nerd.com],
|
2020-10-05 07:11:47 +00:00
|
|
|
[libsndfile],[http://libsndfile.github.io/libsndfile/])
|
2007-10-15 10:09:49 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
dnl Check whether we want to set defaults for CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS
|
|
|
|
AC_MSG_CHECKING([whether configure should try to set CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS])
|
|
|
|
AS_IF([test "x${CFLAGS+set}" = "xset" || test "x${CXXFLAGS+set}" = "xset" || test "x${CPPFLAGS+set}" = "xset" || test "x${LDFLAGS+set}" = "xset"], [
|
|
|
|
enable_flags_setting=no
|
|
|
|
: ${CFLAGS=""}
|
|
|
|
: ${CXXFLAGS=""}
|
|
|
|
], [
|
|
|
|
enable_flags_setting=yes
|
|
|
|
dnl Set to empty flags so AC_PROG_CC and
|
|
|
|
dnl AC_PROG_CXX do not add -g -O2
|
|
|
|
CFLAGS=""
|
|
|
|
CXXFLAGS=""
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT([${enable_flags_setting}])
|
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl Put config stuff in 'build-aux'.
|
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
2007-10-15 10:09:49 +00:00
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_CONFIG_SRCDIR([src/sndfile.c])
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_CANONICAL_HOST
|
2004-11-15 22:29:27 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2009-09-22 07:43:06 +00:00
|
|
|
AC_CONFIG_HEADERS([src/config.h])
|
2008-04-16 23:37:22 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AM_INIT_AUTOMAKE([1.14 foreign dist-bzip2 no-dist-gzip serial-tests subdir-objects])
|
|
|
|
AM_SILENT_RULES([yes])
|
2006-04-18 09:43:20 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
|
|
|
|
AC_PROG_CC
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_PROG_CC_C99
|
2017-09-03 08:33:06 +00:00
|
|
|
|
|
|
|
AS_IF([test "x$ac_cv_prog_cc_c99" = "xno"], [
|
|
|
|
AC_MSG_ERROR([libsndfile requires a C99 capable compiler!])
|
|
|
|
])
|
|
|
|
|
2013-07-13 07:04:45 +00:00
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
2011-03-22 06:47:01 +00:00
|
|
|
AC_PROG_CXX
|
2013-11-01 04:58:40 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_LANG([C])
|
|
|
|
AX_COMPILER_VENDOR
|
|
|
|
AX_COMPILER_VERSION
|
|
|
|
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AX_COMPILER_VENDOR
|
|
|
|
AX_COMPILER_VERSION
|
|
|
|
AC_LANG_POP([C++])
|
2013-11-01 04:58:40 +00:00
|
|
|
|
2011-03-22 06:47:01 +00:00
|
|
|
AC_PROG_SED
|
2017-09-03 08:33:06 +00:00
|
|
|
AM_PROG_AR
|
2011-03-22 06:47:01 +00:00
|
|
|
|
2017-04-26 07:20:44 +00:00
|
|
|
LT_INIT([win32-dll])
|
2011-03-22 06:47:01 +00:00
|
|
|
LT_PROG_RC
|
|
|
|
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
|
2017-06-05 21:08:43 +00:00
|
|
|
AM_PATH_PYTHON
|
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_CHECK_PROG([HAVE_AUTOGEN], [autogen], [yes], [no])
|
|
|
|
AC_CHECK_PROG([HAVE_WINE], [wine], [yes], [no])
|
|
|
|
AC_CHECK_PROG([HAVE_XCODE_SELECT], [xcode-select], [yes], [no])
|
|
|
|
|
|
|
|
dnl ------------------------------------------------------------------------------------
|
|
|
|
dnl Rules for library version information:
|
|
|
|
dnl
|
|
|
|
dnl 1. Start with version information of `0:0:0' for each libtool library.
|
|
|
|
dnl 2. Update the version information only immediately before a public release of
|
|
|
|
dnl your software. More frequent updates are unnecessary, and only guarantee
|
|
|
|
dnl that the current interface number gets larger faster.
|
|
|
|
dnl 3. If the library source code has changed at all since the last update, then
|
|
|
|
dnl increment revision (`c:r:a' becomes `c:r+1:a').
|
|
|
|
dnl 4. If any interfaces have been added, removed, or changed since the last update,
|
|
|
|
dnl increment current, and set revision to 0.
|
|
|
|
dnl 5. If any interfaces have been added since the last public release, then increment
|
|
|
|
dnl age.
|
|
|
|
dnl 6. If any interfaces have been removed since the last public release, then set age
|
|
|
|
dnl to 0.
|
2021-01-24 12:22:23 +00:00
|
|
|
SHARED_VERSION_INFO="1:31:0"
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ------------------------------------------------------------------------------------
|
2004-05-14 13:52:30 +00:00
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_HEADER_STDC
|
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_CHECK_HEADERS([endian.h])
|
|
|
|
AC_CHECK_HEADERS([byteswap.h])
|
|
|
|
AC_CHECK_HEADERS([locale.h])
|
|
|
|
AC_CHECK_HEADERS([sys/time.h])
|
2020-12-07 06:32:15 +00:00
|
|
|
AC_CHECK_HEADERS([immintrin.h])
|
2006-01-05 10:31:29 +00:00
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_HEADER_SYS_WAIT
|
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_CHECK_DECLS([S_IRGRP])
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$ac_cv_have_decl_S_IRGRP" = "xyes"], [
|
|
|
|
AC_DEFINE_UNQUOTED([HAVE_DECL_S_IRGRP], [1], [Set to 1 if S_IRGRP is defined.])
|
|
|
|
], [
|
|
|
|
AC_DEFINE_UNQUOTED([HAVE_DECL_S_IRGRP], [0], [Set to 0 if S_IRGRP is not defined.])
|
|
|
|
])
|
2004-03-15 09:21:04 +00:00
|
|
|
|
2008-03-30 12:28:25 +00:00
|
|
|
AM_CONDITIONAL([LINUX_MINGW_CROSS_TEST],
|
2017-09-03 08:33:06 +00:00
|
|
|
[test "x${build_os}:${host_os}:${HAVE_WINE}" = "xlinux-gnu:mingw32msvc:yes"])
|
2008-03-30 12:28:25 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Couple of initializations here. Fill in real values later.
|
2007-05-14 09:55:24 +00:00
|
|
|
|
|
|
|
SHLIB_VERSION_ARG=""
|
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Finished checking, handle options.
|
2007-05-14 09:55:24 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(experimental,
|
2017-01-27 22:51:18 +00:00
|
|
|
AS_HELP_STRING([--enable-experimental], [enable experimental code]))
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$enable_experimental" = "xyes"], [
|
|
|
|
EXPERIMENTAL_CODE=1
|
|
|
|
], [
|
|
|
|
EXPERIMENTAL_CODE=0
|
|
|
|
])
|
|
|
|
AC_DEFINE_UNQUOTED([ENABLE_EXPERIMENTAL_CODE], [${EXPERIMENTAL_CODE}], [Set to 1 to enable experimental code.])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_ARG_ENABLE([werror],
|
|
|
|
[AS_HELP_STRING([--enable-werror], [enable -Werror in all Makefiles])])
|
2004-02-25 09:01:53 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_ARG_ENABLE([stack-smash-protection],
|
|
|
|
[AS_HELP_STRING([--enable-stack-smash-protection], [Enable GNU GCC stack smash protection])])
|
2013-06-22 09:32:18 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_ARG_ENABLE([cpu-clip],
|
|
|
|
[AS_HELP_STRING([--disable-cpu-clip], [disable tricky cpu specific clipper])])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_ARG_ENABLE([bow-docs],
|
|
|
|
[AS_HELP_STRING([--enable-bow-docs], [enable black-on-white html docs])])
|
2004-04-25 13:33:04 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_ARG_ENABLE([sqlite],
|
|
|
|
[AS_HELP_STRING([--disable-sqlite], [disable use of sqlite])])
|
2005-06-20 07:01:43 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_ARG_ENABLE([alsa],
|
|
|
|
[AS_HELP_STRING([--disable-alsa], [disable ALSA support (default=autodetect)])], [], [enable_alsa=auto])
|
2005-10-07 13:27:53 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_ARG_ENABLE([external-libs],
|
|
|
|
[AS_HELP_STRING([--disable-external-libs], [disable use of FLAC, Ogg and Vorbis [[default=no]]])])
|
2008-05-21 09:18:52 +00:00
|
|
|
|
2008-10-18 10:36:15 +00:00
|
|
|
AC_ARG_ENABLE(octave,
|
2018-01-05 15:04:07 +00:00
|
|
|
[AS_HELP_STRING([--enable-octave], [enable building of GNU Octave module])])
|
2008-10-18 10:36:15 +00:00
|
|
|
|
2017-01-27 22:51:19 +00:00
|
|
|
AC_ARG_ENABLE([full-suite],
|
2017-09-03 08:33:06 +00:00
|
|
|
[AS_HELP_STRING([--disable-full-suite], [disable building and installing programs, documentation, only build library [[default=no]]])])
|
2017-01-27 22:51:19 +00:00
|
|
|
AM_CONDITIONAL([FULL_SUITE], [test "x$enable_full_suite" != "xno"])
|
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_ARG_ENABLE([test-coverage],
|
|
|
|
[AS_HELP_STRING([--enable-test-coverage], [enable test coverage])])
|
|
|
|
AM_CONDITIONAL([ENABLE_TEST_COVERAGE], [test "x$enable_test_coverage" = "xyes"])
|
|
|
|
|
2019-07-27 19:44:18 +00:00
|
|
|
AC_ARG_ENABLE([ossfuzzers],
|
|
|
|
[AS_HELP_STRING([--enable-ossfuzzers],
|
|
|
|
[Whether to generate the fuzzers for OSS-Fuzz])],
|
|
|
|
[have_ossfuzzers=yes], [have_ossfuzzers=no])
|
|
|
|
AM_CONDITIONAL([USE_OSSFUZZERS], [test "x$have_ossfuzzers" = "xyes"])
|
|
|
|
|
|
|
|
AC_SUBST([LIB_FUZZING_ENGINE])
|
|
|
|
AM_CONDITIONAL([USE_OSSFUZZ_FLAG], [test "x$LIB_FUZZING_ENGINE" = "x-fsanitize=fuzzer"])
|
|
|
|
AM_CONDITIONAL([USE_OSSFUZZ_STATIC], [test -f "$LIB_FUZZING_ENGINE"])
|
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Check types and their sizes.
|
|
|
|
|
|
|
|
AC_CHECK_SIZEOF([wchar_t], [4])
|
|
|
|
AC_CHECK_SIZEOF([short], [2])
|
|
|
|
AC_CHECK_SIZEOF([int], [4])
|
|
|
|
AC_CHECK_SIZEOF([long], [4])
|
|
|
|
AC_CHECK_SIZEOF([float], [4])
|
|
|
|
AC_CHECK_SIZEOF([double], [4])
|
|
|
|
AC_CHECK_SIZEOF([void*], [8])
|
|
|
|
AC_CHECK_SIZEOF([size_t], [4])
|
|
|
|
AC_CHECK_SIZEOF([int64_t], [8])
|
|
|
|
AC_CHECK_SIZEOF([long long], [8])
|
|
|
|
|
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Find an appropriate type for sf_count_t.
|
|
|
|
dnl On systems supporting files larger than 2 Gig, sf_count_t must be a 64 bit value.
|
|
|
|
dnl Unfortunately there is more than one way of ensuring this so need to do some
|
|
|
|
dnl pretty rigourous testing here.
|
|
|
|
|
|
|
|
dnl Check for common 64 bit file offset types.
|
|
|
|
AC_CHECK_SIZEOF([off_t], [1])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$enable_largefile:$ac_cv_sizeof_off_t" = "xno:8"], [
|
|
|
|
AC_MSG_ERROR(["Error : Cannot disable large file support because sizeof (off_t) == 8."])
|
|
|
|
])
|
2013-04-29 23:38:58 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_CASE([$host_os],
|
|
|
|
[mingw32*], [
|
2009-05-25 08:05:45 +00:00
|
|
|
TYPEOF_SF_COUNT_T="__int64"
|
2004-03-04 22:02:43 +00:00
|
|
|
SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
|
|
|
|
SIZEOF_SF_COUNT_T=8
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_DEFINE([__USE_MINGW_ANSI_STDIO], [1], [Set to 1 to use C99 printf/snprintf in MinGW.])
|
2017-07-02 02:33:42 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
[linux-android*], [
|
|
|
|
TYPEOF_SF_COUNT_T="int64_t"
|
|
|
|
SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
|
|
|
|
SIZEOF_SF_COUNT_T=8
|
|
|
|
],
|
|
|
|
|
|
|
|
[
|
2013-07-31 08:10:59 +00:00
|
|
|
SIZEOF_SF_COUNT_T=0
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$ac_cv_sizeof_off_t" = "x8"], [
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl If sizeof (off_t) is 8, no further checking is needed.
|
2011-05-17 20:33:28 +00:00
|
|
|
TYPEOF_SF_COUNT_T="int64_t"
|
2004-04-20 12:17:38 +00:00
|
|
|
SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
|
2016-11-14 07:14:41 +00:00
|
|
|
SIZEOF_SF_COUNT_T=8
|
2017-06-05 12:30:16 +00:00
|
|
|
], [
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl Save the old sizeof (off_t) value and then unset it to see if it
|
|
|
|
dnl changes when Large File Support is enabled.
|
2017-06-05 12:30:16 +00:00
|
|
|
pre_largefile_sizeof_off_t=$ac_cv_sizeof_off_t
|
|
|
|
unset ac_cv_sizeof_off_t
|
|
|
|
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
AS_IF([test "x$ac_cv_sys_largefile_CFLAGS" = "xno"], [
|
|
|
|
ac_cv_sys_largefile_CFLAGS=""
|
|
|
|
])
|
|
|
|
AS_IF([test "x$ac_cv_sys_largefile_LDFLAGS" = "xno"], [
|
|
|
|
ac_cv_sys_largefile_LDFLAGS=""
|
|
|
|
])
|
|
|
|
AS_IF([test "x$ac_cv_sys_largefile_LIBS" = "xno"], [
|
|
|
|
ac_cv_sys_largefile_LIBS=""
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_CHECK_SIZEOF(off_t,1)
|
|
|
|
|
|
|
|
AS_IF([test "x$ac_cv_sizeof_off_t" = "x8"], [
|
|
|
|
TYPEOF_SF_COUNT_T="int64_t"
|
|
|
|
SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
|
|
|
|
SIZEOF_SF_COUNT_T=8
|
|
|
|
], [test "x$TYPEOF_SF_COUNT_T" = "xunknown"], [
|
|
|
|
AS_ECHO([""])
|
|
|
|
AS_ECHO(["*** The configure process has determined that this system is capable"])
|
|
|
|
AS_ECHO(["*** of Large File Support but has not been able to find a type which"])
|
|
|
|
AS_ECHO(["*** is an unambiguous 64 bit file offset."])
|
|
|
|
AS_ECHO(["*** Please contact the author to help resolve this problem."])
|
|
|
|
AS_ECHO([""])
|
|
|
|
AC_MSG_ERROR([[Bad file offset type.]])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
2017-08-29 00:40:42 +00:00
|
|
|
AS_CASE([$host_vendor],
|
|
|
|
[vita], [
|
|
|
|
TYPEOF_SF_COUNT_T="int64_t"
|
|
|
|
SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
|
|
|
|
SIZEOF_SF_COUNT_T=8
|
|
|
|
])
|
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$SIZEOF_SF_COUNT_T" = "x4"], [
|
|
|
|
SF_COUNT_MAX="0x7FFFFFFF"
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED([TYPEOF_SF_COUNT_T], [${TYPEOF_SF_COUNT_T}], [Set to long if unknown.])
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_SUBST(TYPEOF_SF_COUNT_T)
|
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_DEFINE_UNQUOTED([SIZEOF_SF_COUNT_T], [${SIZEOF_SF_COUNT_T}], [Set to sizeof (long) if unknown.])
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_SUBST(SIZEOF_SF_COUNT_T)
|
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_DEFINE_UNQUOTED([SF_COUNT_MAX], [${SF_COUNT_MAX}], [Set to maximum allowed value of sf_count_t type.])
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_SUBST(SF_COUNT_MAX)
|
|
|
|
|
2016-09-03 09:57:24 +00:00
|
|
|
AC_TYPE_SSIZE_T
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Determine endian-ness of host processor.
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_C_BIGENDIAN([
|
|
|
|
dnl big-endian
|
|
|
|
ac_cv_c_big_endian=1
|
|
|
|
ac_cv_c_little_endian=0
|
|
|
|
], [
|
|
|
|
dnl little-endian
|
|
|
|
ac_cv_c_big_endian=0
|
|
|
|
ac_cv_c_little_endian=1
|
|
|
|
])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_DEFINE_UNQUOTED([CPU_IS_BIG_ENDIAN], [${ac_cv_c_big_endian}], [Host processor is big endian.])
|
|
|
|
AC_DEFINE_UNQUOTED([CPU_IS_LITTLE_ENDIAN], [${ac_cv_c_little_endian}], [Host processor is little endian.])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Check for functions.
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_CHECK_FUNCS([malloc calloc realloc free])
|
|
|
|
AC_CHECK_FUNCS([open read write lseek lseek64])
|
|
|
|
AC_CHECK_FUNCS([fstat fstat64 ftruncate fsync])
|
|
|
|
AC_CHECK_FUNCS([snprintf vsnprintf])
|
|
|
|
AC_CHECK_FUNCS([gmtime gmtime_r localtime localtime_r gettimeofday])
|
|
|
|
AC_CHECK_FUNCS([mmap getpagesize])
|
|
|
|
AC_CHECK_FUNCS([setlocale])
|
|
|
|
AC_CHECK_FUNCS([pipe waitpid])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_SEARCH_LIBS([floor], [m], [], [
|
|
|
|
AC_MSG_ERROR([unable to find the floor() function!])
|
|
|
|
])
|
|
|
|
AC_CHECK_FUNCS([floor ceil fmod lrint lrintf])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Check for requirements for building plugins for other languages/enviroments.
|
2007-08-23 11:16:57 +00:00
|
|
|
|
2008-04-01 10:28:59 +00:00
|
|
|
dnl Octave maths environment http://www.octave.org/
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$cross_compiling" = "xno"], [
|
|
|
|
AS_IF([test "x$enable_octave" = "xno"], [
|
|
|
|
AM_CONDITIONAL(BUILD_OCTAVE_MOD, false)
|
|
|
|
], [
|
|
|
|
AC_OCTAVE_BUILD
|
|
|
|
])
|
|
|
|
], [
|
2008-10-18 10:36:15 +00:00
|
|
|
AM_CONDITIONAL(BUILD_OCTAVE_MOD, false)
|
2017-06-05 12:30:16 +00:00
|
|
|
])
|
2007-08-23 11:16:57 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Check for Ogg, Vorbis and FLAC.
|
2008-05-21 08:34:47 +00:00
|
|
|
|
2016-03-13 20:18:05 +00:00
|
|
|
HAVE_EXTERNAL_XIPH_LIBS=0
|
|
|
|
EXTERNAL_XIPH_CFLAGS=""
|
|
|
|
EXTERNAL_XIPH_LIBS=""
|
2020-03-07 09:25:23 +00:00
|
|
|
EXTERNAL_XIPH_REQUIRE=""
|
2008-05-21 08:34:47 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl Check for pkg-config outside the if statement.
|
2008-05-21 09:18:52 +00:00
|
|
|
PKG_PROG_PKG_CONFIG
|
2017-09-03 08:33:06 +00:00
|
|
|
AX_REQUIRE_DEFINED([PKG_INSTALLDIR])
|
|
|
|
PKG_INSTALLDIR
|
2008-05-21 09:18:52 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test -n "$PKG_CONFIG"], [
|
|
|
|
AS_IF([test "x$enable_external_libs" = "xno"], [
|
|
|
|
AC_MSG_WARN([[*** External libs (FLAC, Ogg, Vorbis) disabled. ***]])
|
|
|
|
], [
|
|
|
|
PKG_CHECK_MOD_VERSION(FLAC, flac >= 1.3.1, ac_cv_flac=yes, ac_cv_flac=no)
|
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl Make sure the FLAC_CFLAGS value is sane.
|
2017-06-05 12:30:16 +00:00
|
|
|
FLAC_CFLAGS=`echo $FLAC_CFLAGS | $SED "s|include/FLAC|include|"`
|
|
|
|
|
Opus file support
Ogg: Introduce new functions ogg_sync_fseek(), ogg_ftell(), ogg_next_page(),
ogg_stream_next_page(), ogg_sync_last_page_before(), and
ogg_stream_unpack_page(). Use ogg_sync_* for ogg_read_first_page(). Bump libogg
version requirement from 1.1.3 to 1.3.0 as LibOgg 1.3.0 is required for
ogg_stream_pageout_fill() and ogg_stream_flush_fill().
Opus: Add opus support. Document added commands
SFC_(GET|SET)_ORIGINAL_SAMPLERATE. Added or extended tests ogg_opus_test,
compression_size_test, floating_point_test, lossy_comp_test, string_test,
external_libs_test. Change Opus to non-experimental.
2018-07-09 21:37:06 +00:00
|
|
|
PKG_CHECK_MOD_VERSION(OGG, ogg >= 1.3.0, ac_cv_ogg=yes, ac_cv_ogg=no)
|
2017-06-05 12:30:16 +00:00
|
|
|
|
|
|
|
AS_IF([test "x$enable_experimental" = "xyes"], [
|
|
|
|
PKG_CHECK_MOD_VERSION(SPEEX, speex >= 1.2, ac_cv_speex=yes, ac_cv_speex=no)
|
|
|
|
], [
|
|
|
|
SPEEX_CFLAGS=""
|
|
|
|
SPEEX_LIBS=""
|
|
|
|
])
|
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl Vorbis versions earlier than 1.2.3 have bugs that cause the libsndfile
|
|
|
|
dnl test suite to fail on MIPS, PowerPC and others.
|
|
|
|
dnl See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549899
|
2017-06-05 12:30:16 +00:00
|
|
|
PKG_CHECK_MOD_VERSION(VORBIS, vorbis >= 1.2.3, ac_cv_vorbis=yes, ac_cv_vorbis=no)
|
|
|
|
PKG_CHECK_MOD_VERSION(VORBISENC, vorbisenc >= 1.2.3, ac_cv_vorbisenc=yes, ac_cv_vorbisenc=no)
|
Opus file support
Ogg: Introduce new functions ogg_sync_fseek(), ogg_ftell(), ogg_next_page(),
ogg_stream_next_page(), ogg_sync_last_page_before(), and
ogg_stream_unpack_page(). Use ogg_sync_* for ogg_read_first_page(). Bump libogg
version requirement from 1.1.3 to 1.3.0 as LibOgg 1.3.0 is required for
ogg_stream_pageout_fill() and ogg_stream_flush_fill().
Opus: Add opus support. Document added commands
SFC_(GET|SET)_ORIGINAL_SAMPLERATE. Added or extended tests ogg_opus_test,
compression_size_test, floating_point_test, lossy_comp_test, string_test,
external_libs_test. Change Opus to non-experimental.
2018-07-09 21:37:06 +00:00
|
|
|
|
|
|
|
PKG_CHECK_MOD_VERSION(OPUS, opus >= 1.1, ac_cv_opus=yes, ac_cv_opus=no)
|
2017-06-05 12:30:16 +00:00
|
|
|
enable_external_libs=yes
|
|
|
|
])
|
|
|
|
|
Opus file support
Ogg: Introduce new functions ogg_sync_fseek(), ogg_ftell(), ogg_next_page(),
ogg_stream_next_page(), ogg_sync_last_page_before(), and
ogg_stream_unpack_page(). Use ogg_sync_* for ogg_read_first_page(). Bump libogg
version requirement from 1.1.3 to 1.3.0 as LibOgg 1.3.0 is required for
ogg_stream_pageout_fill() and ogg_stream_flush_fill().
Opus: Add opus support. Document added commands
SFC_(GET|SET)_ORIGINAL_SAMPLERATE. Added or extended tests ogg_opus_test,
compression_size_test, floating_point_test, lossy_comp_test, string_test,
external_libs_test. Change Opus to non-experimental.
2018-07-09 21:37:06 +00:00
|
|
|
AS_IF([test "x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc$ac_cv_opus" = "xyesyesyesyesyes"], [
|
2017-06-05 12:30:16 +00:00
|
|
|
HAVE_EXTERNAL_XIPH_LIBS=1
|
|
|
|
enable_external_libs=yes
|
|
|
|
|
2019-02-24 06:50:56 +00:00
|
|
|
EXTERNAL_XIPH_CFLAGS="$FLAC_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS $OPUS_CFLAGS $OGG_CFLAGS "
|
|
|
|
EXTERNAL_XIPH_LIBS="$FLAC_LIBS $VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS $OPUS_LIBS $OGG_LIBS "
|
2020-03-07 09:25:23 +00:00
|
|
|
EXTERNAL_XIPH_REQUIRE="flac ogg vorbis vorbisenc opus"
|
|
|
|
|
|
|
|
if test x$ac_cv_speex = "xyes" ; then
|
|
|
|
EXTERNAL_XIPH_REQUIRE="$EXTERNAL_XIPH_REQUIRE speex"
|
|
|
|
fi
|
2017-06-05 12:30:16 +00:00
|
|
|
], [
|
|
|
|
AS_ECHO([""])
|
|
|
|
AC_MSG_WARN([[*** One or more of the external libraries (ie libflac, libogg and]])
|
|
|
|
AC_MSG_WARN([[*** libvorbis) is either missing (possibly only the development]])
|
|
|
|
AC_MSG_WARN([[*** headers) or is of an unsupported version.]])
|
|
|
|
AC_MSG_WARN([[***]])
|
|
|
|
AC_MSG_WARN([[*** Unfortunately, for ease of maintenance, the external libs]])
|
|
|
|
AC_MSG_WARN([[*** are an all or nothing affair.]])
|
|
|
|
AS_ECHO([""])
|
|
|
|
enable_external_libs=no
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
Opus file support
Ogg: Introduce new functions ogg_sync_fseek(), ogg_ftell(), ogg_next_page(),
ogg_stream_next_page(), ogg_sync_last_page_before(), and
ogg_stream_unpack_page(). Use ogg_sync_* for ogg_read_first_page(). Bump libogg
version requirement from 1.1.3 to 1.3.0 as LibOgg 1.3.0 is required for
ogg_stream_pageout_fill() and ogg_stream_flush_fill().
Opus: Add opus support. Document added commands
SFC_(GET|SET)_ORIGINAL_SAMPLERATE. Added or extended tests ogg_opus_test,
compression_size_test, floating_point_test, lossy_comp_test, string_test,
external_libs_test. Change Opus to non-experimental.
2018-07-09 21:37:06 +00:00
|
|
|
AC_DEFINE_UNQUOTED([HAVE_EXTERNAL_XIPH_LIBS], [$HAVE_EXTERNAL_XIPH_LIBS], [Will be set to 1 if flac, ogg, vorbis, and opus are available.])
|
2008-05-21 08:34:47 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Check for libsqlite3 (only used in regtest).
|
2005-05-17 12:47:23 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
ac_cv_sqlite3=0
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$enable_sqlite" != "xno"], [
|
2017-09-03 08:33:06 +00:00
|
|
|
PKG_CHECK_MOD_VERSION([SQLITE3], [sqlite3 >= 3.2], [ac_cv_sqlite3=1], [ac_cv_sqlite3=0])
|
2017-06-05 12:30:16 +00:00
|
|
|
])
|
2005-05-17 12:47:23 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_DEFINE_UNQUOTED([HAVE_SQLITE3], [${ac_cv_sqlite3}], [Set to 1 if you have libsqlite3.])
|
|
|
|
AM_CONDITIONAL([HAVE_SQLITE3], [test "x$ac_cv_sqlite3" = "x1"])
|
2005-09-05 08:32:59 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Determine if the processor can do clipping on float to int conversions.
|
2004-02-25 05:31:46 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$enable_cpu_clip" != "xno"], [
|
|
|
|
MN_C_CLIP_MODE
|
|
|
|
], [
|
|
|
|
AS_ECHO(["checking processor clipping capabilities... disabled"])
|
|
|
|
ac_cv_c_clip_positive=0
|
|
|
|
ac_cv_c_clip_negative=0
|
|
|
|
])
|
2004-02-25 05:31:46 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_DEFINE_UNQUOTED([CPU_CLIPS_POSITIVE], [${ac_cv_c_clip_positive}],
|
2017-09-03 08:33:06 +00:00
|
|
|
[Host processor clips on positive float to int conversion.])
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_DEFINE_UNQUOTED([CPU_CLIPS_NEGATIVE], [${ac_cv_c_clip_negative}],
|
2017-09-03 08:33:06 +00:00
|
|
|
[Host processor clips on negative float to int conversion.])
|
2004-02-25 05:31:46 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Host OS specific stuff.
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2004-02-19 11:49:34 +00:00
|
|
|
OS_SPECIFIC_CFLAGS=""
|
2004-03-04 22:02:43 +00:00
|
|
|
OS_SPECIFIC_LINKS=""
|
2007-05-14 09:55:24 +00:00
|
|
|
os_is_win32=0
|
2014-07-04 10:35:31 +00:00
|
|
|
os_is_openbsd=0
|
2005-09-17 07:22:05 +00:00
|
|
|
use_windows_api=0
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_CASE([$host_os],
|
|
|
|
[darwin* | rhapsody*], [
|
|
|
|
AS_IF([test "x$HAVE_XCODE_SELECT" = "xyes"], [
|
|
|
|
developer_path=`xcode-select --print-path`
|
|
|
|
], [
|
|
|
|
developer_path="/Developer"
|
|
|
|
])
|
|
|
|
OS_SPECIFIC_LINKS="-framework CoreAudio -framework AudioToolbox -framework CoreFoundation"],
|
|
|
|
[mingw*], [
|
2005-09-17 07:22:05 +00:00
|
|
|
os_is_win32=1
|
|
|
|
use_windows_api=1
|
2017-06-05 12:30:16 +00:00
|
|
|
OS_SPECIFIC_LINKS="-lwinmm"],
|
|
|
|
[openbsd*], [
|
2014-07-04 10:35:31 +00:00
|
|
|
os_is_openbsd=1
|
2017-06-05 12:30:16 +00:00
|
|
|
])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_DEFINE_UNQUOTED([OS_IS_WIN32], [${os_is_win32}], [Set to 1 if compiling for Win32])
|
|
|
|
AC_DEFINE_UNQUOTED([OS_IS_OPENBSD], [${os_is_openbsd}], [Set to 1 if compiling for OpenBSD])
|
|
|
|
AC_DEFINE_UNQUOTED([USE_WINDOWS_API], [${use_windows_api}], [Set to 1 to use the native windows API])
|
2010-10-10 01:43:08 +00:00
|
|
|
AM_CONDITIONAL(USE_WIN_VERSION_FILE, test ${use_windows_api} -eq 1)
|
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Check for ALSA.
|
2004-03-17 08:49:55 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$enable_alsa" != "xno"], [
|
2017-09-03 08:33:06 +00:00
|
|
|
PKG_CHECK_MODULES([ALSA], [alsa], [
|
|
|
|
dnl actually test whether ALSA really works, in
|
|
|
|
dnl order to dodge wrong cross-compilation pickups
|
|
|
|
save_CFLAGS="${CFLAGS}"
|
|
|
|
save_LIBS="${LIBS}"
|
|
|
|
CFLAGS="${CFLAGS} ${ALSA_CFLAGS}"
|
|
|
|
LIBS="${LIBS} ${ALSA_LIBS}"
|
|
|
|
AC_CHECK_HEADERS([alsa/asoundlib.h])
|
|
|
|
AS_IF([test "x$ac_cv_header_alsa_asoundlib_h" = "xyes"], [
|
|
|
|
dnl ALSA definitely works
|
|
|
|
AC_DEFINE([HAVE_ALSA], [1], [Set to 1 if you have alsa])
|
|
|
|
alsa_works="yes"
|
|
|
|
], [
|
|
|
|
dnl picked up wrong ALSA
|
|
|
|
alsa_works="no"
|
|
|
|
|
|
|
|
dnl reset flags
|
|
|
|
ALSA_CFLAGS=""
|
|
|
|
ALSA_LIBS=""
|
|
|
|
])
|
|
|
|
CFLAGS="${save_CFLAGS}"
|
|
|
|
LIBS="${save_LIBS}"
|
|
|
|
], [
|
|
|
|
dnl could not find ALSA
|
|
|
|
alsa_works="no"
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$alsa_works" = "xno"], [
|
|
|
|
AS_IF([test "x$enable_alsa" = "xyes"], [
|
|
|
|
dnl explicitly passed --enable-alsa, hence error out loud and clearly
|
|
|
|
AC_MSG_ERROR([You explicitly requested alsa support, but alsa could not be found!])
|
|
|
|
], [
|
|
|
|
dnl did not explicitly pass --enable-alsa, relying on default automagic on
|
|
|
|
enable_alsa="no (auto)"
|
|
|
|
])
|
2017-06-05 12:30:16 +00:00
|
|
|
])
|
|
|
|
])
|
2004-03-17 08:49:55 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Check for OpenBSD's sndio.
|
2010-01-07 10:01:35 +00:00
|
|
|
|
|
|
|
SNDIO_LIBS=""
|
2014-07-28 09:30:46 +00:00
|
|
|
HAVE_SNDIO_H=0
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_CASE([$host_os],
|
|
|
|
[openbsd*], [
|
2015-10-29 07:17:20 +00:00
|
|
|
AC_CHECK_HEADERS(sndio.h)
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$ac_cv_header_sndio_h" = "xyes"], [
|
|
|
|
SNDIO_LIBS="-lsndio"
|
|
|
|
HAVE_SNDIO_H=1
|
|
|
|
])
|
|
|
|
])
|
2015-10-29 07:17:20 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_DEFINE_UNQUOTED([HAVE_SNDIO_H], [${HAVE_SNDIO_H}], [Set to 1 if <sndio.h> is available.])
|
2010-01-07 10:01:35 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Test for sanity when cross-compiling.
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$ac_cv_sizeof_short" != "x2"], [
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
AC_MSG_WARN([[*** sizeof (short) != 2. ]])
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$ac_cv_sizeof_int" != "x4"], [
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
AC_MSG_WARN([[*** sizeof (int) != 4 ]])
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$ac_cv_sizeof_float" != "x4"], [
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
AC_MSG_WARN([[*** sizeof (float) != 4. ]])
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$ac_cv_sizeof_double" != "x8"], [
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
AC_MSG_WARN([[*** sizeof (double) != 8. ]])
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$ac_cv_prog_HAVE_AUTOGEN" = "xno"], [
|
|
|
|
AC_MSG_WARN([[Touching files in directory tests/.]])
|
|
|
|
touch tests/*.c tests/*.h
|
|
|
|
])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Settings for the HTML documentation.
|
2004-04-25 13:33:04 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$enable_bow_docs" = "xyes"], [
|
|
|
|
HTML_BGCOLOUR="white"
|
|
|
|
HTML_FGCOLOUR="black"
|
|
|
|
], [
|
|
|
|
HTML_BGCOLOUR="black"
|
|
|
|
HTML_FGCOLOUR="white"
|
|
|
|
])
|
2004-04-25 13:33:04 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
|
|
|
dnl Now use the information from the checking stage.
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2007-04-23 08:23:05 +00:00
|
|
|
win32_target_dll=0
|
2007-11-23 23:00:29 +00:00
|
|
|
COMPILER_IS_GCC=0
|
2007-04-23 08:23:05 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$enable_flags_setting" = "xyes"], [
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-O2 -pipe], [CFLAGS])
|
2017-06-05 12:30:16 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-O2 -pipe], [CXXFLAGS])
|
|
|
|
AC_LANG_POP([C++])
|
2017-09-03 08:33:06 +00:00
|
|
|
|
|
|
|
AS_CASE([${host_os}],
|
|
|
|
[darwin*], [
|
|
|
|
ldflags_test="-Wl,-dead_strip_dylibs"],
|
|
|
|
[linux*], [
|
|
|
|
ldflags_test="-Wl,-O1 -Wl,--as-needed -Wl,--no-undefined -Wl,--gc-sections"]
|
|
|
|
)
|
|
|
|
AX_APPEND_LINK_FLAGS([${ldflags_test}], [LDFLAGS])
|
2017-06-05 12:30:16 +00:00
|
|
|
])
|
2017-06-05 12:30:16 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$enable_werror" = "xyes"], [
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Werror], [CFLAGS])
|
2017-06-05 12:30:16 +00:00
|
|
|
|
|
|
|
AC_LANG_PUSH([C++])
|
2017-06-05 12:30:16 +00:00
|
|
|
AX_APPEND_COMPILE_FLAGS([-Werror], [CXXFLAGS])
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_LANG_POP([C++])
|
2017-06-05 12:30:16 +00:00
|
|
|
])
|
2017-06-05 12:30:16 +00:00
|
|
|
|
2019-04-07 11:42:52 +00:00
|
|
|
common_flags="-Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wundef -Wuninitialized -Winit-self -Wno-format-truncation"
|
2018-09-14 04:29:38 +00:00
|
|
|
AX_APPEND_COMPILE_FLAGS([${common_flags} -Wvla -Wbad-function-cast -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Waggregate-return], [CFLAGS])
|
2017-06-05 12:30:16 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([${common_flags} -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-promo], [CXXFLAGS])
|
|
|
|
AC_LANG_POP([C++])
|
2017-06-05 12:30:16 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$enable_stack_smash_protection" = "xyes"], [
|
|
|
|
XIPH_GCC_STACK_PROTECTOR
|
|
|
|
XIPH_GXX_STACK_PROTECTOR
|
|
|
|
])
|
2017-06-05 12:30:16 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$enable_test_coverage" = "xyes"], [
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-coverage], [CFLAGS])
|
|
|
|
])
|
2017-06-05 12:30:16 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
dnl some distributions (such as Gentoo) have _FORTIFY_SOURCE always
|
|
|
|
dnl enabled. We test for this situation in order to prevent polluting
|
|
|
|
dnl the console with messages of macro redefinitions.
|
|
|
|
AX_ADD_FORTIFY_SOURCE
|
2017-06-05 12:30:16 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$ax_cv_c_compiler_vendor" = "xgnu"], [
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl OS specific tweaks.
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_CASE([$host_os],
|
|
|
|
[darwin* | rhapsody*], [
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl Disable -Wall, -pedantic and -Wshadow for Apple Darwin/Rhapsody.
|
|
|
|
dnl System headers on these systems are broken.
|
2017-06-05 12:30:16 +00:00
|
|
|
temp_CFLAGS=`echo $CFLAGS | $SED "s/-Wall -pedantic//" | $SED "s/-Wshadow//" | $SED "s/-Waggregate-return//"`
|
|
|
|
CFLAGS=$temp_CFLAGS
|
2017-09-03 08:33:06 +00:00
|
|
|
SHLIB_VERSION_ARG="-Wl,-exported_symbols_list -Wl,\$(top_srcdir)/src/Symbols.darwin"],
|
2017-06-05 12:30:16 +00:00
|
|
|
[mingw*], [
|
2017-09-03 08:33:06 +00:00
|
|
|
SHLIB_VERSION_ARG="-Wc,-static-libgcc -Wl,\$(top_srcdir)/src/libsndfile-1.def"
|
2017-06-05 12:30:16 +00:00
|
|
|
win32_target_dll=1
|
|
|
|
AS_IF([test "x$enable_shared" = "xno"], [
|
|
|
|
win32_target_dll=0
|
2017-10-27 08:35:21 +00:00
|
|
|
])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-mstackrealign], [CFLAGS])
|
|
|
|
],
|
2017-06-05 12:30:16 +00:00
|
|
|
[os2*], [
|
2017-09-03 08:33:06 +00:00
|
|
|
SHLIB_VERSION_ARG="-Wl,-export-symbols \$(top_srcdir)/src/Symbols.os2"
|
2017-06-05 12:30:16 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
COMPILER_IS_GCC=1
|
|
|
|
])
|
|
|
|
|
2020-11-20 19:48:13 +00:00
|
|
|
AS_CASE([$host_os], [linux*|kfreebsd*-gnu*|gnu*], [SHLIB_VERSION_ARG="-Wl,--version-script=\$(top_srcdir)/src/Symbols.gnu-binutils"])
|
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_DEFINE_UNQUOTED([WIN32_TARGET_DLL], [${win32_target_dll}], [Set to 1 if windows DLL is being built.])
|
|
|
|
AC_DEFINE_UNQUOTED([COMPILER_IS_GCC], [${COMPILER_IS_GCC}], [Set to 1 if the compile is GNU GCC.])
|
2007-04-23 08:23:05 +00:00
|
|
|
|
2004-07-02 13:20:15 +00:00
|
|
|
CFLAGS="$CFLAGS $OS_SPECIFIC_CFLAGS"
|
2004-02-19 11:49:34 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$CFLAGS" = "x"], [
|
|
|
|
AC_MSG_ERROR(["Error in configure script. CFLAGS has been screwed up."])
|
|
|
|
])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2009-09-27 03:32:41 +00:00
|
|
|
HOST_TRIPLET="${host_cpu}-${host_vendor}-${host_os}"
|
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AC_DEFINE_UNQUOTED([HOST_TRIPLET], [${HOST_TRIPLET}], [The host triplet of the compiled binary.])
|
2013-08-09 23:36:14 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "$HOST_TRIPLET" = "x86_64-w64-mingw32"], [
|
|
|
|
OS_SPECIFIC_LINKS=" -static-libgcc $OS_SPECIFIC_LINKS"
|
|
|
|
])
|
2010-05-07 11:42:14 +00:00
|
|
|
|
2011-03-22 06:47:01 +00:00
|
|
|
WIN_RC_VERSION=`echo $PACKAGE_VERSION | $SED -e "s/p.*//" -e "s/\./,/g"`
|
2010-10-10 01:43:08 +00:00
|
|
|
|
2013-09-04 11:02:06 +00:00
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
AS_IF([test "x$enable_static" = "xno"], [
|
|
|
|
SRC_BINDIR=src/.libs/
|
|
|
|
TEST_BINDIR=tests/.libs/
|
|
|
|
], [
|
|
|
|
SRC_BINDIR=src/
|
|
|
|
TEST_BINDIR=tests/
|
|
|
|
])
|
2013-09-04 11:02:06 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl -------------------------------------------------------------------------------
|
2007-04-23 08:23:05 +00:00
|
|
|
|
2009-09-27 03:32:41 +00:00
|
|
|
AC_SUBST(HOST_TRIPLET)
|
|
|
|
|
2004-04-25 13:33:04 +00:00
|
|
|
AC_SUBST(HTML_BGCOLOUR)
|
|
|
|
AC_SUBST(HTML_FGCOLOUR)
|
2004-04-20 13:20:25 +00:00
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_SUBST(SHLIB_VERSION_ARG)
|
|
|
|
AC_SUBST(SHARED_VERSION_INFO)
|
2010-10-10 01:43:08 +00:00
|
|
|
AC_SUBST(CLEAN_VERSION)
|
2017-04-26 07:20:44 +00:00
|
|
|
AC_SUBST(VERSION_MAJOR)
|
|
|
|
AC_SUBST(GEN_TOOL)
|
|
|
|
|
2010-10-10 01:43:08 +00:00
|
|
|
AC_SUBST(WIN_RC_VERSION)
|
|
|
|
|
2016-03-13 20:18:05 +00:00
|
|
|
AC_SUBST(HAVE_EXTERNAL_XIPH_LIBS)
|
2004-02-19 11:49:34 +00:00
|
|
|
AC_SUBST(OS_SPECIFIC_CFLAGS)
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_SUBST(OS_SPECIFIC_LINKS)
|
2010-01-07 10:01:35 +00:00
|
|
|
AC_SUBST(SNDIO_LIBS)
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2016-03-13 20:18:05 +00:00
|
|
|
AC_SUBST(EXTERNAL_XIPH_CFLAGS)
|
|
|
|
AC_SUBST(EXTERNAL_XIPH_LIBS)
|
2020-03-07 09:25:23 +00:00
|
|
|
AC_SUBST(EXTERNAL_XIPH_REQUIRE)
|
2013-09-04 11:02:06 +00:00
|
|
|
AC_SUBST(SRC_BINDIR)
|
|
|
|
AC_SUBST(TEST_BINDIR)
|
2008-05-21 08:34:47 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile Octave/Makefile
|
2020-08-26 06:23:33 +00:00
|
|
|
src/version-metadata.rc include/sndfile.h
|
2017-09-03 08:33:06 +00:00
|
|
|
tests/test_wrapper.sh tests/pedantic-header-test.sh
|
2020-10-18 07:14:45 +00:00
|
|
|
libsndfile.spec sndfile.pc
|
2017-10-28 01:56:10 +00:00
|
|
|
Scripts/build-test-tarball.mk
|
2007-04-30 12:03:05 +00:00
|
|
|
])
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_OUTPUT
|
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
dnl ====================================================================================
|
2009-02-10 22:31:36 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AS_IF([test -z "$PKG_CONFIG"], [
|
|
|
|
AS_ECHO([" *****************************************************************"])
|
|
|
|
AS_ECHO([" *** The pkg-config program is missing. ***"])
|
|
|
|
AS_ECHO([" *** External FLAC/Ogg/Vorbis libs cannot be found without it. ***"])
|
|
|
|
AS_ECHO([" *** http://pkg-config.freedesktop.org/wiki/ ***"])
|
|
|
|
AS_ECHO([" *****************************************************************"])
|
|
|
|
])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
AX_RECURSIVE_EVAL([$libdir], [full_absolute_libdir])
|
|
|
|
AX_RECURSIVE_EVAL([$bindir], [full_absolute_bindir])
|
|
|
|
AX_RECURSIVE_EVAL([$pkgconfigdir], [full_absolute_pkgconfigdir])
|
|
|
|
AX_RECURSIVE_EVAL([$htmldir], [full_absolute_htmldir])
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_MSG_RESULT([
|
2017-09-03 08:33:06 +00:00
|
|
|
-=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-=-
|
2007-05-14 09:55:24 +00:00
|
|
|
|
|
|
|
Configuration summary :
|
|
|
|
|
2010-02-27 22:05:35 +00:00
|
|
|
libsndfile version : .................. ${VERSION}
|
2009-09-22 07:43:06 +00:00
|
|
|
|
|
|
|
Host CPU : ............................ ${host_cpu}
|
|
|
|
Host Vendor : ......................... ${host_vendor}
|
|
|
|
Host OS : ............................. ${host_os}
|
|
|
|
|
2017-06-05 12:30:16 +00:00
|
|
|
CFLAGS : .............................. ${CFLAGS}
|
|
|
|
CXXFLAGS : ............................ ${CXXFLAGS}
|
|
|
|
CPPFLAGS : ............................ ${CPPFLAGS}
|
|
|
|
LDFLAGS : ............................. ${LDFLAGS}
|
|
|
|
|
2008-05-21 23:19:27 +00:00
|
|
|
Experimental code : ................... ${enable_experimental:-no}
|
2008-06-25 01:03:39 +00:00
|
|
|
Using ALSA in example programs : ...... ${enable_alsa:-no}
|
Opus file support
Ogg: Introduce new functions ogg_sync_fseek(), ogg_ftell(), ogg_next_page(),
ogg_stream_next_page(), ogg_sync_last_page_before(), and
ogg_stream_unpack_page(). Use ogg_sync_* for ogg_read_first_page(). Bump libogg
version requirement from 1.1.3 to 1.3.0 as LibOgg 1.3.0 is required for
ogg_stream_pageout_fill() and ogg_stream_flush_fill().
Opus: Add opus support. Document added commands
SFC_(GET|SET)_ORIGINAL_SAMPLERATE. Added or extended tests ogg_opus_test,
compression_size_test, floating_point_test, lossy_comp_test, string_test,
external_libs_test. Change Opus to non-experimental.
2018-07-09 21:37:06 +00:00
|
|
|
External FLAC/Ogg/Vorbis/Opus : ....... ${enable_external_libs:-no}
|
2018-01-07 01:14:46 +00:00
|
|
|
Building Octave interface : ........... ${OCTAVE_BUILD}
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
Tools :
|
2017-06-05 12:30:16 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
C Compiler Vendor is : ................ ${ax_cv_c_compiler_vendor} (${ax_cv_c_compiler_version})
|
|
|
|
CXX Compiler Vendor is : .............. ${ax_cv_cxx_compiler_vendor} (${ax_cv_cxx_compiler_version})
|
2017-06-05 12:30:16 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
Sanitizer enabled : ................... ${enable_sanitizer:-no}
|
|
|
|
Stack smash protection : .............. ${enable_stack_smash_protection:-no}
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2017-09-03 08:33:06 +00:00
|
|
|
Installation directories :
|
|
|
|
|
|
|
|
Library directory : ................... ${full_absolute_libdir}
|
|
|
|
Program directory : ................... ${full_absolute_bindir}
|
|
|
|
Pkgconfig directory : ................. ${full_absolute_pkgconfigdir}
|
|
|
|
HTML docs directory : ................. ${full_absolute_htmldir}
|
|
|
|
|
|
|
|
Compiling some other packages against libsndfile may require
|
|
|
|
the addition of '$full_absolute_pkgconfigdir' to the
|
|
|
|
PKG_CONFIG_PATH environment variable.
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl Remove symlink created by Scripts/android-configure.sh.
|
2017-01-27 22:51:19 +00:00
|
|
|
rm -f gdbclient
|