imv-swid: Use pkg-config to check for libjson-c
The package/library is called libjson-c on recent distributions. Some like Ubuntu 14.04 provide symlinks with the old name but these will eventually disappear. Using pkg-config allows us to easily check for it (with a fallback) and configure the proper compiler flags. Fixes #663.
This commit is contained in:
+4
-2
@@ -876,8 +876,10 @@ if test x$tss = xtrousers; then
|
||||
fi
|
||||
|
||||
if test x$imv_swid = xtrue; then
|
||||
AC_CHECK_LIB([json],[main],[LIBS="$LIBS"],[AC_MSG_ERROR([JSON library libjson not found])],[])
|
||||
AC_CHECK_HEADER([json/json.h],,[AC_MSG_ERROR([JSON header json/json.h not found!])])
|
||||
PKG_CHECK_MODULES(json, [json-c], [],
|
||||
[PKG_CHECK_MODULES(json, [json])])
|
||||
AC_SUBST(json_CFLAGS)
|
||||
AC_SUBST(json_LIBS)
|
||||
fi
|
||||
|
||||
if test x$dumm = xtrue; then
|
||||
|
||||
Reference in New Issue
Block a user