configure: allow specifying python to use --with-python.
Change-Id: Iba5e5a428a4cd84e6dc149943c033d2c5025ae23 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8327 Reviewed-by: waddlesplash <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
c40570934e
commit
b6554e72fc
@@ -97,6 +97,8 @@ options:
|
|||||||
GDB for each arch we build the cross-tools for.
|
GDB for each arch we build the cross-tools for.
|
||||||
--use-stack-protector Build with stack protection enabled
|
--use-stack-protector Build with stack protection enabled
|
||||||
--efi-signing-key Private keyfile to sign any EFI bootloaders
|
--efi-signing-key Private keyfile to sign any EFI bootloaders
|
||||||
|
--with-python <python> Specify python to use, instead of system
|
||||||
|
default.
|
||||||
|
|
||||||
environment variables:
|
environment variables:
|
||||||
CC The host compiler. Defaults to "gcc".
|
CC The host compiler. Defaults to "gcc".
|
||||||
@@ -831,6 +833,7 @@ while [ $# -gt 0 ] ; do
|
|||||||
HAIKU_EFI_SIGNING_KEY="$2"
|
HAIKU_EFI_SIGNING_KEY="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
--with-python) pythonPath=$2; shift 2;;
|
||||||
*) echo Invalid argument: \`$1\'; exit 1;;
|
*) echo Invalid argument: \`$1\'; exit 1;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -880,7 +883,9 @@ if ! $JAMSHELL -c true; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# locate python
|
# locate python
|
||||||
if python3 --version < /dev/null > /dev/null 2>&1; then
|
if [ -n "$pythonPath" ] && "$pythonPath" --version < /dev/null > /dev/null 2>&1; then
|
||||||
|
HOST_PYTHON="$pythonPath"
|
||||||
|
elif python3 --version < /dev/null > /dev/null 2>&1; then
|
||||||
HOST_PYTHON="python3"
|
HOST_PYTHON="python3"
|
||||||
elif python --version < /dev/null > /dev/null 2>&1; then
|
elif python --version < /dev/null > /dev/null 2>&1; then
|
||||||
HOST_PYTHON="python"
|
HOST_PYTHON="python"
|
||||||
|
|||||||
Reference in New Issue
Block a user