]> Pileus Git - ~andy/gtk/blobdiff - configure.ac
Update quartz to reflect deletion of GdkNativeWindow and client_message functions.
[~andy/gtk] / configure.ac
index 8827cb08beaf949ff0e0a50e775b8aa2cd6f6aee..571f77330656441c4c6326f9e304947b3fb6a7cd 100644 (file)
@@ -1,6 +1,4 @@
 # Process this file with autoconf to produce a configure script.
-# require autoconf 2.54
-AC_PREREQ([2.62])
 
 # Making releases:
 #   GTK_MICRO_VERSION += 1;
@@ -11,8 +9,8 @@ AC_PREREQ([2.62])
 # set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
 
 m4_define([gtk_major_version], [2])
-m4_define([gtk_minor_version], [90])
-m4_define([gtk_micro_version], [2])
+m4_define([gtk_minor_version], [99])
+m4_define([gtk_micro_version], [3])
 m4_define([gtk_interface_age], [0])
 m4_define([gtk_binary_age],
           [m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -21,6 +19,15 @@ m4_define([gtk_version],
 # This is the X.Y used in -lgtk-FOO-X.Y
 m4_define([gtk_api_version], [3.0])
 
+AC_PREREQ([2.62])
+AC_INIT([gtk+], [gtk_version],
+        [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
+        [gtk+])
+
+AC_CONFIG_HEADER([config.h])
+AC_CONFIG_SRCDIR([gdk/gdktypes.h])
+AC_CONFIG_MACRO_DIR([m4])
+
 # Define a string for the earliest version that this release has
 # backwards binary compatibility with for all interfaces a module
 # might. Unless we add module-only API with lower stability
@@ -31,19 +38,22 @@ m4_define([gtk_api_version], [3.0])
 m4_define([gtk_binary_version], [3.0.0])
 
 # required versions of other packages
-m4_define([glib_required_version], [2.25.8])
+m4_define([glib_required_version], [2.27.5])
 m4_define([pango_required_version], [1.20])
 m4_define([atk_required_version], [1.29.2])
-m4_define([cairo_required_version], [1.6])
-
-
-AC_INIT([gtk+], [gtk_version],
-        [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
-       [gtk+])
+m4_define([cairo_required_version], [1.10.0])
+m4_define([gdk_pixbuf_required_version], [2.21.0])
+GLIB_REQUIRED_VERSION=glib_required_version
+PANGO_REQUIRED_VERSION=pango_required_version
+ATK_REQUIRED_VERSION=atk_required_version
+CAIRO_REQUIRED_VERSION=cairo_required_version
+GDK_PIXBUF_REQUIRED_VERSION=gdk_pixbuf_required_version
+AC_SUBST(GLIB_REQUIRED_VERSION)
+AC_SUBST(PANGO_REQUIRED_VERSION)
+AC_SUBST(ATK_REQUIRED_VERSION)
+AC_SUBST(CAIRO_REQUIRED_VERSION)
+AC_SUBST(GDK_PIXBUF_REQUIRED_VERSION)
 
-AC_CONFIG_HEADER([config.h])
-AC_CONFIG_SRCDIR([gdk/gdktypes.h])
-AC_CONFIG_MACRO_DIR([m4])
 
 # Save this value here, since automake will set cflags later
 cflags_set=${CFLAGS+set}
@@ -51,10 +61,10 @@ cflags_set=${CFLAGS+set}
 AM_INIT_AUTOMAKE([1.10 no-define -Wno-portability dist-bzip2])
 AM_MAINTAINER_MODE([enable])
 
-# Support silent build rules, requires at least automake-1.11. Enable
-# by either passing --enable-silent-rules to configure or passing V=0
+# Support silent build rules, requires at least automake-1.11. Disable
+# by either passing --disable-silent-rules to configure or passing V=1
 # to make
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 #
 # For each of the libraries we build, we define the following
@@ -107,19 +117,6 @@ m4_define([gail_lt_current_minus_age],[m4_eval(gail_lt_current - gail_lt_age)])
 AC_SUBST([GAIL_LT_VERSION_INFO],[gail_lt_version_info])
 AC_SUBST([GAIL_LT_CURRENT_MINUS_AGE],[gail_lt_current_minus_age])
 
-#
-# gdk-pixbuf gets versioned separately, and for now, using standard
-# libtool versioning, not GTK+-style versioning
-#
-GDK_PIXBUF_MAJOR=gtk_major_version
-GDK_PIXBUF_MINOR=gtk_minor_version
-GDK_PIXBUF_MICRO=gtk_micro_version
-GDK_PIXBUF_VERSION="${GDK_PIXBUF_MAJOR}.${GDK_PIXBUF_MINOR}.${GDK_PIXBUF_MICRO}"
-AC_SUBST(GDK_PIXBUF_MAJOR)
-AC_SUBST(GDK_PIXBUF_MINOR)
-AC_SUBST(GDK_PIXBUF_MICRO)
-AC_SUBST(GDK_PIXBUF_VERSION)
-
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_CC_C_O
@@ -239,50 +236,123 @@ AC_ARG_ENABLE(debug,
               AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
                              [turn on debugging @<:@default=debug_default@:>@]),,
               enable_debug=debug_default)
-AC_ARG_ENABLE(shm,
-              [AC_HELP_STRING([--enable-shm],
-                              [support shared memory if available [default=yes]])],,
-              [enable_shm="yes"])
-AC_ARG_ENABLE(xkb,
-              [AC_HELP_STRING([--enable-xkb],
-                              [support XKB [default=maybe]])],,
-              [enable_xkb="maybe"])
-AC_ARG_ENABLE(xinerama,
-              [AC_HELP_STRING([--enable-xinerama],
-                             [support xinerama extension if available [default=yes]])],,
-              [enable_xinerama="yes"])
+
 AC_ARG_ENABLE(rebuilds,
               [AC_HELP_STRING([--disable-rebuilds],
                               [disable all source autogeneration rules])],,
               [enable_rebuilds=yes])
-AC_ARG_ENABLE(visibility,
-              [AC_HELP_STRING([--disable-visibility],
-                              [do not use ELF visibility attributes])],,
-              [enable_visibility=yes])
 
-AC_ARG_WITH(xinput,
-            [AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
+AC_ARG_ENABLE(gtk2-dependency,
+              AC_HELP_STRING([--enable-gtk2-dependency],
+                             [Do not build gtk-update-icon-cache and other shared tools]),,
+              [enable_gtk2_dependency=no])
+
+AM_CONDITIONAL(BUILD_ICON_CACHE, [test "x$enable_gtk2_dependency" = xno])
 
-if test "$platform_win32" = yes; then
-  gdktarget=win32
+AC_ARG_ENABLE(xkb,
+              [AC_HELP_STRING([--enable-xkb],
+                              [support XKB extension [default=maybe]])],,
+              [enable_xkb="maybe"])
+AC_ARG_ENABLE(xinerama,
+              [AC_HELP_STRING([--enable-xinerama],
+                             [support Xinerama extension if available [default=maybe]])],,
+              [enable_xinerama="maybe"])
+AC_ARG_ENABLE(xinput,
+              [AC_HELP_STRING([--enable-xinput],
+                              [support XInput extension if available [default=yes]])],,
+              [enable_xinput="maybe"])
+AC_ARG_ENABLE(xrandr,
+              [AC_HELP_STRING([--enable-xrandr],
+                              [support XRandR extension if available [default=maybe]])],,
+              [enable_xrandr="maybe"])
+AC_ARG_ENABLE(xfixes,
+              [AC_HELP_STRING([--enable-xfixes],
+                              [support XFixes extension if available [default=maybe]])],,
+              [enable_xfixes="maybe"])
+AC_ARG_ENABLE(xcomposite,
+              [AC_HELP_STRING([--enable-xcomposite],
+                              [support X Composite extension if available [default=maybe]])],,
+              [enable_xcomposite="maybe"])
+AC_ARG_ENABLE(xdamage,
+              [AC_HELP_STRING([--enable-xdamage],
+                              [support X Damage extension if available [default=maybe]])],,
+              [enable_xdamage="maybe"])
+
+AC_ARG_ENABLE(x11-backend,
+              [AC_HELP_STRING([--enable-x11-backend],
+                              [enable the X11 gdk backend])],
+                             [backend_set=yes])
+AC_ARG_ENABLE(win32-backend,
+              [AC_HELP_STRING([--enable-win32-backend],
+                              [enable the Win32 gdk backend])],
+                             [backend_set=yes])
+AC_ARG_ENABLE(quartz-backend,
+              [AC_HELP_STRING([--enable-quartz-backend],
+                              [enable the quartz gdk backend])],
+                             [backend_set=yes])
+
+if test -z "$backend_set"; then
+  if test "$platform_win32" = yes; then
+    enable_win32_backend=yes
+  else
+    enable_x11_backend=yes
+  fi
+fi
+
+cairo_backends=
+backend_immodules=
+GDK_BACKENDS=
+GDK_EXTRA_LIBS=
+GDK_EXTRA_CFLAGS=
+GDK_WINDOWING=
+GIO_PACKAGE=gio-2.0
+PANGO_PACKAGES="pango pangocairo"
+
+if test "x$enable_x11_backend" == xyes; then
+  # GDK calls the xlib backend "x11," cairo calls it "xlib." Other
+  # backend names are identical.
+  cairo_backends="$cairo_backends cairo-xlib"
+  GDK_BACKENDS="$GDK_BACKENDS x11"
+  # Pull in gio-unix for GDesktopAppInfo usage, see at least
+  # gdkapplaunchcontext-x11.c
+  GIO_PACKAGE=gio-unix-2.0
+  backend_immodules="$backend_immodules,xim"
+  GDK_WINDOWING="$GDK_WINDOWING
+#define GDK_WINDOWING_X11"
+fi
+
+if test "x$enable_win32_backend" == xyes; then
+  cairo_backends="$cairo_backends cairo-win32"
+  GDK_BACKENDS="$GDK_BACKENDS win32"
+  backend_immodules="$backend_immodules,ime"
+  GDK_WINDOWING="$GDK_WINDOWING
+#define GDK_WINDOWING_WIN32"
+  GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
+  AM_CONDITIONAL(USE_WIN32, true)
+  PANGO_PACKAGES="pangowin32 pangocairo"
 else
-  gdktarget=x11
+  AM_CONDITIONAL(USE_WIN32, false)
 fi
 
-AC_ARG_WITH(gdktarget, [  --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
-       gdktarget=$with_gdktarget)
+if test "x$enable_quartz_backend" == xyes; then
+  cairo_backends="$cairo_backends cairo-quartz"
+  GDK_BACKENDS="$GDK_BACKENDS quartz"
+  GDK_WINDOWING="$GDK_WINDOWING
+#define GDK_WINDOWING_QUARTZ"
+  GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
+  AM_CONDITIONAL(USE_QUARTZ, true)
+else
+  AM_CONDITIONAL(USE_QUARTZ, false)
+fi
 
-AC_SUBST(gdktarget)
-case $gdktarget in
-  x11|win32|quartz|directfb) ;;
-  *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
-esac
+# strip leading space
+GDK_BACKENDS=${GDK_BACKENDS/# }
 
-gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
-gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
+AC_SUBST(GDK_BACKENDS)
 
-AC_SUBST(gdktargetlib)
-AC_SUBST(gtktargetlib)
+if test -z "$GDK_BACKENDS"; then
+  AC_MSG_ERROR([No GDK backends selected.])
+fi
 
 if test "x$enable_debug" = "xyes"; then
   test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
@@ -296,11 +366,6 @@ else
 fi
 
 
-if test "x$enable_visibility" = "xno"; then
-  GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
-fi
-
-
 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
                    [Define if debugging is enabled])
 
@@ -376,27 +441,18 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES,
   [glib-2.0 >= glib_required_version dnl
    atk >= atk_required_version dnl
    pango >= pango_required_version dnl
-   cairo >= cairo_required_version])
-
-## In addition to checking that cairo is present, we also need to
-## check that the correct cairo backend is there. E.g. if the GDK
-## target is win32 we need the cairo-win32 backend and so on.
-cairo_backend=$gdktarget
+   cairo >= cairo_required_version dnl
+   cairo-gobject >= cairo_required_version dnl
+   gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
 
-# GDK calls the xlib backend "x11," cairo calls it "xlib." Other
-# backend names are identical.
-if test "x$cairo_backend" = "xx11"; then
-   cairo_backend=xlib
-fi
-PKG_CHECK_MODULES(CAIRO_BACKEND,
-  [cairo-$cairo_backend >= cairo_required_version])
+PKG_CHECK_MODULES(CAIRO_BACKEND, [$cairo_backends])
 
 if test "$os_win32" != yes; then
     # libtool option to control which symbols are exported
     # right now, symbols starting with _ are not exported
     LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
 else
-    # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk)
+    # We currently use .def files on Windows (for gdk and gtk)
     LIBTOOL_EXPORT_OPTIONS=
 fi
 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
@@ -497,18 +553,6 @@ if test "$gtk_ok" = "yes"; then
            [Define if _NL_PAPER_WIDTH is available])
 fi
 
-# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
-AC_MSG_CHECKING(for sigsetjmp)
-AC_TRY_LINK([#include <setjmp.h>], [
-sigjmp_buf env;
-sigsetjmp(env, 0);
-], gtk_ok=yes, gtk_ok=no)
-AC_MSG_RESULT($gtk_ok)
-if test "$gtk_ok" = "yes"; then
-  AC_DEFINE(HAVE_SIGSETJMP, 1,
-            [Define to 1 if sigsetjmp is available])
-fi
-
 # i18n stuff
 ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
 AM_GLIB_GNU_GETTEXT
@@ -605,7 +649,7 @@ AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
 #
 
-GLIB_PACKAGES="gobject-2.0 gmodule-no-export-2.0"
+GLIB_PACKAGES="gobject-2.0 gio-2.0 gmodule-no-export-2.0"
 
 AM_PATH_GLIB_2_0(glib_required_version, :,
   AC_MSG_ERROR([
@@ -692,53 +736,6 @@ else
     fi
 fi
 
-# `widechar' tests for gdki18n.h
-AC_MSG_CHECKING(for wchar.h)
-AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
-if test $gdk_wchar_h = yes; then
-   AC_DEFINE(HAVE_WCHAR_H, 1, [Have wchar.h include file])
-fi
-AC_MSG_RESULT($gdk_wchar_h)
-
-# Check for wctype.h (for iswalnum)
-AC_MSG_CHECKING(for wctype.h)
-AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
-if test $gdk_wctype_h = yes; then
-   AC_DEFINE(HAVE_WCTYPE_H, 1, [Have wctype.h include file])
-fi
-AC_MSG_RESULT($gdk_wctype_h)
-
-# in Solaris 2.5, `iswalnum' is in -lw
-GDK_WLIBS=
-AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
-
-oLIBS="$LIBS"
-LIBS="$LIBS $GDK_WLIBS"
-# The following is necessary for Linux libc-5.4.38
-AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
-AC_TRY_LINK([#include <stdlib.h>],[
-#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
-#  ifdef HAVE_WCTYPE_H
-#    include <wctype.h>
-#  else
-#    ifdef HAVE_WCHAR_H
-#      include <wchar.h>
-#    endif
-#  endif
-#else
-#  define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
-#endif
-iswalnum((wchar_t) 0);
-], gdk_working_wctype=yes, gdk_working_wctype=no)
-LIBS="$oLIBS"
-
-if test $gdk_working_wctype = no; then
-   AC_DEFINE(HAVE_BROKEN_WCTYPE, 1, [Is the wctype implementation broken])
-   GDK_WLIBS=
-fi
-AC_MSG_RESULT($gdk_working_wctype)
-AC_SUBST(GDK_WLIBS)
-
 # Check for uxtheme.h (for MS-Windows Engine)
 AC_MSG_CHECKING(for uxtheme.h)
 AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
@@ -751,33 +748,14 @@ AC_MSG_RESULT($gtk_uxtheme_h)
 AC_CHECK_HEADERS(crt_externs.h)
 AC_CHECK_FUNCS(_NSGetEnviron)
 
-
-##################################################
-# Checks for gdk-pixbuf
-##################################################
-
-dnl ********************************************************
-dnl * See whether we need to load our modules as .la files *
-dnl ********************************************************
-
-use_la_modules=false
-case $host in
-  *-aix*) use_la_modules=true
-esac
-
-if $use_la_modules ; then
-   AC_DEFINE(USE_LA_MODULES, 1,
-             [Whether to load modules via .la files rather than directly])
-fi
-
-
-AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
+AC_MSG_CHECKING(whether to build dynamic modules)
 
 AC_ARG_ENABLE(modules,
               [AC_HELP_STRING([--disable-modules],
                               [disable dynamic module loading])])
 
 dynworks=false
+build_dynamic_modules=no
 deps=
 if test x$enable_modules = xno; then
     AC_MSG_RESULT(no)
@@ -793,318 +771,30 @@ else
     dnl Now we check to see if our libtool supports shared lib deps
     dnl (in a rather ugly way even)
     if $dynworks; then
-        pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
-        pixbuf_deplibs_check=`$pixbuf_libtool_config | \
+        module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
+        module_deplibs_check=`$module_libtool_config | \
             grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
             sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-        if test "x$pixbuf_deplibs_check" = "xnone" || \
-           test "x$pixbuf_deplibs_check" = "xunknown" || \
-           test "x$pixbuf_deplibs_check" = "x"; then
+        if test "x$module_deplibs_check" = "xnone" || \
+           test "x$module_deplibs_check" = "xunknown" || \
+           test "x$module_deplibs_check" = "x"; then
             dynworks=false
         fi
     fi
 
     if $dynworks; then
+        build_dynamic_modules=yes
         AC_DEFINE(USE_GMODULE, 1,
                   [Define to 1 if gmodule works and should be used])
         AC_MSG_RESULT(yes)
     else
+        build_dynamic_modules=no
         AC_MSG_RESULT(no)
     fi
 fi
 
-dnl We allow people to disable image loaders explicitely, but if they don't we error
-dnl out so that people don't accidentally build without them.
-
-AC_ARG_WITH(libpng,
-            [AC_HELP_STRING([--without-libpng],
-                            [disable PNG loader for gdk-pixbuf])])
-AC_ARG_WITH(libjpeg,
-            [AC_HELP_STRING([--without-libjpeg],
-                            [disable JPEG loader for gdk-pixbuf])])
-AC_ARG_WITH(libtiff,
-            [AC_HELP_STRING([--without-libtiff],
-                            [disable TIFF loader for gdk-pixbuf])])
-AC_ARG_WITH(libjasper,
-            [AC_HELP_STRING([--with-libjasper],
-                            [enable JPEG2000 loader for gdk-pixbuf])])
-
-AC_ARG_ENABLE(gdiplus,
-            [AC_HELP_STRING([--enable-gdiplus],
-                            [enble GDI+ loaders for gdk-pixbuf (currently known to be broken)])],,
-           [enable_gdiplus=no])
-
-AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ])
-
-dnl Test for libtiff
-if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
-  if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
-    AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented,
-      [AC_CHECK_HEADER(tiffio.h,
-        TIFF='tiff'; LIBTIFF='-ltiff',
-        AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
-      [AC_CHECK_LIB(tiff, TIFFWriteScanline,
-        [AC_CHECK_HEADER(tiffio.h,
-          TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
-          AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
-        [AC_CHECK_LIB(tiff34, TIFFFlushData,
-          [AC_CHECK_HEADER(tiffio.h,
-            TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
-            AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
-        AC_MSG_WARN(*** TIFF loader will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
-  fi
-
-  if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
-     AC_MSG_ERROR([
-*** Checks for TIFF loader failed. You can build without it by passing
-*** --without-libtiff to configure but some programs using GTK+ may
-*** not work properly])
-  fi
-fi
-
-dnl Test for libjpeg
-if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
-  if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
-    AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
-      jpeg_ok=yes,
-      jpeg_ok=no
-      AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
-    if test "$jpeg_ok" = yes; then
-      AC_MSG_CHECKING([for jpeglib.h])
-      AC_TRY_CPP(
-[#include <stdio.h>
-#undef PACKAGE
-#undef VERSION
-#undef HAVE_STDLIB_H
-#include <jpeglib.h>],
-        jpeg_ok=yes,
-        jpeg_ok=no)
-      AC_MSG_RESULT($jpeg_ok)
-      if test "$jpeg_ok" = yes; then
-        LIBJPEG='-ljpeg'
-        AC_CHECK_LIB(jpeg, jpeg_simple_progression,
-          AC_DEFINE(HAVE_PROGRESSIVE_JPEG, 1,
-                    [Define to 1 is libjpeg supports progressive JPEG]),
-          AC_MSG_WARN(JPEG library does not support progressive saving.))
-      else
-          AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
-      fi
-    fi
-  fi
-
-  if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
-     AC_MSG_ERROR([
-*** Checks for JPEG loader failed. You can build without it by passing
-*** --without-libjpeg to configure but some programs using GTK+ may
-*** not work properly])
-  fi
-fi
-
-dnl Test for libpng
-  if test x$with_libpng != xno && test -z "$LIBPNG"; then
-    AC_MSG_CHECKING(for libpng12)
-    if $PKG_CONFIG --exists libpng12 ; then
-        AC_MSG_RESULT(yes)
-        PNG='png'
-       PNG_DEP_CFLAGS_PACKAGES=libpng12
-       LIBPNG=`$PKG_CONFIG --libs libpng12`
-    else
-      AC_MSG_RESULT(no)
-      AC_CHECK_LIB(png, png_read_info,
-        [AC_CHECK_HEADER(png.h,
-          png_ok=yes,
-          png_ok=no)],
-        AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
-      if test "$png_ok" = yes; then
-        AC_MSG_CHECKING([for png_structp in png.h])
-        AC_TRY_COMPILE([#include <png.h>],
-          [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
-          png_ok=yes,
-          png_ok=no)
-        AC_MSG_RESULT($png_ok)
-        if test "$png_ok" = yes; then
-          PNG='png'; LIBPNG='-lpng -lz'
-        else
-          AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
-        fi
-      else
-       AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
-      fi
-    fi
-  fi
-
-  if test x$with_libpng != xno && test -z "$LIBPNG"; then
-     AC_MSG_ERROR([
-*** Checks for PNG loader failed. You can build without it by passing
-*** --without-libpng to configure but many programs using GTK+ will
-*** not work properly. The PNG loader is also needed if you are compiling
-*** from CVS.])
-  fi
-
-dnl Test for libjasper
-  if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
-    AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg -lm)
-  fi
-
-  if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
-     AC_MSG_ERROR([
-*** Checks for JPEG2000 loader failed. You can build without it by passing
-*** --without-libjasper to configure])
-  fi
-
-AC_SUBST(LIBTIFF)
-AC_SUBST(LIBJPEG)
-AC_SUBST(LIBPNG)
-AC_SUBST(LIBJASPER)
-
 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
 
-#
-# Allow building some or all gdk-pixbuf loaders included
-#
-AC_MSG_CHECKING(pixbuf loaders to build)
-
-dnl due to an autoconf bug, commas in the first arg to
-dnl AC_HELP_STRING cause problems.
-dnl AC_HELP_STRING([--with-included-loaders=LOADER1 LOADER2 ...],
-dnl                [build the specified loaders into gdk-pixbuf])
-AC_ARG_WITH(included_loaders,
-[  --with-included-loaders=LOADER1,LOADER2,...
-                          build the specified loaders into gdk-pixbuf])
-
-if $dynworks; then
-   :
-else
-   ## if the option was specified, leave it; otherwise disable included loaders
-   if test x$with_included_loaders = xno; then
-           with_included_loaders=yes
-   fi
-fi
-
-# Use the traditional png loader instead of the GDI+ one on Windows,
-# because some important apps like GIMP need to read and write
-# arbitrary tEXt chunks which doesn't seem to be possible through GDI+
-
-all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm,qtif"
-if test x$with_libjasper != xno; then
-  all_loaders="$all_loaders,jasper"
-fi
-if test x$os_win32 = xyes && test x$enable_gdiplus != xno; then
-  # Skip PNG, see comment above
-  gdip_formats="bmp emf gif ico jpeg tiff wmf"
-  for f in $gdip_formats; do
-    all_loaders="$all_loaders,gdip-$f"
-  done
-else
-  all_loaders="$all_loaders,bmp,gif,ico,jpeg,tiff"
-fi
-included_loaders=""
-# If no loaders specified, include all
-if test "x$with_included_loaders" = xyes ; then
-  included_loaders="$all_loaders"
-else
-  included_loaders="$with_included_loaders"
-fi
-
-AC_MSG_RESULT($included_loaders)
-
-INCLUDED_LOADER_OBJ=
-INCLUDED_LOADER_DEFINE=
-
-IFS="${IFS=    }"; gtk_save_ifs="$IFS"; IFS=","
-for loader in $included_loaders; do
- if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
-   :
- else
-   AC_MSG_ERROR([the specified loader $loader does not exist])
- fi
-
- loader_underscores=`echo $loader | sed -e 's/-/_/g'`
- INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libstatic-pixbufloader-$loader.la"
-
- # Don't bother defining separate -DINCLUDE_gdip_foo for each gdip-foo loader
- case $loader in
-   gdip-*) ;;
-   *) INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader_underscores";;
- esac
- eval INCLUDE_$loader_underscores=yes
-done
-
-# Just define one -DINCLUDE_gdiplus for all the gdip-foo loaders
-# (except gdip-png, which isn't built at all)
-if test x"$INCLUDE_gdip_ico" = xyes; then
-  INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_gdiplus"
-fi
-
-IFS="$gtk_save_ifs"
-AC_SUBST(INCLUDED_LOADER_OBJ)
-AC_SUBST(INCLUDED_LOADER_DEFINE)
-
-AM_CONDITIONAL(INCLUDE_PNG, [test x"$INCLUDE_png" = xyes])
-AM_CONDITIONAL(INCLUDE_BMP, [test x"$INCLUDE_bmp" = xyes])
-AM_CONDITIONAL(INCLUDE_WBMP, [test x"$INCLUDE_wbmp" = xyes])
-AM_CONDITIONAL(INCLUDE_GIF, [test x"$INCLUDE_gif" = xyes])
-AM_CONDITIONAL(INCLUDE_ICO, [test x"$INCLUDE_ico" = xyes])
-AM_CONDITIONAL(INCLUDE_ANI, [test x"$INCLUDE_ani" = xyes])
-AM_CONDITIONAL(INCLUDE_JPEG, [test x"$INCLUDE_jpeg" = xyes])
-AM_CONDITIONAL(INCLUDE_PNM, [test x"$INCLUDE_pnm" = xyes])
-AM_CONDITIONAL(INCLUDE_RAS, [test x"$INCLUDE_ras" = xyes])
-AM_CONDITIONAL(INCLUDE_TIFF, [test x"$INCLUDE_tiff" = xyes])
-AM_CONDITIONAL(INCLUDE_XPM, [test x"$INCLUDE_xpm" = xyes])
-AM_CONDITIONAL(INCLUDE_XBM, [test x"$INCLUDE_xbm" = xyes])
-AM_CONDITIONAL(INCLUDE_TGA, [test x"$INCLUDE_tga" = xyes])
-AM_CONDITIONAL(INCLUDE_PCX, [test x"$INCLUDE_pcx" = xyes])
-AM_CONDITIONAL(INCLUDE_ICNS, [test x"$INCLUDE_icns" = xyes])
-AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes])
-AM_CONDITIONAL(INCLUDE_QTIF, [test x"$INCLUDE_qtif" = xyes])
-# As all GDI+ loaders are either built-in or not, arbitrarily just
-# check one of the variables here
-AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes])
-
-if test x$gio_can_sniff = x; then
-  AC_MSG_CHECKING([if gio can sniff png])
-  gtk_save_LIBS="$LIBS"
-  gtk_save_CFLAGS="$CFLAGS"
-  LIBS="`$PKG_CONFIG --libs gio-2.0`"
-  CFLAGS="`$PKG_CONFIG --cflags gio-2.0`"
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[
-  #include <gio/gio.h>
-  static const gsize data_size = 159;
-  static const guint8 data[] =
-  {
-    0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
-    0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-    0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xde, 0x00, 0x00, 0x00,
-    0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
-    0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00,
-    0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74,
-    0x49, 0x4d, 0x45, 0x07, 0xd8, 0x07, 0x0f, 0x10, 0x08, 0x15, 0x61, 0xd8,
-    0x35, 0x37, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f,
-    0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
-    0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57,
-    0x81, 0x0e, 0x17, 0x00, 0x00, 0x00, 0x0c, 0x49, 0x44, 0x41, 0x54, 0x08,
-    0xd7, 0x63, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x05, 0xfe, 0x02, 0xfe, 0xdc,
-    0xcc, 0x59, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
-    0x42, 0x60, 0x82
-  };
-  int
-  main (int argc, char **argv)
-  {
-    char *content_type;
-    char *image_png;
-    g_type_init ();
-    content_type = g_content_type_guess (NULL, data, data_size, NULL);
-    image_png = g_content_type_from_mime_type ("image/png");
-    return !!g_strcmp0 (content_type, image_png);
-  }]])],
-    [gio_can_sniff=yes
-     AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])],
-    [gio_can_sniff=no])
-  AC_MSG_RESULT($gio_can_sniff)
-  LIBS="$gtk_save_LIBS"
-  CFLAGS="$gtk_save_CFLAGS"
-fi
-
 #
 # Allow building some or all immodules included
 #
@@ -1115,8 +805,8 @@ dnl AC_HELP_STRING cause problems.
 dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...],
 dnl                [build the specified input method modules into gtk])
 AC_ARG_WITH(included_immodules,
-[  --with-included-immodules=MODULE1,MODULE2,...
-                          build the specified input methods into gtk])
+            AC_HELP_STRING([--with-included-immodules=MODULE1,MODULE2,...],
+                           [build the specified input methods into gtk]))
 
 if $dynworks; then
    :
@@ -1127,14 +817,7 @@ else
    fi
 fi
 
-all_immodules="am-et,cedilla,cyrillic-translit"
-if test "$gdktarget" = "win32"; then
-   all_immodules="${all_immodules},ime"
-fi
-all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
-if test "$gdktarget" = "x11"; then
-   all_immodules="${all_immodules},xim"
-fi
+all_immodules="am-et,cedilla,cyrillic-translit,inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr$backend_immodules"
 
 included_immodules=""
 # If the switch specified without listing any specific ones, include all
@@ -1184,29 +867,6 @@ AC_HEADER_SYS_WAIT
 
 AC_TYPE_SIGNAL
 
-AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
-AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
-AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
-AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
-
-if $dynworks ; then
-  STATIC_LIB_DEPS=
-  if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
-    STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
-  fi
-  if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
-    STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
-  fi
-  if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
-    STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
-  fi
-  if echo "$included_loaders" | egrep '(^|,)jasper($|,)' > /dev/null; then
-    STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJASPER"
-  fi
-else
-  STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG $LIBJASPER"
-fi
-
 # Checks to see whether we should include mediaLib
 # support.
 #
@@ -1217,86 +877,21 @@ AC_CHECK_HEADER(sys/sysinfo.h,
                 AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
                           [Define to 1 if sys/sysinfo.h is available]))
 
-AC_MSG_CHECKING(for mediaLib 2.3)
-use_mlib25=no
-# Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
-# patch requires.
-AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
-if test $use_mlib = yes; then
-    AC_DEFINE(USE_MEDIALIB, 1,
-              [Define to 1 if medialib is available and should be used])
-    MEDIA_LIB=-lmlib
-
-    AC_MSG_CHECKING(for mediaLib 2.5)
-    # Check for a mediaLib 2.5 function since that is what is needed for
-    # gdk_rgb_convert integration.
-    AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
-    if test $use_mlib25 = yes; then
-        AC_DEFINE(USE_MEDIALIB25, 1,
-                  [Define to 1 if medialib 2.5 is available])
-    fi
-fi
-AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
-AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
-
-# Checks to see if we should compile in MMX support (there will be
-# a runtime test when the code is actually run to see if it should
-# be used - this just checks if we can compile it.)
-#
-# This code is partially taken from Mesa
-#
-AC_MSG_CHECKING(for x86 platform)
-case $host_cpu in
-  i386|i486|i586|i686|i786|k6|k7)
-        use_x86_asm=yes
-        ;;
-   *)
-        use_x86_asm=no
-esac
-AC_MSG_RESULT($use_x86_asm)
-
-use_mmx_asm=no
-if test $use_x86_asm = yes; then
-    save_ac_ext=$ac_ext
-    ac_ext=S
-
-    AC_MSG_CHECKING(compiler support for MMX)
-    cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
-    if AC_TRY_EVAL(ac_compile); then
-        use_mmx_asm=yes
-    fi
-
-    rm -rf conftest*
-
-    ac_ext=$save_ac_ext
-    if test $use_mmx_asm = yes; then
-      AC_DEFINE(USE_MMX, 1,
-                [Define to 1 if XXM is available and should be used])
-      AC_MSG_RESULT(yes)
-    else
-      AC_MSG_RESULT(no)
-    fi
-fi
-
-AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
-
-REBUILD_PNGS=
-if test -z "$LIBPNG" && test x"$os_win32" = xno -o x$enable_gdiplus = xno; then
-  REBUILD_PNGS=#
-fi
-
 dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
 
 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
 
