Commit 0825bdb6 authored by Ghislain MARY's avatar Ghislain MARY

Build only libmsbcg729 if compiling mediastreamer plugin, libbcg729 otherwise.

parent d9f9d231
......@@ -9,6 +9,3 @@ SUBDIRS += test
endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libbcg729.pc
......@@ -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
......
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)
......@@ -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)
......
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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment