aboutsummaryrefslogtreecommitdiff
path: root/libctf/configure
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2021-02-03 14:02:30 +0000
committerNick Alcock <nick.alcock@oracle.com>2021-02-10 15:26:57 +0000
commitcbd8f5bbcc81ffe6c84bd6439c9a22976867e4ad (patch)
tree69084a263c2db6ce7cfe73dc4610c0143fcb7b48 /libctf/configure
parent95148614026da7353721411dd020d024667e3482 (diff)
downloadgdb-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')
-rwxr-xr-xlibctf/configure73
1 files changed, 71 insertions, 2 deletions
diff --git a/libctf/configure b/libctf/configure
index bef55bb..902eadd 100755
--- a/libctf/configure
+++ b/libctf/configure
@@ -636,6 +636,9 @@ am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
VERSION_FLAGS
+TCL_TRY_FALSE
+TCL_TRY_TRUE
+EXPECT
CTF_LIBADD
SHARED_LDFLAGS
NEED_CTF_QSORT_R_FALSE
@@ -11539,7 +11542,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11542 "configure"
+#line 11545 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11645,7 +11648,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11648 "configure"
+#line 11651 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13391,6 +13394,68 @@ fi
+# Extract the first word of "expect", so it can be a program name with args.
+set dummy expect; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_EXPECT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $EXPECT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_EXPECT="$EXPECT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_EXPECT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+EXPECT=$ac_cv_path_EXPECT
+if test -n "$EXPECT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPECT" >&5
+$as_echo "$EXPECT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl supporting try/catch" >&5
+$as_echo_n "checking for Tcl supporting try/catch... " >&6; }
+if ${ac_cv_libctf_tcl_try+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ 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`
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libctf_tcl_try" >&5
+$as_echo "$ac_cv_libctf_tcl_try" >&6; }
+ if test "${ac_cv_libctf_tcl_try}" = yes; then
+ TCL_TRY_TRUE=
+ TCL_TRY_FALSE='#'
+else
+ TCL_TRY_TRUE='#'
+ TCL_TRY_FALSE=
+fi
+
+
# 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
@@ -13552,6 +13617,10 @@ if test -z "${NEED_CTF_QSORT_R_TRUE}" && test -z "${NEED_CTF_QSORT_R_FALSE}"; th
as_fn_error $? "conditional \"NEED_CTF_QSORT_R\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${TCL_TRY_TRUE}" && test -z "${TCL_TRY_FALSE}"; then
+ as_fn_error $? "conditional \"TCL_TRY\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0