Mercurial > hg > xemacs-beta
diff configure.ac @ 5922:4b055de36bb9 cygwin
merging heads 2
author | Henry Thompson <ht@markup.co.uk> |
---|---|
date | Fri, 27 Feb 2015 17:47:15 +0000 |
parents | 83e5c3cd6be6 0f2338afbabf |
children |
line wrap: on
line diff
--- a/configure.ac Wed Apr 23 22:22:37 2014 +0100 +++ b/configure.ac Fri Feb 27 17:47:15 2015 +0000 @@ -917,6 +917,9 @@ XE_MERGED_ARG([ipv6-cname], 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).]), [], [with_ipv6_cname="no"]) +XE_MERGED_ARG([tls], + 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.]), + [], []) dnl XE_HELP_SUBSECTION([Memory allocation options]) XE_MERGED_ARG([rel-alloc], @@ -2826,8 +2829,8 @@ dnl Disable ASLR on systems where it breaks pdump. AC_MSG_CHECKING([whether ASLR needs to be disabled]) case `uname -s`:`uname -r` in - dnl Mac OS X 10.7 Lion, 10.8 Mountain Lion, 10.9 Mavericks - Darwin:1[[123]].*) + dnl Mac OS X 10.7 Lion, 10.8 Mountain Lion, 10.9 Mavericks, 10.10 Yosemite + Darwin:1[[1234]].*) AC_MSG_RESULT(yes) XE_APPEND([-Wl,-no_pie], LDFLAGS) ;; @@ -4059,6 +4062,35 @@ dnl Do we actually have a usable Athena widget set? Please? if test -n "$athena_lib" -a -n "$athena_h_path"; then have_xaw=yes + have_athena_i18n=unset + dnl X.org at some point added .international to SimplePart, protected + dnl by #ifdef XAW_INTERNATIONALIZATION in Xaw3d (only?). Unfortunately, + dnl the distributed headers for Xaw3d don't set this to correspond to + dnl the distributed library. (pkg-config does, if present.) + if test "$athena_variant" = "Xaw3d"; then + save_libs_x=$libs_x + XE_PREPEND(-lXaw3d, libs_x) + dnl The test below was provided by Ralf Soergel. + AC_MSG_CHECKING([for "international" resource in Xaw3d SimpleWidget]) + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [#include <stdlib.h> + #include <string.h> + #undef XAW_INTERNATIONALIZATION + #include <$athena_h_path/Simple.h> + ], + [[int i = simpleWidgetClass->core_class.num_resources; + while (i-- > 0) + if (!strcmp(simpleWidgetClass->core_class.resources[i].resource_name, + "international")) + exit(0); + exit(253); + ]])], + [have_athena_i18n=yes], + [have_athena_i18n=no]) + libs_x=$save_libs_x + AC_MSG_RESULT([$have_athena_i18n]) + fi else have_xaw=no fi @@ -4191,9 +4223,11 @@ AC_DEFINE(LWLIB_USES_ATHENA) AC_DEFINE(NEED_ATHENA) need_athena="yes" - if test "$athena_3d" = "yes"; then AC_DEFINE(HAVE_ATHENA_3D) + if test "$have_athena_i18n" = "yes"; then + AC_DEFINE(HAVE_ATHENA_I18N) + fi fi ;; esac @@ -5337,6 +5371,76 @@ AC_DEFINE(WITH_MP) fi +dnl TLS support +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_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_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 + AC_DEFINE(HAVE_GNUTLS) + gnutls_cflags=`pkg-config --cflags gnutls` + if test "$?" = 0; then + XE_PREPEND("$gnutls_cflags", CPPFLAGS) + fi + gnutls_libs=`pkg-config --libs gnutls` + if test "$?" = 0; then + XE_APPEND("$gnutls_libs", LIBS) + fi + AC_CHECK_FUNC(gnutls_certificate_verification_status_print, + [AC_DEFINE(HAVE_GNUTLS_CERTIFICATE_VERIFICATION_STATUS_PRINT)]) + AC_CHECK_FUNC(gnutls_certificate_verify_peers3, + [AC_DEFINE(HAVE_GNUTLS_CERTIFICATE_VERIFY_PEERS3)]) + elif test "$with_tls" = "nss"; then + AC_DEFINE(HAVE_NSS) + nss_cflags=`pkg-config --cflags nss` + if test "$?" = 0; then + XE_PREPEND("$nss_cflags", CPPFLAGS) + fi + nss_libs=`pkg-config --libs nss` + if test "$?" = 0; then + XE_APPEND("$nss_libs", LIBS) + fi + else + AC_DEFINE(HAVE_OPENSSL) + openssl_cflags=`pkg-config --cflags openssl` + if test "$?" = 0; then + XE_PREPEND("$openssl_cflags", CPPFLAGS) + fi + openssl_libs=`pkg-config --libs openssl` + if test "$?" = 0; then + XE_APPEND("$openssl_libs", LIBS) + fi + AC_CHECK_FUNC(X509_check_host, [AC_DEFINE(HAVE_X509_CHECK_HOST)]) + fi +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 dnl executables to fail to run. Also any tests using AC_RUN_IFELSE will @@ -5944,7 +6048,7 @@ if test "$with_postgresql" = yes; then echo " Compiling in support for PostgreSQL." echo " - Using PostgreSQL header file: $libpq_fe_h_file" - test "$with_postgresqlv7" = yes && echo " - Using PostgreSQL V7 bindings." + test "$with_postgresqlv7" = yes && echo " - Using PostgreSQL V7+ bindings." fi echo " @@ -5968,12 +6072,18 @@ test -n "$with_mail_locking" && echo " Compiling in support for \"$with_mail_locking\" mail spool file locking method." echo " -Other Features:" +Network:" test "$with_ipv6_cname" = no && echo " Inhibiting IPv6 canonicalization at startup." test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." test "$with_socks" = yes && echo " Compiling in support for SOCKS." test "$with_dnet" = yes && echo " Compiling in support for DNET." +test "$with_tls" = nss && echo " Compiling in support for TLS with NSS." +test "$with_tls" = gnutls && echo " Compiling in support for TLS with gnutls." +test "$with_tls" = openssl && echo " Compiling in support for TLS with OpenSSL." + +echo " +Other Features:" test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules." test "$with_bignum" = "gmp" && echo " Compiling in support for more number types using the GNU MP library." test "$with_bignum" = "mpir" && echo " Compiling in support for more number types using the MPIR library."