From 5e8e71d4050cd3a6e123252d87920196be33ab70 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Wed, 22 Mar 2017 16:33:27 +0100 Subject: [PATCH] configure: Fix test for libunwind Most functions in libunwind.h are actually mapped via macros to obscure function names, so checking for these would require some elaborate test via AC_LINK_IFELSE(). However, unw_backtrace() seems to be one of the few actual functions so lets use this for now, even though we don't call it ourselves later. Fixes: 016228c15843 ("configure: Check for actual functions in libraries with AC_CHECK_LIB") --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5453e5b015..89d885c773 100644 --- a/configure.ac +++ b/configure.ac @@ -1222,7 +1222,7 @@ if test x$bfd_backtraces = xtrue; then fi if test x$unwind_backtraces = xtrue; then - AC_CHECK_LIB([unwind],[unw_getcontext],[LIBS="$LIBS"],[AC_MSG_ERROR([libunwind not found!])],[]) + AC_CHECK_LIB([unwind],[unw_backtrace],[LIBS="$LIBS"],[AC_MSG_ERROR([libunwind not found!])],[]) AC_CHECK_HEADER([libunwind.h],[AC_DEFINE([HAVE_LIBUNWIND_H],,[have libunwind.h])], [AC_MSG_ERROR([libunwind.h header not found!])]) UNWINDLIB="-lunwind" -- 2.47.2