Process MINFO file earlier in mk1mf.pl so it can modify variables like CFLAGS.
authorDr. Stephen Henson <steve@openssl.org>
Wed, 20 Apr 2005 16:22:58 +0000 (16:22 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 20 Apr 2005 16:22:58 +0000 (16:22 +0000)
Process kerberos include and library options.

util/mk1mf.pl

index 51ffe07cfcb079ceae92a60e546e4aaf46d51a20..2a4c8c34cea6a15a3033209f312113858eed72b0 100755 (executable)
@@ -274,6 +274,63 @@ $link="$bin_dir$link" if ($link !~ /^\$/);
 
 $INSTALLTOP =~ s|/|$o|g;
 
+#############################################
+# We parse in input file and 'store' info for later printing.
+open(IN,"<$infile") || die "unable to open $infile:$!\n";
+$_=<IN>;
+for (;;)
+       {
+       chop;
+
+       ($key,$val)=/^([^=]+)=(.*)/;
+       if ($key eq "RELATIVE_DIRECTORY")
+               {
+               if ($lib ne "")
+                       {
+                       $uc=$lib;
+                       $uc =~ s/^lib(.*)\.a/$1/;
+                       $uc =~ tr/a-z/A-Z/;
+                       $lib_nam{$uc}=$uc;
+                       $lib_obj{$uc}.=$libobj." ";
+                       }
+               last if ($val eq "FINISHED");
+               $lib="";
+               $libobj="";
+               $dir=$val;
+               }
+
+       if ($key eq "KRB5_INCLUDES")
+               { $cflags .= " $val";}
+
+       if ($key eq "LIBKRB5")
+               { $ex_libs .= " $val";}
+
+       if ($key eq "TEST")
+               { $test.=&var_add($dir,$val); }
+
+       if (($key eq "PROGS") || ($key eq "E_OBJ"))
+               { $e_exe.=&var_add($dir,$val); }
+
+       if ($key eq "LIB")
+               {
+               $lib=$val;
+               $lib =~ s/^.*\/([^\/]+)$/$1/;
+               }
+
+       if ($key eq "EXHEADER")
+               { $exheader.=&var_add($dir,$val); }
+
+       if ($key eq "HEADER")
+               { $header.=&var_add($dir,$val); }
+
+       if ($key eq "LIBOBJ")
+               { $libobj=&var_add($dir,$val); }
+
+       if (!($_=<IN>))
+               { $_="RELATIVE_DIRECTORY=FINISHED\n"; }
+       }
+close(IN);
+
 $defs= <<"EOF";
 # This makefile has been automatically generated from the OpenSSL distribution.
 # This single makefile will build the complete OpenSSL distribution and
@@ -492,57 +549,6 @@ printf OUT "  #define DATE \"%s\"\n", scalar gmtime();
 printf OUT "#endif\n";
 close(OUT);
 
-#############################################
-# We parse in input file and 'store' info for later printing.
-open(IN,"<$infile") || die "unable to open $infile:$!\n";
-$_=<IN>;
-for (;;)
-       {
-       chop;
-
-       ($key,$val)=/^([^=]+)=(.*)/;
-       if ($key eq "RELATIVE_DIRECTORY")
-               {
-               if ($lib ne "")
-                       {
-                       $uc=$lib;
-                       $uc =~ s/^lib(.*)\.a/$1/;
-                       $uc =~ tr/a-z/A-Z/;
-                       $lib_nam{$uc}=$uc;
-                       $lib_obj{$uc}.=$libobj." ";
-                       }
-               last if ($val eq "FINISHED");
-               $lib="";
-               $libobj="";
-               $dir=$val;
-               }
-
-       if ($key eq "TEST")
-               { $test.=&var_add($dir,$val); }
-
-       if (($key eq "PROGS") || ($key eq "E_OBJ"))
-               { $e_exe.=&var_add($dir,$val); }
-
-       if ($key eq "LIB")
-               {
-               $lib=$val;
-               $lib =~ s/^.*\/([^\/]+)$/$1/;
-               }
-
-       if ($key eq "EXHEADER")
-               { $exheader.=&var_add($dir,$val); }
-
-       if ($key eq "HEADER")
-               { $header.=&var_add($dir,$val); }
-
-       if ($key eq "LIBOBJ")
-               { $libobj=&var_add($dir,$val); }
-
-       if (!($_=<IN>))
-               { $_="RELATIVE_DIRECTORY=FINISHED\n"; }
-       }
-close(IN);
-
 # Strip of trailing ' '
 foreach (keys %lib_obj) { $lib_obj{$_}=&clean_up_ws($lib_obj{$_}); }
 $test=&clean_up_ws($test);