From: Dennis Stosberg Date: Fri, 07 Jul 2006 16:26:40 GMT Subject: [PATCH 2/4] configure: Add test for Python Message-ID: <20060707162640.25746.45482.stgit@leonov.stosberg.net> In-Reply-To: <20060707162513.25746.57374.stgit@leonov.stosberg.net> From: Dennis Stosberg The test tries to find the path to a suitable Python binary. The user can override the auto-detection with the --python parameter or with the PYTHON environment variable. Signed-off-by: Dennis Stosberg --- config-lib.sh | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/config-lib.sh b/config-lib.sh index 34dfc05..3968245 100755 --- a/config-lib.sh +++ b/config-lib.sh @@ -259,6 +259,9 @@ process_params() { _perl= test "$PERL" && _perl="$PERL" + _python= + test "$PYTHON" && _python="$PYTHON" + for ac_option do case "$ac_option" in --help|-help|-h) @@ -282,6 +285,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 @@ -318,6 +322,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=*) @@ -445,6 +451,28 @@ EOF die "your perl is too old. Perl 5.6.0 or newer is required." fi echores "$_perl_version" + + echocheck "for python" + for _py_bin in python python2.4 python2.3; do + test "$_python" && continue + + _candidate=`path_find $_py_bin` + test "$_candidate" || continue + + $_candidate - < config.mak.autogen