#
# Copyright (C) 2015 Alon Bar-Lev <alon.barlev@gmail.com>
# SPDX-License-Identifier: GPL-3.0-or-later
#
AC_PREREQ(2.60)
# We do not use m4_esyscmd_s to support older autoconf.
define([VERSION_STRING], m4_esyscmd([git describe 2>/dev/null | tr -d '\n']))
define([VERSION_FROM_FILE], m4_esyscmd([cat packaging/version | tr -d '\n']))
m4_ifval(VERSION_STRING, [], [define([VERSION_STRING], VERSION_FROM_FILE)])
AC_INIT([netdata], VERSION_STRING[])
AM_MAINTAINER_MODE([disable])
if test x"$USE_MAINTAINER_MODE" = xyes; then
AC_MSG_NOTICE(***************** MAINTAINER MODE *****************)
fi
PACKAGE_RPM_VERSION="VERSION_STRING"
AC_SUBST([PACKAGE_RPM_VERSION])
# -----------------------------------------------------------------------------
# autoconf initialization
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([build/m4])
AC_CONFIG_SRCDIR([daemon/main.c])
define([AUTOMATE_INIT_OPTIONS], [tar-pax subdir-objects])
m4_ifdef([AM_SILENT_RULES], [
define([AUTOMATE_INIT_OPTIONS], [tar-pax silent-rules subdir-objects])
])
AM_INIT_AUTOMAKE(AUTOMATE_INIT_OPTIONS)
m4_ifdef([AM_SILENT_RULES], [
AM_SILENT_RULES([yes])
])
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_INSTALL
PKG_PROG_PKG_CONFIG
AC_USE_SYSTEM_EXTENSIONS
# -----------------------------------------------------------------------------
# configurable options
AC_ARG_ENABLE(
[plugin-nfacct],
[AS_HELP_STRING([--enable-plugin-nfacct], [enable nfacct plugin @<:@default autodetect@:>@])],
,
[enable_plugin_nfacct="detect"]
)
AC_ARG_ENABLE(
[plugin-freeipmi],
[AS_HELP_STRING([--enable-plugin-freeipmi], [enable freeipmi plugin @<:@default autodetect@:>@])],
,
[enable_plugin_freeipmi="detect"]
)
AC_ARG_ENABLE(
[plugin-cups],
[AS_HELP_STRING([--enable