diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-12-18 00:08:13 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-12-18 00:08:13 +0000 |
commit | b98e47d1195bd6e1da8aae20844095bec1d88847 (patch) | |
tree | 6df839e0e6f2e1b5ae9c9524ed3942edd3d562e3 /configure | |
parent | d8744246aa377d2275f6f72e745ee11bdc13bac8 (diff) |
Merged revisions 298960 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r298960 | tilghman | 2010-12-17 17:52:04 -0600 (Fri, 17 Dec 2010) | 20 lines
Merged revisions 298957 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r298957 | tilghman | 2010-12-17 17:30:55 -0600 (Fri, 17 Dec 2010) | 13 lines
Merged revisions 298905 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r298905 | tilghman | 2010-12-17 15:40:56 -0600 (Fri, 17 Dec 2010) | 6 lines
Let Asterisk find better backtrace information with libbfd.
The menuselect option BETTER_BACKTRACES, if enabled, will use libbfd to search
for better symbol information within both the Asterisk binary, as well as
loaded modules, to assist when using inline backtraces to track down problems.
Review: https://reviewboard.asterisk.org/r/1055/
........
................
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 256 |
1 files changed, 218 insertions, 38 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 298137 . +# From configure.ac Revision: 298819 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65 for asterisk trunk. # @@ -650,6 +650,7 @@ CONFIG_LIBXML2 GSM_INTERNAL PBX_DAHDI_HALF_FULL PKGCONFIG +PBX_DLADDR PBX_IP_MTU_DISCOVER PBX_GLOB_BRACE PBX_GLOB_NOMAGIC @@ -977,10 +978,10 @@ PBX_GSM GSM_DIR GSM_INCLUDE GSM_LIB -PBX_BKTR -BKTR_DIR -BKTR_INCLUDE -BKTR_LIB +PBX_FFMPEG +FFMPEG_DIR +FFMPEG_INCLUDE +FFMPEG_LIB PBX_DAHDI DAHDI_DIR DAHDI_INCLUDE @@ -1001,10 +1002,14 @@ PBX_BLUETOOTH BLUETOOTH_DIR BLUETOOTH_INCLUDE BLUETOOTH_LIB -PBX_FFMPEG -FFMPEG_DIR -FFMPEG_INCLUDE -FFMPEG_LIB +PBX_BKTR +BKTR_DIR +BKTR_INCLUDE +BKTR_LIB +PBX_BFD +BFD_DIR +BFD_INCLUDE +BFD_LIB PBX_ALSA ALSA_DIR ALSA_INCLUDE @@ -1149,13 +1154,14 @@ with_gnu_ld enable_dev_mode enable_coverage with_asound -with_avcodec +with_bfd +with_execinfo with_bluetooth with_cap with_curses with_crypto with_dahdi -with_execinfo +with_avcodec with_gsm with_gtk2 with_gmime @@ -1860,13 +1866,14 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-asound=PATH use Advanced Linux Sound Architecture files in PATH - --with-avcodec=PATH use Ffmpeg and avcodec files in PATH + --with-bfd=PATH use Debug symbol decoding files in PATH + --with-execinfo=PATH use Stack Backtrace files in PATH --with-bluetooth=PATH use Bluetooth files in PATH --with-cap=PATH use POSIX 1.e capabilities files in PATH --with-curses=PATH use curses files in PATH --with-crypto=PATH use OpenSSL Cryptography files in PATH --with-dahdi=PATH use DAHDI files in PATH - --with-execinfo=PATH use Stack Backtrace files in PATH + --with-avcodec=PATH use Ffmpeg and avcodec files in PATH --with-gsm=PATH use External GSM files in PATH, use 'internal' GSM otherwise --with-gtk2=PATH use gtk2 files in PATH @@ -8706,26 +8713,61 @@ fi - FFMPEG_DESCRIP="Ffmpeg and avcodec" - FFMPEG_OPTION="avcodec" - PBX_FFMPEG=0 + BFD_DESCRIP="Debug symbol decoding" + BFD_OPTION="bfd" + PBX_BFD=0 -# Check whether --with-avcodec was given. -if test "${with_avcodec+set}" = set; then : - withval=$with_avcodec; +# Check whether --with-bfd was given. +if test "${with_bfd+set}" = set; then : + withval=$with_bfd; case ${withval} in n|no) - USE_FFMPEG=no + USE_BFD=no # -1 is a magic value used by menuselect to know that the package # was disabled, other than 'not found' - PBX_FFMPEG=-1 + PBX_BFD=-1 ;; y|ye|yes) - ac_mandatory_list="${ac_mandatory_list} FFMPEG" + ac_mandatory_list="${ac_mandatory_list} BFD" ;; *) - FFMPEG_DIR="${withval}" - ac_mandatory_list="${ac_mandatory_list} FFMPEG" + BFD_DIR="${withval}" + ac_mandatory_list="${ac_mandatory_list} BFD" + ;; + esac + +fi + + + + + + + + +# BKTR is used for backtrace support on platforms that do not +# have it natively. + + BKTR_DESCRIP="Stack Backtrace" + BKTR_OPTION="execinfo" + PBX_BKTR=0 + +# Check whether --with-execinfo was given. +if test "${with_execinfo+set}" = set; then : + withval=$with_execinfo; + case ${withval} in + n|no) + USE_BKTR=no + # -1 is a magic value used by menuselect to know that the package + # was disabled, other than 'not found' + PBX_BKTR=-1 + ;; + y|ye|yes) + ac_mandatory_list="${ac_mandatory_list} BKTR" + ;; + *) + BKTR_DIR="${withval}" + ac_mandatory_list="${ac_mandatory_list} BKTR" ;; esac @@ -8898,29 +8940,26 @@ fi -# BKTR is used for backtrace support on platforms that do not -# have it natively. - - BKTR_DESCRIP="Stack Backtrace" - BKTR_OPTION="execinfo" - PBX_BKTR=0 + FFMPEG_DESCRIP="Ffmpeg and avcodec" + FFMPEG_OPTION="avcodec" + PBX_FFMPEG=0 -# Check whether --with-execinfo was given. -if test "${with_execinfo+set}" = set; then : - withval=$with_execinfo; +# Check whether --with-avcodec was given. +if test "${with_avcodec+set}" = set; then : + withval=$with_avcodec; case ${withval} in n|no) - USE_BKTR=no + USE_FFMPEG=no # -1 is a magic value used by menuselect to know that the package # was disabled, other than 'not found' - PBX_BKTR=-1 + PBX_FFMPEG=-1 ;; y|ye|yes) - ac_mandatory_list="${ac_mandatory_list} BKTR" + ac_mandatory_list="${ac_mandatory_list} FFMPEG" ;; *) - BKTR_DIR="${withval}" - ac_mandatory_list="${ac_mandatory_list} BKTR" + FFMPEG_DIR="${withval}" + ac_mandatory_list="${ac_mandatory_list} FFMPEG" ;; esac @@ -16677,6 +16716,41 @@ $as_echo "#define TYPEOF_FD_SET_FDS_BITS long long" >>confdefs.h 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; } +PBX_DLADDR=0 +old_LIBS=${LIBS} +LIBS="${LIBS} -ldl" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _GNU_SOURCE 1 +#include <dlfcn.h> +int +main () +{ +dladdr((void *)0, (void *)0) + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + PBX_DLADDR=1 + + +$as_echo "#define HAVE_DLADDR 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_exeext conftest.$ac_ext +LIBS=${old_LIBS} + # PKGCONFIG is used in later tests 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. @@ -16881,6 +16955,112 @@ fi +if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then + pbxlibdir="" + # if --with-BFD=DIR has been specified, use it. + if test "x${BFD_DIR}" != "x"; then + if test -d ${BFD_DIR}/lib; then + pbxlibdir="-L${BFD_DIR}/lib" + else + pbxlibdir="-L${BFD_DIR}" + fi + fi + pbxfuncname="bfd_openr" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_BFD_FOUND=yes + else + ast_ext_lib_check_save_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} " + as_ac_Lib=`$as_echo "ac_cv_lib_bfd_${pbxfuncname}" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbfd" >&5 +$as_echo_n "checking for ${pbxfuncname} in -lbfd... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbfd ${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 ${pbxfuncname} (); +int +main () +{ +return ${pbxfuncname} (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_ac_Lib=yes" +else + 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 +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +eval as_val=\$$as_ac_Lib + if test "x$as_val" = x""yes; then : + AST_BFD_FOUND=yes +else + AST_BFD_FOUND=no +fi + + CFLAGS="${ast_ext_lib_check_save_CFLAGS}" + fi + + # now check for the header. + if test "${AST_BFD_FOUND}" = "yes"; then + BFD_LIB="${pbxlibdir} -lbfd " + # if --with-BFD=DIR has been specified, use it. + if test "x${BFD_DIR}" != "x"; then + BFD_INCLUDE="-I${BFD_DIR}/include" + fi + BFD_INCLUDE="${BFD_INCLUDE} " + if test "xbfd.h" = "x" ; then # no header, assume found + BFD_HEADER_FOUND="1" + else # check for the header + ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" + CPPFLAGS="${CPPFLAGS} ${BFD_INCLUDE}" + ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default" +if test "x$ac_cv_header_bfd_h" = x""yes; then : + BFD_HEADER_FOUND=1 +else + BFD_HEADER_FOUND=0 +fi + + + CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}" + fi + if test "x${BFD_HEADER_FOUND}" = "x0" ; then + BFD_LIB="" + BFD_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + BFD_LIB="" + fi + PBX_BFD=1 + cat >>confdefs.h <<_ACEOF +#define HAVE_BFD 1 +_ACEOF + + fi + fi +fi + + + + if test "x${PBX_CURSES}" != "x1" -a "${USE_CURSES}" != "no"; then pbxlibdir="" # if --with-CURSES=DIR has been specified, use it. |