]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/autoconf/configure.in
Commit migrate2 patch
[bacula/bacula] / gui / autoconf / configure.in
index 1fb827068ac6e5552aaadea74f49f587b6defc21..9de83b09438a589dba5252202a05198139fb6936 100644 (file)
@@ -14,6 +14,34 @@ dnl require a recent autoconf
 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, :)
@@ -34,14 +62,6 @@ THE_AWK=$AWK
 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 ------------------------------------------------------
@@ -74,21 +94,80 @@ 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
@@ -192,6 +271,7 @@ AC_OUTPUT([    \
           autoconf/Make.common \
           Makefile \
           bimagemgr/Makefile \
+          bacula-gui.spec \
           $PFILES ],  
          [ ]
 )
@@ -201,7 +281,6 @@ echo "
 Configuration on `date`:
 
   Host:                      $host -- ${DISTNAME} ${DISTVER}
-  Bacula version:            ${VERSION} (${DATE})
   Source code location:       ${bacula}
 
   " > config.out