Jim Tcl
Check-in [ef80bdd56d]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:configure: Improve module selection

Modules/extensions are now explicitly marked as optional (and enabled with --full), or off (must be explicitly enabled with --with-mod/--with-ext)

This means that now binary and tclprefix are correctly not enabled by default, and zlib is enabled with --full.

Signed-off-by: Steve Bennett <steveb@workware.net.au>

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ef80bdd56d8e3376e304ac2e69dc8efbe749cbf6
User & Date: steveb@workware.net.au 2017-09-21 06:32:04
Context
2017-09-21
06:34
configure: --with-mod and --with-ext allow commas

Makes it a bit easier to type on the command line. e.g.

--with-mod=binary,zlib --with-ext=sqlite3

Spaces are still accepted, as are multiple instances of --with-mod, --with-ext and --without-ext

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: e6deea1782 user: steveb@workware.net.au tags: trunk

06:32
configure: Improve module selection

Modules/extensions are now explicitly marked as optional (and enabled with --full), or off (must be explicitly enabled with --with-mod/--with-ext)

This means that now binary and tclprefix are correctly not enabled by default, and zlib is enabled with --full.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: ef80bdd56d user: steveb@workware.net.au tags: trunk

06:31
auto.def: tclprefix should not be enabled by default

It is listed as not enabled by default, but it is enabled by default

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: fa321624e5 user: steveb@workware.net.au tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to auto.def.

40
41
42
43
44
45
46
47
48
49
50
51






52
53
54
55
56
57
58
59
60
61
62
63
64
...
289
290
291
292
293
294
295
296

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
...
376
377
378
379
380
381
382

383
384
385
386
387
388
389
        regexp    - Tcl-compatible regexp, regsub commands
        signal    - Signal handling
        stdlib    - Built-in commands including lassign, lambda, alias
        syslog    - System logging with syslog
        tclcompat - Tcl compatible read, gets, puts, parray, case, ...
        namespace - Tcl compatible namespace support

        These are disabled by default:

        oo        - Jim OO extension
        tree      - OO tree structure, similar to tcllib ::struct::tree
        binary    - Tcl-compatible 'binary' command






        readline  - Interface to libreadline
        rlprompt  - Tcl wrapper around the readline extension
        mk        - Interface to Metakit
        tclprefix - Support for the tcl::prefix command
        sqlite3   - Interface to sqlite3
        zlib      - Interface to zlib
        win32     - Interface to win32
    }
    with-out-jim-ext: {without-ext:"default|ext1 ext2 ..."} => {
        Specify jim extensions to exclude.
        If 'default' is given, the default extensions will not be added.
    }
    with-jim-extmod: {with-mod:"ext1 ext2 ..."} => {
................................................................................
} else {
    define docdir {${prefix}/docs/jim}
}

# Attributes of the extensions
# tcl=Pure Tcl extension
# static=Can't be built as a module
# optional=Not selected by default

# cpp=Is a C++ extension
global extdb
dict set extdb attrs {
    aio       { static }
    array     {}
    binary    { tcl }
    clock     {}
    eventloop { static }
    exec      { static }
    file      {}
    glob      { tcl }
    history   {}
    interp    { }
    load      { static }
    mk        { cpp optional }
    namespace { static }
    nshelper  { tcl optional }
    oo        { tcl }
    pack      {}
    package   { static }
    posix     {}
    readdir   {}
    readline  { optional }
    regexp    {}
    rlprompt  { tcl optional }
    sdl       { optional }
    signal    { static }
    sqlite3   { optional }
    zlib      { optional }
    stdlib    { tcl static }
    syslog    {}
    tclcompat { tcl static }
    tclprefix { optional }
    tree      { tcl }
    win32     { optional }
}

