diff options
author | Steve Bennett <steveb@workware.net.au> | 2016-09-14 10:45:46 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2016-09-29 08:13:19 +1000 |
commit | d69d5e6674fd2e9b7d16ba2ca77cd1bb0109a223 (patch) | |
tree | ccaf1468d60f36feb18ed818fa53c01b850da00d | |
parent | a6a4cfa76408fdd5d93a9cc1417e53fb6c017924 (diff) | |
download | jimtcl-d69d5e6674fd2e9b7d16ba2ca77cd1bb0109a223.zip jimtcl-d69d5e6674fd2e9b7d16ba2ca77cd1bb0109a223.tar.gz jimtcl-d69d5e6674fd2e9b7d16ba2ca77cd1bb0109a223.tar.bz2 |
configure: allow "--full" options to be explicitly disabled
Now it is possible to do: configure --full --disable-ssl
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r-- | auto.def | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -169,7 +169,20 @@ if {[cctest -includes {sys/types.h sys/stat.h} -code {mkdir("/dummy");}]} { set extra_objs {} set jimregexp 0 -if {[opt-bool utf8 full]} { +# Returns 1 if either the given option is enabled, or +# --full is enabled and the option isn't explicitly disabled +# +proc opt-bool-or-full {opt} { + if {[opt-bool $opt]} { + return 1 + } + if {[opt-bool full] && [opt-bool -nodefault $opt] != 0} { + return 1 + } + return 0 +} + +if {[opt-bool-or-full utf8]} { msg-result "Enabling UTF-8" define JIM_UTF8 define-append CCOPTS -DUSE_UTF8 @@ -182,17 +195,18 @@ if {[opt-bool maintainer]} { msg-result "Enabling maintainer settings" define JIM_MAINTAINER } -if {[opt-bool math full]} { +# If --math or --full and not --disable-math +if {[opt-bool-or-full math]} { msg-result "Enabling math functions" define JIM_MATH_FUNCTIONS cc-check-function-in-lib sin m define-append LDLIBS [get-define lib_sin] } -if {[opt-bool ipv6 full]} { +if {[opt-bool-or-full ipv6]} { msg-result "Enabling IPv6" define JIM_IPV6 } -if {[opt-bool ssl full]} { +if {[opt-bool-or-full ssl]} { if {[pkg-config-init 0]} { foreach pkg {openssl libssl} { if {[pkg-config $pkg]} { @@ -215,7 +229,7 @@ if {[opt-bool ssl full]} { } } } -if {[opt-bool lineedit full]} { +if {[opt-bool-or-full lineedit]} { if {([cc-check-includes termios.h] && [have-feature isatty]) || [have-feature winconsole]} { msg-result "Enabling line editing" define USE_LINENOISE |