aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/Tools.mk.in2
-rwxr-xr-xtools/configure97
-rw-r--r--tools/configure.ac22
-rw-r--r--tools/m4/disable_feature.m413
-rw-r--r--tools/m4/enable_feature.m413
-rw-r--r--tools/m4/features.m421
6 files changed, 92 insertions, 76 deletions
diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index dad7bd324f..69d5f698ad 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -31,7 +31,7 @@ GIT_HTTP := @githttp@
# Optional components
XENSTAT_XENTOP := @monitors@
VTPM_TOOLS := @vtpm@
-LIBXENAPI_BINDINGS := @xapi@
+LIBXENAPI_BINDINGS := @xenapi@
PYTHON_TOOLS := @pythontools@
OCAML_TOOLS := @ocamltools@
CONFIG_MINITERM := @miniterm@
diff --git a/tools/configure b/tools/configure
index 8649ecfe73..5082a2b5a5 100755
--- a/tools/configure
+++ b/tools/configure
@@ -650,7 +650,7 @@ lomount
miniterm
ocamltools
pythontools
-xapi
+xenapi
vtpm
monitors
githttp
@@ -716,7 +716,7 @@ enable_option_checking
enable_githttp
enable_monitors
enable_vtpm
-enable_xapi
+enable_xenapi
enable_pythontools
enable_ocamltools
enable_miniterm
@@ -1364,15 +1364,18 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-githttp Download GIT repositories via HTTP
- --disable-monitors Disable xenstat and xentop monitoring tools
- --enable-vtpm Enable Virtual Trusted Platform Module
- --enable-xapi Enable Xen API Bindings
- --disable-pythontools Disable Python tools
- --disable-ocamltools Disable Ocaml tools
- --enable-miniterm Enable miniterm
- --enable-lomount Enable lomount
- --disable-debug Disable debug build of tools
+ --enable-githttp Download GIT repositories via HTTP (default is
+ DISABLED)
+ --disable-monitors Disable xenstat and xentop monitoring tools (default
+ is ENABLED)
+ --enable-vtpm Enable Virtual Trusted Platform Module (default is
+ DISABLED)
+ --enable-xenapi Enable Xen API Bindings (default is DISABLED)
+ --disable-pythontools Disable Python tools (default is ENABLED)
+ --disable-ocamltools Disable Ocaml tools (default is ENABLED)
+ --enable-miniterm Enable miniterm (default is DISABLED)
+ --enable-lomount Enable lomount (default is DISABLED)
+ --disable-debug Disable debug build of tools (default is ENABLED)
Some influential environment variables:
CC C compiler command
@@ -3844,6 +3847,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)
#
@@ -3909,19 +3914,20 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
# Enable/disable options
+
# Check whether --enable-githttp was given.
if test "${enable_githttp+set}" = set; then :
enableval=$enable_githttp;
fi
-if test "x$enable_githttp" = "xyes"; then :
+if test "x$enable_githttp" = "xno"; then :
- ax_cv_githttp="y"
+ ax_cv_githttp="n"
-elif test "x$enable_githttp" = "xno"; then :
+elif test "x$enable_githttp" = "xyes"; then :
- ax_cv_githttp="n"
+ ax_cv_githttp="y"
elif test -z $ax_cv_githttp; then :
@@ -3930,6 +3936,8 @@ elif test -z $ax_cv_githttp; then :
fi
githttp=$ax_cv_githttp
+
+
# Check whether --enable-monitors was given.
if test "${enable_monitors+set}" = set; then :
enableval=$enable_monitors;
@@ -3951,19 +3959,21 @@ elif test -z $ax_cv_monitors; then :
fi
monitors=$ax_cv_monitors
+
+
# Check whether --enable-vtpm was given.
if test "${enable_vtpm+set}" = set; then :
enableval=$enable_vtpm;
fi
-if test "x$enable_vtpm" = "xyes"; then :
+if test "x$enable_vtpm" = "xno"; then :
- ax_cv_vtpm="y"
+ ax_cv_vtpm="n"
-elif test "x$enable_vtpm" = "xno"; then :
+elif test "x$enable_vtpm" = "xyes"; then :
- ax_cv_vtpm="n"
+ ax_cv_vtpm="y"
elif test -z $ax_cv_vtpm; then :
@@ -3972,26 +3982,30 @@ elif test -z $ax_cv_vtpm; then :
fi
vtpm=$ax_cv_vtpm
-# Check whether --enable-xapi was given.
-if test "${enable_xapi+set}" = set; then :
- enableval=$enable_xapi;
+
+
+# Check whether --enable-xenapi was given.
+if test "${enable_xenapi+set}" = set; then :
+ enableval=$enable_xenapi;
fi
-if test "x$enable_xapi" = "xyes"; then :
+if test "x$enable_xenapi" = "xno"; then :
- ax_cv_xapi="y"
+ ax_cv_xenapi="n"
-elif test "x$enable_xapi" = "xno"; then :
+elif test "x$enable_xenapi" = "xyes"; then :
- ax_cv_xapi="n"
+ ax_cv_xenapi="y"
-elif test -z $ax_cv_xapi; then :
+elif test -z $ax_cv_xenapi; then :
- ax_cv_xapi="n"
+ ax_cv_xenapi="n"
fi
-xapi=$ax_cv_xapi
+xenapi=$ax_cv_xenapi
+
+
# Check whether --enable-pythontools was given.
if test "${enable_pythontools+set}" = set; then :
@@ -4014,6 +4028,8 @@ elif test -z $ax_cv_pythontools; then :
fi
pythontools=$ax_cv_pythontools
+
+
# Check whether --enable-ocamltools was given.
if test "${enable_ocamltools+set}" = set; then :
enableval=$enable_ocamltools;
@@ -4035,19 +4051,21 @@ elif test -z $ax_cv_ocamltools; then :
fi
ocamltools=$ax_cv_ocamltools
+
+
# Check whether --enable-miniterm was given.
if test "${enable_miniterm+set}" = set; then :
enableval=$enable_miniterm;
fi
-if test "x$enable_miniterm" = "xyes"; then :
+if test "x$enable_miniterm" = "xno"; then :
- ax_cv_miniterm="y"
+ ax_cv_miniterm="n"
-elif test "x$enable_miniterm" = "xno"; then :
+elif test "x$enable_miniterm" = "xyes"; then :
- ax_cv_miniterm="n"
+ ax_cv_miniterm="y"
elif test -z $ax_cv_miniterm; then :
@@ -4056,19 +4074,21 @@ elif test -z $ax_cv_miniterm; then :
fi
miniterm=$ax_cv_miniterm
+
+
# Check whether --enable-lomount was given.
if test "${enable_lomount+set}" = set; then :
enableval=$enable_lomount;
fi
-if test "x$enable_lomount" = "xyes"; then :
+if test "x$enable_lomount" = "xno"; then :
- ax_cv_lomount="y"
+ ax_cv_lomount="n"
-elif test "x$enable_lomount" = "xno"; then :
+elif test "x$enable_lomount" = "xyes"; then :
- ax_cv_lomount="n"
+ ax_cv_lomount="y"
elif test -z $ax_cv_lomount; then :
@@ -4077,6 +4097,8 @@ elif test -z $ax_cv_lomount; then :
fi
lomount=$ax_cv_lomount
+
+
# Check whether --enable-debug was given.
if test "${enable_debug+set}" = set; then :
enableval=$enable_debug;
@@ -4104,6 +4126,7 @@ debug=$ax_cv_debug
+
for cflag in $PREPEND_INCLUDES
do
PREPEND_CFLAGS+=" -I$cflag"
diff --git a/tools/configure.ac b/tools/configure.ac
index 3d53a9536d..4d96db0bfc 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -23,8 +23,7 @@ AC_USE_SYSTEM_EXTENSIONS
AC_CANONICAL_HOST
# M4 Macro includes
-m4_include([m4/enable_feature.m4])
-m4_include([m4/disable_feature.m4])
+m4_include([m4/features.m4])
m4_include([m4/path_or_fail.m4])
m4_include([m4/python_version.m4])
m4_include([m4/python_devel.m4])
@@ -36,16 +35,15 @@ m4_include([m4/pkg.m4])
m4_include([m4/curses.m4])
# Enable/disable options
-AX_ARG_ENABLE_AND_EXPORT([githttp], [Download GIT repositories via HTTP])
-AX_ARG_DISABLE_AND_EXPORT([monitors],
- [Disable xenstat and xentop monitoring tools])
-AX_ARG_ENABLE_AND_EXPORT([vtpm], [Enable Virtual Trusted Platform Module])
-AX_ARG_ENABLE_AND_EXPORT([xapi], [Enable Xen API Bindings])
-AX_ARG_DISABLE_AND_EXPORT([pythontools], [Disable Python tools])
-AX_ARG_DISABLE_AND_EXPORT([ocamltools], [Disable Ocaml tools])
-AX_ARG_ENABLE_AND_EXPORT([miniterm], [Enable miniterm])
-AX_ARG_ENABLE_AND_EXPORT([lomount], [Enable lomount])
-AX_ARG_DISABLE_AND_EXPORT([debug], [Disable debug build of tools])
+AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
+AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools])
+AX_ARG_DEFAULT_DISABLE([vtpm], [Enable Virtual Trusted Platform Module])
+AX_ARG_DEFAULT_DISABLE([xenapi], [Enable Xen API Bindings])
+AX_ARG_DEFAULT_ENABLE([pythontools], [Disable Python tools])
+AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
+AX_ARG_DEFAULT_DISABLE([miniterm], [Enable miniterm])
+AX_ARG_DEFAULT_DISABLE([lomount], [Enable lomount])
+AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools])
AC_ARG_VAR([PREPEND_INCLUDES],
[List of include folders to prepend to CFLAGS (without -I)])
diff --git a/tools/m4/disable_feature.m4 b/tools/m4/disable_feature.m4
deleted file mode 100644
index 4e5ceeeae6..0000000000
--- a/tools/m4/disable_feature.m4
+++ /dev/null
@@ -1,13 +0,0 @@
-AC_DEFUN([AX_ARG_DISABLE_AND_EXPORT],
-[AC_ARG_ENABLE([$1],
- AS_HELP_STRING([--disable-$1], [$2]))
-
-AS_IF([test "x$enable_$1" = "xno"], [
- ax_cv_$1="n"
-], [test "x$enable_$1" = "xyes"], [
- ax_cv_$1="y"
-], [test -z $ax_cv_$1], [
- ax_cv_$1="y"
-])
-$1=$ax_cv_$1
-AC_SUBST($1)])
diff --git a/tools/m4/enable_feature.m4 b/tools/m4/enable_feature.m4
deleted file mode 100644
index 054a143f57..0000000000
--- a/tools/m4/enable_feature.m4
+++ /dev/null
@@ -1,13 +0,0 @@
-AC_DEFUN([AX_ARG_ENABLE_AND_EXPORT],
-[AC_ARG_ENABLE([$1],
- AS_HELP_STRING([--enable-$1], [$2]))
-
-AS_IF([test "x$enable_$1" = "xyes"], [
- ax_cv_$1="y"
-], [test "x$enable_$1" = "xno"], [
- ax_cv_$1="n"
-], [test -z $ax_cv_$1], [
- ax_cv_$1="n"
-])
-$1=$ax_cv_$1
-AC_SUBST($1)])
diff --git a/tools/m4/features.m4 b/tools/m4/features.m4
new file mode 100644
index 0000000000..bd672ab8bc
--- /dev/null
+++ b/tools/m4/features.m4
@@ -0,0 +1,21 @@
+AC_DEFUN([AX_ARG_DEFAULT_ENABLE], [
+AC_ARG_ENABLE([$1], AS_HELP_STRING([--disable-$1], [$2 (default is ENABLED)]))
+AX_PARSE_VALUE([$1], [y])
+])
+
+AC_DEFUN([AX_ARG_DEFAULT_DISABLE], [
+AC_ARG_ENABLE([$1], AS_HELP_STRING([--enable-$1], [$2 (default is DISABLED)]))
+AX_PARSE_VALUE([$1], [n])
+])
+
+dnl This function should not be called outside of this file
+AC_DEFUN([AX_PARSE_VALUE], [
+AS_IF([test "x$enable_$1" = "xno"], [
+ ax_cv_$1="n"
+], [test "x$enable_$1" = "xyes"], [
+ ax_cv_$1="y"
+], [test -z $ax_cv_$1], [
+ ax_cv_$1="$2"
+])
+$1=$ax_cv_$1
+AC_SUBST($1)])