Merge branch 'stable-2.6-hotplug' into stable-2.6-ippool-hotplug-esi
[ganeti-local] / configure.ac
index 3dd5b69..a65aa60 100644 (file)
@@ -1,8 +1,8 @@
 # Configure script for Ganeti
 m4_define([gnt_version_major], [2])
-m4_define([gnt_version_minor], [5])
-m4_define([gnt_version_revision], [0])
-m4_define([gnt_version_suffix], [~rc5])
+m4_define([gnt_version_minor], [6])
+m4_define([gnt_version_revision], [1])
+m4_define([gnt_version_suffix], [])
 m4_define([gnt_version_full],
           m4_format([%d.%d.%d%s],
                     gnt_version_major, gnt_version_minor,
@@ -60,6 +60,18 @@ AC_ARG_WITH([os-search-path],
   [os_search_path="'/srv/ganeti/os'"])
 AC_SUBST(OS_SEARCH_PATH, $os_search_path)
 
+# --with-extstorage-search-path=...
+# same black sed magic for quoting of the strings in the list
+AC_ARG_WITH([extstorage-search-path],
+  [AS_HELP_STRING([--with-extstorage-search-path=LIST],
+    [comma separated list of directories to]
+    [ search for External Storage Providers]
+    [ (default is /srv/ganeti/extstorage)]
+  )],
+  [es_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`],
+  [es_search_path="'/srv/ganeti/extstorage'"])
+AC_SUBST(ES_SEARCH_PATH, $es_search_path)
+
 # --with-iallocator-search-path=...
 # do a bit of black sed magic to for quoting of the strings in the list
 AC_ARG_WITH([iallocator-search-path],
@@ -83,21 +95,43 @@ AC_SUBST(XEN_BOOTLOADER, $xen_bootloader)
 # --with-xen-kernel=...
 AC_ARG_WITH([xen-kernel],
   [AS_HELP_STRING([--with-xen-kernel=PATH],
-    [DomU kernel image for Xen hypervisor (default is /boot/vmlinuz-2.6-xenU)]
+    [DomU kernel image for Xen hypervisor (default is /boot/vmlinuz-3-xenU)]
   )],
   [xen_kernel="$withval"],
-  [xen_kernel="/boot/vmlinuz-2.6-xenU"])
+  [xen_kernel="/boot/vmlinuz-3-xenU"])
 AC_SUBST(XEN_KERNEL, $xen_kernel)
 
 # --with-xen-initrd=...
 AC_ARG_WITH([xen-initrd],
   [AS_HELP_STRING([--with-xen-initrd=PATH],
-    [DomU initrd image for Xen hypervisor (default is /boot/initrd-2.6-xenU)]
+    [DomU initrd image for Xen hypervisor (default is /boot/initrd-3-xenU)]
   )],
   [xen_initrd="$withval"],
-  [xen_initrd="/boot/initrd-2.6-xenU"])
+  [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],
+    [Guest kernel image for KVM hypervisor (default is /boot/vmlinuz-3-kvmU)]
+  )],
+  [kvm_kernel="$withval"],
+  [kvm_kernel="/boot/vmlinuz-3-kvmU"])
+AC_SUBST(KVM_KERNEL, $kvm_kernel)
+
 # --with-file-storage-dir=...
 AC_ARG_WITH([file-storage-dir],
   [AS_HELP_STRING([--with-file-storage-dir=PATH],
@@ -213,7 +247,7 @@ AC_ARG_ENABLE([drbd-barriers],
       DRBD_BARRIERS=n
       DRBD_NO_META_FLUSH=False
     else
-      DRBD_BARRIERS=bfd
+      DRBD_BARRIERS=bf
       DRBD_NO_META_FLUSH=True
     fi
   ]],
@@ -270,13 +304,22 @@ AC_ARG_ENABLE([htools-rapi],
 ENABLE_CONFD=
 AC_ARG_ENABLE([confd],
   [AS_HELP_STRING([--enable-confd],
-  [enable the ganeti-confd daemon (default: yes)])],
+  [enable the ganeti-confd daemon (default: python, options haskell/python/no)])],
   [[case "$enableval" in
       no)
         enable_confd=False
+        py_confd=False
+        hs_confd=False
         ;;
-      yes)
+      yes|python)
         enable_confd=True
+        py_confd=True
+        hs_confd=False
+        ;;
+      haskell)
+        enable_confd=True
+        py_confd=False
+        hs_confd=True
         ;;
       *)
         echo "Invalid value for enable-confd '$enableval'"
@@ -284,8 +327,14 @@ AC_ARG_ENABLE([confd],
         ;;
     esac
   ]],
-  [enable_confd=True])
+  [enable_confd=True;py_confd=True;hs_confd=False])
 AC_SUBST(ENABLE_CONFD, $enable_confd)
+AC_SUBST(PY_CONFD, $py_confd)
+AC_SUBST(HS_CONFD, $hs_confd)
+
+AM_CONDITIONAL([WANT_CONFD], [test x$enable_confd = xTrue])
+AM_CONDITIONAL([PY_CONFD], [test x$py_confd = xTrue])
+AM_CONDITIONAL([HS_CONFD], [test x$hs_confd = xTrue])
 
 # --with-disk-separator=...
 AC_ARG_WITH([disk-separator],
@@ -350,6 +399,7 @@ if test -z "$PEP8"
 then
   AC_MSG_WARN([pep8 not found, checking code will not be complete])
 fi
+AM_CONDITIONAL([HAS_PEP8], [test "$PEP8"])
 
 # Check for socat
 AC_ARG_VAR(SOCAT, [socat path])
@@ -359,8 +409,6 @@ then
   AC_MSG_ERROR([socat not found])
 fi
 
-if test "$enable_htools" != "no"; then
-
 # Check for qemu-img
 AC_ARG_VAR(QEMUIMG_PATH, [qemu-img path])
 AC_PATH_PROG(QEMUIMG_PATH, [qemu-img], [])
@@ -369,6 +417,8 @@ then
   AC_MSG_WARN([qemu-img not found, using ovfconverter will not be possible])
 fi
 
+if test "$enable_htools" != "no"; then
+
 # Check for ghc
 AC_ARG_VAR(GHC, [ghc path])
 AC_PATH_PROG(GHC, [ghc], [])
@@ -481,11 +531,25 @@ if test "$HADDOCK" && test "$HSCOLOUR"; then
 fi
 AC_SUBST(HTOOLS_APIDOC)
 
+# Check for hlint
+HLINT=no
+AC_ARG_VAR(HLINT, [hlint path])
+AC_PATH_PROG(HLINT, [hlint], [])
+if test -z "$HLINT"; then
+  AC_MSG_WARN([hlint not found, checking code will not be possible])
+fi
+
 fi # end if enable_htools, define automake conditions
 
+if test "$HTOOLS" != "yes" && test "$HS_CONFD" = "True"; then
+   AC_MSG_ERROR(m4_normalize([cannot enable Haskell version of ganeti-confd if
+                              htools support is not enabled]))
+fi
+
 AM_CONDITIONAL([WANT_HTOOLS], [test x$HTOOLS = xyes])
 AM_CONDITIONAL([WANT_HTOOLSTESTS], [test "x$GHC_PKG_QUICKCHECK" != x])
 AM_CONDITIONAL([WANT_HTOOLSAPIDOC], [test x$HTOOLS_APIDOC = xyes])
+AM_CONDITIONAL([HAS_HLINT], [test "$HLINT"])
 
 # Check for fakeroot
 AC_ARG_VAR(FAKEROOT_PATH, [fakeroot path])