[Spice-commits] 3 commits - configure.ac spice-common

Christophe Fergau teuf at kemper.freedesktop.org
Mon Jun 22 10:48:13 PDT 2015


 configure.ac |   73 ++++++++++-------------------------------------------------
 spice-common |    2 -
 2 files changed, 14 insertions(+), 61 deletions(-)

New commits:
commit e0a5cb591cf5593f400b9b59608a6c238698ee64
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Wed Jun 17 18:51:50 2015 +0200

    build-sys: Use spice-common m4 macro for lz4
    
    This will allow to share this detection code with spice-gtk.

diff --git a/configure.ac b/configure.ac
index 8da3066..a8b610b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,11 +75,6 @@ AS_IF([test x"$enable_opengl" != "xno"], [
       AS_VAR_APPEND([SPICE_NONPKGCONFIG_LIBS], [" $GL_LIBS"])
 ])
 
-AC_ARG_ENABLE([lz4],
-              AS_HELP_STRING([--enable-lz4],[Enable lz4 compression algorithm]),,
-              [enable_lz4="no"])
-AS_IF([test x"$enable_lz4" != "xno"], [enable_lz4="yes"])
-AM_CONDITIONAL(SUPPORT_LZ4, test "x$enable_lz4" = "xyes")
 
 SPICE_CHECK_SMARTCARD([SMARTCARD])
 AM_CONDITIONAL(SUPPORT_SMARTCARD, test "x$have_smartcard" = "xyes")
