From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9990 invoked by alias); 20 Dec 2012 15:43:36 -0000 Received: (qmail 9981 invoked by uid 22791); 20 Dec 2012 15:43:35 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from youngberry.canonical.com (HELO youngberry.canonical.com) (91.189.89.112) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 Dec 2012 15:43:29 +0000 Received: from dslb-088-073-099-101.pools.arcor-ip.net ([88.73.99.101] helo=[192.168.42.216]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1TliHQ-0007pI-0g for gdb-patches@sourceware.org; Thu, 20 Dec 2012 15:43:28 +0000 Message-ID: <50D3321C.5030902@ubuntu.com> Date: Thu, 20 Dec 2012 15:43:00 -0000 From: Matthias Klose User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [patch] use python-config if available References: <50D331A6.5070102@ubuntu.com> In-Reply-To: <50D331A6.5070102@ubuntu.com> Content-Type: multipart/mixed; boundary="------------050403040403080600060708" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00751.txt.bz2 This is a multi-part message in MIME format. --------------050403040403080600060708 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Content-length: 339 Am 20.12.2012 16:41, schrieb Matthias Klose: > This patch does use the python-config, which comes shipped with the python > interpreter, and falls back to the internal copy of python-config.py. > AC_CHECK_TOOL is used to find a possible python-config for the host. > > Tested with 7.5 with a native and a cross build. > > Matthias > --------------050403040403080600060708 Content-Type: text/x-diff; name="python-config.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="python-config.patch" Content-length: 1729 Index: b/gdb/configure.ac =================================================================== --- a/gdb/configure.ac 2012-12-20 15:19:47.620663038 +0000 +++ b/gdb/configure.ac 2012-12-20 15:32:59.604669244 +0000 @@ -840,29 +840,31 @@ esac esac + python_config= if test "${python_prog}" != missing; then + AC_CHECK_TOOL(python_config,[${python_prog}-config],[${python_prog} ${srcdir}/python/python-config.py]) # We have a python program to use, but it may be too old. # Don't flag an error for --with-python=auto (the default). have_python_config=yes - python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` + python_includes=`${python_config} --includes` if test $? != 0; then have_python_config=failed if test "${with_python}" != auto; then - AC_ERROR(failure running python-config --includes) + AC_ERROR(failure running ${python-config} --includes) fi fi - python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` + python_libs=`${python_config} --ldflags` if test $? != 0; then have_python_config=failed if test "${with_python}" != auto; then - AC_ERROR(failure running python-config --ldflags) + AC_ERROR(failure running ${python-config} --ldflags) fi fi - python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` + python_prefix=`${python_config} --exec-prefix` if test $? != 0; then have_python_config=failed if test "${with_python}" != auto; then - AC_ERROR(failure running python-config --exec-prefix) + AC_ERROR(failure running ${python-config} --exec-prefix) fi fi else --------------050403040403080600060708--