[gtk-doc] Generate version.xml from configure

Even though this is not what autoconf recommends, it reduces doc
rebuilds when version doesn't change but configure changes.
diff --git a/configure.ac b/configure.ac
index 47834c1..c3f57a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -398,6 +398,7 @@
 test/shaping/Makefile
 docs/Makefile
 docs/reference/Makefile
+docs/reference/version.xml
 ])
 
 AC_OUTPUT
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 65dabbb..f5309ee 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -1,4 +1,4 @@
-## Process this file with automake to produce Makefile.in
+# Process this file with automake to produce Makefile.in
 
 # We require automake 1.6 at least.
 AUTOMAKE_OPTIONS = 1.6
@@ -70,12 +70,7 @@
 
 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
 # e.g. content_files=running.sgml building.sgml changes-2.0.sgml
-content_files= \
-	version.xml \
-	$(NULL)
-
-version.xml: $(top_srcdir)/configure.ac
-	$(AM_V_GEN) echo $(HB_VERSION_MAJOR).$(HB_VERSION_MINOR).$(HB_VERSION_MICRO) > $@
+content_files= version.xml
 
 # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
 # These files must be listed here *and* in content_files
@@ -98,7 +93,7 @@
 
 # Other files to distribute
 # e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST +=
+EXTRA_DIST += version.xml.in
 
 # Files not to distribute
 # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
diff --git a/docs/reference/version.xml.in b/docs/reference/version.xml.in
new file mode 100644
index 0000000..de213c2
--- /dev/null
+++ b/docs/reference/version.xml.in
@@ -0,0 +1 @@
+@HB_VERSION@