diff options
-rwxr-xr-x | configure.pl | 27 |
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(); } ################################################## |