Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b7cfef9f051815eb3b231df41d235c13871f9c6b63969627597095f1137ea1a1
Ticket: 2ef3430fdc612eb42a7a0aae7b3babed08d92c17
Don't assume that host=*mingw32* means cross-compiling
User & Date: anonymous on 2025-10-28 12:32:09
Changes

  1. icomment:
    What about using tclsh if it is available and the generated tclsh if it is not?
    
    AC_CHECK_PROG(TCL_EXE, tclsh, tclsh, "TCL_LIBRARY=\"\${LIBRARY_DIR}\"; export TCL_LIBRARY; ./\${TCLSH}")
    
    ... or always use the generated tclsh when we know that we can execute it (i.e. we are running on Windows):
    
    AC_CANONICAL_HOST
    
    case "${host_os}" in
        cygwin*|mingw*)
            TCL_EXE="TCL_LIBRARY=\"\${LIBRARY_DIR}\"; export TCL_LIBRARY; ./\${TCLSH}"
            ;;
        *)
            TCL_EXE="tclsh"
            ;;
    esac
    
    You can argue that the build will fail if it is a true cross-compilation and tclsh is absent, but that problem already exists with the current implementation.
    
    For improving that, the configure script could put a check for the existence of tclsh on the *) case above and throw an error when absent.
    
    
    (As I already mentioned, I don't really know about autotools, the above is the result of a quick web search.)
    
  2. login: "anonymous"
  3. mimetype: "text/plain"