alphacpuid.pl: fix brown-bag bug.
[openssl.git] / Configure
index f7e7618c655a72fc9f6ac7bbd145aeddbd22f362..6b5b6c21704f9c624c60d1b38e1e25388234c6d8 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1098,6 +1098,12 @@ my $ar = $ENV{'AR'} || "ar";
 my $arflags = $fields[$idx_arflags];
 my $multilib = $fields[$idx_multilib];
 
+# if $prefix/lib$multilib is not an existing directory, then
+# assume that it's not searched by linker automatically, in
+# which case adding $multilib suffix causes more grief than
+# we're ready to tolerate, so don't...
+$multilib="" if !-d "$prefix/lib$multilib";
+
 $libdir="lib$multilib" if $libdir eq "";
 
 $cflags = "$cflags$exp_cflags";
@@ -1402,7 +1408,7 @@ if ($aes_obj =~ /\.o$/)
        $cflags.=" -DAES_ASM";
        # aes_ctr.o is not a real file, only indication that assembler
        # module implements AES_ctr32_encrypt...
-       $cflags.=" -DAES_CTR_ASM" if ($aes_obj =~ s/\s*aes_ctr.o//);
+       $cflags.=" -DAES_CTR_ASM" if ($aes_obj =~ s/\s*aes_ctr\.o//);
        $aes_obj =~ s/\s*aesni\-x86\.o// if ($no_sse2);
        }
 else   {