lal# dnl# dnl# Process this file with autoconf to produce a configure script. dnl# AC_INIT(autoconf/configure.in) BUILD_DIR=`pwd` cd .. TOP_DIR=`pwd` cd ${BUILD_DIR} AC_SUBST(BUILD_DIR) AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf) 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=) 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 $VERSION ($DATE)" dnl ------------------------------------------------------- dnl# Check for programs. dnl ------------------------------------------------------ AC_PATH_PROGS(TRUEPRG, true, :) AC_PATH_PROGS(FALSEPRG, false, :) AC_PROG_INSTALL AC_PATH_PROG(MV, mv, mv) AC_PATH_PROG(RM, rm, rm) AC_PATH_PROG(CP, cp, cp) AC_PATH_PROG(ECHO, echo, echo) AC_PATH_PROG(AR, ar, ar) AC_PROG_AWK # Some AWK programs fail, so test it and warn the user if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 } { if ((prog == $2) || (("(" prog ")") == $2) || (("[" prog "]") == $2) || ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :; else AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!! The regex engine of $AWK is too broken to be used you might want to install GNU AWK. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!]) fi THE_AWK=$AWK AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK) # ------------------------------------------------------------------------- # If the user has not set --exec-prefix, we default to ${prefix} # ------------------------------------------------------------------------- if test x${exec_prefix} = xNONE ; then exec_prefix=${prefix} fi dnl# -------------------------------------------------------------------------- dnl# CHECKING COMMAND LINE OPTIONS dnl# -------------------------------------------------------------------------- dnl# common parts of the Makefile MCOMMON=./autoconf/Make.common AC_SUBST_FILE(MCOMMON) AC_OUTPUT([ \ autoconf/Make.common \ Makefile \ manuals/en/catalog/Makefile \ manuals/en/catalog/update_version \ manuals/en/catalog/version.tex \ manuals/en/concepts/Makefile \ manuals/en/concepts/update_version \ manuals/en/concepts/version.tex \ manuals/en/console/Makefile \ manuals/en/console/update_version \ manuals/en/console/version.tex \ manuals/en/developers/Makefile \ manuals/en/developers/update_version \ manuals/en/developers/version.tex \ manuals/en/install/Makefile \ manuals/en/install/update_version \ manuals/en/install/version.tex \ manuals/en/problems/Makefile \ manuals/en/problems/update_version \ manuals/en/problems/version.tex \ manuals/en/utility/Makefile \ manuals/en/utility/update_version \ manuals/en/utility/version.tex \ manuals/fr/catalog/Makefile \ manuals/fr/catalog/update_version \ manuals/fr/catalog/version.tex \ manuals/fr/concepts/Makefile \ manuals/fr/concepts/update_version \ manuals/fr/concepts/version.tex \ manuals/fr/console/Makefile \ manuals/fr/console/update_version \ manuals/fr/console/version.tex \ manuals/fr/developers/Makefile \ manuals/fr/developers/update_version \ manuals/fr/developers/version.tex \ manuals/fr/install/Makefile \ manuals/fr/install/update_version \ manuals/fr/install/version.tex \ manuals/fr/problems/Makefile \ manuals/fr/problems/update_version \ manuals/fr/problems/version.tex \ manuals/fr/utility/Makefile \ manuals/fr/utility/update_version \ manuals/fr/utility/version.tex \ manual-de/Makefile \ manual-de/version.tex \ manual-de/update_version \ bacula-web/Makefile \ bacula-web/version.tex \ $PFILES ], [ ] ) chmod 766 manuals/en/catalog/update_version chmod 766 manuals/en/concepts/update_version chmod 766 manuals/en/console/update_version chmod 766 manuals/en/developers/update_version chmod 766 manuals/en/install/update_version chmod 766 manuals/en/problems/update_version chmod 766 manuals/en/utility/update_version chmod 766 manuals/fr/catalog/update_version chmod 766 manuals/fr/concepts/update_version chmod 766 manuals/fr/console/update_version chmod 766 manuals/fr/developers/update_version chmod 766 manuals/fr/install/update_version chmod 766 manuals/fr/problems/update_version chmod 766 manuals/fr/utility/update_version chmod 766 manual-de/update_version echo " Configuration on `date`: Bacula version: ${VERSION} (${DATE}) Bacula source code: ${bacula} " > config.out cat config.out