aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-04-05 16:26:27 +0200
committerMartin Willi <martin@revosec.ch>2013-05-06 15:15:24 +0200
commit83714577a9c99c9971ce2d3968ab773b37f4ea5b (patch)
treeeb3a09de447b727bd032fbf0244ecda0b39ed8f7 /configure.in
parentd8f6f0c01c628e83f6bf5493bcaf03e3e7b86ed5 (diff)
downloadstrongswan-83714577a9c99c9971ce2d3968ab773b37f4ea5b.tar.bz2
strongswan-83714577a9c99c9971ce2d3968ab773b37f4ea5b.tar.xz
backtrace: add an alternative stack unwinding implementation using libunwind
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index f0a2ec961..311b15c6b 100644
--- a/configure.in
+++ b/configure.in
@@ -238,6 +238,7 @@ ARG_ENABL_SET([radattr], [enable plugin to inject and process custom RADI
ARG_ENABL_SET([vstr], [enforce using the Vstr string library to replace glibc-like printf hooks.])
ARG_ENABL_SET([monolithic], [build monolithic version of libstrongswan that includes all enabled plugins. Similarly, the plugins of charon are assembled in libcharon.])
ARG_ENABL_SET([bfd-backtraces], [use binutils libbfd to resolve backtraces for memory leaks and segfaults.])
+ARG_ENABL_SET([unwind-backtraces],[use libunwind to create backtraces for memory leaks and segfaults.])
ARG_ENABL_SET([unit-tests], [enable unit tests using the check test framework.])
ARG_ENABL_SET([tkm], [enable Trusted Key Manager support.])
@@ -886,6 +887,14 @@ if test x$bfd_backtraces = xtrue; then
AC_SUBST(BFDLIB)
fi
+if test x$unwind_backtraces = xtrue; then
+ AC_CHECK_LIB([unwind],[main],[LIBS="$LIBS"],[AC_MSG_ERROR([libunwind not found!])],[])
+ AC_CHECK_HEADER([libunwind.h],[AC_DEFINE([HAVE_LIBUNWIND_H],,[have libunwind.h])],
+ [AC_MSG_ERROR([libunwind.h header not found!])])
+ UNWINDLIB="-lunwind"
+ AC_SUBST(UNWINDLIB)
+fi
+
AM_CONDITIONAL(USE_DEV_HEADERS, [test "x$dev_headers" != xno])
if test x$dev_headers = xyes; then
dev_headers="$includedir/strongswan"