From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dennis Stosberg Subject: [PATCH 2/3] configure: Add test for Python Date: Thu, 6 Jul 2006 14:40:38 +0200 Message-ID: <20060706124038.G20591f4b@leonov.stosberg.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-From: git-owner@vger.kernel.org Thu Jul 06 14:41:00 2006 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FyT9x-0000Tw-Bz for gcvg-git@gmane.org; Thu, 06 Jul 2006 14:40:46 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030233AbWGFMkm (ORCPT ); Thu, 6 Jul 2006 08:40:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965192AbWGFMkl (ORCPT ); Thu, 6 Jul 2006 08:40:41 -0400 Received: from ncs.stosberg.net ([89.110.145.104]:51912 "EHLO ncs.stosberg.net") by vger.kernel.org with ESMTP id S965190AbWGFMkl (ORCPT ); Thu, 6 Jul 2006 08:40:41 -0400 Received: from leonov.stosberg.net (p213.54.86.66.tisdip.tiscali.de [213.54.86.66]) by ncs.stosberg.net (Postfix) with ESMTP id 0BB8FAEBA004 for ; Thu, 6 Jul 2006 14:40:34 +0200 (CEST) Received: by leonov.stosberg.net (Postfix, from userid 500) id E0E17103BA7; Thu, 6 Jul 2006 14:40:38 +0200 (CEST) To: git@vger.kernel.org Content-Disposition: inline Received: from leonov ([unix socket]) by leonov (Cyrus v2.1.18-IPv6-Debian-2.1.18-1+sarge2) with LMTP; Thu, 06 Jul 2006 14:18:52 +0200 X-Sieve: CMU Sieve 2.2 User-Agent: mutt-ng/devel-r802 (Debian) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: 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 - <