cfgupgrade: Fix error messages
[ganeti-local] / configure.ac
index b09be70..0683f5f 100644 (file)
@@ -1,8 +1,8 @@
 # Configure script for Ganeti
 m4_define([gnt_version_major], [2])
-m4_define([gnt_version_minor], [6])
-m4_define([gnt_version_revision], [2])
-m4_define([gnt_version_suffix], [])
+m4_define([gnt_version_minor], [7])
+m4_define([gnt_version_revision], [0])
+m4_define([gnt_version_suffix], [~beta1])
 m4_define([gnt_version_full],
           m4_format([%d.%d.%d%s],
                     gnt_version_major, gnt_version_minor,
@@ -49,6 +49,15 @@ AC_ARG_WITH([ssh-config-dir],
   [ssh_config_dir="/etc/ssh"])
 AC_SUBST(SSH_CONFIG_DIR, $ssh_config_dir)
 
+# --with-xen-config-dir=...
+AC_ARG_WITH([xen-config-dir],
+  [AS_HELP_STRING([--with-xen-config-dir=DIR],
+                  m4_normalize([Xen configuration directory
+                                (default: /etc/xen)]))],
+  [xen_config_dir="$withval"],
+  [xen_config_dir=/etc/xen])
+AC_SUBST(XEN_CONFIG_DIR, $xen_config_dir)
+
 # --with-os-search-path=...
 # do a bit of black sed magic to for quoting of the strings in the list
 AC_ARG_WITH([os-search-path],
@@ -373,6 +382,18 @@ if test -z "$SPHINX"
 then
   AC_MSG_WARN(m4_normalize([sphinx-build not found, documentation rebuild will
                             not be possible]))
+else
+  # Sphinx exits with code 1 when it prints its usage
+  sphinxver=`{ $SPHINX --version 2>&1 || :; } | head -n 3`
+
+  if ! echo "$sphinxver" | grep -q -w -e '^Sphinx' -e '^Usage:'; then
+    AC_MSG_ERROR([Unable to determine Sphinx version])
+
+  # Note: Character classes ([...]) need to be double quoted due to autoconf
+  # using m4
+  elif ! echo "$sphinxver" | grep -q -E '^Sphinx[[[:space:]]]+v[[1-9]]\>'; then
+    AC_MSG_ERROR([Sphinx 1.0 or higher is required])
+  fi
 fi
 
 AC_ARG_ENABLE([manpages-in-doc],