diff options
author | Rob Clark <[email protected]> | 2017-03-24 16:07:03 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-04-03 11:32:17 -0400 |
commit | 70c272004f727457e852ba5f2498754b07a7d995 (patch) | |
tree | 2fc0cd52829ae4304dbcfdcbbe1e707d49713fd0 /configure.ac | |
parent | c3c884c49ce6ab06df2e49aa39abbb051c9959b5 (diff) |
gallium/util: libunwind support
It's kinda sad that (a) we don't have debug_backtrace support on !X86
and that (b) we re-invent our own crude backtrace support in the first
place. If available, use libunwind instead. The backtrace format is
based on what xserver and weston use, since it is nice not to have to
figure out a different format.
Signed-off-by: Rob Clark <[email protected]>
Acked-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 70885fb9a6b..016e38fb599 100644 --- a/configure.ac +++ b/configure.ac @@ -1025,6 +1025,30 @@ AC_SUBST([LLVM_LIBS]) AC_SUBST([LLVM_LDFLAGS]) AC_SUBST([LLVM_INCLUDEDIR]) +dnl +dnl libunwind +dnl +AC_ARG_ENABLE([libunwind], + [AS_HELP_STRING([--enable-libunwind], + [Use libunwind for backtracing (default: auto)])], + [LIBUNWIND="$enableval"], + [LIBUNWIND="auto"]) + +PKG_CHECK_MODULES(LIBUNWIND, libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no]) +if test "x$LIBUNWIND" = "xauto"; then + LIBUNWIND="$HAVE_LIBUNWIND" +fi + +if test "x$LIBUNWIND" = "xyes"; then + if test "x$HAVE_LIBUNWIND" != "xyes"; then + AC_MSG_ERROR([libunwind requested but not installed.]) + fi + AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support]) +fi + +AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$LIBUNWIND" = xyes]) + + dnl Options for APIs AC_ARG_ENABLE([opengl], [AS_HELP_STRING([--disable-opengl], |