-if test $cross_compiling = yes; then
-  AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
+if test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes; then
   AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
   if test x$GTK_UPDATE_ICON_CACHE = xno; then
     REBUILD_PNGS=#
   fi
 fi
 
+AM_CONDITIONAL(USE_EXTERNAL_ICON_CACHE, [test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes])
+
+AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
+
 if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
    test "x$REBUILD_PNGS" = "x#" ; then
      AC_MSG_ERROR([
@@ -1305,30 +900,16 @@ if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
 *** don't have a prebuilt gtk-update-icon-cache on the build system.])
 fi
 
-AC_SUBST(REBUILD_PNGS)
-
-GDK_PIXBUF_PACKAGES="gmodule-no-export-2.0 gobject-2.0 gio-2.0"
-GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB $MEDIA_LIB"
-GDK_PIXBUF_EXTRA_CFLAGS=
-GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
-GDK_PIXBUF_DEP_CFLAGS="`$PKG_CONFIG --cflags  gthread-2.0 $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS"
-
 ########################################
 # Windowing system checks
 ########################################
 
-GDK_PIXBUF_XLIB_PACKAGES=
-GDK_PIXBUF_XLIB_EXTRA_CFLAGS=
-GDK_PIXBUF_XLIB_EXTRA_LIBS=
-
-GDK_EXTRA_LIBS="$GDK_WLIBS"
-GDK_EXTRA_CFLAGS=
-
 # GTK+ uses some X calls, so needs to link against X directly
 GTK_DEP_PACKAGES_FOR_X=
 GTK_DEP_LIBS_FOR_X=
+X_EXTENSIONS=
 
-if test "x$gdktarget" = "xx11"; then
+if test "x$enable_x11_backend" == xyes; then
   X_PACKAGES=fontconfig
 
   #
@@ -1343,11 +924,11 @@ if test "x$gdktarget" = "xx11"; then
   #
   # Check for basic X packages; we use pkg-config if available
   #
-  if $PKG_CONFIG --exists x11 xext xrender; then
+  if $PKG_CONFIG --exists x11 xext; then
     have_base_x_pc=true
-    X_PACKAGES="$X_PACKAGES x11 xext xrender"
-    x_libs="`$PKG_CONFIG --libs x11 xext xrender`"
-    X_CFLAGS="`$PKG_CONFIG --cflags x11 xext xrender`"
+    X_PACKAGES="$X_PACKAGES x11 xext"
+    x_libs="`$PKG_CONFIG --libs x11 xext`"
+    X_CFLAGS="`$PKG_CONFIG --cflags x11 xext`"
 
     # Strip out any .la files that pkg-config might give us (this happens
     # with -uninstalled.pc files)
@@ -1359,7 +940,6 @@ if test "x$gdktarget" = "xx11"; then
       esac
     done
 
-    GDK_PIXBUF_XLIB_PACKAGES="x11"
     GTK_PACKAGES_FOR_X="x11"
   else
     have_base_x_pc=false
@@ -1369,11 +949,9 @@ if test "x$gdktarget" = "xx11"; then
     fi
 
     x_cflags="$X_CFLAGS"
-    x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
+    x_libs_for_checks="$X_LIBS -lXext -lX11 $X_EXTRA_LIBS"
 
-    GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
-    GDK_PIXBUF_XLIB_EXTRA_LIBS="$X_LIBS -lX11 $X_EXTRA_LIBS"
-    GTK_DEP_LIBS_FOR_X="$X_LIBS -lXrender -lX11 $X_EXTRA_LIBS"
+    GTK_DEP_LIBS_FOR_X="$X_LIBS -lX11 $X_EXTRA_LIBS"
   fi
 
   # Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
@@ -1392,8 +970,6 @@ if test "x$gdktarget" = "xx11"; then
                 AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
   AC_CHECK_FUNC(XextFindDisplay, :,
                 AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
-  AC_CHECK_FUNC(XRenderQueryExtension, :,
-                AC_MSG_ERROR([*** libXrender not found. Check 'config.log' for more details.]))
 
   # Check for xReply
 
@@ -1431,10 +1007,13 @@ if test "x$gdktarget" = "xx11"; then
   # Check for XKB support.
 
   if test "x$enable_xkb" = "xyes"; then
-        AC_MSG_WARN(XKB support explicitly enabled)
-        AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
+        AC_CHECK_FUNC(XkbQueryExtension,
+                      X_EXTENSIONS="$X_EXTENSIONS XKB"
+                      AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]),
+                      AC_MSG_ERROR([*** XKB extension not found. Check 'config.log' for more details.]))
   elif test "x$enable_xkb" = "xmaybe"; then
         AC_CHECK_FUNC(XkbQueryExtension,
+                      X_EXTENSIONS="$X_EXTENSIONS XKB"
                       AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]))
   else
         AC_MSG_WARN(XKB support explicitly disabled)
