1 From a0cb41ba72913eda06049d266ec43ea8f52b5bee Mon Sep 17 00:00:00 2001
2 From: Carlos Rafael Giani <dv@pseudoterminal.org>
3 Date: Fri, 11 Aug 2017 21:21:36 +0200
4 Subject: [PATCH] configure: Add switches for enabling/disabling libdw and
7 [Original patch modified to be applicable to 1.12.2]
9 Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=778193]
11 Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
13 configure.ac | 38 ++++++++++++++++++++++++++++++++------
14 1 file changed, 32 insertions(+), 6 deletions(-)
16 diff --git a/configure.ac b/configure.ac
17 index b6b2923..32dd827 100644
20 @@ -821,15 +821,41 @@ fi
21 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
23 dnl libunwind is optionally used by the leaks tracer
24 -PKG_CHECK_MODULES(UNWIND, libunwind, HAVE_UNWIND=yes, HAVE_UNWIND=no)
25 -if test "x$HAVE_UNWIND" = "xyes"; then
26 - AC_DEFINE(HAVE_UNWIND, 1, [libunwind available])
27 +AC_ARG_WITH([unwind],[AS_HELP_STRING([--with-unwind=yes|no|auto],[use libunwind])],
28 + [], [with_unwind=auto])
29 +if [ test "x${with_unwind}" != "xno" ]; then
30 + PKG_CHECK_MODULES(UNWIND, [libunwind],
33 + AC_DEFINE(HAVE_UNWIND, 1, [libunwind available])
37 + if [ test "x${with_unwind}" = "xyes" ]; then
38 + AC_MSG_ERROR([could not find libunwind])
45 dnl libdw is optionally used to add source lines and numbers to backtraces
46 -PKG_CHECK_MODULES(DW, libdw, HAVE_DW=yes, HAVE_DW=no)
47 -if test "x$HAVE_DW" = "xyes"; then
48 - AC_DEFINE(HAVE_DW, 1, [libdw available])
49 +AC_ARG_WITH([dw],[AS_HELP_STRING([--with-dw=yes|no|auto],[use libdw])],
51 +if [ test "x${with_dw}" != "xno" ]; then
52 + PKG_CHECK_MODULES(DW, [libdw],
55 + AC_DEFINE(HAVE_DW, 1, [libdw available])
59 + if [ test "x${with_dw}" = "xyes" ]; then
60 + AC_MSG_ERROR([could not find libdw])
67 dnl Check for backtrace() from libc