1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
package Lire::Config::Build;
use strict;
use vars qw( $VERSION %ac @ISA @EXPORT_OK );
sub coalesce {
my $x;
$x = shift while @_ && !defined $x;
return $x;
}
BEGIN {
($VERSION) = '$Revision: 1.8 $' =~ m!Revision: ([.\d]+)!;
@ISA = qw(Exporter);
@EXPORT_OK = qw(ac_info ac_path ac_flags);
%ac = (
exec_prefix => '${prefix}',
prefix => '/usr/local',
program_transform_name => 's,x,x,',
bindir => '${exec_prefix}/bin',
sbindir => '${exec_prefix}/sbin',
libexecdir => '${exec_prefix}/libexec',
datadir => '${prefix}/share',
sysconfdir => '${prefix}/etc',
sharedstatedir => '${prefix}/com',
localstatedir => '${prefix}/var',
libdir => '${exec_prefix}/lib',
includedir => '${prefix}/include',
oldincludedir => '/usr/include',
infodir => '${prefix}/share/info',
mandir => '${prefix}/share/man',
INSTALL_PROGRAM => '${INSTALL}',
INSTALL_SCRIPT => '${INSTALL}',
INSTALL_DATA => '${INSTALL} -m 644',
PACKAGE => 'lire',
VERSION => '2.1',
SHELL => '/bin/bash',
CFLAGS => '@CFLAGS@',
CPPFLAGS => '@CPPFLAGS@',
CXXFLAGS => '@CXXFLAGS@',
FFLAGS => '@FFLAGS@',
DEFS => '-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"lire\" -DVERSION=\"2.1\"',
LDFLAGS => '@LDFLAGS@',
LIBS => '',
PERL => '/usr/bin/perl',
LR_PERL5LIB => '/usr/local/share/perl5',
GZIP => '/bin/gzip',
SENDMAIL => '/usr/sbin/sendmail',
PLOTICUS => '/usr/bin/ploticus',
TAR => '/bin/tar',
GHOSTSCRIPT => '/usr/bin/gs',
LR_ARCHIVEDIR => '/usr/local/var/lib/lire/data',
);
# calculate the transitive closure of any substitutions
my $changed;
do {
$changed = 0;
while(my ($k, $v) = each(%ac)) {
$changed ||= $ac{$k} =~ s/\$\{([^}]+)\}/coalesce($ac{$1}, $ENV{$1}, '')/e;
$changed ||= $ac{$k} =~ s/\$([A-Za-z][A-Za-z0-9_]*)/coalesce($ac{$1}, $ENV{$1}, '')/e;
}
} while($changed);
}
sub ac_info {
return $ac{$_[0]};
}
sub ac_path {
return join('/', map { ac_info($_) } @_);
}
sub ac_flags {
return join(' ', map { ac_info($_) } @_);
}
# keep perl happy
1;
__END__
=pod
=head1 NAME
Lire::Config::Build - Look up build-time information
=head1 SYNOPSIS
This module provides build-time information to the configuration
module. It is primarily intended to be used internally by the
configuration module but can be used elsewhere as well. Consider
using the proper configuration though, since the user may wish to
override certain parameters.
=head1 DESCRIPTION
=head1 VERSION
$Id: Build.pm.in,v 1.8 2006/07/23 13:16:30 vanbaal Exp $
=head1 COPYRIGHT
Copyright (C) 2001 Stichting LogReport Foundation LogReport@LogReport.org
This file is part of Lire.
Lire 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 (see COPYING); if not, check with
http://www.gnu.org/copyleft/gpl.html.
=head1 AUTHOR
Wessel Dankers <wsl@logreport.org>
=cut
# Local Variables:
# mode: cperl
# End:
|