Subject: bug#49660: 28.0.50; json-available-p should exist

From: Eli Zaretskii <[email-masked]>
Date: Tue, 20 Jul 2021 16:04:25 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Tue, 20 Jul 2021 14:53:00 +0200
> 
> 
> All other libraries like this have an -available-p function, but not
> json.c.
> 
> But json.c is slightly unusual in that it's not compiled at all if
> jansson isn't available, so the function will have to go somewhere else,
> which is rather, er, inconvenient.
> 
> Anybody have an idea how to solve that problem?

Compile json.c always, but have a HAVE_LIBJANSSON preprocessor symbol
that would effectively ifdef away all of json.c except that single
function (and syms_of_json).