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.61) # ------------------------------------------ # 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/^#define VERSION.*"\(.*\)"$/\1/p' ${bacula}/src/version.h` DATE=`sed -n -e 's/^#define 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/update_version \ manuals/version.tex \ manuals/bacula.sty \ manuals/en/console/Makefile \ manuals/en/main/Makefile \ manuals/en/developers/Makefile \ manuals/en/problems/Makefile \ manuals/en/utility/Makefile \ manuals/en/misc/Makefile \ manuals/de/console/Makefile \ manuals/de/main/Makefile \ manuals/de/developers/Makefile \ manuals/de/problems/Makefile \ manuals/de/utility/Makefile \ manuals/de/misc/Makefile \ manuals/fr/console/Makefile \ manuals/fr/main/Makefile \ manuals/fr/developers/Makefile \ manuals/fr/problems/Makefile \ manuals/fr/utility/Makefile \ manuals/fr/misc/Makefile \ manuals/es/console/Makefile \ manuals/es/main/Makefile \ manuals/es/developers/Makefile \ manuals/es/problems/Makefile \ manuals/es/utility/Makefile \ manuals/es/misc/Makefile \ bacula-web/Makefile \ bacula-web/version.tex \ $PFILES ], [ ] ) chmod 766 manuals/update_version # Now move common files into each subdirectory for i in manuals/version.tex manuals/bacula.sty ; do for j in console developers main misc problems utility ; do cp -f $i manuals/de/$j/ cp -f $i manuals/en/$j/ cp -f $i manuals/es/$j/ cp -f $i manuals/fr/$j/ done done echo " Configuration on `date`: Bacula version: ${VERSION} (${DATE}) Bacula source code: ${bacula} " > config.out cat config.out