Prettify configure output when checking for backtrace().
The output of "checking for backtrace()" was interspersed with the output of "checking for library containing backtrace", which was ugly and potentially confusing, so move AC_SEARCH_LIBS() out of AC_CACHE_CHECK() to fix it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
26
configure.in
26
configure.in
@@ -4157,28 +4157,26 @@ fi
|
||||
|
||||
dnl backtrace() and backtrace_symbols() for wxStackWalker
|
||||
if test "$wxUSE_STACKWALKER" = "yes" -a "$wxUSE_UNIX" = "yes"; then
|
||||
AC_CACHE_CHECK([for backtrace() in <execinfo.h>], wx_cv_func_backtrace,
|
||||
AC_CACHE_CHECK([for backtrace()], wx_cv_func_backtrace,
|
||||
[
|
||||
AC_SEARCH_LIBS(backtrace, execinfo,
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_TRY_COMPILE([#include <execinfo.h>],
|
||||
[
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_TRY_LINK([#include <execinfo.h>],
|
||||
[
|
||||
void *trace[1];
|
||||
char **messages;
|
||||
backtrace(trace, 1);
|
||||
messages = backtrace_symbols(trace, 1);
|
||||
],
|
||||
wx_cv_func_backtrace=yes,
|
||||
wx_cv_func_backtrace=no
|
||||
)
|
||||
AC_LANG_POP()
|
||||
void *trace[1];
|
||||
char **messages;
|
||||
backtrace(trace, 1);
|
||||
messages = backtrace_symbols(trace, 1);
|
||||
],
|
||||
wx_cv_func_backtrace=yes,
|
||||
wx_cv_func_backtrace=no
|
||||
)
|
||||
AC_LANG_POP()
|
||||
]
|
||||
)
|
||||
|
||||
dnl Under BSD it can require linking with libexecinfo.
|
||||
AC_SEARCH_LIBS(backtrace, execinfo, , [wx_cv_func_backtrace=no])
|
||||
|
||||
if test "$wx_cv_func_backtrace" = "no"; then
|
||||
AC_MSG_WARN([backtrace() is not available, wxStackWalker will not be available])
|
||||
wxUSE_STACKWALKER=no
|
||||
|
Reference in New Issue
Block a user