diff options
author | Steve Bennett <steveb@workware.net.au> | 2017-04-22 20:30:59 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2017-04-22 20:31:22 +1000 |
commit | 31a9f433f06b8cc426d281436a628a5fdd3bf755 (patch) | |
tree | 42ebfbbcc964f60a8432b3b42f2880db44926287 /autosetup/autosetup-find-tclsh | |
parent | a9c149f459c9711ce5e36efa7f4eca1fe57622d9 (diff) | |
download | jimtcl-31a9f433f06b8cc426d281436a628a5fdd3bf755.zip jimtcl-31a9f433f06b8cc426d281436a628a5fdd3bf755.tar.gz jimtcl-31a9f433f06b8cc426d281436a628a5fdd3bf755.tar.bz2 |
build: Update autosetup to v0.6.6-8-g062d650
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'autosetup/autosetup-find-tclsh')
-rwxr-xr-x | autosetup/autosetup-find-tclsh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/autosetup/autosetup-find-tclsh b/autosetup/autosetup-find-tclsh new file mode 100755 index 0000000..12d76af --- /dev/null +++ b/autosetup/autosetup-find-tclsh @@ -0,0 +1,16 @@ +#!/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/autosetup-test-tclsh"; } 2>/dev/null && exit 0 +PATH="$PATH:$d"; export PATH +for tclsh in jimsh tclsh tclsh8.5 tclsh8.6; do + { $tclsh "$d/autosetup-test-tclsh"; } 2>/dev/null && exit 0 +done +echo 1>&2 "No installed jimsh or tclsh, 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/autosetup-test-tclsh" && exit 0 +done +echo 1>&2 "No working C compiler found. Tried ${CC_FOR_BUILD:-cc} and gcc." +echo false |