aboutsummaryrefslogtreecommitdiff
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
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>
-rw-r--r--.github/workflows/makefile.yml2
-rw-r--r--.travis.yml2
-rw-r--r--appveyor.yml2
-rw-r--r--auto.def64
-rw-r--r--autosetup/local.tcl43
5 files changed, 63 insertions, 50 deletions
diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml
index 3a0fa82..a6c4ab8 100644
--- a/.github/workflows/makefile.yml
+++ b/.github/workflows/makefile.yml
@@ -18,7 +18,7 @@ jobs:
run: sudo apt install libsqlite3-dev libhiredis-dev
- name: configure
- run: ./configure --maintainer --full --allextmod --disable-docs
+ run: ./configure --maintainer --allextmod --disable-docs
- name: Build
run: make
diff --git a/.travis.yml b/.travis.yml
index 325eee4..1236f4b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,7 +6,7 @@ addons:
- libsqlite3-dev
- libhiredis-dev
before_script:
- - ./configure --maintainer --full --allextmod --disable-docs
+ - ./configure --maintainer --allextmod --disable-docs
script:
- make all test
- ./test-bootstrap-jim
diff --git a/appveyor.yml b/appveyor.yml
index c906ec9..36fd95b 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -5,7 +5,7 @@ install:
- cmd: C:\msys64\usr\bin\bash -lc "pacman --sync --noconfirm make mingw-w64-i686-gcc mingw-w64-i686-sqlite3"
- cmd: cd C:\projects & mklink /D %APPVEYOR_PROJECT_NAME% %APPVEYOR_PROJECT_SLUG% & exit 0
build_script:
- - cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; ./configure --full --ssl --with-ext='sqlite3 win32 zlib' --disable-docs CFLAGS=-D__MINGW_USE_VC2005_COMPAT"
+ - cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; ./configure --ssl --with-ext='sqlite3 win32 zlib' --disable-docs CFLAGS=-D__MINGW_USE_VC2005_COMPAT"
- cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; make"
test_script:
- cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; make test"
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
diff --git a/autosetup/local.tcl b/autosetup/local.tcl
index 78ef27c..73484e5 100644
--- a/autosetup/local.tcl
+++ b/autosetup/local.tcl
@@ -219,27 +219,28 @@ proc check-extensions {allextmod} {
set withinfo(maybemod) {}
# Now work out the default status. We have.
- # normal case, include !off, !optional if possible
- # --full, include !off if possible
- # --without=default, don't include optional or off
- if {$withinfo(nodefault)} {
- lappend withinfo(maybe) stdlib
- } else {
- foreach i $extlist {
- if {[ext-has $i off]} {
- if {$allextmod} {
- lappend withinfo(maybemod) $i
- }
- continue
- }
- if {[ext-has $i optional] && !$withinfo(optional)} {
- if {$allextmod} {
- lappend withinfo(maybemod) $i
- }
- continue
- }
- lappend withinfo(maybe) $i
- }
+ # normal case: include !off, !optional if possible
+ # --without=default: only include always
+ foreach i $extlist {
+ if {$withinfo(nodefault)} {
+ if {[ext-has $i always]} {
+ lappend withinfo(maybe) $i
+ }
+ continue
+ }
+ if {[ext-has $i off]} {
+ if {$allextmod} {
+ lappend withinfo(maybemod) $i
+ }
+ continue
+ }
+ if {[ext-has $i optional] && !$withinfo(optional)} {
+ if {$allextmod} {
+ lappend withinfo(maybemod) $i
+ }
+ continue
+ }
+ lappend withinfo(maybe) $i
}
foreach i $extlist {