Take the first definition of a variable.
[openssl.git] / util / mk1mf.pl
index bb528f0c4b3e225375a9f61422bdc1842f43a57b..e19816f4f723f2efd57c15f04c8269ac78111c9c 100755 (executable)
@@ -69,7 +69,7 @@ open(IN,"<Makefile") || die "unable to open Makefile!\n";
 while(<IN>) {
     my ($mf_opt, $mf_ref);
     while (($mf_opt, $mf_ref) = each %mf_import) {
 while(<IN>) {
     my ($mf_opt, $mf_ref);
     while (($mf_opt, $mf_ref) = each %mf_import) {
-       if (/^$mf_opt\s*=\s*(.*)$/) {
+       if (/^$mf_opt\s*=\s*(.*)$/ && !defined($$mfref)) {
           $$mf_ref = $1;
        }
     }
           $$mf_ref = $1;
        }
     }