1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-10 06:37:06 +01: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,17 +1,9 @@
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 2
# audacity_checklib_libsoxr.m4 serial 3
AC_DEFUN([AUDACITY_CHECKLIB_LIBSOXR], [
dnl These four lines are never executed, but they document the USE_LIBSOXR
dnl pre-processor directive (for configunix.h etc)
if false ; then
AC_DEFINE(USE_LIBSOXR, 1,
[Define if libsoxr support should be enabled])
fi
AC_ARG_WITH(libsoxr,
[AS_HELP_STRING([--with-libsoxr],
[use libsoxr for sample rate conversion])],
@@ -22,44 +14,46 @@ AC_DEFUN([AUDACITY_CHECKLIB_LIBSOXR], [
dnl more recent)
PKG_CHECK_MODULES(SOXR, soxr >= 0.0.5,
soxr_available_system="yes",
soxr_available_system="no")
LIBSOXR_SYSTEM_AVAILABLE="yes",
LIBSOXR_SYSTEM_AVAILABLE="no")
if test "x$soxr_available_system" = "xyes" ; then
LIBSOXR_SYSTEM_AVAILABLE="yes"
LIBSOXR_SYSTEM_LIBS=$SOXR_LIBS
LIBSOXR_SYSTEM_CXXFLAGS=$SOXR_CFLAGS
LIBSOXR_SYSTEM_CPPSYMBOLS="USE_LIBSOXR"
if test "$LIBSOXR_SYSTEM_AVAILABLE" = "yes"; then
AC_MSG_NOTICE([Soxr libraries are available as system libraries])
else
LIBSOXR_SYSTEM_AVAILABLE="no"
AC_MSG_NOTICE([Soxr libraries are NOT available as system libraries])
fi
dnl see if libsoxr is available locally
AC_CHECK_FILE(${srcdir}/lib-src/libsoxr/src/soxr.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.a"
LIBSOXR_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libsoxr/src'
LIBSOXR_LOCAL_CPPSYMBOLS="USE_LIBSOXR"
LIBSOXR_LOCAL_AVAILABLE="yes",
LIBSOXR_LOCAL_AVAILABLE="no")
if test "$LIBSOXR_LOCAL_AVAILABLE" = "yes"; then
# 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\""
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
])
AC_DEFUN([AUDACITY_CONFIG_SUBDIRS_LIBSOXR], [
AC_DEFUN([AUDACITY_CONFIG_LIBSOXR], [
if test "$LIBSOXR_USE_LOCAL" = yes; then
SOXR_CFLAGS='-I$(top_srcdir)/lib-src/libsoxr/src'
SOXR_LIBS='$(top_builddir)/lib-src/libsoxr/src/libsoxr.a'
AC_CONFIG_SUBDIRS([lib-src/libsoxr])
fi
AC_SUBST([SOXR_CFLAGS])
AC_SUBST([SOXR_LIBS])
AM_CONDITIONAL([USE_LIBSOXR], [test "$LIBSOXR_USE_LOCAL" = yes -o "$LIBSOXR_USE_SYSTEM" = yes])
AM_CONDITIONAL([USE_LOCAL_LIBSOXR], [test "$LIBSOXR_USE_LOCAL" = yes])
if test "$LIBSOXR_USE_LOCAL" = yes -o "$LIBSOXR_USE_SYSTEM" = yes; then
AC_DEFINE(USE_LIBSOXR, 1,
[Define if libsoxr support should be enabled])
fi
])