diff --git a/ChangeLog b/ChangeLog index d616631c92..b6072745d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Fri Aug 15 12:34:04 2003 Owen Taylor + + 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 * gtk/gtkfilesel.c (gtk_file_selection_populate): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d616631c92..b6072745d2 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,17 @@ +Fri Aug 15 12:34:04 2003 Owen Taylor + + 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 * gtk/gtkfilesel.c (gtk_file_selection_populate): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index d616631c92..b6072745d2 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,17 @@ +Fri Aug 15 12:34:04 2003 Owen Taylor + + 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 * gtk/gtkfilesel.c (gtk_file_selection_populate): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index d616631c92..b6072745d2 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,17 @@ +Fri Aug 15 12:34:04 2003 Owen Taylor + + 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 * gtk/gtkfilesel.c (gtk_file_selection_populate): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d616631c92..b6072745d2 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,17 @@ +Fri Aug 15 12:34:04 2003 Owen Taylor + + 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 * gtk/gtkfilesel.c (gtk_file_selection_populate): diff --git a/configure.in b/configure.in index aeb28a4b07..f148834e2b 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 8444f0eead..1c8d483282 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 4ebe50c6f8..ad99169aea 100644 --- a/gtk/queryimmodules.c +++ b/gtk/queryimmodules.c @@ -31,10 +31,10 @@ #include #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 @@ -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); }