diff --git a/configure.ac b/configure.ac index 305a1ad0..e5e8e844 100644 --- a/configure.ac +++ b/configure.ac @@ -31,12 +31,16 @@ AC_FUNC_ALLOCA PKG_PROG_PKG_CONFIG() +AC_CHECK_LIB(jansson, json_loads, , + AC_MSG_ERROR([Could not find jansson library - please install libjansson-dev])) + AC_CHECK_HEADERS(stdio.h stdlib.h fcntl.h sys/time.h unistd.h) AC_CHECK_HEADERS(ctype.h errno.h byteswap.h string.h time.h) AC_CHECK_HEADERS(endian.h sys/endian.h arpa/inet.h syslog.h) AC_CHECK_HEADERS(alloca.h pthread.h stdio.h math.h) AC_CHECK_HEADERS(sys/types.h sys/socket.h netdb.h) AC_CHECK_HEADERS(stdint.h netinet/in.h netinet/tcp.h) +AC_CHECK_HEADERS(jansson.h) PTHREAD_LIBS="-lpthread" MATH_LIBS="-lm" diff --git a/src/Makefile.am b/src/Makefile.am index 84729476..c3791a1c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4 lib_LTLIBRARIES = libckpool.la libckpool_la_SOURCES = libckpool.c -libckpool_la_LIBADD = @MATH_LIBS@ @PTHREAD_LIBS@ +libckpool_la_LIBADD = @MATH_LIBS@ @PTHREAD_LIBS@ @JANSSON_LIBS@ bin_PROGRAMS = ckpool ckpool_SOURCES = ckpool.c