[Spice-devel] [spice-gtk 01/11] build-sys: Don't use test -a/-o
Marc-André Lureau
marcandre.lureau at gmail.com
Thu Oct 30 05:58:26 PDT 2014
ack
On Thu, Oct 30, 2014 at 1:56 PM, Christophe Fergeau <cfergeau at redhat.com>
wrote:
> They are not portable, it's recommended to use test && test or test ||
> test instead
> ---
> configure.ac | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index f47ee20..c2faedc 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -121,7 +121,7 @@ SASL_CFLAGS=
> SASL_LIBS=
> enable_sasl=no
> if test "x$with_sasl" != "xno"; then
> - if test "x$with_sasl" != "xyes" -a "x$with_sasl" != "xauto"; then
> + if test "x$with_sasl" != "xyes" && test "x$with_sasl" != "xauto"; then
> SASL_CFLAGS="-I$with_sasl"
> SASL_LIBS="-L$with_sasl"
> fi
> @@ -133,7 +133,7 @@ if test "x$with_sasl" != "xno"; then
> if test "x$with_sasl" = "xyes" ; then
> AC_CHECK_LIB([sasl2],
> [sasl_client_init],[with_sasl2=yes],[with_sasl2=no])
> fi
> - if test "x$with_sasl2" = "xno" -a "x$with_sasl" = "xyes" ; then
> + if test "x$with_sasl2" = "xno" && test "x$with_sasl" = "xyes" ; then
> AC_CHECK_LIB([sasl],
> [sasl_client_init],[with_sasl=yes],[with_sasl=no])
> fi
> if test "x$with_sasl2" = "xyes"; then
> @@ -145,13 +145,13 @@ if test "x$with_sasl" != "xno"; then
> fi
> CFLAGS="$old_cflags"
> LIBS="$old_libs"
> - if test "x$with_sasl2" = "xyes" -o "x$with_sasl" = "xyes" ; then
> + if test "x$with_sasl2" = "xyes" || test "x$with_sasl" = "xyes" ; then
> AC_DEFINE_UNQUOTED([HAVE_SASL], 1,
> [whether Cyrus SASL is available for authentication])
> enable_sasl=yes
> fi
> fi
> -AM_CONDITIONAL([HAVE_SASL], [test "x$with_sasl2" = "xyes" -o
> "x$with_sasl" = "xyes"])
> +AM_CONDITIONAL([HAVE_SASL], [test "x$with_sasl2" = "xyes" || test
> "x$with_sasl" = "xyes"])
> AC_SUBST([SASL_CFLAGS])
> AC_SUBST([SASL_LIBS])
>
> --
> 2.1.0
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
--
Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20141030/0277f736/attachment.html>
More information about the Spice-devel
mailing list