From d62396496023907fbec7707b0bfe33bae4686199 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Tue, 10 Apr 2012 20:26:33 +0300 Subject: [PATCH] Re: [PATCH 1/4] Make configure use /bin/bash instead of /bin/sh --- 50/94c55321ee78a8fa4ec098c64e075533c0ba76 | 112 ++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 50/94c55321ee78a8fa4ec098c64e075533c0ba76 diff --git a/50/94c55321ee78a8fa4ec098c64e075533c0ba76 b/50/94c55321ee78a8fa4ec098c64e075533c0ba76 new file mode 100644 index 000000000..45a008f19 --- /dev/null +++ b/50/94c55321ee78a8fa4ec098c64e075533c0ba76 @@ -0,0 +1,112 @@ +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 9CF21431FAF + for ; Tue, 10 Apr 2012 10:26:38 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 4tV0oZ8xkJ2D for ; + Tue, 10 Apr 2012 10:26:36 -0700 (PDT) +Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66]) + by olra.theworths.org (Postfix) with ESMTP id 3393B431FAE + for ; Tue, 10 Apr 2012 10:26:36 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 789A568055; Tue, 10 Apr 2012 20:26:33 +0300 (EEST) +From: Tomi Ollila +To: Vladimir Marek , + Notmuch Mail +Subject: Re: [PATCH 1/4] Make configure use /bin/bash instead of /bin/sh +In-Reply-To: <20120409121930.GA10554@pub.czech.sun.com> +References: <1333966665-10469-1-git-send-email-Vladimir.Marek@oracle.com> + <1333966665-10469-2-git-send-email-Vladimir.Marek@oracle.com> + + <20120409121930.GA10554@pub.czech.sun.com>User-Agent: + Notmuch/0.12+77~gee11800 (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +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: Tue, 10 Apr 2012 17:26:38 -0000 + +On Mon, Apr 09 2012, Vladimir Marek wrote: + +>> > 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##=*} + +According to + +http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html + +all of those are part of Shell Command Language... + +Does the configure script work if you replace /bin/sh with /bin/ksh +in your Solaris box + +If yes, something like the following could be added to the beginning +of 'configure' + +option=option=value +if test ! x"${option$*=}" = x"value" 2>/dev/null; then + if test x"${PREVENT_LOOPING-}" = x; then + PREVENT_LOOPING=true; export PREVENT_LOOPING + test ! -x /bin/ksh || exec /bin/ksh "$0" "$@" + test ! -x /bin/bash || exec /bin/bash "$0" "$@" + fi + echo "Cannot find compatible shell for '$0'" >&2 + exit 1 +fi + + + +> +> 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 +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2