From f185a527caf966e10538d342eb677ccc4875200c Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 31 Aug 2012 11:13:49 +0100 Subject: tools: remove --disable-pythontools option This incorrectly removes the $(PYTHON) variable which is used at build time as well as by the tools. Remove and revisit for 4.3. Signed-off-by: Ian Campbell Acked-by: Ian Jackson Committed-by: Ian Campbell --- config/Tools.mk.in | 1 - tools/Makefile | 4 +- tools/configure | 168 ++++++++++++++++++++++------------------------------- tools/configure.ac | 21 +++---- 4 files changed, 80 insertions(+), 114 deletions(-) diff --git a/config/Tools.mk.in b/config/Tools.mk.in index b6bdad0915..21ad0ef270 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -45,7 +45,6 @@ GIT_HTTP := @githttp@ XENSTAT_XENTOP := @monitors@ VTPM_TOOLS := @vtpm@ LIBXENAPI_BINDINGS := @xenapi@ -PYTHON_TOOLS := @pythontools@ OCAML_TOOLS := @ocamltools@ CONFIG_MINITERM := @miniterm@ CONFIG_LOMOUNT := @lomount@ diff --git a/tools/Makefile b/tools/Makefile index 9b096632f0..d8c8cc0786 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -48,8 +48,8 @@ SUBDIRS-$(CONFIG_TESTS) += tests # These don't cross-compile ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) -SUBDIRS-$(PYTHON_TOOLS) += python -SUBDIRS-$(PYTHON_TOOLS) += pygrub +SUBDIRS-y += python +SUBDIRS-y += pygrub SUBDIRS-$(OCAML_TOOLS) += ocaml endif diff --git a/tools/configure b/tools/configure index 6107d88d12..8368e2cff4 100755 --- a/tools/configure +++ b/tools/configure @@ -664,7 +664,6 @@ ovmf lomount miniterm ocamltools -pythontools xenapi vtpm monitors @@ -722,7 +721,6 @@ enable_githttp enable_monitors enable_vtpm enable_xenapi -enable_pythontools enable_ocamltools enable_miniterm enable_lomount @@ -1383,7 +1381,6 @@ Optional Features: --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) @@ -2486,29 +2483,6 @@ xenapi=$ax_cv_xenapi -# Check whether --enable-pythontools was given. -if test "${enable_pythontools+set}" = set; then : - enableval=$enable_pythontools; -fi - - -if test "x$enable_pythontools" = "xno"; then : - - ax_cv_pythontools="n" - -elif test "x$enable_pythontools" = "xyes"; then : - - ax_cv_pythontools="y" - -elif test -z $ax_cv_pythontools; then : - - ax_cv_pythontools="y" - -fi -pythontools=$ax_cv_pythontools - - - # Check whether --enable-ocamltools was given. if test "${enable_ocamltools+set}" = set; then : enableval=$enable_ocamltools; @@ -4897,6 +4871,74 @@ if test x"${BASH}" == x"no" then as_fn_error $? "Unable to find bash, please install bash" "$LINENO" 5 fi +if echo "$PYTHON" | grep -q "^/"; then : + + PYTHONPATH=$PYTHON + PYTHON=`basename $PYTHONPATH` + +elif test -z "$PYTHON"; then : + PYTHON="python" +else + as_fn_error $? "PYTHON specified, but is not an absolute path" "$LINENO" 5 +fi +# Extract the first word of "$PYTHON", so it can be a program name with args. +set dummy $PYTHON; 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_path_PYTHONPATH+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHONPATH in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHONPATH="$PYTHONPATH" # Let the user override the test with a path. + ;; + *) + 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_path_PYTHONPATH="$as_dir/$ac_word$ac_exec_ext" + $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 + + test -z "$ac_cv_path_PYTHONPATH" && ac_cv_path_PYTHONPATH="no" + ;; +esac +fi +PYTHONPATH=$ac_cv_path_PYTHONPATH +if test -n "$PYTHONPATH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHONPATH" >&5 +$as_echo "$PYTHONPATH" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test x"${PYTHONPATH}" == x"no" +then + as_fn_error $? "Unable to find $PYTHON, please install $PYTHON" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.3 " >&5 +$as_echo_n "checking for python version >= 2.3 ... " >&6; } +`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 3)"))'` +if test "$?" != "0" +then + python_version=`$PYTHON -V 2>&1` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "$python_version is too old, minimum required version is 2.3" "$LINENO" 5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5295,76 +5337,6 @@ fi done -if test "x$pythontools" = "xy"; then : - - if echo "$PYTHON" | grep -q "^/"; then : - - PYTHONPATH=$PYTHON - PYTHON=`basename $PYTHONPATH` - -elif test -z "$PYTHON"; then : - PYTHON="python" -else - as_fn_error $? "PYTHON specified, but is not an absolute path" "$LINENO" 5 -fi - # Extract the first word of "$PYTHON", so it can be a program name with args. -set dummy $PYTHON; 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_path_PYTHONPATH+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PYTHONPATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHONPATH="$PYTHONPATH" # Let the user override the test with a path. - ;; - *) - 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_path_PYTHONPATH="$as_dir/$ac_word$ac_exec_ext" - $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 - - test -z "$ac_cv_path_PYTHONPATH" && ac_cv_path_PYTHONPATH="no" - ;; -esac -fi -PYTHONPATH=$ac_cv_path_PYTHONPATH -if test -n "$PYTHONPATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHONPATH" >&5 -$as_echo "$PYTHONPATH" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test x"${PYTHONPATH}" == x"no" -then - as_fn_error $? "Unable to find $PYTHON, please install $PYTHON" "$LINENO" 5 -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.3 " >&5 -$as_echo_n "checking for python version >= 2.3 ... " >&6; } -`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 3)"))'` -if test "$?" != "0" -then - python_version=`$PYTHON -V 2>&1` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "$python_version is too old, minimum required version is 2.3" "$LINENO" 5 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi ac_previous_cppflags=$CPPFLAGS ac_previous_ldflags=$LDFLAGS @@ -5496,9 +5468,7 @@ fi CPPFLAGS=$ac_previous_cppflags LDLFAGS=$ac_previous_ldflags - -fi - # Extract the first word of "xgettext", so it can be a program name with args. +# Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } diff --git a/tools/configure.ac b/tools/configure.ac index b41ba9ca71..703a24bf33 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -40,7 +40,6 @@ 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]) @@ -93,17 +92,15 @@ AS_IF([test "x$ocamltools" = "xy"], [ ]) ]) AX_PATH_PROG_OR_FAIL([BASH], [bash]) -AS_IF([test "x$pythontools" = "xy"], [ - AS_IF([echo "$PYTHON" | grep -q "^/"], [ - PYTHONPATH=$PYTHON - PYTHON=`basename $PYTHONPATH` - ],[test -z "$PYTHON"], [PYTHON="python"], - [AC_MSG_ERROR([PYTHON specified, but is not an absolute path])]) - AX_PATH_PROG_OR_FAIL([PYTHONPATH], [$PYTHON]) - AX_CHECK_PYTHON_VERSION([2], [3]) - AX_CHECK_PYTHON_DEVEL() - ]) - AX_PATH_PROG_OR_FAIL([XGETTEXT], [xgettext]) +AS_IF([echo "$PYTHON" | grep -q "^/"], [ + PYTHONPATH=$PYTHON + PYTHON=`basename $PYTHONPATH` +],[test -z "$PYTHON"], [PYTHON="python"], +[AC_MSG_ERROR([PYTHON specified, but is not an absolute path])]) +AX_PATH_PROG_OR_FAIL([PYTHONPATH], [$PYTHON]) +AX_CHECK_PYTHON_VERSION([2], [3]) + AX_CHECK_PYTHON_DEVEL() +AX_PATH_PROG_OR_FAIL([XGETTEXT], [xgettext]) dnl as86, ld86, bcc and iasl are only required when the host system is x86*. dnl "host" here means the platform on which the hypervisor and tools is dnl going to run, not the platform on which we are building (known as -- cgit v1.2.3