Add configure options

Allow the packager to decide if she wants to compile/install
programs, VAMP plugin and LADSPA plugin.

if --disable-programs is used, then sndfile is not required.
if --disable-vamp is used, then vamp-sdk is not required.
if --disable-lapsda is used, then lapsda is not required.
This commit is contained in:
Brian Matherly
2020-02-14 11:23:52 +00:00
parent 817c781efc
commit 8043a8fc8f
3 changed files with 158 additions and 29 deletions

View File

@@ -1,6 +1,36 @@
AC_INIT(RubberBand, 1.8.2, chris.cannam@breakfastquay.com)
AC_ARG_ENABLE(programs,
[ --disable-programs Disable compilation of programs],
[case "${enableval}" in
yes | no ) WITH_PROGRAMS="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-programs) ;;
esac],
[WITH_PROGRAMS="yes"]
)
AC_SUBST(WITH_PROGRAMS)
AC_ARG_ENABLE(vamp,
[ --disable-vamp Disable compilation of vamp plugin],
[case "${enableval}" in
yes | no ) WITH_VAMP="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-vamp) ;;
esac],
[WITH_VAMP="yes"]
)
AC_SUBST(WITH_VAMP)
AC_ARG_ENABLE(ladspa,
[ --disable-ladspa Disable compilation of ladspa plugin],
[case "${enableval}" in
yes | no ) WITH_LADSPA="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-ladspa) ;;
esac],
[WITH_LADSPA="yes"]
)
AC_SUBST(WITH_LADSPA)
AC_CONFIG_SRCDIR(src/StretcherImpl.h)
AC_PROG_CXX
AC_PROG_CC
@@ -11,7 +41,9 @@ PKG_CHECK_MODULES([SRC],[samplerate])
AC_SUBST(SRC_CFLAGS)
AC_SUBST(SRC_LIBS)
PKG_CHECK_MODULES([SNDFILE],[sndfile])
if test "x$WITH_PROGRAMS" = "xyes"; then
PKG_CHECK_MODULES([SNDFILE],[sndfile])
fi
AC_SUBST(SNDFILE_CFLAGS)
AC_SUBST(SNDFILE_LIBS)
@@ -19,10 +51,14 @@ PKG_CHECK_MODULES([FFTW],[fftw3])
AC_SUBST(FFTW_CFLAGS)
AC_SUBST(FFTW_LIBS)
AC_CHECK_HEADERS(ladspa.h)
if test "x$WITH_LADSPA" = "xyes"; then
AC_CHECK_HEADERS(ladspa.h)
fi
AC_CHECK_HEADERS(pthread.h)
PKG_CHECK_MODULES([Vamp],[vamp-sdk])
if test "x$WITH_VAMP" = "xyes"; then
PKG_CHECK_MODULES([Vamp],[vamp-sdk])
fi
AC_SUBST(Vamp_CFLAGS)
AC_SUBST(Vamp_LIBS)