1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Adjust the configure script so that the --with-tcl option is used to

find the appropriate tclsh.

FossilOrigin-Name: 6fb9e37c751cd1a411c77f792794e1abafa5c40ad4dda8d433600d44d525a97c
This commit is contained in:
drh
2024-07-31 11:42:47 +00:00
parent f15c80d80f
commit d3b58968a9
4 changed files with 49 additions and 11 deletions

22
configure vendored
View File

@ -10318,7 +10318,20 @@ USE_AMALGAMATION=1
# if not, then we fall back to plain tclsh.
# TODO: try other versions before falling back?
#
for ac_prog in tclsh8.7 tclsh8.6 tclsh8.5 tclsh
if test x"${with_tcl}" != x; then
if test ! -r ${with_tcl}/tclConfig.sh; then
as_fn_error $? "no tclConfig.sh file found in --with-tcl: ${with_tcl}" "$LINENO" 5
else
. ${with_tcl}/tclConfig.sh
TCLSH_CMD=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION}
if test ! -x ${TCLSH_CMD}; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot use tclsh at: ${TCLSH_CMD}" >&5
$as_echo "$as_me: WARNING: cannot use tclsh at: ${TCLSH_CMD}" >&2;}
TCLSH_CMD=none
fi
fi
else
for ac_prog in tclsh8.6 tclsh8.5 tclsh
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@ -10361,6 +10374,7 @@ fi
done
test -n "$TCLSH_CMD" || TCLSH_CMD="none"
fi
if test "$TCLSH_CMD" = "none"; then
# If we can't find a local tclsh, then building the amalgamation will fail.
# We act as though --disable-amalgamation has been used.
@ -10368,6 +10382,12 @@ if test "$TCLSH_CMD" = "none"; then
USE_AMALGAMATION=0
TCLSH_CMD="tclsh"
fi
if test x"$TCLSH_CMD" = x; then
as_fn_error $? "cannot find a usable tclsh" "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $TCLSH_CMD" >&5
$as_echo "using $TCLSH_CMD" >&6; }
fi