@@ -90,6 +85,7 @@ AC_ARG_ENABLE([automated_tests],
 AS_IF([test x"$enable_automated_tests" != "xno"], [enable_automated_tests="yes"])
 AM_CONDITIONAL(SUPPORT_AUTOMATED_TESTS, test "x$enable_automated_tests" != "xno")
 
+SPICE_CHECK_LZ4([LZ4])
 
 dnl =========================================================================
 dnl Check deps
@@ -146,12 +142,6 @@ AC_SUBST(SSL_CFLAGS)
 AC_SUBST(SSL_LIBS)
 AS_VAR_APPEND([SPICE_REQUIRES], [" openssl"])
 
-if test "x$enable_lz4" = "xyes"; then
-    PKG_CHECK_MODULES(LZ4, liblz4)
-    AC_DEFINE([USE_LZ4], [1], [Define to build with Lz4 support])
-fi
-AC_SUBST(LZ4_CFLAGS)
-AC_SUBST(LZ4_LIBS)
 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
     AC_MSG_CHECKING([for jpeglib.h])
     AC_TRY_CPP(
diff --git a/spice-common b/spice-common
index b216f66..1b5edbe 160000
--- a/spice-common
+++ b/spice-common
@@ -1 +1 @@
-Subproject commit b216f66f108b14b67b8cb2f9a3d2caee0ec8e0fd
+Subproject commit 1b5edbe49e5c36c4f35453de448b54f770e1c1be
commit 27636d80def676ae8599caadfec5c8657840d232
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Wed Jun 17 18:51:14 2015 +0200

    build-sys: Use spice-common m4 macro for opengl
    
    This factorizes a bit of configure.ac m4 code.

diff --git a/configure.ac b/configure.ac
index 7622683..8da3066 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,12 +70,10 @@ esac
 
 dnl =========================================================================
 dnl Check optional features
-AC_ARG_ENABLE([opengl],
-              AS_HELP_STRING([--enable-opengl],
-              [Enable opengl requirement / support (not recommended)]),,
-              [enable_opengl="no"])
-AS_IF([test x"$enable_opengl" != "xno"], [enable_opengl="yes"])
-AM_CONDITIONAL(SUPPORT_GL, test "x$enable_opengl" = "xyes")
+SPICE_CHECK_OPENGL([GL])
+AS_IF([test x"$enable_opengl" != "xno"], [
+      AS_VAR_APPEND([SPICE_NONPKGCONFIG_LIBS], [" $GL_LIBS"])
+])
 
 AC_ARG_ENABLE([lz4],
               AS_HELP_STRING([--enable-lz4],[Enable lz4 compression algorithm]),,
@@ -148,35 +146,12 @@ AC_SUBST(SSL_CFLAGS)
 AC_SUBST(SSL_LIBS)
 AS_VAR_APPEND([SPICE_REQUIRES], [" openssl"])
 
-# These are commented out because the gl libraries on RHEL 5 do not have pkgconfig files
-#
-# PKG_CHECK_MODULES(GL, gl glu)
-# AC_SUBST(GL_CFLAGS)
-# AC_SUBST(GL_LIBS)
-# AS_VAR_APPEND([SPICE_REQUIRES], [" gl glu"])
-
-if test "x$enable_opengl" = "xyes"; then
-   AC_CHECK_LIB(GL, glBlendFunc, GL_LIBS="$GL_LIBS -lGL", enable_opengl=no)
-   AC_CHECK_LIB(GLU, gluSphere, GL_LIBS="$GL_LIBS -lGLU", enable_opengl=no)
-   AC_DEFINE([USE_OPENGL], [1], [Define to build with OpenGL support])
-   AC_DEFINE([GL_GLEXT_PROTOTYPES], [], [Enable GLExt prototypes])
-
-   if test "x$enable_opengl" = "xno"; then
-      AC_MSG_ERROR([GL libraries not available])
-   fi
-fi
-
-AC_SUBST(GL_CFLAGS)
-AC_SUBST(GL_LIBS)
-AS_VAR_APPEND([SPICE_NONPKGCONFIG_LIBS], [" $GL_LIBS"])
-
 if test "x$enable_lz4" = "xyes"; then
     PKG_CHECK_MODULES(LZ4, liblz4)
     AC_DEFINE([USE_LZ4], [1], [Define to build with Lz4 support])
 fi
 AC_SUBST(LZ4_CFLAGS)
 AC_SUBST(LZ4_LIBS)
-
 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
     AC_MSG_CHECKING([for jpeglib.h])
     AC_TRY_CPP(
commit fe2ca14fc2c1b505ca3b6689994e7cde9acd4c4f
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Wed Jun 17 18:15:24 2015 +0200

    build-sys: Use spice-common m4 macro for smartcard
    
    Besides the code factorization, this will allow smartcard support to be
    automatically enabled if libcacard is present and --disable-smartcard is
    not used.

diff --git a/configure.ac b/configure.ac
index 1802ff1..7622683 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ fi
 SPICE_SERVER_VERSION=`printf "0x%02x%02x%02x" $major $minor $micro`
 AC_SUBST(SPICE_SERVER_VERSION)
 
-AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_MACRO_DIRS([m4 spice-common/m4])
 AM_CONFIG_HEADER([config.h])
 AC_CONFIG_AUX_DIR(.)
 
@@ -83,14 +83,8 @@ AC_ARG_ENABLE([lz4],
 AS_IF([test x"$enable_lz4" != "xno"], [enable_lz4="yes"])
 AM_CONDITIONAL(SUPPORT_LZ4, test "x$enable_lz4" = "xyes")
 
-AC_ARG_ENABLE([smartcard],
-              AS_HELP_STRING([--enable-smartcard], [Enable network redirection]),,
-              [enable_smartcard="no"])
-AS_IF([test x"$enable_smartcard" != "xno"], [enable_smartcard="yes"])
-AM_CONDITIONAL(SUPPORT_SMARTCARD, test "x$enable_smartcard" != "xno")
-if test "x$enable_smartcard" = "xyes"; then
-   AC_DEFINE([USE_SMARTCARD], [1], [Define if supporting smartcard proxying])
-fi
+SPICE_CHECK_SMARTCARD([SMARTCARD])
+AM_CONDITIONAL(SUPPORT_SMARTCARD, test "x$have_smartcard" = "xyes")
 
 AC_ARG_ENABLE([automated_tests],
               AS_HELP_STRING([--enable-automated-tests], [Enable automated tests using spicy-screenshot (part of spice--gtk)]),,
@@ -119,15 +113,9 @@ AS_VAR_APPEND([SPICE_NONPKGCONFIG_LIBS], [" -pthread $LIBM $LIBRT"])
 
 SPICE_REQUIRES=""
 
-if test "x$enable_smartcard" = "xyes"; then
-    PKG_CHECK_MODULES(CAC_CARD, libcacard >= 0.1.2)
-    SMARTCARD_LIBS="$CAC_CARD_LIBS"
-    SMARTCARD_CFLAGS="$CAC_CARD_CFLAGS"
-    AC_SUBST(SMARTCARD_LIBS)
-    AC_SUBST(SMARTCARD_CFLAGS)
+AS_IF([test x"$have_smartcard" = "xyes"], [
     AS_VAR_APPEND([SPICE_REQUIRES], [" libcacard >= 0.1.2"])
-fi
-
+])
 
 PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.22])
 AS_VAR_APPEND([SPICE_REQUIRES], [" glib-2.0 >= 2.22"])
@@ -358,7 +346,7 @@ echo "
 
         LZ4 support:              ${enable_lz4}
 
-        Smartcard:                ${enable_smartcard}
+        Smartcard:                ${have_smartcard}
 
         SASL support:             ${enable_sasl}
 


More information about the Spice-commits mailing list