AC_PREREQ(2.13)
+# ------------------------------------------
+# 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)"
+
+
dnl search for true and false programs.
AC_PATH_PROGS(TRUEPRG, true, :)
AC_PATH_PROGS(FALSEPRG, false, :)
AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
-dnl Bacula version
-#VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/version.h`
-#DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/version.h`
-#AC_SUBST(VERSION)dnl
-#AC_SUBST(DATE)dnl
-#echo "configuring for Bacula $VERSION ($DATE)"
-
-
dnl -------------------------------------------------------
dnl# Check for programs.
dnl ------------------------------------------------------
dnl# CHECKING COMMAND LINE OPTIONS
dnl# --------------------------------------------------------------------------
-# ------------------------------------------
-# Where to get Bacula source
-# ------------------------------------------
-AC_ARG_WITH(bacula,
- [ --with-bacula=PATH specify path to Bacula source],
+
+# -------------------------------------------------------------------------
+# Set variables for bimagemgr installation
+# -------------------------------------------------------------------------
+bimagemgr_cgidir=/var/www/cgi-bin
+AC_ARG_WITH(bimagemgr-cgidir,
+ [ --with-bimagemgr-cgidir=DIR specify bimagemgr cgi-bin dir],
[
if test "x$withval" != "xno" ; then
- bacula=$withval
+ bimagemgr_cgidir=$withval
fi
]
)
-AC_SUBST(bacula)
+bimagemgr_docdir=/var/www/html
+AC_ARG_WITH(bimagemgr-docdir,
+ [ --with-bimagemgr-docdir=DIR specify bimagemgr doc root dir],
+ [
+ if test "x$withval" != "xno" ; then
+ bimagemgr_docdir=$withval
+ fi
+ ]
+)
+
+bimagemgr_binowner=root
+AC_ARG_WITH(bimagemgr-binowner,
+ [ --with-bimagemgr-binowner=USER specify bimagemgr binary file owner],
+ [
+ if test "x$withval" != "xno" ; then
+ bimagemgr_binowner=$withval
+ fi
+ ]
+)
+
+bimagemgr_bingroup=root
+AC_ARG_WITH(bimagemgr-bingroup,
+ [ --with-bimagemgr-bingroup=USER specify bimagemgr binary file group],
+ [
+ if test "x$withval" != "xno" ; then
+ bimagemgr_bingroup=$withval
+ fi
+ ]
+)
+
+bimagemgr_dataowner=apache
+AC_ARG_WITH(bimagemgr-dataowner,
+ [ --with-bimagemgr-dataowner=USER specify bimagemgr data file owner],
+ [
+ if test "x$withval" != "xno" ; then
+ bimagemgr_dataowner=$withval
+ fi
+ ]
+)
+
+bimagemgr_datagroup=apache
+AC_ARG_WITH(bimagemgr-datagroup,
+ [ --with-bimagemgr-datagroup=USER specify bimagemgr data file group],
+ [
+ if test "x$withval" != "xno" ; then
+ bimagemgr_datagroup=$withval
+ fi
+ ]
+)
+
+AC_SUBST(bimagemgr_cgidir)
+AC_SUBST(bimagemgr_docdir)
+AC_SUBST(bimagemgr_binowner)
+AC_SUBST(bimagemgr_bingroup)
+AC_SUBST(bimagemgr_dataowner)
+AC_SUBST(bimagemgr_datagroup)
+AC_SUBST(bacula)
+
#
# Finally we set appropriate distribution specific
# variables and defaults
autoconf/Make.common \
Makefile \
bimagemgr/Makefile \
+ bacula-gui.spec \
$PFILES ],
[ ]
)
Configuration on `date`:
Host: $host -- ${DISTNAME} ${DISTVER}
- Bacula version: ${VERSION} (${DATE})
Source code location: ${bacula}
" > config.out