summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/env.pm
blob: 62569efab3fe764ec025edd726f5ed35f7f4bd7a (plain)
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
#
# 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};
	}
}


1;