package/yajl: fix build when explicit link with libm is needed
This change adds another fix to the yajl build-system code.
This patch checks for isnan function in libc, and if not, it makes sure
libm is passed to the linker flags.
This change fixes build failure looking like:
make[3]: Entering directory `/home/peko/autobuild/instance-2/output/build/yajl-2.1.0'
[ 81%] Building C object example/CMakeFiles/parse_config.dir/parse_config.c.o
../yajl-2.1.0/lib/libyajl.so.2.1.0: undefined reference to `__isnan'
../yajl-2.1.0/lib/libyajl.so.2.1.0: undefined reference to `__isinf'
collect2: error: ld returned 1 exit status
make[3]: *** [verify/json_verify] Error 1
Fixes:
http://autobuild.buildroot.org/results/312/
31268e4d20aa34bb90c09aa771b1923f979578ab/
and many others
Cc: Benoît Mauduit <bmauduit@beneth.fr>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Cc: Jörg Krause <joerg.krause@embedded.rocks>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Tested-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>