Imported Upstream version 2.6.1
[debian/amanda] / perl / Amanda / Paths.pm.in
1 # vim:ft=perl
2 # Copyright (c) 2005-2008 Zmanda Inc.  All Rights Reserved.
3 #
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.
7 #
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
11 # for more details.
12 #
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
16 #
17 # Contact information: Zmanda Inc, 465 S Mathlida Ave, Suite 300
18 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
19
20 package Amanda::Paths;
21
22 =head1 NAME
23
24 Amanda::Paths - perl access to build-time configuration paths
25
26 =head1 SYNOPSIS
27
28   use Amanda::Paths;
29
30   my $filename = "$amlibexecdir/foo/bar";
31
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.
35
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.
39
40 =cut
41
42 use Exporter;
43 @ISA = qw( Exporter );
44
45 @EXPORT = qw(
46     $prefix
47     $exec_prefix
48     $bindir
49     $sbindir
50     $libexecdir
51     $amlibexecdir
52     $mandir
53     $datarootdir
54     $sysconfdir
55     $amdatadir
56
57     $AMANDA_TMPDIR
58     $CONFIG_DIR
59     $AMANDA_DBGDIR
60     $APPLICATION_DIR
61     $GNUTAR_LISTED_INCREMENTAL_DIR
62 );
63
64 # the 'warnings' pragma doesn't recognized exported variables as "used", and generates warnings
65 # for variables only used once.  We turn it off for this module.
66 no warnings;
67
68 ## basic filesystem layout
69
70 # these need to go in order, due to the way autoconf sets these dirs up
71 $prefix = "@prefix@";
72 $exec_prefix = "@exec_prefix@";
73 $bindir = "@bindir@";
74 $sbindir = "@sbindir@";
75 $libexecdir = "@libexecdir@";
76 $amlibexecdir = "@amlibexecdir@";
77 $mandir = "@mandir@";
78 # (config.status worries if it doesn't see this:)
79 $datarootdir = "@datarootdir@";
80 $sysconfdir = "@sysconfdir@";
81 $amdatadir = "@amdatadir@";
82
83 ## amanda configuration directories
84
85 $AMANDA_TMPDIR = "@AMANDA_TMPDIR@";
86 $CONFIG_DIR = "@CONFIG_DIR@";
87 $AMANDA_DBGDIR = "@AMANDA_DBGDIR@";
88 $APPLICATION_DIR = "@APPLICATION_DIR@";
89 $GNUTAR_LISTED_INCREMENTAL_DIR = "@GNUTAR_LISTED_INCREMENTAL_DIR@";
90
91 1;