diff -Naur gtk+-2.4.0-old/Makefile.in gtk+-2.4.0/Makefile.in
--- gtk+-2.4.0-old/Makefile.in	Tue Mar 16 15:26:52 2004
+++ gtk+-2.4.0/Makefile.in	Wed Mar 17 09:40:39 2004
@@ -274,7 +274,7 @@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 
-SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests contrib
+SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos contrib
 SUBDIRS = po po-properties $(SRC_SUBDIRS) docs build m4macros
 
 # require automake 1.4
diff -Naur gtk+-2.4.0-old/configure gtk+-2.4.0/configure
--- gtk+-2.4.0-old/configure	Tue Mar 16 15:27:05 2004
+++ gtk+-2.4.0/configure	Wed Mar 17 09:44:18 2004
@@ -26465,7 +26465,7 @@
 
     if $have_freetype ; then
       gtk_save_cppflags="$CPPFLAGS"
-      CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
+      CPPFLAGS="$FREETYPE_CFLAGS $CPPFLAGS"
 
       echo "$as_me:$LINENO: checking For sufficiently new FreeType (at least 2.0.1)" >&5
 echo $ECHO_N "checking For sufficiently new FreeType (at least 2.0.1)... $ECHO_C" >&6
@@ -28217,7 +28217,7 @@
 
   # 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"
+    GTK_DEP_LIBS_FOR_X="$X_LIBS -lX11 -lfontconfig $X_EXTRA_LIBS"
   fi
 
   # Check for Xinerama extension (Solaris impl or Xfree impl)
@@ -28348,7 +28348,8 @@
 fi
 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xinerama_h" >&5
 echo "${ECHO_T}$ac_cv_header_X11_extensions_xinerama_h" >&6
-if test $ac_cv_header_X11_extensions_xinerama_h = yes; then
+#if test $ac_cv_header_X11_extensions_xinerama_h = yes; then
+if test no = yes; then
    case "$x_extra_libs " in
     *-lXext[\ \	]*)               ;;
     *)               x_extra_libs="-lXext $x_extra_libs" ;;
diff -Naur gtk+-2.4.0-old/demos/Makefile.in gtk+-2.4.0/demos/Makefile.in
--- gtk+-2.4.0-old/demos/Makefile.in	Tue Mar 16 15:26:54 2004
+++ gtk+-2.4.0/demos/Makefile.in	Wed Mar 17 09:40:39 2004
@@ -360,7 +360,9 @@
 @HAVE_PNG_FALSE@noinst_PROGRAMS = testpixbuf-drawable$(EXEEXT) \
 @HAVE_PNG_FALSE@	testanimation$(EXEEXT) testpixbuf-save$(EXEEXT) \
 @HAVE_PNG_FALSE@	testpixbuf-scale$(EXEEXT) pixbuf-demo$(EXEEXT)
-PROGRAMS = $(noinst_PROGRAMS)
+# Fasten compile process
+PROGRAMS =
+#PROGRAMS = $(noinst_PROGRAMS)
 
 am_pixbuf_demo_OBJECTS = pixbuf-demo.$(OBJEXT) pixbuf-init.$(OBJEXT)
 pixbuf_demo_OBJECTS = $(am_pixbuf_demo_OBJECTS)
diff -Naur gtk+-2.4.0-old/demos/gtk-demo/Makefile.in gtk+-2.4.0/demos/gtk-demo/Makefile.in
--- gtk+-2.4.0-old/demos/gtk-demo/Makefile.in	Tue Mar 16 15:26:54 2004
+++ gtk+-2.4.0/demos/gtk-demo/Makefile.in	Wed Mar 17 09:40:39 2004
@@ -374,7 +374,7 @@
 	textview.$(OBJEXT) tree_store.$(OBJEXT) ui_manager.$(OBJEXT)
 am_gtk_demo_OBJECTS = $(am__objects_1) main.$(OBJEXT)
 gtk_demo_OBJECTS = $(am_gtk_demo_OBJECTS)
-gtk_demo_LDFLAGS =
+gtk_demo_LDFLAGS = -L../../gdk-pixbuf/.libs -L../../gdk/.libs
 
 DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
diff -Naur gtk+-2.4.0-old/gdk/x11/gdkdrawable-x11.c gtk+-2.4.0/gdk/x11/gdkdrawable-x11.c
--- gtk+-2.4.0-old/gdk/x11/gdkdrawable-x11.c	Sat Mar  6 13:54:37 2004
+++ gtk+-2.4.0/gdk/x11/gdkdrawable-x11.c	Wed Mar 17 09:40:39 2004
@@ -983,6 +983,7 @@
     }
   else
     {
+      /* RGBA */
       pf.direct.alpha = 0;
     }
   
