summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.ac15
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 1e79c3c2e8..c8371f304e 100755
--- a/configure.ac
+++ b/configure.ac
@@ -2113,6 +2113,19 @@ if test x"${enable_backtrace}" != x"no" ; then
AC_DEFINE([HAVE_LIBUNWIND], [1], [libunwind])
backtrace_ok=yes
], [
+ true
+ ])
+
+ if test "$backtrace_ok" = "no"; then
+ AC_CHECK_HEADER([unwind.h], [
+ AC_SEARCH_LIBS([unw_getcontext], [unwind], [
+ AC_DEFINE([HAVE_LIBUNWIND], [1], [libunwind])
+ backtrace_ok=yes
+ ])
+ ])
+ fi
+
+ if test "$backtrace_ok" = "no"; then
case "$host_os" in
sunos* | solaris2*)
AC_CHECK_FUNCS([printstack], [
@@ -2129,7 +2142,7 @@ if test x"${enable_backtrace}" != x"no" ; then
],, [-lm])
])
fi
- ])
+ fi
if test x"${enable_backtrace}" = x"yes" -a x"${backtrace_ok}" = x"no"; then
dnl user explicitly requested backtrace but we failed to find support