diff mbox series

[FFmpeg-devel] configure: allow OpenSSL>=3.0.0 with GPLv3

Message ID 20200609073247.87846-1-rcombs@rcombs.me
State New
Headers show
Series [FFmpeg-devel] configure: allow OpenSSL>=3.0.0 with GPLv3
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

rcombs June 9, 2020, 7:32 a.m. UTC
---
 configure | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/configure b/configure
index 8569a60bf8..a525611cc8 100755
--- a/configure
+++ b/configure
@@ -1731,7 +1731,6 @@  EXTERNAL_LIBRARY_GPL_LIST="
 EXTERNAL_LIBRARY_NONFREE_LIST="
     decklink
     libfdk_aac
-    openssl
     libtls
 "
 
@@ -1820,6 +1819,7 @@  EXTERNAL_LIBRARY_LIST="
     mediacodec
     openal
     opengl
+    openssl
     pocketsphinx
     vapoursynth
 "
@@ -6469,6 +6469,9 @@  enabled openssl           && { check_pkg_config openssl openssl openssl/ssl.h OP
                                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 ||
                                die "ERROR: openssl not found"; }
+enabled openssl && enabled gpl && { test_cpp_condition "openssl/opensslv.h" "defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_MAJOR >= 3" &&
+                                    { ! enabled gplv3 && die "OpenSSL is not compatible with gpl version 2 and --enable-version3 is not specified." || true; } ||
+                                    { ! enabled nonfree && die "OpenSSL versions prior to 3.0.0 are incompatible with the gpl and --enable-nonfree is not specified."; } ; }
 enabled pocketsphinx      && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init
 enabled rkmpp             && { require_pkg_config rkmpp rockchip_mpp  rockchip/rk_mpi.h mpp_create &&
                                require_pkg_config rockchip_mpp "rockchip_mpp >= 1.3.7" rockchip/rk_mpi.h mpp_create &&