AC_PROG_LEX
AC_PROG_YACC
+AC_PATH_PROG([VALGRIND], [valgrind])
+
# Warn when pkg.m4 is missing
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
fi
AC_MSG_RESULT([$protoc3])
fi
-AC_SUBST([PROTOC])
AM_CONDITIONAL(HAVE_PROTOC3, test "x$have_protoc3" = "xyes")
AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin])
-AC_SUBST([GRPC_CPP_PLUGIN])
AM_CONDITIONAL(HAVE_GRPC_CPP, test "x$GRPC_CPP_PLUGIN" != "x")
AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no])
AC_FUNC_STRERROR_R
test_cxx_flags() {
- AC_LANG_PUSH(C++)
- AC_LANG_CONFTEST([int main(void){}])
+ AC_LANG_PUSH([C++])
+ AC_LANG_CONFTEST([
+ AC_LANG_SOURCE([[int main(void){}]])
+ ])
$CXX -c conftest.cpp $CXXFLAGS $@ > /dev/null 2> /dev/null
ret=$?
rm -f conftest.o
- AC_LANG_POP(C++)
+ AC_LANG_POP([C++])
return $ret
}
fi
fi
-# --with-libpthread {{{
-AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
-[ if test "x$withval" != "xno" \
- && test "x$withval" != "xyes"
- then
- LDFLAGS="$LDFLAGS -L$withval/lib"
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- with_libpthread="yes"
- else
- if test "x$withval" = "xno"
- then
- with_libpthread="no (disabled)"
- fi
- fi
-], [with_libpthread="yes"])
+SAVE_LIBS="$LIBS"
+AC_CHECK_LIB([pthread],
+ [pthread_create],
+ [],
+ [AC_MSG_ERROR([Symbol 'pthread_create' not found in libpthread"])],
+ []
+)
+PTHREAD_LIBS="$LIBS"
+LIBS="$SAVE_LIBS"
+AC_CHECK_HEADERS([pthread.h],
+ [],
+ [AC_MSG_ERROR([pthread.h not found])]
+)
AC_SUBST([PTHREAD_LIBS])
-if test "x$with_libpthread" = "xyes"
-then
- SAVE_LIBS="$LIBS"
- AC_CHECK_LIB(pthread, pthread_create, [], [with_libpthread="no (Symbol 'pthread_create' not found)"], [])
- PTHREAD_LIBS="$LIBS"
- LIBS="$SAVE_LIBS"
-fi
-
-if test "x$with_libpthread" = "xyes"
-then
- AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
-fi
-if test "x$with_libpthread" = "xyes"
-then
- collect_pthread=1
-else
- collect_pthread=0
-fi
-AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
- [Wether or not to use pthread (POSIX threads) library])
-AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
-# }}}
m4_divert_once([HELP_WITH], [
collectd additional packages:])
AC_DEFINE(HAVE_CURLOPT_TIMEOUT_MS, 1, [Define if libcurl supports CURLOPT_TIMEOUT_MS option.])
fi
fi
-AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
# }}}
# --with-libdbi {{{
fi
if test "x$with_oracle" = "xyes"
then
- BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags"
+ BUILD_WITH_ORACLE_CPPFLAGS="$with_oracle_cppflags"
BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
- AC_SUBST(BUILD_WITH_ORACLE_CFLAGS)
+ AC_SUBST(BUILD_WITH_ORACLE_CPPFLAGS)
AC_SUBST(BUILD_WITH_ORACLE_LIBS)
fi
# }}}
CPPFLAGS="$SAVE_CPPFLAGS"
LDFLAGS="$SAVE_LDFLAGS"
+ LIBXENCTL_CPPFLAGS="$with_libxenctl_cppflags"
+ LIBXENCTL_LDFLAGS="$with_libxenctl_ldflags"
+ AC_SUBST(LIBXENCTL_CPPFLAGS)
+ AC_SUBST(LIBXENCTL_LDFLAGS)
fi
# --with-libxmms {{{
AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
AC_PLUGIN([ceph], [$plugin_ceph], [Ceph daemon statistics])
AC_PLUGIN([cgroups], [$plugin_cgroups], [CGroups CPU usage accounting])
+AC_PLUGIN([chrony], [yes], [Chrony statistics])
AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics])
AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
if test "x$enable_werror" != "xno"
then
AM_CFLAGS="$AM_CFLAGS -Werror"
- AM_CXXFLAGS="$AM_CFLAGS -Werror"
+ AM_CXXFLAGS="$AM_CXXFLAGS -Werror"
fi
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_CXXFLAGS])
CXXFLAGS . . . . . . $AM_CXXFLAGS $CXXFLAGS
CPP . . . . . . . . . $CPP
CPPFLAGS . . . . . . $CPPFLAGS
+ GRPC_CPP_PLUGIN . . . $GRPC_CPP_PLUGIN
LD . . . . . . . . . $LD
LDFLAGS . . . . . . . $LDFLAGS
+ PROTOC . . . . . . . $PROTOC
YACC . . . . . . . . $YACC
YFLAGS . . . . . . . $YFLAGS
libperfstat . . . . . $with_perfstat
libperl . . . . . . . $with_libperl
libpq . . . . . . . . $with_libpq
- libpthread . . . . . $with_libpthread
librabbitmq . . . . . $with_librabbitmq
libriemann-client . . $with_libriemann_client
librdkafka . . . . . $with_librdkafka
libyajl . . . . . . . $with_libyajl
oracle . . . . . . . $with_oracle
protobuf-c . . . . . $have_protoc_c
- protoc 3 . . . . . . $have_protoc3
+ protoc 3 . . . . . . $protoc3
python . . . . . . . $with_python
Features:
bind . . . . . . . . $enable_bind
ceph . . . . . . . . $enable_ceph
cgroups . . . . . . . $enable_cgroups
+ chrony. . . . . . . . $enable_chrony
conntrack . . . . . . $enable_conntrack
contextswitch . . . . $enable_contextswitch
cpu . . . . . . . . . $enable_cpu