Yeah, probably doing autodetect is the best possible way, but as rhel6.x is upgrading to 2.26, I'm allowed to depend on it. On Mon, Jul 29, 2013 at 7:18 AM, Dunrong Huang <riegamaths@xxxxxxxxx> wrote: > > > > On Mon, Jul 29, 2013 at 4:43 AM, Fedor Lyakhov <fedor.lyakhov@xxxxxxxxx> > wrote: >> >> --- >> Makefile.am | 12 +++- >> configure.ac | 3 +- >> src/vdagent-display-config.c | 153 >> +++++++++++++++++++++++++++++++++++++++++++ >> src/vdagent-display-config.h | 27 ++++++++ >> src/vdagent.c | 8 +++ >> 5 files changed, 199 insertions(+), 4 deletions(-) >> create mode 100644 src/vdagent-display-config.c >> create mode 100644 src/vdagent-display-config.h >> >> diff --git a/Makefile.am b/Makefile.am >> index 74cc313..fa87420 100644 >> --- a/Makefile.am >> +++ b/Makefile.am >> @@ -4,9 +4,14 @@ NULL = >> bin_PROGRAMS = src/spice-vdagent >> sbin_PROGRAMS = src/spice-vdagentd >> >> -src_spice_vdagent_CFLAGS = $(X_CFLAGS) $(SPICE_CFLAGS) $(GLIB2_CFLAGS) >> -src_spice_vdagent_LDADD = $(X_LIBS) $(SPICE_LIBS) $(GLIB2_LIBS) >> -src_spice_vdagent_SOURCES = src/vdagent.c src/vdagent-x11.c >> src/vdagent-x11-randr.c src/vdagent-file-xfers.c src/udscs.c >> +src_spice_vdagent_CFLAGS = $(X_CFLAGS) $(SPICE_CFLAGS) >> $(GLIB2_CFLAGS) ${GIO2_CFLAGS} >> +src_spice_vdagent_LDADD = $(X_LIBS) $(SPICE_LIBS) $(GLIB2_LIBS) >> ${GIO2_LIBS} >> +src_spice_vdagent_SOURCES = src/vdagent.c \ >> + src/vdagent-x11.c \ >> + src/vdagent-x11-randr.c \ >> + src/vdagent-file-xfers.c \ >> + src/udscs.c \ >> + src/vdagent-display-config.c >> >> src_spice_vdagentd_CFLAGS = $(DBUS_CFLAGS) $(LIBSYSTEMD_LOGIN_CFLAGS) \ >> $(PCIACCESS_CFLAGS) $(SPICE_CFLAGS) $(GLIB2_CFLAGS) $(PIE_CFLAGS) >> @@ -34,6 +39,7 @@ noinst_HEADERS = src/glib-compat.h \ >> src/vdagent-virtio-port.h \ >> src/vdagent-x11.h \ >> src/vdagent-x11-priv.h \ >> + src/vdagent-display-config.h \ >> src/vdagentd-proto.h \ >> src/vdagentd-proto-strings.h \ >> src/vdagentd-uinput.h \ >> diff --git a/configure.ac b/configure.ac >> index a1ce6c0..93ddbda 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -76,7 +76,8 @@ AC_ARG_ENABLE([static-uinput], >> [enable_static_uinput="$enableval"], >> [enable_static_uinput="no"]) >> >> -PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.12]) >> +PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.26]) > > What if glib2 version is less than 2.26, e.g. centos6.4/rhel6.4, will > vdagent not support them anymore? I think we should detect glib2 version in > configure.ac, then > decide whether to enable VDAgentDisplayConfig feature or not. >> >> +PKG_CHECK_MODULES([GIO2], [gio-2.0 >= 2.26]) >> PKG_CHECK_MODULES(X, [xfixes xrandr >= 1.3 xinerama x11]) >> PKG_CHECK_MODULES(SPICE, [spice-protocol >= 0.12.5]) >> > > -- > Best Regards, > > Dunrong Huang > > Homepage: http://mathslinux.org -- Best regards, Fedor _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel