3 # AMANDA_WITH_DUMPERDIR
7 # Define and substitute DUMPER_DIR with the result.
9 AC_DEFUN([AMANDA_WITH_DUMPERDIR],
11 AC_ARG_WITH(dumperdir,
12 AS_HELP_STRING([--with-dumperdir=DIR],
13 [where we install the dumpers (default: exec_prefix/dumper)]),
15 AMANDA_MSG_WARN([--with-dumperdir is no longer used.])
22 # AMANDA_WITH_CONFIGDIR
26 # Allow user to specify the dumperdir, defaulting to ${exec_prefix}/dumper.
27 # Define and substitute DUMPER_DIR with the result.
29 AC_DEFUN([AMANDA_WITH_CONFIGDIR],
31 AC_ARG_WITH(configdir,
32 AS_HELP_STRING([--with-configdir=DIR],
33 [runtime config files in DIR @<:@sysconfdir/amanda@:>@]),
36 "" | y | ye | yes | n | no)
37 AC_MSG_ERROR([*** You must supply an argument to the --with-configdir option.])
39 *) CONFIG_DIR="$withval"
43 : ${CONFIG_DIR='${sysconfdir}/amanda'} # (variable will be evaluated below)
46 AC_DEFINE_DIR([CONFIG_DIR], [CONFIG_DIR],
47 [The directory in which configuration directories should be created. ])
50 ## deprecated --with-*dir options
52 AC_DEFUN([AMANDA_WITH_INDEXDIR],
55 AS_HELP_STRING([--with-indexdir], [deprecated: use indexdir in amanda.conf]),
56 [ AC_MSG_ERROR([*** --with-indexdir is deprecated; use indexdir in amanda.conf instead.])
60 AC_DEFUN([AMANDA_WITH_DBDIR],
63 AS_HELP_STRING([--with-dbdir], [deprecated: use infofile in amanda.conf]),
64 [ AC_MSG_ERROR([*** --with-dbdir is deprecated; use infofile in amanda.conf instead.])
68 AC_DEFUN([AMANDA_WITH_LOGDIR],
71 AS_HELP_STRING([--with-logdir], [deprecated: use logfile in amanda.conf]),
72 [ AC_MSG_ERROR([*** --with-logdir is deprecated; use logfile in amanda.conf instead.])
78 # AMANDA_WITH_GNUTAR_LISTDIR
82 # Implements --with-gnutar-listdir. Defines GNUTAR_LISTED_INCREMENTAL_DIR to the
83 # value given or $localstatedir/amanda/gnutar-lists by default. Any $xxxdir variables
84 # are fully evaluated in the value.
86 AC_DEFUN([AMANDA_WITH_GNUTAR_LISTDIR],
88 AC_ARG_WITH(gnutar-listdir,
89 AS_HELP_STRING([--with-gnutar-listdir=DIR],
90 [put gnutar directory lists in DIR (default: localstatedir/amanda/gnutar-lists)]),
93 n | no) GNUTAR_LISTDIR= ;;
94 y | ye | yes) GNUTAR_LISTDIR='${localstatedir}/amanda/gnutar-lists' ;;
95 *) GNUTAR_LISTDIR="$withval" ;;
98 GNUTAR_LISTDIR='${localstatedir}/amanda/gnutar-lists'
102 # substitute $prefix, etc. if necessary
103 AC_DEFINE_DIR([GNUTAR_LISTED_INCREMENTAL_DIR], [GNUTAR_LISTDIR],
104 [The directory in which GNU tar should store directory lists for incrementals. ])
106 # handle deprecated option
107 AC_ARG_WITH(gnutar-listed-incremental,
108 AS_HELP_STRING([--with-gnutar-listed-incremental],
109 [deprecated; use --with-gnutar-listdir]),
111 AC_MSG_ERROR([*** The gnutar-listed-incremental option is deprecated; use --with-gnutar-listdir instead])
122 # Implement --with-tmpdir. Defines and substitutes AMANDA_TMPDIR.
124 AC_DEFUN([AMANDA_WITH_TMPDIR],
127 AS_HELP_STRING([--with-tmpdir],
128 [directory for temporary and debugging files (default: /tmp/amanda)]),
137 n | no) AC_MSG_ERROR([*** --without-tmpdir is not allowed.]);;
138 y | ye | yes) AMANDA_TMPDIR="/tmp/amanda";;
139 *) AMANDA_TMPDIR="$tmpdir";;
142 AC_DEFINE_DIR([AMANDA_TMPDIR], [AMANDA_TMPDIR],
143 [The directory in which Amanda should create temporary files. ])
152 # Expand any variable references in the following variables, then define them:
158 # Also defines the following directories and expands any variable references:
159 # - amlibdir = --with-amlibdir or ${libdir}/amanda
160 # - amlibexecdir = --with-amlibexecdir or ${libexecdir}/amanda
161 # - amincludedir = ${includedir}/amanda
162 # - amperldir = --with-amperldir or `perl -V:installsitearch`
163 # - DUMPER_DIR = ${amlibexecdir}/application
165 AC_DEFUN([AMANDA_EXPAND_DIRS],
167 AC_REQUIRE([AMANDA_PROG_PERL])
169 AC_DEFINE_DIR([bindir], [bindir],
170 [Directory in which user binaries should be installed. ])
172 AC_DEFINE_DIR([sbindir], [sbindir],
173 [Directory in which administrator binaries should be installed. ])
175 AC_DEFINE_DIR([libexecdir], [libexecdir],
176 [Directory in which internal binaries should be installed. ])
178 AC_DEFINE_DIR([mandir], [mandir],
179 [Directory in which man-pages should be installed])
182 # amanda-specific directories
183 AMLIBDIR=$libdir/amanda
184 AC_ARG_WITH(amlibdir,
185 AS_HELP_STRING([--with-amlibdir[[[[[=PATH]]]]]],
186 [Where library are installed, default: $libdir/amanda])
187 AS_HELP_STRING([--without-amlibdir],
188 [Library are installed in $libdir]),
191 n | no) AMLIBDIR=$libdir ;;
192 y | ye | yes) AMLIBDIR=$libdir/amanda ;;
193 *) AMLIBDIR=$withval ;;
197 AC_DEFINE_DIR([amlibdir], [AMLIBDIR],
198 [Directory in which Amanda libraries should be installed])
200 AMLIBEXECDIR=$libexecdir/amanda
201 AC_ARG_WITH(amlibexecdir,
202 AS_HELP_STRING([--with-amlibexecdir[[[[[=PATH]]]]]],
203 [Where amanda own programs are installed, default: $libexecdir/amanda])
204 AS_HELP_STRING([--without-amlibexecdir],
205 [Amanda own programs are installed in $libexecdir]),
208 n | no) AMLIBEXECDIR=$libexecdir ;;
209 y | ye | yes) AMLIBEXECDIR=$libexecdir/amanda ;;
210 *) AMLIBEXECDIR=$withval ;;
214 AC_DEFINE_DIR([amlibexecdir], [AMLIBEXECDIR],
215 [Directory in which Amanda own programs should be installed])
217 amincludedir="${includedir}/amanda"
218 AC_DEFINE_DIR([amincludedir], [amincludedir],
219 [Directory in which Amanda header files should be installed])
221 AC_ARG_WITH(amperldir,
222 AS_HELP_STRING([--with-amperldir[[[[[=PATH]]]]]],
223 [Where amanda's perl modules are installed; default: installsitelib])
224 AS_HELP_STRING([--without-amperldir],
225 [Install amanda's perl modules in $amlibdir/perl]),
228 y | ye | yes) AMPERLLIB=DEFAULT ;;
229 n | no) AMPERLLIB=$amlibdir/perl ;;
230 *) AMPERLLIB=$withval ;;
236 # apply the default if no value was given.
237 if test x"$AMPERLLIB" = x"DEFAULT"; then
238 eval `$PERL -V:installsitelib`
239 AMPERLLIB=$installsitelib
241 AC_DEFINE_DIR([amperldir], [AMPERLLIB],
242 [Directory in which perl modules should be installed])
244 DUMPER_DIR='${amlibexecdir}/application'
245 AC_DEFINE_DIR([DUMPER_DIR],[DUMPER_DIR],
246 [Directory in which dumper interfaces should be installed and searched. ])
247 # TODO: rename to APPLICATION_DIR, add to Amanda::Paths and 'amgtconf build.APPLICATION_DIR'
252 # AMANDA_SHOW_DIRS_SUMMARY
256 # Show a summary of the settings from this file.
258 AC_DEFUN([AMANDA_SHOW_DIRS_SUMMARY],
261 echo " Perl modules (amperldir): $amperldir"
262 echo " Dumper: $DUMPER_DIR"
263 echo " Configuration: $CONFIG_DIR"
264 echo " GNU Tar lists: $GNUTAR_LISTED_INCREMENTAL_DIR"
265 echo " Temporary: $AMANDA_TMPDIR"