mirror of https://github.com/xemu-project/xemu.git
configure: Use -B switch only for Python versions which support it
Commit 1d984a67a9
added the -B switch
unconditionally. This breaks Python versions before 2.6 which don't
support that switch.
Now configure adds -B only if it is accepted by the Python interpreter.
This modification introduces a small incompatibility because -B might now
also be added when configure was called with --python=PYTHON_INTERPRETER.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
485e741cd1
commit
52510f8b2c
|
@ -579,7 +579,7 @@ fi
|
||||||
|
|
||||||
: ${make=${MAKE-make}}
|
: ${make=${MAKE-make}}
|
||||||
: ${install=${INSTALL-install}}
|
: ${install=${INSTALL-install}}
|
||||||
: ${python=${PYTHON-python -B}}
|
: ${python=${PYTHON-python}}
|
||||||
: ${smbd=${SMBD-/usr/sbin/smbd}}
|
: ${smbd=${SMBD-/usr/sbin/smbd}}
|
||||||
|
|
||||||
# Default objcc to clang if available, otherwise use CC
|
# Default objcc to clang if available, otherwise use CC
|
||||||
|
@ -1400,6 +1400,13 @@ if ! $python -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_in
|
||||||
"Use --python=/path/to/python to specify a supported Python."
|
"Use --python=/path/to/python to specify a supported Python."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# The -B switch was added in Python 2.6.
|
||||||
|
# If it is supplied, compiled files are not written.
|
||||||
|
# Use it for Python versions which support it.
|
||||||
|
if $python -B -c 'import sys; sys.exit(0)' 2>/dev/null; then
|
||||||
|
python="$python -B"
|
||||||
|
fi
|
||||||
|
|
||||||
if test -z "${target_list+xxx}" ; then
|
if test -z "${target_list+xxx}" ; then
|
||||||
target_list="$default_target_list"
|
target_list="$default_target_list"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue