Index: kitsh/buildsrc/kitsh-0.0/aclocal.m4 ================================================================== --- kitsh/buildsrc/kitsh-0.0/aclocal.m4 +++ kitsh/buildsrc/kitsh-0.0/aclocal.m4 @@ -124,17 +124,18 @@ for proj in mk4tcl tcl tclvfs tk; do AC_MSG_CHECKING([for libraries required for ${proj}]) libdir="../../../${proj}/inst" - libfiles="`find "${libdir}" -name '*.a' | grep -v 'stub' | tr "\n" ' '`" + libfiles="`find "${libdir}" -name '*.a' | tr "\n" ' '`" + libfilesnostub="`find "${libdir}" -name '*.a' | grep -v 'stub' | tr "\n" ' '`" ARCHS="${ARCHS} ${libfiles}" AC_MSG_RESULT([${libfiles}]) - if test "${libfiles}" != ""; then + if test "${libfilesnostub}" != ""; then if test "${proj}" = "mk4tcl"; then AC_DEFINE(KIT_INCLUDES_MK4TCL, [1], [Specify this if you link against mkt4tcl]) DC_DO_STATIC_LINK_LIBCXX fi if test "${proj}" = "tk"; then Index: tcl/build.sh ================================================================== --- tcl/build.sh +++ tcl/build.sh @@ -62,11 +62,25 @@ ./configure --disable-shared --prefix="${INSTDIR}" ${CONFIGUREEXTRA} ${MAKE:-make} || continue - ${MAKE:-make} install + ${MAKE:-make} install || ( + # Work with Tcl 8.6.x's TCLSH_NATIVE solution for + # cross-compile installs + + ${MAKE:-make} install TCLSH_NATIVE="${TCLKIT:-tclkit}" + ) || ( + # Make install can fail if cross-compiling using Tcl 8.5.x + # because the Makefile calls "$(TCLSH)". We can't simply + # redefine TCLSH because it also uses TCLSH as a build target + sed 's@^$(TCLSH)@blah@' Makefile > Makefile.new + cat Makefile.new > Makefile + rm -f Makefile.new + + ${MAKE:-make} install TCLSH="../../../../../../../../../../../../../../../../../$(which "${TCLKIT:-tclkit}")" + ) mkdir "${OUTDIR}/lib" || exit 1 cp -r "${INSTDIR}/lib"/* "${OUTDIR}/lib/" rm -rf "${OUTDIR}/lib/pkgconfig" rm -f "${OUTDIR}"/lib/* >/dev/null 2>/dev/null