1 AC_DEFUN([MOONLIGHT_CHECK_UNWIND],
3 AC_CHECK_HEADER(libunwind.h)
5 AC_MSG_CHECKING(for libunwind)
7 LDFLAGS_save="$LDFLAGS"
10 LDFLAGS="$LDFLAGS -liberty -lunwind"
11 LIBS="$LIBS -liberty -lunwind"
13 AC_CHECK_LIB(unwind, backtrace, have_unwind_libs="yes", have_unwind_libs="no")
15 LDFLAGS="$LDFLAGS_save"
18 if test "$have_unwind_libs" = "no"; then
22 if test "x$with_debug" = "xyes"; then
23 UNWIND_LIBS="-liberty -lunwind"
24 AC_DEFINE([HAVE_UNWIND], [1], [libunwind support])