[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: version string comparison
From: |
Nick Bowler |
Subject: |
Re: version string comparison |
Date: |
Sat, 30 Jan 2021 11:19:00 -0500 |
On 2021-01-30, Thien-Thi Nguyen <ttn@gnuvola.org> wrote:
> In GNUnet configure.ac, there is the fragment:
>
> # test for libunistring
> gl_LIBUNISTRING
> AS_IF([test "x$gl_libunistring_hexversion" = "x" || test
> "$gl_libunistring_hexversion" -le 2305],
> [AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1])])
>
> that uses the var ‘gl_libunistring_hexversion’ which is
> undocumented (IIUC). OTOH, var ‘LIBUNISTRING_VERSION’ is
> indeed documented, and has value something like "0.9.10".
>
> Is there any Autoconf support for comparing these two version
> strings: "0.9.1.1" and "0.9.10"?
I think AS_VERSION_COMPARE[1] should do the trick?
[1]
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/autoconf.html#index-AS_005fVERSION_005fCOMPARE
Cheers,
Nick