diff -dur -x '*~' -x '*.orig' -x '*.rej' asterisk-13.16.0.orig/build_tools/menuselect-deps.in asterisk-13.16.0/build_tools/menuselect-deps.in
--- asterisk-13.16.0.orig/build_tools/menuselect-deps.in 2017-05-30 19:44:16.000000000 +0200
+++ asterisk-13.16.0/build_tools/menuselect-deps.in 2017-06-09 14:11:13.000000000 +0200
@@ -12,6 +12,7 @@
GENERIC_ODBC=@PBX_GENERIC_ODBC@
GMIME=@PBX_GMIME@
GNU_LD=@GNU_LD@
+LPC10=@PBX_LPC10@
GSM=@PBX_GSM@
ILBC=@PBX_ILBC@
GTK2=@PBX_GTK2@
diff -dur -x '*~' -x '*.orig' -x '*.rej' asterisk-13.16.0.orig/codecs/codec_lpc10.c asterisk-13.16.0/codecs/codec_lpc10.c
--- asterisk-13.16.0.orig/codecs/codec_lpc10.c 2017-05-30 19:44:16.000000000 +0200
+++ asterisk-13.16.0/codecs/codec_lpc10.c 2017-06-09 14:11:13.000000000 +0200
@@ -26,6 +26,9 @@
*
* \ingroup codecs
*/
+/*** MODULEINFO
+ lpc10
+ ***/
/*** MODULEINFO
core
@@ -41,7 +44,7 @@
#include "asterisk/utils.h"
#include "asterisk/linkedlists.h"
-#include "lpc10/lpc10.h"
+#include
/* Sample frame data */
#include "asterisk/slin.h"
diff -dur -x '*~' -x '*.orig' -x '*.rej' asterisk-13.16.0.orig/codecs/Makefile asterisk-13.16.0/codecs/Makefile
--- asterisk-13.16.0.orig/codecs/Makefile 2017-05-30 19:44:16.000000000 +0200
+++ asterisk-13.16.0/codecs/Makefile 2017-06-09 14:14:38.000000000 +0200
@@ -27,8 +27,7 @@
SUB_DIRS := \
$(SUB_GSM) \
- $(SUB_ILBC) \
- $(SUB_LPC10) \
+ $(SUB_ILBC)
all: _all
@@ -59,7 +58,9 @@
.PHONY: $(SUB_DIRS)
+ifneq ($(LPC10_INTERNAL),no)
codec_lpc10.so: $(LIBLPC10)
+endif
# Don't run the implicit rules for this target.
$(LIBLPC10): $(SUB_LPC10) ;
diff -dur -x '*~' -x '*.orig' -x '*.rej' asterisk-13.16.0.orig/configure.ac asterisk-13.16.0/configure.ac
--- asterisk-13.16.0.orig/configure.ac 2017-06-09 14:10:32.000000000 +0200
+++ asterisk-13.16.0/configure.ac 2017-06-09 14:11:14.000000000 +0200
@@ -468,6 +468,7 @@
AST_EXT_LIB_SETUP([GSM], [External GSM], [gsm], [, use 'internal' GSM otherwise])
AST_EXT_LIB_SETUP([ILBC], [System iLBC], [ilbc], [, use 'internal' iLBC otherwise])
AST_EXT_LIB_SETUP([GTK2], [gtk2], [gtk2])
+AST_EXT_LIB_SETUP([LPC10], [External lpc10 library], [lpc10], [, use 'internal' lpc10 otherwise])
AST_EXT_LIB_SETUP([GMIME], [GMime], [gmime])
AST_EXT_LIB_SETUP([OPENH323], [OpenH323], [h323])
AST_EXT_LIB_SETUP([HOARD], [Hoard Memory Allocator], [hoard])
@@ -1530,6 +1531,72 @@
fi
fi
+LPC10_INTERNAL="yes"
+AC_SUBST(LPC10_INTERNAL)
+LPC10_SYSTEM="yes"
+if test "${USE_LPC10}" != "no"; then
+ case "$host_cpu" in
+ x86_64|s390x)
+ _lib=lib64
+ ;;
+ *)
+ _lib=lib
+ ;;
+ esac
+
+ if test "${LPC10_DIR}" = "internal"; then
+ LPC10_SYSTEM="no"
+ elif test "${LPC10_DIR}" != ""; then
+ LPC10_INTERNAL="no"
+ fi
+ if test "${LPC10_SYSTEM}" = "yes"; then
+ lpc10libdir=""
+ if test "x${LPC10_DIR}" != "x"; then
+ if test -d ${LPC10_DIR}/${_lib}; then
+ lpc10libdir="-L${LPC10_DIR}/${_lib}"
+ else
+ lpc10libdir="-L${LPC10_DIR}"
+ fi
+ fi
+ AC_CHECK_LIB([lpc10], [lpc10_encode], AC_DEFINE_UNQUOTED([HAVE_LPC10], 1,
+ [Define to indicate the GSM library]), [], ${gsmlibdir})
+ if test "${ac_cv_lib_lpc10_lpc10_encode}" = "yes"; then
+ if test "x${LPC10_DIR}" != "x" ; then
+ AC_CHECK_HEADER([${LPC10_DIR}/include/lpc10.h], [LPC10_HEADER_FOUND=1], [LPC10_HEADER_FOUND=0])
+ else
+ AC_CHECK_HEADER([lpc10.h], [LPC10_HEADER_FOUND=1], [LPC10_HEADER_FOUND=0])
+ fi
+ if test "${LPC10_HEADER_FOUND}" = "0" ; then
+ if test "x${LPC10_MANDATORY}" = "xyes" ; then
+ AC_MSG_NOTICE([***])
+ AC_MSG_NOTICE([*** It appears that you do not have the lpc10 development package installed.])
+ AC_MSG_NOTICE([*** Please install it to include ${LPC10_DESCRIP} support, or re-run configure])
+ AC_MSG_NOTICE([*** without explicitly specifying --with-${LPC10_OPTION}])
+ exit 1
+ fi
+ fi
+ LPC10_OK=0
+ if test "${LPC10_HEADER_FOUND}" = "1" ; then
+ AC_DEFINE_UNQUOTED([HAVE_LPC10_HEADER], 1, [Define to indicate that lpc10.h has no prefix for its location])
+ LPC10_OK=1
+ fi
+ if test "${LPC10_OK}" = "1" ; then
+ LPC10_LIB="-llpc10"
+ if test "x${LPC10_DIR}" != "x"; then
+ LPC10_LIB="${lpc10libdir} ${LPC10_LIB}"
+ LPC10_INCLUDE="-I${LPC10_DIR}/include"
+ fi
+ PBX_LPC10=1
+ LPC10_INTERNAL="no"
+ fi
+ fi
+ fi
+ if test "${LPC10_INTERNAL}" = "yes"; then
+ PBX_LPC10=1
+ AC_DEFINE_UNQUOTED([HAVE_LPC10_HEADER], 1, [Define to indicate that lpc10.h has no prefix for its location])
+ fi
+fi
+
AST_EXT_LIB_CHECK([ICONV], [iconv], [iconv_open], [iconv.h])
# GNU libiconv #define's iconv_open to libiconv_open, so we need to search for that symbol
AST_EXT_LIB_CHECK([ICONV], [iconv], [libiconv_open], [iconv.h])
diff -dur -x '*~' -x '*.orig' -x '*.rej' asterisk-13.16.0.orig/makeopts.in asterisk-13.16.0/makeopts.in
--- asterisk-13.16.0.orig/makeopts.in 2017-05-30 19:44:16.000000000 +0200
+++ asterisk-13.16.0/makeopts.in 2017-06-09 14:11:14.000000000 +0200
@@ -160,6 +160,10 @@
ILBC_INCLUDE=@ILBC_INCLUDE@
ILBC_LIB=@ILBC_LIB@
+LPC10_INTERNAL=@LPC10_INTERNAL@
+LPC10_INCLUDE=@LPC10_INCLUDE@
+LPC10_LIB=@LPC10_LIB@
+
GTK2_INCLUDE=@GTK2_INCLUDE@
GTK2_LIB=@GTK2_LIB@