diff --git a/configure.ac b/configure.ac index 824732be19..6a8cc20682 100644 --- a/configure.ac +++ b/configure.ac @@ -631,7 +631,7 @@ if test x$TARGET_OS = xdarwin; then AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"]) fi -AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h]) +AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h execinfo.h]) AC_CHECK_DECLS([strnlen]) @@ -735,6 +735,13 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include [ AC_MSG_RESULT(no)] ) +# ensure backtrace() is found, check -lexecinfo if necessary +if test x$TARGET_OS != xwindows; then + AC_SEARCH_LIBS([backtrace], [execinfo], [], [ + AC_MSG_ERROR([Unable to find backtrace()]) + ]) +fi + # Check for reduced exports if test x$use_reduce_exports = xyes; then AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[RE_CXXFLAGS="-fvisibility=hidden"],