aboutsummaryrefslogtreecommitdiffstats
path: root/configure.pl
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-10-23 13:27:05 +0000
committerlloyd <[email protected]>2008-10-23 13:27:05 +0000
commit4ab25e28126c6b60c6ef3f8afcc17bcff24eba98 (patch)
tree5b7a2ea5709024be1bd8c981a8a3f1b1384a3934 /configure.pl
parent7a36a3c0fdea73c671c79f3e9e7a22b8c42ae04f (diff)
Allow setting an environmental variable CPUINFO to override the name
of /proc/cpuinfo in configure.pl This is probably only useful for testing.
Diffstat (limited to 'configure.pl')
-rwxr-xr-xconfigure.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.pl b/configure.pl
index 58d0f9f42..a38f3f101 100755
--- a/configure.pl
+++ b/configure.pl
@@ -2159,6 +2159,17 @@ sub guess_cpu
# what kind of CPU we're running on.
my $cpuinfo = '/proc/cpuinfo';
+ if(defined($ENV{'CPUINFO'})) {
+ my $cpuinfo_env = $ENV{'CPUINFO'};
+
+ if(-e $cpuinfo_env and -r $cpuinfo_env) {
+ autoconfig("Will use $cpuinfo_env as /proc/cpuinfo");
+ $cpuinfo = $cpuinfo_env;
+ } else {
+ warn("Could not read from ENV /proc/cpuinfo ($cpuinfo_env)");
+ }
+ }
+
if(-e $cpuinfo and -r $cpuinfo)
{
open CPUINFO, $cpuinfo or die "Could not read $cpuinfo\n";