[PATCH libinput] configure.ac: add arg --with-libunwind

Peter Hutterer peter.hutterer at who-t.net
Thu Aug 6 19:45:00 PDT 2015


On Wed, Aug 05, 2015 at 11:28:43AM +0800, jackie.huang at windriver.com wrote:
> From: Jackie Huang <jackie.huang at windriver.com>
> 
> Add arg --with-libunwind for configure so it's optional to check
> libunwind, which is helpfull to make deterministic builds.
> 
> Signed-off-by: Jackie Huang <jackie.huang at windriver.com>

merged, thanks.

Cheers,
   Peter

> ---
>  configure.ac | 19 ++++++++++++++-----
>  1 file changed, 14 insertions(+), 5 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 0d5d486..885cb39 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -60,13 +60,22 @@ PKG_PROG_PKG_CONFIG()
>  PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0])
>  PKG_CHECK_MODULES(LIBUDEV, [libudev])
>  PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
> -PKG_CHECK_MODULES(LIBUNWIND,
> +
> +AC_ARG_WITH(libunwind,
> +            AS_HELP_STRING([--without-libunwind],[Do not use libunwind]))
> +
> +AS_IF([test "x$with_libunwind" != "xno"],
> +	[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])
> -fi
> +		  [HAVE_LIBUNWIND=no])],
> +	[HAVE_LIBUNWIND=no])
> +
> +AS_IF([test "x$HAVE_LIBUNWIND" = "xyes"],
> +	[AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])],
> +	[AS_IF([test "x$with_libunwind" = "xyes"],
> +		[AC_MSG_ERROR([libunwind requested but not found])])])
> +
>  AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$HAVE_LIBUNWIND" = xyes])
>  AC_PATH_PROG(ADDR2LINE, [addr2line])
>  if test "x$ADDR2LINE" != "x"; then
> -- 
> 2.3.5
> 
> _______________________________________________
> 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