Eric Blake wrote:
> Subject: [PATCH] build: fix build failure of bogus USE_XATTR
...
> diff --git a/m4/xattr.m4 b/m4/xattr.m4
...
>          use_xattr=yes
>        fi
>      fi
> -    AC_DEFINE_UNQUOTED([USE_XATTR], [$use_xattr],
> -                       [Define if you want extended attribute support.])
>      if test $use_xattr = no; then
>        AC_MSG_WARN([libattr development library was not found or not usable.])
>        AC_MSG_WARN([AC_PACKAGE_NAME will be built without xattr support.])
> +    else
> +      AC_DEFINE([USE_XATTR], [1],
> +                [Define if you want extended attribute support.])

Thanks!
That would fix it, but please retain the 0/1 semantics, in case
we ever want to use USE_XATTR in a C (as opposed to cpp) expression.

    # Map yes,no to 1,0.
    AC_DEFINE_UNQUOTED([USE_XATTR],
                       [`test $use_xattr = yes && echo 1 || echo 0`],
                       [Define if you want extended attribute support.])

I know this is not the norm for USE_* variables e.g., in gnulib,
but I have come to appreciate being able to use 0/1 cpp symbols
in C code (albeit not often), for readability.


Reply via email to