The unified diff between revisions [896e59c2..] and [02b6f12c..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'configure.pl'
#
#
# patch "configure.pl"
# from [130f61cfc0da8645639bd74a65fa5b9f85d88d1a]
# to [47c34d1c5e924c819aaf04bd3f0965f2d5c13121]
#
============================================================
--- configure.pl 130f61cfc0da8645639bd74a65fa5b9f85d88d1a
+++ configure.pl 47c34d1c5e924c819aaf04bd3f0965f2d5c13121
@@ -8,8 +8,8 @@ my $MAJOR_VERSION = 1;
use File::Copy;
my $MAJOR_VERSION = 1;
-my $MINOR_VERSION = 5;
-my $PATCH_VERSION = 12;
+my $MINOR_VERSION = 6;
+my $PATCH_VERSION = 2;
my $VERSION_STRING = "$MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION";
@@ -117,8 +117,9 @@ sub main {
},
'check_src' => {
- map_to($$config{'checks-dir'}, grep { $_ ne 'keys' and !m@\.(dat|h)$@ }
- dir_list($$config{'checks-dir'}))
+ map_to($$config{'checks-dir'},
+ grep { $_ ne 'keys' and !m@\.(dat|h)$@ }
+ dir_list($$config{'checks-dir'}))
}
});
@@ -143,7 +144,8 @@ sub where_am_i {
sub where_am_i {
my ($volume,$dir,$file) = File::Spec->splitpath($0);
my $src_dir = File::Spec->catpath($volume, $dir, '');
- return $src_dir;
+ return $src_dir if $src_dir;
+ return File::Spec->curdir();
}
##################################################
@@ -548,8 +550,7 @@ sub my_compiler {
croak('my_compiler called, but no compiler set in config')
unless defined $cc and $cc ne '';
- croak("unknown compiler $cc")
- unless defined $COMPILER{$cc};
+ croak("unknown compiler $cc") unless defined $COMPILER{$cc};
return %{$COMPILER{$cc}};
}
@@ -1491,8 +1492,13 @@ sub generate_makefile {
'install_group' => os_info_for($os, 'install_group'),
});
+ my $is_in_doc_dir =
+ sub { -e File::Spec->catfile($$config{'doc-dir'}, $_[0]) };
+
my $docs = file_list(undef, undef, undef,
- map_to($$config{'doc-dir'}, @DOCS));
+ map_to($$config{'doc-dir'},
+ grep { &$is_in_doc_dir($_); } @DOCS));
+
$docs .= File::Spec->catfile($$config{'base-dir'}, 'readme.txt');
my $includes = file_list(undef, undef, undef,
@@ -1575,9 +1581,12 @@ sub guess_cpu_from_this
$cpu = 'pentium3' if($cpuinfo =~ /pentium 3/);
$cpu = 'pentium2' if($cpuinfo =~ /pentium 2/);
- $cpu = 'amd64' if($cpuinfo =~ /athlon64/);
- $cpu = 'amd64' if($cpuinfo =~ /opteron/);
+ $cpu = 'core2duo' if($cpuinfo =~ /intel\(r\) core\(tm\)2/);
+ $cpu = 'athlon64' if($cpuinfo =~ /athlon64/);
+ $cpu = 'athlon64' if($cpuinfo =~ /athlon\(tm\) 64/);
+ $cpu = 'opteron' if($cpuinfo =~ /opteron/);
+
# The 32-bit SPARC stuff is impossible to match to arch type easily, and
# anyway the uname stuff will pick up that it's a SPARC so it doesn't
# matter. If it's an Ultra, assume a 32-bit userspace, no 64-bit code
@@ -1651,38 +1660,38 @@ sub guess_triple
# If guess_cpu_from_this didn't figure it out, try it plain
if($cpu eq '') { $cpu = lc $uname_p; }
- my (%SUBMODEL_ALIAS, %ARCH_ALIAS, %ARCH);
+ sub known_arch {
+ my ($name) = @_;
- foreach my $arch (keys %CPU) {
- my %info = %{$CPU{$arch}};
+ foreach my $arch (keys %CPU) {
+ my %info = %{$CPU{$arch}};
- $ARCH{$arch} = $info{'name'};
- foreach my $submodel (@{$info{'submodels'}}) {
- $ARCH{$submodel} = $info{'name'};
- }
+ return 1 if $name eq $info{'name'};
+ foreach my $submodel (@{$info{'submodels'}}) {
+ return 1 if $name eq $submodel;
+ }
- foreach my $alias (@{$info{'aliases'}}) {
- $ARCH_ALIAS{$alias} = $arch;
- }
+ foreach my $alias (@{$info{'aliases'}}) {
+ return 1 if $name eq $alias;
+ }
- if(defined($info{'submodel_aliases'})) {
- my %submodel_aliases = %{$info{'submodel_aliases'}};
- foreach my $sm_alias (keys %submodel_aliases) {
- $SUBMODEL_ALIAS{$sm_alias} =
- $submodel_aliases{$sm_alias};
+ if(defined($info{'submodel_aliases'})) {
+ my %submodel_aliases = %{$info{'submodel_aliases'}};
+ foreach my $sm_alias (keys %submodel_aliases) {
+ return 1 if $name eq $sm_alias;
+ }
}
}
+ return 0;
}
- if(!defined $ARCH{$cpu} && !defined $SUBMODEL_ALIAS{$cpu} &&
- !defined $ARCH_ALIAS{$cpu})
+ if(!known_arch($cpu))
{
# Nope, couldn't figure out uname -p
$cpu = lc `uname -m 2>/dev/null`;
chomp $cpu;
- if(!defined $ARCH{$cpu} && !defined $SUBMODEL_ALIAS{$cpu} &&
- !defined $ARCH_ALIAS{$cpu})
+ if(!known_arch($cpu))
{
$cpu = 'generic';
}