[gnome-commander] Add patch to compile with poppler 0.20.0, fixes bgo#676303



commit 29ce47e2334c881ee6cf8b040f81a8e655726db6
Author: Marek Kašík <mkasik redhat com>
Date:   Sat Dec 21 21:47:41 2013 +0100

    Add patch to compile with poppler 0.20.0, fixes bgo#676303
    
    Signed-off-by: Uwe Scholz <uwescholz src gnome org>

 README                             |  153 +++++++++++++-
 configure.in                       |    3 +
 gnome-doc-utils.make               |  438 ++++++++++++++++++------------------
 m4/gnome-doc-utils.m4              |   50 +++--
 m4/intltool.m4                     |  224 ++++++++++---------
 omf.make                           |   16 +-
 src/tags/gnome-cmd-tags-poppler.cc |    9 +-
 7 files changed, 547 insertions(+), 346 deletions(-)
---
diff --git a/README b/README
index afd0a8a..b696509 100644
--- a/README
+++ b/README
@@ -1 +1,152 @@
-Generated from README.in
\ No newline at end of file
+                GNOME Commander Version 1.4
+
+                Copyright (C) 2001-2006 Marcus Bjurman <marbj499 student liu se>
+                Copyright (C) 2007-2012 Piotr Eljasiak <epiotr use pl>
+                http://www.freesoftware.fsf.org/gcmd/
+
+
+Topics:
+---------------------
+1. Introduction
+2. Contributing
+3. Building
+4. Communication
+5. Problem reporting
+
+
+
+1. Introduction
+--------------------------------
+
+GNOME Commander is a fast and powerful twin-panel file manager for the GNOME desktop.
+
+Read the sections "FAQ" and "Known problems" to see if there are some known
+problems with the version you are using. The TODO file might also contain
+some clues when running into problems.
+
+The ChangeLog contains a detailed description on what has changed. For most
+users the NEWS file might be a better place to look since it contains
+change summaries between the different versions.
+
+GNOME Commander is released under the GNU General Public License (GPL) version 2,
+see the file 'COPYING' for more information.
+
+The official web site is:
+
+    http://www.nongnu.org/gcmd/
+
+You can download the latest GNOME Commander tarball from the gnome ftp server:
+
+    http://ftp.gnome.org/pub/GNOME/sources/gnome-commander/
+
+
+
+2. Contributing
+--------------------------------
+
+Ideas:
+  If have some good ideas for stuff that you want to see in this program you
+  should check the TODO file first before sending email. After that you're
+  welcome to start a discussion on the mailing lists.
+
+Translations:
+  * Since now this program is in the GNOME git repository, translations should be
+    commited directly to the tree there.
+
+Cool hacks:
+  * Send an email with the patch to the developers mailing list.
+  * Please use the -u flag when generating the patch as it makes the patch
+    more readable.
+  * Write a good explanation of what the patch does.
+
+Plugins:
+  * If you have created a new plugin let us know about it on the mailing list.
+
+
+
+3. Building
+--------------------------------
+
+GNOME Commander requires glib >= 2.6.0, GTK+ >= 2.8.0, gnome >= 2.4.0, 
+gnome-keyring >= 2.22 and unique >= 0.9.3 libraries.
+
+Additionally GNOME Commander may require:
+
+  * gnome-vfs >= 2.0.0
+    Used for most of the file handling. If gnome-vfs is built to use fam
+    gnome-commander makes use of that functionality by being able to update
+    its visible directories even when files are create/deleted or changed by
+    other programs.
+
+  * python >= 2.5
+    Optional - for python plugins support.
+
+  * exiv2 >= 0.14
+    Optional - for Exif and IPTC support.
+
+  * taglib >= 1.4
+    Optional - for ID3, Vorbis, FLAC and APE support.
+
+  * libgsf >= 1.12.0
+    Optional - for OLE and ODF support.
+
+  * poppler >= 0.6
+    Optional - for PDF support.
+
+
+Simple install procedure:
+
+  % gzip -cd gnome-commander-1.4.tar.gz | tar xvf -    # unpack the sources
+  % cd gnome-commander-1.4             # change to the toplevel directory
+  % ./configure                                                        # run the `configure' script
+  % make                                                               # build GNOME Commander
+  [ Become root if necessary ]
+  % make install                                               # install GNOME Commander
+
+See the file 'INSTALL' for more detailed information.
+
+
+4. Communication
+--------------------------------
+
+This project has two mailing lists, one for users and one for developers.
+Subscription to those mailing lists can be done at:
+
+users: http://mail.freesoftware.fsf.org/mailman/listinfo/gcmd-users
+devel: http://mail.freesoftware.fsf.org/mailman/listinfo/gcmd-devel
+
+You can also find email addresses of the people who have created gnome-commander
+in the AUTHORS file.
+
+
+5. Problem reporting
+--------------------------------
+
+Bugs should be reported to the GNOME bug tracking system
+(http://bugzilla.gnome.org, product gnome-commander). You will need to create an
+account for yourself.
+
+You can also report bugs using the GNOME program bug-buddy.
+
+In the bug report please include:
+
+* Information about your system. For instance:
+
+   - What operating system and version
+   - What version of X
+   - What version of the gtk+, glib and gnome libraries
+   - For Linux, what version of the C library
+
+  And anything else you think is relevant.
+
+* How to reproduce the bug.
+
+* If the bug was a crash, the exact text that was printed out when the
+  crash occurred.
+
+* Further information such as stack traces may be useful, but is not
+  necessary. If you do send a stack trace, and the error is an X error,
+  it will be more useful if the stack trace is produced running the test
+  program with the --sync command line option.
+
+See the file 'BUGS' for the list of known bugs.
diff --git a/configure.in b/configure.in
index fbb645c..35a3360 100644
--- a/configure.in
+++ b/configure.in
@@ -259,6 +259,9 @@ if test x$with_poppler != xno; then
     if pkg-config --max-version=0.11.2 poppler; then
         AC_DEFINE(POPPLER_HAS_GET_PDF_VERSION, 1, [Define to 1 if poppler has support for 
PDFDoc::getPDFVersion()])
     fi
+    if pkg-config --atleast-version=0.19.0 poppler; then
+        AC_DEFINE(POPPLER_HAS_SET_ERROR_CALLBACK, 1, [Define to 1 if poppler has support for 
setErrorCallback()])
+    fi
 fi
 if test "x$have_pdf" = "xyes"; then
    AC_DEFINE(HAVE_PDF, 1, [Define to 1 if you have PDF support])
diff --git a/gnome-doc-utils.make b/gnome-doc-utils.make
index 29151ed..726c5b8 100644
--- a/gnome-doc-utils.make
+++ b/gnome-doc-utils.make
@@ -59,13 +59,19 @@ $(DOC_H_FILE): $(DOC_H_DOCS);
        done;
        cp $  tmp $@ && rm -f $  tmp
 
+dist-check-gdu:
+if !HAVE_GNOME_DOC_UTILS
+       @echo "*** GNOME Doc Utils must be installed in order to make dist"
+       @false
+endif
+
 .PHONY: dist-doc-header
 dist-doc-header: $(DOC_H_FILE)
        @if test -f "$(DOC_H_FILE)"; then d=; else d="$(srcdir)/"; fi; \
        echo "$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \
        $(INSTALL_DATA) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)";
 
-doc-dist-hook: $(if $(DOC_H_FILE),dist-doc-header)
+doc-dist-hook: dist-check-gdu $(if $(DOC_H_FILE),dist-doc-header)
 
 .PHONY: clean-doc-header
 _clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header)