@@ -1456,67 +1035,23 @@ if test "x$gdktarget" = "xx11"; then
 
   CFLAGS="$gtk_save_CFLAGS"
 
-  # Xshm checks
-
-  if test "x$enable_shm" = "xyes"; then
-     # Check for the XShm extension, normally in Xext
-     AC_CHECK_FUNC(XShmAttach,
-       :,
-       # On AIX, it is in XextSam instead
-       [AC_CHECK_LIB(XextSam, XShmAttach,
-           [GTK_ADD_LIB(x_extra_libs,XextSam)])])
-  fi
-
-  if test "x$enable_shm" = "xyes"; then
-    # Check for shared memory
-    AC_CHECK_HEADER(sys/ipc.h,
-                    AC_DEFINE(HAVE_IPC_H, 1,
-                              [Define to 1 if ipc.h is available]),
-                    no_sys_ipc=yes)
-    AC_CHECK_HEADER(sys/shm.h,
-                    AC_DEFINE(HAVE_SHM_H, 1,
-                              [Define to 1 if shm.h is available]),
-                    no_sys_shm=yes)
-
-    # Check for the X shared memory extension header file
-    have_xshm=no
-    AC_MSG_CHECKING(X11/extensions/XShm.h)
-    if test "x$no_xext_lib" = "xyes"; then
-      :
-    else
-      gtk_save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS $x_cflags"
-      AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/extensions/XShm.h>
-], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
-      CFLAGS="$gtk_save_CFLAGS"
-    fi
-    AC_MSG_RESULT($have_xshm)
-    if test $have_xshm = yes ; then
-      AC_DEFINE(HAVE_XSHM_H, 1,
-                [Define to 1 if xshm.h is available])
-    fi
-  fi
-
-  if test "x$enable_xinerama" = "xyes"; then
+  if test "x$enable_xinerama" != "xno"; then
     # Check for Xinerama extension (Solaris impl or Xfree impl)
