]> arthur.barton.de Git - netdata.git/blobdiff - configure.ac
Merge pull request #1870 from ktsaou/master
[netdata.git] / configure.ac
index 08107c9acf7985da329a5952bf74ff4585f50194..1dffbe0f304133bdd1a205da6e3d72c0f2b699d5 100644 (file)
@@ -7,12 +7,16 @@ define([VERSION_MAJOR], [1])
 define([VERSION_MINOR], [5])
 define([VERSION_FIX], [1])
 define([VERSION_NUMBER], VERSION_MAJOR[.]VERSION_MINOR[.]VERSION_FIX)
-define([VERSION_SUFFIX], [_master])
+define([VERSION_SUFFIX], [_rolling])
 
 dnl Set to "1" for a first RPM release of a new version
 PACKAGE_RPM_RELEASE="0.0.$(echo VERSION_SUFFIX | sed s/^_//)"
 
-AC_INIT([netdata], VERSION_NUMBER[]VERSION_SUFFIX)
+# We do not use m4_esyscmd_s to support older autoconf.
+define([VERSION_STRING], m4_esyscmd(git describe 2>/dev/null | sed 's/^v//' | tr -d '\n'))
+m4_ifval(VERSION_STRING, [], [define([VERSION_STRING], VERSION_NUMBER)])
+
+AC_INIT([netdata], VERSION_STRING[]VERSION_SUFFIX)
 
 AM_MAINTAINER_MODE([disable])
 if test x"$USE_MAINTAINER_MODE" = xyes; then
@@ -47,6 +51,7 @@ AC_CHECK_FUNCS_ONCE(accept4)
 AC_CHECK_TYPES([struct timespec, clockid_t], [], [], [[#include <time.h>]])
 AC_SEARCH_LIBS([clock_gettime], [rt posix4])
 AC_CHECK_FUNCS([clock_gettime])
+AC_CHECK_FUNCS([sched_setscheduler sched_get_priority_min sched_get_priority_max nice])
 
 # Check system type
 case "$host_os" in
@@ -58,11 +63,13 @@ darwin*)
        LDFLAGS="${LDFLAGS} -framework CoreFoundation -framework IOKit"
        ;;
 *)
+       build_target=linux
        ;;
 esac
 
 AM_CONDITIONAL([FREEBSD], [test x$build_target = xfreebsd])
 AM_CONDITIONAL([MACOS], [test x$build_target = xmacos])
+AM_CONDITIONAL([LINUX], [test x$build_target = xlinux])
 
 AC_ARG_ENABLE(
        [plugin-nfacct],
@@ -142,6 +149,7 @@ AC_CHECK_SIZEOF([void *])
 AC_CANONICAL_HOST
 AC_HEADER_MAJOR
 AC_HEADER_RESOLV
+AC_CHECK_HEADERS_ONCE([sys/prctl.h])
 
 AC_CHECK_LIB([cap], [cap_get_proc, cap_set_proc],
        [AC_CHECK_HEADER(