diff --git a/Makefile.am b/Makefile.am index b18f673..ad56773 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,6 +9,3 @@ SUBDIRS += test endif pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libbcg729.pc - - - diff --git a/configure.ac b/configure.ac index 0de1781..fb73661 100644 --- a/configure.ac +++ b/configure.ac @@ -22,6 +22,12 @@ AC_ARG_ENABLE(strict, AC_ARG_ENABLE([tests], AS_HELP_STRING([--disable-tests], [Disable the tests])) AM_CONDITIONAL([RUN_TESTS], [test "x$enable_tests" != "xno"]) +# configure option to disable mediastreamer plugin +AC_ARG_ENABLE([msplugin], + AS_HELP_STRING([--disable-msplugin], [Disable the mediastreamer plugin]), + enable_msplugin="$enableval", + enable_msplugin="yes" +) CFLAGS="$CFLAGS -Wall" @@ -32,7 +38,7 @@ fi # check for libraries that have pkg-config files installed PKG_CHECK_MODULES(ORTP, ortp >= 0.21.0,[found_ortp=true],foo=bar) PKG_CHECK_MODULES(MEDIASTREAMER, mediastreamer >= 2.8.99,[found_ms2=true],foo=bar) -AM_CONDITIONAL(BUILD_MSBCG729, test x${found_ms2}x${found_ortp} = xtruextrue) +AM_CONDITIONAL(BUILD_MSBCG729, test x${found_ms2}x${found_ortp}x${enable_msplugin} = xtruextruexyes) VISIBILITY_CFLAGS= case "$target_os" in diff --git a/include/bcg729/Makefile.am b/include/bcg729/Makefile.am index 13fee4c..4ddad37 100644 --- a/include/bcg729/Makefile.am +++ b/include/bcg729/Makefile.am @@ -1,5 +1,8 @@ bcg729_includedir=$(includedir)/bcg729 -bcg729_include_HEADERS= encoder.h decoder.h +bcg729_include_HEADERS= +if !BUILD_MSBCG729 +bcg729_include_HEADERS+=encoder.h decoder.h +endif EXTRA_DIST=$(bcg729_include_HEADERS) diff --git a/msbcg729/Makefile.am b/msbcg729/Makefile.am index c584ee5..1d652c6 100644 --- a/msbcg729/Makefile.am +++ b/msbcg729/Makefile.am @@ -8,7 +8,7 @@ libmsbcg729_la_SOURCES=bcg729_dec.c bcg729_enc.c libmsbcg729_la_LIBADD=\ $(ORTP_LIBS) \ - $(MEDIASTREAMER_LIBS) \ + $(MEDIASTREAMER_LIBS) \ $(top_builddir)/src/libbcg729.la libmsbcg729_la_LDFLAGS=-module -no-undefined $(MEDIASTREAMER_LDFLAGS) diff --git a/src/Makefile.am b/src/Makefile.am index c873934..38fa586 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,8 @@ +if BUILD_MSBCG729 +noinst_LTLIBRARIES = libbcg729.la +else lib_LTLIBRARIES = libbcg729.la +endif libbcg729_la_SOURCES= LP2LSPConversion.c \ LPSynthesisFilter.c \ @@ -29,4 +33,3 @@ libbcg729_la_LDFLAGS= -no-undefined INCLUDES= -I$(top_srcdir)/include AM_CFLAGS=$(VISIBILITY_CFLAGS) -