]> arthur.barton.de Git - netdata.git/blobdiff - configure.ac
Minor cleanups and plugin structure changes
[netdata.git] / configure.ac
index 1c0dfda1d1b2203a87e8c1c1ccd10edfe0354f4d..9b26fcddcc584bcb7f788e6a63672206fd45af6a 100644 (file)
@@ -4,7 +4,7 @@
 AC_PREREQ(2.60)
 
 define([VERSION_MAJOR], [1])
-define([VERSION_MINOR], [3])
+define([VERSION_MINOR], [4])
 define([VERSION_FIX], [1])
 define([VERSION_NUMBER], VERSION_MAJOR[.]VERSION_MINOR[.]VERSION_FIX)
 define([VERSION_SUFFIX], [_master])
@@ -36,6 +36,17 @@ PKG_PROG_PKG_CONFIG
 AC_USE_SYSTEM_EXTENSIONS
 AC_CHECK_FUNCS_ONCE(accept4)
 
+# Check system type
+case "$host_os" in
+freebsd*)
+       build_target=freebsd
+       ;;
+*)
+       ;;
+esac
+
+AM_CONDITIONAL([FREEBSD], [test x$build_target = xfreebsd])
+
 AC_ARG_ENABLE(
        [plugin-nfacct],
        [AS_HELP_STRING([--enable-plugin-nfacct], [enable nfacct plugin, requires root])],
@@ -85,13 +96,18 @@ CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
 CC="${PTHREAD_CC}"
 
 TS_CHECK_JEMALLOC
-if test "$has_jemalloc" = "0"; then
+if test "$has_jemalloc" = "1"; then
+       AC_DEFINE([ENABLE_JEMALLOC], [1], [compile and link with jemalloc])
+else
        TS_CHECK_TCMALLOC
+       if test "$has_tcmalloc" = "1"; then
+               AC_DEFINE([ENABLE_TCMALLOC], [1], [compile and link with tcmalloc])
+       else
+               AC_C_MALLOPT
+               AC_C_MALLINFO
+       fi
 fi
-if test "$has_jemalloc$has_tcmalloc" = "00"; then
-       AC_C_MALLOPT
-       AC_C_MALLINFO
-fi
+
 AC_TYPE_UINT8_T
 AC_TYPE_UINT16_T
 AC_TYPE_UINT32_T