diff options
author | drh <> | 2024-07-31 11:42:47 +0000 |
---|---|---|
committer | drh <> | 2024-07-31 11:42:47 +0000 |
commit | d3b58968a98e0826a169326c27780d54a8f2e849 (patch) | |
tree | 9b7f1df21a15667b84d3654b989d4fc9e91895fd /configure | |
parent | f15c80d80f5c6bdea2f2eac2a300ec053732cedb (diff) | |
download | sqlite-d3b58968a98e0826a169326c27780d54a8f2e849.tar.gz sqlite-d3b58968a98e0826a169326c27780d54a8f2e849.zip |
Adjust the configure script so that the --with-tcl option is used to
find the appropriate tclsh.
FossilOrigin-Name: 6fb9e37c751cd1a411c77f792794e1abafa5c40ad4dda8d433600d44d525a97c
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -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 |