FS-9670: add autodetection of opencore-amrnb lib and "--disable-amr" option to configure script

This commit is contained in:
Dragos Oancea
2016-10-26 08:53:54 -04:00
parent fbcb3f708f
commit a0284af8ea
3 changed files with 17 additions and 9 deletions
+3 -6
View File
@@ -1,8 +1,5 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_amr
AMR_DIR=$(switch_srcdir)/libs/amr
AMR_BUILDDIR=$(switch_builddir)/libs/amr
AMR_A=$(AMR_BUILDDIR)/libamr.a
mod_LTLIBRARIES = mod_amr.la
if HAVE_AMR
@@ -10,15 +7,15 @@ mod_amr_la_SOURCES = mod_amr.c bitshift.c amr_be.c
else
mod_amr_la_SOURCES = mod_amr.c
endif
mod_amr_la_CFLAGS = $(AM_CFLAGS)
mod_amr_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_amr_la_LDFLAGS = -avoid-version -module -no-undefined -shared
if HAVE_AMR
# install AMR library opencore-amrnb (check README)
mod_amr_la_CFLAGS += -I/usr/include/opencore-amrnb
mod_amr_la_LIBADD += -lopencore-amrnb
mod_amr_la_CFLAGS +=
mod_amr_la_CFLAGS += $(AMR_CFLAGS)
mod_amr_la_LIBADD += $(AMR_LIBS)
else
mod_amr_la_CFLAGS += -DAMR_PASSTHROUGH
endif
+3 -2
View File
@@ -27,6 +27,7 @@
* Brian K. West <brian@freeswitch.org>
* Dragos Oancea <dragos.oancea@athonet.com>
* Federico Favaro <federico.favaro@athonet.com>
* Marco Sinibaldi <marco.sinibaldi@athonet.com>
*
* The amr codec itself is not distributed with this module.
*
@@ -40,8 +41,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_amr_load);
SWITCH_MODULE_DEFINITION(mod_amr, mod_amr_load, NULL, NULL);
#ifndef AMR_PASSTHROUGH
#include "interf_enc.h"
#include "interf_dec.h"
#include "opencore-amrnb/interf_enc.h"
#include "opencore-amrnb/interf_dec.h"
#include "bitshift.h"
#include "amr_be.h"