Blob Blame History Raw
# vim:ft=perl
# Copyright (c) 2008-2012 Zmanda, Inc.  All Rights Reserved.
# Copyright (c) 2013-2016 Carbonite, Inc.  All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
#
# Contact information: Carbonite Inc., 756 N Pastoria Ave
# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com

package Amanda::Constants;

=head1 NAME

Amanda::Constants - perl access to build-time configuration values

=head1 SYNOPSIS

  use Amanda::Constants;

  my $default_config = $Amanda::Constants::DEFAULT_CONFIG;

This package is a means of getting all of the necessary variables
provided by configure into Perl scripts, without a bunch of
boilerplate, and without requiring config.status substitution for
every .pm file.  

This module does not automatically export any of its values.

See the source for the list of constants available.

=cut

# the 'warnings' pragma doesn't recognized exported variables as "used", and generates warnings
# for variables only used once.  We turn it off for this module.
no warnings;

# (keep this list sorted in alphabetical order, for ease of updates)

$AIX_BACKUP = "@AIX_BACKUP@";
$AMANDA_COMPONENTS = "@AMANDA_COMPONENTS@";
$AMANDA_DEBUG_DAYS = "@AMANDA_DEBUG_DAYS@";
$ASSERTIONS = "@ASSERTIONS@";
$BSDTAR = "@BSDTAR@";
$BSDTCP_SECURITY = "@BSDTCP_SECURITY@";
$BSDUDP_SECURITY = "@BSDUDP_SECURITY@";
$BSD_SECURITY = "@BSD_SECURITY@";
$BUILT_BRANCH = "@BUILT_BRANCH@";
$BUILT_DATE = "@BUILT_DATE@";
$BUILT_REV = "@BUILT_REV@";
$CC = "@CC@";
$CHECK_USERID = "@CHECK_USERID@";
$CLIENT_LOGIN = "@CLIENT_LOGIN@";
$COMPRESS_BEST_OPT = "@COMPRESS_BEST_OPT@";
$COMPRESS_FAST_OPT = "@COMPRESS_FAST_OPT@";
$COMPRESS_PATH = "@COMPRESS_PATH@";
$COMPRESS_SUFFIX = "@COMPRESS_SUFFIX@";
$DD = "@DD@";
$DEFAULT_AMANDATES_FILE = "@DEFAULT_AMANDATES_FILE@";
$DEFAULT_CONFIG = "@DEFAULT_CONFIG@";
$DEFAULT_SERVER = "@DEFAULT_SERVER@";
$DEFAULT_TAPE_DEVICE = "@DEFAULT_TAPE_DEVICE@";
$DEFAULT_TAPE_SERVER = "@DEFAULT_TAPE_SERVER@";
$DUMP = "@DUMP@";
$DUMP_RETURNS_1 = "@DUMP_RETURNS_1@";
$FAILURE_CODE = "@FAILURE_CODE@";
$GNUTAR = "@GNUTAR@";
$HAVE_GZIP = "@HAVE_GZIP@";
$KRB5_SECURITY = "@KRB5_SECURITY@";
$LOCKING = "@LOCKING@";
$MAILER = "@MAILER@";
$MT = "@MT@";
$MTX = "@MTX@";
$MOUNT = "@MOUNT@";
$UMOUNT = "@UMOUNT@";
$LPR = "@LPR@";
$LPRFLAG = "@LPRFLAG@";
$PS = "@PS@";
$PS_ARGUMENT = "@PS_ARGUMENT@";
$PS_ARGUMENT_ARGS = "@PS_ARGUMENT_ARGS@";
$REST_EXTENSIONS_DIR = "@REST_EXTENSIONS_DIR@";
$RESTORE = "@RESTORE@";
$RSH_SECURITY = "@RSH_SECURITY@";
$SAMBA_CLIENT = "@SAMBA_CLIENT@";
$SSH_SECURITY = "@SSH_SECURITY@";
$STAR = "@STAR@";
$SUNTAR = "@SUNTAR@";
$UNCOMPRESS_OPT = "@UNCOMPRESS_OPT@";
$UNCOMPRESS_PATH = "@UNCOMPRESS_PATH@";
$SORT_PATH = "@SORT_PATH@";
$USE_AMANDAHOSTS = "@USE_AMANDAHOSTS@";
$USE_RUNDUMP = "@USE_RUNDUMP@";
$VDUMP = "@VDUMP@";
$VERSION = "@VERSION@";
$VERSION_MAJOR = "@VERSION_MAJOR@";
$VERSION_MINOR = "@VERSION_MINOR@";
$VERSION_PATCH = "@VERSION_PATCH@";
$VERSION_COMMENT = "@VERSION_COMMENT@";
$VRESTORE = "@VRESTORE@";
$VXDUMP = "@VXDUMP@";
$VXRESTORE = "@VXRESTORE@";
$XFSDUMP = "@XFSDUMP@";
$XFSRESTORE = "@XFSRESTORE@";
$NC = "@NC@";
$NC6 = "@NC6@";
$NETCAT = "@NETCAT@";
$AMANDA_DEVICES = "@AMANDA_DEVICES@";
$SINGLE_USERID = "@SINGLE_USERID@";

# non-AC_SUBST'd constants

$DATA_FD_OFFSET = 150;
$DATA_FD_COUNT = 4;

1;