X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=Configure;h=64e30fe2a05462a48bcc9e6645659c56fe97cc8f;hp=737a471c1de25a0e504c2d70cc810406418348a7;hb=d3b2f8760a56da3e70c30e5614181f3798e4ad54;hpb=ad5be194c6b08e89f9a6e2a78b85ff19a3c40d40 diff --git a/Configure b/Configure index 737a471c1d..64e30fe2a0 100755 --- a/Configure +++ b/Configure @@ -265,6 +265,19 @@ if (grep /^reconf(igure)?$/, @argvcopy) { $config{perlargv} = [ @argvcopy ]; +# Historical: if known directories in crypto/ have been removed, it means +# that those sub-systems are disabled. +# (the other option would be to removed them from the SUBDIRS statement in +# crypto/build.info) +# We reverse the input list for cosmetic purely reasons, to compensate that +# 'unshift' adds at the front of the list (i.e. in reverse input order). +foreach ( reverse sort( 'aes', 'aria', 'bf', 'camellia', 'cast', 'des', 'dh', + 'dsa', 'ec', 'hmac', 'idea', 'md2', 'md5', 'mdc2', + 'rc2', 'rc4', 'rc5', 'ripemd', 'rsa', 'seed', 'sha', + 'sm2', 'sm3', 'sm4') ) { + unshift @argvcopy, "no-$_" if ! -d catdir($srcdir, 'crypto', $_); +} + # Collect version numbers my %version = (); @@ -1807,23 +1820,62 @@ if ($builder eq "unified") { # contains a dollar sign, it had better be escaped, or it will be # taken for a variable name prefix. my %variables = (); - my $variable_re = qr/\$(?P[[:alpha:]][[:alnum:]_]*)/; + # Variable name syntax + my $variable_name_re = qr/(?P[[:alpha:]][[:alnum:]_]*)/; + # Value modifier syntaxes + my $variable_subst_re = qr/\/(?P(?:\\\/|.)*?)\/(?P.*?)/; + # Put it all together + my $variable_re = qr/\$ + (?| + # Simple case, just the name + ${variable_name_re} + | + # Expressive case, with braces and possible + # modifier expressions + \{ + ${variable_name_re} + (?: + # Pile on modifier expressions, + # separated by | + ${variable_subst_re} + ) + \} + )/x; my $expand_variables = sub { my $value = ''; my $value_rest = shift; if ($ENV{CONFIGURE_DEBUG_VARIABLE_EXPAND}) { print STDERR - "DEBUG[\$expand_variables] Parsed '$value_rest' into:\n" + "DEBUG[\$expand_variables] Parsed '$value_rest' ...\n" } while ($value_rest =~ /(?{$ddest}->{$d} = 1; # Fix up associated attributes @@ -2234,9 +2276,6 @@ EOF # be a generated file in the build tree. if (! -f $ddest) { $ddest = cleanfile($buildd, $dest, $blddir); - if ($unified_info{rename}->{$ddest}) { - $ddest = $unified_info{rename}->{$ddest}; - } } } foreach my $v (@{$defines{$dest}}) {