3 # AMANDA_WITH_APPLICATIONDIR
7 # Define and substitute APPLICATION_DIR with the result.
9 AC_DEFUN([AMANDA_WITH_APPLICATIONDIR],
11 AC_ARG_WITH(dumperdir,
12 AS_HELP_STRING([--with-dumperdir=DIR],
13 [where we install the dumpers (deprecated)]),
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 APPLICATION_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 # - amdatadir = --with-amdatadir or ${datadir}/amanda
160 # - amlibdir = --with-amlibdir or ${libdir}/amanda
161 # - amlibexecdir = --with-amlibexecdir or ${libexecdir}/amanda
162 # - amincludedir = ${includedir}/amanda
163 # - amperldir = --with-amperldir or `perl -V:installsitearch`
164 # - APPLICATION_DIR = ${amlibexecdir}/application
166 AC_DEFUN([AMANDA_EXPAND_DIRS],
168 AC_REQUIRE([AMANDA_PROG_PERL])
170 AC_DEFINE_DIR([bindir], [bindir],
171 [Directory in which user binaries should be installed. ])
173 AC_DEFINE_DIR([sbindir], [sbindir],
174 [Directory in which administrator binaries should be installed. ])
176 AC_DEFINE_DIR([libexecdir], [libexecdir],
177 [Directory in which internal binaries should be installed. ])
179 AC_DEFINE_DIR([mandir], [mandir],
180 [Directory in which man-pages should be installed])
183 # amanda-specific directories
184 AMLIBDIR=$libdir/amanda
185 AC_ARG_WITH(amlibdir,
186 AS_HELP_STRING([--with-amlibdir[[[[[=PATH]]]]]],
187 [Where library are installed, default: $libdir/amanda])
188 AS_HELP_STRING([--without-amlibdir],
189 [Library are installed in $libdir]),
192 n | no) AMLIBDIR=$libdir ;;
193 y | ye | yes) AMLIBDIR=$libdir/amanda ;;
194 *) AMLIBDIR=$withval ;;
198 AC_DEFINE_DIR([amlibdir], [AMLIBDIR],
199 [Directory in which Amanda libraries should be installed])
201 AMLIBEXECDIR=$libexecdir/amanda
202 AC_ARG_WITH(amlibexecdir,
203 AS_HELP_STRING([--with-amlibexecdir[[[[[=PATH]]]]]],
204 [Where amanda own programs are installed, default: $libexecdir/amanda])
205 AS_HELP_STRING([--without-amlibexecdir],
206 [Amanda own programs are installed in $libexecdir]),
209 n | no) AMLIBEXECDIR=$libexecdir ;;
210 y | ye | yes) AMLIBEXECDIR=$libexecdir/amanda ;;
211 *) AMLIBEXECDIR=$withval ;;
215 AC_DEFINE_DIR([amlibexecdir], [AMLIBEXECDIR],
216 [Directory in which Amanda own programs should be installed])
218 amincludedir="${includedir}/amanda"
219 AC_DEFINE_DIR([amincludedir], [amincludedir],
220 [Directory in which Amanda header files should be installed])
222 AC_ARG_WITH(amperldir,
223 AS_HELP_STRING([--with-amperldir[[[[[=PATH]]]]]],
224 [Where amanda's perl modules are installed; default: installsitelib])
225 AS_HELP_STRING([--without-amperldir],
226 [Install amanda's perl modules in $amlibdir/perl]),
229 y | ye | yes) AMPERLLIB=DEFAULT ;;
230 n | no) AMPERLLIB=$amlibdir/perl ;;
231 *) AMPERLLIB=$withval ;;
237 # apply the default if no value was given.
238 if test x"$AMPERLLIB" = x"DEFAULT"; then
239 eval `$PERL -V:installsitelib`
240 AMPERLLIB=$installsitelib
242 AC_DEFINE_DIR([amperldir], [AMPERLLIB],
243 [Directory in which perl modules should be installed])
245 APPLICATION_DIR='${amlibexecdir}/application'
246 AC_DEFINE_DIR([APPLICATION_DIR],[APPLICATION_DIR],
247 [Directory in which dumper interfaces should be installed and searched. ])
249 AC_ARG_WITH(amdatadir,
250 AS_HELP_STRING([--with-amdatadir[[[[[=PATH]]]]]],
251 [Where amanda's templates and examples are installed; default: $datadir/amanda]),
255 AMDATADIR=$datadir/amanda
258 AC_DEFINE_DIR([amdatadir], [AMDATADIR],
259 [Directory in which amanda's templates and examples are installed. ])
264 # AMANDA_SHOW_DIRS_SUMMARY
268 # Show a summary of the settings from this file.
270 AC_DEFUN([AMANDA_SHOW_DIRS_SUMMARY],
273 echo " Application: $APPLICATION_DIR"
274 echo " Configuration: $CONFIG_DIR"
275 echo " GNU Tar lists: $GNUTAR_LISTED_INCREMENTAL_DIR"
276 echo " Perl modules (amperldir): $amperldir"
277 echo " Template and example data files (amdatadir): $amdatadir"
278 echo " Temporary: $AMANDA_TMPDIR"