# see INSTALL for instructions.
-my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [no-threads] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx=vvv] os/compiler[:flags]\n";
+my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] os/compiler[:flags]\n";
# Options:
#
#
# --with-krb5-dir Declare where Kerberos 5 lives. The libraries are expected
# to live in the subdirectory lib/ and the header files in
-# include/.
-# --with-krb5-lib Declare where the Kerberos 5 libraries live.
+# include/. A value is required.
+# --with-krb5-lib Declare where the Kerberos 5 libraries live. A value is
+# required.
# (Default: KRB5_DIR/lib)
-# --with-krb5-include Declare where the Kerberos 5 header files live.
+# --with-krb5-include Declare where the Kerberos 5 header files live. A
+# value is required.
# (Default: KRB5_DIR/include)
# --with-krb5-flavor Declare what flavor of Kerberos 5 is used. Currently
-# supported values are "MIT" and "Heimdal".
+# supported values are "MIT" and "Heimdal". A value is required.
#
# no-hw-xxx do not compile support for specific crypto hardware.
# Generic OpenSSL-style methods relating to this support
# no-dso do not compile in any native shared-library methods. This
# will ensure that all methods just return NULL.
# no-krb5 do not compile in any KRB5 library or code.
+# [no-]zlib [don't] compile support for zlib compression.
+# zlib-dynamic Like "zlib", but the zlib library is expected to be a shared
+# library and will be loaded in run-time by the OpenSSL library.
# 386 generate 80386 code
# no-<cipher> build without specified algorithm (rsa, idea, rc5, ...)
# -<xxx> +<xxx> compiler options are passed through
##### GNU Hurd
"hurd-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
+##### OS/2 EMX
+"OS2-EMX", "gcc::::::::",
+
);
my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
- BC-16 Mingw32);
+ BC-16 Mingw32 OS2-EMX);
my $prefix="";
my $openssldir="";
my $install_prefix="";
my $no_threads=0;
my $no_shared=1;
+my $zlib=2;
my $no_krb5=0;
my $threads=0;
my $no_asm=0;
{ $no_shared=1; }
elsif (/^shared$/)
{ $no_shared=0; }
+ elsif (/^no-zlib$/)
+ { $zlib=0; }
+ elsif (/^zlib$/)
+ { $zlib=1; }
+ elsif (/^zlib-dynamic$/)
+ { $zlib=2; }
elsif (/^no-symlinks$/)
{ $symlink=0; }
elsif (/^no-(.+)$/)
}
else
{
+ my ($lresolv, $lpath, $lext);
if ($withargs{"krb5-flavor"} =~ /^[Hh]eimdal$/)
{
$withargs{"krb5-dir"} = "/usr/heimdal"
if $withargs{"krb5-lib"} eq "";
$cflags="-DKRB5_HEIMDAL $cflags";
}
- if ($withargs{"krb5-flavor"} =~ /^[Mm][Ii][Tt]$/)
+ if ($withargs{"krb5-flavor"} =~ /^[Mm][Ii][Tt]/)
{
$withargs{"krb5-dir"} = "/usr/kerberos"
if $withargs{"krb5-dir"} eq "";
"/lib -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto"
if $withargs{"krb5-lib"} eq "";
$cflags="-DKRB5_MIT $cflags";
+ $withargs{"krb5-flavor"} =~ s/^[Mm][Ii][Tt][._-]*//;
+ if ($withargs{"krb5-flavor"} =~ /^1[._-]*[01]/)
+ {
+ $cflags="-DKRB5_MIT_OLD11 $cflags";
+ }
+ }
+ LRESOLV:
+ foreach $lpath ("/lib", "/usr/lib")
+ {
+ foreach $lext ("a", "so")
+ {
+ $lresolv = "$lpath/libresolv.$lext";
+ last LRESOLV if (-r "$lresolv");
+ $lresolv = "";
+ }
}
+ $withargs{"krb5-lib"} .= " -lresolv"
+ if ("$lresolv");
$withargs{"krb5-include"} = "-I".$withargs{"krb5-dir"}."/include"
- if $withargs{"krb5-include"} eq "" && $withargs{"krb5-dir"} ne "";
+ if $withargs{"krb5-include"} eq "" &&
+ $withargs{"krb5-dir"} ne "";
}
# The DSO code currently always implements all functions so that no
if ($threads)
{
- $cflags=$thread_cflags;
- $openssl_thread_defines .= $thread_defines;
+ $cflags=$thread_cflags;
+ $openssl_thread_defines .= $thread_defines;
+ }
+
+if ($zlib)
+ {
+ $cflags = "-DZLIB $cflags";
+ $cflags = "-DZLIB_SHARED $cflags" if $zlib == 2;
+ $lflags = "$lflags -lz" if $zlib == 2;
}
# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org