[patch] [bug 407618] fix build with glib trunk



Hi,

attached patch fixes the build with glib trunk (GSequence moved into
glib). Ok to commit?

Regards,
	Christian

Index: configure.in
===================================================================
--- configure.in	(révision 12751)
+++ configure.in	(copie de travail)
@@ -347,6 +347,10 @@ LIBEGG_MODULES="gtk+-2.0 libgnome-2.0"
 LIBEGG_CFLAGS="`$PKG_CONFIG --cflags $LIBEGG_MODULES`"
 AC_SUBST(LIBEGG_CFLAGS)
 
+# check for gsequence in glib
+PKG_CHECK_EXISTS([glib-2.0 >= 2.13.0],[have_glib_2_14=yes],[have_glib_2_14=no])
+AM_CONDITIONAL([HAVE_GLIB_2_14],[test "$have_glib_2_14" = "yes"])
+
 dnl libnautilus-extension
 LIBNAUTILUS_EXTENSION_MODULES="glib-2.0 gtk+-2.0 gnome-vfs-2.0"
 LIBNAUTILUS_EXTENSION_CFLAGS="`$PKG_CONFIG --cflags $LIBNAUTILUS_EXTENSION_MODULES`"
Index: cut-n-paste-code/Makefile.am
===================================================================
--- cut-n-paste-code/Makefile.am	(révision 12751)
+++ cut-n-paste-code/Makefile.am	(copie de travail)
@@ -1,2 +1,5 @@
-SUBDIRS = widgets libegg gsequence
+SUBDIRS = widgets libegg
 
+if !HAVE_GLIB_2_14
+SUBDIRS += gsequence
+endif
Index: src/file-manager/fm-list-model.c
===================================================================
--- src/file-manager/fm-list-model.c	(révision 12751)
+++ src/file-manager/fm-list-model.c	(copie de travail)
@@ -36,7 +36,12 @@
 #include <glib/gi18n.h>
 #include <libnautilus-private/nautilus-icon-factory.h>
 #include <libnautilus-private/nautilus-dnd.h>
+
+#if GLIB_CHECK_VERSION (2, 13, 0)
+#include <glib/gsequence.h>
+#else
 #include <gsequence/gsequence.h>
+#endif
 
 enum {
 	SUBDIRECTORY_UNLOADED,
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(révision 12751)
+++ src/Makefile.am	(copie de travail)
@@ -29,12 +29,15 @@ INCLUDES =							\
 LDADD =\
 	$(top_builddir)/src/file-manager/libnautilus-file-manager.la \
 	$(top_builddir)/libnautilus-private/libnautilus-private.la  \
-        $(top_builddir)/cut-n-paste-code/gsequence/libgsequence.la \
 	$(CORE_LIBS) \
 	$(EXIF_LIBS) \
 	$(POPT_LIBS) \
 	$(NULL)
 
+if !HAVE_GLIB_2_14
+LDADD += $(top_builddir)/cut-n-paste-code/gsequence/libgsequence.la
+endif
+
 @INTLTOOL_DESKTOP_RULE@
 
 desktop_in_files=network-scheme.desktop.in


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