@@ -58,11 +58,21 @@ # Remove previous directory's "tkConfig.sh" if found rm -f 'tkConfig.sh' cd "${BUILDDIR}/${dir}" || exit 1 - ./configure --enable-shared --disable-symbols --prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA} + if [ "${dir}" != "win" ]; then + # Statically link Tk to Tclkit if we are compiling for + # Windows + STATICTK="1" + fi + + if [ "${STATICTK}" = "1" ]; then + ./configure --disable-shared --disable-symbols --prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA} + else + ./configure --enable-shared --disable-symbols --prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA} + fi ${MAKE:-make} || continue ${MAKE:-make} install @@ -77,13 +87,14 @@ cp -r "${INSTDIR}/lib"/tk*/ "${OUTDIR}/lib/" cp -r "${INSTDIR}/lib"/libtk* "${OUTDIR}/lib"/tk*/ rm -rf "${OUTDIR}/lib"/tk*/demos strip -g "${OUTDIR}"/lib/tk*/*.so >/dev/null 2>/dev/null + find "${OUTDIR}" -type f -name '*.a' | xargs rm -f >/dev/null 2>/dev/null break done exit 0 ) || exit 1 exit 0