summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Glidic <sardemff7+git@sardemff7.net>2013-04-03 20:19:45 +0200
committerKristian Høgsberg <krh@bitplanet.net>2013-04-03 14:31:44 -0400
commit5daccc373eddf94086fcc4662c38605de6356c6c (patch)
tree696cd4f59750ed3973aad5f9c730f5a9d6238b67
parent91ae483ab9159b5a56a34853a6b06438d3e46479 (diff)
autotools: Add a libunwind configure switch
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
-rw-r--r--configure.ac12
1 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index ed06d0b9..316ee11b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -299,12 +299,14 @@ if test "x$GCC" = "xyes"; then
fi
AC_SUBST(GCC_CFLAGS)
-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])
if test "x$WESTON_NATIVE_BACKEND" = "x"; then
WESTON_NATIVE_BACKEND="drm-backend.so"