diff options
Diffstat (limited to 'unmaintained/captagent/build.patch')
-rw-r--r-- | unmaintained/captagent/build.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/unmaintained/captagent/build.patch b/unmaintained/captagent/build.patch new file mode 100644 index 0000000000..c4976559cc --- /dev/null +++ b/unmaintained/captagent/build.patch @@ -0,0 +1,48 @@ +diff --git a/configure.ac b/configure.ac +index 525738c..4fbfa5b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -147,15 +147,8 @@ fi + AC_CHECK_LIB(expat, XML_ParserCreate, , [AC_MSG_ERROR([captagent requires but cannot find libexpat])]) + AC_CHECK_LIB(pcap, pcap_open_live, ,[AC_CHECK_LIB(wpcap, pcap_open_live, ,[AC_MSG_ERROR([captagent requires but cannot find libpcap])])]) + +-AC_CHECK_LIB(json, json_object_get,[ JSON_LIBS="-ljson" ],[ +-AC_CHECK_LIB(json-c, json_object_get,[ JSON_LIBS="-ljson-c" ],[ +-echo "ERROR: You need libjson to build CaptAgent API module."; +-echo " Verify that you have libjson.a or libjson.so installed"; +-echo " If it is in a different directory, try using"; +-echo " the LDFLAGS to set its proper path."; +-AC_MSG_ERROR([Fatal: libjson not found.])])]) +- +-AC_CHECK_LIB(fl, yywrap, [ FLEX_LIBS="-lfl" ] , [AC_MSG_ERROR([captagent requires but cannot find libfl])]) ++PKG_CHECK_MODULES(JSON, json-c) ++FLEX_LIBS="-lfl" + + AC_SUBST(PTHREAD_LIBS) + AC_SUBST(DL_LIBS) +diff --git a/src/modules/transport/json/Makefile.am b/src/modules/transport/json/Makefile.am +index 5778a67..db5078e 100644 +--- a/src/modules/transport/json/Makefile.am ++++ b/src/modules/transport/json/Makefile.am +@@ -4,7 +4,7 @@ SUBDIRS = . + noinst_HEADERS = transport_json.h + # + transport_json_la_SOURCES = transport_json.c +-transport_json_la_CFLAGS = -Wall ${MODULE_CFLAGS} ++transport_json_la_CFLAGS = -Wall ${MODULE_CFLAGS} ${JSON_CFLAGS} + transport_json_la_LDFLAGS = -module -avoid-version + transport_json_la_LIBADD = ${PTHREAD_LIBS} ${EXPAT_LIBS} ${JSON_LIBS} + transport_json_laconfdir = $(confdir) +diff --git a/src/modules/transport/json/transport_json.c b/src/modules/transport/json/transport_json.c +index 4c7ed4b..c6d3691 100644 +--- a/src/modules/transport/json/transport_json.c ++++ b/src/modules/transport/json/transport_json.c +@@ -41,7 +41,7 @@ + #include <signal.h> + #include <time.h> + #include <pthread.h> +-#include <json/json.h> ++#include <json.h> + + #ifndef __FAVOR_BSD + #define __FAVOR_BSD |