From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18828 invoked by alias); 5 May 2008 04:55:09 -0000 Received: (qmail 18820 invoked by uid 22791); 5 May 2008 04:55:08 -0000 X-Spam-Check-By: sourceware.org Received: from igw2.br.ibm.com (HELO igw2.br.ibm.com) (32.104.18.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 05 May 2008 04:54:45 +0000 Received: from mailhub1.br.ibm.com (mailhub1 [9.18.232.109]) by igw2.br.ibm.com (Postfix) with ESMTP id 3D8CA17F41C for ; Mon, 5 May 2008 01:44:30 -0300 (BRST) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.18.232.47]) by mailhub1.br.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m454shih4145326 for ; Mon, 5 May 2008 01:54:43 -0300 Received: from d24av02.br.ibm.com (loopback [127.0.0.1]) by d24av02.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m454sgZs007259 for ; Mon, 5 May 2008 01:54:42 -0300 Received: from [9.8.6.175] ([9.8.6.175]) by d24av02.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m454sfCA007251 for ; Mon, 5 May 2008 01:54:41 -0300 Subject: Re: [RFC][patch 1/9] initial Python support From: Thiago Jung Bauermann To: gdb-patches@sourceware.org In-Reply-To: <20080429155304.288626880@br.ibm.com> References: <20080429155212.444237503@br.ibm.com> <20080429155304.288626880@br.ibm.com> Content-Type: text/plain Date: Mon, 05 May 2008 08:12:00 -0000 Message-Id: <1209963038.25743.14.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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: 2008-05/txt/msg00191.txt.bz2 On Tue, 2008-04-29 at 12:52 -0300, Thiago Jung Bauermann wrote: > There are two caveats with the configure.ac changes: one is that they > trigger a bug in autoconf 2.59 when library names contain a dot > (e.g., libpython2.5). I regenerated the configure script using > autoconf 2.61, but the proper way to fix this at the moment (since we > must use version 2.59) is to backport the fix using the > config/override.m4 mechanism. I didn't look into that yet. With the patch below I was able to work around the bug. It adds a version of autoconf 2.59's AC_ARG_WITH to config/override.m4, with the following fix: # Check whether --with-$1 or --without-$1 was given. -if test "[${with_]m4_bpatsubst([$1], -, _)+set}" = set; then - withval="[$with_]m4_bpatsubst([$1], -, _)" +if test "[${with_]m4_translit([$1], [.-], [__])+set}" = set; then + withval="[$with_]m4_translit([$1], [.-], [__])" The problem affects only the --with-libpython2.5-prefix configure option. Without the fix, configure won't even run to completion because it contains a syntax error (variable name with dot in it). With the fix, configure works, but said configure option doesn't: % ../configure --with-libpython2.5-prefix=/blah configure: error: invalid package name: libpython2.5-prefix I looked into fixing that problem, but this would require overriding _AC_INIT_PARSE_ARGS which is a very big macro in autoconf 2.59. Is it worth doing that? Note that --with-python and --without-python work as expected. > The other caveat is that I had trouble with gnulib configure script > when using this patch. I didn't investigate the issue yet, and to test > this code I removed gnulib from the compilation. Maybe I didn't > regenerate the configure scripts properly. The fix to that is running aclocal with -I gnulib/m4, as Daniel noted on the IRC channel. -- []'s Thiago Jung Bauermann Software Engineer IBM Linux Technology Center diff --git a/config/override.m4 b/config/override.m4 index 592f641..38fc101 100644 --- a/config/override.m4 +++ b/config/override.m4 @@ -189,3 +189,23 @@ if $ac_cache_corrupted; then fi ])# _AC_ARG_VAR_VALIDATE ])]) + +ifelse(m4_PACKAGE_VERSION, [2.59], [ + +# AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE]) +# -------------------------------------------------------------------- +AC_DEFUN([AC_ARG_WITH], +[m4_divert_once([HELP_WITH], [[ +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]]) +m4_divert_once([HELP_WITH], [$2])dnl +# Check whether --with-$1 or --without-$1 was given. +if test "[${with_]m4_translit([$1], [.-], [__])+set}" = set; then + withval="[$with_]m4_translit([$1], [.-], [__])" + $3 +m4_ifvaln([$4], [else + $4])dnl +fi; dnl +])# AC_ARG_WITH +])