From: Vladimir Marek Date: Mon, 9 Apr 2012 12:19:30 +0000 (+0200) Subject: Re: [PATCH 1/4] Make configure use /bin/bash instead of /bin/sh X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=728cb92cbe7617fc8b3bda0499a1c4da9474f7f7;p=notmuch-archives.git Re: [PATCH 1/4] Make configure use /bin/bash instead of /bin/sh --- diff --git a/08/1c521618ac4b4b881dc74e0050807fe8a637b8 b/08/1c521618ac4b4b881dc74e0050807fe8a637b8 new file mode 100644 index 000000000..7d3acdda0 --- /dev/null +++ b/08/1c521618ac4b4b881dc74e0050807fe8a637b8 @@ -0,0 +1,98 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 0130C40EC32 + for ; Mon, 9 Apr 2012 05:20:05 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -4.999 +X-Spam-Level: +X-Spam-Status: No, score=-4.999 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_HI=-5, UNPARSEABLE_RELAY=0.001] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 6-xEJTBh-dZf for ; + Mon, 9 Apr 2012 05:20:05 -0700 (PDT) +Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 95B5140EC31 + for ; Mon, 9 Apr 2012 05:20:05 -0700 (PDT) +Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) + by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with + ESMTP id q39CK4FE000413 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) + for ; Mon, 9 Apr 2012 12:20:05 GMT +Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) + by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id + q39CK2Zw008412 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) + for ; Mon, 9 Apr 2012 12:20:04 GMT +Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71]) + by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id + q39CK2Oc003075 + for ; Mon, 9 Apr 2012 07:20:02 -0500 +Received: from pub.czech.sun.com (/10.163.20.32) + by default (Oracle Beehive Gateway v4.0) + with ESMTP ; Mon, 09 Apr 2012 05:20:02 -0700 +Date: Mon, 9 Apr 2012 14:19:30 +0200 +From: Vladimir Marek +To: Notmuch Mail +Subject: Re: [PATCH 1/4] Make configure use /bin/bash instead of /bin/sh +Message-ID: <20120409121930.GA10554@pub.czech.sun.com> +Mail-Followup-To: Notmuch Mail +References: <1333966665-10469-1-git-send-email-Vladimir.Marek@oracle.com> + <1333966665-10469-2-git-send-email-Vladimir.Marek@oracle.com> + +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Disposition: inline +In-Reply-To: + +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Source-IP: acsinet21.oracle.com [141.146.126.237] +X-Auth-Type: Internal IP +X-CT-RefId: str=0001.0A090206.4F82D3F5.0056,ss=1,re=0.000,fgs=0 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 09 Apr 2012 12:20:06 -0000 + +> > Posix /bin/sh is not capable of running this configure and fails. +> +> What fails? What would it take to make this work on posix sh instead? +> +> The tests do require bash, but generally I think it would be preferable to +> not depend on bash to build. + +Well I gave it a quick stab. This is not posix: + +BLAH=$( ... ) +BLAH=$(( ... )) +${option%=*} +${option%%=*} +${option#=*} +${option##=*} + +First two cases are easy to replace by `...` resp `expr ...`. The rest +leads to external utility like sed. The dirtiest part of configure is +parsing the commandline arguments, but that could be replaced by +/usr/bin/getopts. + +If it is appealing way of doing that, I can rework my patch and submit +it for consideration. + +Thank you +-- + Vlad