Skip to contentSkip to conversation

Use C xenstored with --disable-ocamltools

PATCH In review Olaf Hering 2 participants 2 messages Oct 10, 2014 – Oct 14, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use C xenstored with --disable-ocamltools

When xen is configured with --disable-ocamltools then oxenstored will still be the default if all required ocaml devel packages are installed. The reason is that xenstored.m4 is included before the ocamltools check. And xenstored.m4 does not use the result of --disable-ocamltools.

Rearrange the code to check first for the presence of ocaml, then check --disable-ocamltools and finally decide what sort of xenstored should be the default.

Please rerun autogen.sh after applying this patch.

Cc Ian Campbell <[email protected]>
Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Wei Liu <[email protected]>
---
 m4/xenstored.m4    | 4 ++--
 tools/configure.ac | 9 +++++----
 2 files changed, 7 insertions(+), 6 deletions(-)
m4/xenstored.m4 +2 -2
index 9c31a7f..fb77b4a 100644
@@ -1,5 +1,5 @@
 AC_DEFUN([AX_XEN_OCAML_XENSTORE_CHECK], [
-	AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [
+	AS_IF([test "$ocamltools" = "n"], [
 		AC_MSG_ERROR([Missing ocaml dependencies for oxenstored, try installing ocaml ocaml-compiler-libs ocaml-runtime ocaml-findlib])
 	])
 ])
@@ -7,7 +7,7 @@ AC_DEFUN([AX_XEN_OCAML_XENSTORE_CHECK], [
 AC_DEFUN([AX_XEN_OCAML_XENSTORE_DEFAULTS], [
 	xenstore="oxenstored"
 	xenstored=$sbindir/oxenstored
-	AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [
+	AS_IF([test "$ocamltools" = "n"], [
 		xenstore="xenstored"
 		xenstored=$sbindir/xenstored
 	])
tools/configure.ac +5 -4
index 0fe9f85..dc2e724 100644
@@ -75,7 +75,6 @@ m4_include([../m4/extfs.m4])
 m4_include([../m4/fetcher.m4])
 m4_include([../m4/ax_compare_version.m4])
 m4_include([../m4/paths.m4])
-m4_include([../m4/xenstored.m4])
 m4_include([../m4/systemd.m4])
 
 AX_XEN_EXPAND_CONFIG()
@@ -289,9 +288,6 @@ AX_PATH_PROG_OR_FAIL([PERL], [perl])
 AC_PROG_OCAML
 AC_PROG_FINDLIB
 
-AX_XENSTORE_OPTIONS
-AX_XENSTORE_SET
-
 AS_IF([test "x$ocamltools" = "xy"], [
     AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [
         AS_IF([test "x$enable_ocamltools" = "xyes"], [
@@ -305,6 +301,11 @@ AS_IF([test "x$ocamltools" = "xy"], [
         ])
     ])
 ])
+
+m4_include([../m4/xenstored.m4])
+AX_XENSTORE_OPTIONS
+AX_XENSTORE_SET
+
 AS_IF([test "x$xsmpolicy" = "xy"], [
     AC_PROG_CHECKPOLICY
     AS_IF([test "x$CHECKPOLICY" = "xno"], [
#1 lore raw
Quoted 5 lines · Olaf Hering

When xen is configured with --disable-ocamltools then oxenstored will still be the default if all required ocaml devel packages are installed. The reason is that xenstored.m4 is included before the ocamltools check. And xenstored.m4 does not use the result of --disable-ocamltools.

Quoted 7 lines

Rearrange the code to check first for the presence of ocaml, then check --disable-ocamltools and finally decide what sort of xenstored should be the default.

Please rerun autogen.sh after applying this patch.

Acked + applied.