summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2005-12-05 13:46:46 +0000
committerDr. Stephen Henson <steve@openssl.org>2005-12-05 13:46:46 +0000
commitad2695b1b753caa53d9127a6e869ed3692b08fee (patch)
treeb6d5ba532637c694b1db380216158ecfba49bce5 /util
parent9cbf062a705de395b4d0e6c5783a239b8f743f15 (diff)
Update from 0.9.8-stable.
Diffstat (limited to 'util')
-rwxr-xr-xutil/mk1mf.pl21
-rw-r--r--util/pl/VC-32.pl4
2 files changed, 20 insertions, 5 deletions
diff --git a/util/mk1mf.pl b/util/mk1mf.pl
index 8b3d929e62..25a3801123 100755
--- a/util/mk1mf.pl
+++ b/util/mk1mf.pl
@@ -12,6 +12,8 @@ $banner="\t\@echo Building OpenSSL";
my $no_static_engine = 1;
my $engines = "";
+local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic
+local $zlib_lib = "";
open(IN,"<Makefile") || die "unable to open Makefile!\n";
@@ -223,6 +225,9 @@ $cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh;
$cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine;
$cflags.=" -DOPENSSL_NO_HW" if $no_hw;
+$cflags.= " -DZLIB" if $zlib_opt;
+$cflags.= " -DZLIB_SHARED" if $zlib_opt == 2;
+
if ($no_static_engine)
{
$cflags .= " -DOPENSSL_NO_STATIC_ENGINE";
@@ -241,6 +246,7 @@ else
$ex_libs="$l_flags$ex_libs" if ($l_flags ne "");
+
%shlib_ex_cflags=("SSL" => " -DOPENSSL_BUILD_SHLIBSSL",
"CRYPTO" => " -DOPENSSL_BUILD_SHLIBCRYPTO");
@@ -285,8 +291,14 @@ for (;;)
if ($key eq "KRB5_INCLUDES")
{ $cflags .= " $val";}
+ if ($key eq "ZLIB_INCLUDE")
+ { $cflags .= " -I$val";}
+
+ if ($key eq "LIBZLIB")
+ { $zlib_lib = "$val" if $val ne "";}
+
if ($key eq "LIBKRB5")
- { $ex_libs .= " $val";}
+ { $ex_libs .= " $val" if $val ne "";}
if ($key eq "TEST")
{ $test.=&var_add($dir,$val, 0); }
@@ -338,6 +350,7 @@ else
\$(CP) \$(O_SSL) \$(INSTALLTOP)${o}lib
\$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}lib
EOF
+ $ex_libs .= " $zlib_lib" if $zlib_opt == 1;
}
$defs= <<"EOF";
@@ -833,7 +846,7 @@ sub do_defs
$ret.=$t;
}
# hack to add version info on MSVC
- if ($shlib && ($platform eq "VC-WIN32") || ($platform eq "VC-NT"))
+ if ($shlib && (($platform eq "VC-WIN32") || ($platform eq "VC-NT")))
{
if ($var eq "CRYPTOOBJ")
{ $ret.="\$(OBJ_D)\\\$(CRYPTO).res "; }
@@ -1019,10 +1032,10 @@ sub read_options
}
}
elsif (/^no-comp$/) { $xcflags = "-DOPENSSL_NO_COMP $xcflags"; }
- elsif (/^enable-zlib$/) { $xcflags = "-DZLIB $xcflags"; }
+ elsif (/^enable-zlib$/) { $zlib_opt = 1 if $zlib_opt == 0 }
elsif (/^enable-zlib-dynamic$/)
{
- $xcflags = "-DZLIB_SHARED -DZLIB $xcflags";
+ $zlib_opt = 2;
}
elsif (/^no-static-engine/)
{
diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl
index 0f283d8051..58bf9934dd 100644
--- a/util/pl/VC-32.pl
+++ b/util/pl/VC-32.pl
@@ -11,6 +11,8 @@ $cp='$(PERL) util/copy.pl';
$mkdir='$(PERL) util/mkdir-p.pl';
$rm='del';
+$zlib_lib="zlib1.lib";
+
# C compiler stuff
$cc='cl';
if ($FLAVOR =~ /WIN64/)
@@ -146,7 +148,6 @@ if ($FLAVOR =~ /NT/)
$cflags.=" -DOPENSSL_SYSNAME_WINNT -DUNICODE -D_UNICODE";
$ex_libs="unicows.lib $ex_libs";
}
-
# static library stuff
$mklib='lib';
$ranlib='';
@@ -278,6 +279,7 @@ sub do_lib_rule
$ex.=' wsock32.lib gdi32.lib advapi32.lib user32.lib';
$ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
}
+ $ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/;
$ret.="\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n";
}
$ret.="\n";