diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-27 21:57:07 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-27 21:57:07 +0000 |
commit | 2c79b41903b9483e57ab646e1016a355a04c3df2 (patch) | |
tree | eb45702aee2dbcce056f9325db62aef4d82d58f3 /configure | |
parent | bebdb0fda152a29d8e336408d2eee31d06bce0d7 (diff) |
Add ability to use system libedit and update bundled libedit.
The version of libedit that is bundled with asterisk is old and has some bugs.
This patch updates the bundled version of libedit within asterisk, and also
updates asterisk to use the system libedit instead if one is available (and
pkg-config is available). This review integrates several patches from other
users specifically kkm and tzafrir.
(closes issue #15929)
Reported by: kkm
Patches:
015929-astcli-editrc-trunk.240324.diff uploaded by kkm (license 888)
(issue #16858)
Reported by: jw-asterisk
(closes issue #17039)
Reported by: tzafrir
Patches:
0001-allow-using-system-copy-of-libedit.patch uploaded by tzafrir (license 46)
Review: https://reviewboard.asterisk.org/r/807/
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@280019 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 212 |
1 files changed, 211 insertions, 1 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 279658 . +# From configure.ac Revision: 279953 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65 for asterisk trunk. # @@ -617,6 +617,8 @@ PBX_SYSLOG_FACILITY_LOG_AUTH PBX_GENERIC_ODBC GENERIC_ODBC_INCLUDE GENERIC_ODBC_LIB +LIBEDIT_OBJ +LIBEDIT_EXTRA_LIB PKGCONFIG PBX_LAUNCHD CONFIG_SDL @@ -912,6 +914,10 @@ PBX_LIBXML2 LIBXML2_DIR LIBXML2_INCLUDE LIBXML2_LIB +PBX_LIBEDIT +LIBEDIT_DIR +LIBEDIT_INCLUDE +LIBEDIT_LIB CURL_LIB CURL_INCLUDE _libcurl_config @@ -1158,6 +1164,7 @@ with_jack with_kqueue with_ldap with_libcurl +with_libedit with_libxml2 with_ltdl with_lua @@ -1870,6 +1877,7 @@ Optional Packages: --with-kqueue=PATH use kqueue support files in PATH --with-ldap=PATH use OpenLDAP files in PATH --with-libcurl=DIR look for the curl library in DIR + --with-libedit=PATH use NetBSD Editline library files in PATH --with-libxml2=PATH use LibXML2 files in PATH --with-ltdl=PATH use libtool files in PATH --with-lua=PATH use Lua files in PATH @@ -9615,6 +9623,38 @@ _ACEOF unset _libcurl_with + LIBEDIT_DESCRIP="NetBSD Editline library" + LIBEDIT_OPTION="libedit" + PBX_LIBEDIT=0 + +# Check whether --with-libedit was given. +if test "${with_libedit+set}" = set; then : + withval=$with_libedit; + case ${withval} in + n|no) + USE_LIBEDIT=no + # -1 is a magic value used by menuselect to know that the package + # was disabled, other than 'not found' + PBX_LIBEDIT=-1 + ;; + y|ye|yes) + ac_mandatory_list="${ac_mandatory_list} LIBEDIT" + ;; + *) + LIBEDIT_DIR="${withval}" + ac_mandatory_list="${ac_mandatory_list} LIBEDIT" + ;; + esac + +fi + + + + + + + + LIBXML2_DESCRIP="LibXML2" LIBXML2_OPTION="libxml2" PBX_LIBXML2=0 @@ -28277,6 +28317,176 @@ fi +PBX_LIBEDIT=0 +LIBEDIT_INCLUDE="-Ieditline -Ieditline/readline" +LIBEDIT_LIB= +LIBEDIT_EXTRA_LIB= +LIBEDIT_OBJ=editline/libedit.a +if test "${USE_LIBEDIT}" != "no"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_PKGCONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PKGCONFIG"; then + ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_PKGCONFIG="${ac_tool_prefix}pkg-config" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PKGCONFIG=$ac_cv_prog_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_PKGCONFIG"; then + ac_ct_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_PKGCONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_PKGCONFIG"; then + ac_cv_prog_ac_ct_PKGCONFIG="$ac_ct_PKGCONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_PKGCONFIG="pkg-config" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_PKGCONFIG=$ac_cv_prog_ac_ct_PKGCONFIG +if test -n "$ac_ct_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKGCONFIG" >&5 +$as_echo "$ac_ct_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_ct_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_prog_PKGCONFIG" +fi + + if test "${PKGCONFIG}" != "no"; then + if ${PKGCONFIG} --exists libedit; then + LIBEDIT_INCLUDE=$(${PKGCONFIG} libedit --cflags) + LIBEDIT_LIB=$(${PKGCONFIG} libedit --libs) + LIBEDIT_OBJ= + PBX_LIBEDIT=1 + +$as_echo "#define HAVE_LIBEDIT 1" >>confdefs.h + + fi + fi +fi +if test "${PBX_LIBEDIT}" != "1"; then + ac_fn_c_check_header_mongrel "$LINENO" "vis.h" "ac_cv_header_vis_h" "$ac_includes_default" +if test "x$ac_cv_header_vis_h" = x""yes; then : + HAS_VIS_H=yes +else + HAS_VIS_H=no +fi + + + if test "${HAS_VIS_H}" = "yes"; then + # We may need -lbsd + old_LIBS=${LIBS} + LIBS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> + #include <vis.h> +int +main () +{ +vis(NULL,0,0,0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + LIBS="-lbsd" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> + #include <vis.h> +int +main () +{ +vis(NULL,0,0,0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + LIBEDIT_EXTRA_LIB=$LIBS + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=${old_LIBS} + fi +fi + + + + + + # build a GENERIC_ODBC result based on the presence of either UnixODBC (preferred) # or iODBC |