From 620fdbb17a726e8ef9e57dd00b30c5ea961699ba Mon Sep 17 00:00:00 2001 From: tilghman Date: Fri, 17 Dec 2010 23:52:04 +0000 Subject: 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. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@298960 f38db490-d61c-443f-a65b-d21fe96a405b --- configure.ac | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 32d43e786..219897632 100644 --- a/configure.ac +++ b/configure.ac @@ -361,16 +361,17 @@ AC_SUBST(AST_CODE_COVERAGE) # to make things easier for the users. AST_EXT_LIB_SETUP([ALSA], [Advanced Linux Sound Architecture], [asound]) -AST_EXT_LIB_SETUP([FFMPEG], [Ffmpeg and avcodec], [avcodec]) +AST_EXT_LIB_SETUP([BFD], [Debug symbol decoding], [bfd]) + +# BKTR is used for backtrace support on platforms that do not +# have it natively. +AST_EXT_LIB_SETUP([BKTR], [Stack Backtrace], [execinfo]) AST_EXT_LIB_SETUP([BLUETOOTH], [Bluetooth], [bluetooth]) AST_EXT_LIB_SETUP([CAP], [POSIX 1.e capabilities], [cap]) AST_EXT_LIB_SETUP([CURSES], [curses], [curses]) AST_EXT_LIB_SETUP([CRYPTO], [OpenSSL Cryptography], [crypto]) AST_EXT_LIB_SETUP([DAHDI], [DAHDI], [dahdi]) - -# BKTR is used for backtrace support on platforms that do not -# have it natively. -AST_EXT_LIB_SETUP([BKTR], [Stack Backtrace], [execinfo]) +AST_EXT_LIB_SETUP([FFMPEG], [Ffmpeg and avcodec], [avcodec]) AST_EXT_LIB_SETUP([GSM], [External GSM], [gsm], [, use 'internal' GSM otherwise]) AST_EXT_LIB_SETUP([GTK2], [gtk2], [gtk2]) AST_EXT_LIB_SETUP([GMIME], [GMime], [gmime]) @@ -1006,6 +1007,23 @@ else if test $ac_cv_sizeof_long_long = $ac_cv_sizeof_fd_set_fds_bits; then AC_DEFINE([TYPEOF_FD_SET_FDS_BITS], [long long], [Define to a type of the same size as fd_set.fds_bits[[0]]]) fi ; fi ; fi +AC_MSG_CHECKING(for dladdr in dlfcn.h) +PBX_DLADDR=0 +old_LIBS=${LIBS} +LIBS="${LIBS} -ldl" +AC_LINK_IFELSE( + AC_LANG_PROGRAM([#define _GNU_SOURCE 1 +#include ], + [dladdr((void *)0, (void *)0)] + ), + AC_MSG_RESULT(yes) + PBX_DLADDR=1 + AC_SUBST([PBX_DLADDR]) + AC_DEFINE([HAVE_DLADDR], 1, [Define to 1 if your system has the dladdr() GNU extension]), + AC_MSG_RESULT(no) +) +LIBS=${old_LIBS} + # PKGCONFIG is used in later tests AC_CHECK_TOOL(PKGCONFIG, pkg-config, No) @@ -1014,6 +1032,8 @@ AC_CHECK_TOOL(PKGCONFIG, pkg-config, No) AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -ldl]) +AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_openr], [bfd.h]) + AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h]) if test "x${OSARCH}" = "xlinux-gnu" ; then -- cgit v1.2.3