diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2018-06-05 11:26:59 +0200 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2018-06-05 14:10:07 +0100 |
commit | 42795a6d0072263846d1ea7f7fdebb21c1d417f8 (patch) | |
tree | cfe7d0d228526826f62fb177810ab453178ba2e8 | |
parent | f5224738425a7e97e1c32ea85bb3b243e50d4e22 (diff) |
build: Use AM_COND_IF
AM_COND_IF can be replaced in constructs like:
AM_CONDITIONAL([HAVE_OPUS], [test "x$have_opus" = "xyes"])
if test "x$have_opus" = "xyes" ; then
AC_DEFINE([HAVE_OPUS], [1], [Define if we have OPUS])
fi
which becomes:
AM_CONDITIONAL([HAVE_OPUS], [test "x$have_opus" = "xyes"])
AM_COND_IF([HAVE_OPUS], AC_DEFINE([HAVE_OPUS], [1], [Define if we have OPUS]))
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r-- | m4/spice-deps.m4 | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4 index 562071f..3c25187 100644 --- a/m4/spice-deps.m4 +++ b/m4/spice-deps.m4 @@ -32,8 +32,7 @@ AC_ARG_ENABLE([extra-checks], AS_HELP_STRING([--enable-extra-checks=@<:@yes/no@:>@], [Enable expensive checks @<:@default=no@:>@])) AM_CONDITIONAL(ENABLE_EXTRA_CHECKS, test "x$enable_extra_checks" = "xyes") -AS_IF([test "x$enable_extra_checks" = "xyes"], - [AC_DEFINE([ENABLE_EXTRA_CHECKS], 1, [Enable extra checks on code])]) +AM_COND_IF([ENABLE_EXTRA_CHECKS], AC_DEFINE([ENABLE_EXTRA_CHECKS], 1, [Enable extra checks on code])) ]) @@ -163,9 +162,7 @@ AC_DEFUN([SPICE_CHECK_OPUS], [ fi AM_CONDITIONAL([HAVE_OPUS], [test "x$have_opus" = "xyes"]) - if test "x$have_opus" = "xyes" ; then - AC_DEFINE([HAVE_OPUS], [1], [Define if we have OPUS]) - fi + AM_COND_IF([HAVE_OPUS], AC_DEFINE([HAVE_OPUS], [1], [Define if we have OPUS])) ]) @@ -198,9 +195,7 @@ AC_DEFUN([SPICE_CHECK_GDK_PIXBUF], [ PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.26], [have_gdk_pixbuf=yes], [have_gdk_pixbuf=no]) AM_CONDITIONAL([HAVE_GDK_PIXBUF], [test "x$have_gdk_pixbuf" = "xyes"]) - if test "x$have_gdk_pixbuf" = "xyes" ; then - AC_DEFINE([HAVE_GDK_PIXBUF], [1], [Define if gdk-pixbuf was found]) - fi + AM_COND_IF([HAVE_GDK_PIXBUF], AC_DEFINE([HAVE_GDK_PIXBUF], [1], [Define if gdk-pixbuf was found])) ]) # SPICE_CHECK_PYTHON_MODULES() |