Merge tag 'upstream/3.3.3'
[debian/amanda] / installcheck / Installcheck.pm
index 291ef932e37542f16858578b9719488c94948536..60fcf556c5ee199d74462962e8d80e482089e655 100644 (file)
@@ -1,9 +1,10 @@
 # vim:ft=perl
-# Copyright (c) 2009, 2010 Zmanda, Inc.  All Rights Reserved.
+# Copyright (c) 2009-2012 Zmanda, 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 version 2 as published
-# by the Free Software Foundation.
+# 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
@@ -64,11 +65,18 @@ eventual use.
 use strict;
 use warnings;
 use Socket;
+require Exporter;
+
+our @ISA = qw(Exporter);
+our @EXPORT = qw( $srcdir );
 
 use Amanda::Util;
 
 our $TMP = "$AMANDA_TMPDIR/installchecks";
 
+# the Makefile provides srcdir to us in most cases; if not, assume it's "."
+our $srcdir = $ENV{'srcdir'} || '.';
+
 # run this just before the script actually executes
 # (not during syntax checks)
 INIT {