@@ -86,6 +92,14 @@ all: $(DOC_H_FILE)
 ## The name of the document being built
 DOC_MODULE ?=
 
+## @ DOC_ID
+## The unique identifier for a Mallard document
+DOC_ID ?=
+
+## @ DOC_PAGES
+## Page files in a Mallard document
+DOC_PAGES ?=
+
 ## @ DOC_ENTITIES
 ## Files included with a SYSTEM entity
 DOC_ENTITIES ?=
@@ -110,88 +124,46 @@ _DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),         \
        $(filter $(LINGUAS),$(DOC_LINGUAS)),                                    \
        $(DOC_LINGUAS))
 
-## @ RNGDOC_DIRS
-## The directories containing RNG files to be documented with rngdoc
-RNGDOC_DIRS ?=
-
-## @ XSLDOC_DIRS
-## The directories containing XSLT files to be documented with xsldoc
-XSLDOC_DIRS ?=
+_DOC_ABS_SRCDIR = @abs_srcdir@
 
 
 ################################################################################
 ## Variables for Bootstrapping
 
 _xml2po ?= `which xml2po`
+_xml2po_mode = $(if $(DOC_ID),mallard,docbook)
 
 _db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
 _db2omf  ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
-_rngdoc  ?= `$(PKG_CONFIG) --variable rngdoc gnome-doc-utils`
-_xsldoc  ?= `$(PKG_CONFIG) --variable xsldoc gnome-doc-utils`
 _chunks  ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
 _credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
-_ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl
+_ids ?= $(shell $(PKG_CONFIG) --variable xmldir gnome-doc-utils)/gnome/xslt/docbook/utils/ids.xsl
 
