[Spice-devel,client,2/3] build-sys: Check for GStreamer 1.0 audio with SPICE_CHECK_GSTREAMER()

Submitted by Francois Gouget on Dec. 2, 2015, 1:55 p.m.

Details

Message ID alpine.DEB.2.20.1512021452330.9264@amboise
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Francois Gouget Dec. 2, 2015, 1:55 p.m.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
---
 configure.ac | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

Patch hide | download patch | download mbox

diff --git a/configure.ac b/configure.ac
index 734b73c..86a895f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -323,19 +323,16 @@  AC_ARG_ENABLE([gstaudio],
   [],
   [enable_gstaudio="auto"])
 AS_IF([test "x$enable_gstaudio" != "xno"],
-      [PKG_CHECK_MODULES(GSTAUDIO, [gstreamer-1.0 gstreamer-base-1.0 gstreamer-app-1.0 gstreamer-audio-1.0],
-         [AC_DEFINE([HAVE_GSTAUDIO], 1, [Have GStreamer 1.0 audio support?])
-          enable_gstaudio="yes"],
+      [SPICE_CHECK_GSTREAMER(GSTAUDIO, 1.0, [gstreamer-1.0 gstreamer-base-1.0 gstreamer-app-1.0 gstreamer-audio-1.0],
+         [],
          [AS_IF([test "x$enable_gstaudio" = "xyes"],
                 AC_MSG_ERROR([GStreamer 1.0 audio requested but not found]))
-          enable_gstaudio="no"
-      ])
-])
-AM_CONDITIONAL([SUPPORT_GSTAUDIO], [test "x$enable_gstaudio" = "xyes"])
-AC_SUBST(GSTAUDIO_CFLAGS)
-AC_SUBST(GSTAUDIO_LIBS)
+         ])
+      ], [have_gstaudio="no"]
+)
+AM_CONDITIONAL([SUPPORT_GSTAUDIO], [test "x$have_gstaudio" = "xyes"])
 
-AS_IF([test "x$enable_pulse$enable_gstaudio" = "xnono"],
+AS_IF([test "x$enable_pulse$have_gstaudio" = "xnono"],
       [SPICE_WARNING([No PulseAudio or GStreamer 1.0 audio decoder, audio will not be streamed])
 ])
 
@@ -746,7 +743,7 @@  AC_MSG_NOTICE([
         Gtk:                      ${with_gtk}
         Coroutine:                ${with_coroutine}
         PulseAudio:               ${enable_pulse}
-        GStreamer Audio:          ${enable_gstaudio}
+        GStreamer Audio:          ${have_gstaudio}
         SASL support:             ${enable_sasl}
         Smartcard support:        ${have_smartcard}
         USB redirection support:  ${have_usbredir} ${with_usbredir_hotplug}

Comments

ACK

On Wed, Dec 02, 2015 at 02:55:58PM +0100, Francois Gouget wrote:
> Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
> ---
>  configure.ac | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 734b73c..86a895f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -323,19 +323,16 @@ AC_ARG_ENABLE([gstaudio],
>    [],
>    [enable_gstaudio="auto"])
>  AS_IF([test "x$enable_gstaudio" != "xno"],
> -      [PKG_CHECK_MODULES(GSTAUDIO, [gstreamer-1.0 gstreamer-base-1.0 gstreamer-app-1.0 gstreamer-audio-1.0],
> -         [AC_DEFINE([HAVE_GSTAUDIO], 1, [Have GStreamer 1.0 audio support?])
> -          enable_gstaudio="yes"],
> +      [SPICE_CHECK_GSTREAMER(GSTAUDIO, 1.0, [gstreamer-1.0 gstreamer-base-1.0 gstreamer-app-1.0 gstreamer-audio-1.0],
> +         [],
>           [AS_IF([test "x$enable_gstaudio" = "xyes"],
>                  AC_MSG_ERROR([GStreamer 1.0 audio requested but not found]))
> -          enable_gstaudio="no"
> -      ])
> -])
> -AM_CONDITIONAL([SUPPORT_GSTAUDIO], [test "x$enable_gstaudio" = "xyes"])
> -AC_SUBST(GSTAUDIO_CFLAGS)
> -AC_SUBST(GSTAUDIO_LIBS)
> +         ])
> +      ], [have_gstaudio="no"]
> +)
> +AM_CONDITIONAL([SUPPORT_GSTAUDIO], [test "x$have_gstaudio" = "xyes"])
>  
> -AS_IF([test "x$enable_pulse$enable_gstaudio" = "xnono"],
> +AS_IF([test "x$enable_pulse$have_gstaudio" = "xnono"],
>        [SPICE_WARNING([No PulseAudio or GStreamer 1.0 audio decoder, audio will not be streamed])
>  ])
>  
> @@ -746,7 +743,7 @@ AC_MSG_NOTICE([
>          Gtk:                      ${with_gtk}
>          Coroutine:                ${with_coroutine}
>          PulseAudio:               ${enable_pulse}
> -        GStreamer Audio:          ${enable_gstaudio}
> +        GStreamer Audio:          ${have_gstaudio}
>          SASL support:             ${enable_sasl}
>          Smartcard support:        ${have_smartcard}
>          USB redirection support:  ${have_usbredir} ${with_usbredir_hotplug}
> -- 
> 2.6.2
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel