X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=Configure;h=215ffb87f2c7f300599f6e51a86b245163552d38;hp=43a326a7c15b2bc71f811f22818aa67510f0df7d;hb=1c7bfec5982210b2666a91771777c56338cf4d8d;hpb=c145d19771d7197cda69c38ab74e7d269322b34d diff --git a/Configure b/Configure index 43a326a7c1..215ffb87f2 100755 --- a/Configure +++ b/Configure @@ -14,6 +14,7 @@ use strict; use File::Basename; use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs/; use File::Path qw/mkpath/; +use IPC::Cmd qw/can_run/; # see INSTALL for instructions. @@ -355,6 +356,7 @@ foreach my $proto ((@tls, @dtls)) my @deprecated_disablables = ( "ssl2", + "buf-freelists", ); # All of the following is disabled by default (RC5 was enabled before 0.9.8): @@ -909,9 +911,13 @@ $config{cross_compile_prefix} = $ENV{'CROSS_COMPILE'} # Allow overriding the names of some tools. USE WITH CARE $config{perl} = $ENV{'PERL'} || ($^O ne "VMS" ? $^X : "perl"); $target{cc} = $ENV{'CC'} || $target{cc} || "cc"; -$target{ranlib} = $ENV{'RANLIB'} || $target{ranlib} || which("ranlib") || "true"; +$target{ranlib} = $ENV{'RANLIB'} || $target{ranlib} || + (scalar can_run("$config{cross_compile_prefix}ranlib") ? + "\$(CROSS_COMPILE)ranlib" : "true"); $target{ar} = $ENV{'AR'} || $target{ar} || "ar"; $target{nm} = $ENV{'NM'} || $target{nm} || "nm"; +$target{rc} = + $ENV{'RC'} || $ENV{'WINDRES'} || $target{rc} || "windres"; # For cflags, lflags, plib_lflags, ex_libs and defines, add the debug_ # or release_ attributes. @@ -1151,7 +1157,7 @@ if ($^O ne "VMS" && !$disabled{makedepend}) { } close(PIPE); - $config{makedepprog} = which('makedepend') unless $config{makedepprog}; + $config{makedepprog} = scalar can_run('makedepend') unless $config{makedepprog}; $disabled{makedepend} = "unavailable" unless $config{makedepprog}; } @@ -1873,7 +1879,7 @@ print OUT "1;\n"; close(OUT); -print "CC =$target{cc}\n"; +print "CC =$config{cross_compile_prefix}$target{cc}\n"; print "CFLAG =$target{cflags} $config{cflags}\n"; print "SHARED_CFLAG =$target{shared_cflag}\n"; print "DEFINES =",join(" ", @{$target{defines}}, @{$config{defines}}),"\n"; @@ -1901,7 +1907,9 @@ print "CHACHA_ENC =$target{chacha_obj}\n"; print "POLY1305_OBJ =$target{poly1305_obj}\n"; print "BLAKE2_OBJ =$target{blake2_obj}\n"; print "PROCESSOR =$config{processor}\n"; -print "RANLIB =$target{ranlib}\n"; +print "RANLIB =", $target{ranlib} eq '$(CROSS_COMPILE)ranlib' ? + "$config{cross_compile_prefix}ranlib" : + "$target{ranlib}", "\n"; print "ARFLAGS =$target{arflags}\n"; print "PERL =$config{perl}\n"; print "\n"; @@ -2458,22 +2466,6 @@ sub absolutedir { return realpath($dir); } -sub which - { - my($name)=@_; - my $path; - foreach $path (split /:/, $ENV{PATH}) - { - my $fullpath = "$path/$name$target{exe_extension}"; - if (-f $fullpath and -x $fullpath) - { - return $fullpath - unless ($name eq "perl" and - system("$fullpath -e " . '\'exit($]<5.0);\'')); - } - } - } - sub quotify { my %processors = ( perl => sub { my $x = shift;