]> git.sur5r.net Git - bacula/docs/blob - docs/autoconf/configure.in
Fix pruning documentation according to bug #1715
[bacula/docs] / docs / autoconf / configure.in
1 lal#
2 dnl#
3 dnl# Process this file with autoconf to produce a configure script.
4 dnl#
5 AC_INIT(autoconf/configure.in)
6 BUILD_DIR=`pwd`
7 cd ..
8 TOP_DIR=`pwd`
9 cd ${BUILD_DIR}
10 AC_SUBST(BUILD_DIR)
11 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
12
13 dnl require a recent autoconf
14 AC_PREREQ(2.61)
15
16
17
18 # ------------------------------------------
19 # Where to get Bacula source
20 # ------------------------------------------
21 AC_ARG_WITH(bacula,
22    [  --with-bacula=PATH    specify path to Bacula source],
23    [
24        if test "x$withval" != "xno" ; then     
25           bacula=$withval
26        fi
27    ]
28 )
29
30 AC_SUBST(bacula)
31 if test "x$bacula" = "x" ; then
32    AC_MSG_ERROR(The Bacula source directory must be specified. Use --with-bacula=<path>)
33 fi
34
35 dnl Bacula version
36 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${bacula}/src/version.h`
37 DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${bacula}/src/version.h`
38 AC_SUBST(VERSION)dnl 
39 AC_SUBST(DATE)dnl 
40 if test "x$VERSION" = "x" ; then
41    AC_MSG_ERROR(Bacula version not found)
42 fi
43 echo "configuring for Bacula $VERSION ($DATE)"
44
45 dnl -------------------------------------------------------
46 dnl# Check for programs.
47 dnl ------------------------------------------------------
48 AC_PATH_PROGS(TRUEPRG, true, :)
49 AC_PATH_PROGS(FALSEPRG, false, :)
50 AC_PROG_INSTALL
51 AC_PATH_PROG(MV, mv, mv)
52 AC_PATH_PROG(RM, rm, rm)
53 AC_PATH_PROG(CP, cp, cp)
54 AC_PATH_PROG(ECHO, echo, echo)
55 AC_PATH_PROG(AR, ar, ar)
56 AC_PROG_AWK
57 # Some AWK programs fail, so test it and warn the user
58 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 } 
59       { if ((prog == $2) || (("(" prog ")") == $2) ||
60            (("[" prog "]") == $2) ||
61            ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
62 else
63   AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
64    The regex engine of $AWK is too broken to be used you 
65    might want to install GNU AWK.
66    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
67 fi
68 THE_AWK=$AWK
69 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
70
71 # -------------------------------------------------------------------------
72 #  If the user has not set --exec-prefix, we default to ${prefix}
73 # -------------------------------------------------------------------------
74 if test x${exec_prefix} = xNONE ; then
75     exec_prefix=${prefix}
76 fi
77
78
79 dnl# --------------------------------------------------------------------------
80 dnl# CHECKING COMMAND LINE OPTIONS
81 dnl# --------------------------------------------------------------------------
82
83
84
85 dnl# common parts of the Makefile
86 MCOMMON=./autoconf/Make.common
87 AC_SUBST_FILE(MCOMMON)
88
89
90 AC_OUTPUT([    \
91            autoconf/Make.common \
92            Makefile \
93            manuals/update_version \
94            manuals/version.tex \
95            manuals/bacula.sty \
96            manuals/en/console/Makefile \
97            manuals/en/main/Makefile \
98            manuals/en/developers/Makefile \
99            manuals/en/problems/Makefile \
100            manuals/en/utility/Makefile \
101            manuals/en/misc/Makefile \
102            manuals/de/console/Makefile \
103            manuals/de/main/Makefile \
104            manuals/de/developers/Makefile \
105            manuals/de/problems/Makefile \
106            manuals/de/utility/Makefile \
107            manuals/de/misc/Makefile \
108            manuals/fr/console/Makefile \
109            manuals/fr/main/Makefile \
110            manuals/fr/developers/Makefile \
111            manuals/fr/problems/Makefile \
112            manuals/fr/utility/Makefile \
113            manuals/fr/misc/Makefile \
114            manuals/es/console/Makefile \
115            manuals/es/main/Makefile \
116            manuals/es/developers/Makefile \
117            manuals/es/problems/Makefile \
118            manuals/es/utility/Makefile \
119            manuals/es/misc/Makefile \
120            bacula-web/Makefile \
121            bacula-web/version.tex \
122            $PFILES ],  
123           [ ]
124 )
125
126 chmod 766 manuals/update_version
127
128 # Now move common files into each subdirectory
129 for i in manuals/version.tex manuals/bacula.sty ; do
130   for j in console developers main misc problems utility ; do
131       cp -f $i manuals/de/$j/
132       cp -f $i manuals/en/$j/
133       cp -f $i manuals/es/$j/
134       cp -f $i manuals/fr/$j/
135   done
136 done
137
138 echo "
139 Configuration on `date`:
140
141   Bacula version:             ${VERSION} (${DATE})
142   Bacula source code:         ${bacula}
143
144   " > config.out
145
146 cat config.out