summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorCarlos Rafael Giani <dv@pseudoterminal.org>2017-08-11 21:17:06 +0200
committerTim-Philipp Müller <tim@centricular.com>2017-08-13 10:59:34 +0100
commit4d25706ff1e170a4da3e0d302e25eac8944c939a (patch)
treec550a513352dfaf064c87e9502b7213811aeece4 /configure.ac
parent208d500c67e3022f7cc2253927a933837302a623 (diff)
downloadgstreamer-4d25706ff1e170a4da3e0d302e25eac8944c939a.tar.gz
configure: Add switches for enabling/disabling libdw and libunwind
https://bugzilla.gnome.org/show_bug.cgi?id=778193
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac46
1 files changed, 36 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index c0e6b095d3..5f7c83fc84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -799,19 +799,45 @@ fi
AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
dnl libunwind is optionally used by the leaks tracer
-PKG_CHECK_MODULES(UNWIND, libunwind, HAVE_UNWIND=yes, HAVE_UNWIND=no)
-if test "x$HAVE_UNWIND" = "xyes"; then
- AC_DEFINE(HAVE_UNWIND, 1, [libunwind available])
- UNWIND_REQUIRE=libunwind
- AC_SUBST(UNWIND_REQUIRE)
+AC_ARG_WITH([unwind],[AS_HELP_STRING([--with-unwind=yes|no|auto],[use libunwind])],
+ [], [with_unwind=auto])
+if [ test "x${with_unwind}" != "xno" ]; then
+ PKG_CHECK_MODULES(UNWIND, [libunwind],
+ [
+ HAVE_UNWIND=yes
+ AC_DEFINE(HAVE_UNWIND, 1, [libunwind available])
+ UNWIND_REQUIRE=libunwind
+ AC_SUBST(UNWIND_REQUIRE)
+ ],
+ [
+ HAVE_UNWIND=no
+ if [ test "x${with_unwind}" = "xyes" ]; then
+ AC_MSG_ERROR([could not find libunwind])
+ fi
+ ])
+else
+ HAVE_UNWIND=no
fi
dnl libdw is optionally used to add source lines and numbers to backtraces
-PKG_CHECK_MODULES(DW, libdw, HAVE_DW=yes, HAVE_DW=no)
-if test "x$HAVE_DW" = "xyes"; then
- AC_DEFINE(HAVE_DW, 1, [libdw available])
- DW_REQUIRE=libdw
- AC_SUBST(DW_REQUIRE)
+AC_ARG_WITH([dw],[AS_HELP_STRING([--with-dw=yes|no|auto],[use libdw])],
+ [], [with_dw=auto])
+if [ test "x${with_dw}" != "xno" ]; then
+ PKG_CHECK_MODULES(DW, [libdw],
+ [
+ HAVE_DW=yes
+ AC_DEFINE(HAVE_DW, 1, [libdw available])
+ DW_REQUIRE=libdw
+ AC_SUBST(DW_REQUIRE)
+ ],
+ [
+ HAVE_DW=no
+ if [ test "x${with_dw}" = "xyes" ]; then
+ AC_MSG_ERROR([could not find libdw])
+ fi
+ ])
+else
+ HAVE_DW=no
fi
dnl Check for backtrace() from libc