[-] Make json-c a required library

Already kind of was required, as it was required by Spotify, Chromecast and the web api
This commit is contained in:
ejurgensen 2018-02-22 21:49:11 +01:00
parent cc1785a843
commit b1c9518a78
4 changed files with 15 additions and 19 deletions

View File

@ -72,7 +72,7 @@ sudo yum install \
git automake autoconf gettext-devel gperf gawk libtool \
sqlite-devel libconfuse-devel libunistring-devel mxml-devel libevent-devel \
avahi-devel libgcrypt-devel zlib-devel alsa-lib-devel ffmpeg-devel \
libplist-devel libsodium-devel
libplist-devel libsodium-devel json-c-devel
Clone the forked-daapd repo:
@ -125,7 +125,7 @@ Afterwards, you can optionally install Oracle's newer version, and then
sudo port install \
autoconf automake libtool pkgconfig git gperf libgcrypt \
libunistring libconfuse ffmpeg libevent
libunistring libconfuse ffmpeg libevent json-c
Download, configure, build and install the Mini-XML library:
http://www.msweet.org/projects.php/Mini-XML
@ -144,7 +144,7 @@ Optional features require the following additional ports:
Feature | Configure argument | Ports
--------------------|------------------------|--------------------------------------------
Chromecast | --enable-chromecast | json-c gnutls protobuf-c
Chromecast | --enable-chromecast | gnutls protobuf-c
LastFM | --enable-lastfm | curl
iTunes XML | --disable-itunes | libplist
Device verification | --disable-verification | libplist libsodium

View File

@ -144,6 +144,15 @@ FORK_MODULES_CHECK([FORKED], [LIBEVENT], [libevent >= 2],
[Define to 1 if you have libevent 2 (<2.1.4)])])
])
dnl json-c version checks
FORK_MODULES_CHECK([FORKED], [JSON_C], [json-c],
[json_tokener_parse], [json.h],
[dnl check for old version
PKG_CHECK_EXISTS([json-c >= 0.11], [],
[AC_DEFINE([HAVE_JSON_C_OLD], 1,
[Define to 1 if you have json-c < 0.11])])
])
dnl antlr version checks
FORK_FUNC_REQUIRE([FORKED], [ANTLR3 C runtime], [ANTLR3C], [antlr3c],
[antlr3BaseRecognizerNew], [antlr3.h],
@ -286,19 +295,6 @@ FORK_ARG_WITH_CHECK([FORKED_OPTS], [libevent_pthreads support],
[libevent_pthreads], [LIBEVENT_PTHREADS], [libevent_pthreads],
[evthread_use_pthreads], [event2/thread.h])
dnl Build with json-c
FORK_ARG_WITH_CHECK([FORKED_OPTS], [json-c support], [json], [JSON_C],
[json-c >= 0.11], [json_tokener_parse], [json.h], [],
[FORK_MODULES_CHECK([FORKED_OPTS], [JSON_C], [json],
[json_tokener_parse], [json.h],
[[with_json=yes]
AC_DEFINE([HAVE_JSON_C_OLD], 1,
[Define to 1 if you have json-c < 0.11])],
[AS_IF([[test "x$with_json" != "xcheck"]],
[AC_MSG_FAILURE([[--with-json was given, but test for json-c failed]])])
[with_json=no]]
)])
dnl Build with Avahi (or Bonjour if not)
FORK_ARG_WITH_CHECK([FORKED_OPTS], [Avahi mDNS], [avahi], [AVAHI],
[avahi-client >= 0.6.24], [avahi_client_new], [avahi-client/client.h])

View File

@ -2,7 +2,7 @@
# Credit thorsteneckel who made the how-to that is the basis for this
# script, see https://gist.github.com/thorsteneckel/c0610fb415c8d0486bce
echo "This script will install forked-daapd in FreeBSD 10.1. The script is not"
echo "This script will install forked-daapd in FreeBSD 11.0. The script is not"
echo "very polished, so you might want to look through it before running it."
read -p "Continue? [y/N] " yn
if [ "$yn" != "y" ]; then
@ -11,7 +11,7 @@ fi
DEPS="gmake autoconf automake libtool gettext gperf glib pkgconf wget git \
ffmpeg libconfuse libevent mxml libgcrypt libunistring libiconv \
libplist libinotify avahi sqlite3 alsa-lib libsodium"
libplist libinotify avahi sqlite3 alsa-lib libsodium json-c"
echo "The script can install the following dependency packages for you:"
echo $DEPS
read -p "Should the script install these packages? [y/N] " yn

View File

@ -29,7 +29,7 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <json.h>
#include <regex.h>
#include <stdio.h>
#include <string.h>