]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
1132fd5a48ef590646f58c981caf855ea7aacc31
[thirdparty/openembedded/openembedded-core-contrib.git] /
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
5 libunwind
6
7 [Original patch modified to be applicable to 1.12.2]
8
9 Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=778193]
10
11 Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
12 ---
13 configure.ac | 38 ++++++++++++++++++++++++++++++++------
14 1 file changed, 32 insertions(+), 6 deletions(-)
15
16 diff --git a/configure.ac b/configure.ac
17 index b6b2923..32dd827 100644
18 --- a/configure.ac
19 +++ b/configure.ac
20 @@ -821,15 +821,41 @@ fi
21 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
22
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],
31 + [
32 + HAVE_UNWIND=yes
33 + AC_DEFINE(HAVE_UNWIND, 1, [libunwind available])
34 + ],
35 + [
36 + HAVE_UNWIND=no
37 + if [ test "x${with_unwind}" = "xyes" ]; then
38 + AC_MSG_ERROR([could not find libunwind])
39 + fi
40 + ])
41 +else
42 + HAVE_UNWIND=no
43 fi
44
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])],
50 + [], [with_dw=auto])
51 +if [ test "x${with_dw}" != "xno" ]; then
52 + PKG_CHECK_MODULES(DW, [libdw],
53 + [
54 + HAVE_DW=yes
55 + AC_DEFINE(HAVE_DW, 1, [libdw available])
56 + ],
57 + [
58 + HAVE_DW=no
59 + if [ test "x${with_dw}" = "xyes" ]; then
60 + AC_MSG_ERROR([could not find libdw])
61 + fi
62 + ])
63 +else
64 + HAVE_DW=no
65 fi
66
67 dnl Check for backtrace() from libc
68 --
69 2.7.4
70