From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from re-prd-fep-041.btinternet.com (mailomta5-re.btinternet.com [213.120.69.98]) by sourceware.org (Postfix) with ESMTPS id 028093858C78 for ; Sat, 12 Mar 2022 13:02:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 028093858C78 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk Received: from re-prd-rgout-004.btmx-prd.synchronoss.net ([10.2.54.7]) by re-prd-fep-041.btinternet.com with ESMTP id <20220312130249.XEVG24157.re-prd-fep-041.btinternet.com@re-prd-rgout-004.btmx-prd.synchronoss.net>; Sat, 12 Mar 2022 13:02:49 +0000 Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com; bimi=skipped X-SNCR-Rigid: 613A901C1893AED8 X-Originating-IP: [86.139.156.65] X-OWM-Source-IP: 86.139.156.65 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvvddruddvgedggeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeffkeeigfdujeehteduiefgjeeltdelgeelteekudetfedtffefhfeufefgueettdenucfkphepkeeirddufeelrdduheeirdeiheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddtfegnpdhinhgvthepkeeirddufeelrdduheeirdeihedpmhgrihhlfhhrohhmpehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhnsggprhgtphhtthhopedvpdhrtghpthhtoheprggurghmseguihhnfihoohguihgvrdhorhhgpdhrtghpthhtoheptgihghifihhnqdgrphhpshestgihghifihhnrdgtohhm X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.103] (86.139.156.65) by re-prd-rgout-004.btmx-prd.synchronoss.net (5.8.716.04) (authenticated as jonturney@btinternet.com) id 613A901C1893AED8; Sat, 12 Mar 2022 13:02:49 +0000 Message-ID: <70a9c487-e302-5342-61ce-5b917d089ec6@dronecode.org.uk> Date: Sat, 12 Mar 2022 13:02:39 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH cygport] autotools.cygclass: correctly detect Autoconf 2.70+ Content-Language: en-GB To: Adam Dinwoodie , "cygwin-apps@cygwin.com" References: <20220311090520.5ztk6ybc6fv7oyvd@lucy.dinwoodie.org> <20220311224005.12377-1-adam@dinwoodie.org> From: Jon Turney In-Reply-To: <20220311224005.12377-1-adam@dinwoodie.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1199.7 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KHOP_HELO_FCRDNS, NICE_REPLY_A, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2022 13:02:51 -0000 On 11/03/2022 22:40, Adam Dinwoodie wrote: > The latest version of Autoconf is 2.71, but the version detection > incorrectly considers 2.70 and higher as being the same as 2.59 and > lower for the purposes of specifying documentation directories. Correct > that, and make the version detection a bit more future-proof by parsing > out the actual version parts and performing numeric comparison. > > While we're at it, add a bit more commentary explaining the intent of > the different behaviour over the different Autoconf versions. > --- > cygclass/autotools.cygclass | 34 +++++++++++++++++++++++----------- > 1 file changed, 23 insertions(+), 11 deletions(-) > > diff --git a/cygclass/autotools.cygclass b/cygclass/autotools.cygclass > index cce9be0..2ab5626 100644 > --- a/cygclass/autotools.cygclass > +++ b/cygclass/autotools.cygclass > @@ -619,6 +619,8 @@ cygconf() { > local confdir; > local configure; > local confver; > + local confver_maj; > + local confver_min; > local f; > local foo_config; > local prefix; > @@ -651,6 +653,8 @@ cygconf() { > > configure="${confdir}/configure" > confver=$(grep -m 1 'GNU Autoconf' ${configure} | cut -d ' ' -f 6) > + confver_maj=${confver%%.*} > + confver_min=${confver##*.} > > # AC_CONFIG_FILES should not be dist'ed, but it sometimes happens anyway > eval $(grep -h '^ac_config_files=' ${configure}) > @@ -678,18 +682,26 @@ cygconf() { > confargs+=" --libdir=${prefix}/${MULTILIB_LIBDIR}" > fi > > - case "x${confver}" in > - x2.6[0-9]*) > - confargs+=" --docdir=/usr/share/doc/${PN} --htmldir=/usr/share/doc/${PN}/html" > - ;; > - *) > - confargs+=" --infodir=${prefix}/share/info --mandir=${prefix}/share/man" > - ;; > - esac > + if [ $confver_maj -ge 2 -a $confver_min -ge 60 ] || [ $confver_maj -ge 3 ] Great. Thanks. I think it would be acceptable to error on autoconf >=3.0, rather than assuming it's going to be autoconf 2.6+ compatible.