mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 15:33:56 +00:00
configure: Auto pick-up the correct json env
Fix the code to allow Quagga to automatically compile with the correct json library. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
3721995872
commit
112072ac87
@ -52,8 +52,6 @@ dnl XXX add --pkgsrcrcdir to autoconf standard directory list somehow
|
|||||||
AC_SUBST(pkgsrcdir)
|
AC_SUBST(pkgsrcdir)
|
||||||
AC_SUBST(pkgsrcrcdir)
|
AC_SUBST(pkgsrcrcdir)
|
||||||
|
|
||||||
LIBS="$LIBS -L/usr/include/json/ -ljson-c"
|
|
||||||
|
|
||||||
dnl ------------
|
dnl ------------
|
||||||
dnl Check CFLAGS
|
dnl Check CFLAGS
|
||||||
dnl ------------
|
dnl ------------
|
||||||
@ -323,6 +321,12 @@ AC_ARG_ENABLE(werror,
|
|||||||
AC_ARG_ENABLE(cumulus,
|
AC_ARG_ENABLE(cumulus,
|
||||||
AS_HELP_STRING([--enable-cumulus], [enable Cumulus Switch Special Extensions]))
|
AS_HELP_STRING([--enable-cumulus], [enable Cumulus Switch Special Extensions]))
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS(json-c/json.h)
|
||||||
|
AC_CHECK_LIB(json-c, json_object_get, LIBS="$LIBS -ljson-c")
|
||||||
|
if test $ac_cv_lib_json_c_json_object_get = no; then
|
||||||
|
AC_MSG_ERROR([lib json is needed to compile])
|
||||||
|
fi
|
||||||
|
|
||||||
if test x"${enable_gcc_rdynamic}" != x"no" ; then
|
if test x"${enable_gcc_rdynamic}" != x"no" ; then
|
||||||
if test x"${enable_gcc_rdynamic}" = x"yes" -o x"$COMPILER" = x"GCC"; then
|
if test x"${enable_gcc_rdynamic}" = x"yes" -o x"$COMPILER" = x"GCC"; then
|
||||||
LDFLAGS="${LDFLAGS} -rdynamic"
|
LDFLAGS="${LDFLAGS} -rdynamic"
|
||||||
|
@ -22,7 +22,11 @@
|
|||||||
#ifndef _QUAGGA_JSON_H
|
#ifndef _QUAGGA_JSON_H
|
||||||
#define _QUAGGA_JSON_H
|
#define _QUAGGA_JSON_H
|
||||||
|
|
||||||
|
#if defined(HAVE_JSON_C_JSON_H)
|
||||||
|
#include <json-c/json.h>
|
||||||
|
#else
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int use_json(const int argc, const char *argv[]);
|
extern int use_json(const int argc, const char *argv[]);
|
||||||
extern void json_object_string_add(struct json_object* obj, const char *key,
|
extern void json_object_string_add(struct json_object* obj, const char *key,
|
||||||
|
Loading…
Reference in New Issue
Block a user