From: Bruno Haible Date: Tue, 30 Dec 2025 21:09:03 +0000 (+0100) Subject: build: Reject libjson-c versions older than 0.13. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03d7277dec0be51f7b5e6a6499694380aba55c08;p=thirdparty%2Fgettext.git build: Reject libjson-c versions older than 0.13. Reported by Michele Locati in . * DEPENDENCIES: Require libjson-c >= 0.13. * gettext-tools/configure.ac (LIBJSON_C): Reject libjson-c versions older than 0.13. --- diff --git a/DEPENDENCIES b/DEPENDENCIES index 9cdce74b6..278835d3a 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -52,7 +52,7 @@ The following packages should be installed before GNU gettext is installed + If it is installed in a nonstandard directory, pass the option --with-libxml2-prefix=DIR to 'configure'. -* libjson-c +* libjson-c 0.13 or newer + Recommended. Needed for machine translation. If not present, 'spit' will be a Python script instead of an executable. diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 58e59a912..769d2512b 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -477,15 +477,19 @@ AS_IF([test "$MODULA2_CHOICE" != no], ]) AC_SUBST([BUILDMODULA2]) -dnl Check for the libjson-c library. +dnl Check for the libjson-c library, version 0.13 or newer. dnl Set INCJSON_C to the -I option for the include files. dnl Set LIBJSON_C to the -L and -l options for the library. AC_MSG_CHECKING([for the libjson-c library]) LIBJSON_C=? AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include ]], [[]])], + [AC_LANG_PROGRAM( + [[#include + int version_check[2 * (JSON_C_MAJOR_VERSION + (JSON_C_MINOR_VERSION >= 13) > 0) - 1]; + ]], + [[]])], [], - [dnl The include files are not present. + [dnl The include files are not present or are too old. LIBJSON_C= ]) if test "$LIBJSON_C" = "?"; then