]> Pileus Git - ~andy/gtk/blobdiff - configure.in
Estonian translation update by Ivar Smolin.
[~andy/gtk] / configure.in
index 90017601765312c7c0c9cd7ed24b861bcb087205..1230f38ad06d3140df74b85d537c5332f480f131 100644 (file)
@@ -11,11 +11,11 @@ AC_PREREQ(2.54)
 # set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
 
 m4_define([gtk_major_version], [2])
-m4_define([gtk_minor_version], [9])
-m4_define([gtk_micro_version], [3])
+m4_define([gtk_minor_version], [11])
+m4_define([gtk_micro_version], [7])
 m4_define([gtk_version],
           [gtk_major_version.gtk_minor_version.gtk_micro_version])
-m4_define([gtk_interface_age], [1])
+m4_define([gtk_interface_age], [0])
 m4_define([gtk_binary_age],
           [m4_eval(100 * gtk_minor_version + gtk_micro_version)])
 # This is the X.Y used in -lgtk-FOO-X.Y
@@ -31,10 +31,10 @@ m4_define([gtk_api_version], [2.0])
 m4_define([gtk_binary_version], [2.10.0])
 
 # required versions of other packages
-m4_define([glib_required_version], [2.11.0])
-m4_define([pango_required_version], [1.13.0])
-m4_define([atk_required_version], [1.0.1])
-m4_define([cairo_required_version], [1.1.6])
+m4_define([glib_required_version], [2.13.5])
+m4_define([pango_required_version], [1.17.3])
+m4_define([atk_required_version], [1.9.0])
+m4_define([cairo_required_version], [1.2.0])
 
 
 AC_INIT([gtk+], [gtk_version],
@@ -135,6 +135,24 @@ dnl Initialize libtool
 AC_PROG_CC
 AM_DISABLE_STATIC
 
+dnl 
+dnl Check for a working C++ compiler, but do not bail out, if none is found.
+dnl We use this for an automated test for C++ header correctness.
+dnl 
+AC_CHECK_PROGS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
+AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
+
+gtk_save_cxxflags="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS -x objective-c++"
+AC_TRY_COMPILE([@interface Foo @end],,OBJC=yes,OBJC=no)
+AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" == "yes")
+CXXFLAGS="$gtk_save_cxxflags"
+AC_LANG_RESTORE
+
 if test "$os_win32" = "yes"; then
   if test x$enable_static = xyes -o x$enable_static = x; then
     AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
@@ -199,6 +217,10 @@ 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])],,
@@ -211,26 +233,19 @@ AC_ARG_ENABLE(visibility,
 AC_ARG_WITH(xinput,
             [AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
 
-AC_ARG_WITH(wintab,
-            [AC_HELP_STRING([--with-wintab=DIRECTORY],
-                            [use Wintab API with win32 backend])])
-AC_ARG_WITH(ie55,
-            [AC_HELP_STRING([--with-ie55=DIRECTORY],
-                            [IE5.5 libs and headers (for Active IMM)])])
-
 if test "$platform_win32" = yes; then
   gdktarget=win32
 else
   gdktarget=x11
 fi
 
-AC_ARG_WITH(gdktarget, [  --with-gdktarget=[[x11/linux-fb/win32/quartz/directfb]] select non-default GDK target],
+AC_ARG_WITH(gdktarget, [  --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
        gdktarget=$with_gdktarget)
 
 AC_SUBST(gdktarget)
 case $gdktarget in
-  x11|linux-fb|win32|quartz|directfb) ;;
-  *) AC_MSG_ERROR([Invalid target for GDK: use x11, linux-fb, quartz, directfb or win32.]);;
+  x11|win32|quartz|directfb) ;;
+  *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
 esac
 
 gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
@@ -239,19 +254,9 @@ gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
 AC_SUBST(gdktargetlib)
 AC_SUBST(gtktargetlib)
 
-AC_ARG_ENABLE(shadowfb,
-              [AC_HELP_STRING([--disable-shadowfb],
-                              [disable shadowfb support for linux-fb])],,
-              [enable_shadowfb=yes])
-
-AC_ARG_ENABLE(fbmanager,
-              [AC_HELP_STRING([--enable-fbmanager],
-                              [enable framebuffer manager support (GtkFB)])],,
-              enable_fbmanager=no)
-       
 if test "x$enable_debug" = "xyes"; then
   test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
-  GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
+  GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES" 
 else
   if test "x$enable_debug" = "xno"; then
     GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
@@ -260,6 +265,7 @@ else
   fi
 fi
 
+
 if test "x$enable_visibility" = "xno"; then
   GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
 fi
@@ -370,7 +376,8 @@ AC_ARG_ENABLE(explicit-deps,
 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
 case $enable_explicit_deps in
   auto)
-    deplibs_check_method=`(./libtool --config; echo eval echo \\$deplibs_check_method) | sh`
+    export SED
+    deplibs_check_method=`(./libtool --config; echo 'eval echo $deplibs_check_method') | sh`
     if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
       enable_explicit_deps=yes  
     else
@@ -402,7 +409,8 @@ if test "x$enable_rebuilds" = "xyes" && \
 fi
 AC_SUBST(REBUILD)
 
-AC_CHECK_FUNCS(lstat mkstemp flockfile)
+AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
+AC_CHECK_FUNCS(localtime_r)
 
 # _NL_TIME_FIRST_WEEKDAY is an enum and not a define
 AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
@@ -469,7 +477,7 @@ fi
 # sure that both po/ and po-properties/ have .po files that correspond
 # to your language.  If you only add one to po/, the build will break
 # in po-properties/.
-ALL_LINGUAS="af am ar az az_IR be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy ia id is it ja ka ko ku li lt lv mi mk ml mn mr ms nb ne nl nn nso or pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt uk uz uz@Latn vi wa xh yi zh_CN zh_HK zh_TW"
+ALL_LINGUAS="af am ang ar az az_IR be be@latin bg bn bn_IN br bs ca cs cy da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu hy ia id is it ja ka ko ku li lt lv mi mk ml mn mr ms nb ne nl nn nso or pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt uk ur uz uz@cyrillic vi wa xh yi zh_CN zh_HK zh_TW"
 AM_GLIB_GNU_GETTEXT
 LIBS="$LIBS $INTLLIBS"
 AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
@@ -570,72 +578,18 @@ LIBS=$gtk_save_LIBS
 AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
 AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
 AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
+AC_CHECK_HEADERS(ftw.h, AC_DEFINE(HAVE_FTW_H))
 
-if test "${with_ie55+set}" = set && test $with_ie55 != no; then
-  AC_MSG_CHECKING([for dimm.h])
-  saved_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -idirafter $with_ie55/Include"
-  AC_TRY_COMPILE([/* The w32api imm.h clashes a bit with the IE5.5 dimm.h */
-#ifdef __GNUC__
-#define IMEMENUITEMINFOA hidden_IMEMENUITEMINFOA
-#define IMEMENUITEMINFOW hidden_IMEMENUITEMINFOW
-#endif
-#include <windows.h>
-#include <objbase.h>
-#include <imm.h>
-#ifdef __GNUC__
-#undef IMEMENUITEMINFOA
-#undef IMEMENUITEMINFOW
-#endif
-#include <dimm.h>
-],
-   [],
-   [AC_MSG_RESULT(yes)
-    AC_MSG_CHECKING([for IE55 uuid.lib])
-    if test -f $with_ie55/Lib/uuid.lib ; then
-      AC_MSG_RESULT(yes)
-      have_ie55=yes
-      AC_DEFINE(HAVE_DIMM_H)
-      IE55_UUID_LIB="$with_ie55/Lib/uuid.lib"
-      AC_SUBST(IE55_UUID_LIB)
-    else
-      AC_MSG_RESULT(no)
-      CFLAGS="$saved_CFLAGS"
-      have_ie55=no
-    fi
-    ],
-   [AC_MSG_RESULT(no)
-    CFLAGS="$saved_CFLAGS"
-    have_ie55=no])
-fi
-AM_CONDITIONAL(HAVE_IE55, test x$have_ie55 = xyes)
-
-if test "${with_wintab+set}" = set && test $with_wintab != no; then
-  AC_MSG_CHECKING([for wintab.h])
-  saved_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -I$with_wintab/include"
-  AC_TRY_COMPILE([#include <windows.h>
-#include <wintab.h>], 
-   [],
-   [AC_MSG_RESULT(yes)
-    AC_MSG_CHECKING([for wntab32x.lib])
-    if test -f $with_wintab/lib/i386/wntab32x.lib ; then
-      AC_MSG_RESULT(yes)
-      have_wintab=yes
-      AC_DEFINE(HAVE_WINTAB)
-      WINTAB_LIB="$with_wintab/lib/i386/wntab32x.lib"
-      AC_SUBST(WINTAB_LIB)
-    else
-      AC_MSG_RESULT(no)
-      CFLAGS="$saved_cflags"
-      have_wintab=no
-    fi
-    ],
-   [AC_MSG_RESULT(no)
-    CFLAGS="$saved_cflags"
-    have_wintab=no])
+AC_MSG_CHECKING([for GNU ftw extensions])
+AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
+#define _GNU_SOURCE
+#include <ftw.h>], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no)
+if test $gtk_ok = yes; then
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(HAVE_GNU_FTW,1,[Have GNU ftw])
+else
+    AC_MSG_RESULT([no])
 fi
-AM_CONDITIONAL(HAVE_WINTAB, test x$have_wintab = xyes)
 
 saved_cflags="$CFLAGS"
 saved_ldflags="$LDFLAGS"
@@ -727,6 +681,10 @@ if test $gtk_uxtheme_h = yes; then
 fi
 AC_MSG_RESULT($gtk_uxtheme_h)
 
+# Checks for gdkspawn
+AC_CHECK_HEADERS(crt_externs.h)
+AC_CHECK_FUNCS(_NSGetEnviron)
+
 
 ##################################################
 # Checks for gdk-pixbuf
@@ -802,7 +760,7 @@ AC_ARG_WITH(libtiff,
 
 dnl Test for libtiff
   if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
-    AC_CHECK_LIB(tiff, TIFFReadScanline,
+    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) ***))],
@@ -914,14 +872,13 @@ 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 (only used if module loading disabled)])
+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 (only
-                          used if module loading disabled)])
+                          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
@@ -929,7 +886,7 @@ else
    fi
 fi
 