+if ENABLE_SK
+_ENABLE_SK = true
+_skpkgdatadir ?= `scrollkeeper-config --pkgdatadir`
 _sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir`
+_skcontentslist ?= $(_skpkgdatadir)/Templates/C/scrollkeeper_cl.xml
+endif
 
 
 ################################################################################
-## @@ Rules for rngdoc
-
-rngdoc_args =                                                                  \
-       --stringparam rngdoc.id                                                 \
-       $(shell echo $(basename $(notdir $(1))) | sed -e 's/[^A-Za-z0-9_-]/_/g')\
-       $(_rngdoc) $(filter %/$(basename $(notdir $(1))).rng,$(_RNGDOC_RNGS))
-
-## @ _RNGDOC_RNGS
-## The actual RNG files for which to generate documentation with rngdoc
-_RNGDOC_RNGS = $(sort $(patsubst ./%, %, $(foreach dir,$(RNGDOC_DIRS),         \
-       $(wildcard $(dir)/*.rng) $(wildcard $(srcdir)/$(dir)/*.rng))))
-
-## @ _RNGDOC_C_DOCS
-## The generated rngdoc documentation in the C locale
-_RNGDOC_C_DOCS = $(foreach rng,$(_RNGDOC_RNGS), C/$(basename $(notdir $(rng))).xml)
-
-# FIXME: Fix the dependancies
-$(_RNGDOC_C_DOCS) : $(_RNGDOC_RNGS)
-       if ! test -d $(dir $@); then mkdir $(dir $@); fi;
-       xsltproc $(call rngdoc_args,$@,$<) | xmllint --c14n - > $  tmp && \
-         cp $  tmp $@ && rm -f $  tmp
-
-.PHONY: rngdoc
-rngdoc: $(_RNGDOC_C_DOCS)
-
-
-################################################################################
-## @@ Rules for xsldoc
-
-# FIXME: _XSLDOC_XSLS is getting dupes with relative/absolute in some
-# cases.  Right now, I'm just taking the first, but that's just a bad
-# work-around.  Fix the real problem.
-xsldoc_args =                                                                  \
-       --stringparam xsldoc.id                                                 \
-       $(shell echo $(basename $(notdir $(1))) | sed -e 's/[^A-Za-z0-9_-]/_/g')\
-       $(_xsldoc)                                                              \
-       $(word 1,$(filter %/$(basename $(notdir $(1))).xsl,$(_XSLDOC_XSLS)))
-
-## @ _XSLDOC_XSLS
-## The actual XSLT files for which to generate documentation with xsldoc
-_XSLDOC_XSLS = $(sort $(patsubst ./%, %, $(foreach dir,$(XSLDOC_DIRS),         \
-       $(wildcard $(dir)/*.xsl) $(wildcard $(srcdir)/$(dir)/*.xsl))))
+## Support for automake silent-rules
+GDU_V_XML2PO=$(GDU__v_XML2PO_$(V))
+GDU__v_XML2PO_=$(GDU__v_XML2PO_$(AM_DEFAULT_VERBOSITY))
+GDU__v_XML2PO_0= echo "  XML2PO" $@;
 
-## @ _XSLDOC_C_DOCS
-## The generated xsldoc documentation in the C locale
-_XSLDOC_C_DOCS = $(foreach xsl,$(_XSLDOC_XSLS), C/$(basename $(notdir $(xsl))).xml)
+GDU_V_MSGFMT=$(GDU__v_MSGFMT_$(V))
+GDU__v_MSGFMT_=$(GDU__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
+GDU__v_MSGFMT_0= echo "  MSGFMT" $@;
 
-# FIXME: Fix the dependancies
-$(_XSLDOC_C_DOCS) : $(_XSLDOC_XSLS)
-       if ! test -d $(dir $@); then mkdir $(dir $@); fi;
-       xsltproc $(call xsldoc_args,$@,$<) | xmllint --c14n - > $  tmp && \
-         cp $  tmp $@ && rm -f $  tmp
-
-.PHONY: xsldoc
-xsldoc: $(_XSLDOC_C_DOCS)
+GDU_V_DB2OMF=$(GDU__v_DB2OMF_$(V))
+GDU__v_DB2OMF_=$(GDU__v_DB2OMF_$(AM_DEFAULT_VERBOSITY))
+GDU__v_DB2OMF_0= echo "  DB2OMF" $@;
 
+GDU_V_DB2HTM=$(GDU__v_DB2HTM_$(V))
+GDU__v_DB2HTM_=$(GDU__v_DB2HTM_$(AM_DEFAULT_VERBOSITY))
+GDU__v_DB2HTM_0= echo "  DB2HTM" $@;
 
 ################################################################################
 ## @@ Rules for OMF Files
@@ -205,12 +177,14 @@ db2omf_args =                                                                     \
        --stringparam db2omf.lang $(notdir $(patsubst %/$(notdir $(2)),%,$(2))) \
        --stringparam db2omf.omf_dir "$(OMF_DIR)"                               \
        --stringparam db2omf.help_dir "$(HELP_DIR)"                             \
-       --stringparam db2omf.omf_in "`pwd`/$(_DOC_OMF_IN)"                      \
+       --stringparam db2omf.omf_in "$(_DOC_OMF_IN)"                            \
+       $(if $(_ENABLE_SK),                                                     \
+         --stringparam db2omf.scrollkeeper_cl "$(_skcontentslist)")            \
        $(_db2omf) $(2)
 
 ## @ _DOC_OMF_IN
 ## The OMF input file
-_DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(srcdir)/$(DOC_MODULE).omf.in))
+_DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(_DOC_ABS_SRCDIR)/$(DOC_MODULE).omf.in))
 
 ## @ _DOC_OMF_DB
 ## The OMF files for DocBook output
@@ -219,7 +193,11 @@ _DOC_OMF_DB = $(if $(_DOC_OMF_IN),                                         \
 
 $(_DOC_OMF_DB) : $(_DOC_OMF_IN)
 $(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml
-       xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook')
+       @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || {       \
+         echo "The file '$(_skcontentslist)' does not exist." >&2;             \
+         echo "Please check your ScrollKeeper installation." >&2;              \
+         exit 1; }
+       $(GDU_V_DB2OMF)xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; }
 
 ## @ _DOC_OMF_HTML
 ## The OMF files for HTML output
@@ -228,7 +206,13 @@ _DOC_OMF_HTML = $(if $(_DOC_OMF_IN),                                               \
 
 $(_DOC_OMF_HTML) : $(_DOC_OMF_IN)
 $(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml
-       xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml')
+if ENABLE_SK
+       @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || {       \
+         echo "The file '$(_skcontentslist)' does not exist" >&2;              \
+         echo "Please check your ScrollKeeper installation." >&2;              \
+         exit 1; }
+endif
+       $(GDU_V_DB2OMF)xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; }
 
 ## @ _DOC_OMF_ALL
 ## All OMF output files to be built
@@ -242,72 +226,16 @@ omf: $(_DOC_OMF_ALL)
 
 
 ################################################################################
-## @@ Rules for .cvsignore Files
-
-## @ _CVSIGNORE_TOP
-## The .cvsignore file in the top directory
-_CVSIGNORE_TOP = $(if $(DOC_MODULE), .cvsignore)
-
-## @ _CVSIGNORE_C
-## The .cvsignore file in the C directory
-_CVSIGNORE_C = $(if $(DOC_MODULE), C/.cvsignore)
-
-## @ _CVSIGNORE_LC
-## The .cvsignore files in other locale directories
-_CVSIGNORE_LC = $(if $(DOC_MODULE),$(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/.cvsignore))
-
-## @ _CVSIGNORE_TOP_FILES
-## The list of files to be listed in the top-level .cvsignore file
-_CVSIGNORE_TOP_FILES = $(_DOC_OMF_ALL) $(_DOC_DSK_ALL)
-
-## @ _CVSIGNORE_C_FILES
-## The list of files to be listed in the .cvsignore file in the C directory
-_CVSIGNORE_C_FILES = $(_RNGDOC_C_DOCS) $(_XSLDOC_C_DOCS)
-
-## @ _CVSIGNORE_C_FILES
-## The list of files to be listed in the .cvsignore files in other
-## locale directories
-_CVSIGNORE_LC_FILES = $(_DOC_LC_DOCS)
-
-$(_CVSIGNORE_TOP) : $(_CVSIGNORE_TOP_FILES)
-       if ! test -f $@; then touch $@; fi
-       cat $@ > $  tmp
-       list='$^'; for file in $$list; do \
-         echo $$file >> $  tmp; \
-       done
-       cat $  tmp | sort | uniq > $@
-       rm $  tmp
-
-$(_CVSIGNORE_C) : $(_CVSIGNORE_C_FILES)
-       if ! test -f $@; then touch $@; fi
-       cat $@ > $  tmp
-       list='$^'; for file in $$list; do \
-         echo $$file | sed -e 's/.*\///' >> $  tmp; \
-       done
-       cat $  tmp | sort | uniq > $@
-       rm $  tmp
-
-$(_CVSIGNORE_LC) : $(_CVSIGNORE_LC_FILES)
-       if ! test -f $@; then touch $@; fi
-       cat $@ > $  tmp
-       list='$(wildcard $(_CVSIGNORE_LC_FILES),$(dir $@)/*)'; \
-       for file in $$list; do \
-         echo $$file | sed -e 's/.*\///' >> $  tmp; \
-       done
-       cat $  tmp | sort | uniq > $@
-       rm $  tmp
-
-.PHONY: cvsignore
-cvsignore: $(_CVSIGNORE_TOP) $(_CVSIGNROE_C) $(_CVSIGNORE_LC)
-
-
-################################################################################
 ## @@ C Locale Documents
 
 ## @ _DOC_C_MODULE
 ## The top-level documentation file in the C locale
 _DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml)
 
+## @ _DOC_C_PAGES
+## Page files in a Mallard document in the C locale
+_DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page))
+
 ## @ _DOC_C_ENTITIES
 ## Files included with a SYSTEM entity in the C locale
 _DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent))
@@ -320,15 +248,14 @@ _DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc))
 ## All documentation files in the C locale
 _DOC_C_DOCS =                                                          \
        $(_DOC_C_ENTITIES)      $(_DOC_C_INCLUDES)                      \
-       $(_RNGDOC_C_DOCS)       $(_XSLDOC_C_DOCS)                       \
-       $(_DOC_C_MODULE)
+       $(_DOC_C_PAGES)         $(_DOC_C_MODULE)
 
 ## @ _DOC_C_DOCS_NOENT
 ## All documentation files in the C locale,
 ## except files included with a SYSTEM entity
 _DOC_C_DOCS_NOENT =                                                    \
        $(_DOC_C_MODULE)        $(_DOC_C_INCLUDES)                      \
-       $(_RNGDOC_C_DOCS)       $(_XSLDOC_C_DOCS)
+       $(_DOC_C_PAGES)
 
 ## @ _DOC_C_FIGURES
 ## All figures and other external data in the C locale
@@ -350,35 +277,36 @@ _DOC_C_HTML = $(foreach f,                                                \
 
 ## @ _DOC_POFILES
 ## The .po files used for translating the document
-_DOC_POFILES = $(if $(DOC_MODULE),                                             \
+_DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID),                                    \
        $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po))
 
 .PHONY: po
 po: $(_DOC_POFILES)
 
+## @ _DOC_MOFILES
+## The .mo files used for translating the document
+_DOC_MOFILES = $(patsubst %.po,%.mo,$(_DOC_POFILES))
+
+.PHONY: mo
+mo: $(_DOC_MOFILES)
+
 ## @ _DOC_LC_MODULES
 ## The top-level documentation files in all other locales
 _DOC_LC_MODULES = $(if $(DOC_MODULE),                                          \
        $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml))
 
+## @ _DOC_LC_PAGES
+## Page files in a Mallard document in all other locales
+_DOC_LC_PAGES =                                                                        \
+       $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES),       \
+               $(lc)/$(notdir $(page)) ))
+
 ## @ _DOC_LC_XINCLUDES
 ## Files included with XInclude in all other locales
 _DOC_LC_INCLUDES =                                                             \
        $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES),     \
                $(lc)/$(notdir $(inc)) ))
 
-## @ _RNGDOC_LC_DOCS
-## The generated rngdoc documentation in all other locales
-_RNGDOC_LC_DOCS =                                                              \
-       $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach doc,$(_RNGDOC_C_DOCS),      \
-               $(lc)/$(notdir $(doc)) ))
-
-## @ _XSLDOC_LC_DOCS
-## The generated xsldoc documentation in all other locales
-_XSLDOC_LC_DOCS =                                                              \
-       $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach doc,$(_XSLDOC_C_DOCS),      \
-               $(lc)/$(notdir $(doc)) ))
-
 ## @ _DOC_LC_HTML
 ## All HTML documentation in all other locales
 # FIXME: probably have to shell escape to determine the file names
@@ -389,8 +317,7 @@ _DOC_LC_HTML =                                                                      \
 ## @ _DOC_LC_DOCS
 ## All documentation files in all other locales
 _DOC_LC_DOCS =                                                                 \
-       $(_DOC_LC_MODULES)      $(_DOC_LC_INCLUDES)                             \
-       $(_RNGDOC_LC_DOCS)      $(_XSLDOC_LC_DOCS)                              \
+       $(_DOC_LC_MODULES)      $(_DOC_LC_INCLUDES)     $(_DOC_LC_PAGES)        \
        $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML))
 
 ## @ _DOC_LC_FIGURES
@@ -413,46 +340,46 @@ $(_DOC_POFILES):
        fi;
        @docs=; \
        list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \
-         if test -f $$doc; then \
-           docs="$$docs ../$$doc"; \
-         else \
-           docs="$$docs ../$(srcdir)/$$doc"; \
-         fi; \
+         docs="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \
        done; \
        if ! test -f $@; then \
          echo "(cd $(dir $@) && \
-           $(_xml2po) -e $$docs > $(notdir $@).tmp && \
+           $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \
            cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \
          (cd $(dir $@) && \
-           $(_xml2po) -e $$docs > $(notdir $@).tmp && \
+           $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \
            cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \
        else \
          echo "(cd $(dir $@) && \
-           $(_xml2po) -e -u $(notdir $@) $$docs)"; \
+           $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \
          (cd $(dir $@) && \
-           $(_xml2po) -e -u $(notdir $@) $$docs); \
+           $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \
        fi
 
+$(_DOC_MOFILES): %.mo: %.po
+       $(AM_V_at)if ! test -d $(dir $@); then mkdir "$(dir $@)"; fi
+       $(GDU_V_MSGFMT)msgfmt -o $@ $<
+
 # FIXME: fix the dependancy
 # FIXME: hook xml2po up
-$(_DOC_LC_DOCS) : $(_DOC_POFILES)
+$(_DOC_LC_DOCS) : $(_DOC_MOFILES)
 $(_DOC_LC_DOCS) : $(_DOC_C_DOCS)
-       if ! test -d $(dir $@); then mkdir $(dir $@); fi
-       case "$(srcdir)" in /*) sd="$(srcdir)";; *) sd="../$(srcdir)";; esac; \
-       if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$$sd/"; fi; \
+       $(AM_V_at)if ! test -d $(dir $@); then mkdir $(dir $@); fi
+       $(GDU_V_XML2PO)if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \
+       mo="$(dir $@)$(patsubst %/$(notdir $@),%,$@).mo"; \
+       if [ -f "$${mo}" ]; then mo="../$${mo}"; else mo="$(_DOC_ABS_SRCDIR)/$${mo}"; fi; \
        (cd $(dir $@) && \
-         $(_xml2po) -e -p \
-           "$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).po" \
+         $(_xml2po) -m $(_xml2po_mode) -e -t "$${mo}" \
            "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \
            cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)
 
 ## @ _DOC_POT
 ## A pot file
-_DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot)
+_DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot,$(if $(DOC_ID),$(DOC_ID).pot))
 .PHONY: pot
 pot: $(_DOC_POT)
 $(_DOC_POT): $(_DOC_C_DOCS_NOENT)
-       $(_xml2po) -e -o $@ $^
+       $(GDU_V_XML2PO)$(_xml2po) -m $(_xml2po_mode) -e -o $@ $^
 
 
 ################################################################################
@@ -466,16 +393,11 @@ _DOC_HTML_ALL = $(if $(filter html HTML,$(_DOC_REAL_FORMATS)), \
 _DOC_HTML_TOPS = $(foreach lc,C $(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xhtml)
 
 $(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
-       xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename 
"$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@)
+       $(GDU_V_DB2HTM)xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam 
db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst 
%.xhtml,%.xml,$@)
 
 
 ################################################################################
-
-if ENABLE_SK
-_ENABLE_SK = true
-else
-_ENABLE_SK = false
-endif
+## All
 
 all:                                                   \
        $(_DOC_C_DOCS)          $(_DOC_LC_DOCS)         \
@@ -483,27 +405,30 @@ all:                                                      \
        $(_DOC_HTML_ALL)        $(_DOC_POFILES)
 
 
-.PHONY: clean-doc-rngdoc clean-doc-xsldoc clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir
+################################################################################
+## Clean
+
+.PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir
 
-clean-doc-rngdoc: ; rm -f $(_RNGDOC_C_DOCS) $(_RNGDOC_LC_DOCS)
-clean-doc-xsldoc: ; rm -f $(_XSLDOC_C_DOCS) $(_XSLDOC_LC_DOCS)
 clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
 clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
 clean-doc-lc:
        rm -f $(_DOC_LC_DOCS)
+       rm -f $(_DOC_MOFILES)
        @list='$(_DOC_POFILES)'; for po in $$list; do \
          if ! test "$$po" -ef "$(srcdir)/$$po"; then \
            echo "rm -f $$po"; \
            rm -f "$$po"; \
          fi; \
        done
+#      .xml2.po.mo cleaning is obsolete as of 0.18.1 and could be removed in 0.20.x
        @for lc in C $(_DOC_REAL_LINGUAS); do \
          if test -f "$$lc/.xml2po.mo"; then \
            echo "rm -f $$lc/.xml2po.mo"; \
            rm -f "$$lc/.xml2po.mo"; \
          fi; \
        done
-clean-doc-dir:
+clean-doc-dir: clean-doc-lc
        @for lc in C $(_DOC_REAL_LINGUAS); do \
          for dir in `find $$lc -depth -type d`; do \
            if ! test $$dir -ef $(srcdir)/$$dir; then \
@@ -513,35 +438,33 @@ clean-doc-dir:
          done; \
        done
 
-_clean_rngdoc = $(if $(RNGDOC_DIRS),clean-doc-rngdoc)
-_clean_xsldoc = $(if $(XSLDOC_DIRS),clean-doc-xsldoc)
 _clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf)
 _clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk)
 _clean_lc  = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc)
-_clean_dir = $(if $(DOC_MODULE),clean-doc-dir)
+_clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir)
 
 clean-local:                                           \
-       $(_clean_rngdoc)        $(_clean_xsldoc)        \
        $(_clean_omf)           $(_clean_dsk)           \
        $(_clean_lc)            $(_clean_dir)
 distclean-local:                                       \
-       $(_clean_rngdoc)        $(_clean_xsldoc)        \
        $(_clean_omf)           $(_clean_dsk)           \
        $(_clean_lc)            $(_clean_dir)
 mostlyclean-local:                                     \
-       $(_clean_rngdoc)        $(_clean_xsldoc)        \
        $(_clean_omf)           $(_clean_dsk)           \
        $(_clean_lc)            $(_clean_dir)
 maintainer-clean-local:                                        \
-       $(_clean_rngdoc)        $(_clean_xsldoc)        \
        $(_clean_omf)           $(_clean_dsk)           \
        $(_clean_lc)            $(_clean_dir)
 
 
-.PHONY: dist-doc-docs dist-doc-figs dist-doc-omf dist-doc-dsk
-doc-dist-hook:                                         \
-       $(if $(DOC_MODULE),dist-doc-docs)       \
-       $(if $(_DOC_C_FIGURES),dist-doc-figs)   \
+
+################################################################################
+## Dist
+
+.PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk
+doc-dist-hook:                                                 \
+       $(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs)      \
+       $(if $(_DOC_C_FIGURES),dist-doc-figs)           \
        $(if $(_DOC_OMF_IN),dist-doc-omf)
 #      $(if $(_DOC_DSK_IN),dist-doc-dsk)
 
@@ -550,9 +473,36 @@ dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
          echo " $(mkinstalldirs) $(distdir)/$$lc"; \
          $(mkinstalldirs) "$(distdir)/$$lc"; \
        done
-       @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \
+       @list='$(_DOC_C_DOCS)'; \
+       for doc in $$list; do \
+         if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
+           docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
+           if ! test -d "$(distdir)/$$docdir"; then \
+             echo "$(mkinstalldirs) $(distdir)/$$docdir"; \
+             $(mkinstalldirs) "$(distdir)/$$docdir"; \
+           fi; \
+         echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
+         $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
+       done
+       @list='$(_DOC_LC_DOCS)'; \
+       for doc in $$list; do \
+         if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
+           docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
+           if ! test -d "$(distdir)/$$docdir"; then \
+             echo "$(mkinstalldirs) $(distdir)/$$docdir"; \
+             $(mkinstalldirs) "$(distdir)/$$docdir"; \
+           fi; \
+         echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
+         $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
+       done
+       @list='$(_DOC_POFILES)'; \
        for doc in $$list; do \
          if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
+           docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
+           if ! test -d "$(distdir)/$$docdir"; then \
+             echo "$(mkinstalldirs) $(distdir)/$$docdir"; \
+             $(mkinstalldirs) "$(distdir)/$$docdir"; \
+           fi; \
          echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
          $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
        done
@@ -583,9 +533,14 @@ dist-doc-dsk:
        $(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))"
 
 
+
+################################################################################
+## Check
+
 .PHONY: check-doc-docs check-doc-omf
 check:                                                 \
        $(if $(DOC_MODULE),check-doc-docs)              \
+       $(if $(DOC_ID),check-doc-pages)                 \
        $(if $(_DOC_OMF_IN),check-doc-omf)
 
 check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
@@ -601,16 +556,38 @@ check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
          xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \
        done
 
+check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES)
+       for lc in C $(_DOC_REAL_LINGUAS); do \
+         if test -f "$$lc"; \
+           then d=; \
+           xmlpath="$$lc"; \
+         else \
+           d="$(srcdir)/"; \
+           xmlpath="$$lc:$(srcdir)/$$lc"; \
+         fi; \
+         for page in $(DOC_PAGES); do \
+           echo "xmllint --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
+           xmllint --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
+         done; \
+       done
+
 check-doc-omf: $(_DOC_OMF_ALL)
        @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
-         echo "xmllint --noout --dtdvalid 
'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
-         xmllint --noout --dtdvalid 
'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
+         echo "xmllint --noout --xinclude --dtdvalid 
'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
+         xmllint --noout --xinclude --dtdvalid 
'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
        done
 
 
+
+################################################################################
+## Install
+
 .PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk
+
+_doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE))
+
 install-data-local:                                    \
-       $(if $(DOC_MODULE),install-doc-docs)            \
+       $(if $(DOC_MODULE)$(DOC_ID),install-doc-docs)   \
        $(if $(_DOC_HTML_ALL),install-doc-html)         \
        $(if $(_DOC_C_FIGURES),install-doc-figs)        \
        $(if $(_DOC_OMF_IN),install-doc-omf)
@@ -618,36 +595,57 @@ install-data-local:                                       \
 
 install-doc-docs:
        @for lc in C $(_DOC_REAL_LINGUAS); do \
-         echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc"; \
-         $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc; \
+         echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \
+         $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \
+       done
+       @list='$(_DOC_C_DOCS)'; for doc in $$list; do \
+         if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
+         docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
+         docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \
+         if ! test -d "$$docdir"; then \
+           echo "$(mkinstalldirs) $$docdir"; \
+           $(mkinstalldirs) "$$docdir"; \
+         fi; \
+         echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
+         $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \
        done
-       @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
+       @list='$(_DOC_LC_DOCS)'; for doc in $$list; do \
          if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
-         echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
-         $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc; \
+         docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
+         docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \
+         if ! test -d "$$docdir"; then \
+           echo "$(mkinstalldirs) $$docdir"; \
+           $(mkinstalldirs) "$$docdir"; \
+         fi; \
+         echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
+         $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \
        done
 
 install-doc-figs:
        @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \
          for lc in C $(_DOC_REAL_LINGUAS); do \
+           figsymlink=false; \
            if test -f "$$lc/$$fig"; then \
              figfile="$$lc/$$fig"; \
            elif test -f "$(srcdir)/$$lc/$$fig"; then \
              figfile="$(srcdir)/$$lc/$$fig"; \
-           elif test -f "C/$$fig"; then \
-             figfile="C/$$fig"; \
            else \
-             figfile="$(srcdir)/C/$$fig"; \
+             figsymlink=true; \
            fi; \
            figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
-           figdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \
+           figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \
            if ! test -d "$$figdir"; then \
              echo "$(mkinstalldirs) $$figdir"; \
              $(mkinstalldirs) "$$figdir"; \
            fi; \
            figbase=`echo $$fig | sed -e 's/^.*\///'`; \
-           echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
-           $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \
+           if $$figsymlink; then \
+             echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \
+             ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \
+           else \
+             echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
+             $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \
+           fi; \
          done; \
        done
 
@@ -655,46 +653,54 @@ install-doc-html:
        echo install-html
 
 install-doc-omf:
-       $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)
+       $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)
        @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
-         echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
-         $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf; \
+         echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
+         $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \
        done
        @if test "x$(_ENABLE_SK)" = "xtrue"; then \
-         echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
-         scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
+         echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o 
$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \
+         scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o 
"$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \
        fi;
 
 install-doc-dsk:
        echo install-dsk
 
 
+
+################################################################################
+## Uninstall
+
 .PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk
 uninstall-local:                                       \
-       $(if $(DOC_MODULE),uninstall-doc-docs)          \
+       $(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \
        $(if $(_DOC_HTML_ALL),uninstall-doc-html)       \
        $(if $(_DOC_C_FIGURES),uninstall-doc-figs)      \
        $(if $(_DOC_OMF_IN),uninstall-doc-omf)
 #      $(if $(_DOC_DSK_IN),uninstall-doc-dsk)
 
 uninstall-doc-docs:
-       @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
-         echo " rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
-         rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
+       @list='$(_DOC_C_DOCS)'; for doc in $$list; do \
+         echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
+         rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
+       done
+       @list='$(_DOC_LC_DOCS)'; for doc in $$list; do \
+         echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
+         rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
        done
 
 uninstall-doc-figs:
        @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \
-         echo "rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
-         rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
+         echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \
+         rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \
        done;
 
 uninstall-doc-omf:
        @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
-         if test "x$(_ENABLE_SK)" == "xtrue"; then \
-           echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
-           scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
+         if test "x$(_ENABLE_SK)" = "xtrue"; then \
+           echo "scrollkeeper-uninstall -p $(_sklocalstatedir) 
$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
+           scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; 
\
          fi; \
-         echo "rm -f $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
-         rm -f "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
+         echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
+         rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
        done
diff --git a/m4/gnome-doc-utils.m4 b/m4/gnome-doc-utils.m4
index 91a7278..90e1b51 100644
--- a/m4/gnome-doc-utils.m4
+++ b/m4/gnome-doc-utils.m4
@@ -1,17 +1,7 @@
-dnl GNOME_DOC_INIT([MINIMUM-VERSION])
-
-AC_DEFUN([GNOME_DOC_INIT],
+dnl Do not call GNOME_DOC_DEFINES directly.  It is split out from
+dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
+AC_DEFUN([GNOME_DOC_DEFINES],
 [
-dnl Only apply the version check if we're not configuring ourselves!
-if test "x$PACKAGE" != "xgnome-doc-utils"; then
-  GDU_REQUIRED_VERSION=0.3.2
-  if test -n "$1"; then
-    GDU_REQUIRED_VERSION=$1
-  fi
-
-  PKG_CHECK_MODULES([GDU_MODULE_VERSION_CHECK],[gnome-doc-utils >= $GDU_REQUIRED_VERSION])
-fi
-
 AC_ARG_WITH([help-dir],
   AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
   [with_help_dir='${datadir}/gnome/help'])
@@ -34,6 +24,38 @@ AC_ARG_ENABLE([scrollkeeper],
        [AC_HELP_STRING([--disable-scrollkeeper],
                        [do not make updates to the scrollkeeper database])],,
        enable_scrollkeeper=yes)
-AM_CONDITIONAL(ENABLE_SK, test "x$enable_scrollkeeper" = "xyes")
+AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
+
+dnl disable scrollkeeper automatically for distcheck
+DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
+AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
+
+AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
+])
+
+# GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
+#
+AC_DEFUN([GNOME_DOC_INIT],
+[AC_REQUIRE([AC_PROG_LN_S])dnl
+
+if test -z "$AM_DEFAULT_VERBOSITY"; then
+  AM_DEFAULT_VERBOSITY=1
+fi
+AC_SUBST([AM_DEFAULT_VERBOSITY])
+
+ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
+
+AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required])
+PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
+       [gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
+
+if test "$gdu_cv_have_gdu" = "yes"; then
+       AC_MSG_RESULT([yes])
+       ifelse([$2],,[:],[$2])
+else
+       AC_MSG_RESULT([no])
+       ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
+fi
 
+GNOME_DOC_DEFINES
 ])
diff --git a/m4/intltool.m4 b/m4/intltool.m4
index 26b47fe..c25b7b1 100644
--- a/m4/intltool.m4
+++ b/m4/intltool.m4
@@ -23,9 +23,10 @@
 ## the same distribution terms that you use for the rest of that program.
 
 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 35 IT_PROG_INTLTOOL
-AC_DEFUN([IT_PROG_INTLTOOL],
-[AC_PREREQ([2.50])dnl
+# serial 42 IT_PROG_INTLTOOL
+AC_DEFUN([IT_PROG_INTLTOOL], [
+AC_PREREQ([2.50])dnl
+AC_REQUIRE([AM_NLS])dnl
 
 case "$am__api_version" in
     1.[01234])
@@ -35,67 +36,112 @@ case "$am__api_version" in
     ;;
 esac
 
+INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + 
$ 3; }'`
 if test -n "$1"; then
