[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH virt-viewer 2/2] Make sure we call g_thread_init()



GThread is needed by spice-gtk
---
 configure.ac             |    6 +++---
 src/Makefile.am          |   12 ++++++------
 src/remote-viewer-main.c |    2 ++
 src/virt-viewer-main.c   |    2 ++
 4 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index ee20565..3298f55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ AC_CANONICAL_HOST
 m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
 AM_SILENT_RULES([yes])
 
-GMODULE2_REQUIRED=2.12.0
+GLIB2_REQUIRED=2.12.0
 LIBXML2_REQUIRED="2.6.0"
 LIBVIRT_REQUIRED="0.9.7"
 GTK2_REQUIRED="2.18.0"
@@ -50,7 +50,7 @@ AM_GLIB_GNU_GETTEXT
 IT_PROG_INTLTOOL([0.35.0])
 
 
-PKG_CHECK_MODULES(GMODULE2, gmodule-export-2.0 >= $GMODULE2_REQUIRED)
+PKG_CHECK_MODULES(GLIB2, glib-2.0 >= $GLIB2_REQUIRED gthread-2.0 gmodule-export-2.0)
 PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_REQUIRED)
 
 AC_ARG_WITH([libvirt],
@@ -196,7 +196,7 @@ AC_MSG_NOTICE([      Gtk: $with_gtk])
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([ Libraries:])
 AC_MSG_NOTICE([])
-AC_MSG_NOTICE([    GMODULE2: $GMODULE2_CFLAGS $GMODULE2_LIBS])
+AC_MSG_NOTICE([       GLIB2: $GLIB2_CFLAGS $GLIB2_LIBS])
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([         GTK: $GTK_CFLAGS $GTK_LIBS])
 AC_MSG_NOTICE([])
diff --git a/src/Makefile.am b/src/Makefile.am
index a76e446..e85e939 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -52,15 +52,15 @@ virt_viewer_SOURCES =					\
 	virt-viewer.h virt-viewer.c			\
 	virt-viewer-main.c				\
 	$(NULL)
-virt_viewer_LDFLAGS = 				\
-	$(GMODULE2_LIBS)			\
+virt_viewer_LDFLAGS =				\
+	$(GLIB2_LIBS)				\
 	$(GTK_LIBS)				\
 	$(LIBXML2_LIBS)				\
 	$(LIBVIRT_LIBS)				\
 	$(NULL)
 virt_viewer_CFLAGS = 				\
 	-DLOCALE_DIR=\""$(datadir)/locale"\"	\
-	$(GMODULE2_CFLAGS) 			\
+	$(GLIB2_CFLAGS) 			\
 	$(GTK_CFLAGS)				\
 	$(LIBXML2_CFLAGS)			\
 	$(LIBVIRT_CFLAGS)			\
@@ -84,14 +84,14 @@ remote_viewer_SOURCES =				\
 	remote-viewer.h remote-viewer.c		\
 	remote-viewer-main.c			\
 	$(NULL)
-remote_viewer_LDFLAGS = 			\
-	$(GMODULE2_LIBS)			\
+remote_viewer_LDFLAGS =				\
+	$(GLIB2_LIBS)				\
 	$(GTK_LIBS)				\
 	$(LIBXML2_LIBS)				\
 	$(NULL)
 remote_viewer_CFLAGS =				\
 	-DLOCALE_DIR=\""$(datadir)/locale"\"	\
-	$(GMODULE2_CFLAGS) 			\
+	$(GLIB2_CFLAGS) 			\
 	$(GTK_CFLAGS)				\
 	$(LIBXML2_CFLAGS)			\
 	$(WARN_CFLAGS)				\
diff --git a/src/remote-viewer-main.c b/src/remote-viewer-main.c
index f0c4efa..6d26605 100644
--- a/src/remote-viewer-main.c
+++ b/src/remote-viewer-main.c
@@ -83,6 +83,8 @@ main(int argc, char **argv)
         { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
     };
 
+    g_thread_init(NULL);
+
     setlocale(LC_ALL, "");
     bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR);
     bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
diff --git a/src/virt-viewer-main.c b/src/virt-viewer-main.c
index cf7f55e..4aefc19 100644
--- a/src/virt-viewer-main.c
+++ b/src/virt-viewer-main.c
@@ -84,6 +84,8 @@ int main(int argc, char **argv)
         { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
     };
 
+    g_thread_init(NULL);
+
     setlocale(LC_ALL, "");
     bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR);
     bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-- 
1.7.7.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]