Fix check of -DOPENSSL_USE_APPLINK in $config{cflags}
[openssl.git] / Configure
index bc753633f34a3fb564b088e8a2a362658738aba6..74ebfb1d457c0ffc11b5579f5fc921dc5941dcb3 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -269,12 +269,12 @@ my @disablables = (
     "ec_nistp_64_gcc_128",
     "egd",
     "engine",
-    "err",                     # Really???
+    "err",
     "heartbeats",
     "hmac",
     "hw(-.+)?",
     "idea",
-    "locking",                 # Really???
+    "locking",
     "md2",
     "md4",
     "md5",
@@ -292,6 +292,7 @@ my @disablables = (
     "rdrand",
     "rfc3779",
     "rijndael",                        # Old AES name
+    "ripemd",
     "rmd160",
     "rsa",
     "scrypt",
@@ -310,6 +311,8 @@ my @disablables = (
     "stdio",
     "threads",
     "tls",
+    "ts",
+    "ui",
     "unit-test",
     "whirlpool",
     "zlib",
@@ -772,13 +775,17 @@ foreach (sort (keys %disabled))
        elsif (/^sse2$/)
                { $no_sse2 = 1; }
        elsif (/^engine$/)
-               { @{$config{dirs}} = grep !/^engine$/, @{$config{dirs}}; }
+               {
+               @{$config{dirs}} = grep !/^engines$/, @{$config{dirs}};
+               @{$config{sdirs}} = grep !/^engine$/, @{$config{sdirs}};
+               push @{$config{openssl_other_defines}}, "OPENSSL_NO_ENGINE";
+               }
        else
                {
                my ($ALGO, $algo);
                ($ALGO = $algo = $_) =~ tr/[\-a-z]/[_A-Z]/;
 
-               if (/^asm$/ || /^err$/ || /^hw$/ || /^hw-/ || /^async$/
+               if (/^asm$/ || /^err$/ || /^hw$/ || /^hw-/
                                || /^autoalginit/ || /^autoerrinit/)
                        {
                        push @{$config{openssl_other_defines}}, "OPENSSL_NO_$ALGO";
@@ -1044,7 +1051,7 @@ if (!$no_asm) {
     $target{cpuid_asm_src}=$table{BASE}->{cpuid_asm_src} if ($config{processor} eq "386");
     $target{cpuid_asm_src}.=" uplink.c uplink-x86.s"
         if (grep { $_ eq "OPENSSL_USE_APPLINK"} @{$config{defines}}
-            || grep /(^|\s)-DOPENSSL_USE_APPLINK(\s|$)/, ${$config{cflags}});
+            || $config{cflags} =~ /(?:^|\s)-DOPENSSL_USE_APPLINK(?:\s|$)/);
 
     $target{bn_asm_src} =~ s/\w+-gf2m.c// if (defined($disabled{ec2m}));
 
@@ -1164,13 +1171,13 @@ if ($strict_warnings)
             unless $ecc eq 'gcc' || $ecc eq 'clang';
        foreach $wopt (split /\s+/, $gcc_devteam_warn)
                {
-               $config{cflags} .= " $wopt" unless ($config{cflags} =~ /(^|\s)$wopt(\s|$)/)
+               $config{cflags} .= " $wopt" unless ($config{cflags} =~ /(?:^|\s)$wopt(?:\s|$)/)
                }
        if ($ecc eq "clang")
                {
                foreach $wopt (split /\s+/, $clang_devteam_warn)
                        {
-                       $config{cflags} .= " $wopt" unless ($config{cflags} =~ /(^|\s)$wopt(\s|$)/)
+                       $config{cflags} .= " $wopt" unless ($config{cflags} =~ /(?:^|\s)$wopt(?:\s|$)/)
                        }
                }
        }
@@ -1179,7 +1186,7 @@ unless ($disabled{"crypto-mdebug-backtrace"})
        {
        foreach my $wopt (split /\s+/, $memleak_devteam_backtrace)
                {
-               $config{cflags} .= " $wopt" unless ($config{cflags} =~ /(^|\s)$wopt(\s|$)/)
+               $config{cflags} .= " $wopt" unless ($config{cflags} =~ /(?:^|\s)$wopt(?:\s|$)/)
                }
        if ($target =~ /^BSD-/)
                {