+    have_xfree_xinerama=false
+    have_solaris_xinerama=false
+
     gtk_save_cppflags="$CPPFLAGS"
     CPPFLAGS="$CPPFLAGS $x_cflags"
 
     # Check for XFree
-    AC_MSG_CHECKING(for Xinerama support on XFree86)
+    AC_MSG_CHECKING(for Xinerama packages)
 
-    have_xfree_xinerama=false
     if $PKG_CONFIG --exists xinerama ; then
+       AC_MSG_RESULT(yes)
        have_xfree_xinerama=true
        X_PACKAGES="$X_PACKAGES xinerama"
     else
+       AC_MSG_RESULT(no)
        AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
           [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
           [GTK_ADD_LIB(x_extra_libs,Xinerama)
@@ -1525,14 +1060,12 @@ if test "x$gdktarget" = "xx11"; then
     fi
 
     if $have_xfree_xinerama ; then
+      X_EXTENSIONS="$X_EXTENSIONS Xinerama"
       AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
                 [Define to 1 if XFree Xinerama is available])
       AC_DEFINE(HAVE_XINERAMA, 1,
                 [Define to 1 is Xinerama is available])
-      AC_MSG_RESULT(yes)
     else
-      AC_MSG_RESULT(no)
-
       case "$host" in
         *-*-solaris*)
             # Check for solaris
