]> git.ipfire.org Git - thirdparty/json-c.git/commit
Link against libm when needed 182/head
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 1 May 2015 10:52:18 +0000 (12:52 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 1 May 2015 11:01:17 +0000 (13:01 +0200)
commit93582ad85ef48c18ac12f00a9a9e124989b1fcab
treef112ba0e43ac6f0b03c88eac76b0c05ed5dc35dd
parent68d856f618fac279f7ff3e7439c90f3ecaee57ad
Link against libm when needed

In certain C libraries (e.g uClibc), isnan() and related functions are
implemented in libm, so json-c needs to link against it. This commit
therefore adds an AC_TRY_LINK() test to check whether a program
calling isnan() can be properly linked with no special flags. If not,
we assume linking against libm is needed.

The json-c.pc.in file is also adjusted so that in the case of static
linking against json-c, -lm is also used.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
configure.ac
json-c.pc.in