akheron / jansson

C library for encoding, decoding and manipulating JSON data
http://www.digip.org/jansson/
Other
3.05k stars 809 forks source link

Link to libm when necessary #557

Open reddwarf69 opened 3 years ago

reddwarf69 commented 3 years ago

I have a system where isnan is a macro redirecting to __isnan(), which is only defined in libm.

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-0.6%) to 95.561% when pulling abb80dc5ca05d19eb524b1e09c31e2d024b565d4 on RedDwarf69:isnan_libm into a740f15c17ef7956b1493d8d1f800896c1e60bad on akheron:master.

akheron commented 3 years ago

Would it be enough in your system to use -ljansson -lm?

reddwarf69 commented 3 years ago

Yes, that would work. But if you don't want the patch because it adds complexity for a corner case I will probably just carry the patch locally instead of adding the "fake" direct libm dependency to everything using jansson.

akheron commented 3 years ago

Well, at least it would need to be ported to autoconf also

reddwarf69 commented 3 years ago

I am doing this as paid work and realistically I am not going to do it for autotools any time soon. There is really a need, though? With or without an autotools fix this fixes something for people using CMake. It's not like they generate the same stuff anyway:

Autoconf is all but dead (https://lists.gnu.org/archive/html/autoconf/2021-01/msg00049.html), requiring fixing the autotools build system when fixing the cmake build system is only going to stop people from providing cmake fixes.