Add XEN_CMD to _autoconf.py
authorRené Nussbaumer <rn@google.com>
Thu, 31 May 2012 08:54:13 +0000 (10:54 +0200)
committerRené Nussbaumer <rn@google.com>
Thu, 31 May 2012 09:08:49 +0000 (11:08 +0200)
This is needed so we can specify the xen command upon configure time

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

Makefile.am
configure.ac

index 7a2d359..84605b5 100644 (file)
@@ -1138,6 +1138,7 @@ lib/_autoconf.py: Makefile | lib/.dir
          echo "ENABLE_CONFD = $(ENABLE_CONFD)"; \
          echo "PY_CONFD = $(PY_CONFD)"; \
          echo "HS_CONFD = $(HS_CONFD)"; \
+         echo "XEN_CMD = '$(XEN_CMD)'"; \
        } > $@
 
 lib/_vcsversion.py: Makefile vcs-version | lib/.dir
index f939204..484e2ef 100644 (file)
@@ -98,6 +98,19 @@ 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" || test "$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],