## Documentation
Check the **[netdata wiki](https://github.com/firehol/netdata/wiki)**.
-
-
-## Git sources
-
-You are looking at a version of the sources extracted directly from git.
-If you want a version of the source package where `configure` and any
-documentation has been built for you, please get an official
-[netdata package download](https://firehol.org/download/netdata/).
-The `unsigned/master` folder tracks the head of the git tree and
-released packages are also available.
-
AC_INIT([netdata], VERSION_NUMBER[]VERSION_SUFFIX)
-AM_CONDITIONAL([GIT_TREE], [test -f README.md])
-
AM_MAINTAINER_MODE([disable])
if test x"$USE_MAINTAINER_MODE" = xyes; then
AC_MSG_NOTICE(***************** MAINTAINER MODE *****************)
exit 1
fi
+have_autotools=
+if [ "$(type autoreconf 2> /dev/null)" ]
+then
+ autoconf_maj_min() {
+ local maj min IFS=.-
+
+ maj=$1
+ min=$2
+
+ set -- $(autoreconf -V | sed -ne '1s/.* \([^ ]*\)$/\1/p')
+ eval $maj=\$1 $min=\$2
+ }
+ autoconf_maj_min AMAJ AMIN
+
+ if [ "$AMAJ" -gt 2 ]
+ then
+ have_autotools=Y
+ elif [ "$AMAJ" -eq 2 -a "$AMIN" -ge 60 ]
+ then
+ have_autotools=Y
+ else
+ echo "Found autotools $AMAJ.$AMIN"
+ fi
+else
+ echo "No autotools found"
+fi
+
+if [ ! "$have_autotools" ]
+then
+ if [ -f configure ]
+ then
+ echo "Will skip autoreconf step"
+ else
+ cat <<-"EOF"
+
+ Sorry, you do not seem to have autotools 2.60 or later, which is
+ required to build from the git sources of netdata.
+
+ You can either install a suitable version of autotools and automake
+ or download a netdata package which does not have these dependencies.
+
+ Source packages where autotools have already been run are available
+ here:
+ https://firehol.org/download/netdata/
+
+ The unsigned/master folder tracks the head of the git tree and released
+ packages are also available.
+ EOF
+ exit 1
+ fi
+fi
+
if [ ${DONOTWAIT} -eq 0 ]
then
if [ ! -z "${NETDATA_PREFIX}" ]
gcc make autoconf automake pkg-config
+ Autoconf version 2.60 or higher is required
+
3. If your system cannot find ZLIB, although it is installed
run me with the option: --zlib-is-really-here
trap build_error EXIT
-echo >&2 "Running ./autogen.sh ..."
-run ./autogen.sh || exit 1
+if [ "$have_autotools" ]
+then
+ echo >&2 "Running ./autogen.sh ..."
+ run ./autogen.sh || exit 1
+fi
echo >&2 "Running ./configure ..."
run ./configure \