Misc afalg build fixes
Misc afalg build fixes as suggested by Richard Levitte for the latest Configure changes. Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
11
Configure
11
Configure
@@ -1183,14 +1183,17 @@ if ($target =~ m/^linux/) {
|
|||||||
my ($ma, $mi1, $mi2) = split("\\.", $verstr);
|
my ($ma, $mi1, $mi2) = split("\\.", $verstr);
|
||||||
($mi2) = $mi2 =~ /(\d+)/;
|
($mi2) = $mi2 =~ /(\d+)/;
|
||||||
my $ver = $ma*10000 + $mi1*100 + $mi2;
|
my $ver = $ma*10000 + $mi1*100 + $mi2;
|
||||||
if ($ver >= $minver) {
|
if ($ver < $minver) {
|
||||||
$config{afalg}="afalg";
|
$disabled{afalg} = "too-old-kernel";
|
||||||
} else {
|
} else {
|
||||||
push @{$config{openssl_other_defines}}, "OPENSSL_NO_AFALGENG";
|
push @{$config{engdirs}}, "afalg";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$disabled{afalg} = "not-linux";
|
||||||
}
|
}
|
||||||
push @{$config{engdirs}}, $config{afalg};
|
|
||||||
|
push @{$config{openssl_other_defines}}, "OPENSSL_NO_AFALGENG" if ($disabled{afalg});
|
||||||
|
|
||||||
# If we use the unified build, collect information from build.info files
|
# If we use the unified build, collect information from build.info files
|
||||||
my %unified_info = ();
|
my %unified_info = ();
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ install:
|
|||||||
mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
|
mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
|
||||||
done; \
|
done; \
|
||||||
fi
|
fi
|
||||||
|
@target=install; $(RECURSIVE_MAKE)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ CFLAG=-g
|
|||||||
MAKEFILE= Makefile
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
|
||||||
LIB=$(TOP)/libcrypto.a
|
LIB=$(TOP)/libcrypto.a
|
||||||
|
|
||||||
LIBNAME=afalg
|
LIBNAME=afalg
|
||||||
@@ -28,39 +28,28 @@ errors:
|
|||||||
$(PERL) $(TOP)/util/mkerr.pl -conf e_afalg.ec -nostatic -write $(SRC)
|
$(PERL) $(TOP)/util/mkerr.pl -conf e_afalg.ec -nostatic -write $(SRC)
|
||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
@if [ "$(DYNAMIC_ENGINES)" = 1 ]; then \
|
||||||
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
||||||
LIBNAME=$(LIBNAME) \
|
LIBNAME=$(LIBNAME) \
|
||||||
LIBEXTRAS='$(LIBOBJ)' \
|
LIBEXTRAS='$(LIBOBJ)' \
|
||||||
LIBDEPS='-L$(TOP) -lcrypto' \
|
LIBDEPS='-L$(TOP) -lcrypto' \
|
||||||
link_o.$(SHLIB_TARGET); \
|
link_dso.$(SHLIB_TARGET); \
|
||||||
else \
|
else \
|
||||||
$(AR) $(LIB) $(LIBOBJ); \
|
$(AR) $(LIB) $(LIBOBJ); \
|
||||||
fi
|
fi
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
install:
|
install:
|
||||||
[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
||||||
if [ -n "$(SHARED_LIBS)" ]; then \
|
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||||
set -e; \
|
set -e; \
|
||||||
echo installing $(LIBNAME); \
|
$(PERL) $(TOP)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines; \
|
||||||
pfx=lib; \
|
cp $(LIBNAME)$(DSO_EXT) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$(LIBNAME)$(DSO_EXT).new; \
|
||||||
if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
|
chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$(LIBNAME)$(DSO_EXT).new; \
|
||||||
sfx=".so"; \
|
mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$(LIBNAME)$(DSO_EXT).new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$(LIBNAME)$(DSO_EXT); \
|
||||||
cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
|
||||||
else \
|
|
||||||
case "$(CFLAGS)" in \
|
|
||||||
*DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
|
|
||||||
*DSO_DL*) sfx=".sl";; \
|
|
||||||
*DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
|
|
||||||
*) sfx=".bad";; \
|
|
||||||
esac; \
|
|
||||||
cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
|
||||||
fi; \
|
|
||||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
|
||||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
@[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
|
@[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{- use File::Spec::Functions qw/:DEFAULT rel2abs/; -}
|
{- use File::Spec::Functions qw/:DEFAULT rel2abs/; -}
|
||||||
|
|
||||||
IF[{- $config{afalg} eq "afalg" -}]
|
IF[{- !$disabled{afalg} -}]
|
||||||
IF[{- $config{no_shared} -}]
|
IF[{- $disabled{"dynamic-engine"} -}]
|
||||||
LIBS=../../libcrypto
|
LIBS=../../libcrypto
|
||||||
SOURCE[../../libcrypto]=e_afalg.c e_afalg_err.c
|
SOURCE[../../libcrypto]=e_afalg.c e_afalg_err.c
|
||||||
ELSE
|
ELSE
|
||||||
|
|||||||
Reference in New Issue
Block a user