svn merge -r523:547 branches/config-step trunk
[collectd.git] / configure.in
index e97f65a..ac48b82 100644 (file)
@@ -143,6 +143,9 @@ AC_CHECK_HEADERS(sys/loadavg.h)
 AC_CHECK_HEADERS(utmp.h)
 AC_CHECK_HEADERS(utmpx.h)
 
+# For apache plugin
+AC_CHECK_HEADERS(curl/curl.h)
+
 # For quota module
 AC_CHECK_HEADERS(grp.h pwd.h sys/ucred.h)
 AC_CHECK_HEADERS(ctype.h)
@@ -309,6 +312,24 @@ AC_CHECK_LIB(resolv, res_search,
 [with_libresolv="no"])
 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
 
+with_libcurl="yes"
+AC_CHECK_LIB(curl, curl_easy_init,
+[
+       AC_DEFINE(HAVE_LIBCURL, 1, [Define to 1 if you have the 'curl' library (-lcurl).])
+],
+[with_libcurl="no"])
+AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
+
+if test "x$with_libcurl" = "xyes"
+then
+       with_libcurl_libs=`curl-config --libs`
+       if test "x$with_libcurl_libs" != "x"
+       then
+               BUILD_WITH_LIBCURL_LIBS="$with_libcurl_libs";
+               AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
+       fi
+fi
+
 m4_divert_once([HELP_WITH], [
 collectd additional packages:])
 
@@ -617,6 +638,7 @@ AC_COLLECTD([daemon],    [disable], [feature], [daemon mode])
 
 m4_divert_once([HELP_ENABLE], [
 collectd modules:])
+AC_COLLECTD([apache],    [disable], [module], [Apache httpd statistics])
 AC_COLLECTD([battery],   [disable], [module], [battery statistics])
 AC_COLLECTD([cpu],       [disable], [module], [cpu usage statistics])
 AC_COLLECTD([cpufreq],   [disable], [module], [system cpu frequency statistics])
@@ -861,6 +883,7 @@ cat <<EOF;
 
 Configuration:
   Libraries:
+    libcurl . . . . . . $with_libcurl
     librrd  . . . . . . $with_rrdtool
     lm_sensors  . . . . $with_lm_sensors
     libstatgrab . . . . $with_libstatgrab