From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: comparing version strings in configure/make Date: Mon, 12 Apr 2021 11:27:19 -0400 Message-ID: References: <20210411184852.32489.64394@vcs0.savannah.gnu.org> <20210411184854.3C9A320AE6@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11584"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: Philipp Stephani To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 12 17:30:17 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVyW1-0002tH-4H for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Apr 2021 17:30:17 +0200 Original-Received: from localhost ([::1]:34776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVyW0-0000po-4x for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Apr 2021 11:30:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVyTE-0006u1-UW for emacs-devel@gnu.org; Mon, 12 Apr 2021 11:27:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56818) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVyTE-0004c1-Lo; Mon, 12 Apr 2021 11:27:24 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1lVyT9-00075w-Nj; Mon, 12 Apr 2021 11:27:20 -0400 X-Spook: Transportation security 22nd SAS Mole rs9512c industrial X-Ran: %5\l'e/6KTA&-jzP.@%|Vi=1_!{T=s|mPBx6Pdc<%.\?>omW}R"+ X-Hue: brightcyan X-Attribution: GM In-Reply-To: <20210411184854.3C9A320AE6@vcs0.savannah.gnu.org> (Philipp Stephani's message of "Sun, 11 Apr 2021 14:48:53 -0400 (EDT)") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267965 Archived-At: I saw 9a57897e and wondered if there was a standard way to compare versions in make/configure. Apparently there is https://www.gnu.org/software/autoconf-archive/ax_compare_version.html I don't know if it is worth adding that to Emacs's m4/ directory? Although if doing this kind of thing in autoconf, using a case statement, as done in Emacs's configure.ac for eg GNU make and makeinfo, usually works fine. > branch: master > commit 9a57897ea1a125782ff332814d3f978c38162cf8 > Don't attempt to generate Seccomp filter file in Linux < 4.14. > --- a/lib-src/Makefile.in > +++ b/lib-src/Makefile.in > @@ -196,9 +196,15 @@ LIBSECCOMP_CFLAGS=@LIBSECCOMP_CFLAGS@ > # Currently, we can only generate seccomp filter files for x86-64. > ifeq ($(HAVE_LIBSECCOMP),yes) > ifeq ($(shell uname -m),x86_64) > +# We require SECCOMP_RET_KILL_PROCESS, which is only available in > +# Linux 4.14 and later. > +ifeq ($(shell { echo 4.14; uname -r | cut -d . -f 1-2; } | \ > + sort -C -t . -n -k 1,1 -k 2,2 && \ > + echo 1),1)