]> arthur.barton.de Git - netdata.git/blobdiff - configure.ac
added new files to makefiles
[netdata.git] / configure.ac
index 56279792a65e46d9e050c3802974c4c12e3c005e..30f5a0cc8a466ecd7a0e2146fed9eec17d599112 100644 (file)
@@ -27,10 +27,10 @@ PKG_PROG_PKG_CONFIG
 AC_USE_SYSTEM_EXTENSIONS
 
 AC_ARG_ENABLE(
-       [plugin-plugin-nfacct],
-       [AS_HELP_STRING([--enable-plugin-plugin-nfacct], [enable nfacct plugin, requires root])],
+       [plugin-nfacct],
+       [AS_HELP_STRING([--enable-plugin-nfacct], [enable nfacct plugin, requires root])],
        ,
-       [enable_plugin_plugin_nfacct="no"]
+       [enable_plugin_nfacct="no"]
 )
 AC_ARG_ENABLE(
        [pedantic],
@@ -73,18 +73,6 @@ AC_TYPE_UINT16_T
 AC_TYPE_UINT32_T
 AC_C_INLINE
 
-PKG_CHECK_MODULES(
-       [NFACCT],
-       [libnetfilter_acct],
-)
-PKG_CHECK_MODULES(
-       [LIBMNL],
-       [libmnl],
-)
-PKG_CHECK_MODULES(
-       [ZLIB],
-       [zlib],
-)
 AC_ARG_VAR([MATH_CFLAGS], [C compiler flags for math])
 AC_ARG_VAR([MATH_LIBS], [linker flags for math])
 if test -z "${MATH_LIBS}"; then
@@ -95,8 +83,15 @@ if test -z "${MATH_LIBS}"; then
        )
 fi
 
-test "${enable_daemon}" = "yes" && AC_DEFINE([NETDATA_DAEMON], [1], [daemon settings])
-if test "${enable_plugin_plugin_nfacct}" = "yes"; then
+if test "${enable_plugin_nfacct}" = "yes"; then
+       PKG_CHECK_MODULES(
+               [NFACCT],
+               [libnetfilter_acct],
+       )
+       PKG_CHECK_MODULES(
+               [LIBMNL],
+               [libmnl],
+       )
        test -z "${NFACCT_LIBS}" && AC_MSG_ERROR([netfilter_acct required but not found])
        test -z "${LIBMNL_LIBS}" && AC_MSG_ERROR([libmnl required but not found])
        AC_DEFINE([INTERNAL_PLUGIN_NFACCT], [1], [nfacct plugin settings])
@@ -104,6 +99,10 @@ if test "${enable_plugin_plugin_nfacct}" = "yes"; then
        OPTIONAL_NFACCT_LIBS="${NFACCT_LIBS} ${LIBMNL_LIBS}"
 fi
 if test "${with_zlib}" = "yes"; then
+       PKG_CHECK_MODULES(
+               [ZLIB],
+               [zlib],
+       )
        test -z "${ZLIB_LIBS}" && AC_MSG_ERROR([zlib required but not found])
        AC_DEFINE([NETDATA_WITH_ZLIB], [1], [zlib settings])
        OPTIONAL_ZLIB_CLFAGS="${ZLIB_CFLAGS}"
@@ -155,3 +154,6 @@ AC_CONFIG_FILES([
        web/Makefile
 ])
 AC_OUTPUT
+
+test "${with_math}" != "yes" && AC_MSG_WARN([You are building without math. math allows accurate calculations. It should be enabled.]) || :
+test "${with_zlib}" != "yes" && AC_MSG_WARN([You are building without zlib. zlib allows netdata to trasnfer a lot less data with web clients. It should be enabled.]) || :