diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2012-07-25 12:21:54 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2012-07-25 12:21:54 +0000 |
commit | 7d4ccea736c1ce325de00c23dee28c61de47e638 (patch) | |
tree | 70bf7912bb022d6c064a75e7a49e60e9d9e61ecb /configure.ac | |
parent | 38f1081fd396e39e0c02600a5d58080880838131 (diff) |
Enable usage of system-provided NetBSD editline library if available.
This patch changes the Asterisk configure script and build system to detect
the presence of the NetBSD editline library (libedit) on the system. If it is
found, it will be used in preference to the version included in the Asterisk
source tree.
(closes issue ASTERISK-18725)
Reported by: Jeffrey C. Ollie
Review: https://reviewboard.asterisk.org/r/1528/
Patches:
0001-Allow-linking-building-against-an-external-editline.patch uploaded by jcollie (license #5373) (heavily modified by kpfleming)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 55377d318..99ed5110e 100644 --- a/configure.ac +++ b/configure.ac @@ -406,6 +406,7 @@ AST_EXT_LIB_SETUP([JACK], [Jack Audio Connection Kit], [jack]) AST_EXT_LIB_SETUP([KQUEUE], [kqueue support], [kqueue]) AST_EXT_LIB_SETUP([LDAP], [OpenLDAP], [ldap]) AST_LIBCURL_CHECK_CONFIG([], [7.10.1]) +AST_EXT_LIB_SETUP([LIBEDIT], [NetBSD Editline library], [libedit], [, use 'internal' Editline otherwise]) AST_EXT_LIB_SETUP([LIBXML2], [LibXML2], [libxml2]) AST_EXT_LIB_SETUP([LTDL], [libtool], [ltdl]) AST_EXT_LIB_SETUP([LUA], [Lua], [lua]) @@ -1262,8 +1263,8 @@ if test "${USE_ILBC}" != "no"; then fi if test "${ILBC_SYSTEM}" = "yes"; then AST_PKG_CONFIG_CHECK(ILBC, libilbc) - if test "$PBX_ILBC" = '1'; then - ILBC_INTERNAL='no' + if test "$PBX_ILBC" = "1"; then + ILBC_INTERNAL="no" fi fi if test "${ILBC_INTERNAL}" = "yes"; then @@ -1271,6 +1272,26 @@ if test "${USE_ILBC}" != "no"; then fi fi +LIBEDIT_INTERNAL="yes" +AC_SUBST(LIBEDIT_INTERNAL) +LIBEDIT_SYSTEM="yes" +if test "${USE_LIBEDIT}" != "no"; then + if test "${LIBEDIT_DIR}" = "internal"; then + LIBEDIT_SYSTEM="no" + elif test "${LIBEDIT_DIR}" != ""; then + LIBEDIT_INTERNAL="no" + fi + if test "${LIBEDIT_SYSTEM}" = "yes"; then + AST_PKG_CONFIG_CHECK(LIBEDIT, libedit) + if test "$PBX_LIBEDIT" = "1"; then + LIBEDIT_INTERNAL="no" + fi + fi + if test "${LIBEDIT_INTERNAL}" = "yes"; then + PBX_LIBEDIT=1 + 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]) |