-all_loaders="png,bmp,wbmp,gif,ico,ani,jpeg,pnm,ras,tiff,xpm,tga,pcx"
+all_loaders="png,bmp,wbmp,gif,ico,ani,jpeg,pnm,ras,tiff,xpm,xbm,tga,pcx"
 included_loaders=""
 # If no loaders specified, include all
 if test "x$with_included_loaders" = xyes ; then
@@ -951,13 +908,29 @@ for loader in $included_loaders; do
    AC_MSG_ERROR([the specified loader $loader does not exist])
  fi
 
- INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libpixbufloader-static-$loader.la"
+ INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libstatic-pixbufloader-$loader.la"
  INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader"
+ eval INCLUDE_$loader=yes
 done
 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])
+
 AC_HEADER_SYS_WAIT
 
 AC_TYPE_SIGNAL
@@ -981,6 +954,32 @@ else
   STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG"
 fi
 
+# Checks to see whether we should include mediaLib
+# support.
+#
+AC_CHECK_HEADER(sys/systeminfo.h, AC_DEFINE(HAVE_SYS_SYSTEMINFO_H))
+AC_CHECK_HEADER(sys/sysinfo.h, AC_DEFINE(HAVE_SYS_SYSINFO_H))
+
+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)
+    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)
+    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.)
@@ -1032,7 +1031,8 @@ 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$GDK_PIXBUF_CSOURCE = xno; 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
@@ -1042,24 +1042,17 @@ if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
      AC_MSG_ERROR([
 *** gtkbuiltincache.h is not in the tree, and cannot be built
 *** because you don't have libpng, or (when cross-compiling) you 
-*** don't have a prebuilt gdk-pixbuf-csource on the host system.])
+*** 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"
-GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB"
+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"
 
-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)
-
-
 ########################################
 # Windowing system checks
 ########################################
@@ -1092,8 +1085,8 @@ if test "x$gdktarget" = "xx11"; then
   if $PKG_CONFIG --exists x11 xext xrender; 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_libs="`$PKG_CONFIG --libs x11 xext xrender`"
+    X_CFLAGS="`$PKG_CONFIG --cflags x11 xext xrender`"
     
     # Strip out any .la files that pkg-config might give us (this happens
     # with -uninstalled.pc files)
@@ -1192,12 +1185,16 @@ if test "x$gdktarget" = "xx11"; then
       AC_DEFINE(HAVE_SHAPE_EXT))
 
   # X SYNC check
