Added check for searching JSON-C in home directory if not installed
Fixed type
This commit is contained in:
+9
-1
@@ -79,7 +79,15 @@ AS_IF([test "x$enable_json_c" != "xno"], [
|
||||
LDFLAGS="$LDFLAGS $(pkg-config --libs json-c)"
|
||||
AC_CHECK_LIB(json-c, json_object_new_object, AC_DEFINE_UNQUOTED(HAVE_JSON_C, 1, [The JSON-C library is present]))
|
||||
],
|
||||
[])
|
||||
[
|
||||
JSONC_HOME="$HOME/json-c"
|
||||
if test -d "$JSONC_HOME"; then :
|
||||
CFLAGS="$CFLAGS -I $JSONC_HOME"
|
||||
LDFLAGS="$LDFLAGS $JSONC_HOME/.libs/libjson-c.a"
|
||||
AC_MSG_RESULT([Found json-c in $JSONC_HOME])
|
||||
AC_DEFINE_UNQUOTED(HAVE_JSON_C, 1, [The JSON-C library is present])
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
AC_CHECK_LIB(pthread, pthread_setaffinity_np, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETAFFINITY_NP, 1, [libc has pthread_setaffinity_np]))
|
||||
|
||||
@@ -1314,7 +1314,7 @@ static void saveTopStats(FILE *fp, struct top_stats *stats, int direction, u_int
|
||||
}
|
||||
}
|
||||
|
||||
json_object_object_add(jsMain, (direction == DIR_SRC) ? "top.src.pckt.stats" : "top.dst.pckt.stats", jArray_filters);
|
||||
json_object_object_add(jsMain, (direction == DIR_SRC) ? "top.src.pkts.stats" : "top.dst.pkts.stats", jArray_filters);
|
||||
|
||||
/*sort top stats by ip addr count*/
|
||||
HASH_SORT(stats, top_stats_sort);
|
||||
|
||||
Reference in New Issue
Block a user