From f4316c36df46f888b5e63f0efb4af0898a66b272 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 24 Jul 2000 20:36:46 +0000 Subject: [PATCH] Avoid loops, and make sure that it's possible to still build shared libraries even if the "shared" configuration option wasn't chosen. --- Configure | 17 +++++++++++------ Makefile.org | 16 ++++++++++++---- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Configure b/Configure index cf5fe2007e..6286cadade 100755 --- a/Configure +++ b/Configure @@ -639,14 +639,17 @@ if ($threads) $openssl_thread_defines .= $thread_defines; } -if ($no_shared) - { - $shared_target = ""; - $shared_cflag = ""; - } -else +# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org +my $shared_mark1 = ""; +my $shared_mark2 = ""; +if ($shared_cflag ne "") { $cflags = "$shared_cflag $cflags"; + if (!$no_shared) + { + $shared_mark1 = ".shlib-clean."; + $shared_mark2 = ".shlib."; + } } #my ($bn1)=split(/\s+/,$bn_obj); @@ -751,6 +754,8 @@ while () s/^RANLIB=.*/RANLIB= $ranlib/; s/^PERL=.*/PERL= $perl/; s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/; + s/^SHLIB_MARK1=.*/SHLIB_MARK1=$shared_mark1/; + s/^SHLIB_MARK2=.*/SHLIB_MARK2=$shared_mark2/; s/^LIBS=.*/LIBS=libcrypto\.so\* libssl\.so\*/ if (!$no_shared); print OUT $_."\n"; } diff --git a/Makefile.org b/Makefile.org index 3d718c0dbf..e2c818cea3 100644 --- a/Makefile.org +++ b/Makefile.org @@ -207,7 +207,7 @@ all: Makefile.ssl $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ fi; \ done; \ - if $$need_shlib && [ "$(SHLIB_TARGET)" != "" ]; then :; else \ + if $$need_shlib && [ "$(SHLIB_MARK1)" != "" -o "$(SHLIB_MARK1)" != "" ]; then \ $(MAKE) $(SHARED_LIBS); \ fi @@ -229,14 +229,22 @@ sub_all: $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ fi; \ done; \ - if $$need_shlib && [ "$(SHLIB_TARGET)" != "" ]; then :; else \ + if $$need_shlib && [ "$(SHLIB_MARK1)" != "" -o "$(SHLIB_MARK1)" != "" ]; then \ $(MAKE) $(SHARED_LIBS); \ fi libcrypto.so: libcrypto.a - $(MAKE) $(SHLIB_TARGET) + @if [ "$(SHLIB_TARGET)" != "" ]; then \ + $(MAKE) SHLIBDIRS=crypto $(SHLIB_TARGET); \ + else \ + echo "There's no support for shared libraries on this platform" >&2; \ + fi libssl.so: libcrypto.so libssl.a - $(MAKE) $(SHLIB_TARGET) + @if [ "$(SHLIB_TARGET)" != "" ]; then \ + $(MAKE) SHLIBDIRS=ssl $(SHLIB_TARGET); \ + else \ + echo "There's no support for shared libraries on this platform" >&2; \ + fi clean-shared: for i in ${SHLIBDIRS}; do \ -- 2.25.1