+  gtk_save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $x_cflags"
   
   AC_CHECK_FUNC(XSyncQueryExtension,
       [AC_CHECK_HEADER(X11/extensions/sync.h,
          AC_DEFINE(HAVE_XSYNC, 1, Have the SYNC extension library),
          :, [#include <X11/Xlib.h>])])
 
+  CFLAGS="$gtk_save_CFLAGS"
+
   # Xshm checks
 
   if test "x$enable_shm" = "xyes"; then
@@ -1239,12 +1236,12 @@ if test "x$gdktarget" = "xx11"; then
     fi
   fi
 
-  # Check for Xinerama extension (Solaris impl or Xfree impl)
-
-  gtk_save_cppflags="$CPPFLAGS"
-  CPPFLAGS="$CPPFLAGS $x_cflags"
+  if test "x$enable_xinerama" = "xyes"; then
+    # Check for Xinerama extension (Solaris impl or Xfree impl)
+    gtk_save_cppflags="$CPPFLAGS"
+    CPPFLAGS="$CPPFLAGS $x_cflags"
   
-  case "$host" in
+    case "$host" in
       *-*-solaris*)
           # Check for solaris
          AC_MSG_CHECKING(for Xinerama support on Solaris)
@@ -1287,8 +1284,9 @@ if test "x$gdktarget" = "xx11"; then
             AC_MSG_RESULT(no)
          fi
          ;;
-  esac
-
+    esac
+  fi
+  
   # set up things for XInput
 
   if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
@@ -1339,6 +1337,25 @@ if test "x$gdktarget" = "xx11"; 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"
+  fi
+
+  # Checks for Xcomposite extension
+
+  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"
+  fi
+
+  # Checks for Xdamage extension
+
+  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"
   fi
 
   if $have_base_x_pc ; then
@@ -1358,14 +1375,7 @@ else
 fi
 
 if test "x$gdktarget" = "xwin32"; then
-  # We start off with the libraries from Pango
-
-  if test x$have_wintab = xyes; then
-    GDK_WIN32_EXTRA_CFLAGS="-I $with_wintab/include"
-    AC_SUBST(GDK_WIN32_EXTRA_CFLAGS)
-  fi
-
-  GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -user32 -limm32 -lshell32 -lole32 -Wl,-luuid"
+  GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
   AM_CONDITIONAL(USE_WIN32, true)
 else
   AM_CONDITIONAL(USE_WIN32, false)
@@ -1387,36 +1397,19 @@ 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" = "xlinux-fb"; then
-  if test x$enable_shadowfb = xyes ; then
-    AC_DEFINE(ENABLE_SHADOW_FB)
-  fi
-
-  if test x$enable_fbmanager = xyes ; then
-    AC_DEFINE(ENABLE_FB_MANAGER)
-    AM_CONDITIONAL(ENABLE_FB_MANAGER, true)
-  else
-    AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
-  fi
-  
-  AM_CONDITIONAL(USE_LINUX_FB, true)
-else
-  AM_CONDITIONAL(USE_LINUX_FB, false)
-  AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
-fi
-
 if test "x$gdktarget" = "xdirectfb"; then
-  DIRECTFB_REQUIRED_VERSION=0.9.21
+  DIRECTFB_REQUIRED_VERSION=0.9.24
   AC_MSG_CHECKING(for DirectFB)
 
-  if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then
+  if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb && $PKG_CONFIG --exists cairo-directfb ; then
       AC_MSG_RESULT(found)
-      GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags directfb` $GDK_EXTRA_CFLAGS"
-      GDK_EXTRA_LIBS="`$PKG_CONFIG --libs directfb` $GDK_EXTRA_LIBS"
+      GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags cairo-directfb` $GDK_EXTRA_CFLAGS"
+      GDK_EXTRA_LIBS="`$PKG_CONFIG --libs cairo-directfb` $GDK_EXTRA_LIBS"
   else
       AC_MSG_ERROR([
-*** DirectFB $DIRECTFB_REQUIRED_VERSION or newer is required. The latest
-*** version of DirectFB is always available from http://www.directfb.org/.
+*** DirectFB $DIRECTFB_REQUIRED_VERSION or newer and the cairo backend 
+*** are required. The latest version of DirectFB is always available 
+*** from http://www.directfb.org/.
   ])
   fi
 
@@ -1525,12 +1518,31 @@ if test x"$os_win32" = xyes; then
   GTK_EXTRA_CFLAGS="$msnative_struct"
 fi
 
+GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
+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)
 AC_SUBST(GTK_DEP_LIBS)
 AC_SUBST(GTK_DEP_CFLAGS)
 
+AC_SUBST(GLIB_PREFIX)
+AC_SUBST(ATK_PREFIX)
+AC_SUBST(PANGO_PREFIX)
+AC_SUBST(CAIRO_PREFIX)
 
 AC_SUBST(GTK_DEBUG_FLAGS)
 AC_SUBST(GTK_XIM_FLAGS)
@@ -1544,11 +1556,31 @@ if test "x$CUPS_CONFIG" != "xno"; then
   CUPS_CFLAGS=`cups-config --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
   CUPS_LIBS=`cups-config --libs`
 
+  CUPS_API_VERSION=`cups-config --api-version`
+  CUPS_API_MAJOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $1}'`
+  CUPS_API_MINOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $2}'`
+
+  if test $CUPS_API_MAJOR -gt 1 -o \
+          $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
+    AC_DEFINE(HAVE_CUPS_API_1_2)
+  fi
+
+  AC_SUBST(CUPS_API_MAJOR)
+  AC_SUBST(CUPS_API_MINOR)
   AC_SUBST(CUPS_CFLAGS)
   AC_SUBST(CUPS_LIBS)
 fi
 AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
 
+gtk_save_cflags="$CFLAGS"
+CFLAGS="$CUPS_CFLAGS"
+AC_TRY_COMPILE([#include <cups/http.h>],
+               [http_t http; char *s = http.authstring;],
+               [AC_DEFINE(HAVE_HTTP_AUTHSTRING,[],[Define if cups http_t authstring field is accessible])],)
+CFLAGS="$gtk_save_cflags"
+
+AC_SUBST(HAVE_HTTP_AUTHSTRING)
+
 gtk_save_cppflags="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
                          
@@ -1565,6 +1597,13 @@ fi
 CPPFLAGS="$gtk_save_cppflags"
      
                                
+AC_ARG_ENABLE(test-print-backend,
+              [AC_HELP_STRING([--enable-test-print-backend],
+                              [build test print backend])],,
+              [enable_test_print_backend=no])
+AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
+
+
 ################################################################
 # Strip -export-dynamic from the link lines of various libraries
 ################################################################
@@ -1578,6 +1617,7 @@ CPPFLAGS="$gtk_save_cppflags"
 #
 # We are using gmodule-no-export now, but I'm leaving the stripping
 # code in place for now, since pango and atk still require gmodule.
+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//"`
@@ -1591,7 +1631,7 @@ fi
 # Checks for gtk-doc and docbook-tools
 ##################################################
 
-GTK_DOC_CHECK([1.4])
+GTK_DOC_CHECK([1.6])
 
 AC_CHECK_PROG(DB2HTML, db2html, true, false)
 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
@@ -1669,10 +1709,6 @@ if test "x$gdktarget" = "xx11" ; then
 elif test "x$gdktarget" = "xwin32" ; then
   gdk_windowing='
 #define GDK_WINDOWING_WIN32'
-elif test "x$gdktarget" = "xlinux-fb" ; then
-  gdk_windowing='
-#define GDK_WINDOWING_FB
-#define GDK_NATIVE_WINDOW_POINTER'
 elif test "x$gdktarget" = "xquartz" ; then
   gdk_windowing='
 #define GDK_WINDOWING_QUARTZ'
@@ -1735,7 +1771,6 @@ gdk/x11/Makefile
 gdk/win32/Makefile
 gdk/win32/rc/Makefile
 gdk/win32/rc/gdk.rc
-gdk/linux-fb/Makefile
 gdk/quartz/Makefile
 gdk/directfb/Makefile
 gtk/Makefile
@@ -1754,7 +1789,8 @@ modules/engines/ms-windows/Theme/gtk-2.0/Makefile
 modules/printbackends/Makefile
 modules/printbackends/cups/Makefile
 modules/printbackends/lpr/Makefile
-modules/printbackends/pdf/Makefile
+modules/printbackends/file/Makefile
+modules/printbackends/test/Makefile
 perf/Makefile
 contrib/Makefile
 contrib/gdk-pixbuf-xlib/Makefile
@@ -1765,9 +1801,3 @@ AC_OUTPUT
 
 echo "configuration:
         target: $gdktarget"
-
-if test "x$gdktarget" = "xlinux-fb"; then
-  echo "Warning: The linux-fb GDK target is unmaintained"
-  echo "         and may not work or even compile"
-fi
-