commit/XEmacs: Jerry James: Check for TLS headers as well as libraries. See xemacs-patches message
[email protected] Thu, 09 Oct 2014 21:45:26 -0000
| Newsgroups | gmane.emacs.xemacs.patches |
|---|---|
| Message-ID | <[email protected]> |
1 new commit in XEmacs: https://bitbucket.org/xemacs/xemacs/commits/5de7b6d1e752/ Changeset: 5de7b6d1e752 User: Jerry James Date: 2014-10-09 21:45:16+00:00 Summary: Check for TLS headers as well as libraries. See xemacs-patches message <CAHCOHQ=6SZuGB1zmOwQMgVqVtOXdaLy_=4yfOqULDkRjHEiNcA@mail.gmail.com>. Affected #: 3 files diff -r d59bfb050ca81e88144e93a0176a5ba3f89de241 -r 5de7b6d1e752040c4177357af6c017945f784b04 ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-10-09 Jerry James <[email protected]> + + * configure.ac: Check for TLS headers as well as libraries. + 2014-10-07 Jerry James <[email protected]> * configure.ac: Add TLS support. diff -r d59bfb050ca81e88144e93a0176a5ba3f89de241 -r 5de7b6d1e752040c4177357af6c017945f784b04 configure --- a/configure +++ b/configure @@ -21021,7 +21021,9 @@ fi -if test "$with_tls" = "yes"; then +if test "$with_tls" = "gnutls"; then + ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" +if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_global_init in -lgnutls" >&5 $as_echo_n "checking for gnutls_global_init in -lgnutls... " >&6; } if ${ac_cv_lib_gnutls_gnutls_global_init+:} false; then : @@ -21061,6 +21063,17 @@ if test "x$ac_cv_lib_gnutls_gnutls_global_init" = xyes; then : with_tls=gnutls else + { echo "Error:" "Required gnutls support cannot be provided." >&2; exit 1; } +fi + +else + { echo "Error:" "Required gnutls support cannot be provided." >&2; exit 1; } +fi + + +elif test "$with_tls" = "nss"; then + ac_fn_c_check_header_mongrel "$LINENO" "nss.h" "ac_cv_header_nss_h" "$ac_includes_default" +if test "x$ac_cv_header_nss_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_InitContext in -lnss3" >&5 $as_echo_n "checking for NSS_InitContext in -lnss3... " >&6; } if ${ac_cv_lib_nss3_NSS_InitContext+:} false; then : @@ -21100,6 +21113,17 @@ if test "x$ac_cv_lib_nss3_NSS_InitContext" = xyes; then : with_tls=nss else + { echo "Error:" "Required NSS support cannot be provided." >&2; exit 1; } +fi + +else + { echo "Error:" "Required NSS support cannot be provided." >&2; exit 1; } +fi + + +elif test "$with_tls" = "openssl"; then + ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : @@ -21139,14 +21163,18 @@ if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : with_tls=openssl else - with_tls=no -fi - -fi - -fi - -elif test "$with_tls" = "gnutls"; then + { echo "Error:" "Required openssl support cannot be provided." >&2; exit 1; } +fi + +else + { echo "Error:" "Required openssl support cannot be provided." >&2; exit 1; } +fi + + +fi +if test "$with_tls" = "yes"; then + ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" +if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_global_init in -lgnutls" >&5 $as_echo_n "checking for gnutls_global_init in -lgnutls... " >&6; } if ${ac_cv_lib_gnutls_gnutls_global_init+:} false; then : @@ -21185,11 +21213,15 @@ $as_echo "$ac_cv_lib_gnutls_gnutls_global_init" >&6; } if test "x$ac_cv_lib_gnutls_gnutls_global_init" = xyes; then : with_tls=gnutls -else - { echo "Error:" "Required gnutls support cannot be provided." >&2; exit 1; } -fi - -elif test "$with_tls" = "nss"; then +fi + +fi + + +fi +if test "$with_tls" = "yes"; then + ac_fn_c_check_header_mongrel "$LINENO" "nss.h" "ac_cv_header_nss_h" "$ac_includes_default" +if test "x$ac_cv_header_nss_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_InitContext in -lnss3" >&5 $as_echo_n "checking for NSS_InitContext in -lnss3... " >&6; } if ${ac_cv_lib_nss3_NSS_InitContext+:} false; then : @@ -21228,11 +21260,15 @@ $as_echo "$ac_cv_lib_nss3_NSS_InitContext" >&6; } if test "x$ac_cv_lib_nss3_NSS_InitContext" = xyes; then : with_tls=nss -else - { echo "Error:" "Required NSS support cannot be provided." >&2; exit 1; } -fi - -elif test "$with_tls" = "openssl"; then +fi + +fi + + +fi +if test "$with_tls" = "yes"; then + ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : @@ -21272,8 +21308,11 @@ if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : with_tls=openssl else - { echo "Error:" "Required openssl support cannot be provided." >&2; exit 1; } -fi + with_tls=no +fi + +fi + fi if test "$with_tls" != "no"; then diff -r d59bfb050ca81e88144e93a0176a5ba3f89de241 -r 5de7b6d1e752040c4177357af6c017945f784b04 configure.ac --- a/configure.ac +++ b/configure.ac @@ -5332,20 +5332,35 @@ fi dnl TLS support -if test "$with_tls" = "yes"; then - AC_CHECK_LIB(gnutls, gnutls_global_init, [with_tls=gnutls], - AC_CHECK_LIB(nss3, NSS_InitContext, [with_tls=nss], - AC_CHECK_LIB(ssl, SSL_library_init, [with_tls=openssl], [with_tls=no]))) -elif test "$with_tls" = "gnutls"; then - AC_CHECK_LIB(gnutls, gnutls_global_init, [with_tls=gnutls], +if test "$with_tls" = "gnutls"; then + AC_CHECK_HEADER([gnutls/gnutls.h], + [AC_CHECK_LIB(gnutls, gnutls_global_init, [with_tls=gnutls], + [XE_DIE("Required gnutls support cannot be provided.")])], [XE_DIE("Required gnutls support cannot be provided.")]) elif test "$with_tls" = "nss"; then - AC_CHECK_LIB(nss3, NSS_InitContext, [with_tls=nss], + AC_CHECK_HEADER([nss.h], + [AC_CHECK_LIB(nss3, NSS_InitContext, [with_tls=nss], + [XE_DIE("Required NSS support cannot be provided.")])], [XE_DIE("Required NSS support cannot be provided.")]) elif test "$with_tls" = "openssl"; then - AC_CHECK_LIB(ssl, SSL_library_init, [with_tls=openssl], + AC_CHECK_HEADER([openssl/ssl.h], + [AC_CHECK_LIB(ssl, SSL_library_init, [with_tls=openssl], + [XE_DIE("Required openssl support cannot be provided.")])], [XE_DIE("Required openssl support cannot be provided.")]) fi +dnl Autodetection +if test "$with_tls" = "yes"; then + AC_CHECK_HEADER([gnutls/gnutls.h], + [AC_CHECK_LIB(gnutls, gnutls_global_init, [with_tls=gnutls])]) +fi +if test "$with_tls" = "yes"; then + AC_CHECK_HEADER([nss.h], + [AC_CHECK_LIB(nss3, NSS_InitContext, [with_tls=nss])]) +fi +if test "$with_tls" = "yes"; then + AC_CHECK_HEADER([openssl/ssl.h], + [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 Repository URL: https://bitbucket.org/xemacs/xemacs/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.