aboutsummaryrefslogtreecommitdiffstats
path: root/configure.pl
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-07-02 21:47:27 +0000
committerlloyd <[email protected]>2009-07-02 21:47:27 +0000
commit8de767ca1c8b36a4c0f942fbb2fd4c6d6fd520ce (patch)
tree3b970ddffdbe761dfdbfc879d64134f4ebcc858f /configure.pl
parent6912af20943ecafb57aa470988bbe5629f73587f (diff)
Minimal changes to configure.pl to deal with altered templates in build.h
for macro generation.
Diffstat (limited to 'configure.pl')
-rwxr-xr-xconfigure.pl27
1 files changed, 24 insertions, 3 deletions
diff --git a/configure.pl b/configure.pl
index f290f002d..73344b182 100755
--- a/configure.pl
+++ b/configure.pl
@@ -1250,7 +1250,7 @@ sub load_modules {
my $unaligned_ok = 0;
- my $gen_defines = sub {
+ my $target_os_defines = sub {
my @macro_list;
my $os = $$config{'os'};
@@ -1263,8 +1263,14 @@ sub load_modules {
push @macro_list, '#define BOTAN_TARGET_OS_HAS_' . uc $feature;
}
- push @macro_list, "";
}
+ return join("\n", @macro_list);
+ };
+
+ $$config{'target_os_defines'} = &$target_os_defines();
+
+ my $target_cpu_defines = sub {
+ my @macro_list;
my $arch = $$config{'arch'};
if($arch ne 'generic') {
@@ -1325,6 +1331,13 @@ sub load_modules {
# variable is always set (one or zero)
push @macro_list,
"#define BOTAN_TARGET_UNALIGNED_LOADSTOR_OK $unaligned_ok";
+ return join("\n", @macro_list);
+ };
+
+ $$config{'target_cpu_defines'} = &$target_cpu_defines();
+
+ my $target_compiler_defines = sub {
+ my @macro_list;
if(defined($$config{'tr1'})) {
my $tr1 = $$config{'tr1'};
@@ -1340,6 +1353,14 @@ sub load_modules {
}
}
+ return join("\n", @macro_list);
+ };
+
+ $$config{'target_compiler_defines'} = &$target_compiler_defines();
+
+ my $gen_defines = sub {
+ my @macro_list;
+
my %defines;
foreach my $mod (sort keys %{$$config{'modules'}}) {
@@ -1363,7 +1384,7 @@ sub load_modules {
return join("\n", @macro_list);
};
- $$config{'defines'} = &$gen_defines();
+ $$config{'module_defines'} = &$gen_defines();
}
##################################################