Check for OPENSSL_USE_APPLINK in $config{cflags} as well
[openssl.git] / Configure
index c2df734..0cf893e 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1045,7 +1045,9 @@ if ($target{ranlib} eq "")
 
 if (!$no_asm) {
     $target{cpuid_asm_src}=$table{BASE}->{cpuid_asm_src} if ($config{processor} eq "386");
 
 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}});
+    $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}});
 
     $target{bn_asm_src} =~ s/\w+-gf2m.c// if (defined($disabled{ec2m}));
 
 
     $target{bn_asm_src} =~ s/\w+-gf2m.c// if (defined($disabled{ec2m}));