From: Dennis Stosberg Date: Thu, 06 Jul 2006 12:40:38 GMT Subject: [PATCH 2/3] configure: Add test for Python Message-ID: <20060706124038.G20591f4b@leonov.stosberg.net> The test tries to find the path to a suitable Python binary. It also adds a --python=/path parameter to override the autodetection. Signed-off-by: Dennis Stosberg --- config-lib.sh | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/config-lib.sh b/config-lib.sh index 69999a8..50ad6e9 100755 --- a/config-lib.sh +++ b/config-lib.sh @@ -263,6 +263,7 @@ Installation directories: Miscellaneous options: --cc=COMPILER use this C compiler to build MPlayer [gcc] --perl=PATH path to perl binary [autodetect] + --python=PATH path to python binary [autodetect] --target=PLATFORM target platform (i386-linux, arm-linux, etc) --with-install=PATH use a custom install program (useful if your OS uses a GNU-incompatible install utility by default and @@ -299,6 +300,8 @@ EOF _cc=`echo $ac_option | cut -d '=' -f 2` ;; --perl=*) _perl=`echo $ac_option | cut -d '=' -f 2` ;; + --python=*) + _python=`echo $ac_option | cut -d '=' -f 2` ;; --target=*) _target=`echo $ac_option | cut -d '=' -f 2` ;; --with-install=*) @@ -426,6 +429,24 @@ EOF die "your perl version is too old" fi echores "$_perl_version" + + echocheck "for python" + for __py_bin in python python2.4 python2.3; do + test "$_python" && continue + + __candidate=`which $__py_bin` + test "$__candidate" || continue + + $__candidate - <