1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 16:43:33 +02:00

Use Automake for Audacity.

This commit is contained in:
benjamin.drung@gmail.com
2013-11-20 02:51:42 +00:00
parent bf060403ce
commit a19b6f25ae
36 changed files with 2658 additions and 590 deletions

View File

@@ -1,7 +1,7 @@
dnl Todo: add Vamp / 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_libvamp.m4 serial 2
# audacity_checklib_libvamp.m4 serial 3
dnl Check for system copy of libvamp we can use for Vamp plug-in support
AC_DEFUN([AUDACITY_CHECKLIB_LIBVAMP], [
@@ -11,60 +11,47 @@ AC_DEFUN([AUDACITY_CHECKLIB_LIBVAMP], [
LIBVAMP_ARGUMENT=$withval,
LIBVAMP_ARGUMENT="unspecified")
if false ; then
AC_DEFINE(USE_VAMP, 1,
[Define if Vamp analysis plugin support should be enabled])
fi
dnl System may include Vamp headers and library, though we prefer local ones
PKG_CHECK_MODULES(VAMP, vamp-hostsdk >= 2.0,
vamp_available_system="yes",
vamp_available_system="no")
LIBVAMP_SYSTEM_AVAILABLE="yes",
LIBVAMP_SYSTEM_AVAILABLE="no")
if test "x$vamp_available_system" = "xyes" ; then
LIBVAMP_SYSTEM_AVAILABLE="yes"
LIBVAMP_SYSTEM_LIBS=$VAMP_LIBS
LIBVAMP_SYSTEM_CXXFLAGS=$VAMP_CFLAGS
dnl still need these local objects for the support in audacity
LIBVAMP_SYSTEM_OPTOBJS="effects/vamp/VampEffect.o effects/vamp/LoadVamp.o"
LIBVAMP_SYSTEM_CPPSYMBOLS="USE_VAMP"
if test "$LIBVAMP_SYSTEM_AVAILABLE" = "yes"; then
AC_MSG_NOTICE([Vamp libraries are available as system libraries])
else
LIBVAMP_SYSTEM_AVAILABLE="no"
AC_MSG_NOTICE([Vamp libraries are NOT available as system libraries])
fi
dnl see if Vamp is available locally
AC_CHECK_FILE(${srcdir}/lib-src/libvamp/vamp-hostsdk/PluginLoader.h,
vamp_h_found="yes",
vamp_h_found="no")
LIBVAMP_LOCAL_AVAILABLE="yes",
LIBVAMP_LOCAL_AVAILABLE="no")
if test "x$vamp_h_found" = "xyes" ; then
LIBVAMP_LOCAL_AVAILABLE="yes"
dnl Add vamp to the list of things to build in lib-src
LIBVAMP_LOCAL_BUILD="vamp-sdk"
dnl compiler and linker flags
LIBVAMP_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libvamp'
LIBVAMP_LOCAL_LIBS="libvamp-hostsdk.a"
dnl add some extra object files we can build
LIBVAMP_LOCAL_OPTOBJS="effects/vamp/VampEffect.o effects/vamp/LoadVamp.o"
dnl define a pre-processor symbol to tell other code that the vamp host
dnl SDK is available
LIBVAMP_LOCAL_CPPSYMBOLS="USE_VAMP"
dnl do not build programs we don't need
if test "$LIBVAMP_LOCAL_AVAILABLE" = "yes"; then
LIBVAMP_LOCAL_CONFIGURE_ARGS="--disable-programs"
AC_MSG_NOTICE([Vamp libraries are available in the local tree])
else
LIBVAMP_LOCAL_AVAILABLE="no"
AC_MSG_NOTICE([Vamp libraries are NOT available in the local tree])
fi
])
AC_DEFUN([AUDACITY_CONFIG_SUBDIRS_LIBVAMP], [
AC_DEFUN([AUDACITY_CONFIG_LIBVAMP], [
if test "$LIBVAMP_USE_LOCAL" = yes; then
VAMP_CFLAGS='-I$(top_srcdir)/lib-src/libvamp'
VAMP_LIBS='$(top_builddir)/lib-src/libvamp/libvamp-hostsdk.a'
AC_CONFIG_SUBDIRS([lib-src/libvamp])
fi
AC_SUBST([VAMP_CFLAGS])
AC_SUBST([VAMP_LIBS])
AM_CONDITIONAL([USE_VAMP], [test "$LIBVAMP_USE_LOCAL" = yes -o "$LIBVAMP_USE_SYSTEM" = yes])
AM_CONDITIONAL([USE_LOCAL_VAMP], [test "$LIBVAMP_USE_LOCAL" = yes])
if test "$LIBVAMP_USE_LOCAL" = yes -o "$LIBVAMP_USE_SYSTEM" = yes; then
AC_DEFINE(USE_VAMP, 1,
[Define if Vamp analysis plugin support should be enabled])
fi
])