comparison configure.ac @ 5816:5de7b6d1e752

Check for TLS headers as well as libraries. See xemacs-patches message <CAHCOHQ=6SZuGB1zmOwQMgVqVtOXdaLy_=4yfOqULDkRjHEiNcA@mail.gmail.com>.
author Jerry James <james@xemacs.org>
date Thu, 09 Oct 2014 15:45:16 -0600
parents a216b3c2b09e
children a58070ee1f31
comparison
equal deleted inserted replaced
5815:d59bfb050ca8 5816:5de7b6d1e752
5330 AC_DEFINE(WITH_NUMBER_TYPES) 5330 AC_DEFINE(WITH_NUMBER_TYPES)
5331 AC_DEFINE(WITH_MP) 5331 AC_DEFINE(WITH_MP)
5332 fi 5332 fi
5333 5333
5334 dnl TLS support 5334 dnl TLS support
5335 if test "$with_tls" = "yes"; then 5335 if test "$with_tls" = "gnutls"; then
5336 AC_CHECK_LIB(gnutls, gnutls_global_init, [with_tls=gnutls], 5336 AC_CHECK_HEADER([gnutls/gnutls.h],
5337 AC_CHECK_LIB(nss3, NSS_InitContext, [with_tls=nss], 5337 [AC_CHECK_LIB(gnutls, gnutls_global_init, [with_tls=gnutls],
5338 AC_CHECK_LIB(ssl, SSL_library_init, [with_tls=openssl], [with_tls=no]))) 5338 [XE_DIE("Required gnutls support cannot be provided.")])],
5339 elif test "$with_tls" = "gnutls"; then
5340 AC_CHECK_LIB(gnutls, gnutls_global_init, [with_tls=gnutls],
5341 [XE_DIE("Required gnutls support cannot be provided.")]) 5339 [XE_DIE("Required gnutls support cannot be provided.")])
5342 elif test "$with_tls" = "nss"; then 5340 elif test "$with_tls" = "nss"; then
5343 AC_CHECK_LIB(nss3, NSS_InitContext, [with_tls=nss], 5341 AC_CHECK_HEADER([nss.h],
5342 [AC_CHECK_LIB(nss3, NSS_InitContext, [with_tls=nss],
5343 [XE_DIE("Required NSS support cannot be provided.")])],
5344 [XE_DIE("Required NSS support cannot be provided.")]) 5344 [XE_DIE("Required NSS support cannot be provided.")])
5345 elif test "$with_tls" = "openssl"; then 5345 elif test "$with_tls" = "openssl"; then
5346 AC_CHECK_LIB(ssl, SSL_library_init, [with_tls=openssl], 5346 AC_CHECK_HEADER([openssl/ssl.h],
5347 [AC_CHECK_LIB(ssl, SSL_library_init, [with_tls=openssl],
5348 [XE_DIE("Required openssl support cannot be provided.")])],
5347 [XE_DIE("Required openssl support cannot be provided.")]) 5349 [XE_DIE("Required openssl support cannot be provided.")])
5350 fi
5351 dnl Autodetection
5352 if test "$with_tls" = "yes"; then
5353 AC_CHECK_HEADER([gnutls/gnutls.h],
5354 [AC_CHECK_LIB(gnutls, gnutls_global_init, [with_tls=gnutls])])
5355 fi
5356 if test "$with_tls" = "yes"; then
5357 AC_CHECK_HEADER([nss.h],
5358 [AC_CHECK_LIB(nss3, NSS_InitContext, [with_tls=nss])])
5359 fi
5360 if test "$with_tls" = "yes"; then
5361 AC_CHECK_HEADER([openssl/ssl.h],
5362 [AC_CHECK_LIB(ssl, SSL_library_init, [with_tls=openssl], [with_tls=no])])
5348 fi 5363 fi
5349 if test "$with_tls" != "no"; then 5364 if test "$with_tls" != "no"; then
5350 AC_DEFINE(WITH_TLS) 5365 AC_DEFINE(WITH_TLS)
5351 if test "$with_tls" = "gnutls"; then 5366 if test "$with_tls" = "gnutls"; then
5352 AC_DEFINE(HAVE_GNUTLS) 5367 AC_DEFINE(HAVE_GNUTLS)