diff mbox

[FFmpeg-devel,V1,1/2] configure: add OPENSSL_init_ssl check if pkg-config fail

Message ID 1575986573-5561-1-git-send-email-mypopydev@gmail.com
State Accepted
Commit e3c732bb0c9bbed9516bfabe0c1ea50d27cbb93f
Headers show

Commit Message

Jun Zhao Dec. 10, 2019, 2:02 p.m. UTC
From: macweng <macweng@tencent.com>

fix when pkg-config fail and openssl > 1.1.0 --enable-openssl fail,
the root cause is check_lib can't found the SSL_library_init().

Signed-off-by: macweng <macweng@tencent.com>
---
 configure |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

James Almer Dec. 10, 2019, 6:50 p.m. UTC | #1
On 12/10/2019 11:02 AM, Jun Zhao wrote:
> From: macweng <macweng@tencent.com>
> 
> fix when pkg-config fail and openssl > 1.1.0 --enable-openssl fail,
> the root cause is check_lib can't found the SSL_library_init().
> 
> Signed-off-by: macweng <macweng@tencent.com>
> ---
>  configure |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/configure b/configure
> index ca7137f..42e7df3 100755
> --- a/configure
> +++ b/configure
> @@ -6403,6 +6403,7 @@ enabled omx_rpi           && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR
>  enabled omx               && require_headers OMX_Core.h
>  enabled openssl           && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
>                                 check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||
> +                               check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
>                                 check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
>                                 check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
>                                 check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||

Confirmed it fixes detecting OpenSSL 1.1.1 without pkg-config, so LGTM.
diff mbox

Patch

diff --git a/configure b/configure
index ca7137f..42e7df3 100755
--- a/configure
+++ b/configure
@@ -6403,6 +6403,7 @@  enabled omx_rpi           && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR
 enabled omx               && require_headers OMX_Core.h
 enabled openssl           && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
                                check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||
+                               check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
                                check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
                                check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
                                check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||