[PATCH] configure: Do not try to detect GnuTLS if OpenSSL was enabled
Enabling GnuTLS via auto detection could have us end up with both libraries enabled. This won't build anymore. IIRC at some point it did build, though it was not easy to figure out which implementation would be used in the end. This change is done in the light of having no auto detection for OpenSSL and probably never will, because of the OpenSSL license. --- Also Cc to mplayer-users. I hoped the original reporter of the build problem would test it, but it seems it didn't happen. So now I am posting it for review. This needs some more testing, I had this in my tree for a while, but forgot about testing it further, so I will only push after a bit more testing. Probably in a week or so. As explained in the commit message this change is assuming quite a bit. I think the risk of OpenSSL auto detection being added in the future is very low, so I feel it is worth it, because of the lower complexity and smaller patch. Comments welcome! configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index d21df0ff7..91b6f9534 100755 --- a/configure +++ b/configure @@ -4531,7 +4531,7 @@ fi echocheck "GnuTLS" -if test "$_gnutls" = auto ; then +if test "$_gnutls" = auto && test "$_openssl" != "yes" ; then _gnutls=no if $_pkg_config --exists gnutls ; then statement_check gnutls/gnutls.h 'gnutls_global_init()' $($_pkg_config --libs --cflags gnutls) && --
Enabling GnuTLS via auto detection could have us end up with both libraries enabled. This won't build anymore. IIRC at some point it did build, though it was not easy to figure out which implementation would be used in the end. This change is done in the light of having no auto detection for OpenSSL and probably never will, because of the OpenSSL license. --- Moved the check into the inner if, because otherwise the result of the _gnutls would be auto instead of no in case of _openssl being yes. Thanks Reimar for pointing this out. I intend to commit the patch next weekend. configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index dab7c8b8f..f2f66ffde 100755 --- a/configure +++ b/configure @@ -4533,7 +4533,7 @@ fi echocheck "GnuTLS" if test "$_gnutls" = auto ; then _gnutls=no - if $_pkg_config --exists gnutls ; then + if $_pkg_config --exists gnutls && test "$_openssl" != "yes" ; then statement_check gnutls/gnutls.h 'gnutls_global_init()' $($_pkg_config --libs --cflags gnutls) && _gnutls=yes fi --
On 2020-08-23 15:01 +0200, Alexander Strasser wrote:
Enabling GnuTLS via auto detection could have us end up with both libraries enabled. This won't build anymore. IIRC at some point it did build, though it was not easy to figure out which implementation would be used in the end.
This change is done in the light of having no auto detection for OpenSSL and probably never will, because of the OpenSSL license. ---
Moved the check into the inner if, because otherwise the result of the _gnutls would be auto instead of no in case of _openssl being yes.
Thanks Reimar for pointing this out.
I intend to commit the patch next weekend.
Committed as r38339 Finally.
configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure index dab7c8b8f..f2f66ffde 100755 --- a/configure +++ b/configure @@ -4533,7 +4533,7 @@ fi echocheck "GnuTLS" if test "$_gnutls" = auto ; then _gnutls=no - if $_pkg_config --exists gnutls ; then + if $_pkg_config --exists gnutls && test "$_openssl" != "yes" ; then statement_check gnutls/gnutls.h 'gnutls_global_init()' $($_pkg_config --libs --cflags gnutls) && _gnutls=yes fi
participants (1)
-
Alexander Strasser