From cbd8f5bbcc81ffe6c84bd6439c9a22976867e4ad Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Wed, 3 Feb 2021 14:02:30 +0000 Subject: 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 * 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. --- libctf/configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libctf/configure.ac') 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 -- cgit v1.1