summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-08-15 16:50:57 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-08-15 16:50:57 +0000
commite44f6a8a008a07a6b991b6405fa3c9962e2be8e0 (patch)
treef7823a7437e7e5f178d19e9e294cf02159404ca4
parent03813f369a24fc06716eb53b5d298316bd0f2faa (diff)
downloadgdk-pixbuf-e44f6a8a008a07a6b991b6405fa3c9962e2be8e0.tar.gz
Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai):
Fri Aug 15 12:34:04 2003 Owen Taylor <otaylor@redhat.com> Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai): * configure.in (GDK_DEP_LIBS_FOR_X): Make sure that we link libgtk against X explicitely, since we make GTK+ calls for plug/socket. * gtk/queryimmodules.c: Use USE_LA_MODULES and G_MODULE_SUFFIX here. * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_image): Protect XShmPutImage with #ifdef USE_SHM.
-rw-r--r--ChangeLog14
-rw-r--r--ChangeLog.pre-2-1014
-rw-r--r--ChangeLog.pre-2-414
-rw-r--r--ChangeLog.pre-2-614
-rw-r--r--ChangeLog.pre-2-814
-rw-r--r--configure.in8
-rw-r--r--gdk/x11/gdkdrawable-x11.c2
-rw-r--r--gtk/queryimmodules.c9
8 files changed, 83 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index d616631c9..b6072745d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Fri Aug 15 12:34:04 2003 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai):
+
+ * configure.in (GDK_DEP_LIBS_FOR_X): Make sure that
+ we link libgtk against X explicitely, since we
+ make GTK+ calls for plug/socket.
+
+ * gtk/queryimmodules.c: Use USE_LA_MODULES and
+ G_MODULE_SUFFIX here.
+
+ * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_image): Protect
+ XShmPutImage with #ifdef USE_SHM.
+
Thu Aug 14 18:25:39 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_populate):
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index d616631c9..b6072745d 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,17 @@
+Fri Aug 15 12:34:04 2003 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai):
+
+ * configure.in (GDK_DEP_LIBS_FOR_X): Make sure that
+ we link libgtk against X explicitely, since we
+ make GTK+ calls for plug/socket.
+
+ * gtk/queryimmodules.c: Use USE_LA_MODULES and
+ G_MODULE_SUFFIX here.
+
+ * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_image): Protect
+ XShmPutImage with #ifdef USE_SHM.
+
Thu Aug 14 18:25:39 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_populate):
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index d616631c9..b6072745d 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,17 @@
+Fri Aug 15 12:34:04 2003 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai):
+
+ * configure.in (GDK_DEP_LIBS_FOR_X): Make sure that
+ we link libgtk against X explicitely, since we
+ make GTK+ calls for plug/socket.
+
+ * gtk/queryimmodules.c: Use USE_LA_MODULES and
+ G_MODULE_SUFFIX here.
+
+ * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_image): Protect
+ XShmPutImage with #ifdef USE_SHM.
+
Thu Aug 14 18:25:39 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_populate):
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index d616631c9..b6072745d 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,17 @@
+Fri Aug 15 12:34:04 2003 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai):
+
+ * configure.in (GDK_DEP_LIBS_FOR_X): Make sure that
+ we link libgtk against X explicitely, since we
+ make GTK+ calls for plug/socket.
+
+ * gtk/queryimmodules.c: Use USE_LA_MODULES and
+ G_MODULE_SUFFIX here.
+
+ * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_image): Protect
+ XShmPutImage with #ifdef USE_SHM.
+
Thu Aug 14 18:25:39 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_populate):
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index d616631c9..b6072745d 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,17 @@
+Fri Aug 15 12:34:04 2003 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai):
+
+ * configure.in (GDK_DEP_LIBS_FOR_X): Make sure that
+ we link libgtk against X explicitely, since we
+ make GTK+ calls for plug/socket.
+
+ * gtk/queryimmodules.c: Use USE_LA_MODULES and
+ G_MODULE_SUFFIX here.
+
+ * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_image): Protect
+ XShmPutImage with #ifdef USE_SHM.
+
Thu Aug 14 18:25:39 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_populate):
diff --git a/configure.in b/configure.in
index aeb28a4b0..f148834e2 100644
--- a/configure.in
+++ b/configure.in
@@ -949,6 +949,7 @@ AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
GDK_EXTRA_LIBS=$GDK_WLIBS
GDK_EXTRA_CFLAGS=
+GTK_DEP_LIBS_FOR_X=
FREETYPE_LIBS=
FREETYPE_CFLAGS=
@@ -1064,6 +1065,11 @@ if test "x$gdktarget" = "xx11"; then
# Don't ever pull in the pangoxft libraries for gdk-pixbuf-x11
GDK_PIXBUF_XLIB_EXTRA_LIBS="$X_LIBS -lX11 $x_extra_libs $X_EXTRA_LIBS"
+ # GTK+ uses some X calls, so needs to link against X directly
+ if test $enable_explicit_deps != yes ; then
+ GTK_DEP_LIBS_FOR_X="$X_LIBS -lX11 $X_EXTRA_LIBS"
+ fi
+
# Check for Xinerama extension (Solaris impl or Xfree impl)
gtk_save_cppflags="$CPPFLAGS"
@@ -1395,7 +1401,7 @@ fi
GTK_PACKAGES=atk
GTK_EXTRA_LIBS=
GTK_EXTRA_CFLAGS=
-GTK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
+GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
AC_SUBST(GTK_PACKAGES)
diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c
index 8444f0eea..1c8d48328 100644
--- a/gdk/x11/gdkdrawable-x11.c
+++ b/gdk/x11/gdkdrawable-x11.c
@@ -793,11 +793,13 @@ gdk_x11_draw_image (GdkDrawable *drawable,
impl = GDK_DRAWABLE_IMPL_X11 (drawable);
+#ifdef USE_SHM
if (image->type == GDK_IMAGE_SHARED)
XShmPutImage (GDK_SCREEN_XDISPLAY (impl->screen), impl->xid,
GDK_GC_GET_XGC (gc), GDK_IMAGE_XIMAGE (image),
xsrc, ysrc, xdest, ydest, width, height, False);
else
+#endif
XPutImage (GDK_SCREEN_XDISPLAY (impl->screen), impl->xid,
GDK_GC_GET_XGC (gc), GDK_IMAGE_XIMAGE (image),
xsrc, ysrc, xdest, ydest, width, height);
diff --git a/gtk/queryimmodules.c b/gtk/queryimmodules.c
index 4ebe50c6f..ad99169ae 100644
--- a/gtk/queryimmodules.c
+++ b/gtk/queryimmodules.c
@@ -31,10 +31,10 @@
#include <unistd.h>
#endif
-#ifdef G_OS_WIN32
-#define SOEXT ".dll"
+#if USE_LA_MODULES
+#define SOEXT ".la"
#else
-#define SOEXT ".so"
+#define SOEXT ("." G_MODULE_SUFFIX)
#endif
#include <pango/pango-utils.h>
@@ -174,8 +174,7 @@ int main (int argc, char **argv)
while ((dent = g_dir_read_name (dir)))
{
- int len = strlen (dent);
- if (len > 3 && strcmp (dent + len - strlen (SOEXT), SOEXT) == 0)
+ if (g_str_has_suffix (dent, SOEXT))
error |= query_module (dirs[i], dent);
}