Index: kitcreator ================================================================== --- kitcreator +++ kitcreator @@ -62,11 +62,14 @@ CONFIGUREEXTRA="$@" export CONFIGUREEXTRA if echo " ${CONFIGUREEXTRA} " | grep ' --enable-threads' >/dev/null 2>/dev/null; then + KITCREATOR_ADD_ENABLE_THREADS='0' KITCREATOR_PKGS="${KITCREATOR_PKGS} thread" +elif echo " ${CONFIGUREEXTRA} " | grep ' --disable-threads' >/dev/null 2>/dev/null; then + KITCREATOR_ADD_ENABLE_THREADS='0' fi # Determine cross-compile status host_os="$(echo " ${CONFIGUREEXTRA} " | sed 's@^.* --host=\([^ ]*\) .*$@\1@ t x @@ -186,10 +189,17 @@ case "${pkg}" in tcl) TCLCONFIGDIR=$(find "$(pwd)/tcl/build" -name tclConfig.sh | head -1 | sed 's@/[^/]*$@@') TCLCONFIGDIRTAIL="$(basename "${TCLCONFIGDIR}")" export TCLCONFIGDIR TCLCONFIGDIRTAIL + + # If Tcl was compiled with threads enabled pass --enable-threads to all sub-projects + if [ "${KITCREATOR_ADD_ENABLE_THREADS:-1}" != '0' ]; then + if [ "$( . "${TCLCONFIGDIR}/tclConfig.sh" && echo "${TCL_THREADS:-0}" )" = '1' ]; then + CONFIGUREEXTRA="${CONFIGUREEXTRA} --enable-threads" + fi + fi ;; esac if [ "${failed}" = "1" ]; then buildfailed="1"