@@ -627,6 +627,7 @@ INSTALL_MSGS
627627INSTALL_LIBRARIES
628628THREAD_ZIP_FILE
629629ZIPFS_BUILD
630+ TCLSH_NATIVE
630631TCLSH_PROG
631632VC_MANIFEST_EMBED_EXE
632633VC_MANIFEST_EMBED_DLL
@@ -2599,6 +2600,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
25992600
26002601
26012602
2603+
26022604# --------------------------------------------------------------------
26032605# Call TEA_INIT as the first TEA_ macro to set up initial vars.
26042606# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
@@ -9729,6 +9731,123 @@ INSTALL_LIBRARIES=install-libraries
97299731INSTALL_MSGS=install-msgs
97309732fi
97319733
9734+ if test " ${ZIPFS_BUILD} " ! = 0; then
9735+ # Only search if user has not specified
9736+ if test -z " $TCLSH_NATIVE " ; then
9737+
9738+ found=" no"
9739+ for f in tclsh9.0 tclsh90 tclsh; do
9740+ { TCLSH_NATIVE=; unset TCLSH_NATIVE; }
9741+ { ac_cv_path_TCLSH_NATIVE=; unset ac_cv_path_TCLSH_NATIVE; }
9742+ # Extract the first word of "$f", so it can be a program name with args.
9743+ set dummy $f ; ac_word=$2
9744+ { printf ' %s\n' " $as_me :${as_lineno-$LINENO } : checking for $ac_word " >&5
9745+ printf %s " checking for $ac_word ... " >&6 ; }
9746+ if test ${ac_cv_path_TCLSH_NATIVE+y}
9747+ then :
9748+ printf %s " (cached) " >&6
9749+ else case e in # (
9750+ e) case $TCLSH_NATIVE in
9751+ [\\ /]* | ? :[\\ /]* )
9752+ ac_cv_path_TCLSH_NATIVE=" $TCLSH_NATIVE " # Let the user override the test with a path.
9753+ ;;
9754+ * )
9755+ as_save_IFS=$IFS ; IFS=$PATH_SEPARATOR
9756+ for as_dir in $PATH
9757+ do
9758+ IFS=$as_save_IFS
9759+ case $as_dir in # (((
9760+ ' ' ) as_dir=./ ;;
9761+ * /) ;;
9762+ * ) as_dir=$as_dir / ;;
9763+ esac
9764+ for ac_exec_ext in ' ' $ac_executable_extensions ; do
9765+ if as_fn_executable_p " $as_dir$ac_word$ac_exec_ext " ; then
9766+ ac_cv_path_TCLSH_NATIVE=" $as_dir$ac_word$ac_exec_ext "
9767+ printf ' %s\n' " $as_me :${as_lineno-$LINENO } : found $as_dir$ac_word$ac_exec_ext " >&5
9768+ break 2
9769+ fi
9770+ done
9771+ done
9772+ IFS=$as_save_IFS
9773+
9774+ test -z " $ac_cv_path_TCLSH_NATIVE " && ac_cv_path_TCLSH_NATIVE=" no"
9775+ ;;
9776+ esac ;;
9777+ esac
9778+ fi
9779+ TCLSH_NATIVE=$ac_cv_path_TCLSH_NATIVE
9780+ if test -n " $TCLSH_NATIVE " ; then
9781+ { printf ' %s\n' " $as_me :${as_lineno-$LINENO } : result: $TCLSH_NATIVE " >&5
9782+ printf ' %s\n' " $TCLSH_NATIVE " >&6 ; }
9783+ else
9784+ { printf ' %s\n' " $as_me :${as_lineno-$LINENO } : result: no" >&5
9785+ printf ' %s\n' " no" >&6 ; }
9786+ fi
9787+
9788+
9789+ if test " $TCLSH_NATIVE " ! = " no" ; then
9790+ { printf ' %s\n' " $as_me :${as_lineno-$LINENO } : checking $TCLSH_NATIVE is Tcl 9" >&5
9791+ printf %s " checking $TCLSH_NATIVE is Tcl 9... " >&6 ; }
9792+
9793+ found=` echo " puts [package vsatisfies \\ $tcl_version 9]" | $TCLSH_NATIVE `
9794+ if test " x$found " = " x1" ; then
9795+ found=yes
9796+ else
9797+ found=no
9798+ fi
9799+
9800+ { printf ' %s\n' " $as_me :${as_lineno-$LINENO } : result: $found " >&5
9801+ printf ' %s\n' " $found " >&6 ; }
9802+ if test " $found " = " yes" ; then
9803+ found=yes
9804+ break
9805+ fi
9806+ fi
9807+ done
9808+ if test " $found " ! = " yes" ; then
9809+ { TCLSH_NATIVE=; unset TCLSH_NATIVE; }
9810+ fi
9811+
9812+ # If not found, and not cross building set to TCLSH_PROG. One is
9813+ # not supposed to use that for native operations so check that not cross-
9814+ # compiling.
9815+ if test -z " $TCLSH_NATIVE " -a -n " $TCLSH_PROG " -a x" $ac_cv_cross " ! = x" yes" ; then
9816+ { printf ' %s\n' " $as_me :${as_lineno-$LINENO } : checking $TCLSH_PROG for Tcl 9" >&5
9817+ printf %s " checking $TCLSH_PROG for Tcl 9... " >&6 ; }
9818+
9819+ found=` echo " puts [package vsatisfies \\ $tcl_version 9]" | $TCLSH_PROG `
9820+ if test " x$found " = " x1" ; then
9821+ found=yes
9822+ else
9823+ found=no
9824+ fi
9825+
9826+ { printf ' %s\n' " $as_me :${as_lineno-$LINENO } : result: $found " >&5
9827+ printf ' %s\n' " $found " >&6 ; }
9828+ if test x" $found " ! = x" yes" ; then
9829+ as_fn_error $? " cannot find a usable native Tcl 9 tclsh. Either set TCLSH_NATIVE or use configure with --disable-zipfs" " $LINENO " 5
9830+ fi
9831+ TCLSH_NATIVE=" $TCLSH_PROG "
9832+ fi
9833+ else
9834+ # User specified. Check version acceptable.
9835+
9836+ found=` echo " puts [package vsatisfies \\ $tcl_version 9]" | $TCLSH_NATIVE `
9837+ if test " x$found " = " x1" ; then
9838+ found=yes
9839+ else
9840+ found=no
9841+ fi
9842+
9843+ if test x" $found " ! = x" yes" ; then
9844+ as_fn_error $? " $TCLSH_NATIVE is not a Tcl 9 tclsh." " $LINENO " 5
9845+ fi
9846+ fi
9847+ fi
9848+
9849+
9850+
97329851
97339852
97349853
0 commit comments