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

Submitted by Jakub Janku on April 30, 2019, 9:33 a.m.

Details

Message ID 20190430093339.14062-2-jjanku@redhat.com
State New
Headers show
Series "VDAgentConnection" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Jakub Janku April 30, 2019, 9:33 a.m.
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@redhat.com>
---
 Makefile.am  | 12 ++++++------
 configure.ac |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

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])