ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+
+# Setup the testing framework, if you have one
+EXPECT = expect
FGREP = @FGREP@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
libctf_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=0
libctf_la_LDFLAGS = $(libctf_nobfd_la_LDFLAGS)
libctf_la_SOURCES = $(libctf_nobfd_la_SOURCES) ctf-open-bfd.c
-
-# Setup the testing framework, if you have one
-EXPECT = expect
RUNTEST = runtest
RUNTESTFLAGS =
-CC_FOR_TARGET = ` \
- if [ -f $$r/../gcc/xgcc ] ; then \
- if [ -f $$r/../newlib/Makefile ] ; then \
- echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
- else \
- echo $$r/../gcc/xgcc -B$$r/../gcc/; \
- fi; \
- else \
- if [ "@host@" = "@target@" ] ; then \
- echo $(CC); \
- else \
- echo gcc | sed '$(transform)'; \
- fi; \
- fi`
+@TCL_TRY_TRUE@CC_FOR_TARGET = ` \
+@TCL_TRY_TRUE@ if [ -f $$r/../gcc/xgcc ] ; then \
+@TCL_TRY_TRUE@ if [ -f $$r/../newlib/Makefile ] ; then \
+@TCL_TRY_TRUE@ echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
+@TCL_TRY_TRUE@ else \
+@TCL_TRY_TRUE@ echo $$r/../gcc/xgcc -B$$r/../gcc/; \
+@TCL_TRY_TRUE@ fi; \
+@TCL_TRY_TRUE@ else \
+@TCL_TRY_TRUE@ if [ "@host@" = "@target@" ] ; then \
+@TCL_TRY_TRUE@ echo $(CC); \
+@TCL_TRY_TRUE@ else \
+@TCL_TRY_TRUE@ echo gcc | sed '$(transform)'; \
+@TCL_TRY_TRUE@ fi; \
+@TCL_TRY_TRUE@ fi`
# development.sh is used to determine -Werror default.
-CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
-EXTRA_DEJAGNU_SITE_CONFIG = development.exp
-DISTCLEANFILES = site.exp development.exp
+@TCL_TRY_TRUE@CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
+@TCL_TRY_TRUE@EXTRA_DEJAGNU_SITE_CONFIG = development.exp
+@TCL_TRY_TRUE@DISTCLEANFILES = site.exp development.exp
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+@TCL_TRY_FALSE@check-DEJAGNU: site.exp
+@TCL_TRY_FALSE@ srcdir='$(srcdir)'; export srcdir; \
+@TCL_TRY_FALSE@ EXPECT=$(EXPECT); export EXPECT; \
+@TCL_TRY_FALSE@ if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
+@TCL_TRY_FALSE@ exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
+@TCL_TRY_FALSE@ if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+@TCL_TRY_FALSE@ then :; else exit_status=1; fi; \
+@TCL_TRY_FALSE@ done; \
+@TCL_TRY_FALSE@ else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
+@TCL_TRY_FALSE@ fi; \
+@TCL_TRY_FALSE@ exit $$exit_status
site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
@echo 'Making a new site.exp file ...'
@echo '## these variables are automatically generated by make ##' >site.tmp
.PRECIOUS: Makefile
-check-DEJAGNU: site.exp development.exp
- srcroot=`cd $(srcdir) && pwd`; export srcroot; \
- r=`pwd`; export r; \
- LC_ALL=C; export LC_ALL; \
- EXPECT=$(EXPECT); export EXPECT; \
- runtest=$(RUNTEST); \
- if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
- $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
- CC_FOR_HOST="$(CC)" LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \
- else echo "WARNING: could not find \`runtest'" 1>&2; :;\
- fi
-
-development.exp: $(BFDDIR)/development.sh
- $(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \
- | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@
+@TCL_TRY_TRUE@check-DEJAGNU: site.exp development.exp
+@TCL_TRY_TRUE@ srcroot=`cd $(srcdir) && pwd`; export srcroot; \
+@TCL_TRY_TRUE@ r=`pwd`; export r; \
+@TCL_TRY_TRUE@ LC_ALL=C; export LC_ALL; \
+@TCL_TRY_TRUE@ EXPECT=$(EXPECT); export EXPECT; \
+@TCL_TRY_TRUE@ runtest=$(RUNTEST); \
+@TCL_TRY_TRUE@ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+@TCL_TRY_TRUE@ $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
+@TCL_TRY_TRUE@ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
+@TCL_TRY_TRUE@ CC_FOR_HOST="$(CC)" LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \
+@TCL_TRY_TRUE@ else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+@TCL_TRY_TRUE@ fi
+
+@TCL_TRY_TRUE@development.exp: $(BFDDIR)/development.sh
+@TCL_TRY_TRUE@ $(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \
+@TCL_TRY_TRUE@ | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
LTLIBOBJS
LIBOBJS
VERSION_FLAGS
+TCL_TRY_FALSE
+TCL_TRY_TRUE
+EXPECT
CTF_LIBADD
SHARED_LDFLAGS
NEED_CTF_QSORT_R_FALSE
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
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
+# 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
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