Add general storage parameters to node info call
[ganeti-local] / configure.ac
index 2d2439f..65fb83c 100644 (file)
@@ -1,8 +1,8 @@
 # Configure script for Ganeti
 m4_define([gnt_version_major], [2])
-m4_define([gnt_version_minor], [7])
+m4_define([gnt_version_minor], [9])
 m4_define([gnt_version_revision], [0])
-m4_define([gnt_version_suffix], [~beta3])
+m4_define([gnt_version_suffix], [~alpha1])
 m4_define([gnt_version_full],
           m4_format([%d.%d.%d%s],
                     gnt_version_major, gnt_version_minor,
@@ -119,19 +119,6 @@ AC_ARG_WITH([xen-initrd],
   [xen_initrd="/boot/initrd-3-xenU"])
 AC_SUBST(XEN_INITRD, $xen_initrd)
 
-# --with-xen-cmd=...
-AC_ARG_WITH([xen-cmd],
-  [AS_HELP_STRING([--with-xen-cmd=CMD],
-    [Sets the xen cli interface command (default is xm)]
-  )],
-  [xen_cmd="$withval"],
-  [xen_cmd=xm])
-AC_SUBST(XEN_CMD, $xen_cmd)
-
-if ! test "$XEN_CMD" = xl -o "$XEN_CMD" = xm; then
-  AC_MSG_ERROR([Unsupported xen command specified])
-fi
-
 # --with-kvm-kernel=...
 AC_ARG_WITH([kvm-kernel],
   [AS_HELP_STRING([--with-kvm-kernel=PATH],
@@ -244,7 +231,7 @@ AC_ARG_WITH([user-prefix],
    user_rapi="${withval}rapi";
    user_confd="${withval}confd";
    user_noded="$user_default";
-   user_mond="${withval}mond"],
+   user_mond="$user_default"],
   [user_masterd="$user_default";
    user_rapi="$user_default";
    user_confd="$user_default";
@@ -269,7 +256,7 @@ AC_ARG_WITH([group-prefix],
    group_masterd="${withval}masterd";
    group_noded="$group_default";
    group_daemons="${withval}daemons";
-   group_mond="${withval}mond"],
+   group_mond="$group_default"],
   [group_rapi="$group_default";
    group_admin="$group_default";
    group_confd="$group_default";
@@ -566,8 +553,15 @@ if test "$enable_monitoring" != no; then
                    [MONITORING_PKG="$MONITORING_PKG attoparsec"])
   AC_GHC_PKG_CHECK([snap-server], [],
                    [MONITORING_PKG="$MONITORING_PKG snap-server"])
+  AC_GHC_PKG_CHECK([process], [],
+                   [MONITORING_PKG="$MONITORING_PKG process"])
+  MONITORING_DEP=
+  if test "$has_confd" = False; then
+    MONITORING_DEP="$MONITORING_DEP confd"
+  fi
+  has_monitoring_pkg=False
   if test -z "$MONITORING_PKG"; then
-    has_monitoring=True
+    has_monitoring_pkg=True
   elif test "$enable_monitoring" = check; then
     AC_MSG_WARN(m4_normalize([The required extra libraries for the monitoring
                               daemon were not found ($MONITORING_PKG),
@@ -577,9 +571,23 @@ if test "$enable_monitoring" != no; then
                                  required libraries were not found:
                                  $MONITORING_PKG]))
   fi
+  has_monitoring_dep=False
+  if test -z "$MONITORING_DEP"; then
+    has_monitoring_dep=True
+  elif test "$enable_monitoring" = check; then
+    AC_MSG_WARN(m4_normalize([The optional Ganeti components required for the
+                              monitoring agent were not enabled
+                              ($MONITORING_DEP), monitoring disabled]))
+  else
+    AC_MSG_FAILURE(m4_normalize([The monitoring functionality was requested, but
+                                 required optional Ganeti components were not
+                                 found: $MONITORING_DEP]))
+  fi
+
 fi
-if test "$has_monitoring" = True; then
-  AC_MSG_NOTICE([Enabling the monitoring daemon usage])
+if test "$has_monitoring_pkg" = True -a "$has_monitoring_dep" = True; then
+  has_monitoring=True
+  AC_MSG_NOTICE([Enabling the monitoring agent usage])
 fi
 AC_SUBST(ENABLE_MOND, $has_monitoring)
 AM_CONDITIONAL([ENABLE_MOND], [test "$has_monitoring" = True])
@@ -596,6 +604,8 @@ AC_GHC_PKG_CHECK([temporary], [], [HS_NODEV=1])
 #        of the checks.
 AC_GHC_PKG_CHECK([attoparsec], [], [HS_NODEV=1])
 AC_GHC_PKG_CHECK([vector], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([process], [],
+                 [MONITORING_PKG="$MONITORING_PKG process"])
 if test -n "$HS_NODEV"; then
    AC_MSG_WARN(m4_normalize([Required development modules were not found,
                              you won't be able to run Haskell unittests]))
@@ -757,10 +767,26 @@ AC_PYTHON_MODULE(pyinotify, t)
 AC_PYTHON_MODULE(pycurl, t)
 AC_PYTHON_MODULE(bitarray, t)
 AC_PYTHON_MODULE(ipaddr, t)
-AC_PYTHON_MODULE(yaml, t)
+AC_PYTHON_MODULE(mock)
 AC_PYTHON_MODULE(affinity)
 AC_PYTHON_MODULE(paramiko)
 
+# Development-only Python modules
+PY_NODEV=
+AC_PYTHON_MODULE(yaml)
+if test $HAVE_PYMOD_YAML == "no"; then
+  PY_NODEV="$PY_NODEV yaml"
+fi
+
+if test -n "$PY_NODEV"; then
+  AC_MSG_WARN(m4_normalize([Required development modules ($PY_NODEV) were not
+                            found, you won't be able to run Python unittests]))
+else
+   AC_MSG_NOTICE([Python development modules found, unittests enabled])
+fi
+AC_SUBST(PY_NODEV)
+AM_CONDITIONAL([PY_NODEV], [test -n $PY_NODEV])
+
 AC_CONFIG_FILES([ Makefile ])
 
 AC_OUTPUT