# Additional information about certain extensions
# dep=list of extensions which are required for this extension
# check=[expr] expression to evaluate to determine if the extension can be used
# libdep=list of 'define' symbols for dependent libraries
dict set extdb info {
................................................................................

# Set up the withinfo array based on what the user selected
global withinfo
set withinfo(without) [join [opt-val {without-ext with-out-jim-ext}]]
set withinfo(ext) [join [opt-val {with-ext with-jim-ext}]]
set withinfo(mod) [join [opt-val {with-mod with-jim-extmod}]]
set withinfo(nodefault) 0

if {$withinfo(without) eq "default"} {
    set withinfo(without) {}
    set withinfo(nodefault) 1
}

# Now go check everything - see autosetup/local.tcl
array set extinfo [check-extensions]







|




>
>
>
>
>
>



<

<







 







|
>





|








|







|

|
|

|






|







 







>







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

61

62
63
64
65
66
67
68
...
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
...
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
        regexp    - Tcl-compatible regexp, regsub commands
        signal    - Signal handling
        stdlib    - Built-in commands including lassign, lambda, alias
        syslog    - System logging with syslog
        tclcompat - Tcl compatible read, gets, puts, parray, case, ...
        namespace - Tcl compatible namespace support

        These are disabled by default, but enabled by --full:

        oo        - Jim OO extension
        tree      - OO tree structure, similar to tcllib ::struct::tree
        binary    - Tcl-compatible 'binary' command
        tclprefix - Support for the tcl::prefix command
        ensemble  - Support for the ensemble command
        zlib      - Interface to zlib

        These are disabled unless explicitly enabled:

        readline  - Interface to libreadline
        rlprompt  - Tcl wrapper around the readline extension
        mk        - Interface to Metakit

        sqlite3   - Interface to sqlite3

        win32     - Interface to win32
    }
    with-out-jim-ext: {without-ext:"default|ext1 ext2 ..."} => {
        Specify jim extensions to exclude.
        If 'default' is given, the default extensions will not be added.
    }
    with-jim-extmod: {with-mod:"ext1 ext2 ..."} => {
................................................................................
} else {
    define docdir {${prefix}/docs/jim}
}

# Attributes of the extensions
# tcl=Pure Tcl extension
# static=Can't be built as a module
# off=Off unless explicitly enabled
# optional=Off by default, but selected by --full
# cpp=Is a C++ extension
global extdb
dict set extdb attrs {
    aio       { static }
    array     {}
    binary    { tcl optional }
    clock     {}
    eventloop { static }
    exec      { static }
    file      {}
    glob      { tcl }
    history   {}
    interp    { }
    load      { static }
    mk        { cpp off }
    namespace { static }
    nshelper  { tcl optional }
    oo        { tcl }
    pack      {}
    package   { static }
    posix     {}
    readdir   {}
    readline  { off }
    regexp    {}
    rlprompt  { tcl off }
    sdl       { off }
    signal    { static }
    sqlite3   { off }
    zlib      { optional }
    stdlib    { tcl static }
    syslog    {}
    tclcompat { tcl static }
    tclprefix { optional }
    tree      { tcl }
    win32     { off }
}

# Additional information about certain extensions
# dep=list of extensions which are required for this extension
# check=[expr] expression to evaluate to determine if the extension can be used
# libdep=list of 'define' symbols for dependent libraries
dict set extdb info {
................................................................................

# Set up the withinfo array based on what the user selected
global withinfo
set withinfo(without) [join [opt-val {without-ext with-out-jim-ext}]]
set withinfo(ext) [join [opt-val {with-ext with-jim-ext}]]
set withinfo(mod) [join [opt-val {with-mod with-jim-extmod}]]
set withinfo(nodefault) 0
set withinfo(optional) [opt-bool full]
if {$withinfo(without) eq "default"} {
    set withinfo(without) {}
    set withinfo(nodefault) 1
}

# Now go check everything - see autosetup/local.tcl
array set extinfo [check-extensions]

Changes to autosetup/local.tcl.

176
177
178
179
180
181
182
183

184
185
186
187
188
189
190
191




192
193
194
195
196
197
198
    }

    set extlist [lsort [dict keys [dict get $extdb attrs]]]

    set withinfo(maybe) {}

    # Now work out the default status. We have.
    # normal case, include !optional if possible

    # --without=default, don't include optional
    if {$withinfo(nodefault)} {
        lappend withinfo(maybe) stdlib
    } else {
        foreach i $extlist {
            if {![ext-has $i optional]} {
                lappend withinfo(maybe) $i
            }




        }
    }

    foreach i $extlist {
        define LDLIBS_$i ""
    }








|
>
|




|
|

>
>
>
>







176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
    }

    set extlist [lsort [dict keys [dict get $extdb attrs]]]

    set withinfo(maybe) {}

    # 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]} {
                continue
            }
            if {[ext-has $i optional] && !$withinfo(optional)} {
                continue
            }
            lappend withinfo(maybe) $i
        }
    }

    foreach i $extlist {
        define LDLIBS_$i ""
    }