From: Florian Forster Date: Tue, 18 Jan 2011 14:54:56 +0000 (+0100) Subject: Build system: Search for and link with libcollectdclient. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0e08ac6d2a622f7103019a6a72822665a9a06a06;p=collection4.git Build system: Search for and link with libcollectdclient. --- diff --git a/configure.ac b/configure.ac index ebbc6c6..e27fd54 100644 --- a/configure.ac +++ b/configure.ac @@ -14,6 +14,7 @@ AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LEX AC_PROG_YACC +PKG_PROG_PKG_CONFIG AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes") # @@ -32,4 +33,8 @@ AC_CHECK_LIB(rrd_th, rrd_graph_v, [], AC_CHECK_LIB(yajl, yajl_gen_alloc, [], [AC_MSG_ERROR(cannot find libyajl.)]) +PKG_CHECK_MODULES([libcollectdclient], [libcollectdclient], + [with_libcollectdclient="yes"], + [with_libcollectdclient="no"]) + AC_OUTPUT(Makefile share/Makefile src/Makefile) diff --git a/src/Makefile.am b/src/Makefile.am index 766331f..9595ebd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,3 +40,5 @@ collection_fcgi_SOURCES = main.c \ utils_array.c utils_array.h \ utils_cgi.c utils_cgi.h \ utils_search.c utils_search.h +collection_fcgi_CFLAGS = $(AM_CFLAGS) $(libcollectdclient_CFLAGS) +collection_fcgi_LDADD = $(libcollectdclient_LIBS)