aboutsummaryrefslogtreecommitdiff
path: root/libsframe/configure.ac
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2023-02-16 13:57:58 -0800
committerIndu Bhagat <indu.bhagat@oracle.com>2024-04-25 15:03:50 -0700
commitbb5f22a1a3db024ed8068e87a9df4ee2ee516252 (patch)
treefb64b62400d5c673b945f851d47e269c2ec5f267 /libsframe/configure.ac
parentf512d7fb5d9bdda349b3410d1905599b5989e35e (diff)
downloadfsf-binutils-gdb-bb5f22a1a3db024ed8068e87a9df4ee2ee516252.zip
fsf-binutils-gdb-bb5f22a1a3db024ed8068e87a9df4ee2ee516252.tar.gz
fsf-binutils-gdb-bb5f22a1a3db024ed8068e87a9df4ee2ee516252.tar.bz2
libsframest: use as a test tool instead
Add a configure time check for dl_iterate_phdr and run libsframe.stacktrace testsuite using libsframest. libsframest is the library for stack tracing using the SFrame stack trace format. libsframest is not installed anymore but used in the testsuite only. TBD: - More renamings are in order. - Cleanup the .exp files. - Disable (libsframest based) stack tracer tests in a cross build
Diffstat (limited to 'libsframe/configure.ac')
-rw-r--r--libsframe/configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/libsframe/configure.ac b/libsframe/configure.ac
index 3059303..fdd4a6d 100644
--- a/libsframe/configure.ac
+++ b/libsframe/configure.ac
@@ -138,6 +138,25 @@ AC_CHECK_HEADERS(byteswap.h endian.h)
dnl Check for bswap_{16,32,64}
AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64], [], [], [[#include <byteswap.h>]])
+dnl Check for dl_iterate_phdr. Used in the libsframe.stacktrace testsuite.
+dnl The stacktrace testsuite is NOT built and run for build != target.
+AC_CHECK_HEADERS(link.h)
+if test "$ac_cv_header_link_h" = "no"; then
+ have_dl_iterate_phdr=no
+else
+ AC_CHECK_FUNC([dl_iterate_phdr],
+ [have_dl_iterate_phdr=yes],
+ [have_dl_iterate_phdr=no])
+fi
+if test "$have_dl_iterate_phdr" = "yes"; then
+ AC_DEFINE(HAVE_DL_ITERATE_PHDR, 1, [Define if dl_iterate_phdr is available.])
+fi
+AM_CONDITIONAL([HAVE_DL_ITERATE_PHDR], [test "x$have_dl_iterate_phdr" = "xyes"])
+
+dnl Check for dl_iterate_phdr
+AC_CHECK_HEADERS(link.h)
+AC_CHECK_DECLS
+
AC_CONFIG_FILES(Makefile)
AC_CONFIG_HEADERS(config.h)
AC_OUTPUT