@@ -999,10 +1000,18 @@
    * RENDER's preferred order
    */
   pf.direct.alphaMask = 0;
-  /* ARGB */
-  pf.direct.red = 16;
-  pf.direct.green = 8;
-  pf.direct.blue = 0;
+  if (ImageByteOrder (xdisplay) == LSBFirst)
+    {
+      /* ARGB */
+      pf.direct.red = 16;
+      pf.direct.green = 8;
+      pf.direct.blue = 0;
+    } else {
+      /* BGRA */
+      pf.direct.red = 8;
+      pf.direct.green = 16;
+      pf.direct.blue = 24;
+    }
   
   *format = XRenderFindFormat (xdisplay,
 			       (PictFormatType | PictFormatDepth |
@@ -1014,7 +1023,14 @@
 			       0);
 
   pf.direct.alphaMask = 0xff;
-  pf.direct.alpha = 24;
+  if (ImageByteOrder (xdisplay) == LSBFirst)
+    {
+      /* ARGB */
+      pf.direct.alpha = 24;
+    } else {
+      /* BGRA */
+      pf.direct.alpha = 0;
+    }
   
   *mask = XRenderFindFormat (xdisplay,
 			     (PictFormatType | PictFormatDepth |
@@ -1031,11 +1047,19 @@
 
   pf.type = PictTypeDirect;
   pf.depth = 32;
-  pf.direct.red = 16;
-  pf.direct.green = 8;
-  pf.direct.blue = 0;
+  if (ImageByteOrder (xdisplay) == LSBFirst)
+    {
+      pf.direct.red = 16;
+      pf.direct.green = 8;
+      pf.direct.blue = 0;
+      pf.direct.alpha = 24;
+    } else {
+      pf.direct.red = 8;
+      pf.direct.green = 16;
+      pf.direct.blue = 24;
+      pf.direct.alpha = 0;
+    }
   pf.direct.alphaMask = 0xff;
-  pf.direct.alpha = 24;
 
   *format = XRenderFindFormat (xdisplay,
 			       (PictFormatType | PictFormatDepth |
diff -Naur gtk+-2.4.0-old/gdk/x11/gdkim-x11.c gtk+-2.4.0/gdk/x11/gdkim-x11.c
--- gtk+-2.4.0-old/gdk/x11/gdkim-x11.c	Sat Mar  6 13:54:37 2004
+++ gtk+-2.4.0/gdk/x11/gdkim-x11.c	Wed Mar 17 09:40:39 2004
@@ -26,7 +26,11 @@
 
 #include <config.h>
 
-#include <locale.h>
+#if defined(X_LOCALE)
+# include <X11/Xlocale.h>
+#else
+# include <locale.h>
+#endif
 #include <stdlib.h>
 #include <string.h>
 
diff -Naur gtk+-2.4.0-old/gtk/gtkimmulticontext.c gtk+-2.4.0/gtk/gtkimmulticontext.c
--- gtk+-2.4.0-old/gtk/gtkimmulticontext.c	Sat Mar  6 13:54:56 2004
+++ gtk+-2.4.0/gtk/gtkimmulticontext.c	Wed Mar 17 09:40:39 2004
@@ -20,7 +20,11 @@
 #include <config.h>
 
 #include <string.h>
-#include <locale.h>
+#if defined(X_LOCALE)
+# include <X11/Xlocale.h>
+#else
+# include <locale.h>
+#endif
 
 #include "gtkimmulticontext.h"
 #include "gtkimmodule.h"
diff -Naur gtk+-2.4.0-old/gtk/gtkmain.c gtk+-2.4.0/gtk/gtkmain.c
--- gtk+-2.4.0-old/gtk/gtkmain.c	Mon Mar 15 10:32:04 2004
+++ gtk+-2.4.0/gtk/gtkmain.c	Wed Mar 17 09:40:39 2004
@@ -28,7 +28,11 @@
 
 #include "gdkconfig.h"
 
-#include <locale.h>
+#if defined(X_LOCALE)
+# include <X11/Xlocale.h>
+#else
+# include <locale.h>
+#endif
 
 #ifdef HAVE_BIND_TEXTDOMAIN_CODESET
 #include <libintl.h>
diff -Naur gtk+-2.4.0-old/ltmain.sh gtk+-2.4.0/ltmain.sh
--- gtk+-2.4.0-old/ltmain.sh	Tue Feb 17 14:55:01 2004
+++ gtk+-2.4.0/ltmain.sh	Wed Mar 17 09:40:39 2004
@@ -5247,10 +5247,10 @@
 
 # Directory that this library needs to be installed in:
 libdir='$install_libdir'"
-	  if test "$installed" = no && test "$need_relink" = yes; then
-	    $echo >> $output "\
-relink_command=\"$relink_command\""
-	  fi
+#	  if test "$installed" = no && test "$need_relink" = yes; then
+#	    $echo >> $output "\
+#relink_command=\"$relink_command\""
+#	  fi
 	done
       fi
 
diff -Naur gtk+-2.4.0-old/modules/input/Makefile.in gtk+-2.4.0/modules/input/Makefile.in
--- gtk+-2.4.0-old/modules/input/Makefile.in	Tue Mar 16 15:27:01 2004
+++ gtk+-2.4.0/modules/input/Makefile.in	Wed Mar 17 09:40:39 2004
@@ -767,25 +767,18 @@
 # install-data-am, and not install-exec-am. We need to ensure this gets run
 # after the libraries are installed in their final locations.
 install-data-hook:
-	@if $(RUN_QUERY_IMMODULES_TEST) ; then \
-	  echo $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
-	  $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
-	  echo "$(top_builddir)/gtk/gtk-query-immodules-2.0 > $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules" ; \
-	  $(top_builddir)/gtk/gtk-query-immodules-2.0 > $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules ; \
-	else \
-	  echo "***" ; \
-	  echo "*** Warning: gtk.immodules not built" ; \
-	  echo "***" ; \
-	  echo "*** Generate this file manually on host" ; \
-	  echo "*** system using gtk-query-immodules-2.0" ; \
-	  echo "***" ; \
-        fi
+	$(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ;      \
+#     $(top_builddir)/gtk/gtk-query-immodules-2.0             \
+#       $(DESTDIR)$(moduledir)/*                              \
+#       | sed -e 's|$(DESTDIR)||g'                            \
+#       > $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules       \
+#       2>&1
 
 uninstall-local:
 	rm -f $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules
 
 gtk.immodules: Makefile.am $(module_LTLIBRARIES)
-	$(top_builddir)/gtk/gtk-query-immodules-2.0 $(module_LTLIBRARIES) > gtk.immodules
+#	$(top_builddir)/gtk/gtk-query-immodules-2.0 $(module_LTLIBRARIES) > gtk.immodules
 
 @CROSS_COMPILING_FALSE@all-local: gtk.immodules
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff -Naur gtk+-2.4.0-old/po/Makefile.in.in gtk+-2.4.0/po/Makefile.in.in
--- gtk+-2.4.0-old/po/Makefile.in.in	Sat Jan 17 17:18:26 2004
+++ gtk+-2.4.0/po/Makefile.in.in	Wed Mar 17 09:40:39 2004
@@ -27,7 +27,7 @@
 exec_prefix = @exec_prefix@
 datadir = @datadir@
 libdir = @libdir@
-localedir = $(libdir)/locale
+localedir = $(datadir)/locale
 gnulocaledir = $(datadir)/locale
 gettextsrcdir = $(datadir)/glib-2.0/gettext/po
 subdir = po
diff -Naur gtk+-2.4.0-old/update-gdk-pixbuf-loaders gtk+-2.4.0/update-gdk-pixbuf-loaders
--- gtk+-2.4.0-old/update-gdk-pixbuf-loaders	Wed Dec 31 19:00:00 1969
+++ gtk+-2.4.0/update-gdk-pixbuf-loaders	Wed Mar 17 09:40:39 2004
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+#
+# update-gdk-pixbuf-loaders
+#
+#   Package which install gdk-pixbuf loader(s) should call update-gdk-pixbuf-
+#   loaders in it's PostInstScript/PostRmScript to update gdk-pixbuf.loaders
+#   file.
+#
+
+CONFDIR=/opt/etc/gtk-2.0
+CONFFILE=$CONFDIR/gdk-pixbuf.loaders
+
+mkdir -p $CONFDIR
+
+TMPFILE=`tempfile`
+gdk-pixbuf-query-loaders >$TMPFILE
+
+mv -f $TMPFILE $CONFFILE
+chmod 0644 $CONFFILE
+
+exit 0
diff -Naur gtk+-2.4.0-old/update-gtk-immodules gtk+-2.4.0/update-gtk-immodules
--- gtk+-2.4.0-old/update-gtk-immodules	Wed Dec 31 19:00:00 1969
+++ gtk+-2.4.0/update-gtk-immodules	Wed Mar 17 09:40:39 2004
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+#
+# update-gtk-immodules
+#
+#   Package which install gtk immodule(s) should call update-gtk-immodules in
+#   it's PostInstScript/PostRmScript to update gtk.immodules file.
+#
+
+CONFDIR=/opt/etc/gtk-2.0
+CONFFILE=$CONFDIR/gtk.immodules
+
+mkdir -p $CONFDIR
+
+TMPFILE=`tempfile`
+gtk-query-immodules-2.0 >$TMPFILE
+
+mv -f $TMPFILE $CONFFILE
+chmod 0644 $CONFFILE
+
+exit 0
