]> git.ipfire.org Git - thirdparty/lldpd.git/blame - m4/json-c.m4
tests: fix when Dot3 is not enabled
[thirdparty/lldpd.git] / m4 / json-c.m4
CommitLineData
8ff14a6d
MS
1#
2# lldp_CHECK_JSONC
3#
4
5AC_DEFUN([lldp_CHECK_JSONC], [
fa9b12c5
VB
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 ],[
f4a0a3fc 14 PKG_CHECK_MODULES([JSONC], [json >= 0.10], [
fa9b12c5
VB
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
8ff14a6d 28])