1 |
dnl macro ASC_WISHVAR |
2 |
dnl -------------------------------------------------------------------- |
3 |
dnl See if we can find a wish shell var. |
4 |
dnl -------------------------------------------------------------------- |
5 |
AC_DEFUN(ASC_WISHVAR, |
6 |
[ |
7 |
# asc_wishvar( tcl_library, $with_wish) |
8 |
# generate the executable to extract a variable |
9 |
# from the tickle shell |
10 |
cat << EOF > wishvar.tmp.tcl |
11 |
#! $3 |
12 |
# this is a generated file and can be deleted any time. |
13 |
if {\$argc != 1} { |
14 |
puts stderr "\$argv0 needs variable name" |
15 |
exit 1 |
16 |
} |
17 |
set var [[lindex \$argv 0]] |
18 |
puts [[set \$var]] |
19 |
exit 0 |
20 |
EOF |
21 |
|
22 |
#call it |
23 |
# usage wishvar varname shell-to-test-in |
24 |
$1=`$3 wishvar.tmp.tcl -- $2` |
25 |
] |
26 |
) |