2014-02-21 22:47:41 +00:00
|
|
|
# Copyright (C) 1999-2014 Erik de Castro Lopo <erikd@mega-nerd.com>.
|
2007-05-14 09:55:24 +00:00
|
|
|
|
|
|
|
dnl Require autoconf version
|
2007-05-13 10:51:01 +00:00
|
|
|
AC_PREREQ(2.57)
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2013-02-10 03:09:32 +00:00
|
|
|
AC_INIT([libsndfile],[1.0.26pre5],[sndfile@mega-nerd.com],
|
2009-12-17 11:41:32 +00:00
|
|
|
[libsndfile],[http://www.mega-nerd.com/libsndfile/])
|
2007-10-15 10:09:49 +00:00
|
|
|
|
|
|
|
# Put config stuff in Cfg.
|
|
|
|
AC_CONFIG_AUX_DIR(Cfg)
|
2014-02-21 22:47:41 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([M4])
|
2007-10-15 10:09:49 +00:00
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_CONFIG_SRCDIR([src/sndfile.c])
|
|
|
|
AC_CANONICAL_TARGET([])
|
2004-11-15 22:29:27 +00:00
|
|
|
|
2008-04-16 23:37:22 +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
|
|
|
|
2013-04-05 11:25:46 +00:00
|
|
|
AM_INIT_AUTOMAKE
|
2012-03-10 07:22:51 +00:00
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
2006-04-18 09:43:20 +00:00
|
|
|
|
|
|
|
AC_LANG([C])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2013-07-13 07:04:45 +00:00
|
|
|
AC_PROG_CC_STDC
|
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
2011-03-22 06:47:01 +00:00
|
|
|
AM_PROG_CC_C_O
|
|
|
|
AC_PROG_CXX
|
2013-11-01 04:58:40 +00:00
|
|
|
|
|
|
|
MN_C_COMPILER_IS_CLANG
|
|
|
|
MN_GCC_REALLY_IS_GCC
|
|
|
|
|
2011-03-22 06:47:01 +00:00
|
|
|
AC_PROG_SED
|
|
|
|
|
|
|
|
# Do not check for F77.
|
|
|
|
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
|
|
|
|
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
LT_PROG_RC
|
|
|
|
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
|
2012-08-04 08:00:51 +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)
|
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
#------------------------------------------------------------------------------------
|
|
|
|
# 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.
|
|
|
|
|
2011-03-22 06:47:01 +00:00
|
|
|
CLEAN_VERSION=`echo $PACKAGE_VERSION | $SED "s/p.*//"`
|
|
|
|
VERSION_MINOR=`echo $CLEAN_VERSION | $SED "s/.*\.//"`
|
2010-10-10 01:43:08 +00:00
|
|
|
|
|
|
|
SHARED_VERSION_INFO="1:$VERSION_MINOR:0"
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2011-03-22 06:47:01 +00:00
|
|
|
#------------------------------------------------------------------------------------
|
2004-05-14 13:52:30 +00:00
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_HEADER_STDC
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(endian.h)
|
2004-07-17 12:26:33 +00:00
|
|
|
AC_CHECK_HEADERS(byteswap.h)
|
2005-09-20 02:03:43 +00:00
|
|
|
AC_CHECK_HEADERS(locale.h)
|
2008-08-17 06:23:32 +00:00
|
|
|
AC_CHECK_HEADERS(sys/time.h)
|
2006-01-05 10:31:29 +00:00
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_HEADER_SYS_WAIT
|
|
|
|
|
|
|
|
AC_CHECK_DECLS(S_IRGRP)
|
2006-06-04 12:23:54 +00:00
|
|
|
if test x$ac_cv_have_decl_S_IRGRP = xyes ; then
|
|
|
|
AC_DEFINE_UNQUOTED([HAVE_DECL_S_IRGRP],1,[Set to 1 if S_IRGRP is defined.])
|
|
|
|
else
|
|
|
|
AC_DEFINE_UNQUOTED([HAVE_DECL_S_IRGRP],0)
|
|
|
|
fi
|
2004-03-15 09:21:04 +00:00
|
|
|
|
2008-03-30 12:28:25 +00:00
|
|
|
AM_CONDITIONAL([LINUX_MINGW_CROSS_TEST],
|
|
|
|
[test "$build_os:$target_os:$host_os:$HAVE_WINE" = "linux-gnu:mingw32msvc:mingw32msvc:yes"])
|
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
#====================================================================================
|
|
|
|
# Couple of initializations here. Fill in real values later.
|
|
|
|
|
|
|
|
SHLIB_VERSION_ARG=""
|
|
|
|
|
|
|
|
#====================================================================================
|
|
|
|
# Finished checking, handle options.
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(experimental,
|
2006-03-26 05:36:38 +00:00
|
|
|
AC_HELP_STRING([--enable-experimental], [enable experimental code]))
|
2007-05-14 09:55:24 +00:00
|
|
|
|
|
|
|
EXPERIMENTAL_CODE=0
|
2006-03-26 05:36:38 +00:00
|
|
|
if test x$enable_experimental = xyes ; then
|
2007-05-14 09:55:24 +00:00
|
|
|
EXPERIMENTAL_CODE=1
|
|
|
|
fi
|
|
|
|
AC_DEFINE_UNQUOTED([ENABLE_EXPERIMENTAL_CODE],${EXPERIMENTAL_CODE}, [Set to 1 to enable experimental code.])
|
|
|
|
|
2013-11-23 00:38:22 +00:00
|
|
|
AC_ARG_ENABLE(werror,
|
|
|
|
AC_HELP_STRING([--enable-werror], [enable -Werror in all Makefiles]))
|
2004-02-25 09:01:53 +00:00
|
|
|
|
2013-06-22 09:32:18 +00:00
|
|
|
AC_ARG_ENABLE(stack-smash-protection,
|
|
|
|
AC_HELP_STRING([--enable-stack-smash-protection], [Enable GNU GCC stack smash protection]))
|
|
|
|
|
2004-03-03 12:11:18 +00:00
|
|
|
AC_ARG_ENABLE(gcc-pipe,
|
2006-03-26 05:36:38 +00:00
|
|
|
AC_HELP_STRING([--disable-gcc-pipe], [disable gcc -pipe option]))
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2004-03-03 12:11:18 +00:00
|
|
|
AC_ARG_ENABLE(gcc-opt,
|
2006-03-26 05:36:38 +00:00
|
|
|
AC_HELP_STRING([--disable-gcc-opt], [disable gcc optimisations]))
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2004-03-03 12:11:18 +00:00
|
|
|
AC_ARG_ENABLE(cpu-clip,
|
2006-03-26 05:36:38 +00:00
|
|
|
AC_HELP_STRING([--disable-cpu-clip], [disable tricky cpu specific clipper]))
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2004-04-25 13:33:04 +00:00
|
|
|
AC_ARG_ENABLE(bow-docs,
|
2006-03-26 05:36:38 +00:00
|
|
|
AC_HELP_STRING([--enable-bow-docs], [enable black-on-white html docs]))
|
2004-04-25 13:33:04 +00:00
|
|
|
|
2005-06-20 07:01:43 +00:00
|
|
|
AC_ARG_ENABLE(sqlite,
|
2006-03-26 05:36:38 +00:00
|
|
|
AC_HELP_STRING([--disable-sqlite], [disable use of sqlite]))
|
2005-06-20 07:01:43 +00:00
|
|
|
|
2005-10-07 13:27:53 +00:00
|
|
|
AC_ARG_ENABLE(alsa,
|
2006-03-26 05:36:38 +00:00
|
|
|
AC_HELP_STRING([--disable-alsa], [disable use of ALSA]))
|
2005-10-07 13:27:53 +00:00
|
|
|
|
2008-05-21 09:18:52 +00:00
|
|
|
AC_ARG_ENABLE(external-libs,
|
2009-03-17 03:09:31 +00:00
|
|
|
AC_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,
|
2008-10-27 10:05:24 +00:00
|
|
|
AC_HELP_STRING([--enable-octave], [disable building of GNU Octave module]))
|
2008-10-18 10:36:15 +00:00
|
|
|
|
2006-10-15 11:05:45 +00:00
|
|
|
AC_ARG_ENABLE(test-coverage,
|
|
|
|
AC_HELP_STRING([--enable-test-coverage], [enable test coverage]))
|
|
|
|
AM_CONDITIONAL([ENABLE_TEST_COVERAGE], [test "$enable_test_coverage" = yes])
|
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
#====================================================================================
|
|
|
|
# Check types and their sizes.
|
|
|
|
|
2009-09-25 12:00:00 +00:00
|
|
|
AC_CHECK_SIZEOF(wchar_t,4)
|
2007-05-14 09:55:24 +00:00
|
|
|
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)
|
2004-07-19 10:12:09 +00:00
|
|
|
AC_CHECK_SIZEOF(int64_t,8)
|
2004-10-14 00:17:05 +00:00
|
|
|
AC_CHECK_SIZEOF(long long,8)
|
2007-05-14 09:55:24 +00:00
|
|
|
|
|
|
|
#====================================================================================
|
|
|
|
# Find an appropriate type for sf_count_t.
|
|
|
|
# On systems supporting files larger than 2 Gig, sf_count_t must be a 64 bit value.
|
|
|
|
# Unfortunately there is more than one way of ensuring this so need to do some
|
|
|
|
# pretty rigourous testing here.
|
|
|
|
|
2013-07-31 08:10:59 +00:00
|
|
|
# Check for common 64 bit file offset types.
|
|
|
|
AC_CHECK_SIZEOF(off_t,1)
|
|
|
|
AC_CHECK_SIZEOF(loff_t,1)
|
|
|
|
AC_CHECK_SIZEOF(off64_t,1)
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2013-04-29 23:38:58 +00:00
|
|
|
if test "$enable_largefile:$ac_cv_sizeof_off_t" = "no:8" ; then
|
|
|
|
echo
|
|
|
|
echo "Error : Cannot disable large file support because sizeof (off_t) == 8."
|
|
|
|
echo
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2005-08-16 11:13:32 +00:00
|
|
|
case "$host_os" in
|
2009-09-22 07:43:06 +00:00
|
|
|
mingw32msvc | 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
|
2009-09-22 07:43:06 +00:00
|
|
|
AC_DEFINE([__USE_MINGW_ANSI_STDIO],1,[Set to 1 to use C99 printf/snprintf in MinGW.])
|
2004-04-20 12:17:38 +00:00
|
|
|
;;
|
|
|
|
*)
|
2013-07-31 08:10:59 +00:00
|
|
|
SIZEOF_SF_COUNT_T=0
|
2004-04-20 12:17:38 +00:00
|
|
|
if test "x$ac_cv_sizeof_off_t" = "x8" ; then
|
|
|
|
# If sizeof (off_t) is 8, no further checking is needed.
|
2010-11-01 10:05:22 +00:00
|
|
|
TYPEOF_SF_COUNT_T="int64_t"
|
2004-04-20 12:17:38 +00:00
|
|
|
SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
|
|
|
|
SIZEOF_SF_COUNT_T=8
|
2013-07-31 08:10:59 +00:00
|
|
|
elif test "x$ac_cv_sizeof_loff_t" = "x8" ; then
|
|
|
|
TYPEOF_SF_COUNT_T="int64_t"
|
|
|
|
SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
|
|
|
|
SIZEOF_SF_COUNT_T=8
|
|
|
|
elif test "x$ac_cv_sizeof_off64_t" = "x8" ; then
|
|
|
|
TYPEOF_SF_COUNT_T="int64_t"
|
|
|
|
SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
|
|
|
|
SIZEOF_SF_COUNT_T=8
|
2004-04-20 12:17:38 +00:00
|
|
|
else
|
|
|
|
# Save the old sizeof (off_t) value and then unset it to see if it
|
|
|
|
# changes when Large File Support is enabled.
|
|
|
|
pre_largefile_sizeof_off_t=$ac_cv_sizeof_off_t
|
|
|
|
unset ac_cv_sizeof_off_t
|
2005-09-23 10:02:20 +00:00
|
|
|
|
2011-08-23 10:20:20 +00:00
|
|
|
AC_SYS_LARGEFILE
|
2005-09-23 10:02:20 +00:00
|
|
|
|
2004-04-20 12:17:38 +00:00
|
|
|
if test "x$ac_cv_sys_largefile_CFLAGS" = "xno" ; then
|
|
|
|
ac_cv_sys_largefile_CFLAGS=""
|
|
|
|
fi
|
|
|
|
if test "x$ac_cv_sys_largefile_LDFLAGS" = "xno" ; then
|
|
|
|
ac_cv_sys_largefile_LDFLAGS=""
|
|
|
|
fi
|
|
|
|
if test "x$ac_cv_sys_largefile_LIBS" = "xno" ; then
|
|
|
|
ac_cv_sys_largefile_LIBS=""
|
|
|
|
fi
|
2005-09-23 10:02:20 +00:00
|
|
|
|
2013-07-31 08:10:59 +00:00
|
|
|
AC_CHECK_SIZEOF(off_t,1)
|
2005-09-23 10:02:20 +00:00
|
|
|
|
2004-04-20 12:17:38 +00:00
|
|
|
if test "x$ac_cv_sizeof_off_t" = "x8" ; then
|
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"
|
|
|
|
elif test "x$TYPEOF_SF_COUNT_T" = "xunknown" ; then
|
|
|
|
echo
|
|
|
|
echo "*** The configure process has determined that this system is capable"
|
|
|
|
echo "*** of Large File Support but has not been able to find a type which"
|
|
|
|
echo "*** is an unambiguous 64 bit file offset."
|
|
|
|
echo "*** Please contact the author to help resolve this problem."
|
|
|
|
echo
|
|
|
|
AC_MSG_ERROR([[Bad file offset type.]])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2004-03-04 22:02:43 +00:00
|
|
|
if test $SIZEOF_SF_COUNT_T = 4 ; then
|
2007-05-14 09:55:24 +00:00
|
|
|
SF_COUNT_MAX="0x7FFFFFFF"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED([TYPEOF_SF_COUNT_T],${TYPEOF_SF_COUNT_T}, [Set to long if unknown.])
|
|
|
|
AC_SUBST(TYPEOF_SF_COUNT_T)
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED([SIZEOF_SF_COUNT_T],${SIZEOF_SF_COUNT_T}, [Set to sizeof (long) if unknown.])
|
|
|
|
AC_SUBST(SIZEOF_SF_COUNT_T)
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED([SF_COUNT_MAX],${SF_COUNT_MAX}, [Set to maximum allowed value of sf_count_t type.])
|
|
|
|
AC_SUBST(SF_COUNT_MAX)
|
|
|
|
|
2004-03-04 22:02:43 +00:00
|
|
|
AC_CHECK_TYPES(ssize_t)
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_CHECK_SIZEOF(ssize_t,4)
|
|
|
|
|
|
|
|
#====================================================================================
|
|
|
|
# Determine endian-ness of target processor.
|
|
|
|
|
2009-12-03 07:10:58 +00:00
|
|
|
MN_C_FIND_ENDIAN
|
2007-05-14 09:55:24 +00:00
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED(CPU_IS_BIG_ENDIAN, ${ac_cv_c_big_endian},
|
|
|
|
[Target processor is big endian.])
|
|
|
|
AC_DEFINE_UNQUOTED(CPU_IS_LITTLE_ENDIAN, ${ac_cv_c_little_endian},
|
|
|
|
[Target processor is little endian.])
|
2007-05-12 02:28:08 +00:00
|
|
|
AC_DEFINE_UNQUOTED(WORDS_BIGENDIAN, ${ac_cv_c_big_endian},
|
|
|
|
[Target processor is big endian.])
|
2007-05-14 09:55:24 +00:00
|
|
|
|
|
|
|
#====================================================================================
|
2004-01-21 07:46:34 +00:00
|
|
|
# Check for functions.
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2004-01-21 07:46:34 +00:00
|
|
|
AC_CHECK_FUNCS(malloc calloc realloc free)
|
2013-07-31 08:10:59 +00:00
|
|
|
AC_CHECK_FUNCS(open read write lseek lseek64)
|
2013-07-31 12:34:40 +00:00
|
|
|
AC_CHECK_FUNCS(fstat fstat64 ftruncate fsync)
|
2004-01-21 07:46:34 +00:00
|
|
|
AC_CHECK_FUNCS(snprintf vsnprintf)
|
2008-08-17 06:23:32 +00:00
|
|
|
AC_CHECK_FUNCS(gmtime gmtime_r localtime localtime_r gettimeofday)
|
2004-01-21 07:46:34 +00:00
|
|
|
AC_CHECK_FUNCS(mmap getpagesize)
|
2005-09-20 02:03:43 +00:00
|
|
|
AC_CHECK_FUNCS(setlocale)
|
2009-12-27 21:22:54 +00:00
|
|
|
AC_CHECK_FUNCS(pipe waitpid)
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2004-01-21 07:46:34 +00:00
|
|
|
AC_CHECK_LIB([m],floor)
|
2012-06-08 08:16:35 +00:00
|
|
|
AC_CHECK_FUNCS(floor ceil fmod lround)
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2009-12-03 07:10:58 +00:00
|
|
|
MN_C99_FUNC_LRINT
|
|
|
|
MN_C99_FUNC_LRINTF
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2007-08-23 11:16:57 +00:00
|
|
|
#====================================================================================
|
|
|
|
# Check for requirements for building plugins for other languages/enviroments.
|
|
|
|
|
2008-04-01 10:28:59 +00:00
|
|
|
dnl Octave maths environment http://www.octave.org/
|
|
|
|
if test x$cross_compiling = xno ; then
|
2008-10-21 03:47:34 +00:00
|
|
|
if test x$enable_octave = xno ; then
|
2008-10-18 10:36:15 +00:00
|
|
|
AM_CONDITIONAL(BUILD_OCTAVE_MOD, false)
|
2008-10-21 03:47:34 +00:00
|
|
|
else
|
|
|
|
AC_OCTAVE_BUILD
|
2008-10-18 10:36:15 +00:00
|
|
|
fi
|
2008-04-01 10:28:59 +00:00
|
|
|
else
|
|
|
|
AM_CONDITIONAL(BUILD_OCTAVE_MOD, false)
|
|
|
|
fi
|
2007-08-23 11:16:57 +00:00
|
|
|
|
2008-05-21 08:34:47 +00:00
|
|
|
#====================================================================================
|
|
|
|
# Check for Ogg, Vorbis and FLAC.
|
|
|
|
|
|
|
|
HAVE_EXTERNAL_LIBS=0
|
|
|
|
EXTERNAL_CFLAGS=""
|
|
|
|
EXTERNAL_LIBS=""
|
|
|
|
|
2008-05-21 09:18:52 +00:00
|
|
|
# Check for pkg-config outside the if statement.
|
|
|
|
PKG_PROG_PKG_CONFIG
|
2013-02-05 08:44:05 +00:00
|
|
|
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], AC_SUBST([pkgconfigdir], ${libdir}/pkgconfig))
|
2008-05-21 09:18:52 +00:00
|
|
|
|
2011-03-18 07:01:41 +00:00
|
|
|
if test -n "$PKG_CONFIG" ; then
|
2011-03-07 20:04:50 +00:00
|
|
|
if test x$enable_external_libs = xno ; then
|
|
|
|
AC_MSG_WARN([[*** External libs (FLAC, Ogg, Vorbis) disabled. ***]])
|
|
|
|
else
|
|
|
|
PKG_CHECK_MOD_VERSION(FLAC, flac >= 1.2.1, ac_cv_flac=yes, ac_cv_flac=no)
|
2011-03-25 09:42:07 +00:00
|
|
|
|
|
|
|
# Make sure the FLAC_CFLAGS value is sane.
|
2013-02-22 06:34:31 +00:00
|
|
|
FLAC_CFLAGS=`echo $FLAC_CFLAGS | $SED "s|include/FLAC|include|"`
|
2011-03-25 09:42:07 +00:00
|
|
|
|
2011-03-07 20:04:50 +00:00
|
|
|
PKG_CHECK_MOD_VERSION(OGG, ogg >= 1.1.3, ac_cv_ogg=yes, ac_cv_ogg=no)
|
2008-06-02 22:35:06 +00:00
|
|
|
|
2011-07-04 12:01:56 +00:00
|
|
|
if test x$enable_experimental = xyes ; then
|
|
|
|
PKG_CHECK_MOD_VERSION(SPEEX, speex >= 1.2, ac_cv_speex=yes, ac_cv_speex=no)
|
|
|
|
else
|
|
|
|
SPEEX_CFLAGS=""
|
|
|
|
SPEEX_LIBS=""
|
|
|
|
fi
|
|
|
|
|
2011-03-18 07:01:41 +00:00
|
|
|
# Vorbis versions earlier than 1.2.3 have bugs that cause the libsndfile
|
2011-03-07 20:04:50 +00:00
|
|
|
# test suite to fail on MIPS, PowerPC and others.
|
|
|
|
# See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549899
|
|
|
|
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)
|
|
|
|
enable_external_libs=yes
|
|
|
|
fi
|
2008-05-21 08:34:47 +00:00
|
|
|
|
2011-03-30 07:54:48 +00:00
|
|
|
if test x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc = "xyesyesyesyes" ; then
|
2011-03-07 20:04:50 +00:00
|
|
|
HAVE_EXTERNAL_LIBS=1
|
|
|
|
enable_external_libs=yes
|
2008-05-21 09:18:52 +00:00
|
|
|
|
2013-07-13 07:04:45 +00:00
|
|
|
EXTERNAL_CFLAGS="$FLAC_CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS"
|
|
|
|
EXTERNAL_LIBS="$FLAC_LIBS $OGG_LIBS $VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS "
|
2011-03-07 20:04:50 +00:00
|
|
|
else
|
|
|
|
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.]])
|
|
|
|
echo
|
|
|
|
enable_external_libs=no
|
|
|
|
fi
|
2008-05-21 08:34:47 +00:00
|
|
|
fi
|
|
|
|
|
2009-03-01 11:19:38 +00:00
|
|
|
AC_DEFINE_UNQUOTED([HAVE_EXTERNAL_LIBS], $HAVE_EXTERNAL_LIBS, [Will be set to 1 if flac, ogg and vorbis are available.])
|
2008-05-21 08:34:47 +00:00
|
|
|
|
2005-05-17 12:47:23 +00:00
|
|
|
#====================================================================================
|
|
|
|
# Check for libsqlite3 (only used in regtest).
|
|
|
|
|
2005-09-05 08:32:59 +00:00
|
|
|
ac_cv_sqlite3=no
|
2006-03-26 05:36:38 +00:00
|
|
|
if test x$enable_sqlite != xno ; then
|
2008-06-28 23:02:33 +00:00
|
|
|
PKG_CHECK_MOD_VERSION(SQLITE3, sqlite3 >= 3.2, ac_cv_sqlite3=yes, ac_cv_sqlite3=no)
|
2005-06-20 07:01:43 +00:00
|
|
|
fi
|
2005-05-17 12:47:23 +00:00
|
|
|
|
2005-09-05 08:32:59 +00:00
|
|
|
if test x$ac_cv_sqlite3 = "xyes" ; then
|
2005-05-17 12:47:23 +00:00
|
|
|
HAVE_SQLITE3=1
|
|
|
|
else
|
|
|
|
HAVE_SQLITE3=0
|
|
|
|
fi
|
|
|
|
|
2005-09-05 08:32:59 +00:00
|
|
|
AC_DEFINE_UNQUOTED([HAVE_SQLITE3],$HAVE_SQLITE3,[Set to 1 if you have libsqlite3.])
|
|
|
|
|
2004-02-25 05:31:46 +00:00
|
|
|
#====================================================================================
|
|
|
|
# Determine if the processor can do clipping on float to int conversions.
|
|
|
|
|
2006-03-26 05:36:38 +00:00
|
|
|
if test x$enable_cpu_clip != "xno" ; then
|
2009-12-03 07:10:58 +00:00
|
|
|
MN_C_CLIP_MODE
|
2004-02-25 05:31:46 +00:00
|
|
|
else
|
|
|
|
echo "checking processor clipping capabilities... disabled"
|
|
|
|
ac_cv_c_clip_positive=0
|
|
|
|
ac_cv_c_clip_negative=0
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED(CPU_CLIPS_POSITIVE, ${ac_cv_c_clip_positive},
|
|
|
|
[Target processor clips on positive float to int conversion.])
|
|
|
|
AC_DEFINE_UNQUOTED(CPU_CLIPS_NEGATIVE, ${ac_cv_c_clip_negative},
|
|
|
|
[Target processor clips on negative float to int conversion.])
|
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
#====================================================================================
|
|
|
|
# Target OS specific stuff.
|
|
|
|
|
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
|
2005-09-17 07:22:05 +00:00
|
|
|
use_windows_api=0
|
2012-11-30 11:35:29 +00:00
|
|
|
osx_darwin_version=0
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2005-08-16 11:13:32 +00:00
|
|
|
case "$host_os" in
|
2007-05-14 09:55:24 +00:00
|
|
|
darwin* | rhapsody*)
|
2012-11-30 11:35:29 +00:00
|
|
|
osx_darwin_version=$(echo "$host_os" | sed 's/\..*//;s/darwin//g')
|
2012-08-04 08:00:51 +00:00
|
|
|
if test x$HAVE_XCODE_SELECT = xyes ; then
|
|
|
|
developer_path=`xcode-select --print-path`
|
|
|
|
else
|
|
|
|
developer_path="/Developer"
|
|
|
|
fi
|
|
|
|
OS_SPECIFIC_CFLAGS="-I${developer_path}/Headers/FlatCarbon"
|
|
|
|
OS_SPECIFIC_LINKS="-framework CoreAudio -framework AudioToolbox -framework CoreFoundation"
|
2007-05-14 09:55:24 +00:00
|
|
|
;;
|
2005-09-17 07:22:05 +00:00
|
|
|
mingw*)
|
|
|
|
os_is_win32=1
|
|
|
|
use_windows_api=1
|
|
|
|
OS_SPECIFIC_LINKS="-lwinmm"
|
|
|
|
;;
|
2007-05-14 09:55:24 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED(OS_IS_WIN32, ${os_is_win32}, [Set to 1 if compiling for Win32])
|
2005-09-17 07:22:05 +00:00
|
|
|
AC_DEFINE_UNQUOTED(USE_WINDOWS_API, ${use_windows_api}, [Set to 1 to use the native windows API])
|
2012-11-30 11:35:29 +00:00
|
|
|
AC_DEFINE_UNQUOTED(OSX_DARWIN_VERSION, ${osx_darwin_version}, [The darwin version, no-zero is valid])
|
2010-10-10 01:43:08 +00:00
|
|
|
AM_CONDITIONAL(USE_WIN_VERSION_FILE, test ${use_windows_api} -eq 1)
|
|
|
|
|
2004-03-17 08:49:55 +00:00
|
|
|
#====================================================================================
|
|
|
|
# Check for ALSA.
|
|
|
|
|
|
|
|
ALSA_LIBS=""
|
|
|
|
|
2006-03-26 05:36:38 +00:00
|
|
|
if test x$enable_alsa != xno ; then
|
2005-10-07 13:27:53 +00:00
|
|
|
AC_CHECK_HEADERS(alsa/asoundlib.h)
|
|
|
|
if test x$ac_cv_header_alsa_asoundlib_h = xyes ; then
|
|
|
|
ALSA_LIBS="-lasound"
|
2008-05-21 23:19:27 +00:00
|
|
|
enable_alsa=yes
|
2005-10-07 13:27:53 +00:00
|
|
|
fi
|
2004-03-17 08:49:55 +00:00
|
|
|
fi
|
|
|
|
|
2010-01-07 10:01:35 +00:00
|
|
|
#====================================================================================
|
|
|
|
# Check for OpenBSD's sndio.
|
|
|
|
|
|
|
|
SNDIO_LIBS=""
|
|
|
|
AC_CHECK_HEADERS(sndio.h)
|
|
|
|
if test x$ac_cv_header_sndio_h = xyes ; then
|
|
|
|
SNDIO_LIBS="-lsndio"
|
|
|
|
fi
|
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
#====================================================================================
|
|
|
|
# Test for sanity when cross-compiling.
|
|
|
|
|
|
|
|
if test $ac_cv_sizeof_short != 2 ; then
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
AC_MSG_WARN([[*** sizeof (short) != 2. ]])
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test $ac_cv_sizeof_int != 4 ; then
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
AC_MSG_WARN([[*** sizeof (int) != 4 ]])
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test $ac_cv_sizeof_float != 4 ; then
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
AC_MSG_WARN([[*** sizeof (float) != 4. ]])
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test $ac_cv_sizeof_double != 8 ; then
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
AC_MSG_WARN([[*** sizeof (double) != 8. ]])
|
|
|
|
AC_MSG_WARN([[******************************************************************]])
|
|
|
|
fi
|
|
|
|
|
2007-08-23 04:42:06 +00:00
|
|
|
if test x"$ac_cv_prog_HAVE_AUTOGEN" = "xno" ; then
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_MSG_WARN([[Touching files in directory tests/.]])
|
2004-03-03 12:11:18 +00:00
|
|
|
touch tests/*.c tests/*.h
|
2007-05-14 09:55:24 +00:00
|
|
|
fi
|
|
|
|
|
2004-04-25 13:33:04 +00:00
|
|
|
#====================================================================================
|
|
|
|
# Settings for the HTML documentation.
|
|
|
|
|
2006-03-26 05:36:38 +00:00
|
|
|
if test x$enable_bow_docs = "xyes" ; then
|
2004-04-25 13:33:04 +00:00
|
|
|
HTML_BGCOLOUR="white"
|
|
|
|
HTML_FGCOLOUR="black"
|
|
|
|
else
|
|
|
|
HTML_BGCOLOUR="black"
|
|
|
|
HTML_FGCOLOUR="white"
|
|
|
|
fi
|
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
#====================================================================================
|
|
|
|
# Now use the information from the checking stage.
|
|
|
|
|
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
|
|
|
|
2004-02-25 09:01:53 +00:00
|
|
|
if test x$ac_cv_c_compiler_gnu = xyes ; then
|
2009-12-03 07:10:58 +00:00
|
|
|
MN_ADD_CFLAGS(-std=gnu99)
|
2005-09-24 07:11:19 +00:00
|
|
|
|
2009-12-03 07:10:58 +00:00
|
|
|
MN_GCC_VERSION
|
2007-11-05 04:18:42 +00:00
|
|
|
|
|
|
|
if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then
|
|
|
|
AC_MSG_WARN([****************************************************************])
|
|
|
|
AC_MSG_WARN([** GCC version 4.2 warns about the inline keyword for no good **])
|
|
|
|
AC_MSG_WARN([** reason but the maintainers do not see it as a bug. **])
|
|
|
|
AC_MSG_WARN([** See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33995 **])
|
2007-11-17 09:43:40 +00:00
|
|
|
AC_MSG_WARN([** Using -fgnu-inline to avoid this stupidity. **])
|
2007-11-05 04:18:42 +00:00
|
|
|
AC_MSG_WARN([****************************************************************])
|
2009-12-03 07:10:58 +00:00
|
|
|
MN_ADD_CFLAGS([-fgnu89-inline])
|
2007-11-05 04:18:42 +00:00
|
|
|
fi
|
|
|
|
|
2008-11-30 04:06:00 +00:00
|
|
|
CFLAGS="$CFLAGS -Wall"
|
|
|
|
CXXFLAGS="$CXXFLAGS -Wall"
|
|
|
|
|
2009-12-03 07:10:58 +00:00
|
|
|
MN_ADD_CFLAGS([-Wextra])
|
2008-11-30 04:06:00 +00:00
|
|
|
|
|
|
|
AC_LANG_PUSH([C++])
|
2009-12-03 07:10:58 +00:00
|
|
|
MN_ADD_CXXFLAGS([-Wextra])
|
2008-11-30 04:06:00 +00:00
|
|
|
AC_LANG_POP([C++])
|
2005-09-24 01:45:43 +00:00
|
|
|
|
2009-12-03 07:10:58 +00:00
|
|
|
MN_ADD_CFLAGS([-Wdeclaration-after-statement])
|
|
|
|
MN_ADD_CFLAGS([-Wpointer-arith])
|
|
|
|
MN_ADD_CFLAGS([-funsigned-char])
|
2005-09-24 01:45:43 +00:00
|
|
|
|
2013-04-04 10:14:06 +00:00
|
|
|
MN_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
|
2013-06-22 09:32:18 +00:00
|
|
|
|
|
|
|
if test x$enable_stack_smash_protection = "xyes" ; then
|
|
|
|
XIPH_GCC_STACK_PROTECTOR
|
|
|
|
XIPH_GXX_STACK_PROTECTOR
|
|
|
|
fi
|
2013-04-04 10:14:06 +00:00
|
|
|
|
2006-10-15 11:05:45 +00:00
|
|
|
if test x$enable_test_coverage = "xyes" ; then
|
2009-12-03 07:10:58 +00:00
|
|
|
# MN_ADD_CFLAGS([-ftest-coverage])
|
|
|
|
MN_ADD_CFLAGS([-coverage])
|
2006-10-15 11:05:45 +00:00
|
|
|
fi
|
|
|
|
|
2013-09-08 02:45:46 +00:00
|
|
|
CFLAGS="$CFLAGS -Wcast-align -Wcast-qual -Wshadow -Wbad-function-cast -Wwrite-strings -Wundef -Wuninitialized -Winit-self -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Waggregate-return"
|
2013-07-13 07:52:52 +00:00
|
|
|
# -Winline -Wconversion -Wunreachable-code"
|
2013-09-08 02:45:46 +00:00
|
|
|
CXXFLAGS="$CXXFLAGS -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-promo -Wundef -Wuninitialized -Winit-self"
|
2005-09-23 10:02:20 +00:00
|
|
|
|
2006-03-26 05:36:38 +00:00
|
|
|
if test "x$enable_gcc_opt" = "xno" ; then
|
2011-03-22 06:47:01 +00:00
|
|
|
temp_CFLAGS=`echo $CFLAGS | $SED "s/O2/O0/"`
|
2004-02-25 09:01:53 +00:00
|
|
|
CFLAGS=$temp_CFLAGS
|
|
|
|
AC_MSG_WARN([[*** Compiler optimisations switched off. ***]])
|
|
|
|
fi
|
|
|
|
|
|
|
|
# OS specific tweaks.
|
2005-08-16 11:13:32 +00:00
|
|
|
case "$host_os" in
|
2004-02-25 09:01:53 +00:00
|
|
|
darwin* | rhapsody*)
|
|
|
|
# Disable -Wall, -pedantic and -Wshadow for Apple Darwin/Rhapsody.
|
|
|
|
# System headers on these systems are broken.
|
2011-03-22 06:47:01 +00:00
|
|
|
temp_CFLAGS=`echo $CFLAGS | $SED "s/-Wall -pedantic//" | $SED "s/-Wshadow//" | $SED "s/-Waggregate-return//"`
|
2004-02-25 09:01:53 +00:00
|
|
|
CFLAGS=$temp_CFLAGS
|
2013-12-20 08:31:52 +00:00
|
|
|
SHLIB_VERSION_ARG="-Wl,-exported_symbols_list -Wl,\$(builddir)/Symbols.darwin"
|
2004-02-25 09:01:53 +00:00
|
|
|
;;
|
2009-12-15 18:59:49 +00:00
|
|
|
linux*|kfreebsd*-gnu*|gnu*)
|
2013-12-20 08:31:52 +00:00
|
|
|
SHLIB_VERSION_ARG="-Wl,--version-script=\$(builddir)/Symbols.gnu-binutils"
|
2004-02-25 09:01:53 +00:00
|
|
|
;;
|
2006-03-08 22:49:20 +00:00
|
|
|
mingw*)
|
2008-11-10 11:01:59 +00:00
|
|
|
# Linker flag '-Wl,--out-implib' does not work with mingw cross compiler
|
|
|
|
# so we don't use it here.
|
2013-12-20 08:31:52 +00:00
|
|
|
SHLIB_VERSION_ARG="-Wl,\$(builddir)/libsndfile-1.def"
|
2007-04-23 08:23:05 +00:00
|
|
|
win32_target_dll=1
|
|
|
|
if test x"$enable_shared" = xno ; then
|
|
|
|
win32_target_dll=0
|
|
|
|
fi
|
2006-03-08 22:49:20 +00:00
|
|
|
;;
|
2007-11-16 10:16:56 +00:00
|
|
|
os2*)
|
2013-12-20 08:31:52 +00:00
|
|
|
SHLIB_VERSION_ARG="-Wl,-export-symbols \$(builddir)/Symbols.os2"
|
2007-11-16 10:16:56 +00:00
|
|
|
;;
|
2004-02-25 09:01:53 +00:00
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
2006-03-26 05:36:38 +00:00
|
|
|
if test x$enable_gcc_pipe != "xno" ; then
|
2004-02-25 09:01:53 +00:00
|
|
|
CFLAGS="$CFLAGS -pipe"
|
|
|
|
fi
|
|
|
|
|
2007-11-23 23:00:29 +00:00
|
|
|
COMPILER_IS_GCC=1
|
2004-02-25 09:01:53 +00:00
|
|
|
fi
|
|
|
|
|
2013-11-23 00:38:22 +00:00
|
|
|
if test x$enable_werror = "xyes" ; then
|
|
|
|
MN_ADD_CFLAGS([-Werror])
|
|
|
|
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
MN_ADD_CXXFLAGS([-Werror])
|
|
|
|
AC_LANG_POP([C++])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2007-11-23 23:00:29 +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
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
if test x"$CFLAGS" = x ; then
|
|
|
|
echo "Error in configure script. CFLAGS has been screwed up."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2009-09-27 03:32:41 +00:00
|
|
|
HOST_TRIPLET="${host_cpu}-${host_vendor}-${host_os}"
|
|
|
|
|
2013-08-09 23:36:14 +00:00
|
|
|
AC_DEFINE_UNQUOTED([HOST_TRIPLET], "${HOST_TRIPLET}", [The host triplet of the compiled binary.])
|
|
|
|
|
2010-05-07 11:42:14 +00:00
|
|
|
if test "$HOST_TRIPLET" = "x86_64-w64-mingw32" ; then
|
|
|
|
OS_SPECIFIC_LINKS=" -static-libgcc $OS_SPECIFIC_LINKS"
|
|
|
|
fi
|
|
|
|
|
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
|
|
|
|
|
|
|
if test "$enable_static" = no ; then
|
|
|
|
SRC_BINDIR=src/.libs/
|
|
|
|
TEST_BINDIR=tests/.libs/
|
|
|
|
else
|
|
|
|
SRC_BINDIR=src/
|
|
|
|
TEST_BINDIR=tests/
|
|
|
|
fi
|
|
|
|
|
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)
|
|
|
|
AC_SUBST(WIN_RC_VERSION)
|
|
|
|
|
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)
|
2004-03-17 08:49:55 +00:00
|
|
|
AC_SUBST(ALSA_LIBS)
|
2010-01-07 10:01:35 +00:00
|
|
|
AC_SUBST(SNDIO_LIBS)
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2008-05-21 08:34:47 +00:00
|
|
|
AC_SUBST(EXTERNAL_CFLAGS)
|
|
|
|
AC_SUBST(EXTERNAL_LIBS)
|
2013-09-04 11:02:06 +00:00
|
|
|
AC_SUBST(SRC_BINDIR)
|
|
|
|
AC_SUBST(TEST_BINDIR)
|
2008-05-21 08:34:47 +00:00
|
|
|
|
2005-09-23 10:02:20 +00:00
|
|
|
dnl The following line causes the libtool distributed with the source
|
2004-10-05 08:41:31 +00:00
|
|
|
dnl to be replaced if the build system has a more recent version.
|
|
|
|
AC_SUBST(LIBTOOL_DEPS)
|
|
|
|
|
2004-04-25 13:33:04 +00:00
|
|
|
AC_CONFIG_FILES([ \
|
2011-03-25 10:18:23 +00:00
|
|
|
src/Makefile man/Makefile examples/Makefile tests/Makefile regtest/Makefile \
|
|
|
|
M4/Makefile doc/Makefile Win32/Makefile Octave/Makefile programs/Makefile \
|
|
|
|
Makefile \
|
2011-03-25 06:19:11 +00:00
|
|
|
src/version-metadata.rc tests/test_wrapper.sh tests/pedantic-header-test.sh \
|
2013-09-08 03:06:33 +00:00
|
|
|
doc/libsndfile.css Scripts/build-test-tarball.mk libsndfile.spec sndfile.pc \
|
2011-03-25 06:19:11 +00:00
|
|
|
src/sndfile.h \
|
2013-04-07 10:30:40 +00:00
|
|
|
echo-install-dirs
|
2007-04-30 12:03:05 +00:00
|
|
|
])
|
2007-05-14 09:55:24 +00:00
|
|
|
AC_OUTPUT
|
|
|
|
|
2009-09-27 03:32:41 +00:00
|
|
|
# Make sure these are executable.
|
2013-04-07 10:30:40 +00:00
|
|
|
chmod u+x tests/test_wrapper.sh build-test-tarball.mk echo-install-dirs
|
2009-02-10 22:31:36 +00:00
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
#====================================================================================
|
|
|
|
|
|
|
|
AC_MSG_RESULT([
|
|
|
|
-=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-
|
|
|
|
|
|
|
|
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}
|
|
|
|
|
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}
|
|
|
|
External FLAC/Ogg/Vorbis : ............ ${enable_external_libs:-no}
|
2007-05-14 09:55:24 +00:00
|
|
|
])
|
|
|
|
|
2010-12-28 11:36:15 +00:00
|
|
|
if test -z "$PKG_CONFIG" ; then
|
2011-03-07 20:04:50 +00:00
|
|
|
echo " *****************************************************************"
|
|
|
|
echo " *** The pkg-config program is missing. ***"
|
|
|
|
echo " *** External FLAC/Ogg/Vorbis libs cannot be found without it. ***"
|
|
|
|
echo " *** http://pkg-config.freedesktop.org/wiki/ ***"
|
|
|
|
echo " *****************************************************************"
|
2010-12-28 11:36:15 +00:00
|
|
|
echo
|
|
|
|
fi
|
2009-09-27 03:32:41 +00:00
|
|
|
|
2013-11-01 04:58:40 +00:00
|
|
|
echo " Tools :"
|
|
|
|
echo
|
2013-11-23 00:43:56 +00:00
|
|
|
echo " Compiler is Clang : ................... ${mn_cv_c_compiler_clang}"
|
2013-11-01 04:58:40 +00:00
|
|
|
echo " Compiler is GCC : ..................... ${ac_cv_c_compiler_gnu}"
|
|
|
|
|
2007-05-14 09:55:24 +00:00
|
|
|
if test x$ac_cv_c_compiler_gnu = xyes ; then
|
2008-05-21 23:19:27 +00:00
|
|
|
echo " GCC version : ......................... ${GCC_VERSION}"
|
2007-05-14 09:55:24 +00:00
|
|
|
if test $GCC_MAJOR_VERSION -lt 3 ; then
|
2011-03-15 11:24:19 +00:00
|
|
|
echo "\n"
|
|
|
|
echo " ** This compiler version allows applications to write"
|
2007-05-14 09:55:24 +00:00
|
|
|
echo " ** to static strings within the library."
|
2007-11-29 10:30:35 +00:00
|
|
|
echo " ** Compile with GCC version 3.X or above to avoid this problem."
|
2007-05-14 09:55:24 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2013-04-07 10:30:40 +00:00
|
|
|
./echo-install-dirs
|
2007-05-14 09:55:24 +00:00
|
|
|
|
2013-09-08 02:44:06 +00:00
|
|
|
# Remove symlink created by Scripts/android-configure.sh.
|
|
|
|
test -h gdbclient && rm -f gdbclient
|
|
|
|
|
2008-04-16 23:37:22 +00:00
|
|
|
(cd src && make genfiles)
|
|
|
|
(cd tests && make genfiles)
|