Kaydet (Commit) 95c4f604 authored tarafından Nick Treleaven's avatar Nick Treleaven

Link with X11 if found to fix linking with a recent GNU ld.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5264 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst fc7e82be
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
Add utils_get_setting() macro for reading a key from a home or Add utils_get_setting() macro for reading a key from a home or
system keyfile. system keyfile.
Move GeanyFiletypePrivate to filetypesprivate.h. 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> 2010-09-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
......
...@@ -146,6 +146,13 @@ AC_SUBST(GIO_LIBS) ...@@ -146,6 +146,13 @@ AC_SUBST(GIO_LIBS)
if test $have_gio = 1 ; then if test $have_gio = 1 ; then
AC_DEFINE(HAVE_GIO, 1, [Whether GIO is available]) AC_DEFINE(HAVE_GIO, 1, [Whether GIO is available])
fi 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 # --disable-deprecated switch for GTK2 purification
AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ], AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ],
......
...@@ -74,7 +74,7 @@ geany_include_HEADERS = \ ...@@ -74,7 +74,7 @@ geany_include_HEADERS = \
INCLUDES = -I$(top_srcdir) -I$(srcdir)/../scintilla/include -I$(srcdir)/../tagmanager/include \ 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 # tell automake we have a C++ file so it uses the C++ linker we need for Scintilla
nodist_EXTRA_geany_SOURCES = dummy.cxx nodist_EXTRA_geany_SOURCES = dummy.cxx
...@@ -85,8 +85,9 @@ if MINGW ...@@ -85,8 +85,9 @@ if MINGW
geany_SOURCES = $(SRCS) win32.c win32.h geany_SOURCES = $(SRCS) win32.c win32.h
geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a @GTK_LIBS@ @GIO_LIBS@ \ geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a \
$(INTLLIBS) -lole32 -luuid -liberty -lwsock32 geany_private.res @GTK_LIBS@ @GIO_LIBS@ @X11_LIBS@ $(INTLLIBS) \
-lole32 -luuid -liberty -lwsock32 geany_private.res
AM_CFLAGS = -DGEANY_DATADIR=\"data\" \ AM_CFLAGS = -DGEANY_DATADIR=\"data\" \
-DGEANY_DOCDIR=\"\" \ -DGEANY_DOCDIR=\"\" \
...@@ -112,7 +113,8 @@ else ...@@ -112,7 +113,8 @@ else
geany_SOURCES = $(SRCS) vte.c vte.h 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)"\" \ AM_CFLAGS = -DGEANY_DATADIR=\""$(datadir)"\" \
-DGEANY_DOCDIR=\""$(docdir)"\" \ -DGEANY_DOCDIR=\""$(docdir)"\" \
......
...@@ -2475,7 +2475,7 @@ void ui_editable_insert_text_callback(GtkEditable *editable, gchar *new_text, ...@@ -2475,7 +2475,7 @@ void ui_editable_insert_text_callback(GtkEditable *editable, gchar *new_text,
* which ripped it from Galeon. */ * which ripped it from Galeon. */
gint ui_get_current_workspace(const gchar *display_name) 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(); GdkScreen *screen = gdk_screen_get_default();
GdkWindow *root_win = gdk_screen_get_root_window(screen); GdkWindow *root_win = gdk_screen_get_root_window(screen);
GdkDisplay *display = gdk_display_open(display_name); GdkDisplay *display = gdk_display_open(display_name);
......
...@@ -226,6 +226,7 @@ def configure(conf): ...@@ -226,6 +226,7 @@ def configure(conf):
else: else:
gtk_version = 'Unknown' gtk_version = 'Unknown'
conf.check_cfg(package='gio-2.0', uselib_store='GIO', args='--cflags --libs', mandatory=False) 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 # Windows specials
if is_win32: if is_win32:
...@@ -390,7 +391,7 @@ def build(bld): ...@@ -390,7 +391,7 @@ def build(bld):
source = geany_sources, source = geany_sources,
includes = '. src/ scintilla/include/ tagmanager/include/', includes = '. src/ scintilla/include/ tagmanager/include/',
defines = 'G_LOG_DOMAIN="Geany"', defines = 'G_LOG_DOMAIN="Geany"',
uselib = 'GTK GIO WIN32 SUNOS_SOCKET', uselib = 'GTK GIO X11 WIN32 SUNOS_SOCKET',
uselib_local = 'scintilla tagmanager', uselib_local = 'scintilla tagmanager',
add_objects = 'geany-rc' if is_win32 else None add_objects = 'geany-rc' if is_win32 else None
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment