[Spice-devel] [PATCH] Unify openssl checks

Frediano Ziglio fziglio at redhat.com
Sat Apr 27 06:55:26 UTC 2019


> 
> Currently, spice-gtk uses PKG_CHECK_MODULES(SSL, openssl) to detect
> openssl CFLAGS and LIBS. And spice-common defines and uses
> SPICE_CHECK_OPENSSL macro which calls
> PKG_CHECK_MODULES(OPENSSL, openssl).
> 
> This means that in order to override openssl CFLAGS or LIBS a user will
> have to set both OPENSSL_(CFLAGS|LIBS) and SSL_(CFLAGS|LIBS).
> 
> To make this more consistent, make spice-gtk use the
> SPICE_CHECK_OPENSSL macro from spice-common.
> 
> Signed-off-by: Roman Bogorodskiy <bogorodskiy at gmail.com>
> ---
>  configure.ac    | 4 ++--
>  src/Makefile.am | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index d234822..055818f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -114,11 +114,11 @@ PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.7)
>  
>  SPICE_GLIB_REQUIRES="${SPICE_GLIB_REQUIRES} pixman-1 >= 0.17.7"
>  
> -PKG_CHECK_MODULES(SSL, openssl)
> +SPICE_CHECK_OPENSSL
>  
>  PKG_CHECK_EXISTS(openssl,
>    [SPICE_GLIB_REQUIRES="${SPICE_GLIB_REQUIRES} openssl"],
> -  [SPICE_GLIB_LIBS="${SPICE_GLIB_LIBS} ${SSL_LIBS}"])
> +  [SPICE_GLIB_LIBS="${SPICE_GLIB_LIBS} ${OPENSSL_LIBS}"])
>  
>  SPICE_CHECK_RECORDER
>  SPICE_CHECK_SASL
> diff --git a/src/Makefile.am b/src/Makefile.am
> index cdc4d28..7b98180 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -80,7 +80,7 @@ SPICE_COMMON_CPPFLAGS =						\
>  	$(GIO_CFLAGS)						\
>  	$(GOBJECT2_CFLAGS)					\
>  	$(JSON_CFLAGS)						\
> -	$(SSL_CFLAGS)						\
> +	$(OPENSSL_CFLAGS)					\
>  	$(SASL_CFLAGS)						\
>  	$(GSTAUDIO_CFLAGS)					\
>  	$(GSTVIDEO_CFLAGS)					\
> @@ -192,7 +192,7 @@ libspice_client_glib_impl_la_LIBADD =					\
>  	$(Z_LIBS)							\
>  	$(LZ4_LIBS)							\
>  	$(PIXMAN_LIBS)							\
> -	$(SSL_LIBS)							\
> +	$(OPENSSL_LIBS)							\
>  	$(PULSE_LIBS)							\
>  	$(GSTAUDIO_LIBS)						\
>  	$(GSTVIDEO_LIBS)						\

In configure.ac there's an usage of SSL_CFLAGS:

SPICE_GLIB_CFLAGS="$PIXMAN_CFLAGS $PULSE_CFLAGS $GSTAUDIO_CFLAGS $GSTVIDEO_CFLAGS $GLIB2_CFLAGS $GIO_CFLAGS $GOBJECT2_CFLAGS $SSL_CFLAGS $SASL_CFLAGS"

should be replaced

Frediano


More information about the Spice-devel mailing list