This patch allows AC_INIT to properly set the PACKAGE variables in the
Makefiles. In turn, this allows docdir use to work correctly. With
the new behaviour, things placed in docdir go to share/doc/bacula.
Previously the would end up in share/doc.
We move the detection of the source directory to a separate
AC_CONFIG_SRCDIR macro call.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
dnl
dnl require a recent autoconf
AC_PREREQ(2.61)
-AC_INIT(src/version.h)
+AC_INIT([bacula], m4_esyscmd([sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ../src/version.h src/version.h 2> /dev/null | tr -d '\n']))
+AC_CONFIG_SRCDIR(src/version.h)
+
BUILD_DIR=`pwd`
cd ..
TOP_DIR=`pwd`