diff options
author | Didier Raboud <odyx@debian.org> | 2019-11-20 20:25:37 +0100 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2019-11-20 20:25:37 +0100 |
commit | 052cee686ea886c16b59dcabb5a04b2e6d390ade (patch) | |
tree | 0f0dc73676b4d94e58c5b0d77e5c5df5192aaf75 /autosetup/local.tcl | |
parent | 352d61e6661d45100eeea2c960b027be01b7fc37 (diff) | |
parent | 0aa0fb4e3a38d38a49de9eb585d93d63a370dcf6 (diff) |
Merge tag 'upstream/0.79' into upstream/latest-repack
Diffstat (limited to 'autosetup/local.tcl')
-rw-r--r-- | autosetup/local.tcl | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/autosetup/local.tcl b/autosetup/local.tcl index bf86c5c..ba2bb3d 100644 --- a/autosetup/local.tcl +++ b/autosetup/local.tcl @@ -32,7 +32,7 @@ proc ext-get-status {ext} { return ? } -proc check-extension-status {ext required} { +proc check-extension-status {ext required {asmodule 0}} { global withinfo set status [ext-get-status $ext] @@ -79,7 +79,13 @@ proc check-extension-status {ext required} { } } - if {$ext in $withinfo(mod)} { + # asmodule=1 means that the parent is a module so + # any automatically selected dependencies should also be modules + if {$asmodule == 0 && $ext in $withinfo(mod)} { + set asmodule 1 + } + + if {$asmodule} { # This is a module, so ignore LIBS # LDLIBS_$ext will contain the appropriate libs for this module define LIBS $LIBS @@ -88,7 +94,7 @@ proc check-extension-status {ext required} { if {$depinfo(n) == 0} { # Now extension dependencies foreach i [ext-get $ext dep] { - set status [check-extension-status $i $required] + set status [check-extension-status $i $required $asmodule] #puts "$ext: dep $i $required => $status" incr depinfo($status) if {$depinfo(n)} { @@ -108,8 +114,8 @@ proc check-extension-status {ext required} { return [ext-set-status $ext n] } - # Selected as a module? - if {$ext in $withinfo(mod)} { + # Selected as a module directly or because of a parent dependency? + if {$asmodule} { if {[ext-has $ext tcl]} { # Easy, a Tcl module msg-result "Extension $ext...tcl" @@ -121,6 +127,7 @@ proc check-extension-status {ext required} { define-append LDLIBS_$ext [pkg-config-get $pkg LIBS] define-append LDFLAGS [pkg-config-get $pkg LDFLAGS] define-append CCOPTS [pkg-config-get $pkg CFLAGS] + define-append PKG_CONFIG_REQUIRES $pkg } else { foreach i [ext-get $ext libdep] { define-append LDLIBS_$ext [get-define $i ""] @@ -145,6 +152,7 @@ proc check-extension-status {ext required} { define-append LDLIBS [pkg-config-get $pkg LIBS] define-append LDFLAGS [pkg-config-get $pkg LDFLAGS] define-append CCOPTS [pkg-config-get $pkg CFLAGS] + define-append PKG_CONFIG_REQUIRES $pkg } else { foreach i [ext-get $ext libdep] { define-append LDLIBS [get-define $i ""] @@ -178,15 +186,20 @@ proc check-extensions {} { set withinfo(maybe) {} # Now work out the default status. We have. - # normal case, include !optional if possible - # --without=default, don't include optional + # 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 optional]} { - lappend withinfo(maybe) $i + if {[ext-has $i off]} { + continue + } + if {[ext-has $i optional] && !$withinfo(optional)} { + continue } + lappend withinfo(maybe) $i } } |