[Spice-devel] [PATCH spice-common] build-sys: add --enable-smartcard=auto

Christophe Fergeau cfergeau at redhat.com
Fri Sep 27 00:14:12 PDT 2013


Looks good to me, ACK

On Thu, Sep 26, 2013 at 07:04:55PM +0200, Marc-André Lureau wrote:
> Use same implementation as spice-gtk, to avoid need to explicitely set
> smartcard support
> ---
>  configure.ac | 24 ++++++++++++++----------
>  1 file changed, 14 insertions(+), 10 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index b5cb960..acb7626 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -34,18 +34,22 @@ PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.7)
>  AC_SUBST(PIXMAN_CFLAGS)
>  
>  AC_ARG_ENABLE([smartcard],
> -  AS_HELP_STRING([--enable-smartcard=@<:@yes/no@:>@],
> -                 [Enable smartcard support @<:@default=yes@:>@]),
> +  AS_HELP_STRING([--enable-smartcard=@<:@yes/no/auto@:>@],
> +                 [Enable smartcard support @<:@default=auto@:>@]),
>    [],
> -  [enable_smartcard="yes"])
> -
> -if test "x$enable_smartcard" = "xno"; then
> -  AM_CONDITIONAL(WITH_SMARTCARD, false)
> -else
> -  PKG_CHECK_MODULES(SMARTCARD, libcacard >= 0.1.2)
> -  AC_DEFINE(USE_SMARTCARD, [1], [Define if supporting smartcard proxying])
> -  AM_CONDITIONAL(WITH_SMARTCARD, true)
> +  [enable_smartcard="auto"])
> +
> +have_smartcard=no
> +if test "x$enable_smartcard" != "xno"; then
> +  PKG_CHECK_MODULES(SMARTCARD, libcacard >= 0.1.2, [have_smartcard=yes], [have_smartcard=no])
> +  if test "x$enable_smartcard" != "xauto" && test "x$have_smartcard" = "xno"; then
> +    AC_MSG_ERROR("Smartcard support requested but libcacard could not be found")
> +  fi
> +  if test "x$have_smartcard" = "xyes"; then
> +    AC_DEFINE(USE_SMARTCARD, [1], [Define if supporting smartcard proxying])
> +  fi
>  fi
> +AM_CONDITIONAL([WITH_SMARTCARD], [test "x$have_smartcard" = "xyes"])
>  
>  AC_ARG_ENABLE([opengl],
>    AS_HELP_STRING([--enable-opengl=@<:@yes/no@:>@],
> -- 
> 1.8.3.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130927/69d49f33/attachment.pgp>


More information about the Spice-devel mailing list