diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 1203 |
1 files changed, 293 insertions, 910 deletions
@@ -672,16 +672,11 @@ CONFIG_NEON CONFIG_MYSQLCLIENT PBX_MISDN_FAC_ERROR PBX_MISDN_FAC_RESULT -LIBEDIT_LIBS -LIBEDIT_CFLAGS ILBC_LIBS ILBC_CFLAGS ILBC_INTERNAL GSM_INTERNAL PBX_DAHDI_HALF_FULL -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG PBX_DLADDR PBX_IP_MTU_DISCOVER PBX_RTLD_NOLOAD @@ -712,7 +707,11 @@ DISABLE_XMLDOC CONFIG_LIBXML2 UUID_LIB UUID_INCLUDE -EDITLINE_LIB +LIBEDIT_LIBS +LIBEDIT_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG ALLOCA PBX_ZLIB ZLIB_DIR @@ -742,18 +741,10 @@ PBX_TONEZONE TONEZONE_DIR TONEZONE_INCLUDE TONEZONE_LIB -PBX_TINFO -TINFO_DIR -TINFO_INCLUDE -TINFO_LIB PBX_TIMERFD TIMERFD_DIR TIMERFD_INCLUDE TIMERFD_LIB -PBX_TERMCAP -TERMCAP_DIR -TERMCAP_INCLUDE -TERMCAP_LIB PBX_FREETDS FREETDS_DIR FREETDS_INCLUDE @@ -1026,10 +1017,6 @@ PBX_NEON NEON_DIR NEON_INCLUDE NEON_LIB -PBX_NCURSES -NCURSES_DIR -NCURSES_INCLUDE -NCURSES_LIB PBX_NBS NBS_DIR NBS_INCLUDE @@ -1162,10 +1149,6 @@ PBX_CRYPT CRYPT_DIR CRYPT_INCLUDE CRYPT_LIB -PBX_CURSES -CURSES_DIR -CURSES_INCLUDE -CURSES_LIB PBX_COROSYNC_CFG_STATE_TRACK COROSYNC_CFG_STATE_TRACK_DIR COROSYNC_CFG_STATE_TRACK_INCLUDE @@ -1378,7 +1361,6 @@ with_bluetooth with_cap with_codec2 with_cpg -with_curses with_crypt with_crypto with_dahdi @@ -1408,7 +1390,6 @@ with_lua with_misdn with_mysqlclient with_nbs -with_ncurses with_neon with_neon29 with_netsnmp @@ -1441,9 +1422,7 @@ with_srtp with_ssl with_suppserv with_tds -with_termcap with_timerfd -with_tinfo with_tonezone with_unbound with_unixodbc @@ -1474,10 +1453,10 @@ PJPROJECT_CONFIGURE_OPTS PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR -ILBC_CFLAGS -ILBC_LIBS LIBEDIT_CFLAGS LIBEDIT_LIBS +ILBC_CFLAGS +ILBC_LIBS PJPROJECT_CFLAGS PJPROJECT_LIBS PYTHONDEV_CFLAGS @@ -2131,7 +2110,6 @@ Optional Packages: --with-cap=PATH use POSIX 1.e capabilities files in PATH --with-codec2=PATH use Codec 2 Audio Decoder/Encoder files in PATH --with-cpg=PATH use Corosync files in PATH - --with-curses=PATH use curses files in PATH --with-crypt=PATH use password and data encryption files in PATH --with-crypto=PATH use OpenSSL Cryptography files in PATH --with-dahdi=PATH use DAHDI files in PATH @@ -2164,7 +2142,6 @@ Optional Packages: --with-misdn=PATH use mISDN user files in PATH --with-mysqlclient=PATH use MySQL client files in PATH --with-nbs=PATH use Network Broadcast Sound files in PATH - --with-ncurses=PATH use ncurses files in PATH --with-neon=PATH use neon files in PATH --with-neon29=PATH use neon29 files in PATH --with-netsnmp=PATH use Net-SNMP files in PATH @@ -2198,9 +2175,7 @@ Optional Packages: --with-ssl=PATH use OpenSSL Secure Sockets Layer files in PATH --with-suppserv=PATH use mISDN Supplemental Services files in PATH --with-tds=PATH use FreeTDS files in PATH - --with-termcap=PATH use Termcap files in PATH --with-timerfd=PATH use timerfd files in PATH - --with-tinfo=PATH use Term Info files in PATH --with-tonezone=PATH use tonezone files in PATH --with-unbound=PATH use unbound files in PATH --with-unixodbc=PATH use unixODBC files in PATH @@ -2228,12 +2203,12 @@ Some influential environment variables: directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path - ILBC_CFLAGS C compiler flags for ILBC, overriding pkg-config - ILBC_LIBS linker flags for ILBC, overriding pkg-config LIBEDIT_CFLAGS C compiler flags for LIBEDIT, overriding pkg-config LIBEDIT_LIBS linker flags for LIBEDIT, overriding pkg-config + ILBC_CFLAGS C compiler flags for ILBC, overriding pkg-config + ILBC_LIBS linker flags for ILBC, overriding pkg-config PJPROJECT_CFLAGS C compiler flags for PJPROJECT, overriding pkg-config PJPROJECT_LIBS @@ -7817,7 +7792,7 @@ if test "${WGET}" != ":" ; then DOWNLOAD=${WGET} DOWNLOAD_TO_STDOUT="${WGET} -q -O-" DOWNLOAD_TIMEOUT='--timeout=$1' -else if test "${CURL}" != ":" ; then +elif test "${CURL}" != ":" ; then DOWNLOAD="${CURL} -O --progress-bar -w \"%{url_effective}\n\"" DOWNLOAD_TO_STDOUT="${CURL} -Ls" DOWNLOAD_TIMEOUT='--max-time $(or $2,$1)' @@ -7869,7 +7844,6 @@ fi DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)' fi fi -fi @@ -9565,38 +9539,6 @@ PBX_COROSYNC_CFG_STATE_TRACK=0 - CURSES_DESCRIP="curses" - CURSES_OPTION="curses" - PBX_CURSES=0 - -# Check whether --with-curses was given. -if test "${with_curses+set}" = set; then : - withval=$with_curses; - case ${withval} in - n|no) - USE_CURSES=no - # -1 is a magic value used by menuselect to know that the package - # was disabled, other than 'not found' - PBX_CURSES=-1 - ;; - y|ye|yes) - ac_mandatory_list="${ac_mandatory_list} CURSES" - ;; - *) - CURSES_DIR="${withval}" - ac_mandatory_list="${ac_mandatory_list} CURSES" - ;; - esac - -fi - - - - - - - - CRYPT_DESCRIP="password and data encryption" CRYPT_OPTION="crypt" PBX_CRYPT=0 @@ -10928,38 +10870,6 @@ fi - NCURSES_DESCRIP="ncurses" - NCURSES_OPTION="ncurses" - PBX_NCURSES=0 - -# Check whether --with-ncurses was given. -if test "${with_ncurses+set}" = set; then : - withval=$with_ncurses; - case ${withval} in - n|no) - USE_NCURSES=no - # -1 is a magic value used by menuselect to know that the package - # was disabled, other than 'not found' - PBX_NCURSES=-1 - ;; - y|ye|yes) - ac_mandatory_list="${ac_mandatory_list} NCURSES" - ;; - *) - NCURSES_DIR="${withval}" - ac_mandatory_list="${ac_mandatory_list} NCURSES" - ;; - esac - -fi - - - - - - - - NEON_DESCRIP="neon" NEON_OPTION="neon" PBX_NEON=0 @@ -12467,38 +12377,6 @@ fi - TERMCAP_DESCRIP="Termcap" - TERMCAP_OPTION="termcap" - PBX_TERMCAP=0 - -# Check whether --with-termcap was given. -if test "${with_termcap+set}" = set; then : - withval=$with_termcap; - case ${withval} in - n|no) - USE_TERMCAP=no - # -1 is a magic value used by menuselect to know that the package - # was disabled, other than 'not found' - PBX_TERMCAP=-1 - ;; - y|ye|yes) - ac_mandatory_list="${ac_mandatory_list} TERMCAP" - ;; - *) - TERMCAP_DIR="${withval}" - ac_mandatory_list="${ac_mandatory_list} TERMCAP" - ;; - esac - -fi - - - - - - - - TIMERFD_DESCRIP="timerfd" TIMERFD_OPTION="timerfd" PBX_TIMERFD=0 @@ -12531,38 +12409,6 @@ fi - TINFO_DESCRIP="Term Info" - TINFO_OPTION="tinfo" - PBX_TINFO=0 - -# Check whether --with-tinfo was given. -if test "${with_tinfo+set}" = set; then : - withval=$with_tinfo; - case ${withval} in - n|no) - USE_TINFO=no - # -1 is a magic value used by menuselect to know that the package - # was disabled, other than 'not found' - PBX_TINFO=-1 - ;; - y|ye|yes) - ac_mandatory_list="${ac_mandatory_list} TINFO" - ;; - *) - TINFO_DIR="${withval}" - ac_mandatory_list="${ac_mandatory_list} TINFO" - ;; - esac - -fi - - - - - - - - TONEZONE_DESCRIP="tonezone" TONEZONE_OPTION="tonezone" PBX_TONEZONE=0 @@ -13381,200 +13227,237 @@ fi done -# Any one of these packages support a mandatory requirement, so we want to check on them as early as possible. +# Find required NetBSD Editline library (libedit). -if test "x${PBX_TERMCAP}" != "x1" -a "${USE_TERMCAP}" != "no"; then - pbxlibdir="" - # if --with-TERMCAP=DIR has been specified, use it. - if test "x${TERMCAP_DIR}" != "x"; then - if test -d ${TERMCAP_DIR}/lib; then - pbxlibdir="-L${TERMCAP_DIR}/lib" - else - pbxlibdir="-L${TERMCAP_DIR}" - fi - fi - ast_ext_lib_check_save_CFLAGS="${CFLAGS}" - CFLAGS="${CFLAGS} " - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 -$as_echo_n "checking for tgetent in -ltermcap... " >&6; } -if ${ac_cv_lib_termcap_tgetent+:} false; then : + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; 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 ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ltermcap ${pbxlibdir} $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $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 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tgetent (); -int -main () -{ -return tgetent (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_termcap_tgetent=yes -else - ac_cv_lib_termcap_tgetent=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 -$as_echo "$ac_cv_lib_termcap_tgetent" >&6; } -if test "x$ac_cv_lib_termcap_tgetent" = xyes; then : - AST_TERMCAP_FOUND=yes +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - AST_TERMCAP_FOUND=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - CFLAGS="${ast_ext_lib_check_save_CFLAGS}" - - - # now check for the header. - if test "${AST_TERMCAP_FOUND}" = "yes"; then - TERMCAP_LIB="${pbxlibdir} -ltermcap " - # if --with-TERMCAP=DIR has been specified, use it. - if test "x${TERMCAP_DIR}" != "x"; then - TERMCAP_INCLUDE="-I${TERMCAP_DIR}/include" - fi - TERMCAP_INCLUDE="${TERMCAP_INCLUDE} " - - # no header, assume found - TERMCAP_HEADER_FOUND="1" - if test "x${TERMCAP_HEADER_FOUND}" = "x0" ; then - TERMCAP_LIB="" - TERMCAP_INCLUDE="" - else +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # 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 ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $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 - PBX_TERMCAP=1 - cat >>confdefs.h <<_ACEOF -#define HAVE_TERMCAP 1 -_ACEOF + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - fi - fi + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + 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 + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then -if test "x${PBX_TINFO}" != "x1" -a "${USE_TINFO}" != "no"; then - pbxlibdir="" - # if --with-TINFO=DIR has been specified, use it. - if test "x${TINFO_DIR}" != "x"; then - if test -d ${TINFO_DIR}/lib; then - pbxlibdir="-L${TINFO_DIR}/lib" - else - pbxlibdir="-L${TINFO_DIR}" - fi - fi +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBEDIT" >&5 +$as_echo_n "checking for LIBEDIT... " >&6; } - ast_ext_lib_check_save_CFLAGS="${CFLAGS}" - CFLAGS="${CFLAGS} " - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 -$as_echo_n "checking for tgetent in -ltinfo... " >&6; } -if ${ac_cv_lib_tinfo_tgetent+:} false; then : - $as_echo_n "(cached) " >&6 +if test -n "$LIBEDIT_CFLAGS"; then + pkg_cv_LIBEDIT_CFLAGS="$LIBEDIT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libedit") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBEDIT_CFLAGS=`$PKG_CONFIG --cflags "libedit" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ltinfo ${pbxlibdir} $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tgetent (); -int -main () -{ -return tgetent (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_tinfo_tgetent=yes + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBEDIT_LIBS"; then + pkg_cv_LIBEDIT_LIBS="$LIBEDIT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libedit") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBEDIT_LIBS=`$PKG_CONFIG --libs "libedit" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else - ac_cv_lib_tinfo_tgetent=no + pkg_failed=yes fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + else + pkg_failed=untried fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 -$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; } -if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then : - AST_TINFO_FOUND=yes + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - AST_TINFO_FOUND=no + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + LIBEDIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libedit" 2>&1` + else + LIBEDIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libedit" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBEDIT_PKG_ERRORS" >&5 - CFLAGS="${ast_ext_lib_check_save_CFLAGS}" + PBX_LIBEDIT=0 - # now check for the header. - if test "${AST_TINFO_FOUND}" = "yes"; then - TINFO_LIB="${pbxlibdir} -ltinfo " - # if --with-TINFO=DIR has been specified, use it. - if test "x${TINFO_DIR}" != "x"; then - TINFO_INCLUDE="-I${TINFO_DIR}/include" - fi - TINFO_INCLUDE="${TINFO_INCLUDE} " - # no header, assume found - TINFO_HEADER_FOUND="1" +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - if test "x${TINFO_HEADER_FOUND}" = "x0" ; then - TINFO_LIB="" - TINFO_INCLUDE="" - else + PBX_LIBEDIT=0 - PBX_TINFO=1 - cat >>confdefs.h <<_ACEOF -#define HAVE_TINFO 1 -_ACEOF - fi - fi -fi +else + LIBEDIT_CFLAGS=$pkg_cv_LIBEDIT_CFLAGS + LIBEDIT_LIBS=$pkg_cv_LIBEDIT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + PBX_LIBEDIT=1 + LIBEDIT_INCLUDE=$(echo ${LIBEDIT_CFLAGS} | $SED -e "s|-std=c99||g") + LIBEDIT_LIB="$LIBEDIT_LIBS" + +$as_echo "#define HAVE_LIBEDIT 1" >>confdefs.h +fi + fi + +# some platforms do not list libedit via pkg-config, for example OpenBSD 6.2 -if test "x${PBX_CURSES}" != "x1" -a "${USE_CURSES}" != "no"; then +if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then pbxlibdir="" - # if --with-CURSES=DIR has been specified, use it. - if test "x${CURSES_DIR}" != "x"; then - if test -d ${CURSES_DIR}/lib; then - pbxlibdir="-L${CURSES_DIR}/lib" + # if --with-LIBEDIT=DIR has been specified, use it. + if test "x${LIBEDIT_DIR}" != "x"; then + if test -d ${LIBEDIT_DIR}/lib; then + pbxlibdir="-L${LIBEDIT_DIR}/lib" else - pbxlibdir="-L${CURSES_DIR}" + pbxlibdir="-L${LIBEDIT_DIR}" fi fi ast_ext_lib_check_save_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} " - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lcurses" >&5 -$as_echo_n "checking for initscr in -lcurses... " >&6; } -if ${ac_cv_lib_curses_initscr+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for history_init in -ledit" >&5 +$as_echo_n "checking for history_init in -ledit... " >&6; } +if ${ac_cv_lib_edit_history_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurses ${pbxlibdir} $LIBS" +LIBS="-ledit ${pbxlibdir} -ltermcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13584,65 +13467,65 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char initscr (); +char history_init (); int main () { -return initscr (); +return history_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_curses_initscr=yes + ac_cv_lib_edit_history_init=yes else - ac_cv_lib_curses_initscr=no + ac_cv_lib_edit_history_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_initscr" >&5 -$as_echo "$ac_cv_lib_curses_initscr" >&6; } -if test "x$ac_cv_lib_curses_initscr" = xyes; then : - AST_CURSES_FOUND=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_history_init" >&5 +$as_echo "$ac_cv_lib_edit_history_init" >&6; } +if test "x$ac_cv_lib_edit_history_init" = xyes; then : + AST_LIBEDIT_FOUND=yes else - AST_CURSES_FOUND=no + AST_LIBEDIT_FOUND=no fi CFLAGS="${ast_ext_lib_check_save_CFLAGS}" # now check for the header. - if test "${AST_CURSES_FOUND}" = "yes"; then - CURSES_LIB="${pbxlibdir} -lcurses " - # if --with-CURSES=DIR has been specified, use it. - if test "x${CURSES_DIR}" != "x"; then - CURSES_INCLUDE="-I${CURSES_DIR}/include" + if test "${AST_LIBEDIT_FOUND}" = "yes"; then + LIBEDIT_LIB="${pbxlibdir} -ledit -ltermcap" + # if --with-LIBEDIT=DIR has been specified, use it. + if test "x${LIBEDIT_DIR}" != "x"; then + LIBEDIT_INCLUDE="-I${LIBEDIT_DIR}/include" fi - CURSES_INCLUDE="${CURSES_INCLUDE} " + LIBEDIT_INCLUDE="${LIBEDIT_INCLUDE} " # check for the header ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" - CPPFLAGS="${CPPFLAGS} ${CURSES_INCLUDE}" - ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default" -if test "x$ac_cv_header_curses_h" = xyes; then : - CURSES_HEADER_FOUND=1 + CPPFLAGS="${CPPFLAGS} ${LIBEDIT_INCLUDE}" + ac_fn_c_check_header_mongrel "$LINENO" "histedit.h" "ac_cv_header_histedit_h" "$ac_includes_default" +if test "x$ac_cv_header_histedit_h" = xyes; then : + LIBEDIT_HEADER_FOUND=1 else - CURSES_HEADER_FOUND=0 + LIBEDIT_HEADER_FOUND=0 fi CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}" - if test "x${CURSES_HEADER_FOUND}" = "x0" ; then - CURSES_LIB="" - CURSES_INCLUDE="" + if test "x${LIBEDIT_HEADER_FOUND}" = "x0" ; then + LIBEDIT_LIB="" + LIBEDIT_INCLUDE="" else - PBX_CURSES=1 + PBX_LIBEDIT=1 cat >>confdefs.h <<_ACEOF -#define HAVE_CURSES 1 +#define HAVE_LIBEDIT 1 _ACEOF fi @@ -13650,115 +13533,49 @@ _ACEOF fi +if test "${PBX_LIBEDIT}" != 1; then + as_fn_error $? "*** Please install the 'libedit' development package." "$LINENO" 5 + exit 1 +fi -if test "x${PBX_NCURSES}" != "x1" -a "${USE_NCURSES}" != "no"; then - pbxlibdir="" - # if --with-NCURSES=DIR has been specified, use it. - if test "x${NCURSES_DIR}" != "x"; then - if test -d ${NCURSES_DIR}/lib; then - pbxlibdir="-L${NCURSES_DIR}/lib" - else - pbxlibdir="-L${NCURSES_DIR}" - fi - fi + if test "x${PBX_LIBEDIT_IS_UNICODE}" != "x1" -a "${USE_LIBEDIT_IS_UNICODE}" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Testing for libedit unicode support" >&5 +$as_echo_n "checking for Testing for libedit unicode support... " >&6; } + saved_cppflags="${CPPFLAGS}" + if test "x${LIBEDIT_IS_UNICODE_DIR}" != "x"; then + LIBEDIT_IS_UNICODE_INCLUDE="-I${LIBEDIT_IS_UNICODE_DIR}/include" + fi + CPPFLAGS="${CPPFLAGS} ${LIBEDIT_IS_UNICODE_INCLUDE}" - ast_ext_lib_check_save_CFLAGS="${CFLAGS}" - CFLAGS="${CFLAGS} " - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncurses" >&5 -$as_echo_n "checking for initscr in -lncurses... " >&6; } -if ${ac_cv_lib_ncurses_initscr+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lncurses ${pbxlibdir} $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char initscr (); + #include <histedit.h> int main () { -return initscr (); + el_rfunc_t *callback;; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ncurses_initscr=yes -else - ac_cv_lib_ncurses_initscr=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5 -$as_echo "$ac_cv_lib_ncurses_initscr" >&6; } -if test "x$ac_cv_lib_ncurses_initscr" = xyes; then : - AST_NCURSES_FOUND=yes -else - AST_NCURSES_FOUND=no -fi +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + PBX_LIBEDIT_IS_UNICODE=1 - CFLAGS="${ast_ext_lib_check_save_CFLAGS}" +$as_echo "#define HAVE_LIBEDIT_IS_UNICODE 1" >>confdefs.h - # now check for the header. - if test "${AST_NCURSES_FOUND}" = "yes"; then - NCURSES_LIB="${pbxlibdir} -lncurses " - # if --with-NCURSES=DIR has been specified, use it. - if test "x${NCURSES_DIR}" != "x"; then - NCURSES_INCLUDE="-I${NCURSES_DIR}/include" - fi - NCURSES_INCLUDE="${NCURSES_INCLUDE} " - # check for the header - ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" - CPPFLAGS="${CPPFLAGS} ${NCURSES_INCLUDE}" - ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default" -if test "x$ac_cv_header_curses_h" = xyes; then : - NCURSES_HEADER_FOUND=1 else - NCURSES_HEADER_FOUND=0 -fi - - - CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}" - - if test "x${NCURSES_HEADER_FOUND}" = "x0" ; then - NCURSES_LIB="" - NCURSES_INCLUDE="" - else - - PBX_NCURSES=1 - cat >>confdefs.h <<_ACEOF -#define HAVE_NCURSES 1 -_ACEOF - - fi - fi -fi - - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -EDITLINE_LIB="" -if test "x$TERMCAP_LIB" != "x" ; then - EDITLINE_LIB="$TERMCAP_LIB" -elif test "x$TINFO_LIB" != "x" ; then - EDITLINE_LIB="$TINFO_LIB" -elif test "x$CURSES_LIB" != "x" ; then - EDITLINE_LIB="$CURSES_LIB" -elif test "x$NCURSES_LIB" != "x" ; then - EDITLINE_LIB="$NCURSES_LIB" -else - as_fn_error $? "*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)" "$LINENO" 5 fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CPPFLAGS="${saved_cppflags}" + fi # Find required UUID support. @@ -14284,7 +14101,7 @@ fi if test ! "x${CONFIG_LIBXML2}" = xNo; then LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} --cflags) - LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g") + LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g" -e "s|-std=c99||g") LIBXML2_LIB=$(${CONFIG_LIBXML2} --libs) LIBXML2_LIB=$(echo ${LIBXML2_LIB} | $SED -e "s|-L|-L${LIBXML2_DIR}|g") @@ -19384,15 +19201,15 @@ if test $ac_cv_sizeof_int = $ac_cv_sizeof_fd_set_fds_bits; then $as_echo "#define TYPEOF_FD_SET_FDS_BITS int" >>confdefs.h -else if test $ac_cv_sizeof_long = $ac_cv_sizeof_fd_set_fds_bits; then +elif test $ac_cv_sizeof_long = $ac_cv_sizeof_fd_set_fds_bits; then $as_echo "#define TYPEOF_FD_SET_FDS_BITS long" >>confdefs.h -else if test $ac_cv_sizeof_long_long = $ac_cv_sizeof_fd_set_fds_bits; then +elif test $ac_cv_sizeof_long_long = $ac_cv_sizeof_fd_set_fds_bits; then $as_echo "#define TYPEOF_FD_SET_FDS_BITS long long" >>confdefs.h -fi ; fi ; fi +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dladdr in dlfcn.h" >&5 $as_echo_n "checking for dladdr in dlfcn.h... " >&6; } @@ -20556,15 +20373,13 @@ cat >>confdefs.h <<_ACEOF _ACEOF GSM_OK=1 - else - if test "${GSM_GSM_HEADER_FOUND}" = "1" ; then + elif test "${GSM_GSM_HEADER_FOUND}" = "1" ; then cat >>confdefs.h <<_ACEOF #define HAVE_GSM_GSM_HEADER 1 _ACEOF - GSM_OK=1 - fi + GSM_OK=1 fi if test "${GSM_OK}" = "1" ; then GSM_LIB="-lgsm" @@ -20676,7 +20491,7 @@ else $as_echo "yes" >&6; } PBX_ILBC=1 - ILBC_INCLUDE="$ILBC_CFLAGS" + ILBC_INCLUDE=$(echo ${ILBC_CFLAGS} | $SED -e "s|-std=c99||g") ILBC_LIB="$ILBC_LIBS" $as_echo "#define HAVE_ILBC 1" >>confdefs.h @@ -20695,236 +20510,6 @@ fi fi - if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBEDIT" >&5 -$as_echo_n "checking for LIBEDIT... " >&6; } - -if test -n "$LIBEDIT_CFLAGS"; then - pkg_cv_LIBEDIT_CFLAGS="$LIBEDIT_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libedit") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBEDIT_CFLAGS=`$PKG_CONFIG --cflags "libedit" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$LIBEDIT_LIBS"; then - pkg_cv_LIBEDIT_LIBS="$LIBEDIT_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libedit") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBEDIT_LIBS=`$PKG_CONFIG --libs "libedit" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LIBEDIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libedit" 2>&1` - else - LIBEDIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libedit" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$LIBEDIT_PKG_ERRORS" >&5 - - - PBX_LIBEDIT=0 - - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - - PBX_LIBEDIT=0 - - -else - LIBEDIT_CFLAGS=$pkg_cv_LIBEDIT_CFLAGS - LIBEDIT_LIBS=$pkg_cv_LIBEDIT_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - PBX_LIBEDIT=1 - LIBEDIT_INCLUDE="$LIBEDIT_CFLAGS" - LIBEDIT_LIB="$LIBEDIT_LIBS" - -$as_echo "#define HAVE_LIBEDIT 1" >>confdefs.h - - -fi - fi - -# some platforms do not list libedit via pkg-config, for example OpenBSD 6.2 - -if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then - pbxlibdir="" - # if --with-LIBEDIT=DIR has been specified, use it. - if test "x${LIBEDIT_DIR}" != "x"; then - if test -d ${LIBEDIT_DIR}/lib; then - pbxlibdir="-L${LIBEDIT_DIR}/lib" - else - pbxlibdir="-L${LIBEDIT_DIR}" - fi - fi - - ast_ext_lib_check_save_CFLAGS="${CFLAGS}" - CFLAGS="${CFLAGS} " - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for history_init in -ledit" >&5 -$as_echo_n "checking for history_init in -ledit... " >&6; } -if ${ac_cv_lib_edit_history_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ledit ${pbxlibdir} -ltermcap $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char history_init (); -int -main () -{ -return history_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_edit_history_init=yes -else - ac_cv_lib_edit_history_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_history_init" >&5 -$as_echo "$ac_cv_lib_edit_history_init" >&6; } -if test "x$ac_cv_lib_edit_history_init" = xyes; then : - AST_LIBEDIT_FOUND=yes -else - AST_LIBEDIT_FOUND=no -fi - - CFLAGS="${ast_ext_lib_check_save_CFLAGS}" - - - # now check for the header. - if test "${AST_LIBEDIT_FOUND}" = "yes"; then - LIBEDIT_LIB="${pbxlibdir} -ledit -ltermcap" - # if --with-LIBEDIT=DIR has been specified, use it. - if test "x${LIBEDIT_DIR}" != "x"; then - LIBEDIT_INCLUDE="-I${LIBEDIT_DIR}/include" - fi - LIBEDIT_INCLUDE="${LIBEDIT_INCLUDE} " - - # check for the header - ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" - CPPFLAGS="${CPPFLAGS} ${LIBEDIT_INCLUDE}" - ac_fn_c_check_header_mongrel "$LINENO" "histedit.h" "ac_cv_header_histedit_h" "$ac_includes_default" -if test "x$ac_cv_header_histedit_h" = xyes; then : - LIBEDIT_HEADER_FOUND=1 -else - LIBEDIT_HEADER_FOUND=0 -fi - - - CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}" - - if test "x${LIBEDIT_HEADER_FOUND}" = "x0" ; then - LIBEDIT_LIB="" - LIBEDIT_INCLUDE="" - else - - PBX_LIBEDIT=1 - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBEDIT 1 -_ACEOF - - fi - fi -fi - - -if test "${PBX_LIBEDIT}" != 1; then - as_fn_error $? "*** Please install the 'libedit' development package." "$LINENO" 5 - exit 1 -fi - - if test "x${PBX_LIBEDIT_IS_UNICODE}" != "x1" -a "${USE_LIBEDIT_IS_UNICODE}" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Testing for libedit unicode support" >&5 -$as_echo_n "checking for Testing for libedit unicode support... " >&6; } - saved_cppflags="${CPPFLAGS}" - if test "x${LIBEDIT_IS_UNICODE_DIR}" != "x"; then - LIBEDIT_IS_UNICODE_INCLUDE="-I${LIBEDIT_IS_UNICODE_DIR}/include" - fi - CPPFLAGS="${CPPFLAGS} ${LIBEDIT_IS_UNICODE_INCLUDE}" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include <histedit.h> -int -main () -{ - el_rfunc_t *callback;; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - PBX_LIBEDIT_IS_UNICODE=1 - -$as_echo "#define HAVE_LIBEDIT_IS_UNICODE 1" >>confdefs.h - - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="${saved_cppflags}" - fi - - - if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then pbxlibdir="" # if --with-ICONV=DIR has been specified, use it. @@ -23044,7 +22629,7 @@ fi if test ! "x${CONFIG_MYSQLCLIENT}" = xNo; then MYSQLCLIENT_INCLUDE=$(${CONFIG_MYSQLCLIENT} --cflags) - MYSQLCLIENT_INCLUDE=$(echo ${MYSQLCLIENT_INCLUDE} | $SED -e "s|-I|-I${MYSQLCLIENT_DIR}|g") + MYSQLCLIENT_INCLUDE=$(echo ${MYSQLCLIENT_INCLUDE} | $SED -e "s|-I|-I${MYSQLCLIENT_DIR}|g" -e "s|-std=c99||g") MYSQLCLIENT_LIB=$(${CONFIG_MYSQLCLIENT} --libs) MYSQLCLIENT_LIB=$(echo ${MYSQLCLIENT_LIB} | $SED -e "s|-L|-L${MYSQLCLIENT_DIR}|g") @@ -23261,7 +22846,7 @@ fi if test ! "x${CONFIG_NEON}" = xNo; then NEON_INCLUDE=$(${CONFIG_NEON} --cflags) - NEON_INCLUDE=$(echo ${NEON_INCLUDE} | $SED -e "s|-I|-I${NEON_DIR}|g") + NEON_INCLUDE=$(echo ${NEON_INCLUDE} | $SED -e "s|-I|-I${NEON_DIR}|g" -e "s|-std=c99||g") NEON_LIB=$(${CONFIG_NEON} --libs) NEON_LIB=$(echo ${NEON_LIB} | $SED -e "s|-L|-L${NEON_DIR}|g") @@ -23381,7 +22966,7 @@ fi if test ! "x${CONFIG_NEON29}" = xNo; then NEON29_INCLUDE=$(${CONFIG_NEON29} --cflags) - NEON29_INCLUDE=$(echo ${NEON29_INCLUDE} | $SED -e "s|-I|-I${NEON29_DIR}|g") + NEON29_INCLUDE=$(echo ${NEON29_INCLUDE} | $SED -e "s|-I|-I${NEON29_DIR}|g" -e "s|-std=c99||g") NEON29_LIB=$(${CONFIG_NEON29} --libs) NEON29_LIB=$(echo ${NEON29_LIB} | $SED -e "s|-L|-L${NEON29_DIR}|g") @@ -23525,7 +23110,7 @@ fi if test ! "x${CONFIG_NETSNMP}" = xNo; then NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} --cflags) - NETSNMP_INCLUDE=$(echo ${NETSNMP_INCLUDE} | $SED -e "s|-I|-I${NETSNMP_DIR}|g") + NETSNMP_INCLUDE=$(echo ${NETSNMP_INCLUDE} | $SED -e "s|-I|-I${NETSNMP_DIR}|g" -e "s|-std=c99||g") NETSNMP_LIB=$(${CONFIG_NETSNMP} --agent-libs) NETSNMP_LIB=$(echo ${NETSNMP_LIB} | $SED -e "s|-L|-L${NETSNMP_DIR}|g") @@ -25011,7 +24596,7 @@ else $as_echo "yes" >&6; } PBX_PJPROJECT=1 - PJPROJECT_INCLUDE="$PJPROJECT_CFLAGS" + PJPROJECT_INCLUDE=$(echo ${PJPROJECT_CFLAGS} | $SED -e "s|-std=c99||g") PJPROJECT_LIB="$PJPROJECT_LIBS" $as_echo "#define HAVE_PJPROJECT 1" >>confdefs.h @@ -26065,7 +25650,7 @@ else $as_echo "yes" >&6; } PBX_PYTHONDEV=1 - PYTHONDEV_INCLUDE="$PYTHONDEV_CFLAGS" + PYTHONDEV_INCLUDE=$(echo ${PYTHONDEV_CFLAGS} | $SED -e "s|-std=c99||g") PYTHONDEV_LIB="$PYTHONDEV_LIBS" $as_echo "#define HAVE_PYTHONDEV 1" >>confdefs.h @@ -26251,7 +25836,7 @@ else $as_echo "yes" >&6; } PBX_PORTAUDIO=1 - PORTAUDIO_INCLUDE="$PORTAUDIO_CFLAGS" + PORTAUDIO_INCLUDE=$(echo ${PORTAUDIO_CFLAGS} | $SED -e "s|-std=c99||g") PORTAUDIO_LIB="$PORTAUDIO_LIBS" $as_echo "#define HAVE_PORTAUDIO 1" >>confdefs.h @@ -29310,6 +28895,7 @@ fi +for ver in 5.3 5.2 5.1; do if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then pbxlibdir="" @@ -29324,13 +28910,14 @@ if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then ast_ext_lib_check_save_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} " - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua5.3" >&5 -$as_echo_n "checking for luaL_newstate in -llua5.3... " >&6; } -if ${ac_cv_lib_lua5_3_luaL_newstate+:} false; then : + as_ac_Lib=`$as_echo "ac_cv_lib_lua${ver}''_luaL_newstate" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua${ver}" >&5 +$as_echo_n "checking for luaL_newstate in -llua${ver}... " >&6; } +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-llua5.3 ${pbxlibdir} -lm $LIBS" +LIBS="-llua${ver} ${pbxlibdir} -lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -29350,225 +28937,18 @@ return luaL_newstate (); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lua5_3_luaL_newstate=yes + eval "$as_ac_Lib=yes" else - ac_cv_lib_lua5_3_luaL_newstate=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lua5_3_luaL_newstate" >&5 -$as_echo "$ac_cv_lib_lua5_3_luaL_newstate" >&6; } -if test "x$ac_cv_lib_lua5_3_luaL_newstate" = xyes; then : - AST_LUA_FOUND=yes -else - AST_LUA_FOUND=no -fi - - CFLAGS="${ast_ext_lib_check_save_CFLAGS}" - - - # now check for the header. - if test "${AST_LUA_FOUND}" = "yes"; then - LUA_LIB="${pbxlibdir} -llua5.3 -lm" - # if --with-LUA=DIR has been specified, use it. - if test "x${LUA_DIR}" != "x"; then - LUA_INCLUDE="-I${LUA_DIR}/include" - fi - LUA_INCLUDE="${LUA_INCLUDE} " - - # check for the header - ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" - CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}" - ac_fn_c_check_header_mongrel "$LINENO" "lua5.3/lua.h" "ac_cv_header_lua5_3_lua_h" "$ac_includes_default" -if test "x$ac_cv_header_lua5_3_lua_h" = xyes; then : - LUA_HEADER_FOUND=1 -else - LUA_HEADER_FOUND=0 -fi - - - CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}" - - if test "x${LUA_HEADER_FOUND}" = "x0" ; then - LUA_LIB="" - LUA_INCLUDE="" - else - - PBX_LUA=1 - cat >>confdefs.h <<_ACEOF -#define HAVE_LUA 1 -_ACEOF - - fi - fi -fi - - -if test "x${PBX_LUA}" = "x1" ; then - if test x"${LUA_DIR}" = x; then - LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.3" - else - LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.3" - fi -fi - - -if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then - pbxlibdir="" - # if --with-LUA=DIR has been specified, use it. - if test "x${LUA_DIR}" != "x"; then - if test -d ${LUA_DIR}/lib; then - pbxlibdir="-L${LUA_DIR}/lib" - else - pbxlibdir="-L${LUA_DIR}" - fi - fi - - ast_ext_lib_check_save_CFLAGS="${CFLAGS}" - CFLAGS="${CFLAGS} " - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua5.2" >&5 -$as_echo_n "checking for luaL_newstate in -llua5.2... " >&6; } -if ${ac_cv_lib_lua5_2_luaL_newstate+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llua5.2 ${pbxlibdir} -lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char luaL_newstate (); -int -main () -{ -return luaL_newstate (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lua5_2_luaL_newstate=yes -else - ac_cv_lib_lua5_2_luaL_newstate=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lua5_2_luaL_newstate" >&5 -$as_echo "$ac_cv_lib_lua5_2_luaL_newstate" >&6; } -if test "x$ac_cv_lib_lua5_2_luaL_newstate" = xyes; then : - AST_LUA_FOUND=yes -else - AST_LUA_FOUND=no -fi - - CFLAGS="${ast_ext_lib_check_save_CFLAGS}" - - - # now check for the header. - if test "${AST_LUA_FOUND}" = "yes"; then - LUA_LIB="${pbxlibdir} -llua5.2 -lm" - # if --with-LUA=DIR has been specified, use it. - if test "x${LUA_DIR}" != "x"; then - LUA_INCLUDE="-I${LUA_DIR}/include" - fi - LUA_INCLUDE="${LUA_INCLUDE} " - - # check for the header - ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" - CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}" - ac_fn_c_check_header_mongrel "$LINENO" "lua5.2/lua.h" "ac_cv_header_lua5_2_lua_h" "$ac_includes_default" -if test "x$ac_cv_header_lua5_2_lua_h" = xyes; then : - LUA_HEADER_FOUND=1 -else - LUA_HEADER_FOUND=0 -fi - - - CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}" - - if test "x${LUA_HEADER_FOUND}" = "x0" ; then - LUA_LIB="" - LUA_INCLUDE="" - else - - PBX_LUA=1 - cat >>confdefs.h <<_ACEOF -#define HAVE_LUA 1 -_ACEOF - - fi - fi -fi - - -if test "x${PBX_LUA}" = "x1" ; then - if test x"${LUA_DIR}" = x; then - LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.2" - else - LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.2" - fi -fi - - -if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then - pbxlibdir="" - # if --with-LUA=DIR has been specified, use it. - if test "x${LUA_DIR}" != "x"; then - if test -d ${LUA_DIR}/lib; then - pbxlibdir="-L${LUA_DIR}/lib" - else - pbxlibdir="-L${LUA_DIR}" - fi - fi - - ast_ext_lib_check_save_CFLAGS="${CFLAGS}" - CFLAGS="${CFLAGS} " - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua5.1" >&5 -$as_echo_n "checking for luaL_newstate in -llua5.1... " >&6; } -if ${ac_cv_lib_lua5_1_luaL_newstate+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llua5.1 ${pbxlibdir} -lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char luaL_newstate (); -int -main () -{ -return luaL_newstate (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lua5_1_luaL_newstate=yes -else - ac_cv_lib_lua5_1_luaL_newstate=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lua5_1_luaL_newstate" >&5 -$as_echo "$ac_cv_lib_lua5_1_luaL_newstate" >&6; } -if test "x$ac_cv_lib_lua5_1_luaL_newstate" = xyes; then : +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_LUA_FOUND=yes else AST_LUA_FOUND=no @@ -29579,7 +28959,7 @@ fi # now check for the header. if test "${AST_LUA_FOUND}" = "yes"; then - LUA_LIB="${pbxlibdir} -llua5.1 -lm" + LUA_LIB="${pbxlibdir} -llua${ver} -lm" # if --with-LUA=DIR has been specified, use it. if test "x${LUA_DIR}" != "x"; then LUA_INCLUDE="-I${LUA_DIR}/include" @@ -29589,8 +28969,9 @@ fi # check for the header ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}" - ac_fn_c_check_header_mongrel "$LINENO" "lua5.1/lua.h" "ac_cv_header_lua5_1_lua_h" "$ac_includes_default" -if test "x$ac_cv_header_lua5_1_lua_h" = xyes; then : + as_ac_Header=`$as_echo "ac_cv_header_lua${ver}/lua.h" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "lua${ver}/lua.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : LUA_HEADER_FOUND=1 else LUA_HEADER_FOUND=0 @@ -29614,13 +28995,15 @@ _ACEOF fi -if test "x${PBX_LUA}" = "x1" ; then - if test x"${LUA_DIR}" = x; then - LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.1" - else - LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.1" + if test "x${PBX_LUA}" = "x1" ; then + if test x"${LUA_DIR}" = x; then + LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua${ver}" + else + LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua${ver}" + fi + break; fi -fi +done # Some distributions (like openSUSE and NetBSD) remove the 5.x suffix. @@ -32757,7 +32140,7 @@ else $as_echo "yes" >&6; } PBX_GMIME=1 - GMIME_INCLUDE="$GMIME_CFLAGS" + GMIME_INCLUDE=$(echo ${GMIME_CFLAGS} | $SED -e "s|-std=c99||g") GMIME_LIB="$GMIME_LIBS" $as_echo "#define HAVE_GMIME 1" >>confdefs.h @@ -33666,7 +33049,7 @@ fi if test ! "x${CONFIG_SDL}" = xNo; then SDL_INCLUDE=$(${CONFIG_SDL} --cflags) - SDL_INCLUDE=$(echo ${SDL_INCLUDE} | $SED -e "s|-I|-I${SDL_DIR}|g") + SDL_INCLUDE=$(echo ${SDL_INCLUDE} | $SED -e "s|-I|-I${SDL_DIR}|g" -e "s|-std=c99||g") SDL_LIB=$(${CONFIG_SDL} --libs) SDL_LIB=$(echo ${SDL_LIB} | $SED -e "s|-L|-L${SDL_DIR}|g") @@ -34194,7 +33577,7 @@ else $as_echo "yes" >&6; } PBX_GTK2=1 - GTK2_INCLUDE="$GTK2_CFLAGS" + GTK2_INCLUDE=$(echo ${GTK2_CFLAGS} | $SED -e "s|-std=c99||g") GTK2_LIB="$GTK2_LIBS" $as_echo "#define HAVE_GTK2 1" >>confdefs.h @@ -34305,7 +33688,7 @@ else $as_echo "yes" >&6; } PBX_SYSTEMD=1 - SYSTEMD_INCLUDE="$SYSTEMD_CFLAGS" + SYSTEMD_INCLUDE=$(echo ${SYSTEMD_CFLAGS} | $SED -e "s|-std=c99||g") SYSTEMD_LIB="$SYSTEMD_LIBS" $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h @@ -36184,9 +35567,9 @@ fi ${ac_cv_path_EGREP} 'CURSES|GTK2|OSARCH|NEWT' makeopts > makeopts.acbak2 if test "x${ac_cv_path_CMP}" = "x:"; then ( cd `pwd`/menuselect && ./configure ) -else if ${ac_cv_path_CMP} -s makeopts.acbak makeopts.acbak2; then : ; else +elif ${ac_cv_path_CMP} -s makeopts.acbak makeopts.acbak2; then : ; else ( cd `pwd`/menuselect && ./configure ) -fi ; fi +fi rm makeopts.acbak makeopts.acbak2 |