Login
Artifact [7793fff189]
Login

Artifact 7793fff18985923479d69c3119b737518087a36a:


#!/bin/sh
# Looks for a suitable tclsh or jimsh in the PATH
# If not found, builds a bootstrap jimsh from source
d=`dirname "$0"`
{ "$d/jimsh0" "$d/test-tclsh"; } 2>/dev/null && exit 0
if false; then
    # Default autosetup behaviour: find tclsh or jim in $PATH
    PATH="$PATH:$d"; export PATH
    for tclsh in jimsh tclsh tclsh8.5 tclsh8.6; do
	{ $tclsh "$d/test-tclsh"; } 2>/dev/null && exit 0
    done
fi
echo 1>&2 "Building local bootstrap jimsh0"
for cc in ${CC_FOR_BUILD:-cc} gcc; do
    { $cc -o "$d/jimsh0" "$d/jimsh0.c"; } 2>/dev/null || continue
    "$d/jimsh0" "$d/test-tclsh" && exit 0
done
echo 1>&2 "No working C compiler found. Tried ${CC_FOR_BUILD:-cc} and gcc."
echo false