Skip to content

Commit

Permalink
Call native tclsh from Makefile and some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
apn committed Jan 7, 2025
1 parent 25cec57 commit 558e06b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ ${THREAD_ZIP_FILE}: ${ZIP_INSTALL_OBJS}
@cp -a $(srcdir)/lib/* ${THREAD_VFS_PATH};
@find ${THREAD_VFS_ROOT} -type d -empty -delete
@echo "creating ${THREAD_ZIP_FILE} from ${THREAD_VFS_PATH}"
@echo "zipfs mkzip ${THREAD_ZIP_FILE} ${THREAD_VFS_PATH} ${THREAD_VFS_PATH}" | $(TCLSH)
@echo "zipfs mkzip ${THREAD_ZIP_FILE} ${THREAD_VFS_PATH} ${THREAD_VFS_PATH}" | $(TCLSH_NATIVE)


#========================================================================
Expand Down
29 changes: 1 addition & 28 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -134,33 +134,6 @@ AC_DEFUN(TCLTHREAD_WITH_LMDB, [
fi
])

AC_DEFUN([XCHECK_NATIVE_TCLSH9], [
AC_MSG_CHECKING([for tclsh9])
AC_CHECK_PROGS([TCLSH_NATIVE], [tclsh9.0 tclsh90 tclsh], [no])
if test "$TCLSH_NATIVE" = "no"; then
AC_MSG_ERROR([A native tclsh9 is required to build this program])
else
# Check the version in case found program is tclsh
TCLSH_NATIVE_VERSION=$(echo 'puts $tcl_version' | $TCLSH_NATIVE )
case "$TCLSH_NATIVE_VERSION" in
9.*)
AC_MSG_RESULT([native Tcl 9 detected: $TCLSH_NATIVE_VERSION])
;;
*)
AC_MSG_NOTICE([$TCLSH_NATIVE] version is $TCLSH_NATIVE_VERSION)
if test -n "$TCLSH_PROG" -a "$ac_cv_cross" != "yes"; then
AC_MSG_NOTICE([setting TCLSH_NATIVE to TCLSH_PROG ($TCLSH_PROG)])
TCLSH_NATIVE="$TCLSH_PROG"
else
AC_MSG_ERROR([A native tclsh9 is required, but version $TCLSH_NATIVE_VERSION was found])
exit 1
fi
;;
esac
fi
])

# FIND_TCLSH9_NATIVE
# Locates a Tcl 9 tclsh and set TCLSH_NATIVE to its path if found.
# Unsets TCLSH_NATIVE if not found.
Expand All @@ -171,7 +144,7 @@ AC_DEFUN([FIND_TCLSH9_NATIVE], [
AS_UNSET([ac_cv_path_TCLSH_NATIVE])
AC_PATH_PROG([TCLSH_NATIVE], [$f], [no])
if test "$TCLSH_NATIVE" != "no"; then
AC_MSG_CHECKING([tclsh for Tcl 9])
AC_MSG_CHECKING([$TCLSH_NATIVE is Tcl 9])
CHECK_TCLSH_VERSION([found], [$TCLSH_NATIVE], [9])
AC_MSG_RESULT([$found])
if test "$found" = "yes"; then
Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -9518,8 +9518,8 @@ fi


if test "$TCLSH_NATIVE" != "no"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking tclsh for Tcl 9" >&5
printf %s "checking tclsh for Tcl 9... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $TCLSH_NATIVE is Tcl 9" >&5
printf %s "checking $TCLSH_NATIVE is Tcl 9... " >&6; }

found=`echo "puts [package vsatisfies \\$tcl_version 9]" | $TCLSH_NATIVE`
if test "x$found" = "x1"; then
Expand Down

0 comments on commit 558e06b

Please sign in to comment.