[Spice-devel] [vdagent-linux v2 1/5] build: add GIO dependency

Jakub Janků jjanku at redhat.com
Tue Apr 30 09:33:35 UTC 2019


Require UNIX-specific GIO package to build spice-vdagent.

This package includes:

- GDBus which is going to be used instead of libdbus in
  console-kit.c and systemd-login.c

- I/O stream classes and networking APIs that are going to
  be used in VDAgentConnection

Version 2.44 is required because of the following definitions:
- g_input_stream_read_all_*
- g_output_stream_write_all_*
- GSimpleIOStream

GIO requires GLib and GObject, so we can depend solely on it.

GLib version across different distributions:
    Fedora 30:    2.60
    Fedora 29:    2.58
    Fedora 28:    2.56

    RHEL 7.6:     2.56
    RHEL 7.5:     2.54
    RHEL 7.4:     2.50

    Debian 10:    2.58
    Debian 9:     2.50
    Debian 8:     2.42

    Ubuntu 19.04: 2.60
    Ubuntu 18.04: 2.56
    Ubuntu 16.04: 2.48

Signed-off-by: Jakub Janků <jjanku at redhat.com>
---
 Makefile.am  | 12 ++++++------
 configure.ac |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 3b97de5..bf937b9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@ src_spice_vdagent_CFLAGS =			\
 	$(DRM_CFLAGS)				\
 	$(X_CFLAGS)				\
 	$(SPICE_CFLAGS)				\
-	$(GLIB2_CFLAGS)				\
+	$(GIO2_CFLAGS)				\
 	$(GTK_CFLAGS)				\
 	$(ALSA_CFLAGS)				\
 	-I$(srcdir)/src				\
@@ -28,7 +28,7 @@ src_spice_vdagent_LDADD =			\
 	$(DRM_LIBS)				\
 	$(X_LIBS)				\
 	$(SPICE_LIBS)				\
-	$(GLIB2_LIBS)				\
+	$(GIO2_LIBS)				\
 	$(GTK_LIBS)				\
 	$(ALSA_LIBS)				\
 	$(NULL)
@@ -52,7 +52,7 @@ src_spice_vdagent_SOURCES =			\
 
 tests_test_file_xfers_CFLAGS =			\
 	$(SPICE_CFLAGS)				\
-	$(GLIB2_CFLAGS)				\
+	$(GIO2_CFLAGS)				\
 	-I$(srcdir)/src				\
 	-I$(srcdir)/src/vdagent			\
 	-DUDSCS_NO_SERVER			\
@@ -60,7 +60,7 @@ tests_test_file_xfers_CFLAGS =			\
 
 tests_test_file_xfers_LDADD =			\
 	$(SPICE_LIBS)				\
-	$(GLIB2_LIBS)				\
+	$(GIO2_LIBS)				\
 	$(NULL)
 
 tests_test_file_xfers_SOURCES =			\
@@ -76,7 +76,7 @@ src_spice_vdagentd_CFLAGS =			\
 	$(LIBSYSTEMD_LOGIN_CFLAGS)		\
 	$(PCIACCESS_CFLAGS)			\
 	$(SPICE_CFLAGS)				\
-	$(GLIB2_CFLAGS)				\
+	$(GIO2_CFLAGS)				\
 	$(PIE_CFLAGS)				\
 	-I$(srcdir)/src				\
 	$(NULL)
@@ -87,7 +87,7 @@ src_spice_vdagentd_LDADD =			\
 	$(LIBSYSTEMD_LOGIN_LIBS)		\
 	$(PCIACCESS_LIBS)			\
 	$(SPICE_LIBS)				\
-	$(GLIB2_LIBS)				\
+	$(GIO2_LIBS)				\
 	$(PIE_LDFLAGS)				\
 	$(NULL)
 
diff --git a/configure.ac b/configure.ac
index 02cf5f7..7ddf86d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,7 +100,7 @@ AC_ARG_ENABLE([static-uinput],
               [enable_static_uinput="$enableval"],
               [enable_static_uinput="no"])
 
-PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.34])
+PKG_CHECK_MODULES([GIO2], [gio-unix-2.0 >= 2.44])
 PKG_CHECK_MODULES(X, [xfixes xrandr >= 1.3 xinerama x11])
 PKG_CHECK_MODULES(SPICE, [spice-protocol >= 0.14.0])
 PKG_CHECK_MODULES(ALSA, [alsa >= 1.0.22])
-- 
2.20.1



More information about the Spice-devel mailing list