aboutsummaryrefslogtreecommitdiff
path: root/auto.def
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2022-08-27 14:00:26 +1000
committerSteve Bennett <steveb@workware.net.au>2023-02-13 10:44:10 +1000
commitccd47be1301935fcb5efe9bf721f1d33691aa65f (patch)
treee238183794dd9358362e8032b80ee6e1e4ed0845 /auto.def
parentaa18a0d938ca171fcf96616cb7ff011034eb5902 (diff)
downloadjimtcl-ccd47be1301935fcb5efe9bf721f1d33691aa65f.zip
jimtcl-ccd47be1301935fcb5efe9bf721f1d33691aa65f.tar.gz
jimtcl-ccd47be1301935fcb5efe9bf721f1d33691aa65f.tar.bz2
configure: Default to --full
Now use --minimal and/or --without-ext to disable things. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'auto.def')
-rw-r--r--auto.def64
1 files changed, 38 insertions, 26 deletions
diff --git a/auto.def b/auto.def
index 2cd63c5..0ea71b3 100644
--- a/auto.def
+++ b/auto.def
@@ -16,14 +16,16 @@ define CFLAGS [get-env CFLAGS ""]
define CXXFLAGS [get-env CFLAGS ""]
options {
- utf8 => "Include support for utf8-encoded strings"
+ utf8=1 => "Disable support for utf8-encoded strings"
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"
+ math=1 => "Disable math functions"
+ ssl=1 => "Disable ssl/tls support in the aio extension"
+ ipv6=1 => "Disable ipv6 support in the aio extension"
maintainer => {Enable the [debug] command and JimPanic}
- full => "Enable some optional features: ipv6, ssl, math, utf8, and some extensions (see --extinfo)"
+ minimal => "Disable some optional features: ipv6, ssl, math, utf8 and some extensions. Also see --without-ext=default"
+ # Note that full is now the default
+ full
allextmod => "Enable all non-default extensions as modules if prerequisites are found"
compat => "Enable some backward compatibility behaviour"
extinfo => "Show information about available extensions"
@@ -55,6 +57,7 @@ options {
# off=Off unless explicitly enabled or required by an enabled extension
# optional=Off by default, but selected by --full
# cpp=Is a C++ extension
+# always=Always include, even if minimal
global extdb
foreach {mod attrs help} {
@@ -76,7 +79,7 @@ foreach {mod attrs help} {
nshelper { tcl off } {}
oo { tcl } {Object Oriented class support}
pack {} {Low level binary pack and unpack}
- package { static } {Package management with the package command}
+ package { static always } {Package management with the package command}
posix {} {Posix APIs including os.fork, os.uptime}
readdir {} {Read the contents of a directory (used by glob)}
readline { off } {Interface to libreadline}
@@ -86,7 +89,7 @@ foreach {mod attrs help} {
sdl { off } {SDL graphics interface}
signal { static } {Signal handling}
sqlite3 { off } {Interface to sqlite3 database}
- stdlib { tcl static } {Built-in commands including lambda, stacktrace and some dict subcommands}
+ stdlib { tcl static always } {Built-in commands including lambda, stacktrace and some dict subcommands}
syslog {} {System logging with syslog}
tclcompat { tcl static } {Tcl compatible read, gets, puts, parray, case, ...}
tclprefix { optional } {Support for the tcl::prefix command}
@@ -98,6 +101,10 @@ foreach {mod attrs help} {
dict set extdb help $mod $help
}
+if {[opt-bool full]} {
+ user-notice "Note that --full is now the default, and need not be specified (see --minimal)"
+}
+
if {[opt-bool extinfo]} {
use text-formatting
use help
@@ -138,7 +145,7 @@ if {[opt-bool extinfo]} {
}
showmods "These extensions are enabled by default:" $info default
nl
- showmods "These are disabled by default, but enabled by --full:" $info optional
+ showmods "These are enabled by default, but disabled by --minimal:" $info optional
nl
showmods {
These are disabled unless explicitly enabled or --allextmod is selected and
@@ -375,20 +382,23 @@ cc-with {-includes sys/stat.h} {
set extra_objs {}
set jimregexp 0
-# 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
+# Like opt-bool except defaults to on normally and off if --minimal
+# In either case if explicitly enable or disabled, that takes precedence
+proc opt-bool-unless-minimal {opt} {
+ if {[opt-bool minimal]} {
+ set default 0
+ } else {
+ set default 1
+ }
+ # If not explicitly enabled/disabled, use the default based on --minimal
+ set val [opt-bool -nodefault $opt]
+ if {$val < 0} {
+ set val $default
+ }
+ return $val
}
-if {[opt-bool-or-full utf8]} {
+if {[opt-bool-unless-minimal utf8]} {
msg-result "Enabling UTF-8"
define JIM_UTF8
define-append AS_CFLAGS -DUSE_UTF8
@@ -401,19 +411,18 @@ if {[opt-bool maintainer]} {
msg-result "Enabling maintainer settings"
define JIM_MAINTAINER
}
-# If --math or --full and not --disable-math
-if {[opt-bool-or-full math]} {
+if {[opt-bool-unless-minimal 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-or-full ipv6]} {
+if {[opt-bool-unless-minimal ipv6]} {
msg-result "Enabling IPv6"
define JIM_IPV6
}
define-append PKG_CONFIG_REQUIRES ""
-if {[opt-bool-or-full ssl]} {
+if {[opt-bool-unless-minimal ssl]} {
if {[pkg-config-init 0]} {
foreach pkg {openssl libssl} {
if {[pkg-config $pkg]} {
@@ -441,7 +450,7 @@ if {[opt-bool-or-full ssl]} {
define-append AS_CFLAGS -DUSE_TLSv1_2_method
}
}
-if {[opt-bool-or-full lineedit]} {
+if {[opt-bool-unless-minimal lineedit]} {
if {([cc-check-includes termios.h] && [have-feature isatty]) || [have-feature winconsole]} {
msg-result "Enabling line editing"
define USE_LINENOISE
@@ -511,7 +520,10 @@ set withinfo(without) [join-ext-names [opt-val {without-ext with-out-jim-ext}]]
set withinfo(ext) [join-ext-names [opt-val {with-ext with-jim-ext}]]
set withinfo(mod) [join-ext-names [opt-val {with-mod with-jim-extmod}]]
set withinfo(nodefault) 0
-set withinfo(optional) [opt-bool full]
+set withinfo(optional) 1
+if {[opt-bool minimal]} {
+ set withinfo(optional) 0
+}
if {$withinfo(without) eq "default"} {
set withinfo(without) {}
set withinfo(nodefault) 1