3 dnl# Process this file with autoconf to produce a configure script.
5 AC_INIT(autoconf/configure.in)
11 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
13 dnl require a recent autoconf
18 # ------------------------------------------
19 # Where to get Bacula source
20 # ------------------------------------------
22 [ --with-bacula=PATH specify path to Bacula source],
24 if test "x$withval" != "xno" ; then
31 if test "x$bacula" = "x" ; then
32 AC_MSG_ERROR(The Bacula source directory must be specified. Use --with-bacula=<path>)
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`
40 if test "x$VERSION" = "x" ; then
41 AC_MSG_ERROR(Bacula version not found)
43 echo "configuring for Bacula $VERSION ($DATE)"
45 dnl -------------------------------------------------------
46 dnl# Check for programs.
47 dnl ------------------------------------------------------
48 AC_PATH_PROGS(TRUEPRG, true, :)
49 AC_PATH_PROGS(FALSEPRG, false, :)
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)
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 :;
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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
69 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
71 # -------------------------------------------------------------------------
72 # If the user has not set --exec-prefix, we default to ${prefix}
73 # -------------------------------------------------------------------------
74 if test x${exec_prefix} = xNONE ; then
79 dnl# --------------------------------------------------------------------------
80 dnl# CHECKING COMMAND LINE OPTIONS
81 dnl# --------------------------------------------------------------------------
85 dnl# common parts of the Makefile
86 MCOMMON=./autoconf/Make.common
87 AC_SUBST_FILE(MCOMMON)
91 autoconf/Make.common \
93 manuals/update_version \
96 manuals/de/catalog/Makefile \
97 manuals/de/concepts/Makefile \
98 manuals/de/console/Makefile \
99 manuals/de/developers/Makefile \
100 manuals/de/install/Makefile \
101 manuals/de/problems/Makefile \
102 manuals/de/utility/Makefile \
103 manuals/en/catalog/Makefile \
104 manuals/en/concepts/Makefile \
105 manuals/en/console/Makefile \
106 manuals/en/developers/Makefile \
107 manuals/en/install/Makefile \
108 manuals/en/problems/Makefile \
109 manuals/en/utility/Makefile \
110 manuals/en/misc/Makefile \
111 manuals/es/catalog/Makefile \
112 manuals/es/concepts/Makefile \
113 manuals/es/console/Makefile \
114 manuals/es/developers/Makefile \
115 manuals/es/install/Makefile \
116 manuals/es/problems/Makefile \
117 manuals/es/utility/Makefile \
118 manuals/fr/catalog/Makefile \
119 manuals/fr/concepts/Makefile \
120 manuals/fr/console/Makefile \
121 manuals/fr/developers/Makefile \
122 manuals/fr/install/Makefile \
123 manuals/fr/problems/Makefile \
124 manuals/fr/utility/Makefile \
125 bacula-web/Makefile \
126 bacula-web/version.tex \
131 chmod 766 manuals/update_version
133 # Now move common files into each subdirectory
134 for i in manuals/update_version manuals/version.tex manuals/bacula.sty ; do
135 for j in catalog concepts console developers install misc problems utility ; do
136 cp -f $i manuals/de/$j
137 cp -f $i manuals/en/$j
138 cp -f $i manuals/es/$j
139 cp -f $i manuals/fr/$j
144 Configuration on `date`:
146 Bacula version: ${VERSION} (${DATE})
147 Bacula source code: ${bacula}