[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
comparing version strings in configure/make
From: |
Glenn Morris |
Subject: |
comparing version strings in configure/make |
Date: |
Mon, 12 Apr 2021 11:27:19 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- comparing version strings in configure/make,
Glenn Morris <=