Skip to content

Commit d2539b4

Browse files
cyanogilvieclaude
andcommitted
Fix feature detection with internal Tcl subproject
cc.has_function requires an external dependency; when Tcl comes from the wrap fallback it's internal. Since the internal subproject is always Tcl 9, just set the feature as present. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 70b3dc9 commit d2539b4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

meson.build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ subdir('teabase/init')
3838
# Feature detection (must come after teabase/init which provides tcl_dep) <<<
3939
conf.set10('HAVE___BUILTIN_FFSLL', cc.has_function('__builtin_ffsll'))
4040
conf.set10('HAVE_FFSLL', cc.has_function('ffsll', prefix: '#include <strings.h>'))
41-
conf.set10('HAVE_TCL_GETNUMBERFROMOBJ', cc.has_function('Tcl_GetNumberFromObj', dependencies: tcl_dep))
41+
if tcl_dep.type_name() == 'internal'
42+
# Internal subproject is Tcl 9 — all features present
43+
conf.set10('HAVE_TCL_GETNUMBERFROMOBJ', true)
44+
else
45+
conf.set10('HAVE_TCL_GETNUMBERFROMOBJ', cc.has_function('Tcl_GetNumberFromObj', dependencies: tcl_dep))
46+
endif
4247
conf.set10('HAVE_UNISTD_H', cc.has_header('unistd.h'))
4348
# Feature detection >>>
4449

0 commit comments

Comments
 (0)