Skip to content

Commit

Permalink
Misc afalg build fixes
Browse files Browse the repository at this point in the history
Misc afalg build fixes as suggested by Richard Levitte for the latest
Configure changes.

Reviewed-by: Richard Levitte <[email protected]>
  • Loading branch information
mattcaswell committed Mar 7, 2016
1 parent 6cba4a6 commit 8da00a3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 28 deletions.
11 changes: 7 additions & 4 deletions Configure
Original file line number Diff line number Diff line change
Expand Up @@ -1183,14 +1183,17 @@ if ($target =~ m/^linux/) {
my ($ma, $mi1, $mi2) = split("\\.", $verstr);
($mi2) = $mi2 =~ /(\d+)/;
my $ver = $ma*10000 + $mi1*100 + $mi2;
if ($ver >= $minver) {
$config{afalg}="afalg";
if ($ver < $minver) {
$disabled{afalg} = "too-old-kernel";
} 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
my %unified_info = ();
Expand Down
3 changes: 2 additions & 1 deletion engines/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CFLAG=-g
MAKEFILE= Makefile
AR= ar r

RECURSIVE_MAKE= [ -z "$(ENGDIRS)" ] || for i in $(ENGDIRS) ; do \
RECURSIVE_MAKE=[ -z "$(ENGDIRS)" ] || for i in $(ENGDIRS) ; do \
(cd $$i && echo "making $$target in $(DIR)/$$i..." && \
$(MAKE) -e TOP=../.. DIR=$$i $$target ) || exit 1; \
done;
Expand Down Expand Up @@ -94,6 +94,7 @@ install:
mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
done; \
fi
@target=install; $(RECURSIVE_MAKE)

uninstall:
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
Expand Down
31 changes: 10 additions & 21 deletions engines/afalg/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CFLAG=-g
MAKEFILE= Makefile
AR= ar r

CFLAGS= $(INCLUDES) $(CFLAG)
CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
LIB=$(TOP)/libcrypto.a

LIBNAME=afalg
Expand All @@ -28,39 +28,28 @@ errors:
$(PERL) $(TOP)/util/mkerr.pl -conf e_afalg.ec -nostatic -write $(SRC)

lib: $(LIBOBJ)
@if [ -n "$(SHARED_LIBS)" ]; then \
@if [ "$(DYNAMIC_ENGINES)" = 1 ]; then \
$(MAKE) -f $(TOP)/Makefile.shared -e \
LIBNAME=$(LIBNAME) \
LIBEXTRAS='$(LIBOBJ)' \
LIBDEPS='-L$(TOP) -lcrypto' \
link_o.$(SHLIB_TARGET); \
link_dso.$(SHLIB_TARGET); \
else \
$(AR) $(LIB) $(LIBOBJ); \
fi
@touch lib

install:
[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
if [ -n "$(SHARED_LIBS)" ]; then \
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@if [ -n "$(SHARED_LIBS)" ]; then \
set -e; \
echo installing $(LIBNAME); \
pfx=lib; \
if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
sfx=".so"; \
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; \
$(PERL) $(TOP)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines; \
cp $(LIBNAME)$(DSO_EXT) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$(LIBNAME)$(DSO_EXT).new; \
chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$(LIBNAME)$(DSO_EXT).new; \
mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$(LIBNAME)$(DSO_EXT).new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$(LIBNAME)$(DSO_EXT); \
fi


depend:
@[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)

Expand Down
4 changes: 2 additions & 2 deletions engines/afalg/build.info
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{- use File::Spec::Functions qw/:DEFAULT rel2abs/; -}

IF[{- $config{afalg} eq "afalg" -}]
IF[{- $config{no_shared} -}]
IF[{- !$disabled{afalg} -}]
IF[{- $disabled{"dynamic-engine"} -}]
LIBS=../../libcrypto
SOURCE[../../libcrypto]=e_afalg.c e_afalg_err.c
ELSE
Expand Down

0 comments on commit 8da00a3

Please sign in to comment.