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])
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])],
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