Index: build/autogen.sh ================================================================== --- build/autogen.sh +++ build/autogen.sh @@ -21,5 +21,12 @@ aclocal -I aclocal autoconf automake -fca rm -rf autom4te.cache + +# Add Linux/MUSL support if missing +if ! grep '[-]musl' config.sub >/dev/null 2>/dev/null; then + sed 's@\(-*\)linux-gnu\* @\1linux-musl | &@g' config.sub > config.sub.new + cat config.sub.new > config.sub + rm -f config.sub.new +fi Index: build/build-platform ================================================================== --- build/build-platform +++ build/build-platform @@ -22,19 +22,29 @@ exit 1 fi dir="$(echo "${dir}" | sed 's@/$@@')" - dir_platform="$(basename "${dir}-" | sed 's@^libtclkit-[^-]*-@@;s@-notk-@-@g;s@-xcompile-@-@g;s@-kitdll-@-@;s@-sdk-@-@g;s@-$@@')" - - if [ -z "${platform}" ]; then - echo " $dir_platform" - else - if [ "${dir_platform}" = "${platform}" ]; then - break - fi - fi + dir_platform_in="$(basename "${dir}-" | sed 's@^libtclkit-[^-]*-@@;s@-notk-@-@g;s@-xcompile-@-@g;s@-kitdll-@-@;s@-sdk-@-@g;s@-$@@')" + case "${dir_platform_in}" in + linux-i386|linux-amd64) + dir_platforms=("${dir_platform_in}" "${dir_platform_in}-static") + ;; + *) + dir_platforms=("${dir_platform_in}") + ;; + esac + + for dir_platform in "${dir_platforms[@]}"; do + if [ -z "${platform}" ]; then + echo " $dir_platform" + else + if [ "${dir_platform}" = "${platform}" ]; then + break 2 + fi + fi + done done dir="$(pwd)/${dir}" case "${platform}" in native) @@ -41,10 +51,19 @@ platform='' ;; linux-i386) platform="x86_64-redhat5-linux 32" ;; + linux-i386-static) + platform="x86_64-unknown-linux-musl 32" + ;; + linux-amd64) + platform="x86_64-redhat5-linux 64" + ;; + linux-amd64-static) + platform="x86_64-unknown-linux-musl 64" + ;; linux-mipsel) platform="mipsel-unknown-linux-uclibc" ;; solaris-amd64) platform="i386-pc-solaris2.10 64" @@ -107,11 +126,11 @@ export WINEPREFIX make TCLSH="wine64 ${dir}/lib/tclsh.exe" test ;; x86_64-redhat5-linux) - make TCLSH="${dir}/lib/tclsh" test + make TCLSH="LD_LIBRARY_PATH=${dir}/lib ${dir}/lib/tclsh" test ;; '') make test ;; esac