configure: try harder to find Python interpreter

Fixes: https://github.com/spdk/spdk/issues/227
Change-Id: If16692589ac6ca7af6de4e28fb48064f3c414739
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Reviewed-on: https://review.gerrithub.io/395529
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Nathan Cutler 2018-01-19 17:03:51 +01:00 committed by Daniel Verkamp
parent f536eb583c
commit 93bd60e0de

13
configure vendored
View File

@ -263,7 +263,18 @@ if [ -n "$VTUNE_SOURCE_DIR" ]; then
echo "VTUNE_SOURCE_DIR?=$VTUNE_SOURCE_DIR" >> CONFIG.local echo "VTUNE_SOURCE_DIR?=$VTUNE_SOURCE_DIR" >> CONFIG.local
fi fi
python scripts/genconfig.py > config.h python_command=
for interpreter in python3 python2 python ; do
type $interpreter > /dev/null 2>&1 || continue
python_command=$interpreter
break
done
if [[ -z "$python_command" ]] ; then
echo "Could not find python interpreter! Bailing out."
exit 1
fi
$python_command scripts/genconfig.py > config.h
echo "done." echo "done."
if [[ "$OSTYPE" == "FreeBSD"* ]]; then if [[ "$OSTYPE" == "FreeBSD"* ]]; then