@@ -1545,6 +1078,7 @@ if test "x$gdktarget" = "xx11"; then
                    [#include <X11/Xlib.h>])])
 
             if $have_solaris_xinerama ; then
+              X_EXTENSIONS="$X_EXTENSIONS Xinerama"
               AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
                         [Define to 1 if solaris xinerama is available])
              AC_DEFINE(HAVE_XINERAMA, 1,
@@ -1559,30 +1093,51 @@ if test "x$gdktarget" = "xx11"; then
       esac
     fi
   fi
+  if test "x$enable_xinerama" = "xyes" ; then
+    if test "x$have_xfree_xinerama" != "xtrue" -a "x$have_solaris_xinerama" != "xtrue" ; then
+      AC_MSG_ERROR([*** Xinerama extension not found. Check 'config.log' for more details.])
+    fi
+  fi
 
   # set up things for XInput
-  if test "x$with_xinput" != "xno" && $PKG_CONFIG --exists "xi" ; then
+  if test "x$enable_xinput" != "xno" && $PKG_CONFIG --exists "xi" ; then
+    have_xinput=yes
+
     AC_DEFINE(XINPUT_XFREE, 1,
               [Define to 1 if XFree XInput should be used])
 
     X_PACKAGES="$X_PACKAGES xi"
 
     AC_CHECK_HEADER(X11/extensions/XInput2.h,
-                    have_xinput2=yes; AC_DEFINE(XINPUT_2, 1, [Define to 1 if XInput 2.0 is available]))
+                    have_xinput2=yes
+                    X_EXTENSIONS="$X_EXTENSIONS XI2"
+                    AC_DEFINE(XINPUT_2, 1, [Define to 1 if XInput 2.0 is available]),
+                    X_EXTENSIONS="$X_EXTENSIONS XInput")
+
   else
     AC_DEFINE(XINPUT_NONE, 1,
               [Define to 1 if no XInput should be used])
   fi
 
