Skip to content

Commit

Permalink
Merge pull request #280 from vaibhav92/fix_build
Browse files Browse the repository at this point in the history
chilli: Fix a build error with --enable-json
  • Loading branch information
jobezic authored Sep 16, 2016
2 parents a343157 + 56f5c8d commit c7b4cc8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: c
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y gengetopt
- sudo apt-get install -y gengetopt libjson0-dev
- ./bootstrap
script:
- ./configure --enable-largelimits --enable-proxyvsa --enable-miniportal
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ AC_ARG_ENABLE(json, [AS_HELP_STRING([--enable-json],[Enable support for JSON])],

if test x"$enable_json" = xyes; then
AC_DEFINE(ENABLE_JSON,1,[Define to enable Chilli JSON])
AC_CHECK_LIB([json-c], [json_object_new_object],
[AC_SUBST([LIBJSON], ["-ljson-c"])],
[AC_CHECK_LIB([json], [json_object_new_object],
[AC_SUBST([LIBJSON], ["-ljson"])],
[AC_MSG_FAILURE(
[--enable-json was given, but test for libjson failed])],)])
fi

AC_ARG_ENABLE(debug, [AS_HELP_STRING([--disable-debug],[Disable debugging messages])],
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ chilli_query_SOURCES = main-query.c
chilli_opt_SOURCES = main-opt.c

libchilli_la_LIBADD = $(top_builddir)/bstring/libbstring.la
LDADD = libchilli.la ${LIBRT} $(top_builddir)/bstring/libbstring.la
LDADD = libchilli.la ${LIBRT} $(top_builddir)/bstring/libbstring.la ${LIBJSON}

if WITH_MINICONFIG
chilli_opt_SOURCES += cmdline.mini.c
Expand Down

0 comments on commit c7b4cc8

Please sign in to comment.