mirror of
https://github.com/json-c/json-c.git
synced 2026-04-05 13:29:06 +08:00
Merge pull request #182 from tpetazzoni/libm-fix
Link against libm when needed
This commit is contained in:
@@ -53,6 +53,10 @@ AC_CHECK_DECLS([isinf], [], [], [[#include <math.h>]])
|
|||||||
AC_CHECK_DECLS([_isnan], [], [], [[#include <float.h>]])
|
AC_CHECK_DECLS([_isnan], [], [], [[#include <float.h>]])
|
||||||
AC_CHECK_DECLS([_finite], [], [], [[#include <float.h>]])
|
AC_CHECK_DECLS([_finite], [], [], [[#include <float.h>]])
|
||||||
|
|
||||||
|
if test "$ac_cv_have_decl_isnan" = "yes" ; then
|
||||||
|
AC_TRY_LINK([#include <math.h>], [float f = 0.0; return isnan(f)], [], [LIBS="$LIBS -lm"])
|
||||||
|
fi
|
||||||
|
|
||||||
#check if .section.gnu.warning accepts long strings (for __warn_references)
|
#check if .section.gnu.warning accepts long strings (for __warn_references)
|
||||||
AC_LANG_PUSH([C])
|
AC_LANG_PUSH([C])
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ includedir=@includedir@
|
|||||||
Name: json-c
|
Name: json-c
|
||||||
Description: JSON implementation in C
|
Description: JSON implementation in C
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires:
|
Requires:
|
||||||
|
Libs.private: @LIBS@
|
||||||
Libs: -L${libdir} -ljson-c
|
Libs: -L${libdir} -ljson-c
|
||||||
Cflags: -I${includedir}/json-c
|
Cflags: -I${includedir}/json-c
|
||||||
|
|||||||
Reference in New Issue
Block a user