-  AM_CONDITIONAL(XINPUT_NONE,  test "x$with_xinput" = "xno")
-  AM_CONDITIONAL(XINPUT_XFREE, test "x$with_xinput" != "xno")
+  AM_CONDITIONAL(XINPUT_XFREE, test "x$have_xinput" = "xyes")
   AM_CONDITIONAL(XINPUT_2,     test "x$have_xinput2" = "xyes")
 
-  # Check for the RANDR extension
-  if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
-     AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
+  if test "x$enable_xinput" = "xyes" ; then
+    if test "x$have_xinput" != "xyes" -a "x$have_xinput2" != "xyes" ; then
+      AC_MSG_ERROR([*** XInput extension not found. Check 'config.log' for more details.])
+    fi
+  fi
 
-     X_PACKAGES="$X_PACKAGES xrandr"
+  # Check for the RANDR extension
+  if test x"$enable_xrandr" != xno; then
+    if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
+      AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
+
+      X_PACKAGES="$X_PACKAGES xrandr"
+      X_EXTENSIONS="$X_EXTENSIONS XRANDR"
+    elif test x"$enable_xrandr" = xyes; then
+      AC_MSG_ERROR([RANDR support requested but xrandr not found])
+    fi
   fi
 
   # Checks for Xcursor library
@@ -1595,29 +1150,44 @@ if test "x$gdktarget" = "xx11"; then
 
   # Checks for XFixes extension
 
-  if $PKG_CONFIG --exists xfixes ; then
-    AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
+  if test x"$enable_xfixes" != xno; then
+    if $PKG_CONFIG --exists xfixes ; then
+      AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
 
-    X_PACKAGES="$X_PACKAGES xfixes"
-    GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
+      X_PACKAGES="$X_PACKAGES xfixes"
+      X_EXTENSIONS="$X_EXTENSIONS XFIXES"
+      GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
+    elif test x"$enable_xfixes" = xyes; then
+      AC_MSG_ERROR([XFixes support requested but xfixes not found])
+    fi
   fi
 
   # Checks for Xcomposite extension
 
-  if $PKG_CONFIG --exists xcomposite ; then
-    AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
+  if test x"$enable_xcomposite" != xno; then
+    if $PKG_CONFIG --exists xcomposite ; then
+      AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
 
-    X_PACKAGES="$X_PACKAGES xcomposite"
-    GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
+      X_PACKAGES="$X_PACKAGES xcomposite"
+      X_EXTENSIONS="$X_EXTENSIONS Composite"
+      GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
+    elif test x"$enable_xcomposite" = xyes; then
+      AC_MSG_ERROR([Xcomposite support requested but xcomposite not found])
+    fi
   fi
 
   # Checks for Xdamage extension
 
