mirror of
https://github.com/ianlancetaylor/libbacktrace.git
synced 2026-03-31 06:29:07 +08:00
libbacktrace: check for sys/link.h
QNX uses sys/link.h rather than link.h for dl_iterate_phdr Fixes #86 * configure.ac: Check for sys/link.h. Use either link.h or sys/link.h when checking for dl_iterate_phdr. * elf.c: Include sys/link.h if available. * configure, config.h.in: Regenerate.
This commit is contained in:
10
configure.ac
10
configure.ac
@@ -325,13 +325,17 @@ fi
|
||||
AC_SUBST(BACKTRACE_USES_MALLOC)
|
||||
|
||||
# Check for dl_iterate_phdr.
|
||||
AC_CHECK_HEADERS(link.h)
|
||||
if test "$ac_cv_header_link_h" = "no"; then
|
||||
AC_CHECK_HEADERS(link.h sys/link.h)
|
||||
if test "$ac_cv_header_link_h" = "no" -a "$ac_cv_header_sys_link_h" = "no"; then
|
||||
have_dl_iterate_phdr=no
|
||||
else
|
||||
if test -n "${with_target_subdir}"; then
|
||||
link_h=link.h
|
||||
if test "$ac_cv_header_link_h" = "no"; then
|
||||
link_h=sys/link.h
|
||||
fi
|
||||
# When built as a GCC target library, we can't do a link test.
|
||||
AC_EGREP_HEADER([dl_iterate_phdr], [link.h], [have_dl_iterate_phdr=yes],
|
||||
AC_EGREP_HEADER([dl_iterate_phdr], [$link_h], [have_dl_iterate_phdr=yes],
|
||||
[have_dl_iterate_phdr=no])
|
||||
case "${host}" in
|
||||
*-*-solaris2.10*)
|
||||
|
||||
Reference in New Issue
Block a user