1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-12 07:35:51 +01:00

SBSMS library/effect changes. Apparently resolves bug #170. Incorporated optimizations with minor quality changes. Returned optimization flags to build (introduced in a patch). The audacity SBSMS branch is now a trimmed down version without associated programs. Includes (untested) changes to the windows .vcproj.

This commit is contained in:
clayton.otey@gmail.com
2010-06-07 06:41:32 +00:00
parent e628adb922
commit 299c327a71
65 changed files with 3055 additions and 10326 deletions

View File

@@ -52,10 +52,10 @@ CFLAGS="$cflags_save"
CPPFLAGS="$cppflags_save"
CXXFLAGS="$cxxflags_save"
AC_CHECK_FUNCS(malloc calloc free memcpy)
AC_CHECK_FUNCS(malloc calloc free memcpy memmove)
AC_CHECK_LIB([m],floor)
AC_CHECK_FUNCS(floor sqrt log)
AC_CHECK_FUNCS(floor sqrt log exp sin cos)
AC_C99_FUNC_LRINT()
AC_C99_FUNC_LRINTF()
@@ -63,88 +63,18 @@ AC_C99_FUNC_LRINTF()
AC_SUBST(SHLIB_VERSION_ARG)
AC_SUBST(SHARED_VERSION_INFO)
SBSMS_EXTRA_OBJ=""
SBSMS_BIN=""
AC_ARG_ENABLE(universal_binary,[ --enable-universal_binary enable universal binary build: (default: disable)],[enable_universal_binary=$enableval],[enable_universal_binary=no])
AC_ARG_ENABLE(static,[ --enable-static enable static build: (default: disable)],[enable_static=$enableval],[enable_static=no])
AC_ARG_ENABLE(multithreaded,[ --enable-multithreaded enable multithreaded build: (default: disable)],[enable_multithreaded=$enableval],[enable_multithreaded=no])
AC_ARG_ENABLE(debug,[ --enable-debug enable debug build: (default: disable)],[enable_debug=$enableval],[enable_debug=no])
AC_ARG_ENABLE(sndfile,[ --enable-sndfile enable sndfile support: (default: disable)],[enable_sndfile=$enableval],[enable_sndfile=no])
SBSMS_CFLAGS="-ffast-math -fstrict-aliasing"
AC_ARG_ENABLE(mp3,[ --enable-mp3 enable mp3 support (default: disable)],[enable_mp3=$enableval],[enable_mp3=no])
AC_ARG_ENABLE(portaudio,[ --enable-portaudio enable portaudio support: (default: disable)],[enable_portaudio=$enableval],[enable_portaudio=no])
AC_ARG_ENABLE(wx,[ --enable-wx enable wxWidgets support (default: disable)],[enable_wx=$enableval],[enable_wx=no])
AC_ARG_ENABLE(programs,[ --enable-programs Build SBSMS programs as well as library (default: enable)],[enable_progs=$enableval],[enable_progs=yes])
if test x$enable_mp3 = xyes; then
enable_sndfile=yes;
AC_CHECK_LIB(mad,mad_stream_init,[mad_libs="-lmad"; SBSMS_EXTRA_OBJ="mp3.lo mp3tech.lo audiobuffer.lo"; use_libmad=yes],[echo "Sorry, you need libmad for mp3 support. Install libmad or ./configure --disable-mp3"; exit -1])
if test x$use_libmad = xyes; then
if test x$MAD_LIBS = x; then
MAD_LIBS=$mad_libs
fi
AC_SUBST(MAD_LIBS)
AC_DEFINE(HAVE_MAD,1,[Define to use libmad])
fi
else
MAD_LIBS=""
fi
AM_CONDITIONAL(ENABLE_MP3, test x$enable_mp3 = xyes)
PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2, ac_cv_sndfile=1, ac_cv_sndfile=0)
if test x$enable_sndfile = xyes; then
# check for presence of libsndfile
if test "$ac_cv_sndfile" = "0"; then
echo "Sorry, you need libsndfile to --enable-sndfile. Install libsndfile or --disable-sndfile"
exit -1;
else
AC_SUBST(SNDFILE_CFLAGS)
AC_SUBST(SNDFILE_LIBS)
AC_DEFINE(HAVE_SNDFILE,1,[Define to use libsndfile])
fi
else
SNDFILE_LIBS=""
fi
AM_CONDITIONAL(ENABLE_SNDFILE, test x$enable_sndfile = xyes)
PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= 0.0.19, ac_cv_portaudio=1, ac_cv_portaudio=0)
if test x$enable_portaudio = xyes; then
# check for presence of libportaudio
if test "$ac_cv_portaudio" = "0"; then
echo "Sorry, you need libportaudio-2.0 to --enable-portaudio. Install libportaudio or --disable-portaudio"
exit -1;
else
AC_SUBST(PORTAUDIO_CFLAGS)
AC_SUBST(PORTAUDIO_LIBS)
AC_DEFINE(HAVE_PORTAUDIO,1,[Define to use libportaudio])
fi
else
PORTAUDIO_LIBS=""
fi
AM_CONDITIONAL(ENABLE_PORTAUDIO, test x$enable_portaudio = xyes)
# legitimately we can add -g to flags for debug builds, because they won't
# be much use otherwise
if test x$enable_debug = xyes; then
CXXFLAGS="$CXXFLAGS -g"
fi
if test x$enable_static = xyes; then
CXXFLAGS="$CXXFLAGS"
else
case "$target_os" in
if test x$enable_static = xno; then
case "$target_os" in
darwin*)
CXXFLAGS="$CXXFLAGS -mdynamic-no-pic"
SBSMS_CFLAGS="$SBSMS_CLFAGS -mdynamic-no-pic"
;;
*)
;;
@@ -154,13 +84,11 @@ fi
if test x$enable_universal_binary = xyes; then
case "$target_os" in
darwin*)
CXXFLAGS="$CXXFLAGS -mmacosx-version-min=10.4 -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
SBSMS_CFLAGS="$SBSMS_CFLAGS -mmacosx-version-min=10.4 -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
;;
*)
;;
esac
else
CXXFLAGS="$CXXFLAGS"
fi
case "$target_os" in
@@ -172,77 +100,15 @@ case "$target_os" in
;;
esac
AC_SUBST(SBSMS_BIN)
if test x$enable_wx = xyes; then
wxconfigargs=""
if test x$enable_static = xyes; then
wxconfigargs="$wxconfigargs --static=yes"
else
wxconfigargs="$wxconfigargs --static=no"
fi
if test x$enable_debug = xyes; then
wxconfigargs="$wxconfigargs --debug=yes"
else
wxconfigargs="$wxconfigargs --debug=no"
fi
AC_PATH_PROG(WX_CONFIG, wx-config, no, $PATH:/usr/local/bin )
if [[ "$WX_CONFIG" = "no" ]] ; then
AC_MSG_ERROR("Could not find wx-config: is wxWidgets installed? is wx-config in your path?")
fi
AC_MSG_NOTICE([Checking that the chosen version of wxWidgets is 2.8.x])
wx_version=`${WX_CONFIG} --version`
case "${wx_version}" in
2.8.*)
echo "Great, you're using wxWidgets ${wx_version}!"
;;
*)
wx_list=`${WX_CONFIG} --list`
AC_MSG_ERROR([Unable to locate a suitable configuration of wxWidgets v2.8.x or higher.
The currently available configurations are listed below. If necessary, either
install the package for your distribution or download the latest version of
wxWidgets from http://wxwidgets.org. ${wx_list}])
esac
WX_LIBS="`$WX_CONFIG $wxconfigargs --libs`"
WX_CFLAGS="`$WX_CONFIG $wxconfigargs --cxxflags`"
AC_SUBST(WX_LIBS)
AC_SUBST(WX_CFLAGS)
fi
AM_CONDITIONAL(ENABLE_WX, test x$enable_wx = xyes)
AM_CONDITIONAL(MACOSX, test "$macosx" = "yes")
if test x$enable_progs = xyes; then
# we would like programs, so work out which ones can be built
# sbsms can always be built (doesn't need optional libs)
SBSMS_PROGS="sbsms"
if test x$enable_portaudio = xyes; then
# portaudio available, build sbsmsplay
SBSMS_PROGS="$SBSMS_PROGS sbsmsplay"
if test x$enable_wx = xyes; then
# wx available, build wxsbsmsplayer
SBSMS_PROGS="$SBSMS_PROGS wxsbsmsplayer"
fi
fi
if test x$enable_debug = xyes; then
SBSMS_CFLAGS="$SBSMS_CFLAGS -g"
else
# no progs please
SBSMS_PROGS=""
SBSMS_CFLAGS="$SBSMS_CFLAGS -O3"
fi
AC_SUBST(SBSMS_PROGS)
AC_SUBST(SBSMS_CFLAGS)
if test x$enable_multithreaded = xyes; then
AC_DEFINE(MULTITHREADED,1,[Define to compile multithreaded sbsms])
fi
AM_INIT_AUTOMAKE([])
AM_INIT_AUTOMAKE(libsbsms, "$LIBSBSMS_RELEASE_MAJOR.$LIBSBSMS_RELEASE_MINOR.$LIBSBSMS_RELEASE_BUILD")
dnl Audacity policy: don't enable automatic rebuild of configure et al if
dnl sources change
AM_MAINTAINER_MODE([enabled])
AC_CONFIG_FILES([Makefile src/Makefile libsbsms.spec sbsms.pc])