1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-05 20:58:40 +03:00
Jelmer Vernooij d316c68cf3 r11257: Add and use output function
(This used to be commit 734da63a4e7ff44d9417066300383bbf7cd08d8f)
2007-10-10 13:45:09 -05:00

50 lines
817 B
Perl

#
# Environment class
#
# Samba Build Environment
#
# (C) 2005 Jelmer Vernooij <jelmer@samba.org>
#
# Published under the GNU GPL
package smb_build::env;
use smb_build::input;
use strict;
sub new($$)
{
my ($name, $config) = @_;
my $self = { };
bless $self, $name;
$self->set_config($config);
return $self;
}
sub set_config($$)
{
my ($self, $config) = @_;
$self->{config} = $config;
$self->{config}->{srcdir} = '.';
$self->{config}->{builddir} = '.';
if ($self->{config}->{prefix} eq "NONE") {
$self->{config}->{prefix} = $self->{config}->{ac_default_prefix};
}
if ($self->{config}->{exec_prefix} eq "NONE") {
$self->{config}->{exec_prefix} = $self->{config}->{prefix};
}
if ($self->{config}->{developer} eq "yes") {
$self->{developer} = 1;
} else {
$self->{developer} = 0;
}
}
1;