diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-26 00:09:47 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-26 00:09:47 +0200 |
commit | 20fa0cd7f044d3d074e5cb1208409b9dadccb7aa (patch) | |
tree | 1e8b598bf3f5373913533932419e28b7d0d2171b /configure.ac | |
parent | a57f3f0a13d53d8196c3b86fba0bb17d89153c2f (diff) |
check for specific jansson version using pkgconfig
We'll need a feature only available in jansson>=2.3, and it's easier to
check it using pkgconfig.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index 11afa001..f3f7b237 100644 --- a/configure.ac +++ b/configure.ac @@ -152,27 +152,14 @@ AS_IF([test $microhttpd = 0], *** You need libmicrohttpd to build this program. *** ]])]) - -# check for libjansson (Jansson JSON library) jansson=0 -AC_MSG_CHECKING([for jansson]) -AC_ARG_WITH([jansson], - [AS_HELP_STRING([--with-jansson=PFX], [base of jansson installation])], - [AC_MSG_RESULT([given as $with_jansson])], - [AC_MSG_RESULT([not given]) - with_jansson=yes]) -AS_CASE([$with_jansson], - [yes], [], - [no], [AC_MSG_ERROR([--with-jansson is required])], - [LDFLAGS="-L$with_jansson/lib $LDFLAGS" - CPPFLAGS="-I$with_jansson/include $CPPFLAGS"]) -AC_CHECK_LIB(jansson,json_pack, - [AC_CHECK_HEADER([jansson.h],[jansson=1])]) -AS_IF([test $jansson = 0], - [AC_MSG_ERROR([[ +PKG_CHECK_MODULES([JANSSON], [jansson >= 2.3], + [LDFLAGS="$JANSSON_LIBS $LDFLAGS" + CPPFLAGS="$JANSSON_CFLAGS $CPPFLAGS"], + [AC_MSG_ERROR([[ *** *** You need libjansson to build this program. -*** ]])]) +***]])]) # check for libgnurl # libgnurl |