From c9977f452f26ecb0ee342660a130bc80f9ae23b2 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 3 Apr 2017 07:49:59 +0200 Subject: [PATCH 1/4] build: add checks for openssl configure options Currently it is possible to configure using --without-ssl and --shared-openssl/--openssl-no-asm/openssl-fips without an error occuring. The commit add check for these combinations: $ ./configure --without-ssl --shared-openssl Error: --without-ssl is incompatible with --shared-openssl $ ./configure --without-ssl --openssl-no-asm Error: --without-ssl is incompatible with --openssl-no-asm $ ./configure --without-ssl --openssl-fips=dummy Error: --without-ssl is incompatible with --openssl-fips --- configure | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure b/configure index 31d682575e7a0d..4f3a3b60334707 100755 --- a/configure +++ b/configure @@ -977,9 +977,19 @@ def configure_openssl(o): if options.without_ssl: + if options.shared_openssl: + withoutSSLError('--shared-openssl') + if options.openssl_no_asm: + withoutSSLError('--openssl-no-asm') + if options.openssl_fips: + withoutSSLError('--openssl-fips') return configure_library('openssl', o) +def withoutSSLError(option): + print('Error: --without-ssl is incompatible with %s' % option) + exit(1); + def configure_static(o): if options.fully_static or options.partly_static: From 1a20f65e8686fb717f9015df214a0b2c8d55cc80 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 3 Apr 2017 11:46:44 +0200 Subject: [PATCH 2/4] remove semicolon after exit statement --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 4f3a3b60334707..4877412a28492c 100755 --- a/configure +++ b/configure @@ -988,7 +988,7 @@ def configure_openssl(o): def withoutSSLError(option): print('Error: --without-ssl is incompatible with %s' % option) - exit(1); + exit(1) def configure_static(o): From b44ba5e85df44dc4308f8862ec41c8da34b61347 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 3 Apr 2017 11:49:21 +0200 Subject: [PATCH 3/4] rename to without_ssl_error and move into if block --- configure | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 4877412a28492c..e982522b28bf6e 100755 --- a/configure +++ b/configure @@ -977,18 +977,18 @@ def configure_openssl(o): if options.without_ssl: + def without_ssl_error(option): + print('Error: --without-ssl is incompatible with %s' % option) + exit(1) if options.shared_openssl: - withoutSSLError('--shared-openssl') + without_ssl_error('--shared-openssl') if options.openssl_no_asm: - withoutSSLError('--openssl-no-asm') + without_ssl_error('--openssl-no-asm') if options.openssl_fips: - withoutSSLError('--openssl-fips') + without_ssl_error('--openssl-fips') return configure_library('openssl', o) -def withoutSSLError(option): - print('Error: --without-ssl is incompatible with %s' % option) - exit(1) def configure_static(o): From 8d6b9ffca7acf29e2eacc7f4c39c3dfebab48b54 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 3 Apr 2017 13:08:41 +0200 Subject: [PATCH 4/4] removing leftover empty line --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index e982522b28bf6e..3fd84b0a26cd28 100755 --- a/configure +++ b/configure @@ -990,7 +990,6 @@ def configure_openssl(o): configure_library('openssl', o) - def configure_static(o): if options.fully_static or options.partly_static: if flavor == 'mac':