]> git.ipfire.org Git - thirdparty/lldpd.git/blob - m4/json-c.m4
osx: update Homebrew recipe
[thirdparty/lldpd.git] / m4 / json-c.m4
1 #
2 # lldp_CHECK_JSONC
3 #
4
5 AC_DEFUN([lldp_CHECK_JSONC], [
6 if test x"$with_json" = x"auto" -o x"$with_json" = x"json-c"; then
7 PKG_CHECK_MODULES([JSONC], [json-c], [
8 AC_SUBST([JSONC_LIBS])
9 AC_SUBST([JSONC_CFLAGS])
10 AC_DEFINE_UNQUOTED([USE_JSON], 1, [Define to indicate to enable JSON support])
11 AC_DEFINE_UNQUOTED([USE_JSONC], 1, [Define to indicate to enable JSON via json-c support])
12 with_json=json-c
13 ],[
14 PKG_CHECK_MODULES([JSONC], [json >= 0.10], [
15 AC_SUBST([JSONC_LIBS])
16 AC_SUBST([JSONC_CFLAGS])
17 AC_DEFINE_UNQUOTED([USE_JSON], 1, [Define to indicate to enable JSON support])
18 AC_DEFINE_UNQUOTED([USE_JSONC], 1, [Define to indicate to enable JSON via json-c support])
19 with_json=json-c
20 ],[
21 if test x"$with_json" = x"json-c"; then
22 AC_MSG_ERROR([*** unable to find json-c])
23 fi
24 with_json=no
25 ])
26 ])
27 fi
28 ])