Mercurial > hg > xemacs-beta
comparison configure.ac @ 5814:a216b3c2b09e
Add TLS support. See xemacs-patches message with ID
<CAHCOHQk6FNm2xf=XiGEpPq43+7WOzNZ=SuD9V79o3wb9WVCTrQ@mail.gmail.com>.
author | Jerry James <james@xemacs.org> |
---|---|
date | Tue, 07 Oct 2014 21:16:10 -0600 |
parents | 4e69b24a2301 |
children | 5de7b6d1e752 |
comparison
equal
deleted
inserted
replaced
5813:36dddf9d90d1 | 5814:a216b3c2b09e |
---|---|
915 AS_HELP_STRING([--with-dnet],[Compile with support for DECnet.]), | 915 AS_HELP_STRING([--with-dnet],[Compile with support for DECnet.]), |
916 [], []) | 916 [], []) |
917 XE_MERGED_ARG([ipv6-cname], | 917 XE_MERGED_ARG([ipv6-cname], |
918 AS_HELP_STRING([--with-ipv6-cname],[Try IPv6 information first when canonicalizing host names. This option has no effect unless system supports getaddrinfo(3) and getnameinfo(3).]), | 918 AS_HELP_STRING([--with-ipv6-cname],[Try IPv6 information first when canonicalizing host names. This option has no effect unless system supports getaddrinfo(3) and getnameinfo(3).]), |
919 [], [with_ipv6_cname="no"]) | 919 [], [with_ipv6_cname="no"]) |
920 XE_MERGED_ARG([tls], | |
921 AS_HELP_STRING([--with-tls=TYPE],[Support TLS connections. TYPE must be one of "nss", "gnutls", and "openssl". If TYPE is omitted or "yes", support is determined automatically.]), | |
922 [], []) | |
920 dnl | 923 dnl |
921 XE_HELP_SUBSECTION([Memory allocation options]) | 924 XE_HELP_SUBSECTION([Memory allocation options]) |
922 XE_MERGED_ARG([rel-alloc], | 925 XE_MERGED_ARG([rel-alloc], |
923 AS_HELP_STRING([--with-rel-alloc],[Enable the relocating allocator.]), | 926 AS_HELP_STRING([--with-rel-alloc],[Enable the relocating allocator.]), |
924 [], [with_rel_alloc='default']) | 927 [], [with_rel_alloc='default']) |
5326 [AC_DEFINE(HAVE_MP_SET_MEMORY_FUNCTIONS)])]) | 5329 [AC_DEFINE(HAVE_MP_SET_MEMORY_FUNCTIONS)])]) |
5327 AC_DEFINE(WITH_NUMBER_TYPES) | 5330 AC_DEFINE(WITH_NUMBER_TYPES) |
5328 AC_DEFINE(WITH_MP) | 5331 AC_DEFINE(WITH_MP) |
5329 fi | 5332 fi |
5330 | 5333 |
5334 dnl TLS support | |
5335 if test "$with_tls" = "yes"; then | |
5336 AC_CHECK_LIB(gnutls, gnutls_global_init, [with_tls=gnutls], | |
5337 AC_CHECK_LIB(nss3, NSS_InitContext, [with_tls=nss], | |
5338 AC_CHECK_LIB(ssl, SSL_library_init, [with_tls=openssl], [with_tls=no]))) | |
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.")]) | |
5342 elif test "$with_tls" = "nss"; then | |
5343 AC_CHECK_LIB(nss3, NSS_InitContext, [with_tls=nss], | |
5344 [XE_DIE("Required NSS support cannot be provided.")]) | |
5345 elif test "$with_tls" = "openssl"; then | |
5346 AC_CHECK_LIB(ssl, SSL_library_init, [with_tls=openssl], | |
5347 [XE_DIE("Required openssl support cannot be provided.")]) | |
5348 fi | |
5349 if test "$with_tls" != "no"; then | |
5350 AC_DEFINE(WITH_TLS) | |
5351 if test "$with_tls" = "gnutls"; then | |
5352 AC_DEFINE(HAVE_GNUTLS) | |
5353 gnutls_cflags=`pkg-config --cflags gnutls` | |
5354 if test "$?" = 0; then | |
5355 XE_PREPEND("$gnutls_cflags", CPPFLAGS) | |
5356 fi | |
5357 gnutls_libs=`pkg-config --libs gnutls` | |
5358 if test "$?" = 0; then | |
5359 XE_PREPEND("$gnutls_libs", LDFLAGS) | |
5360 fi | |
5361 AC_CHECK_FUNC(gnutls_certificate_verification_status_print, | |
5362 [AC_DEFINE(HAVE_GNUTLS_CERTIFICATE_VERIFICATION_STATUS_PRINT)]) | |
5363 AC_CHECK_FUNC(gnutls_certificate_verify_peers3, | |
5364 [AC_DEFINE(HAVE_GNUTLS_CERTIFICATE_VERIFY_PEERS3)]) | |
5365 elif test "$with_tls" = "nss"; then | |
5366 AC_DEFINE(HAVE_NSS) | |
5367 nss_cflags=`pkg-config --cflags nss` | |
5368 if test "$?" = 0; then | |
5369 XE_PREPEND("$nss_cflags", CPPFLAGS) | |
5370 fi | |
5371 nss_libs=`pkg-config --libs nss` | |
5372 if test "$?" = 0; then | |
5373 XE_PREPEND("$nss_libs", LDFLAGS) | |
5374 fi | |
5375 else | |
5376 AC_DEFINE(HAVE_OPENSSL) | |
5377 openssl_cflags=`pkg-config --cflags openssl` | |
5378 if test "$?" = 0; then | |
5379 XE_PREPEND("$openssl_cflags", CPPFLAGS) | |
5380 fi | |
5381 openssl_libs=`pkg-config --libs openssl` | |
5382 if test "$?" = 0; then | |
5383 XE_PREPEND("$openssl_libs", LDFLAGS) | |
5384 fi | |
5385 AC_CHECK_FUNC(X509_check_host, [AC_DEFINE(HAVE_X509_CHECK_HOST)]) | |
5386 fi | |
5387 fi | |
5388 | |
5331 dnl Unfortunately, just because we can link doesn't mean we can run. | 5389 dnl Unfortunately, just because we can link doesn't mean we can run. |
5332 dnl One of the above link tests may have succeeded but caused resulting | 5390 dnl One of the above link tests may have succeeded but caused resulting |
5333 dnl executables to fail to run. Also any tests using AC_RUN_IFELSE will | 5391 dnl executables to fail to run. Also any tests using AC_RUN_IFELSE will |
5334 dnl have reported incorrect results. | 5392 dnl have reported incorrect results. |
5335 AC_RUN_IFELSE([AC_LANG_SOURCE([int main(int c,char **v){return 0;}])],[:],[ | 5393 AC_RUN_IFELSE([AC_LANG_SOURCE([int main(int c,char **v){return 0;}])],[:],[ |
5957 test "$with_kerberos" = yes && echo " Compiling in support for Kerberos POP authentication." | 6015 test "$with_kerberos" = yes && echo " Compiling in support for Kerberos POP authentication." |
5958 test "$with_hesiod" = yes && echo " Compiling in support for Hesiod POP server access." | 6016 test "$with_hesiod" = yes && echo " Compiling in support for Hesiod POP server access." |
5959 test -n "$with_mail_locking" && echo " Compiling in support for \"$with_mail_locking\" mail spool file locking method." | 6017 test -n "$with_mail_locking" && echo " Compiling in support for \"$with_mail_locking\" mail spool file locking method." |
5960 | 6018 |
5961 echo " | 6019 echo " |
5962 Other Features:" | 6020 Network:" |
5963 test "$with_ipv6_cname" = no && echo " Inhibiting IPv6 canonicalization at startup." | 6021 test "$with_ipv6_cname" = no && echo " Inhibiting IPv6 canonicalization at startup." |
5964 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." | 6022 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." |
5965 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." | 6023 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." |
5966 test "$with_socks" = yes && echo " Compiling in support for SOCKS." | 6024 test "$with_socks" = yes && echo " Compiling in support for SOCKS." |
5967 test "$with_dnet" = yes && echo " Compiling in support for DNET." | 6025 test "$with_dnet" = yes && echo " Compiling in support for DNET." |
6026 test "$with_tls" = nss && echo " Compiling in support for TLS with NSS." | |
6027 test "$with_tls" = gnutls && echo " Compiling in support for TLS with gnutls." | |
6028 test "$with_tls" = openssl && echo " Compiling in support for TLS with OpenSSL." | |
6029 | |
6030 echo " | |
6031 Other Features:" | |
5968 test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules." | 6032 test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules." |
5969 test "$with_bignum" = "gmp" && echo " Compiling in support for more number types using the GNU MP library." | 6033 test "$with_bignum" = "gmp" && echo " Compiling in support for more number types using the GNU MP library." |
5970 test "$with_bignum" = "mpir" && echo " Compiling in support for more number types using the MPIR library." | 6034 test "$with_bignum" = "mpir" && echo " Compiling in support for more number types using the MPIR library." |
5971 test "$with_bignum" = "mp" && echo " Compiling in support for more number types using the BSD MP library." | 6035 test "$with_bignum" = "mp" && echo " Compiling in support for more number types using the BSD MP library." |
5972 if test "$with_union_type" = yes ; then | 6036 if test "$with_union_type" = yes ; then |