From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lucy.dinwoodie.org (b.8.0.0.8.9.b.0.2.f.0.9.2.a.d.b.d.a.0.2.5.1.e.d.0.b.8.0.1.0.0.2.ip6.arpa [IPv6:2001:8b0:de15:20ad:bda2:90f2:b98:8b]) by sourceware.org (Postfix) with ESMTPS id F0CE63858D20 for ; Mon, 14 Mar 2022 21:05:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F0CE63858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dinwoodie.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dinwoodie.org Received: from adam by lucy.dinwoodie.org with local (Exim 4.94.2) (envelope-from ) id 1nTrsp-0076CO-42 for cygwin-apps@cygwin.com; Mon, 14 Mar 2022 21:05:39 +0000 Date: Mon, 14 Mar 2022 21:05:39 +0000 From: Adam Dinwoodie To: cygwin-apps@cygwin.com Subject: Re: [PATCH cygport v2] autotools.cygclass: correctly detect Autoconf 2.70+ Message-ID: <20220314210539.inhr45iiryiqkcqd@lucy.dinwoodie.org> Reply-To: cygwin-apps@cygwin.com References: <70a9c487-e302-5342-61ce-5b917d089ec6@dronecode.org.uk> <20220313204403.3372-1-adam@dinwoodie.org> <2d35d2f7-dd39-1cc8-e598-38e14cdd763b@dronecode.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2d35d2f7-dd39-1cc8-e598-38e14cdd763b@dronecode.org.uk> X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RDNS_DYNAMIC, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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: Mon, 14 Mar 2022 21:05:43 -0000 On Mon, Mar 14, 2022 at 07:05:20PM +0000, Jon Turney wrote: > On 13/03/2022 20:44, Adam Dinwoodie wrote: > > configure="${confdir}/configure" > > confver=$(grep -m 1 'GNU Autoconf' ${configure} | cut -d ' ' -f 6) > > + confver_maj=${confver%%.*} > > + confver_min=${confver##*.} > > + if [ $confver_maj -ne 2 ] > > + then > > + error "unexpected autoconf version"; > > + fi > > # AC_CONFIG_FILES should not be dist'ed, but it sometimes happens anyway > > eval $(grep -h '^ac_config_files=' ${configure}) > > When I test this locally, it fails, as (note the full stop at the end of the > line): > > > $ grep -m1 Autoconf configure > > # Generated by GNU Autoconf 2.71. Huh. Apparently that string has a less consistent format than I'd assumed; I'd tested that line against the configure script for Git, but that gets different behaviour: $ grep -m1 Autoconf git-2.35.1-2.x86_64/build/configure # Generated by GNU Autoconf 2.71 for git 2.35.1. I'll try to come up with something a bit less fragile...