]> Pileus Git - ~andy/gtk/blobdiff - configure.in
Hard-code GTK_BINARY_VERSION=2.2.0 for now; should stay the same until we
[~andy/gtk] / configure.in
index d81fbfce2dd9ebb74b94fbb377f7eba832668843..98abc61031af05f11ccce321d8eaedf2ac35d5b0 100644 (file)
@@ -1,3 +1,6 @@
+# require autoconf 2.52
+AC_PREREQ(2.52)
+
 # Process this file with autoconf to produce a configure script.
 AC_INIT(gdk/gdktypes.h)
 
@@ -28,10 +31,10 @@ GLIB_AC_DIVERT_BEFORE_HELP([
 # set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
 #
 GTK_MAJOR_VERSION=2
-GTK_MINOR_VERSION=0
-GTK_MICRO_VERSION=2
-GTK_INTERFACE_AGE=2
-GTK_BINARY_AGE=2
+GTK_MINOR_VERSION=1
+GTK_MICRO_VERSION=4
+GTK_INTERFACE_AGE=1
+GTK_BINARY_AGE=104
 GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
 dnl This is the X.Y used in -lgtk-FOO-X.Y
 GTK_API_VERSION=2.0
@@ -46,8 +49,14 @@ AC_SUBST(GTK_API_VERSION)
 AC_SUBST(GTK_VERSION)
 
 # libtool versioning
-LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
-LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
+#LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
+#LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
+#LT_REVISION=$GTK_INTERFACE_AGE
+#LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
+#LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
+
+LT_RELEASE=$GTK_MAJOR_VERSION.0
+LT_CURRENT=`expr 100 '*' $GTK_MINOR_VERSION + $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
 LT_REVISION=$GTK_INTERFACE_AGE
 LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
 LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
@@ -58,9 +67,11 @@ AC_SUBST(LT_AGE)
 AC_SUBST(LT_CURRENT_MINUS_AGE)
 
 # Define a string for the earliest version that this release has
-# binary compatibility with. This is used for module locations.
+# forward/backwards binary compatibility with. This is used for module
+# locations. (Should this be backwards-compat instead?)
 #
-GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
+#GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
+GTK_BINARY_VERSION=2.2.0
 AC_SUBST(GTK_BINARY_VERSION)
 
 #
@@ -77,7 +88,7 @@ AC_SUBST(GDK_PIXBUF_MICRO)
 AC_SUBST(GDK_PIXBUF_VERSION)
 
 ## Versions of dependencies
-GLIB_REQUIRED_VERSION=2.0.1
+GLIB_REQUIRED_VERSION=2.1.4
 PANGO_REQUIRED_VERSION=1.0.1
 ATK_REQUIRED_VERSION=1.0.1
 
@@ -169,13 +180,11 @@ AC_ARG_ENABLE(ansi, [  --enable-ansi           turn on strict ansi [default=no]]
                    , enable_ansi=no)
 AC_ARG_ENABLE(xim, [  --enable-xim            support XIM [default=yes]],
                        , enable_xim="yes")
-AC_ARG_ENABLE(xim_inst, [  --disable-xim-inst      does not use xim instantiate callback],
-                       , enable_xim_inst="maybe")
 AC_ARG_ENABLE(xkb, [  --enable-xkb            support XKB [default=maybe]],
                        , enable_xkb="maybe")
 AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
 
-AC_ARG_WITH(xinput, [  --with-xinput=[no/gxi/xfree] support XInput ])
+AC_ARG_WITH(xinput, [  --with-xinput=[no/yes]  support XInput ])
 
 AC_ARG_WITH(wintab, [  --with-wintab=DIRECTORY use Wintab API with win32 backend])
 AC_ARG_WITH(ie55, [  --with-ie55=DIRECTORY IE5.5 libs and headers (for Active IMM)])
@@ -248,15 +257,43 @@ if test "x$GCC" = "xyes"; then
     *) CFLAGS="$CFLAGS -pedantic" ;;
     esac
   fi
+fi
+changequote([,])dnl
 
-  if test "$os_win32" = "yes"; then
-    case "$CC $CFLAGS " in
-    *[[\ \     ]]-fnative-struct[[\ \  ]]*) ;;
-    *) CFLAGS="$CFLAGS -fnative-struct" ;;
+# Ensure MSVC-compatible struct packing convention is used when
+# compiling for Win32 with gcc.
+# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
+# gcc2 uses "-fnative-struct".
+if test x"$os_win32" = xyes; then
+  if test x"$GCC" = xyes; then
+    msnative_struct=''
+    AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
+    if test -z "$ac_cv_prog_CC"; then
+      our_gcc="$CC"
+    else
+      our_gcc="$ac_cv_prog_CC"
+    fi
+    case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
+      2.)
+       if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
+         msnative_struct='-fnative-struct'
+       fi
+       ;;
+      *)
+       if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
+         msnative_struct='-mms-bitfields'
+       fi
+       ;;
     esac
+    if test x"$msnative_struct" = x ; then
+      AC_MSG_RESULT([no way])
+      AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
+    else
+      CFLAGS="$CFLAGS $msnative_struct"
+      AC_MSG_RESULT([${msnative_struct}])
+    fi
   fi
 fi
-changequote([,])dnl
 
 # Honor aclocal flags
 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
@@ -310,7 +347,7 @@ AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
 # define a MAINT-like variable REBUILD which is set if Perl
 # and awk are found, so autogenerated sources can be rebuilt
 
-AC_CHECK_PROGS(PERL, perl5 perl)
+AC_PATH_PROGS(PERL, perl5 perl)
 
 # We would like indent, but don't require it.
 AC_CHECK_PROG(INDENT, indent, indent)
@@ -323,7 +360,7 @@ if test "x$enable_rebuilds" = "xyes" && \
 fi
 AC_SUBST(REBUILD)
 
-AC_CHECK_FUNCS(lstat mkstemp)
+AC_CHECK_FUNCS(lstat mkstemp flockfile)
 
 # sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
 AC_MSG_CHECKING(for sigsetjmp)
@@ -352,14 +389,11 @@ AC_SUBST(STRIP_BEGIN)
 AC_SUBST(STRIP_END)
 
 # i18n stuff
-ALL_LINGUAS="az ca cs cy da de el en_GB en@IPA es et eu fa fi fr ga gl he hr hu ia it ja ko lt ms nl nn no pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_TW zh_CN"
+ALL_LINGUAS="az be bg ca cs cy da de el en_GB en@IPA es et eu fa fi fr ga gl he hi hr hu ia it ja ko lt lv ms nl nn no pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_TW zh_CN"
 AM_GLIB_GNU_GETTEXT
 LIBS="$LIBS $INTLLIBS"
 
-# AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
-# this is the directory where the *.{mo,gmo} files are installed
-gtklocaledir='${prefix}/${DATADIRNAME}/locale'
-AC_SUBST(gtklocaledir)
+AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
 
 dnl The DU4 header files don't provide library prototypes unless 
 dnl -std1 is given to the native cc.
@@ -431,7 +465,6 @@ 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(winsock.h, AC_DEFINE(HAVE_WINSOCK_H))
 
 if test "${with_ie55+set}" = set && test $with_ie55 != no; then
   AC_MSG_CHECKING([for dimm.h])
@@ -579,11 +612,24 @@ AC_MSG_RESULT($gdk_working_wctype)
 AC_SUBST(GDK_WLIBS)
 
 
-
 ##################################################
 # 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_ARG_ENABLE(modules, [  --disable-modules       disable dynamic module loading],[
@@ -736,6 +782,12 @@ dnl Test for libpng
 *** from CVS.])
   fi
 
+  REBUILD_PNGS=\#
+  if test -z "$LIBPNG"; then
+     REBUILD_PNGS=
+  fi
+  AC_SUBST(REBUILD_PNGS)
+
 AC_SUBST(LIBTIFF)
 AC_SUBST(LIBJPEG)
 AC_SUBST(LIBPNG)
@@ -758,7 +810,7 @@ else
    fi
 fi
 
-all_loaders="png,bmp,wbmp,gif,ico,jpeg,pnm,ras,tiff,xpm,tga"
+all_loaders="png,bmp,wbmp,gif,ico,ani,jpeg,pnm,ras,tiff,xpm,tga"
 included_loaders=""
 # If no loaders specified, include all
 if test "x$with_included_loaders" = xyes ; then
@@ -774,7 +826,7 @@ INCLUDED_LOADER_DEFINE=
 
 IFS="${IFS=    }"; gtk_save_ifs="$IFS"; IFS=","
 for loader in $included_loaders; do
- if echo "$all_loaders" | grep "\(^\|\,\)$loader\(\$\|\,\)" > /dev/null; then
+ if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
    :
  else
    AC_MSG_ERROR([the specified loader $loader does not exist])
@@ -797,13 +849,13 @@ AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
 
 if $dynworks ; then
   STATIC_LIB_DEPS=
-  if echo "$included_loaders" | grep "\(^\|\,\)tiff\(\$\|\,\)" > /dev/null; then
+  if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
     STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
   fi
-  if echo "$included_loaders" | grep "\(^\|\,\)jpeg\(\$\|\,\)" > /dev/null; then
+  if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
     STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
   fi
-  if echo "$included_loaders" | grep "\(^\|\,\)png\(\$\|\,\)" > /dev/null; then
+  if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
     STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
   fi
 else
@@ -850,6 +902,16 @@ fi
 
 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
 
+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$GDK_PIXBUF_CSOURCE = xno; then
+    AC_MSG_ERROR(Could not find a gdk-pixbuf-csource in your PATH)
+  fi
+fi
 
 GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0"
 GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB"
@@ -918,7 +980,7 @@ if test "x$gdktarget" = "xx11"; then
     
   ## be sure we also have Pango built with xft support
   if $PKG_CONFIG --exists pangoxft ; then
-    PANGO_PACKAGES="pangox pangoxft"
+    PANGO_PACKAGES="pangoxft pangox"
     have_xft=true
     AC_DEFINE(HAVE_XFT)
     if $have_freetype ; then
@@ -933,6 +995,10 @@ if test "x$gdktarget" = "xx11"; then
 
   AM_CONDITIONAL(HAVE_XFT, $have_xft)
 
+  if $PKG_CONFIG --exists xft ; then
+    AC_DEFINE(HAVE_XFT2, 1, [Define if we have Xft, version 2])
+  fi
+
   #
   # If Pango included the shared library dependencies from X11 in
   # the pkg-config output, then we use that (to avoid duplicates).
@@ -940,7 +1006,7 @@ if test "x$gdktarget" = "xx11"; then
   # then we need to repeat the checks.
   #
   x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
-  case x_libs in
+  case "$x_libs" in
     *-lX11*) pango_omitted_x_deps=no ;;
     *)       pango_omitted_x_deps=yes ;;
   esac
@@ -960,24 +1026,32 @@ if test "x$gdktarget" = "xx11"; then
     #
     # Checks for Xft/XRender
     #
-    XFT_LIBS=""
-    XFT_CFLAGS=""
     if test $have_xft = true ; then
-      gtk_save_cppflags="$CPPFLAGS"
-      CPPFLAGS="$CPPFLAGS $x_cflags"
       have_xft=false
 
-      AC_CHECK_LIB(Xrender, XRenderFindFormat, 
-        [AC_CHECK_LIB(Xft, XftFontOpen,
-          [AC_CHECK_HEADER(X11/Xft/XftFreetype.h,
-            have_xft=true,:)],
-         :,-lXrender -lXext $x_libs $FREETYPE_LIBS)]
-      ,:,-lXext $x_libs)
+      if pkg-config --exists pangoxft '>=' 1.1.0 ; then
+        x_libs="`pkg-config --libs xft` -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
+        have_xft=true
+      else
+        gtk_save_cppflags="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $x_cflags"
+      
+        AC_CHECK_LIB(Xrender, XRenderFindFormat, 
+         [AC_CHECK_LIB(Xft, XftFontOpen,
+           [AC_CHECK_HEADER(X11/Xft/XftFreetype.h,
+             have_xft=true,:)],
+           :,-lXrender -lXext $x_libs $FREETYPE_LIBS)]
+         ,:,-lXext $x_libs)
+         
+        if $have_xft ; then
+         x_libs="$X_LIBS -lXft -lXrender -lXext -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
+        fi
 
-      CPPFLAGS="$gtk_save_cppflags"
+        CPPFLAGS="$gtk_save_cppflags"
+      fi
 
       if $have_xft ; then
-        x_libs="$X_LIBS -lXft -lXrender -lXext -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
+        :
       else
         AC_MSG_ERROR([pangoxft Pango backend found, but Xft not found])
       fi
@@ -1017,7 +1091,50 @@ if test "x$gdktarget" = "xx11"; then
 
   GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
   # Don't ever pull in the pangoxft libraries for gdk-pixbuf-x11
-  GDK_PIXBUF_XLIB_EXTRA_LIBS="$x_extra_libs `$PKG_CONFIG --libs pangox`"
+  GDK_PIXBUF_XLIB_EXTRA_LIBS="$x_extra_libs $x_libs"
+
+  # Check for Xinerama extension (Solaris impl or Xfree impl)
+
+  gtk_save_cppflags="$CPPFLAGS"
+  CPPFLAGS="$CPPFLAGS $x_cflags"
+
+  case "$host" in
+      *-*-solaris*)
+          # Check for solaris
+         use_solaris_xinerama=yes
+         AC_CHECK_LIB(Xext, XineramaGetInfo,
+                       use_solaris_xinerama=yes, use_solaris_xinerama=no)
+         if test "x$use_solaris_xinerama" = "xyes"; then
+             AC_CHECK_HEADER(X11/extensions/xinerama.h,
+               if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then
+                   x_extra_libs="-lXext $x_extra_libs"
+               fi
+               AC_DEFINE(HAVE_SOLARIS_XINERAMA)
+               AC_DEFINE(HAVE_XINERAMA), use_solaris_xinerama=no, -lXext $x_libs_for_checks)
+         fi    
+         AC_MSG_CHECKING(for Xinerama support on Solaris)
+         AC_MSG_RESULT($use_solaris_xinerama);
+         ;;
+      *)
+         # Check for XFree
+         use_xfree_xinerama=yes
+         AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
+             [AC_CHECK_HEADER(X11/extensions/Xinerama.h, 
+                 x_extra_libs="-lXinerama $x_extra_libs"   
+                 if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then
+                     x_extra_libs="-lXext $x_extra_libs"
+                 fi
+                 AC_DEFINE(HAVE_XFREE_XINERAMA)
+                 AC_DEFINE(HAVE_XINERAMA), 
+                 use_xfree_xinerama=no,
+                  [#include <X11/Xlib.h>])],
+             use_xfree_xinerama=no, -lXext $x_libs_for_checks)
+         AC_MSG_CHECKING(for Xinerama support on XFree86)
+         AC_MSG_RESULT($use_xfree_xinerama);       
+          ;;
+  esac
+
+  CPPFLAGS="$gtk_save_cppflags"
 
   # Check for shaped window extension
 
@@ -1038,31 +1155,8 @@ if test "x$gdktarget" = "xx11"; then
 
   # Check for XIM support.
 
-  AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
-           : ,
-           enable_xim_inst="no",
-           $x_libs_for_checks)
-
-  # On Solaris, calling XRegisterIMInstantiateCallback seems to
-  # cause an immediate segfault, so we disable it, unless
-  # the user specifically forces it to be on.
-
-  if test x$enable_xim_inst = xmaybe ; then
-    case host in
-         *-*-solaris*)
-            enable_xim_inst="no"
-            ;;
-         *)
-           enable_xim_inst="yes"
-           ;;
-    esac
-  fi
-
   if test "x$enable_xim" = "xyes"; then
     GTK_XIM_FLAGS="-DUSE_XIM"
-    if test "x$enable_xim_inst" = "xyes"; then
-      AC_DEFINE(USE_X11R6_XIM)
-    fi
   fi
 
   # Check for XKB support.
@@ -1084,20 +1178,30 @@ if test "x$gdktarget" = "xx11"; then
 
   # set up things for XInput
 
-  if test "x$with_xinput" = "xgxi" || test "x$with_xinput" = "xyes"; then
-    AC_DEFINE(XINPUT_GXI)
-    xinput_progs=gxid
-    x_extra_libs="-lXi $x_extra_libs"
-  elif test "x$with_xinput" = "xxfree"; then
+  if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
     AC_DEFINE(XINPUT_XFREE)
     x_extra_libs="-lXi $x_extra_libs"
   else
     AC_DEFINE(XINPUT_NONE)
   fi
 
-  AM_CONDITIONAL(XINPUT_GXI, test x$with_xinput = xgxi)
   AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
 
+  # Check for the RANDR extension
+
+  AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
+      [AC_CHECK_HEADER(X11/extensions/Xrandr.h,
+          # RANDR requires RENDER
+         if test -z "`echo $x_extra_libs $x_libs | grep "\-lXrender" 2> /dev/null`"; then
+             x_extra_libs="-lXrender $x_extra_libs"
+         fi
+         x_extra_libs="-lXrandr $x_extra_libs"
+         AC_DEFINE(HAVE_RANDR, 1, Have the Xrandr extension library),
+         :, [#include <X11/Xlib.h>])], : ,
+       $X_LIBS -lXrandr -lXrender -lX11 $X_EXTRA_LIBS)
+
+  # Xshm checks
+
   if test "x$enable_shm" = "xyes"; then
     # Check for shared memory
     AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
@@ -1137,6 +1241,8 @@ if test "x$gdktarget" = "xx11"; then
 
   AM_CONDITIONAL(USE_X11, true)
 else
+  AM_CONDITIONAL(HAVE_XFT, false)
+  AM_CONDITIONAL(XINPUT_XFREE, false)
   AM_CONDITIONAL(USE_X11, false)
 fi
 
@@ -1177,7 +1283,7 @@ if test "x$gdktarget" = "xlinux-fb"; then
   fi
 
   ft2_libs="`$PKG_CONFIG --libs pangoft2`"
-  case ft2_libs in
+  case "$ft2_libs" in
     *-lfreetype*) pango_omitted_ft2_deps=no ;;
     *)            pango_omitted_ft2_deps=yes ;;
   esac
@@ -1212,7 +1318,7 @@ fi
 
 if test "x$gdktarget" = "xx11"; then
        if $have_xft = true ; then
-            PANGO_PACKAGES="pangox pangoxft"
+            PANGO_PACKAGES="pangoxft pangox"
         else
             PANGO_PACKAGES=pangox
         fi
@@ -1331,19 +1437,27 @@ AC_SUBST(HTML_DIR)
 
 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
 
-gtk_doc_min_version=0.9
-if $GTKDOC ; then 
+gtk_doc_min_version=0.10
+if $GTKDOC ; then
     gtk_doc_version=`gtkdoc-mkdb --version`
     AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
-    if perl <<EOF ; then
-      exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
-            ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
-EOF
+
+    IFS="${IFS=        }"; gtk_save_IFS="$IFS"; IFS="."
+    set $gtk_doc_version
+    for min in $gtk_doc_min_version ; do
+        cur=$1; shift
+        if test -z $min ; then break; fi
+        if test -z $cur ; then GTKDOC=false; break; fi
+        if test $cur -gt $min ; then break ; fi
+        if test $cur -lt $min ; then GTKDOC=false; break ; fi
+    done
+    IFS="$gtk_save_IFS"
+
+    if $GTKDOC ; then
       AC_MSG_RESULT(yes)
-   else
+    else
       AC_MSG_RESULT(no)
-      GTKDOC=false
-   fi
+    fi
 fi
 
 AC_CHECK_PROG(DB2HTML, db2html, true, false)
@@ -1474,12 +1588,16 @@ build/win32/Makefile
 build/win32/dirent/Makefile
 demos/Makefile
 demos/gtk-demo/Makefile
+demos/gtk-demo/geninclude.pl
 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/faq/Makefile
 docs/tutorial/Makefile
 gdk-pixbuf/Makefile