From e4e6a77a803c7acca408b54801fd369f172ba9fe Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Fri, 19 Jun 2009 17:50:40 +0200 Subject: [PATCH] check for dladdr() and dl_iterate_phdr() if --enable-integrity-test set --- configure.in | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configure.in b/configure.in index 433f736b7..4388bc414 100644 --- a/configure.in +++ b/configure.in @@ -1039,6 +1039,25 @@ if test x$capabilities = xlibcap; then AC_CHECK_HEADER([sys/capability.h],,[AC_MSG_ERROR([libcap header sys/capability.h not found!])]) fi +if test x$integrity_test = xtrue; then + AC_MSG_CHECKING([for dladdr()]) + AC_TRY_COMPILE( + [#define _GNU_SOURCE + #include ], + [Dl_info info; dladdr(main, &info);], + [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); + AC_MSG_ERROR([dladdr() not supported, required by integrity-test!])] + ) + AC_MSG_CHECKING([for dl_iterate_phdr()]) + AC_TRY_COMPILE( + [#define _GNU_SOURCE + #include ], + [dl_iterate_phdr((void*)0, (void*)0);], + [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); + AC_MSG_ERROR([dl_iterate_phdr() not supported, required by integrity-test!])] + ) +fi + dnl ====================================== dnl collect all plugins for libstrongswan dnl ======================================