From: Tobias Brunner Date: Wed, 22 Mar 2017 15:33:27 +0000 (+0100) Subject: configure: Fix test for libunwind X-Git-Tag: 5.5.2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e8e71d4050cd3a6e123252d87920196be33ab70;p=thirdparty%2Fstrongswan.git 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") --- 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"