SF.net SVN: geany:[5264] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Sep 30 14:14:54 UTC 2010


Revision: 5264
          http://geany.svn.sourceforge.net/geany/?rev=5264&view=rev
Author:   ntrel
Date:     2010-09-30 14:14:54 +0000 (Thu, 30 Sep 2010)

Log Message:
-----------
Link with X11 if found to fix linking with a recent GNU ld.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/configure.ac
    trunk/src/Makefile.am
    trunk/src/ui_utils.c
    trunk/wscript

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-09-30 13:55:31 UTC (rev 5263)
+++ trunk/ChangeLog	2010-09-30 14:14:54 UTC (rev 5264)
@@ -9,6 +9,8 @@
    Add utils_get_setting() macro for reading a key from a home or
    system keyfile.
    Move GeanyFiletypePrivate to filetypesprivate.h.
+ * src/Makefile.am, src/ui_utils.c, configure.ac, wscript:
+   Link with X11 if found to fix linking with a recent GNU ld.
 
 
 2010-09-25  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2010-09-30 13:55:31 UTC (rev 5263)
+++ trunk/configure.ac	2010-09-30 14:14:54 UTC (rev 5264)
@@ -146,6 +146,13 @@
 if test $have_gio = 1 ; then
     AC_DEFINE(HAVE_GIO, 1, [Whether GIO is available])
 fi
+# X11
+PKG_CHECK_MODULES(X11, ["x11"], have_x11=1, have_x11=0)
+AC_SUBST(X11_CFLAGS)
+AC_SUBST(X11_LIBS)
+if test $have_x11 = 1 ; then
+    AC_DEFINE(HAVE_X11, 1, [Whether X11 is available])
+fi
 
 # --disable-deprecated switch for GTK2 purification
 AC_ARG_ENABLE(deprecated, [  --disable-deprecated    Disable deprecated GTK functions. ],

Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am	2010-09-30 13:55:31 UTC (rev 5263)
+++ trunk/src/Makefile.am	2010-09-30 14:14:54 UTC (rev 5264)
@@ -74,7 +74,7 @@
 
 
 INCLUDES = -I$(top_srcdir) -I$(srcdir)/../scintilla/include -I$(srcdir)/../tagmanager/include \
-			@GTK_CFLAGS@ @GIO_CFLAGS@
+			@GTK_CFLAGS@ @GIO_CFLAGS@ @X11_CFLAGS@
 
 # tell automake we have a C++ file so it uses the C++ linker we need for Scintilla
 nodist_EXTRA_geany_SOURCES = dummy.cxx
@@ -85,8 +85,9 @@
 
 geany_SOURCES = $(SRCS) win32.c win32.h
 
-geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a @GTK_LIBS@ @GIO_LIBS@ \
-				$(INTLLIBS) -lole32 -luuid -liberty -lwsock32 geany_private.res
+geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a \
+				@GTK_LIBS@ @GIO_LIBS@ @X11_LIBS@ $(INTLLIBS) \
+				-lole32 -luuid -liberty -lwsock32 geany_private.res
 
 AM_CFLAGS = -DGEANY_DATADIR=\"data\" \
 			-DGEANY_DOCDIR=\"\" \
@@ -112,7 +113,8 @@
 
 geany_SOURCES = $(SRCS) vte.c vte.h
 
-geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a @GTK_LIBS@ @GIO_LIBS@ $(INTLLIBS)
+geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a \
+				@GTK_LIBS@ @GIO_LIBS@ @X11_LIBS@ $(INTLLIBS)
 
 AM_CFLAGS = -DGEANY_DATADIR=\""$(datadir)"\" \
 			-DGEANY_DOCDIR=\""$(docdir)"\" \

Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c	2010-09-30 13:55:31 UTC (rev 5263)
+++ trunk/src/ui_utils.c	2010-09-30 14:14:54 UTC (rev 5264)
@@ -2475,7 +2475,7 @@
  * which ripped it from Galeon. */
 gint ui_get_current_workspace(const gchar *display_name)
 {
-#ifdef GDK_WINDOWING_X11
+#if defined(GDK_WINDOWING_X11) && defined(HAVE_X11)
 	GdkScreen *screen = gdk_screen_get_default();
 	GdkWindow *root_win = gdk_screen_get_root_window(screen);
 	GdkDisplay *display = gdk_display_open(display_name);

Modified: trunk/wscript
===================================================================
--- trunk/wscript	2010-09-30 13:55:31 UTC (rev 5263)
+++ trunk/wscript	2010-09-30 14:14:54 UTC (rev 5264)
@@ -226,6 +226,7 @@
 	else:
 		gtk_version = 'Unknown'
 	conf.check_cfg(package='gio-2.0', uselib_store='GIO', args='--cflags --libs', mandatory=False)
+	conf.check_cfg(package='x11', uselib_store='X11', args='--cflags --libs', mandatory=False)
 
 	# Windows specials
 	if is_win32:
@@ -390,7 +391,7 @@
 		source			= geany_sources,
 		includes		= '. src/ scintilla/include/ tagmanager/include/',
 		defines			= 'G_LOG_DOMAIN="Geany"',
-		uselib			= 'GTK GIO WIN32 SUNOS_SOCKET',
+		uselib			= 'GTK GIO X11 WIN32 SUNOS_SOCKET',
 		uselib_local	= 'scintilla tagmanager',
 		add_objects		= 'geany-rc' if is_win32 else None
 	)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list