diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2021-02-03 14:02:30 +0000 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2021-02-10 15:26:57 +0000 |
commit | cbd8f5bbcc81ffe6c84bd6439c9a22976867e4ad (patch) | |
tree | 69084a263c2db6ce7cfe73dc4610c0143fcb7b48 /libctf/configure.ac | |
parent | 95148614026da7353721411dd020d024667e3482 (diff) | |
download | gdb-cbd8f5bbcc81ffe6c84bd6439c9a22976867e4ad.zip gdb-cbd8f5bbcc81ffe6c84bd6439c9a22976867e4ad.tar.gz gdb-cbd8f5bbcc81ffe6c84bd6439c9a22976867e4ad.tar.bz2 |
libctf: require a Tcl capable of try/catch to run tests
The run_native_host_cmd implementation in testsuite/lib/ctf-lib.exp
uses try/catch, which are new in Tcl 8.6. Require a Tcl that knows
that try exists, as suggested by Jan Beulich.
libctf/ChangeLog
2021-02-03 Nick Alcock <nick.alcock@oracle.com>
* configure.ac (EXPECT): Check for, in order to define...
(TCL_TRY): ... this, if Tcl supports try/catch.
* Makefile.am (TCL_TRY): Run the testsuite only if set.
* configure: Regenerated.
* Makefile.in: Likewise.
Diffstat (limited to 'libctf/configure.ac')
-rw-r--r-- | libctf/configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libctf/configure.ac b/libctf/configure.ac index ef00efe..c6b8044 100644 --- a/libctf/configure.ac +++ b/libctf/configure.ac @@ -205,6 +205,15 @@ fi AC_SUBST(SHARED_LDFLAGS) AC_SUBST(CTF_LIBADD) +AC_PATH_PROG([EXPECT], [expect]) +AC_CACHE_CHECK([for Tcl supporting try/catch], [ac_cv_libctf_tcl_try], + [ac_cv_libctf_tcl_try=`if test -z $EXPECT; then echo no; else $EXPECT << EOF +if @<:@llength @<:@info commands try@:>@@:>@ then { puts yes } else { puts no } +EOF +fi` +]) +AM_CONDITIONAL(TCL_TRY, test "${ac_cv_libctf_tcl_try}" = yes) + # Use a version script, if possible, or an -export-symbols-regex otherwise. VERSION_FLAGS='-export-symbols-regex ctf_.*' if $LD --help 2>&1 | grep -- --version-script >/dev/null; then |