summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/wayland/weston/0001-autotools-Add-a-libunwind-configure-switch.patch
blob: faf96806d5975996ccd8bb1850ba41aab03611dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From cc802f5f34c6ea4fe66f70225830c97ef7abbfc3 Mon Sep 17 00:00:00 2001
From: Quentin Glidic <sardemff7+git@sardemff7.net>
Date: Wed, 3 Apr 2013 20:19:45 +0200
Subject: [PATCH] autotools: Add a libunwind configure switch

Upstream-Status: Backport from 1.1 (5daccc373eddf94086fcc4662c38605de6356c6c)

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 configure.ac | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 71d0978..1e76ded 100644
--- a/configure.ac
+++ b/configure.ac
@@ -251,12 +251,14 @@ fi
 AC_SUBST(GCC_CFLAGS)
 AC_SUBST(GCC_CXXFLAGS)
 
-PKG_CHECK_MODULES(LIBUNWIND, libunwind,
-                  [have_libunwind=yes], [have_libunwind=no])
-if test "x$have_libunwind" = xyes; then
-       AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
+AC_ARG_ENABLE(libunwind, AS_HELP_STRING([  --disable-libunwind],
+                                        [Disable libunwind usage for backtraces]),,
+              enable_libunwind=yes)
+if test "x$enable_libunwind" = xyes; then
+    PKG_CHECK_MODULES(LIBUNWIND, libunwind)
+    AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
 fi
-AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$have_libunwind" = xyes])
+AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$enable_libunwind" = xyes])
 
 WAYLAND_SCANNER_RULES(['$(top_srcdir)/protocol'])
 
-- 
1.8.3.2