2 # Copyright (c) 2006 Zmanda Inc. All Rights Reserved.
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License version 2 as published
6 # by the Free Software Foundation.
8 # This program is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 # You should have received a copy of the GNU General Public License along
14 # with this program; if not, write to the Free Software Foundation, Inc.,
15 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # Contact information: Zmanda Inc, 505 N Mathlida Ave, Suite 120
18 # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
20 package Amanda::Paths;
24 Amanda::Paths - perl access to build-time configuration values
30 my $filename = "$amlibexecdir/foo/bar";
32 This package is a means of getting all of the necessary variables provided
33 by configure into Perl scripts, without a bunch of boilerplate, and without
34 requiring config.status substitution for every .pm file.
36 All of the variables in @EXPORT will be automatically imported into
37 your module's namespace. See the source, rather than the perldoc,
38 to find out what variables are available.
43 @ISA = qw( Exporter );
60 # the 'warnings' pragma doesn't recognized exported variables as "used", and generates warnings
61 # for variables only used once. We turn it off for this module.
64 ## basic filesystem layout
66 # these need to go in order, due to the way autoconf sets these dirs up
68 $exec_prefix = "@exec_prefix@";
70 $sbindir = "@sbindir@";
71 $libexecdir = "@libexecdir@";
72 $amlibexecdir = "@amlibexecdir@";
74 # (config.status worries if it doesn't see this:)
75 $datarootdir = "@datarootdir@";
77 ## amanda configuration directories
79 $AMANDA_TMPDIR = "@AMANDA_TMPDIR@";
80 $CONFIG_DIR = "@CONFIG_DIR@";
81 $AMANDA_DBGDIR = "@AMANDA_DBGDIR@";