[solved almost] (was: can't compile the latest checkin)
"Stephen J. Turnbull" <[email protected]> Thu, 19 Mar 2015 01:31:30 +0900
| Newsgroups | gmane.emacs.xemacs.patches |
|---|---|
| Message-ID | <[email protected]> |
--=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Uwe Brauer writes: > >> "Aidan" =3D=3D Aidan Kehoe <[email protected]> writes: >=20 > > Try adding --with-tls=3Dno to the configure line. I see this occas= ionally > > myself, I don=E2=80=99t know at this point why the configure script= picks up a TLS > > implementation as being available when its headers aren=E2=80=99t. >=20 > This works, In the absence of --with-tls and --without-tls, $with_tls is the empty string, and since configure was testing "$with_tls" !=3D "no", that matched and the code ended up falling through to configuring (not testing!) OpenSSL. The attached patch should fix, but I haven't had time to test yet. Will do so and push in a day or so if there are no objections. Steve --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=tls-detection Content-Description: Patch to fix unintended default of with-tls to openssl. # HG changeset patch # Parent 83e5c3cd6be65c951cba14988d62752977104a30 Fix unintended default of TLS to OpenSSL. diff -r 83e5c3cd6be6 ChangeLog --- a/ChangeLog Sat Jan 10 19:43:28 2015 +0900 +++ b/ChangeLog Thu Mar 19 01:17:48 2015 +0900 @@ -1,3 +1,8 @@ +2015-03-19 Stephen J. Turnbull <[email protected]> + + * configure.ac (TLS): Prevent unintended fall-through to OpenSSL. + * configure: Rebuild. + 2015-01-10 Stephen J. Turnbull <[email protected]> * configure.ac (Postgresql): Improve Installation text. diff -r 83e5c3cd6be6 configure --- a/configure Sat Jan 10 19:43:28 2015 +0900 +++ b/configure Thu Mar 19 01:17:48 2015 +0900 @@ -21365,8 +21365,6 @@ fi if test "$with_tls" != "no"; then - $as_echo "#define WITH_TLS 1" >>confdefs.h - if test "$with_tls" = "gnutls"; then $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h @@ -21401,7 +21399,7 @@ if test "$?" = 0; then LIBS="$LIBS "$nss_libs"" && if test "$verbose" = "yes"; then echo " Appending \""$nss_libs"\" to \$LIBS"; fi fi - else + elif test "$with_tls" = "openssl"; then $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h openssl_cflags=`pkg-config --cflags openssl` @@ -21418,7 +21416,13 @@ fi - fi + else + with_tls=no + fi +fi +if test "$with_tls" != "no"; then + $as_echo "#define WITH_TLS 1" >>confdefs.h + fi if test "$cross_compiling" = yes; then : diff -r 83e5c3cd6be6 configure.ac --- a/configure.ac Sat Jan 10 19:43:28 2015 +0900 +++ b/configure.ac Thu Mar 19 01:17:48 2015 +0900 @@ -5380,6 +5380,9 @@ [XE_DIE("Required openssl support cannot be provided.")]) fi dnl Autodetection +dnl Must be requested explicitly with --with-tls. +dnl To default to autodetection, change the next three tests to +dnl if test "$with_tls" != "no". if test "$with_tls" = "yes"; then AC_CHECK_HEADER([gnutls/gnutls.h], [AC_CHECK_LIB(gnutls, gnutls_global_init, [with_tls=gnutls])]) @@ -5393,7 +5396,6 @@ [AC_CHECK_LIB(ssl, SSL_library_init, [with_tls=openssl], [with_tls=no])]) fi if test "$with_tls" != "no"; then - AC_DEFINE(WITH_TLS) if test "$with_tls" = "gnutls"; then AC_DEFINE(HAVE_GNUTLS) gnutls_cflags=`pkg-config --cflags gnutls` @@ -5418,7 +5420,7 @@ if test "$?" = 0; then XE_APPEND("$nss_libs", LIBS) fi - else + elif test "$with_tls" = "openssl"; then AC_DEFINE(HAVE_OPENSSL) openssl_cflags=`pkg-config --cflags openssl` if test "$?" = 0; then @@ -5429,8 +5431,13 @@ XE_APPEND("$openssl_libs", LIBS) fi AC_CHECK_FUNC(X509_check_host, [AC_DEFINE(HAVE_X509_CHECK_HOST)]) + else + with_tls=no fi fi +if test "$with_tls" != "no"; then + AC_DEFINE(WITH_TLS) +fi dnl Unfortunately, just because we can link doesn't mean we can run. dnl One of the above link tests may have succeeded but caused resulting --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ XEmacs-Patches mailing list [email protected] http://lists.xemacs.org/mailman/listinfo/xemacs-patches --=-=-=--