]> git.ipfire.org Git - thirdparty/lldpd.git/blob - m4/jansson.m4
Merge pull request #109 from commodo/add-custom-tlvs
[thirdparty/lldpd.git] / m4 / jansson.m4
1 #
2 # lldp_CHECK_JANSSON
3 #
4
5 AC_DEFUN([lldp_CHECK_JANSSON], [
6 if test x"$with_json" = x"auto" -o x"$with_json" = x"jansson"; then
7 PKG_CHECK_MODULES([JANSSON], [jansson >= 2], [
8 AC_SUBST([JANSSON_LIBS])
9 AC_SUBST([JANSSON_CFLAGS])
10 AC_DEFINE_UNQUOTED([USE_JSON], 1, [Define to indicate to enable JSON support])
11 AC_DEFINE_UNQUOTED([USE_JANSSON], 1, [Define to indicate to enable JSON support through jansson])
12 with_json=jansson
13 ],[
14 if test x"$with_json" = x"jansson"; then
15 AC_MSG_ERROR([*** unable to find libjansson])
16 fi
17 with_json=no
18 ])
19 fi
20 ])