diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2013-02-18 13:27:22 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-02-18 15:29:17 -0500 |
commit | 554a0da74a3f6fc945503a3eb1bfcc9038441b39 (patch) | |
tree | de7502c8e6a6628ab2712cc30d028c0d08a5c987 /configure.ac | |
parent | 1cc9e08d2fbd59e34cf5009acd5067a6b171c20a (diff) |
compositor: Use libunwind if available for better backtraces
libunwind has a dwarf parser and automatically queries the dlinfo
for location of dlopened modules. The resulting backtrace is much
better and includes stack frames in dynamically loaded modules.
krh: Originally submitted for Xorg, adapted for weston:
http://lists.x.org/archives/xorg-devel/2013-February/035493.html
Note this require libunwind at least 1.1 to get the pkg-config files.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 32fbb4bd..e613aa05 100644 --- a/configure.ac +++ b/configure.ac @@ -281,6 +281,13 @@ if test "x$GCC" = "xyes"; then fi AC_SUBST(GCC_CFLAGS) +PKG_CHECK_MODULES(LIBUNWIND, libunwind, + [have_libunwind=yes], [have_libunwind=no]) +if test "x$have_libunwind" = xyes; then + AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support]) +fi +AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$have_libunwind" = xyes]) + if test "x$WESTON_NATIVE_BACKEND" = "x"; then WESTON_NATIVE_BACKEND="drm-backend.so" fi |