From cc6bed233a3167d806834460befca2c6d655f0fb Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 13 Apr 2018 13:37:36 +0200 Subject: [PATCH] config/Makefile: make everything modular Signed-off-by: Jaroslav Kysela --- Makefile.am | 21 ++++++++++++++++++--- configure.ac | 20 +++++++++++++++++++- doc/Makefile.am | 37 ++++++++++++++++++++++++++++++++++--- 3 files changed, 71 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 69cfe0d..303bc83 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,10 @@ -SUBDIRS = oss mix usb_stream arcam-av doc +SUBDIRS = doc +if HAVE_OSS +SUBDIRS += oss +endif +if HAVE_MIX +SUBDIRS += mix +endif if HAVE_JACK SUBDIRS += jack endif @@ -8,8 +14,17 @@ endif if HAVE_SAMPLERATE SUBDIRS += rate endif -if HAVE_AVCODEC -SUBDIRS += a52 rate-lavc +if HAVE_A52 +SUBDIRS += a52 +endif +if HAVE_AVCRATE +SUBDIRS += rate-lavc +endif +if HAVE_USBSTREAM +SUBDIRS += usb_stream +endif +if HAVE_ARCAMAV +SUBDIRS += arcam-av endif if HAVE_MAEMO_PLUGIN SUBDIRS += maemo diff --git a/configure.ac b/configure.ac index ae98caa..2d7e6aa 100644 --- a/configure.ac +++ b/configure.ac @@ -135,6 +135,22 @@ AC_SUBST(AVCODEC_CFLAGS) AC_SUBST(AVCODEC_LIBS) AC_SUBST(AVCODEC_HEADER) +AC_ARG_ENABLE([a52], + AS_HELP_STRING([--disable-a52], [Disable building of A52 encoder plugin])) + +if test "x$enable_a52" != "xno" -a "$HAVE_AVCODEC" = "yes"; then + HAVE_A52=yes +fi +AM_CONDITIONAL(HAVE_A52, test x$HAVE_A52 = xyes) + +AC_ARG_ENABLE([avcrate], + AS_HELP_STRING([--disable-avcrate], [Disable building of AVC rate plugin])) + +if test "x$enable_avcrate" != "xno" -a "$HAVE_AVCODEC" = "yes"; then + HAVE_AVCRATE=yes +fi +AM_CONDITIONAL(HAVE_AVCRATE, test x$HAVE_AVCRATE = xyes) + AC_ARG_ENABLE([speexdsp], AS_HELP_STRING([--disable-speexdsp], [Disable building of speexdsp plugin])) @@ -260,12 +276,14 @@ if test "$HAVE_SAMPLERATE" = "yes"; then fi echo "Maemo plugin: $HAVE_MAEMO_PLUGIN" echo " Using Osso resource manager: $use_maemo_rm" -echo "A52, lavc plugins: $HAVE_AVCODEC" if test "$HAVE_AVCODEC" = "yes"; then + echo "AVCodec config:" echo " AVCODEC_CFLAGS: $AVCODEC_CFLAGS" echo " AVCODEC_LIBS: $AVCODEC_LIBS" echo " AVCODEC_HEADER: $AVCODEC_HEADER" fi +echo "A52 plugin: $HAVE_A52" +echo "AVC rate plugin: $HAVE_AVCRATE" echo "Speex rate plugin: $PPH" echo "Speex preprocess plugin: $HAVE_SPEEXDSP" if test "$HAVE_SPEEX" = "yes"; then diff --git a/doc/Makefile.am b/doc/Makefile.am index 19fa0d2..0d6f6e5 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,4 +1,35 @@ -EXTRA_DIST = README-pcm-oss README-jack README-pulse README-maemo \ - upmix.txt vdownmix.txt samplerate.txt a52.txt lavcrate.txt \ - speexrate.txt speexdsp.txt README-arcam-av +EXTRA_DIST = +if HAVE_OSS +EXTRA_DIST += README-pcm-oss +endif +if HAVE_MIX +EXTRA_DIST += upmix.txt vdownmix.txt +endif +if HAVE_JACK +EXTRA_DIST += README-jack +endif +if HAVE_PULSE +EXTRA_DIST += README-pulse +endif +if HAVE_MAEMO_PLUGIN +EXTRA_DIST += README-maemo +endif +if HAVE_SAMPLERATE +EXTRA_DIST += samplerate.txt +endif +if HAVE_A52 +EXTRA_DIST += a52.txt +endif +if HAVE_AVCRATE +EXTRA_DIST += lavcrate.txt +endif +if HAVE_PPH +EXTRA_DIST += speexrate.txt +endif +if HAVE_SPEEXDSP +EXTRA_DIST += speexdsp.txt +endif +if HAVE_ARCAMAV +EXTRA_DIST += README-arcam-av +endif -- 2.47.1