summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2016-03-11 12:33:59 +0100
committerAndy Polyakov <appro@openssl.org>2016-03-11 15:26:55 +0100
commitd0db7ee0b1dfc72a5e7c105040b8580ee57e99eb (patch)
treec94c968e1a4e644a8301221cce69b8a666d64609 /Configure
parent680ddc996b603c5f064f8047e05cf5cc0d61b735 (diff)
Configure: remove dependency on 'head'.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure8
1 files changed, 5 insertions, 3 deletions
diff --git a/Configure b/Configure
index eeae03e229..413efb09ad 100755
--- a/Configure
+++ b/Configure
@@ -1101,8 +1101,8 @@ if ($^O ne "VMS" && !$disabled{makedepend}) {
# Is the compiler gcc or clang? $ecc is used below to see if
# error-checking can be turned on.
my $ccpcc = "$config{cross_compile_prefix}$target{cc}";
- $config{makedepprog} = which('makedepend');
- open(PIPE, "$ccpcc --version 2>&1 | head -2 |");
+ open(PIPE, "$ccpcc --version 2>&1 |");
+ my $lines = 2;
while ( <PIPE> ) {
# Find the version number and save the major.
m|(?:.*)\b(\d+)\.\d+\.\d+\b(?:.*)|;
@@ -1110,12 +1110,14 @@ if ($^O ne "VMS" && !$disabled{makedepend}) {
# We know that GNU C version 3 and up as well as all clang
# versions support dependency generation
$config{makedepprog} = $ccpcc
- if /clang/ || (/gcc/ && $compiler_major > 3);
+ if (/clang/ || (/gcc/ && $compiler_major > 3));
$ecc = "clang" if /clang/;
$ecc = "gcc" if /gcc/;
+ last if ($config{makedepprog} || !$lines--);
}
close(PIPE);
+ $config{makedepprog} = which('makedepend') unless $config{makedepprog};
$disabled{makedepend} = "unavailable" unless $config{makedepprog};
}