This is the location where this header is installed on Debian-based
systems.
* configure.ac: Check for libiberty/demangle.h in addition to
demangle.h.
* unwind.c [USE_DEMANGLE]: Include either <demangle.h> or
<libiberty_demangle.h> based on the presence of HAVE_DEMANGLE_H and
HAVE_LIBIBERTY_DEMANGLE_H macros.
AS_IF([test "x$use_libunwind" = xyes && test "x$with_libiberty" != xno],
[saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $libiberty_CPPFLAGS"
- AC_CHECK_HEADERS([demangle.h],
+ AC_CHECK_HEADERS([demangle.h libiberty/demangle.h],
[saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $libiberty_LDFLAGS"
AC_CHECK_LIB([iberty],[cplus_demangle],
#include <libunwind-ptrace.h>
#ifdef USE_DEMANGLE
-# include <demangle.h>
+# if defined HAVE_DEMANGLE_H
+# include <demangle.h>
+# elif defined HAVE_LIBIBERTY_DEMANGLE_H
+# include <libiberty/demangle.h>
+# endif
#endif
#include "xstring.h"