oauth2: support json.pc and json-c.pc

The only difference is the name of the module and the path to json.h,
which can be found as just json.h when using the -I statements from
the .pc files.
This commit is contained in:
Patrick Ohly 2014-09-08 14:30:04 +02:00
parent 00ff3abbc7
commit bfc60f1784
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,7 @@
PKG_CHECK_MODULES(JSON, [json], HAVE_JSON=yes, HAVE_JSON=no)
# Both json-c.pc (libjson-c-dev on Debian Testing) and json.pc
# (legacy, libjson0-dev on Debian Wheezy and Testing) are okay.
PKG_CHECK_MODULES(JSON, [json], HAVE_JSON=yes,
[PKG_CHECK_MODULES(JSON, [json-c], HAVE_JSON=yes, HAVE_JSON=no)])
def_refresh_token="no"

View File

@ -23,7 +23,7 @@
#include <syncevo/GLibSupport.h>
#include <syncevo/GVariantSupport.h>
#include <syncevo/SoupTransportAgent.h>
#include <json/json.h>
#include <json.h>
#include <syncevo/declarations.h>
SE_BEGIN_CXX