diff options
author | Federico Ceratto <federico.ceratto@gmail.com> | 2016-11-23 15:49:10 +0000 |
---|---|---|
committer | Federico Ceratto <federico.ceratto@gmail.com> | 2016-11-23 15:49:10 +0000 |
commit | 87649cf32bd0e14d5a903fb85b01e9f41a253540 (patch) | |
tree | bbefda6dac074aeb87529592e8e5064f69cbe024 /configure.ac | |
parent | Imported Upstream version 1.3.0+dfsg (diff) | |
download | netdata-87649cf32bd0e14d5a903fb85b01e9f41a253540.tar.xz netdata-87649cf32bd0e14d5a903fb85b01e9f41a253540.zip |
New upstream version 1.4.0+dfsgupstream/1.4.0+dfsg
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index fd84f133a..415b09c75 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_PREREQ(2.60) define([VERSION_MAJOR], [1]) -define([VERSION_MINOR], [3]) +define([VERSION_MINOR], [4]) define([VERSION_FIX], [0]) define([VERSION_NUMBER], VERSION_MAJOR[.]VERSION_MINOR[.]VERSION_FIX) define([VERSION_SUFFIX], []) @@ -72,16 +72,50 @@ AC_ARG_WITH( , [with_user="nobody"] ) +AC_ARG_ENABLE( + [x86-sse], + [AS_HELP_STRING([--disable-x86-sse], [SSE/SS2 optimizations on x86 @<:@default enabled@:>@])], + , + [enable_x86_sse="yes"] +) ACX_PTHREAD(, [AC_MSG_ERROR([Cannot initialize pthread environment])]) LIBS="${PTHREAD_LIBS} ${LIBS}" CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" CC="${PTHREAD_CC}" +TS_CHECK_JEMALLOC +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 + AC_TYPE_UINT8_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_C_INLINE +AC_FUNC_STRERROR_R +AC_C__GENERIC +AC_C___ATOMIC +AC_CHECK_SIZEOF([void *]) +AC_CANONICAL_HOST + +AC_ARG_VAR([SSE_CANDIDATE], [C compiler flags for SSE]) +AS_CASE([$host_cpu], + [i?86], [SSE_CANDIDATE="yes"] +) +AC_SUBST([SSE_CANDIDATE]) +if test "${SSE_CANDIDATE}" = "yes" -a "${enable_x86_sse}" = "yes"; then + opt="-msse2 -mfpmath=sse" + AX_CHECK_COMPILE_FLAG($opt, [CFLAGS="$CFLAGS $opt"], []) +fi AC_ARG_VAR([MATH_CFLAGS], [C compiler flags for math]) AC_ARG_VAR([MATH_LIBS], [linker flags for math]) |