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.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- ran autogen.sh as requested]
This commit is contained in:
Olaf Hering authored and Ian Campbell committed 2014-10-14 10:25:13 +01:00
1 parent 4346115bee
commit d45a0826d0
3 files changed
+78 -76

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
AC_DEFUN([AX_XEN_OCAML_XENSTORE_CHECK], [ 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]) 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], [ AC_DEFUN([AX_XEN_OCAML_XENSTORE_DEFAULTS], [
xenstore="oxenstored" xenstore="oxenstored"
xenstored=$sbindir/oxenstored xenstored=$sbindir/oxenstored
AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [ AS_IF([test "$ocamltools" = "n"], [
xenstore="xenstored" xenstore="xenstored"
xenstored=$sbindir/xenstored xenstored=$sbindir/xenstored
]) ])
+71 -70
View File
@@ -656,8 +656,8 @@ CPP
pyconfig pyconfig
PYTHONPATH PYTHONPATH
CHECKPOLICY CHECKPOLICY
AWK
XENSTORED XENSTORED
AWK
OCAMLFIND OCAMLFIND
OCAMLBUILD OCAMLBUILD
OCAMLDOC OCAMLDOC
@@ -3658,14 +3658,6 @@ esac
# systemd.m4 - Macros to check for and enable systemd -*- Autoconf -*- # systemd.m4 - Macros to check for and enable systemd -*- Autoconf -*-
# #
# Copyright (C) 2014 Luis R. Rodriguez <mcgrof@suse.com> # Copyright (C) 2014 Luis R. Rodriguez <mcgrof@suse.com>
@@ -6138,67 +6130,6 @@ fi
if test "x$XENSTORE" = "x"; then :
# Check whether --with-xenstored was given.
if test "${with_xenstored+set}" = set; then :
withval=$with_xenstored;
if test "x$withval" = "xxenstored"; then :
xenstore=$withval
xenstored=$sbindir/xenstored
fi
if test "x$withval" = "xoxenstored"; then :
xenstore=$withval
xenstored=$sbindir/oxenstored
if test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"; then :
as_fn_error $? "Missing ocaml dependencies for oxenstored, try installing ocaml ocaml-compiler-libs ocaml-runtime ocaml-findlib" "$LINENO" 5
fi
fi
if test "x$withval" != "xoxenstored" && test "x$withval" != "xxenstored"; then :
as_fn_error $? "Unsupported xenstored specified, supported types: oxenstored xenstored" "$LINENO" 5
fi
else
xenstore="oxenstored"
xenstored=$sbindir/oxenstored
if test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"; then :
xenstore="xenstored"
xenstored=$sbindir/xenstored
fi
fi
fi
XENSTORE=$xenstore
if test "x$XENSTORED" = "x"; then :
XENSTORED=$xenstored
fi
for ac_prog in gawk mawk nawk awk for ac_prog in gawk mawk nawk awk
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -6298,6 +6229,76 @@ fi
fi fi
fi fi
if test "x$XENSTORE" = "x"; then :
# Check whether --with-xenstored was given.
if test "${with_xenstored+set}" = set; then :
withval=$with_xenstored;
if test "x$withval" = "xxenstored"; then :
xenstore=$withval
xenstored=$sbindir/xenstored
fi
if test "x$withval" = "xoxenstored"; then :
xenstore=$withval
xenstored=$sbindir/oxenstored
if test "$ocamltools" = "n"; then :
as_fn_error $? "Missing ocaml dependencies for oxenstored, try installing ocaml ocaml-compiler-libs ocaml-runtime ocaml-findlib" "$LINENO" 5
fi
fi
if test "x$withval" != "xoxenstored" && test "x$withval" != "xxenstored"; then :
as_fn_error $? "Unsupported xenstored specified, supported types: oxenstored xenstored" "$LINENO" 5
fi
else
xenstore="oxenstored"
xenstored=$sbindir/oxenstored
if test "$ocamltools" = "n"; then :
xenstore="xenstored"
xenstored=$sbindir/xenstored
fi
fi
fi
XENSTORE=$xenstore
if test "x$XENSTORED" = "x"; then :
XENSTORED=$xenstored
fi
if test "x$xsmpolicy" = "xy"; then : if test "x$xsmpolicy" = "xy"; then :
# check for a checkpolicy binary with support for -t xen # check for a checkpolicy binary with support for -t xen
+5 -4
View File
@@ -75,7 +75,6 @@ m4_include([../m4/extfs.m4])
m4_include([../m4/fetcher.m4]) m4_include([../m4/fetcher.m4])
m4_include([../m4/ax_compare_version.m4]) m4_include([../m4/ax_compare_version.m4])
m4_include([../m4/paths.m4]) m4_include([../m4/paths.m4])
m4_include([../m4/xenstored.m4])
m4_include([../m4/systemd.m4]) m4_include([../m4/systemd.m4])
AX_XEN_EXPAND_CONFIG() AX_XEN_EXPAND_CONFIG()
@@ -268,9 +267,6 @@ AX_PATH_PROG_OR_FAIL([PERL], [perl])
AC_PROG_OCAML AC_PROG_OCAML
AC_PROG_FINDLIB AC_PROG_FINDLIB
AX_XENSTORE_OPTIONS
AX_XENSTORE_SET
AS_IF([test "x$ocamltools" = "xy"], [ AS_IF([test "x$ocamltools" = "xy"], [
AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [ AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [
AS_IF([test "x$enable_ocamltools" = "xyes"], [ AS_IF([test "x$enable_ocamltools" = "xyes"], [
@@ -284,6 +280,11 @@ AS_IF([test "x$ocamltools" = "xy"], [
]) ])
]) ])
]) ])
m4_include([../m4/xenstored.m4])
AX_XENSTORE_OPTIONS
AX_XENSTORE_SET
AS_IF([test "x$xsmpolicy" = "xy"], [ AS_IF([test "x$xsmpolicy" = "xy"], [
AC_PROG_CHECKPOLICY AC_PROG_CHECKPOLICY
AS_IF([test "x$CHECKPOLICY" = "xno"], [ AS_IF([test "x$CHECKPOLICY" = "xno"], [
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.