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: 016228c158 ("configure: Check for actual functions in libraries
with AC_CHECK_LIB")
This commit is contained in:
Tobias Brunner 2017-03-22 16:33:27 +01:00
parent 1003cf2330
commit 5e8e71d405
1 changed files with 1 additions and 1 deletions

View File

@ -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"