Misc fixes in util/mk1mf.pl
[openssl.git] / util / mk1mf.pl
index 07968c4148ada58d2966400165f2883dc87388df..4b5acbe81b7cd4a6f311f88f74dd46cfefd7abc5 100755 (executable)
@@ -310,6 +310,7 @@ $cflags.=" -DOPENSSL_NO_JPAKE"    if $no_jpake;
 $cflags.=" -DOPENSSL_NO_EC2M"    if $no_ec2m;
 $cflags.= " -DZLIB" if $zlib_opt;
 $cflags.= " -DZLIB_SHARED" if $zlib_opt == 2;
+$cflags.=" -DOPENSSL_PIC" if $shlib;
 
 if ($no_static_engine)
        {
@@ -553,8 +554,10 @@ if ($fips)
                        {
                        open (IN, "util/fipslib_path.txt") || fipslib_error();
                        $fipslibdir = <IN>;
-                       chomp $fipslibdir;
                        close IN;
+                       $fipslibdir = "" unless defined($fipslibdir);
+                       $fipslibdir =~ s{\R$}{};
+                       fipslib_error() if ($fipslibdir eq "");
                        }
                fips_check_files($fipslibdir,
                                "fipscanister.lib", "fipscanister.lib.sha1",
@@ -670,7 +673,7 @@ EX_LIBS=$ex_libs
 # The OpenSSL directory
 SRC_D=$src_dir
 
-LINK=$link
+LINK_CMD=$link
 LFLAGS=$lflags
 RSC=$rsc
 FIPSLINK=\$(PERL) util${o}fipslink.pl
@@ -1159,7 +1162,7 @@ sub do_defs
                elsif ($var eq "SSLOBJ")
                        { $ret.="\$(OBJ_D)\\\$(SSL).res "; }
                }
-       chomp($ret);
+       chomp($ret);            # Does this actually do something? /RL
        $ret.="\n\n";
        return($ret);
        }
@@ -1403,6 +1406,7 @@ sub read_options
                "no-gost" => \$no_gost,
                "no-engine" => \$no_engine,
                "no-egd" => 0,
+               "no-heartbeats" => 0,
                "no-hw" => \$no_hw,
                "no-async" => \$no_async,
                "no-autoalginit" => \$no_autoalginit,
@@ -1434,6 +1438,7 @@ sub read_options
                "no-deprecated" => 0,
                "no-ocb" => 0,
                "no-crypto-mdebug" => 0,
+               "no-crypto-mdebug-backtrace" => 0,
                "fips" => \$fips,
                "fipscanisterbuild" => [\$fips, \$fipscanisterbuild],
                "fipscanisteronly" => [\$fips, \$fipscanisterbuild, \$fipscanisteronly],