-  if $PKG_CONFIG --exists xdamage ; then
-    AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
+  if test x"$enable_xdamage" != xno; then
+    if $PKG_CONFIG --exists xdamage ; then
+      AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
 
-    X_PACKAGES="$X_PACKAGES xdamage"
-    GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
+      X_PACKAGES="$X_PACKAGES xdamage"
+      X_EXTENSIONS="$X_EXTENSIONS DAMAGE"
+      GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
+    elif test x"$enable_xdamage" = xyes; then
+      AC_MSG_ERROR([Xdamage support requested but xdamage not found])
+    fi
   fi
 
   if $have_base_x_pc ; then
@@ -1630,6 +1200,10 @@ if test "x$gdktarget" = "xx11"; then
   LIBS="$gtk_save_libs"
 
   AM_CONDITIONAL(USE_X11, true)
+
+  # strip leading space
+  X_EXTENSIONS=${X_EXTENSIONS/# }
+
 else
   XPACKAGES=
 
@@ -1639,48 +1213,8 @@ else
   AM_CONDITIONAL(HAVE_X11R6, false)
 fi
 
-if test "x$gdktarget" = "xwin32"; then
-  GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
-  AM_CONDITIONAL(USE_WIN32, true)
-else
-  AM_CONDITIONAL(USE_WIN32, false)
-fi
-
-if test "x$gdktarget" = "xquartz"; then
-  GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
-  AM_CONDITIONAL(USE_QUARTZ, true)
-else
-  AM_CONDITIONAL(USE_QUARTZ, false)
-fi
-
-GDK_PIXBUF_XLIB_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_XLIB_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
-GDK_PIXBUF_XLIB_DEP_CFLAGS="`$PKG_CONFIG --cflags  gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_PIXBUF_XLIB_EXTRA_CFLAGS"
-
-AC_SUBST(GDK_PIXBUF_XLIB_PACKAGES)
-AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_LIBS)
-AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_CFLAGS)
-AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
-AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
-
-if test "x$gdktarget" = "xdirectfb"; then
-  DIRECTFB_REQUIRED_VERSION=1.0.0
-  AC_MSG_CHECKING(for DirectFB)
-
-  PKG_CHECK_MODULES(DIRECTFB, [directfb >= $DIRECTFB_REQUIRED_VERSION])
-  AM_CONDITIONAL(USE_DIRECTFB, true)
-else
-  AM_CONDITIONAL(USE_DIRECTFB, false)
-fi
-
-
 # Check for Pango flags
 
-if test "x$gdktarget" = "xwin32"; then
-       PANGO_PACKAGES="pangowin32 pangocairo"
-else
-       PANGO_PACKAGES="pango pangocairo"
-fi
-
 AC_MSG_CHECKING(Pango flags)
 if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
         PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
@@ -1710,21 +1244,16 @@ fi
 CFLAGS="$saved_cflags"
 LDFLAGS="$saved_ldflags"
 
-# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c
-if test "x$gdktarget" = "xx11"; then
-  GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES cairo-$cairo_backend"
-else
-  GDK_PACKAGES="$PANGO_PACKAGES $X_PACKAGES cairo-$cairo_backend"
-fi
+GDK_PACKAGES="$PANGO_PACKAGES $GIO_PACKAGE $X_PACKAGES gdk-pixbuf-2.0 $cairo_backends cairo-gobject"
 
-GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
-GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags  gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
+GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES`"
+GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags  gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS"
 #
 # If we aren't writing explicit dependencies, then don't put the extra libraries we need
 # into the pkg-config files
 #
 if test $enable_explicit_deps != yes ; then
-  GDK_PACKAGES="$PANGO_PACKAGES"
+  GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 cairo-gobject"
   GDK_EXTRA_LIBS=
 fi
 
@@ -1764,14 +1293,14 @@ else
         LIBS="$gtk_save_LIBS"
 fi
 
-GTK_PACKAGES="atk cairo gio-2.0"
-if test "x$gdktarget" = "xx11"; then
+GTK_PACKAGES="atk cairo cairo-gobject gdk-pixbuf-2.0 gio-2.0"
+if test "x$enable_x11_backend" == xyes; then
   GTK_PACKAGES="$GTK_PACKAGES pangoft2"
 fi
 GTK_EXTRA_LIBS=
 GTK_EXTRA_CFLAGS=
-GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $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"
+GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $GTK_PACKAGES` $GTK_EXTRA_LIBS"
+GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags  gthread-2.0 $GDK_PACKAGES $GTK_PACKAGES` $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
 
 if test x"$os_win32" = xyes; then
   GTK_EXTRA_CFLAGS="$msnative_struct"
@@ -1782,16 +1311,6 @@ ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
 PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
 CAIRO_PREFIX="`$PKG_CONFIG --variable=prefix cairo`"
 
-if test $enable_explicit_deps != yes ; then
-  GDK_PIXBUF_EXTRA_LIBS=
-fi
-
-AC_SUBST(GDK_PIXBUF_PACKAGES)
-AC_SUBST(GDK_PIXBUF_EXTRA_LIBS)
-AC_SUBST(GDK_PIXBUF_EXTRA_CFLAGS)
-AC_SUBST(GDK_PIXBUF_DEP_LIBS)
-AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
-
 AC_SUBST(GTK_PACKAGES)
 AC_SUBST(GTK_EXTRA_LIBS)
 AC_SUBST(GTK_EXTRA_CFLAGS)
@@ -1806,6 +1325,9 @@ AC_SUBST(CAIRO_PREFIX)
 AC_SUBST(GTK_DEBUG_FLAGS)
 AC_SUBST(GTK_XIM_FLAGS)
 
+GDK_PIXBUF_LIBS=`$PKG_CONFIG --libs gdk-pixbuf-2.0`
+AC_SUBST(GDK_PIXBUF_LIBS)
+
 ########################
 # Checks needed for gail
 ########################
@@ -1841,8 +1363,10 @@ LIBS="$old_LIBS"
 # Printing system checks
 ################################################################
 
+PRINT_BACKENDS="file lpr"
+
 AC_ARG_ENABLE(cups,
-              [AC_HELP_STRING([--disable-cups]
+              [AC_HELP_STRING([--disable-cups],
                               [disable cups print backend])],,
               [enable_cups=auto])
 
@@ -1879,6 +1403,7 @@ else
 
     AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
 
+    PRINT_BACKENDS="$PRINT_BACKENDS cups"
     AM_CONDITIONAL(HAVE_CUPS, true)
 
     gtk_save_cflags="$CFLAGS"
@@ -1902,7 +1427,7 @@ fi
 #
 
 AC_ARG_ENABLE(papi,
-              [AC_HELP_STRING([--disable-papi]
+              [AC_HELP_STRING([--disable-papi],
                               [disable papi print backend])],,
              [enable_papi=auto])
 
@@ -1912,6 +1437,7 @@ else
   AC_MSG_CHECKING(libpapi)
   AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
   if test $have_papi = yes; then
+    PRINT_BACKENDS="$PRINT_BACKENDS papi"
     AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
   fi
   AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
@@ -1937,7 +1463,7 @@ if test "$os_win32" != "yes"; then
 *** postscript backend enabled.]))
 
   AC_CHECK_HEADER(cairo-svg.h,,AC_MSG_ERROR([
-*** Can't find cairo-svg.h. You must build Cairo with the
+*** Cannot find cairo-svg.h. You must build Cairo with the
 *** svg backend enabled.]))
 fi
 
@@ -1948,6 +1474,9 @@ AC_ARG_ENABLE(test-print-backend,
               [AC_HELP_STRING([--enable-test-print-backend],
                               [build test print backend])],,
               [enable_test_print_backend=no])
+if test "x$enable_test_print_backend" != "xno" ; then
+  PRINT_BACKENDS="$PRINT_BACKENDS test"
+fi
 AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
 
 
@@ -1967,17 +1496,39 @@ AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
 export SED
 export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
 if test -n "$export_dynamic"; then
-  GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
-  GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"`
   GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
   GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
