aboutsummaryrefslogtreecommitdiff
path: root/auto.def
diff options
context:
space:
mode:
authorDima Krasner <dima@dimakrasner.com>2015-09-24 20:38:25 +0300
committerSteve Bennett <steveb@workware.net.au>2016-02-01 10:47:13 +1000
commitb7dae50e44da0e637399d89fdedee25c41f28019 (patch)
treece039973911c0d56d51afef4bfea910e3385d142 /auto.def
parent25352b050457afb555f4970e04f3a6a47556448f (diff)
downloadjimtcl-b7dae50e44da0e637399d89fdedee25c41f28019.zip
jimtcl-b7dae50e44da0e637399d89fdedee25c41f28019.tar.gz
jimtcl-b7dae50e44da0e637399d89fdedee25c41f28019.tar.bz2
aio: add OpenSSL/LibreSSL bindings.
Example usage: set s [socket stream.server 127.0.0.1:8443] set c [[$s accept] ssl -server certificate.pem key.pem] puts [$c gets]
Diffstat (limited to 'auto.def')
-rw-r--r--auto.def14
1 files changed, 12 insertions, 2 deletions
diff --git a/auto.def b/auto.def
index 7404e85..4625b63 100644
--- a/auto.def
+++ b/auto.def
@@ -12,9 +12,10 @@ options {
lineedit=1 => "disable line editing"
references=1 => "disable support for references"
math => "include support for math functions"
+ ssl => "include ssl/tls support in the aio extension"
ipv6 => "include ipv6 support in the aio extension"
maintainer => {enable the [debug] command and JimPanic}
- full => "Enable some optional features: ipv6, math, utf8, binary, oo, tree"
+ full => "Enable some optional features: ipv6, ssl, math, utf8, binary, oo, tree"
with-jim-shared shared => "build a shared library instead of a static library"
jim-regexp=1 => "prefer POSIX regex if over the the built-in (Tcl-compatible) regex"
docs=1 => "don't build or install the documentation"
@@ -102,7 +103,7 @@ cc-check-functions ualarm lstat fork vfork system select execvpe
cc-check-functions backtrace geteuid mkstemp realpath strptime isatty
cc-check-functions regcomp waitpid sigaction sys_signame sys_siglist isascii
cc-check-functions syslog opendir readlink sleep usleep pipe getaddrinfo utimes
-cc-check-functions shutdown socketpair isinf isnan link symlink fsync
+cc-check-functions shutdown socketpair isinf isnan link symlink fsync dup
if {[cc-check-functions sysinfo]} {
cc-with {-includes sys/sysinfo.h} {
@@ -184,6 +185,15 @@ if {[opt-bool ipv6 full]} {
msg-result "Enabling IPv6"
define JIM_IPV6
}
+if {[opt-bool ssl full]} {
+ if {[cc-check-includes openssl/ssl.h] && [cc-check-function-in-lib ERR_error_string crypto] && [cc-check-function-in-lib TLSv1_2_method ssl]} {
+ msg-result "Enabling SSL"
+ define JIM_SSL
+ define-append LDLIBS [get-define lib_ERR_error_string] [get-define lib_TLSv1_2_method]
+ } elseif {[opt-bool ssl]} {
+ user-error "SSL support requires OpenSSL"
+ }
+}
if {[opt-bool lineedit full]} {
if {([cc-check-includes termios.h] && [have-feature isatty]) || [have-feature winconsole]} {
msg-result "Enabling line editing"