more work on datasets
[pspp] / configure.ac
index 1e6edf6d697beeb82e8eab7deaa03b2eacef823c..9ce769983377b1b4809cc99e91d24fda69d0d865 100644 (file)
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
 
 dnl Initialize.
 AC_PREREQ(2.63)
-AC_INIT([GNU PSPP], [0.8.4], [bug-gnu-pspp@gnu.org], [pspp])
+AC_INIT([GNU PSPP], [0.9.0], [bug-gnu-pspp@gnu.org], [pspp])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_TESTDIR([tests])
@@ -19,6 +19,7 @@ AC_PROG_LIBTOOL
 PKG_PROG_PKG_CONFIG
 m4_pattern_forbid([PKG_CHECK_MODULES])
 PSPP_CHECK_CLICKSEQUENCE
+PSPP_CHECK_DOT
 
 PSPP_ENABLE_WERROR
 
@@ -55,10 +56,23 @@ if test "$with_cairo" != no; then
      AC_DEFINE([HAVE_CAIRO], 1, 
        [Define to 1 if Cairo and Pango are available.])],
     [PSPP_REQUIRED_PREREQ([cairo 1.5 or later and pango 1.22 or later (or use --without-cairo)])])
-  AC_PATH_PROG([XMLLINT], [xmllint], [echo], [$PATH])
-  AC_SUBST(XMLLINT)
 fi
 
+dnl Xmllint is used in the rules to build the documentation.  It is not actually necessary,
+dnl but is used for post-build consistency checks.  Thus, non-developers can live without it.
+dnl However for it to be usefull, it needs to be a certain version and have certain features.
+dnl The macros below check that it the xmllint available is up to scratch.  If it isn't
+dnl then a dummy /bin/echo is subsituted instead.
+
+AC_CACHE_CHECK([for an xmllint program which fits our needs],[ac_cv_path_XMLLINT],
+[AC_PATH_PROGS_FEATURE_CHECK([XMLLINT], [xmllint], 
+  [[$ac_path_XMLLINT --version 2>&1 | $GREP XPath > /dev/null && 
+    test `$ac_path_XMLLINT --version 2>&1 | $SED 's/^.* \([0-9]*\).*/\1/'` -gt 20900 &&
+    ac_cv_path_XMLLINT=$ac_path_XMLLINT]],
+   [AC_MSG_WARN([no appropriate xmllint program found. Using a dummy (echo)]); ac_cv_path_XMLLINT=$ECHO])])
+
+AC_SUBST([XMLLINT],[$ac_cv_path_XMLLINT])
+
 # Support for GUI.
 AC_ARG_WITH([gui], 
   [AS_HELP_STRING([--without-gui],