+#############
+# GSettings #
+#############
+
+GLIB_GSETTINGS
+
 ##################################################
 # GObject introspection
 ##################################################
 
-GOBJECT_INTROSPECTION_CHECK([0.6.7])
+GOBJECT_INTROSPECTION_CHECK([0.10.1])
+
+##################################################
+# Packagekit module
+#################################################
+
+AC_ARG_ENABLE(packagekit,
+              AC_HELP_STRING([--disable-packagekit],
+                             [build packagekit open-with module]))
+
+build_packagekit=no
+if test "os_win32" != "yes"; then
+        if test "x$enable_packagekit" != "xno"; then
+                build_packagekit=yes
+                AC_DEFINE(ENABLE_PACKAGEKIT, 1, [define to enable packagekit])
+        fi
+fi
+
+AM_CONDITIONAL(ENABLE_PACKAGEKIT, test "x$build_packagekit" = "xyes")
 
 ##################################################
 # Checks for gtk-doc and docbook-tools
@@ -2024,36 +1575,28 @@ AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
  * This is a generated file.  Please modify `configure.ac'
  */
 
-#ifndef GDKCONFIG_H
-#define GDKCONFIG_H
+#ifndef __GDKCONFIG_H__
+#define __GDKCONFIG_H__
+
+#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdk.h> can be included directly."
+#endif
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+#include <glib.h>
 
-#ifndef GSEAL
-/* introduce GSEAL() here for all of Gdk and Gtk+ without the need to modify GLib */
-#  ifdef GSEAL_ENABLE
-#    define GSEAL(ident)      _g_sealed__ ## ident
-#  else
-#    define GSEAL(ident)      ident
-#  endif
-#endif /* !GSEAL */
+G_BEGIN_DECLS
 
 _______EOF
 
        cat >>$outfile <<_______EOF
 $gdk_windowing
-$gdk_wc
 _______EOF
 
        cat >>$outfile <<_______EOF
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
 
-#endif /* GDKCONFIG_H */
+#endif  /* __GDKCONFIG_H__ */
 _______EOF
 
 
@@ -2064,49 +1607,39 @@ _______EOF
          mv $outfile gdk/gdkconfig.h
        fi
 ],[
-if test "x$gdktarget" = "xx11" ; then
-  gdk_windowing='
-#define GDK_WINDOWING_X11'
-elif test "x$gdktarget" = "xwin32" ; then
-  gdk_windowing='
-#define GDK_NATIVE_WINDOW_POINTER
-
-#define GDK_WINDOWING_WIN32'
-elif test "x$gdktarget" = "xquartz" ; then
-  gdk_windowing='
-#define GDK_WINDOWING_QUARTZ'
-elif test "x$gdktarget" = "xdirectfb" ; then
-  gdk_windowing='
-#define GDK_WINDOWING_DIRECTFB'
-fi
-
-if test x$gdk_wchar_h = xyes; then
-  gdk_wc='
-#define GDK_HAVE_WCHAR_H 1'
-fi
-if test x$gdk_wctype_h = xyes; then
-  gdk_wc="\$gdk_wc
-#define GDK_HAVE_WCTYPE_H 1"
-fi
-if test x$gdk_working_wctype = xno; then
-  gdk_wc="\$gdk_wc
-#define GDK_HAVE_BROKEN_WCTYPE 1"
-fi
-
-
+gdk_windowing='$GDK_WINDOWING'
 ])
 
+dnl
+dnl Check for -Bsymbolic-functions linker flag used to avoid
+dnl intra-library PLT jumps, if available.
+dnl
+AC_ARG_ENABLE(Bsymbolic,
+              [AC_HELP_STRING([--disable-Bsymbolic],
+                              [avoid linking with -Bsymbolic])],,
+              [SAVED_LDFLAGS="${LDFLAGS}"
+               AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
+               LDFLAGS=-Wl,-Bsymbolic-functions
+               AC_TRY_LINK([], [int main (void) { return 0; }],
+                           AC_MSG_RESULT(yes)
+                           enable_Bsymbolic=yes,
+                           AC_MSG_RESULT(no)
+                           enable_Bsymbolic=no)
+               LDFLAGS="${SAVED_LDFLAGS}"])
+
+if test "x${enable_Bsymbolic}" = "xyes" ; then
+  GTK_LINK_FLAGS=-Wl,-Bsymbolic-functions
+fi
+AC_SUBST(GTK_LINK_FLAGS)
+
 AC_CONFIG_FILES([
 config.h.win32
 gtk-zip.sh
 Makefile
-gdk-pixbuf-3.0.pc
 gdk-3.0.pc
 gtk+-3.0.pc
 gtk+-unix-print-3.0.pc
 gail-3.0.pc
-gdk-pixbuf-3.0-uninstalled.pc
-gdk-3.0-uninstalled.pc
 gtk+-3.0-uninstalled.pc
 gail-3.0-uninstalled.pc
 m4macros/Makefile
@@ -2115,39 +1648,31 @@ po-properties/Makefile.in
 demos/Makefile
 demos/gtk-demo/Makefile
 demos/gtk-demo/geninclude.pl
+examples/Makefile
 tests/Makefile
 docs/Makefile
 docs/reference/Makefile
-docs/reference/gdk-pixbuf/Makefile
-docs/reference/gdk-pixbuf/version.xml
 docs/reference/gdk/Makefile
 docs/reference/gdk/version.xml
 docs/reference/gtk/Makefile
 docs/reference/gtk/version.xml
 docs/reference/libgail-util/Makefile
-docs/faq/Makefile
+docs/reference/libgail-util/version.xml
 docs/tools/Makefile
-docs/tutorial/Makefile
 build/Makefile
 build/win32/Makefile
 build/win32/vs9/Makefile
-gdk-pixbuf/Makefile
-gdk-pixbuf/gdk_pixbuf.rc
-gdk-pixbuf/gdk-pixbuf-features.h
-gdk-pixbuf/pixops/Makefile
 gdk/Makefile
 gdk/x11/Makefile
 gdk/win32/Makefile
 gdk/win32/rc/Makefile
 gdk/win32/rc/gdk.rc
 gdk/quartz/Makefile
-gdk/directfb/Makefile
 gdk/tests/Makefile
 gtk/Makefile
 gtk/makefile.msc
 gtk/gtkversion.h
 gtk/gtk-win32.rc
-gtk/theme-bits/Makefile
 gtk/tests/Makefile
 modules/Makefile
 modules/other/Makefile
@@ -2167,12 +1692,26 @@ modules/printbackends/file/Makefile
 modules/printbackends/papi/Makefile
 modules/printbackends/test/Makefile
 perf/Makefile
-contrib/Makefile
-contrib/gdk-pixbuf-xlib/Makefile
-contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-3.0.pc
 ])
 
 AC_OUTPUT
 
-echo "configuration:
-        target: $gdktarget"
+# beautify the immodule list a bit
+included_immodules=${included_immodules//,/ }
+included_immodules=${included_immodules:-none}
+
+echo ""
+echo "        GTK+ $GTK_VERSION"
+echo "        ==========="
+echo ""
+echo "        GDK backends:         $GDK_BACKENDS"
+if test "x$enable_x11_backend" = "xyes"; then
+echo "        X11 extensions:       $X_EXTENSIONS"
+fi
+echo "        Print backends:       $PRINT_BACKENDS"
+echo "        Dynamic modules:      $build_dynamic_modules"
+echo "        Included immodules:   $included_immodules"
+echo "        PackageKit support:   $build_packagekit"
+echo "        Introspection:        $found_introspection"
+echo "        Debugging:            $enable_debug"
+echo "        Documentation:        $enable_gtk_doc"