Skip to content

Commit

Permalink
autoconf: jansson is now required
Browse files Browse the repository at this point in the history
Jansson is required by the Suricata Rust support which
will also be mandatory.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/1970
  • Loading branch information
jasonish authored and victorjulien committed Apr 13, 2019
1 parent 6cfc39d commit e49c404
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions configure.ac
Expand Up @@ -889,7 +889,6 @@
fi

# libjansson
enable_jansson="no"
AC_ARG_WITH(libjansson_includes,
[ --with-libjansson-includes=DIR libjansson include directory],
[with_libjansson_includes="$withval"],[with_libjansson_includes=no])
Expand All @@ -901,19 +900,34 @@
CPPFLAGS="${CPPFLAGS} -I${with_libjansson_includes}"
fi

enable_jansson="no"
if test "$with_libjansson_libraries" != "no"; then
LDFLAGS="${LDFLAGS} -L${with_libjansson_libraries}"
fi

AC_CHECK_HEADER(jansson.h,JANSSON="yes",JANSSON="no")
AC_CHECK_LIB(jansson, json_dump_callback,, JANSSON="no")

if test "$JANSSON" = "no"; then
echo ""
echo " ERROR: Jansson is now required."
echo ""
echo " Go get it from your distribution or from:"
echo " http://www.digip.org/jansson/"
echo ""
echo " Ubuntu/Debian: apt install libjansson-dev"
echo " CentOS: yum install jansson-devel"
echo " Fedora: dnf install jansson-devel"
echo ""
exit 1
fi

enable_jansson="yes"
enable_unixsocket="no"

AC_ARG_ENABLE(unix-socket,
AS_HELP_STRING([--enable-unix-socket], [Enable unix socket [default=test]]),[enable_unixsocket="$enableval"],[enable_unixsocket=test])

AC_CHECK_HEADER(jansson.h,JANSSON="yes",JANSSON="no")
if test "$JANSSON" = "yes"; then
if test "$with_libjansson_libraries" != "no"; then
LDFLAGS="${LDFLAGS} -L${with_libjansson_libraries}"
fi

AC_CHECK_LIB(jansson, json_dump_callback,, JANSSON="no")
enable_jansson="yes"
if test "$JANSSON" = "no"; then
echo
Expand Down

0 comments on commit e49c404

Please sign in to comment.