This helps make the DSO stuff more portable;
* "no-dso" option available in Configure so that all DSO methods will return NULL, overriding any support the platform might otherwise have built. * dlfcn_no_h config string now available rather than just dlfcn. This is for platforms that have dlfcn.h functions but do not have (or need) the dlfcn.h header file.
This commit is contained in:
parent
6ef4d9d512
commit
bc2aadad84
2 changed files with 29 additions and 8 deletions
31
Configure
31
Configure
|
@ -10,7 +10,7 @@ use strict;
|
||||||
|
|
||||||
# see INSTALL for instructions.
|
# see INSTALL for instructions.
|
||||||
|
|
||||||
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [rsaref] [no-threads] [no-asm] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] os/compiler[:flags]\n";
|
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [rsaref] [no-threads] [no-asm] [no-dso] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] os/compiler[:flags]\n";
|
||||||
|
|
||||||
# Options:
|
# Options:
|
||||||
#
|
#
|
||||||
|
@ -28,6 +28,8 @@ my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-
|
||||||
# multithreaded applications (default is "threads" if we
|
# multithreaded applications (default is "threads" if we
|
||||||
# know how to do it)
|
# know how to do it)
|
||||||
# no-asm do not use assembler
|
# no-asm do not use assembler
|
||||||
|
# no-dso do not compile in any native shared-library methods. This
|
||||||
|
# will ensure that all methods just return NULL.
|
||||||
# 386 generate 80386 code
|
# 386 generate 80386 code
|
||||||
# no-<cipher> build without specified algorithm (rsa, idea, rc5, ...)
|
# no-<cipher> build without specified algorithm (rsa, idea, rc5, ...)
|
||||||
# -<xxx> +<xxx> compiler options are passed through
|
# -<xxx> +<xxx> compiler options are passed through
|
||||||
|
@ -384,6 +386,7 @@ my $install_prefix="";
|
||||||
my $no_threads=0;
|
my $no_threads=0;
|
||||||
my $threads=0;
|
my $threads=0;
|
||||||
my $no_asm=0;
|
my $no_asm=0;
|
||||||
|
my $no_dso=0;
|
||||||
my @skip=();
|
my @skip=();
|
||||||
my $Makefile="Makefile.ssl";
|
my $Makefile="Makefile.ssl";
|
||||||
my $des_locl="crypto/des/des_locl.h";
|
my $des_locl="crypto/des/des_locl.h";
|
||||||
|
@ -431,6 +434,8 @@ foreach (@ARGV)
|
||||||
$flags .= "-DNO_ASM ";
|
$flags .= "-DNO_ASM ";
|
||||||
$openssl_other_defines .= "#define NO_ASM\n";
|
$openssl_other_defines .= "#define NO_ASM\n";
|
||||||
}
|
}
|
||||||
|
elsif (/^no-dso$/)
|
||||||
|
{ $no_dso=1; }
|
||||||
elsif (/^no-threads$/)
|
elsif (/^no-threads$/)
|
||||||
{ $no_threads=1; }
|
{ $no_threads=1; }
|
||||||
elsif (/^threads$/)
|
elsif (/^threads$/)
|
||||||
|
@ -543,14 +548,28 @@ print "IsWindows=$IsWindows\n";
|
||||||
split(/\s*:\s*/,$table{$target} . ":" x 20 , -1);
|
split(/\s*:\s*/,$table{$target} . ":" x 20 , -1);
|
||||||
$cflags="$flags$cflags" if ($flags ne "");
|
$cflags="$flags$cflags" if ($flags ne "");
|
||||||
|
|
||||||
# For now the translation from dso_scheme to cflags is trivial. This may well
|
# The DSO code currently always implements all functions so that no
|
||||||
# "grow", eg. we could add "dlfcn_no_h" to do what "dlfcn" does and have the
|
# applications will have to worry about that from a compilation point
|
||||||
# latter additionally define HAVE_DLFCN_H (some systems don't have dlfcn.h and
|
# of view. However, the "method"s may return zero unless that platform
|
||||||
# it's not needed).
|
# has support compiled in for them. Currently each method is enabled
|
||||||
if ($dso_scheme ne "") {
|
# by a define "DSO_<name>" ... we translate the "dso_scheme" config
|
||||||
|
# string entry into using the following logic;
|
||||||
|
if (!$no_dso && $dso_scheme ne "")
|
||||||
|
{
|
||||||
$dso_scheme =~ tr/[a-z]/[A-Z]/;
|
$dso_scheme =~ tr/[a-z]/[A-Z]/;
|
||||||
|
if ($dso_scheme eq "DLFCN")
|
||||||
|
{
|
||||||
|
$cflags = "-DDSO_DLFCN -DHAVE_DLFCN_H $cflags";
|
||||||
|
}
|
||||||
|
elsif ($dso_scheme eq "DLFCN_NO_H")
|
||||||
|
{
|
||||||
|
$cflags = "-DDSO_DLFCN $cflags";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$cflags = "-DDSO_$dso_scheme $cflags";
|
$cflags = "-DDSO_$dso_scheme $cflags";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
my $thread_cflags;
|
my $thread_cflags;
|
||||||
my $thread_defines;
|
my $thread_defines;
|
||||||
|
|
|
@ -67,7 +67,9 @@ DSO_METHOD *DSO_METHOD_dlfcn(void)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#ifdef HAVE_DLFCN_H
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static int dlfcn_load(DSO *dso, char *filename);
|
static int dlfcn_load(DSO *dso, char *filename);
|
||||||
static int dlfcn_unload(DSO *dso);
|
static int dlfcn_unload(DSO *dso);
|
||||||
|
|
Loading…
Reference in a new issue