-    AC_MSG_CHECKING(for intltool >= $1)
-
-    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
-    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 
1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
-    ]
+    AC_MSG_CHECKING([for intltool >= $1])
     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 fi
 
-  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
-     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) 
-x -u /tmp $< [$]@' 
-      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-
-AC_SUBST(INTLTOOL_DESKTOP_RULE)
-AC_SUBST(INTLTOOL_DIRECTORY_RULE)
-AC_SUBST(INTLTOOL_KEYS_RULE)
-AC_SUBST(INTLTOOL_PROP_RULE)
-AC_SUBST(INTLTOOL_OAF_RULE)
-AC_SUBST(INTLTOOL_PONG_RULE)
-AC_SUBST(INTLTOOL_SERVER_RULE)
-AC_SUBST(INTLTOOL_SHEET_RULE)
-AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
-AC_SUBST(INTLTOOL_UI_RULE)
-AC_SUBST(INTLTOOL_XAM_RULE)
-AC_SUBST(INTLTOOL_KBD_RULE)
-AC_SUBST(INTLTOOL_XML_RULE)
-AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
-AC_SUBST(INTLTOOL_CAVES_RULE)
-AC_SUBST(INTLTOOL_SCHEMAS_RULE)
-AC_SUBST(INTLTOOL_THEME_RULE)
-AC_SUBST(INTLTOOL_SERVICE_RULE)
-
-# Use the tools built into the package, not the ones that are installed.
-AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
-AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
-AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
+AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
+AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
+AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
+fi
+
+if test -z "$AM_DEFAULT_VERBOSITY"; then
+  AM_DEFAULT_VERBOSITY=1
+fi
+AC_SUBST([AM_DEFAULT_VERBOSITY])
+
+INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
+INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
+INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
+AC_SUBST(INTLTOOL_V_MERGE)
+AC_SUBST(INTLTOOL__v_MERGE_)
+AC_SUBST(INTLTOOL__v_MERGE_0)
+
+INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
+intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
+intltool__v_merge_options_0='-q'
+AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
+AC_SUBST(intltool__v_merge_options_)
+AC_SUBST(intltool__v_merge_options_0)
+
+  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
+     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
+      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C 
$(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
+else
+      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; 
$(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C 
$(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
+fi
+      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c 
$(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+
+_IT_SUBST(INTLTOOL_DESKTOP_RULE)
+_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
+_IT_SUBST(INTLTOOL_KEYS_RULE)
+_IT_SUBST(INTLTOOL_PROP_RULE)
+_IT_SUBST(INTLTOOL_OAF_RULE)
+_IT_SUBST(INTLTOOL_PONG_RULE)
+_IT_SUBST(INTLTOOL_SERVER_RULE)
+_IT_SUBST(INTLTOOL_SHEET_RULE)
+_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
+_IT_SUBST(INTLTOOL_UI_RULE)
+_IT_SUBST(INTLTOOL_XAM_RULE)
+_IT_SUBST(INTLTOOL_KBD_RULE)
+_IT_SUBST(INTLTOOL_XML_RULE)
+_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
+_IT_SUBST(INTLTOOL_CAVES_RULE)
+_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
+_IT_SUBST(INTLTOOL_THEME_RULE)
+_IT_SUBST(INTLTOOL_SERVICE_RULE)
+_IT_SUBST(INTLTOOL_POLICY_RULE)
+
+# Check the gettext tools to make sure they are GNU
+AC_PATH_PROG(XGETTEXT, xgettext)
+AC_PATH_PROG(MSGMERGE, msgmerge)
+AC_PATH_PROG(MSGFMT, msgfmt)
+AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
 
 AC_PATH_PROG(INTLTOOL_PERL, perl)
 if test -z "$INTLTOOL_PERL"; then
-   AC_MSG_ERROR([perl not found; required for intltool])
+   AC_MSG_ERROR([perl not found])
 fi
-if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
-   AC_MSG_ERROR([perl 5.x required for intltool])
+AC_MSG_CHECKING([for perl >= 5.8.1])
+$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
+if test $? -ne 0; then
+   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
+else
+   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
+   AC_MSG_RESULT([$IT_PERL_VERSION])
 fi
 if test "x$2" != "xno-xml"; then
    AC_MSG_CHECKING([for XML::Parser])
@@ -106,57 +152,10 @@ if test "x$2" != "xno-xml"; then
    fi
 fi
 
-AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
-AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
-AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
-AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
-
 # Substitute ALL_LINGUAS so we can use it in po/Makefile
 AC_SUBST(ALL_LINGUAS)
-    
-IT_PO_SUBDIR([po])
 
-dnl The following is very similar to
-dnl
-dnl    AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
-dnl
-dnl with the following slight differences:
-dnl  - the *.in files are in ac_aux_dir,
-dnl  - if the file haven't changed upon reconfigure, it's not touched,
-dnl  - the evaluation of the third parameter enables a hack which computes
-dnl    the actual value of $libdir,
-dnl  - the user sees "executing intltool commands", instead of
-dnl    "creating intltool-extract" and such.
-dnl
-dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
-dnl a reason for it.
-
-AC_CONFIG_COMMANDS([intltool], [
-
-for file in intltool-extract intltool-merge intltool-update; do
-  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
-      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
-      -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
-      -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
-      -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
-      -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
-      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
-       < ${ac_aux_dir}/${file}.in > ${file}.out
-  if cmp -s ${file} ${file}.out 2>/dev/null; then
-    rm -f ${file}.out
-  else
-    mv -f ${file}.out ${file}
-  fi
-  chmod ugo+x ${file}
-  chmod u+w ${file}
-done
-
-],
-[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
-prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
-INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
-INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
+IT_PO_SUBDIR([po])
 
 ])
 
@@ -169,10 +168,13 @@ INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
 AC_DEFUN([IT_PO_SUBDIR],
 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 dnl
-dnl The following CONFIG_COMMANDS should be exetuted at the very end
+dnl The following CONFIG_COMMANDS should be executed at the very end
 dnl of config.status.
 AC_CONFIG_COMMANDS_PRE([
   AC_CONFIG_COMMANDS([$1/stamp-it], [
+    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
+       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
+    fi
     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
     >"$1/stamp-it.tmp"
     [sed '/^#/d
@@ -181,21 +183,27 @@ AC_CONFIG_COMMANDS_PRE([
        '"s|^|  $ac_top_srcdir/|" \
       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
     ]
-    if test ! -f "$1/Makefile"; then
-      AC_MSG_ERROR([$1/Makefile is not ready.])
-    fi
-    mv "$1/Makefile" "$1/Makefile.tmp"
     [sed '/^POTFILES =/,/[^\\]$/ {
                /^POTFILES =/!d
                r $1/POTFILES
          }
-        ' "$1/Makefile.tmp" >"$1/Makefile"]
+        ' "$1/Makefile.in" >"$1/Makefile"]
     rm -f "$1/Makefile.tmp"
     mv "$1/stamp-it.tmp" "$1/stamp-it"
   ])
 ])dnl
 ])
 
+# _IT_SUBST(VARIABLE)
+# -------------------
+# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
+#
+AC_DEFUN([_IT_SUBST],
+[
+AC_SUBST([$1])
+m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
+]
+)
 
 # deprecated macros
 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
diff --git a/omf.make b/omf.make
index 1a7b7cc..35dec24 100644
--- a/omf.make
+++ b/omf.make
@@ -1,4 +1,4 @@
-#
+# 
 # No modifications of this Makefile should be necessary.
 #
 # This file contains the build instructions for installing OMF files.  It is
@@ -10,7 +10,7 @@
 #
 # If it is impossible to configure with --localstatedir=/var, then
 # modify the definition of scrollkeeper_localstate_dir so that
-# it points to the correct location. Note that you must still use
+# it points to the correct location. Note that you must still use 
 # $(localstatedir) in this or when people build RPMs it will update
 # the real database on their system instead of the one under RPM_BUILD_ROOT.
 #
@@ -22,7 +22,7 @@
 #      This file was derived from scrollkeeper_example2, a package
 #      illustrating how to install documentation and OMF files for use with
 #      ScrollKeeper 0.3.x and 0.4.x.  For more information, see:
-#              http://scrollkeeper.sourceforge.net/
+#              http://scrollkeeper.sourceforge.net/    
 #      Version: 0.1.3 (last updated: March 20, 2002)
 #
 
@@ -36,19 +36,23 @@ omf: omf_timestamp
 
 omf_timestamp: $(omffile)
        -for file in $(omffile); do \
-         scrollkeeper-preinstall $(docdir)/$(docname).xml $(srcdir)/$$file $$file.out; \
+         absfile=$(srcdir)/$$file; \
+         test -r $$file && absfile=$$file; \
+         scrollkeeper-preinstall $(docdir)/$(docname).xml $$absfile $$file.out; \
        done; \
        touch omf_timestamp
 
 install-data-hook-omf:
        $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir)
        for file in $(omffile); do \
-               $(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \
+               absfile=$(srcdir)/$$file.out; \
+               test -r $$file.out && absfile=$$file.out; \
+               $(INSTALL_DATA) $$absfile $(DESTDIR)$(omf_dest_dir)/$$file; \
        done
        -scrollkeeper-update -p $(DESTDIR)$(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir)
 
 uninstall-local-omf:
-       -for file in $(srcdir)/*.omf; do \
+       -for file in $(omffile); do \
                basefile=`basename $$file`; \
                rm -f $(DESTDIR)$(omf_dest_dir)/$$basefile; \
        done
diff --git a/src/tags/gnome-cmd-tags-poppler.cc b/src/tags/gnome-cmd-tags-poppler.cc
index c9dc927..589ec16 100644
--- a/src/tags/gnome-cmd-tags-poppler.cc
+++ b/src/tags/gnome-cmd-tags-poppler.cc
@@ -40,8 +40,11 @@ using namespace std;
 #ifdef HAVE_PDF
 static regex_t rxDate;
 static gboolean rxDate_OK;
-
+#ifdef POPPLER_HAS_SET_ERROR_CALLBACK
+static void noErrorReporting(void *, ErrorCategory, int pos, char *msg)
+#else
 static void noErrorReporting(int pos, char *msg, va_list args)
+#endif
 {
 }
 #endif
@@ -52,8 +55,12 @@ void gcmd_tags_poppler_init()
 #ifdef HAVE_PDF
     rxDate_OK = regcomp (&rxDate, 
"^(D:)?([12][019][0-9][0-9]([01][0-9]([0-3][0-9]([012][0-9]([0-5][0-9]([0-5][0-9])?)?)?)?)?)", 
REG_EXTENDED)==0;
 
+#ifdef POPPLER_HAS_SET_ERROR_CALLBACK
+    setErrorCallback(noErrorReporting, NULL);
+#else
     setErrorFunction(noErrorReporting);
 #endif
+#endif
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]