aboutsummaryrefslogtreecommitdiffstats
path: root/tools/configure
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-02-13 16:06:57 +0000
committerIan Jackson <Ian.Jackson@eu.citrix.com>2013-02-22 17:16:35 +0000
commit13dd8043cda1efeb683a05b995cb134e9662b87b (patch)
tree9e2150774f6eff6e80d422d9226034a91e54ff2a /tools/configure
parent2393441e5808b5ac4d76510560b3200c91f67409 (diff)
downloadxen-13dd8043cda1efeb683a05b995cb134e9662b87b.tar.gz
xen-13dd8043cda1efeb683a05b995cb134e9662b87b.tar.bz2
xen-13dd8043cda1efeb683a05b995cb134e9662b87b.zip
tools/flask: add FLASK policy to build
This patch enables the compilation of the FLASK policy as part of the tools build if the needed prerequisites are present. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/configure')
-rwxr-xr-xtools/configure143
1 files changed, 143 insertions, 0 deletions
diff --git a/tools/configure b/tools/configure
index 66d588a1f8..068fb75128 100755
--- a/tools/configure
+++ b/tools/configure
@@ -620,6 +620,7 @@ GREP
CPP
pyconfig
PYTHONPATH
+CHECKPOLICY
OCAMLFIND
OCAMLBUILD
OCAMLDOC
@@ -667,6 +668,7 @@ rombios
ovmf
lomount
miniterm
+xsmpolicy
ocamltools
xenapi
monitors
@@ -724,6 +726,7 @@ enable_githttp
enable_monitors
enable_xenapi
enable_ocamltools
+enable_xsmpolicy
enable_miniterm
enable_lomount
enable_ovmf
@@ -1382,6 +1385,7 @@ Optional Features:
is ENABLED)
--enable-xenapi Enable Xen API Bindings (default is DISABLED)
--disable-ocamltools Disable Ocaml tools (default is ENABLED)
+ --disable-xsmpolicy Disable XSM policy compilation (default is ENABLED)
--enable-miniterm Enable miniterm (default is DISABLED)
--enable-lomount Enable lomount (default is DISABLED)
--enable-ovmf Enable OVMF (default is DISABLED)
@@ -2308,6 +2312,8 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
#
@@ -2488,6 +2494,29 @@ ocamltools=$ax_cv_ocamltools
+# Check whether --enable-xsmpolicy was given.
+if test "${enable_xsmpolicy+set}" = set; then :
+ enableval=$enable_xsmpolicy;
+fi
+
+
+if test "x$enable_xsmpolicy" = "xno"; then :
+
+ ax_cv_xsmpolicy="n"
+
+elif test "x$enable_xsmpolicy" = "xyes"; then :
+
+ ax_cv_xsmpolicy="y"
+
+elif test -z $ax_cv_xsmpolicy; then :
+
+ ax_cv_xsmpolicy="y"
+
+fi
+xsmpolicy=$ax_cv_xsmpolicy
+
+
+
# Check whether --enable-miniterm was given.
if test "${enable_miniterm+set}" = set; then :
enableval=$enable_miniterm;
@@ -4904,6 +4933,120 @@ fi
fi
fi
+if test "x$xsmpolicy" = "xy"; then :
+
+ # check for a checkpolicy binary with support for -t xen
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}checkpolicy", so it can be a program name with args.
+set dummy ${ac_tool_prefix}checkpolicy; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CHECKPOLICY+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CHECKPOLICY"; then
+ ac_cv_prog_CHECKPOLICY="$CHECKPOLICY" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CHECKPOLICY="${ac_tool_prefix}checkpolicy"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CHECKPOLICY=$ac_cv_prog_CHECKPOLICY
+if test -n "$CHECKPOLICY"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECKPOLICY" >&5
+$as_echo "$CHECKPOLICY" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CHECKPOLICY"; then
+ ac_ct_CHECKPOLICY=$CHECKPOLICY
+ # Extract the first word of "checkpolicy", so it can be a program name with args.
+set dummy checkpolicy; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CHECKPOLICY+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CHECKPOLICY"; then
+ ac_cv_prog_ac_ct_CHECKPOLICY="$ac_ct_CHECKPOLICY" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CHECKPOLICY="checkpolicy"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CHECKPOLICY=$ac_cv_prog_ac_ct_CHECKPOLICY
+if test -n "$ac_ct_CHECKPOLICY"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CHECKPOLICY" >&5
+$as_echo "$ac_ct_CHECKPOLICY" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CHECKPOLICY" = x; then
+ CHECKPOLICY="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CHECKPOLICY=$ac_ct_CHECKPOLICY
+ fi
+else
+ CHECKPOLICY="$ac_cv_prog_CHECKPOLICY"
+fi
+
+
+ if test "$CHECKPOLICY" != "no"; then
+ CHECKPOLICYHELP=`$CHECKPOLICY -h | grep xen`
+ if test "$CHECKPOLICYHELP" = ""; then
+ CHECKPOLICY=no
+ fi
+ fi
+
+ if test "x$CHECKPOLICY" = "xno"; then :
+
+ if test "x$enable_xsmpolicy" = "xyes"; then :
+
+ as_fn_error $? "XSM policy compilation enabled, but unable to find checkpolicy" "$LINENO" 5
+fi
+ xsmpolicy="n"
+
+fi
+
+fi
# Extract the first word of "bash", so it can be a program name with args.
set dummy bash; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5