[Mesa-dev] [PATCH mesa] configure.ac: simplify --enable-libunwind=auto check

2017-06-01 Thread Eric Engestrom
Signed-off-by: Eric Engestrom 
---
 configure.ac | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index b57be07e24..5caf316089 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1066,16 +1066,12 @@ AC_SUBST([LLVM_INCLUDEDIR])
 dnl
 dnl libunwind
 dnl
+PKG_CHECK_EXISTS(libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no])
 AC_ARG_ENABLE([libunwind],
 [AS_HELP_STRING([--enable-libunwind],
 [Use libunwind for backtracing (default: auto)])],
 [LIBUNWIND="$enableval"],
-[LIBUNWIND="auto"])
-
-PKG_CHECK_EXISTS(libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no])
-if test "x$LIBUNWIND" = "xauto"; then
-LIBUNWIND="$HAVE_LIBUNWIND"
-fi
+[LIBUNWIND="$HAVE_LIBUNWIND"])
 
 if test "x$LIBUNWIND" = "xyes"; then
 PKG_CHECK_MODULES(LIBUNWIND, libunwind)
-- 
Cheers,
  Eric

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH mesa] configure.ac: simplify --enable-libunwind=auto check

2017-06-01 Thread Emil Velikov
On 1 June 2017 at 15:10, Eric Engestrom  wrote:
> Signed-off-by: Eric Engestrom 
> ---
>  configure.ac | 8 ++--
>  1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index b57be07e24..5caf316089 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1066,16 +1066,12 @@ AC_SUBST([LLVM_INCLUDEDIR])
>  dnl
>  dnl libunwind
>  dnl
> +PKG_CHECK_EXISTS(libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no])
>  AC_ARG_ENABLE([libunwind],
>  [AS_HELP_STRING([--enable-libunwind],
>  [Use libunwind for backtracing (default: auto)])],
>  [LIBUNWIND="$enableval"],
> -[LIBUNWIND="auto"])
> -
> -PKG_CHECK_EXISTS(libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no])
> -if test "x$LIBUNWIND" = "xauto"; then
> -LIBUNWIND="$HAVE_LIBUNWIND"
> -fi
> +[LIBUNWIND="$HAVE_LIBUNWIND"])
>
Hmm we could have kept PKG_CHECK_EXISTS only as needed by moving it down a line.

Either way - the patch as-is or implementing the above idea is
Reviewed-by: Emil Velikov 

-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev