<div dir="ltr"><div>The cascaded if could be simpler imho, by backend priority<br>if auto & have pulse: pulse<br>if auto & have gst: gst<br>if auto: no<br><br></div>some day, hopefully, we will have only one backend :)<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 12, 2015 at 12:24 PM, Pavel Grunt <span dir="ltr"><<a href="mailto:pgrunt@redhat.com" target="_blank">pgrunt@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> | 23 +++++++++++------------<br>
1 file changed, 11 insertions(+), 12 deletions(-)<br>
<br>
diff --git a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
index 1d8f4d0..1156856 100644<br>
--- a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
+++ b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
@@ -296,19 +296,22 @@ AC_ARG_WITH([audio],<br>
[],<br>
[with_audio="auto"])<br>
<br>
-AS_IF([test "x$with_audio" = "xauto"], [<br>
- AS_IF([test "x$os_win32" = "xyes"], [with_audio=gstreamer], [with_audio=pulse])<br>
-])<br>
-<br>
case "$with_audio" in<br>
- gstreamer|pulse|no*)<br>
+ gstreamer|pulse|auto*)<br>
+ PKG_CHECK_MODULES(GST, gstreamer-1.0 gstreamer-base-1.0 gstreamer-app-1.0 gstreamer-audio-1.0, [have_gst=yes], [have_gst=no])<br>
+ PKG_CHECK_MODULES(PULSE, libpulse libpulse-mainloop-glib, [have_pulse=yes], [have_pulse=no])<br>
+ ;;<br>
+ no*)<br>
;;<br>
*) AC_MSG_ERROR(Unsupported audio backend)<br>
esac<br>
<br>
-AS_IF([test "x$with_audio" = "xpulse"],<br>
- [PKG_CHECK_MODULES(PULSE, libpulse libpulse-mainloop-glib, [have_pulse=yes], [have_pulse=no])],<br>
- [have_pulse=no])<br>
+AS_IF([test "x$with_audio" = "xauto"],<br>
+ [AS_IF([test "x$os_win32" = "xyes"],<br>
+ [with_audio=gstreamer],<br>
+ [AS_IF([test "x$have_pulse" = "xyes"],<br>
+ [with_audio=pulse],<br>
+ [with_audio=gstreamer])])])<br>
<br>
AS_IF([test "x$have_pulse" = "xyes"],<br>
[AC_DEFINE([WITH_PULSE], 1, [Have pulseaudio?])],<br>
@@ -320,10 +323,6 @@ AM_CONDITIONAL([WITH_PULSE], [test "x$have_pulse" = "xyes"])<br>
AC_SUBST(PULSE_CFLAGS)<br>
AC_SUBST(PULSE_LIBS)<br>
<br>
-AS_IF([test "x$with_audio" = "xgstreamer"],<br>
- [PKG_CHECK_MODULES(GST, gstreamer-1.0 gstreamer-base-1.0 gstreamer-app-1.0 gstreamer-audio-1.0, [have_gst=yes], [have_gst=no])],<br>
- [have_gst=no])<br>
-<br>
AS_IF([test "x$have_gst" = "xyes"],<br>
[AC_DEFINE([WITH_GSTAUDIO], 1, [Have GStreamer 1.0?])],<br>
[AS_IF([test "x$with_audio" = "xgstreamer"],<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.4.3<br>
<br>
_______________________________________________<br>
Spice-devel mailing list<br>
<a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Marc-André Lureau</div>
</div>