[PATCH weston] autotools: Add a libunwind configure switch

Kristian Høgsberg hoegsberg at gmail.com
Wed Apr 3 11:33:59 PDT 2013


On Wed, Apr 03, 2013 at 08:19:45PM +0200, Quentin Glidic wrote:
> From: Quentin Glidic <sardemff7+git at sardemff7.net>
> 
> Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
> ---
>  configure.ac | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Thanks, that's better, it also lets us pass --enable-libunwind and
fail if it's not available.

Kristian

> diff --git a/configure.ac b/configure.ac
> index ed06d0b..316ee11 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"
> -- 
> 1.8.2
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list