+# ------------------------------------------
+# Where to get Bacula source
+# ------------------------------------------
+AC_ARG_WITH(bacula,
+ [ --with-bacula=PATH specify path to Bacula source],
+ [
+ if test "x$withval" != "xno" ; then
+ bacula=$withval
+ fi
+ ]
+)
+
+AC_SUBST(bacula)
+if test "x$bacula" = "x" ; then
+ AC_MSG_ERROR(The Bacula source directory must be specified. Use --with-bacula=<path>)
+fi
+
+dnl Bacula version
+VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${bacula}/src/version.h`
+DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${bacula}/src/version.h`
+AC_SUBST(VERSION)dnl
+AC_SUBST(DATE)dnl
+if test "x$VERSION" = "x" ; then
+ AC_MSG_ERROR(Bacula version not found)
+fi
+echo "configuring for Bacula source $VERSION ($DATE)"
+
+