mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 15:49:41 +02:00
Rob Sykes patch to make libsoxr build for Audacity
This commit is contained in:
parent
2416f94980
commit
a7df83f27d
34
configure.in
34
configure.in
@ -339,16 +339,15 @@ dnl-------------------------------------------------------------
|
||||
dnl Optional library support. Lots of things we could use, but
|
||||
dnl can do without if they aren't available.
|
||||
dnl-------------------------------------------------------------
|
||||
dnl LIBRARIES="LIBVORBIS LIBMAD LIBSNDFILE LIBFLAC LIBID3TAG LIBSAMPLERATE LIBRESAMPLE LIBSBSMS LIBSOUNDTOUCH LIBNYQUIST LIBVAMP LIBEXPAT LIBTWOLAME FFMPEG LIBLRDF SLV2 REDLAND PORTSMF TAGLIB"
|
||||
dnl LIBRARIES="LIBVORBIS LIBMAD LIBSNDFILE LIBFLAC LIBID3TAG LIBSOXR LIBSBSMS LIBSOUNDTOUCH LIBNYQUIST LIBVAMP LIBEXPAT LIBTWOLAME FFMPEG LIBLRDF SLV2 REDLAND PORTSMF TAGLIB"
|
||||
dnl disable plugin categorisation and LV2 libs for 1.3.7 release
|
||||
LIBRARIES="LIBVORBIS LIBMAD LIBSNDFILE LIBFLAC LIBID3TAG LIBSAMPLERATE LIBRESAMPLE LIBSBSMS LIBSOUNDTOUCH LIBNYQUIST LIBVAMP LIBEXPAT LIBTWOLAME FFMPEG PORTSMF PORTAUDIO LAME"
|
||||
LIBRARIES="LIBVORBIS LIBMAD LIBSNDFILE LIBFLAC LIBID3TAG LIBSOXR LIBSBSMS LIBSOUNDTOUCH LIBNYQUIST LIBVAMP LIBEXPAT LIBTWOLAME FFMPEG PORTSMF PORTAUDIO LAME"
|
||||
|
||||
AC_MSG_NOTICE([Determining what libraries are available in this tree and on the system])
|
||||
|
||||
AUDACITY_CHECKLIB_LIBSNDFILE
|
||||
AUDACITY_CHECKLIB_LIBSOXR
|
||||
AUDACITY_CHECKLIB_LIBEXPAT
|
||||
AUDACITY_CHECKLIB_LIBSAMPLERATE
|
||||
AUDACITY_CHECKLIB_LIBRESAMPLE
|
||||
AUDACITY_CHECKLIB_LIBVORBIS
|
||||
AUDACITY_CHECKLIB_LIBMAD
|
||||
AUDACITY_CHECKLIB_LIBFLAC
|
||||
@ -419,7 +418,6 @@ done
|
||||
|
||||
# In some cases the choices made above might be inappropriate.
|
||||
# * we need to have libsndfile one way or another
|
||||
# * we can only use one of libsamplerate and libresample
|
||||
# * we should not use the local Redland if we're not using local SLV2 or
|
||||
# liblrdf
|
||||
|
||||
@ -439,32 +437,6 @@ if test "$PORTAUDIO_USE_LOCAL" != "yes" && test "$PORTAUDIO_USE_SYSTEM" != "yes"
|
||||
AC_MSG_ERROR([Audacity requires portaudio to be enabled])
|
||||
fi
|
||||
|
||||
dnl we can only have one sample rate conversion library used.
|
||||
dnl by now we will have both enabled if they are present, regardless of whether
|
||||
dnl they were requested, unless one was specifically disabled.
|
||||
dnl we would like to honour requests at this stage, so need to know about
|
||||
dnl the original options, not just which LIB_USE variables have been set.
|
||||
if ( test "$LIBRESAMPLE_USE_LOCAL" = "yes" || test "$LIBRESAMPLE_USE_SYSTEM" = "yes") && ( test "$LIBSAMPLERATE_USE_LOCAL" = "yes" || test "$LIBSAMPLERATE_USE_SYSTEM" = "yes"); then
|
||||
dnl if we get here, both libraries are available to us.
|
||||
AC_MSG_NOTICE([Both libresample and libsamplerate are available])
|
||||
AC_MSG_NOTICE([deciding which to use based on arguments ...])
|
||||
if test x"$LIBSAMPLERATE_ARGUMENT" = x"unspecified" ; then
|
||||
dnl they didn't ask for libsamplerate, they don't get it
|
||||
LIBSAMPLERATE_USE_LOCAL="no"
|
||||
LIBSAMPLERATE_USE_SYSTEM="no"
|
||||
dnl done - we are using libresample
|
||||
AC_MSG_NOTICE([Libsamplerate not explicity requested, using libresample])
|
||||
else
|
||||
dnl if we get here, then libsample rate has been explicity specified.
|
||||
dnl could that be disabling it? No, because it wouldn't then have been
|
||||
dnl enabled above.
|
||||
LIBRESAMPLE_USE_LOCAL="no"
|
||||
LIBRESAMPLE_USE_SYSTEM="no"
|
||||
dnl done - we are using libsamplerate
|
||||
AC_MSG_NOTICE([Using libsamplerate as requested])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl if ( test "$SLV2_USE_LOCAL" != "yes" && test "$LIBLRDF_USE_LOCAL" != "yes") && test "$REDLAND_USE_LOCAL" = "yes" ; then
|
||||
dnl AC_MSG_NOTICE([Not building local Redland library since we don't use the local SLV2 or liblrdf libraries])
|
||||
dnl REDLAND_USE_LOCAL=no
|
||||
|
@ -100,18 +100,13 @@ libid3tag-recursive:
|
||||
libid3tag.a: libid3tag-recursive
|
||||
ln -sf libid3tag/.libs/libid3tag.a libid3tag.a
|
||||
|
||||
# libsamplerate
|
||||
libsamplerate-recursive:
|
||||
$(MAKE) -C libsamplerate
|
||||
libsamplerate.a: libsamplerate-recursive
|
||||
ln -sf libsamplerate/src/.libs/libsamplerate.a libsamplerate.a
|
||||
|
||||
# libresample
|
||||
libresample-recursive:
|
||||
$(MAKE) -C libresample libresample.a
|
||||
libresample.a: libresample-recursive
|
||||
ln -sf libresample/libresample.a libresample.a
|
||||
|
||||
# libsoxr
|
||||
libsoxr-recursive:
|
||||
$(MAKE) -C libsoxr
|
||||
libsoxr.a: libsoxr-recursive
|
||||
ln -sf libsoxr/src/libsoxr.a
|
||||
libsoxr-lsr.a: libsoxr-recursive
|
||||
ln -sf libsoxr/src/libsoxr-lsr.a
|
||||
|
||||
# libsndfile
|
||||
libsndfile-recursive:
|
||||
@ -165,7 +160,7 @@ clean:
|
||||
-$(MAKE) -C libnyquist clean
|
||||
-$(MAKE) -C liblrdf clean
|
||||
-$(MAKE) -C libogg clean
|
||||
-$(MAKE) -C libsamplerate clean
|
||||
-$(MAKE) -C libsoxr clean
|
||||
-$(MAKE) -C libresample clean
|
||||
-$(MAKE) -C libsndfile clean
|
||||
-$(MAKE) -C libvamp clean
|
||||
@ -188,7 +183,7 @@ distclean:
|
||||
-$(MAKE) -C libnyquist distclean
|
||||
-$(MAKE) -C liblrdf distclean
|
||||
-$(MAKE) -C libogg distclean
|
||||
-$(MAKE) -C libsamplerate distclean
|
||||
-$(MAKE) -C libsoxr distclean
|
||||
-$(MAKE) -C libresample distclean
|
||||
-$(MAKE) -C libsndfile distclean
|
||||
-$(MAKE) -C libvamp distclean
|
||||
@ -207,7 +202,7 @@ distclean:
|
||||
widgetextra libogg-recursive \
|
||||
libvorbis-recursive libnyquist-recursive libmad-recursive \
|
||||
libid3tag-recursive sbsms-recursive soundtouch-recursive libsndfile-recursive \
|
||||
libresample-recursive libsamplerate-recursive vamp-sdk \
|
||||
libresample-recursive libsoxr-recursive vamp-sdk \
|
||||
portaudio-v19-recursive portmixer-recursive libtwolame-recursive \
|
||||
liblrdf-recursive redland-recursive slv2-recursive
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
dnl Add Audacity license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libresample.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBRESAMPLE], [
|
||||
|
||||
AC_ARG_WITH(libresample,
|
||||
[AS_HELP_STRING([--with-libresample],
|
||||
[use libresample for sample rate conversion: [yes,no]])],
|
||||
LIBRESAMPLE_ARGUMENT=$withval,
|
||||
LIBRESAMPLE_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_LIBRESAMPLE, 1,
|
||||
[Define if libresample support should be enabled])
|
||||
fi
|
||||
|
||||
dnl see if libresample is installed on the system
|
||||
|
||||
dnl ... but libresample isn't generally installed as a system library...
|
||||
|
||||
LIBRESAMPLE_SYSTEM_AVAILABLE="no"
|
||||
|
||||
dnl see if libresample is available locally
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libresample/include/libresample.h,
|
||||
resample_h_found="yes",
|
||||
resample_h_found="no")
|
||||
|
||||
if test "x$resample_h_found" = "xyes" ; then
|
||||
LIBRESAMPLE_LOCAL_AVAILABLE="yes"
|
||||
LIBRESAMPLE_LOCAL_LIBS="libresample.a"
|
||||
LIBRESAMPLE_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libresample/include'
|
||||
LIBRESAMPLE_LOCAL_CPPSYMBOLS="USE_LIBRESAMPLE"
|
||||
|
||||
if test ! -f lib-src/libresample/Makefile ; then
|
||||
LIBRESAMPLE_LOCAL_CONFIG_SUBDIRS="lib-src/libresample"
|
||||
fi
|
||||
AC_MSG_NOTICE([libresample libraries are available in the local tree])
|
||||
else
|
||||
LIBRESAMPLE_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([libresample libraries are NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
@ -1,57 +0,0 @@
|
||||
dnl Add Audacity / libsamplerate license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libsamplerate.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBSAMPLERATE], [
|
||||
|
||||
AC_ARG_WITH(libsamplerate,
|
||||
[AS_HELP_STRING([--with-libsamplerate],
|
||||
[use libsamplerate instead of libresample for sample rate conversion. Do not use in conjunction with VST plug-in support!])],
|
||||
LIBSAMPLERATE_ARGUMENT=$withval,
|
||||
LIBSAMPLERATE_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_LIBSAMPLERATE, 1,
|
||||
[Define if libsamplerate support should be enabled])
|
||||
fi
|
||||
|
||||
dnl see if libsamplerate is installed on the system
|
||||
|
||||
PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.1.2,
|
||||
samplerate_available_system="yes",
|
||||
samplerate_available_system="no")
|
||||
|
||||
if test "x$samplerate_available_system" = "xyes" ; then
|
||||
LIBSAMPLERATE_SYSTEM_AVAILABLE="yes"
|
||||
LIBSAMPLERATE_SYSTEM_LIBS=$SAMPLERATE_LIBS
|
||||
LIBSAMPLERATE_SYSTEM_CXXFLAGS=$SAMPLERATE_CFLAGS
|
||||
LIBSAMPLERATE_SYSTEM_CPPSYMBOLS="USE_LIBSAMPLERATE"
|
||||
AC_MSG_NOTICE([Libsamplerate libraries are available as system libraries])
|
||||
else
|
||||
LIBSAMPLERATE_SYSTEM_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([Libsamplerate libraries are NOT available as system libraries])
|
||||
fi
|
||||
|
||||
dnl see if libsamplerate is available in the local tree
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libsamplerate/src/samplerate.h,
|
||||
samplerate_h_found="yes",
|
||||
samplerate_h_found="no")
|
||||
|
||||
if test "x$samplerate_h_found" = "xyes" ; then
|
||||
LIBSAMPLERATE_LOCAL_AVAILABLE="yes"
|
||||
LIBSAMPLERATE_LOCAL_LIBS="libsamplerate.a"
|
||||
LIBSAMPLERATE_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libsamplerate/src'
|
||||
LIBSAMPLERATE_LOCAL_CPPSYMBOLS="USE_LIBSAMPLERATE"
|
||||
|
||||
if test ! -f lib-src/libsamplerate/Makefile ; then
|
||||
LIBSAMPLERATE_LOCAL_CONFIG_SUBDIRS="lib-src/libsamplerate"
|
||||
fi
|
||||
AC_MSG_NOTICE([libsamplerate libraries are available in the local tree])
|
||||
else
|
||||
LIBSAMPLERATE_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([libsamplerate libraries are NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
50
m4/audacity_checklib_libsoxr.m4
Normal file
50
m4/audacity_checklib_libsoxr.m4
Normal file
@ -0,0 +1,50 @@
|
||||
dnl Add Audacity license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libsoxr.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBSOXR], [
|
||||
|
||||
AC_ARG_WITH(libsoxr,
|
||||
[AS_HELP_STRING([--with-libsoxr],
|
||||
[use libsoxr for sample rate conversion: [yes,no]])],
|
||||
LIBSOXR_ARGUMENT=$withval,
|
||||
LIBSOXR_ARGUMENT="unspecified")
|
||||
|
||||
if true ; then
|
||||
AC_DEFINE(USE_LIBSOXR, 1,
|
||||
[Define if libsoxr support should be enabled])
|
||||
fi
|
||||
|
||||
dnl see if libsoxr is installed on the system
|
||||
|
||||
dnl ... but libsoxr isn't yet generally installed as a system library...
|
||||
|
||||
LIBSOXR_SYSTEM_AVAILABLE="no"
|
||||
|
||||
dnl see if libsoxr is available locally
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libsoxr/src/soxr-lsr.h,
|
||||
soxr_h_found="yes",
|
||||
soxr_h_found="no")
|
||||
|
||||
if test "x$soxr_h_found" = "xyes" ; then
|
||||
LIBSOXR_LOCAL_AVAILABLE="yes"
|
||||
LIBSOXR_LOCAL_LIBS="libsoxr-lsr.a libsoxr.a"
|
||||
LIBSOXR_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libsoxr/src'
|
||||
LIBSOXR_LOCAL_CPPSYMBOLS="USE_LIBSOXR"
|
||||
|
||||
if test ! -f lib-src/libsoxr/Makefile ; then
|
||||
LIBSOXR_LOCAL_CONFIG_SUBDIRS="lib-src/libsoxr"
|
||||
|
||||
# Breaks other other libraries in Audacity tree; but why is ./configure
|
||||
# passing options specific to this library to other libraries?
|
||||
#LIBSOXR_LOCAL_CONFIGURE_ARGS="\"-DBUILD_SHARED_LIBS=OFF -DWITH_OPENMP=OFF\""
|
||||
fi
|
||||
AC_MSG_NOTICE([libsoxr libraries are available in the local tree])
|
||||
else
|
||||
LIBSOXR_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([libsoxr libraries are NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
@ -102,11 +102,8 @@
|
||||
/* Define if mp3 support is implemented with the libmad library */
|
||||
#undef USE_LIBMAD
|
||||
|
||||
/* Define if libresample support should be enabled */
|
||||
#undef USE_LIBRESAMPLE
|
||||
|
||||
/* Define if libsamplerate support should be enabled */
|
||||
#undef USE_LIBSAMPLERATE
|
||||
/* Define if libsoxr support should be enabled */
|
||||
#undef USE_LIBSOXR
|
||||
|
||||
/* Define if libtwolame (MP2 export) support should be enabled */
|
||||
#undef USE_LIBTWOLAME
|
||||
|
Loading…
x
Reference in New Issue
Block a user