summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpetasis <petasis@f3661a36-4baa-549a-d6c7-40e0ffef350e>2012-04-12 22:23:37 (GMT)
committerpetasis <petasis@f3661a36-4baa-549a-d6c7-40e0ffef350e>2012-04-12 22:23:37 (GMT)
commit464ef134f2b3db104391c1953a0200594fabcd12 (patch)
tree29b26d2f4ab4950429fc71b575af3727b5aa44ed
parentebe368b5e180e079b8aa7acf04968ddd4cbba3c8 (diff)
downloadtkdnd-464ef134f2b3db104391c1953a0200594fabcd12.zip
tkdnd-464ef134f2b3db104391c1953a0200594fabcd12.tar.gz
tkdnd-464ef134f2b3db104391c1953a0200594fabcd12.tar.bz2
TkDND 2.4 released
-rw-r--r--Changelog170
-rw-r--r--Makefile.in36
-rwxr-xr-xconfigure1942
-rw-r--r--configure.in4
-rw-r--r--library/tkdnd_unix.tcl16
-rw-r--r--tclconfig/ChangeLog17
-rwxr-xr-xtclconfig/install-sh6
-rw-r--r--tclconfig/tcl.m4180
-rw-r--r--unix/TkDND_XDND.c462
-rw-r--r--unix/tkSelect.h167
-rw-r--r--unix/tkUnixSelect.c380
11 files changed, 2537 insertions, 843 deletions
diff --git a/Changelog b/Changelog
index eec766e..4ed7fb4 100644
--- a/Changelog
+++ b/Changelog
@@ -1,61 +1,69 @@
2012-04-12 Petasis George <petasis@iit.demokritos.gr>
- TkDND 2.4 released.
- * library/tkdnd_unix.tcl: Removed braces from a comment in
- xdnd::_GetDroppedData, left from testing with TIP 370 preliminary
- implementation. SF Bug ID: 3516862
+ TkDND 2.4 released.
+ * library/tkdnd_unix.tcl:
+ * unix/TkDND_XDND.c:
+ * unix/tkUnixSelect.c:
+ * unix/tkSelect.h: Modifications to support Linux drops.
+
+ * tclconfig/*:
+ * configure.in, Makefile.in: Updated to TEA 3.9.
+
+ * library/tkdnd_unix.tcl: Removed braces from a comment in
+ xdnd::_GetDroppedData, left from testing with TIP 370 preliminary
+ implementation. SF Bug ID: 3516862
2012-03-03 Petasis George <petasis@iit.demokritos.gr>
- TkDND 2.3 released.
- * library/tkdnd_windows.tcl:
- * win/OleDND.h:
- * win/TkDND_OleDND.cpp: Fix in TkDND_DropSource::QueryContinueDrag,
- to support dragging with all mouse buttons. Bug reported by
- Michael Fersch.
+ TkDND 2.3 released.
+ * library/tkdnd_windows.tcl:
+ * win/OleDND.h:
+ * win/TkDND_OleDND.cpp: Fix in TkDND_DropSource::QueryContinueDrag,
+ to support dragging with all mouse buttons. Bug reported by
+ Michael Fersch.
2011-09-24 Petasis George <petasis@iit.demokritos.gr>
- * win/OleDND.h: Added definition of WINVER to version 5, when compiling
- with MinGW, which defines it with version 4. SF Bug ID: 3411338.
+ * win/OleDND.h: Added definition of WINVER to version 5, when compiling
+ with MinGW, which defines it with version 4. SF Bug ID: 3411338.
2011-09-23 Petasis George <petasis@iit.demokritos.gr>
- * win/OleDND.h: Modified STRING_(s), to ease compilation with MinGW.
- Patch provided by Hans-Christoph Steiner. SF Bug ID: 3411338.
+ * win/OleDND.h: Modified STRING_(s), to ease compilation with MinGW.
+ Patch provided by Hans-Christoph Steiner. SF Bug ID: 3411338.
2011-09-22 Petasis George <petasis@iit.demokritos.gr>
- * win/OleDND.h: Added a check if CF_DIBV5 is defined (i.e.
- WINVER < 0x0500). SF Bug ID: 3411338.
+ * win/OleDND.h: Added a check if CF_DIBV5 is defined (i.e.
+ WINVER < 0x0500). SF Bug ID: 3411338.
2011-03-18 Petasis George <petasis@iit.demokritos.gr>
- * library/tkdnd_unix.tcl: Fixed a bug in xdnd::_GetDroppedData, where
- an improper error was thrown in case no common types were found between
- the drag source and drop target widgets. Now a more appropriate error
- is returned. Bug reported by Kevin Walzer.
+ * library/tkdnd_unix.tcl: Fixed a bug in xdnd::_GetDroppedData, where
+ an improper error was thrown in case no common types were found between
+ the drag source and drop target widgets. Now a more appropriate error
+ is returned. Bug reported by Kevin Walzer.
2011-01-14 Petasis George <petasis@iit.demokritos.gr>
- * library/tkdnd_unix.tcl: Added support for accepting drops, if
- TIP 370 is finally approved. Changes tested with a preliminary TIP 370
- implementation.
+ * library/tkdnd_unix.tcl: Added support for accepting drops, if
+ TIP 370 is finally approved. Changes tested with a preliminary TIP 370
+ implementation.
- * library/tkdnd_macosx.tcl: Fixed a bug reported by Kevin Walzer:
- macdnd::_GetDroppedData and xdnd::_GetDroppedData were missing the
- "time" argument, added in the XDND section for TIP 370 (if it gets
- accepted).
+ * library/tkdnd_macosx.tcl: Fixed a bug reported by Kevin Walzer:
+ macdnd::_GetDroppedData and xdnd::_GetDroppedData were missing the
+ "time" argument, added in the XDND section for TIP 370 (if it gets
+ accepted).
- * macosx/macdnd.m: Restored back a workarround by Kevin Walzer, as
- TkDND does not work well under all circumstances in OS X 10.6.
- (Reported by Kevin Walzer on 23 Dec 2010).
+ * macosx/macdnd.m: Restored back a workarround by Kevin Walzer, as
+ TkDND does not work well under all circumstances in OS X 10.6.
+ (Reported by Kevin Walzer on 23 Dec 2010).
2010-08-03 Petasis George <petasis@iit.demokritos.gr>
- TkDND 2.2 released.
- * library/tkdnd_windows.tcl:
- * win/OleDND.h: Fixes for compiling with UNICODE & _UNICODE.
+ TkDND 2.2 released.
+ * library/tkdnd_windows.tcl:
+ * win/OleDND.h: Fixes for compiling with UNICODE & _UNICODE.
2010-07-28 Petasis George <petasis@iit.demokritos.gr>
- * win/Makefile: Updated.
+ * win/Makefile: Updated.
- * library/tkdnd_unix.tcl:
- * library/tkdnd_windows.tcl: Fixed bug 2169256.
+ * library/tkdnd_unix.tcl:
+ * library/tkdnd_windows.tcl: Fixed bug 2169256.
- * library/tkdnd.tcl: Fixed bug 2486830.
+ * library/tkdnd.tcl: Fixed bug 2486830.
2010-06-16 Petasis George <petasis@iit.demokritos.gr>
* Makefile.in:
@@ -71,67 +79,67 @@
days, and not at the toplevel one.
2010-06-11 Petasis George <petasis@iit.demokritos.gr>
- TkDND 2.1 released.
+ TkDND 2.1 released.
2010-05-05 Petasis George <petasis@iit.demokritos.gr>
- * /macosx/macdnd.m: Several fixes. The most important are:
- Do not initiate a drag if the clipboard is empty (i.e. because we
- cannot handle any of the provided types).
- Fixed drag icon slide when the drag is canceled.
+ * /macosx/macdnd.m: Several fixes. The most important are:
+ Do not initiate a drag if the clipboard is empty (i.e. because we
+ cannot handle any of the provided types).
+ Fixed drag icon slide when the drag is canceled.
2010-04-30 Petasis George <petasis@iit.demokritos.gr>
- * /macosx/macdnd.m: Several changes:
- Moved drag operation inside TkDND_DoDragDropObjCmd. This means that
- drag operation can be started with a Tk binding.
- Fixed the way drag types are declared in the drag clipboard. Now types
- are reported correctly during drops.
- Added a tag in the DNDView class.
- Added a function to get the DNDView pointer from an NSView pointer.
- Hopefully this will not permit to add more than one DNDView to any
- view. This function always return a DNDView pointer (it creates a
- new DNDView if a view does not already has one).
-
- The demos seem to work, although the garbage collector seems to print
- some messages during drags from Tk windows.
+ * /macosx/macdnd.m: Several changes:
+ Moved drag operation inside TkDND_DoDragDropObjCmd. This means that
+ drag operation can be started with a Tk binding.
+ Fixed the way drag types are declared in the drag clipboard. Now types
+ are reported correctly during drops.
+ Added a tag in the DNDView class.
+ Added a function to get the DNDView pointer from an NSView pointer.
+ Hopefully this will not permit to add more than one DNDView to any
+ view. This function always return a DNDView pointer (it creates a
+ new DNDView if a view does not already has one).
+
+ The demos seem to work, although the garbage collector seems to print
+ some messages during drags from Tk windows.
2010-04-06 Petasis George <petasis@iit.demokritos.gr>
- * /macosx/macdnd.m: Some attempts towards drag support for OS X.
+ * /macosx/macdnd.m: Some attempts towards drag support for OS X.
2010-01-03 Petasis George <petasis@iit.demokritos.gr>
- * /library/tkdnd_macosx.tcl:
- * /macosx/macdnd.m: Changed the way dropped data is handled: during
- the drop event the data are converted into a utf-8 string (in case of
- dropping string data) or a Tcl list object of utf-8 filenames (in case
- of dropping files). The data object is stored directly in the
- tkdnd::macdnd::_dropped_data variable, instead of the selection
- clipboard. _GetDroppedData was modified to return this stored data.
+ * /library/tkdnd_macosx.tcl:
+ * /macosx/macdnd.m: Changed the way dropped data is handled: during
+ the drop event the data are converted into a utf-8 string (in case of
+ dropping string data) or a Tcl list object of utf-8 filenames (in case
+ of dropping files). The data object is stored directly in the
+ tkdnd::macdnd::_dropped_data variable, instead of the selection
+ clipboard. _GetDroppedData was modified to return this stored data.
2009-12-30 Petasis George <petasis@iit.demokritos.gr>
- * /cmake:
- * /CMakeLists.txt: Added support for building TkDND with cmake (i.e.
- under windows).
+ * /cmake:
+ * /CMakeLists.txt: Added support for building TkDND with cmake (i.e.
+ under windows).
2009-12-29 Petasis George <petasis@iit.demokritos.gr>
- * /library/tkdnd_macosx.tcl:
- * /macosx/macdnd.m: Changes to better integrate the work done by
- Kevin Walzer with the rest of TkDND, since OS X seems to mimic the
- XDND implementation. tkdnd_macosx.tcl is now a stub file, with most of
- the work being done by the unix (XDND) code.
- I think that OS X drop support is now working.
+ * /library/tkdnd_macosx.tcl:
+ * /macosx/macdnd.m: Changes to better integrate the work done by
+ Kevin Walzer with the rest of TkDND, since OS X seems to mimic the
+ XDND implementation. tkdnd_macosx.tcl is now a stub file, with most of
+ the work being done by the unix (XDND) code.
+ I think that OS X drop support is now working.
2009-12-09 Petasis George <petasis@iit.demokritos.gr>
- * /library/tkdnd_macosx.tcl:
- * /macosx/macdnd.m: Updates to better integrate the OS X type
- registration command with the rest of the TkDND internal API.
+ * /library/tkdnd_macosx.tcl:
+ * /macosx/macdnd.m: Updates to better integrate the OS X type
+ registration command with the rest of the TkDND internal API.
2009-12-01 Walzer Kevin <kw@codebykevin.com>
- * /macosx/*: Initial support for drop targets under OS X (Cocoa).
+ * /macosx/*: Initial support for drop targets under OS X (Cocoa).
2007-02-09 Petasis George <petasis@iit.demokritos.gr>
- * /unix/TkDND_XDND.c: Fixed a bug in TkDND_RegisterTypesObjCmd, where
- Tk_Parent was used to determine if a provided path was a toplevel.
- Replaced by a check through Tk_IsTopLevel.
- Bug reported by Alain Bertrand <alain.mp.bertrand@tele2.be>
+ * /unix/TkDND_XDND.c: Fixed a bug in TkDND_RegisterTypesObjCmd, where
+ Tk_Parent was used to determine if a provided path was a toplevel.
+ Replaced by a check through Tk_IsTopLevel.
+ Bug reported by Alain Bertrand <alain.mp.bertrand@tele2.be>
2006-04-24 Petasis George <petasis@iit.demokritos.gr>
- * TkDND version 2.0 started.
+ * TkDND version 2.0 started.
diff --git a/Makefile.in b/Makefile.in
index a336645..201d2a3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -87,10 +87,13 @@ pkgincludedir = $(includedir)/$(PKG_DIR)
top_builddir = .
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_OPTIONS =
+INSTALL = $(SHELL) $(srcdir)/tclconfig/install-sh -c ${INSTALL_OPTIONS}
+INSTALL_DATA_DIR = ${INSTALL} -d -m 755
+INSTALL_PROGRAM = ${INSTALL} -m 555
+INSTALL_DATA = ${INSTALL} -m 444
+INSTALL_SCRIPT = ${INSTALL_PROGRAM}
+INSTALL_LIBRARY = ${INSTALL_DATA}
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
@@ -157,7 +160,7 @@ PKG_CFLAGS = @PKG_CFLAGS@
DEFS = @DEFS@ $(PKG_CFLAGS)
# Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile
-CONFIG_CLEAN_FILES = Makefile
+CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
CLEANFILES = @CLEANFILES@
CPPFLAGS = @CPPFLAGS@
@@ -166,6 +169,8 @@ AR = @AR@
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+.SUFFIXES: .c .$(OBJEXT)
+
#========================================================================
# Start of user-definable TARGETS section
#========================================================================
@@ -226,11 +231,10 @@ install-libraries: libraries
#========================================================================
install-doc: doc
- @mkdir -p $(DESTDIR)$(mandir)/mann
+ @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/mann
@echo "Installing documentation in $(DESTDIR)$(mandir)"
@list='$(srcdir)/doc/*.n'; for i in $$list; do \
echo "Installing $$i"; \
- rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \
done
@@ -243,6 +247,14 @@ shell: binaries libraries
gdb:
$(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
+VALGRINDARGS=--tool=memcheck --num-callers=8 --leak-resolution=high --leak-check=yes --show-reachable=yes -v
+
+valgrind: binaries libraries
+ $(TCLSH_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
+
+valgrindshell: binaries libraries
+ $(TCLSH_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) $(SCRIPT)
+
depend:
#========================================================================
@@ -366,11 +378,11 @@ distclean: clean
#========================================================================
install-lib-binaries: binaries
- @mkdir -p $(DESTDIR)$(pkglibdir)
+ @$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir)
@list='$(lib_BINARIES)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
+ echo " $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p; \
stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
if test "x$$stub" = "xstub"; then \
echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
@@ -411,7 +423,7 @@ install-lib-binaries: binaries
#========================================================================
install-bin-binaries: binaries
- @mkdir -p $(DESTDIR)$(bindir)
+ @$(INSTALL_DATA_DIR) $(DESTDIR)$(bindir)
@list='$(bin_BINARIES)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
@@ -419,8 +431,6 @@ install-bin-binaries: binaries
fi; \
done
-.SUFFIXES: .c .$(OBJEXT)
-
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
diff --git a/configure b/configure
index ddc6fe4..25d9b83 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for tkdnd 2.4.
+# Generated by GNU Autoconf 2.68 for tkdnd 2.4.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -89,6 +89,7 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -214,11 +215,18 @@ IFS=$as_save_IFS
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
fi
if test x$as_have_required = xno; then :
@@ -316,7 +324,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -356,19 +364,19 @@ else
fi # as_fn_arith
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -530,7 +538,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -630,12 +638,6 @@ GREP
RANLIB
SET_MAKE
CPP
-OBJEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
TK_XINCLUDES
TK_LIBS
TK_STUB_LIB_SPEC
@@ -653,6 +655,12 @@ TCL_EXTRA_CFLAGS
TCL_DEFS
TCL_LIBS
CLEANFILES
+OBJEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
TCL_STUB_LIB_SPEC
TCL_STUB_LIB_FLAG
TCL_STUB_LIB_FILE
@@ -801,8 +809,9 @@ do
fi
case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -847,7 +856,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -873,7 +882,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1077,7 +1086,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1093,7 +1102,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1123,8 +1132,8 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
@@ -1132,7 +1141,7 @@ Try \`$0 --help' for more information."
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1142,7 +1151,7 @@ Try \`$0 --help' for more information."
$as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
$as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
@@ -1150,13 +1159,13 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error "missing argument to $ac_option"
+ as_fn_error $? "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1179,7 +1188,7 @@ do
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1193,8 +1202,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1209,9 +1218,9 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error "working directory cannot be determined"
+ as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error "pwd does not report name of working directory"
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1250,11 +1259,11 @@ else
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1294,7 +1303,7 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -1450,9 +1459,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
tkdnd configure 2.4
-generated by GNU Autoconf 2.65
+generated by GNU Autoconf 2.68
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1496,7 +1505,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -1522,7 +1531,7 @@ $as_echo "$ac_try_echo"; } >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -1533,7 +1542,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -1575,7 +1584,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -1589,7 +1598,7 @@ ac_fn_c_check_header_compile ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1607,7 +1616,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
@@ -1652,7 +1661,7 @@ fi
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_link
@@ -1665,7 +1674,7 @@ ac_fn_c_check_func ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1720,7 +1729,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
@@ -1732,10 +1741,10 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ if eval \${$3+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -1771,7 +1780,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
@@ -1798,7 +1807,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -1807,7 +1816,7 @@ eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_mongrel
cat >config.log <<_ACEOF
@@ -1815,7 +1824,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by tkdnd $as_me 2.4, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -1925,11 +1934,9 @@ trap 'exit_status=$?
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -1963,11 +1970,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
@@ -1980,11 +1985,9 @@ _ASBOX
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
+ $as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
@@ -1998,11 +2001,9 @@ _ASBOX
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
cat confdefs.h
echo
@@ -2057,7 +2058,12 @@ _ACEOF
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
@@ -2072,7 +2078,11 @@ do
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
@@ -2148,7 +2158,7 @@ if $ac_cache_corrupted; then
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2176,15 +2186,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5
$as_echo_n "checking for correct TEA configuration... " >&6; }
if test x"${PACKAGE_NAME}" = x ; then
- as_fn_error "
+ as_fn_error $? "
The PACKAGE_NAME variable must be defined by your TEA configure.in" "$LINENO" 5
fi
- if test x"3.7" = x ; then
- as_fn_error "
+ if test x"3.9" = x ; then
+ as_fn_error $? "
TEA version not specified." "$LINENO" 5
- elif test "3.7" != "${TEA_VERSION}" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.7\", have \"${TEA_VERSION}\"" >&5
-$as_echo "warning: requested TEA version \"3.7\", have \"${TEA_VERSION}\"" >&6; }
+ elif test "3.9" != "${TEA_VERSION}" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
+$as_echo "warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
$as_echo "ok (TEA ${TEA_VERSION})" >&6; }
@@ -2195,7 +2205,7 @@ $as_echo "ok (TEA ${TEA_VERSION})" >&6; }
set dummy cygpath; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CYGPATH+set}" = set; then :
+if ${ac_cv_prog_CYGPATH+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CYGPATH"; then
@@ -2286,16 +2296,22 @@ $as_echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
ac_aux_dir=
for ac_dir in tclconfig "$srcdir"/tclconfig; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error "cannot find install-sh, install.sh, or shtool in tclconfig \"$srcdir\"/tclconfig" "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in tclconfig \"$srcdir\"/tclconfig" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -2331,7 +2347,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
$as_echo_n "checking for Tcl configuration... " >&6; }
- if test "${ac_cv_c_tclconfig+set}" = set; then :
+ if ${ac_cv_c_tclconfig+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -2349,7 +2365,7 @@ $as_echo "$as_me: WARNING: --with-tcl argument should refer to directory contain
if test -f "${with_tclconfig}/tclConfig.sh" ; then
ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
else
- as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
+ as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
fi
fi
@@ -2448,7 +2464,7 @@ fi
if test x"${ac_cv_c_tclconfig}" = x ; then
TCL_BIN_DIR="# no Tcl configs found"
- as_fn_error "Can't find Tcl configuration definitions" "$LINENO" 5
+ as_fn_error $? "Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" "$LINENO" 5
else
no_tcl=
TCL_BIN_DIR="${ac_cv_c_tclconfig}"
@@ -2457,6 +2473,797 @@ $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
fi
fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; 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_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $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
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; 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_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $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
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; 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_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $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
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; 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_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $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
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; 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_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $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
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; 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_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $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
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
@@ -2526,28 +3333,34 @@ $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
- case "`uname -s`" in
- *CYGWIN_*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin variant" >&5
-$as_echo_n "checking for cygwin variant... " >&6; }
- case ${TCL_EXTRA_CFLAGS} in
- *-mwin32*|*-mno-cygwin*)
- TEA_PLATFORM="windows"
- CFLAGS="$CFLAGS -mwin32"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: win32" >&5
-$as_echo "win32" >&6; }
- ;;
- *)
- TEA_PLATFORM="unix"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix" >&5
-$as_echo "unix" >&6; }
- ;;
- esac
- EXEEXT=".exe"
- ;;
- *)
- ;;
- esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking platform" >&5
+$as_echo_n "checking platform... " >&6; }
+ hold_cc=$CC; CC="$TCL_CC"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ #ifdef _WIN32
+ #error win32
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ TEA_PLATFORM="unix"
+else
+ TEA_PLATFORM="windows"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CC=$hold_cc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
+$as_echo "$TEA_PLATFORM" >&6; }
# The BUILD_$pkg is to define the correct extern storage class
# handling when making this package
@@ -2558,6 +3371,7 @@ _ACEOF
# Do this here as we have fully defined TEA_PLATFORM now
if test "${TEA_PLATFORM}" = "windows" ; then
+ EXEEXT=".exe"
CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
fi
@@ -2592,7 +3406,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
$as_echo_n "checking for Tk configuration... " >&6; }
- if test "${ac_cv_c_tkconfig+set}" = set; then :
+ if ${ac_cv_c_tkconfig+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -2610,7 +3424,7 @@ $as_echo "$as_me: WARNING: --with-tk argument should refer to directory containi
if test -f "${with_tkconfig}/tkConfig.sh" ; then
ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
else
- as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
+ as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
fi
fi
@@ -2709,7 +3523,7 @@ fi
if test x"${ac_cv_c_tkconfig}" = x ; then
TK_BIN_DIR="# no Tk configs found"
- as_fn_error "Can't find Tk configuration definitions" "$LINENO" 5
+ as_fn_error $? "Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh" "$LINENO" 5
else
no_tk=
TK_BIN_DIR="${ac_cv_c_tkconfig}"
@@ -2867,7 +3681,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -2907,7 +3721,7 @@ if test -z "$ac_cv_prog_CC"; then
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -2960,7 +3774,7 @@ if test -z "$CC"; then
set dummy ${ac_tool_prefix}cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3000,7 +3814,7 @@ if test -z "$CC"; then
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3059,7 +3873,7 @@ if test -z "$CC"; then
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3103,7 +3917,7 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -3157,8 +3971,8 @@ fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -3185,260 +3999,9 @@ $as_echo "$ac_try_echo"; } >&5
test $ac_status = 0; }
done
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
- break;;
- * )
- break;;
- esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
- ac_file=''
-fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- break;;
- * ) break;;
- esac
-done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
- { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if { ac_try='./conftest$ac_cv_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3475,7 +4038,7 @@ ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
@@ -3553,7 +4116,7 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
@@ -3660,7 +4223,7 @@ if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
+ if ${ac_cv_prog_CPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
@@ -3690,7 +4253,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -3706,11 +4269,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -3749,7 +4312,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -3765,18 +4328,18 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -3794,7 +4357,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
@@ -3802,7 +4365,7 @@ SHELL = /bin/sh
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
*@@@%%%=?*=@@@%%%*)
eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -3831,7 +4394,7 @@ fi
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
@@ -3871,7 +4434,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
set dummy ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
@@ -3927,10 +4490,9 @@ fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$GREP"; then
@@ -3979,7 +4541,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
@@ -3993,7 +4555,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -4045,7 +4607,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -4060,7 +4622,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4177,8 +4739,7 @@ do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -4200,7 +4761,7 @@ done
if test -z "$no_pipe" -a -n "$GCC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
$as_echo_n "checking if the compiler understands -pipe... " >&6; }
-if test "${tcl_cv_cc_pipe+set}" = set; then :
+if ${tcl_cv_cc_pipe+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -4237,7 +4798,7 @@ $as_echo "$tcl_cv_cc_pipe" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian+set}" = set; then :
+if ${ac_cv_c_bigendian+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_bigendian=unknown
@@ -4455,7 +5016,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
;; #(
*)
- as_fn_error "unknown endianness
+ as_fn_error $? "unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
esac
@@ -4469,7 +5030,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
#--------------------------------------------------------------------
ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin"
-if test "x$ac_cv_func_sin" = x""yes; then :
+if test "x$ac_cv_func_sin" = xyes; then :
MATH_LIBS=""
else
MATH_LIBS="-lm"
@@ -4477,7 +5038,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5
$as_echo_n "checking for main in -lieee... " >&6; }
-if test "${ac_cv_lib_ieee_main+set}" = set; then :
+if ${ac_cv_lib_ieee_main+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -4505,7 +5066,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5
$as_echo "$ac_cv_lib_ieee_main" >&6; }
-if test "x$ac_cv_lib_ieee_main" = x""yes; then :
+if test "x$ac_cv_lib_ieee_main" = xyes; then :
MATH_LIBS="-lieee $MATH_LIBS"
fi
@@ -4517,7 +5078,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5
$as_echo_n "checking for main in -linet... " >&6; }
-if test "${ac_cv_lib_inet_main+set}" = set; then :
+if ${ac_cv_lib_inet_main+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -4545,12 +5106,12 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5
$as_echo "$ac_cv_lib_inet_main" >&6; }
-if test "x$ac_cv_lib_inet_main" = x""yes; then :
+if test "x$ac_cv_lib_inet_main" = xyes; then :
LIBS="$LIBS -linet"
fi
ac_fn_c_check_header_mongrel "$LINENO" "net/errno.h" "ac_cv_header_net_errno_h" "$ac_includes_default"
-if test "x$ac_cv_header_net_errno_h" = x""yes; then :
+if test "x$ac_cv_header_net_errno_h" = xyes; then :
$as_echo "#define HAVE_NET_ERRNO_H 1" >>confdefs.h
@@ -4579,7 +5140,7 @@ fi
tcl_checkBoth=0
ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
-if test "x$ac_cv_func_connect" = x""yes; then :
+if test "x$ac_cv_func_connect" = xyes; then :
tcl_checkSocket=0
else
tcl_checkSocket=1
@@ -4587,12 +5148,12 @@ fi
if test "$tcl_checkSocket" = 1; then
ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
-if test "x$ac_cv_func_setsockopt" = x""yes; then :
+if test "x$ac_cv_func_setsockopt" = xyes; then :
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_setsockopt+set}" = set; then :
+if ${ac_cv_lib_socket_setsockopt+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -4626,7 +5187,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
-if test "x$ac_cv_lib_socket_setsockopt" = x""yes; then :
+if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
LIBS="$LIBS -lsocket"
else
tcl_checkBoth=1
@@ -4639,7 +5200,7 @@ fi
tk_oldLibs=$LIBS
LIBS="$LIBS -lsocket -lnsl"
ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept"
-if test "x$ac_cv_func_accept" = x""yes; then :
+if test "x$ac_cv_func_accept" = xyes; then :
tcl_checkNsl=0
else
LIBS=$tk_oldLibs
@@ -4647,12 +5208,12 @@ fi
fi
ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-if test "x$ac_cv_func_gethostbyname" = x""yes; then :
+if test "x$ac_cv_func_gethostbyname" = xyes; then :
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -4686,7 +5247,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
LIBS="$LIBS -lnsl"
fi
@@ -4703,7 +5264,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dirent.h" >&5
$as_echo_n "checking dirent.h... " >&6; }
-if test "${tcl_cv_dirent_h+set}" = set; then :
+if ${tcl_cv_dirent_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -4756,7 +5317,7 @@ $as_echo "#define NO_DIRENT_H 1" >>confdefs.h
# TEA specific:
ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
-if test "x$ac_cv_header_errno_h" = x""yes; then :
+if test "x$ac_cv_header_errno_h" = xyes; then :
else
@@ -4766,7 +5327,7 @@ fi
ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
-if test "x$ac_cv_header_float_h" = x""yes; then :
+if test "x$ac_cv_header_float_h" = xyes; then :
else
@@ -4776,7 +5337,7 @@ fi
ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default"
-if test "x$ac_cv_header_values_h" = x""yes; then :
+if test "x$ac_cv_header_values_h" = xyes; then :
else
@@ -4786,7 +5347,7 @@ fi
ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
-if test "x$ac_cv_header_limits_h" = x""yes; then :
+if test "x$ac_cv_header_limits_h" = xyes; then :
$as_echo "#define HAVE_LIMITS_H 1" >>confdefs.h
@@ -4798,7 +5359,7 @@ fi
ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
tcl_ok=1
else
tcl_ok=0
@@ -4850,7 +5411,7 @@ $as_echo "#define NO_STDLIB_H 1" >>confdefs.h
fi
ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
-if test "x$ac_cv_header_string_h" = x""yes; then :
+if test "x$ac_cv_header_string_h" = xyes; then :
tcl_ok=1
else
tcl_ok=0
@@ -4894,7 +5455,7 @@ $as_echo "#define NO_STRING_H 1" >>confdefs.h
fi
ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_wait_h" = x""yes; then :
+if test "x$ac_cv_header_sys_wait_h" = xyes; then :
else
@@ -4904,7 +5465,7 @@ fi
ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
else
@@ -4918,7 +5479,7 @@ fi
for ac_header in sys/param.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_param_h" = x""yes; then :
+if test "x$ac_cv_header_sys_param_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_PARAM_H 1
_ACEOF
@@ -4951,7 +5512,7 @@ done
for i in $vars; do
# check for existence, be strict because it is installed
if test ! -f "${srcdir}/$i" ; then
- as_fn_error "could not find header file '${srcdir}/$i'" "$LINENO" 5
+ as_fn_error $? "could not find header file '${srcdir}/$i'" "$LINENO" 5
fi
PKG_HEADERS="$PKG_HEADERS $i"
done
@@ -4987,7 +5548,7 @@ done
-a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
-a ! -f "${srcdir}/macosx/$i" \
; then
- as_fn_error "could not find stub source file '$i'" "$LINENO" 5
+ as_fn_error $? "could not find stub source file '$i'" "$LINENO" 5
fi
PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
# this assumes it is in a VPATH dir
@@ -5008,7 +5569,7 @@ done
for i in $vars; do
# check for existence, be strict because it is installed
if test ! -f "${srcdir}/$i" ; then
- as_fn_error "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5
+ as_fn_error $? "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5
fi
PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
done
@@ -5051,7 +5612,7 @@ if test "${TEA_PLATFORM}" = "windows" ; then
-a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
-a ! -f "${srcdir}/macosx/$i" \
; then
- as_fn_error "could not find source file '$i'" "$LINENO" 5
+ as_fn_error $? "could not find source file '$i'" "$LINENO" 5
fi
PKG_SOURCES="$PKG_SOURCES $i"
# this assumes it is in a VPATH dir
@@ -5095,7 +5656,7 @@ fi
if test "${TEA_WINDOWINGSYSTEM}" = "x11"; then
- vars="unix/TkDND_XDND.c"
+ vars="unix/TkDND_XDND.c unix/tkUnixSelect.c"
for i in $vars; do
case $i in
\$*)
@@ -5111,7 +5672,7 @@ if test "${TEA_WINDOWINGSYSTEM}" = "x11"; then
-a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
-a ! -f "${srcdir}/macosx/$i" \
; then
- as_fn_error "could not find source file '$i'" "$LINENO" 5
+ as_fn_error $? "could not find source file '$i'" "$LINENO" 5
fi
PKG_SOURCES="$PKG_SOURCES $i"
# this assumes it is in a VPATH dir
@@ -5149,7 +5710,7 @@ if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
-a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
-a ! -f "${srcdir}/macosx/$i" \
; then
- as_fn_error "could not find source file '$i'" "$LINENO" 5
+ as_fn_error $? "could not find source file '$i'" "$LINENO" 5
fi
PKG_SOURCES="$PKG_SOURCES $i"
# this assumes it is in a VPATH dir
@@ -5206,7 +5767,7 @@ if test "${with_tclinclude+set}" = set; then :
fi
- if test "${ac_cv_c_tclh+set}" = set; then :
+ if ${ac_cv_c_tclh+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -5216,7 +5777,7 @@ else
if test -f "${with_tclinclude}/tcl.h" ; then
ac_cv_c_tclh=${with_tclinclude}
else
- as_fn_error "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5
+ as_fn_error $? "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5
fi
else
list=""
@@ -5265,7 +5826,7 @@ fi
# Print a message based on how we determined the include path
if test x"${ac_cv_c_tclh}" = x ; then
- as_fn_error "tcl.h not found. Please specify its location with --with-tclinclude" "$LINENO" 5
+ as_fn_error $? "tcl.h not found. Please specify its location with --with-tclinclude" "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5
$as_echo "${ac_cv_c_tclh}" >&6; }
@@ -5292,7 +5853,7 @@ if test "${with_tkinclude+set}" = set; then :
fi
- if test "${ac_cv_c_tkh+set}" = set; then :
+ if ${ac_cv_c_tkh+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -5302,7 +5863,7 @@ else
if test -f "${with_tkinclude}/tk.h" ; then
ac_cv_c_tkh=${with_tkinclude}
else
- as_fn_error "${with_tkinclude} directory does not contain tk.h" "$LINENO" 5
+ as_fn_error $? "${with_tkinclude} directory does not contain tk.h" "$LINENO" 5
fi
else
list=""
@@ -5354,7 +5915,7 @@ fi
# Print a message based on how we determined the include path
if test x"${ac_cv_c_tkh}" = x ; then
- as_fn_error "tk.h not found. Please specify its location with --with-tkinclude" "$LINENO" 5
+ as_fn_error $? "tk.h not found. Please specify its location with --with-tkinclude" "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tkh}" >&5
$as_echo "${ac_cv_c_tkh}" >&6; }
@@ -5438,7 +5999,7 @@ $as_echo_n "checking for Tk private include files... " >&6; }
result="Using ${TK_INCLUDES}"
else
if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
- as_fn_error "Cannot find private header tkInt.h in ${TK_SRC_DIR}" "$LINENO" 5
+ as_fn_error $? "Cannot find private header tkInt.h in ${TK_SRC_DIR}" "$LINENO" 5
fi
result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
fi
@@ -5469,8 +6030,8 @@ if test "x$with_x" = xno; then
have_x=disabled
else
case $x_includes,$x_libraries in #(
- *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
- *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
+ *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
+ *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
$as_echo_n "(cached) " >&6
else
# One or both of the vars are not set, and there is no cached value.
@@ -5487,7 +6048,7 @@ libdir:
@echo libdir='${LIBDIR}'
_ACEOF
if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
- # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
for ac_var in incroot usrlibdir libdir; do
eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
done
@@ -5573,7 +6134,7 @@ else
fi
done
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
fi # $ac_x_includes = no
if test "$ac_x_libraries" = no; then
@@ -5659,7 +6220,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
else
not_really_there="yes"
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
else
if test ! -r $x_includes/X11/Intrinsic.h; then
not_really_there="yes"
@@ -5679,7 +6240,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
else
found_xincludes="no"
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
if test "$found_xincludes" = "no"; then
dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
for i in $dirs ; do
@@ -5727,7 +6288,7 @@ $as_echo "$i" >&6; }
if test "$XLIBSW" = nope ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCreateWindow in -lXwindow" >&5
$as_echo_n "checking for XCreateWindow in -lXwindow... " >&6; }
-if test "${ac_cv_lib_Xwindow_XCreateWindow+set}" = set; then :
+if ${ac_cv_lib_Xwindow_XCreateWindow+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -5761,7 +6322,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
$as_echo "$ac_cv_lib_Xwindow_XCreateWindow" >&6; }
-if test "x$ac_cv_lib_Xwindow_XCreateWindow" = x""yes; then :
+if test "x$ac_cv_lib_Xwindow_XCreateWindow" = xyes; then :
XLIBSW=-lXwindow
fi
@@ -5824,7 +6385,7 @@ $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
-if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then :
+if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -5858,7 +6419,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_mutex_init" = x""yes; then :
+if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then :
tcl_ok=yes
else
tcl_ok=no
@@ -5872,7 +6433,7 @@ fi
# exist, like AIX 4.2. [Bug: 4359]
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
-if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then :
+if ${ac_cv_lib_pthread___pthread_mutex_init+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -5906,7 +6467,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
-if test "x$ac_cv_lib_pthread___pthread_mutex_init" = x""yes; then :
+if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes; then :
tcl_ok=yes
else
tcl_ok=no
@@ -5920,7 +6481,7 @@ fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
-if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then :
+if ${ac_cv_lib_pthreads_pthread_mutex_init+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -5954,7 +6515,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
-if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = x""yes; then :
+if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes; then :
tcl_ok=yes
else
tcl_ok=no
@@ -5966,7 +6527,7 @@ fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
-if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then :
+if ${ac_cv_lib_c_pthread_mutex_init+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -6000,7 +6561,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
-if test "x$ac_cv_lib_c_pthread_mutex_init" = x""yes; then :
+if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes; then :
tcl_ok=yes
else
tcl_ok=no
@@ -6009,7 +6570,7 @@ fi
if test "$tcl_ok" = "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
-if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then :
+if ${ac_cv_lib_c_r_pthread_mutex_init+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -6043,7 +6604,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
-if test "x$ac_cv_lib_c_r_pthread_mutex_init" = x""yes; then :
+if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes; then :
tcl_ok=yes
else
tcl_ok=no
@@ -6155,7 +6716,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
@@ -6195,7 +6756,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
set dummy ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
@@ -6282,7 +6843,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
-if test "${tcl_cv_cc_visibility_hidden+set}" = set; then :
+if ${tcl_cv_cc_visibility_hidden+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -6357,7 +6918,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
$as_echo_n "checking system version... " >&6; }
-if test "${tcl_cv_sys_version+set}" = set; then :
+if ${tcl_cv_sys_version+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -6404,22 +6965,23 @@ $as_echo "$tcl_cv_sys_version" >&6; }
ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
TCL_LIB_VERSIONS_OK=ok
CFLAGS_DEBUG=-g
- CFLAGS_OPTIMIZE=-O
if test "$GCC" = yes; then :
- # TEA specific:
CFLAGS_OPTIMIZE=-O2
CFLAGS_WARNING="-Wall"
else
- CFLAGS_WARNING=""
+
+ CFLAGS_OPTIMIZE=-O
+ CFLAGS_WARNING=""
+
fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
+if ${ac_cv_prog_AR+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AR"; then
@@ -6459,7 +7021,7 @@ if test -z "$ac_cv_prog_AR"; then
set dummy ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AR"; then
@@ -6551,10 +7113,10 @@ $as_echo " Using 64-bit $MACHINE mode" >&6; }
if test "$doWince" != "no" ; then
if test "$do64bit" != "no" ; then
- as_fn_error "Windows/CE and 64-bit builds incompatible" "$LINENO" 5
+ as_fn_error $? "Windows/CE and 64-bit builds incompatible" "$LINENO" 5
fi
if test "$GCC" = "yes" ; then
- as_fn_error "Windows/CE and GCC builds incompatible" "$LINENO" 5
+ as_fn_error $? "Windows/CE and GCC builds incompatible" "$LINENO" 5
fi
# First, look for one uninstalled.
@@ -6571,7 +7133,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5
$as_echo_n "checking for Windows/CE celib directory... " >&6; }
- if test "${ac_cv_c_celibconfig+set}" = set; then :
+ if ${ac_cv_c_celibconfig+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -6580,7 +7142,7 @@ else
if test -d "${with_celibconfig}/inc" ; then
ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
else
- as_fn_error "${with_celibconfig} directory doesn't contain inc directory" "$LINENO" 5
+ as_fn_error $? "${with_celibconfig} directory doesn't contain inc directory" "$LINENO" 5
fi
fi
@@ -6606,7 +7168,7 @@ else
fi
if test x"${ac_cv_c_celibconfig}" = x ; then
- as_fn_error "Cannot find celib support library directory" "$LINENO" 5
+ as_fn_error $? "Cannot find celib support library directory" "$LINENO" 5
else
no_celib=
CELIB_DIR=${ac_cv_c_celibconfig}
@@ -6654,7 +7216,7 @@ $as_echo "found $CELIB_DIR" >&6; }
SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
-o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
- as_fn_error "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5
+ as_fn_error $? "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5
doWince="no"
else
# We could PATH_NOSPACE these, but that's not important,
@@ -6750,7 +7312,7 @@ _ACEOF
set dummy ${ac_tool_prefix}windres; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RC+set}" = set; then :
+if ${ac_cv_prog_RC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RC"; then
@@ -6790,7 +7352,7 @@ if test -z "$ac_cv_prog_RC"; then
set dummy windres; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RC"; then
@@ -6839,10 +7401,61 @@ fi
CFLAGS_DEBUG="-g"
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- SHLIB_LD="$CC -shared"
+ SHLIB_LD='${CC} -shared'
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5
+$as_echo_n "checking for cross-compile version of gcc... " >&6; }
+if ${ac_cv_cross+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifdef __WIN32__
+ #error cross-compiler
+ #endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_cross=yes
+else
+ ac_cv_cross=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5
+$as_echo "$ac_cv_cross" >&6; }
+
+ if test "$ac_cv_cross" = "yes"; then
+ case "$do64bit" in
+ amd64|x64|yes)
+ CC="x86_64-w64-mingw32-gcc"
+ LD="x86_64-w64-mingw32-ld"
+ AR="x86_64-w64-mingw32-ar"
+ RANLIB="x86_64-w64-mingw32-ranlib"
+ RC="x86_64-w64-mingw32-windres"
+ ;;
+ *)
+ CC="i686-w64-mingw32-gcc"
+ LD="i686-w64-mingw32-ld"
+ AR="i686-w64-mingw32-ar"
+ RANLIB="i686-w64-mingw32-ranlib"
+ RC="i686-w64-mingw32-windres"
+ ;;
+ esac
+ fi
+
else
SHLIB_LD="${LINKBIN} -dll ${lflags}"
# link -lib only works when -lib is the first arg
@@ -6959,7 +7572,7 @@ fi
#-----------------------------------------------------------
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
$as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
-if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then :
+if ${ac_cv_lib_bind_inet_ntoa+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -6993,7 +7606,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
-if test "x$ac_cv_lib_bind_inet_ntoa" = x""yes; then :
+if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then :
LIBS="$LIBS -lbind -lsocket"
fi
@@ -7010,7 +7623,7 @@ fi
SHLIB_CFLAGS=""
SHLIB_LD='${CC} -shared'
SHLIB_SUFFIX=".dll"
- EXE_SUFFIX=".exe"
+ EXEEXT=".exe"
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
@@ -7021,7 +7634,7 @@ fi
SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; }
-if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then :
+if ${ac_cv_lib_network_inet_ntoa+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -7055,7 +7668,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; }
-if test "x$ac_cv_lib_network_inet_ntoa" = x""yes; then :
+if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then :
LIBS="$LIBS -lnetwork"
fi
@@ -7084,7 +7697,7 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+if ${ac_cv_lib_dld_shl_load+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -7118,7 +7731,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
tcl_ok=yes
else
tcl_ok=no
@@ -7259,7 +7872,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
$as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
-if test "${tcl_cv_cc_m64+set}" = set; then :
+if ${tcl_cv_cc_m64+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -7360,7 +7973,7 @@ fi
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
$as_echo_n "checking for ELF... " >&6; }
-if test "${tcl_cv_ld_elf+set}" = set; then :
+if ${tcl_cv_ld_elf+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -7474,7 +8087,7 @@ fi
ppc)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
-if test "${tcl_cv_cc_arch_ppc64+set}" = set; then :
+if ${tcl_cv_cc_arch_ppc64+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -7511,7 +8124,7 @@ fi;;
i386)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
-if test "${tcl_cv_cc_arch_x86_64+set}" = set; then :
+if ${tcl_cv_cc_arch_x86_64+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -7564,7 +8177,7 @@ fi
SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
-if test "${tcl_cv_ld_single_module+set}" = set; then :
+if ${tcl_cv_ld_single_module+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -7610,7 +8223,7 @@ fi
LDFLAGS="$LDFLAGS -headerpad_max_install_names"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
-if test "${tcl_cv_ld_search_paths_first+set}" = set; then :
+if ${tcl_cv_ld_search_paths_first+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -7662,7 +8275,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
$as_echo_n "checking for 64-bit X11... " >&6; }
-if test "${tcl_cv_lib_x11_64+set}" = set; then :
+if ${tcl_cv_lib_x11_64+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -7701,7 +8314,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5
$as_echo_n "checking for 64-bit Tk... " >&6; }
-if test "${tcl_cv_lib_tk_64+set}" = set; then :
+if ${tcl_cv_lib_tk_64+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -8048,6 +8661,180 @@ fi
UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
+$as_echo_n "checking for SEH support in compiler... " >&6; }
+if ${tcl_cv_seh+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ tcl_cv_seh=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+ #undef WIN32_LEAN_AND_MEAN
+
+ int main(int argc, char** argv) {
+ int a, b = 0;
+ __try {
+ a = 666 / b;
+ }
+ __except (EXCEPTION_EXECUTE_HANDLER) {
+ return 0;
+ }
+ return 1;
+ }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ tcl_cv_seh=yes
+else
+ tcl_cv_seh=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5
+$as_echo "$tcl_cv_seh" >&6; }
+ if test "$tcl_cv_seh" = "no" ; then
+
+$as_echo "#define HAVE_NO_SEH 1" >>confdefs.h
+
+ fi
+
+ #
+ # Check to see if the excpt.h include file provided contains the
+ # definition for EXCEPTION_DISPOSITION; if not, which is the case
+ # with Cygwin's version as of 2002-04-10, define it to be int,
+ # sufficient for getting the current code to work.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5
+$as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; }
+if ${tcl_cv_eh_disposition+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# undef WIN32_LEAN_AND_MEAN
+
+int
+main ()
+{
+
+ EXCEPTION_DISPOSITION x;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tcl_cv_eh_disposition=yes
+else
+ tcl_cv_eh_disposition=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5
+$as_echo "$tcl_cv_eh_disposition" >&6; }
+ if test "$tcl_cv_eh_disposition" = "no" ; then
+
+$as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h
+
+ fi
+
+ # Check to see if winnt.h defines CHAR, SHORT, and LONG
+ # even if VOID has already been #defined. The win32api
+ # used by mingw and cygwin is known to do this.
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5
+$as_echo_n "checking for winnt.h that ignores VOID define... " >&6; }
+if ${tcl_cv_winnt_ignore_void+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define VOID void
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+ #undef WIN32_LEAN_AND_MEAN
+
+int
+main ()
+{
+
+ CHAR c;
+ SHORT s;
+ LONG l;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tcl_cv_winnt_ignore_void=yes
+else
+ tcl_cv_winnt_ignore_void=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
+$as_echo "$tcl_cv_winnt_ignore_void" >&6; }
+ if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
+
+$as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
+
+ fi
+
+ # See if the compiler supports casting to a union type.
+ # This is used to stop gcc from printing a compiler
+ # warning when initializing a union member.
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
+$as_echo_n "checking for cast to union support... " >&6; }
+if ${tcl_cv_cast_to_union+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ union foo { int i; double d; };
+ union foo f = (union foo) (int) 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tcl_cv_cast_to_union=yes
+else
+ tcl_cv_cast_to_union=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
+$as_echo "$tcl_cv_cast_to_union" >&6; }
+ if test "$tcl_cv_cast_to_union" = "yes"; then
+
+$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
+
+ fi
+
@@ -8067,7 +8854,7 @@ fi
$as_echo_n "checking for required early compiler flags... " >&6; }
tcl_flags=""
- if test "${tcl_cv_flag__isoc99_source+set}" = set; then :
+ if ${tcl_cv_flag__isoc99_source+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8114,7 +8901,7 @@ $as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
fi
- if test "${tcl_cv_flag__largefile64_source+set}" = set; then :
+ if ${tcl_cv_flag__largefile64_source+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8161,7 +8948,7 @@ $as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
fi
- if test "${tcl_cv_flag__largefile_source64+set}" = set; then :
+ if ${tcl_cv_flag__largefile_source64+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8218,7 +9005,7 @@ $as_echo "${tcl_flags}" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
$as_echo_n "checking for 64-bit integer type... " >&6; }
- if test "${tcl_cv_type_64bit+set}" = set; then :
+ if ${tcl_cv_type_64bit+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -8287,7 +9074,7 @@ $as_echo "${tcl_cv_type_64bit}" >&6; }
# Now check for auxiliary declarations
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
$as_echo_n "checking for struct dirent64... " >&6; }
-if test "${tcl_cv_struct_dirent64+set}" = set; then :
+if ${tcl_cv_struct_dirent64+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -8320,7 +9107,7 @@ $as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
$as_echo_n "checking for struct stat64... " >&6; }
-if test "${tcl_cv_struct_stat64+set}" = set; then :
+if ${tcl_cv_struct_stat64+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -8355,8 +9142,7 @@ $as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -8366,7 +9152,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
$as_echo_n "checking for off64_t... " >&6; }
- if test "${tcl_cv_type_off64_t+set}" = set; then :
+ if ${tcl_cv_type_off64_t+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -8423,13 +9209,13 @@ fi
DBGX=""
if test "$tcl_ok" = "no"; then
- CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
- LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
+ CFLAGS_DEFAULT='${CFLAGS_OPTIMIZE}'
+ LDFLAGS_DEFAULT='${LDFLAGS_OPTIMIZE}'
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
else
- CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
- LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
+ CFLAGS_DEFAULT='${CFLAGS_DEBUG}'
+ LDFLAGS_DEFAULT='${LDFLAGS_DEBUG}'
if test "$tcl_ok" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
$as_echo "yes (standard debugging)" >&6; }
@@ -8722,10 +9508,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
+ if test "x$cache_file" != "x/dev/null"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -8777,6 +9574,7 @@ DEFS=`sed -n "$ac_script" confdefs.h`
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -8794,7 +9592,7 @@ LTLIBOBJS=$ac_ltlibobjs
CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -8895,6 +9693,7 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -8940,19 +9739,19 @@ export LANGUAGE
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -9148,7 +9947,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -9202,7 +10001,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by tkdnd $as_me 2.4, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -9255,10 +10054,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
tkdnd config.status 2.4
-configured by $0, generated by GNU Autoconf 2.65,
+configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -9273,11 +10072,16 @@ ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=*)
+ --*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
*)
ac_option=$1
ac_optarg=$2
@@ -9299,6 +10103,7 @@ do
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
@@ -9309,7 +10114,7 @@ do
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
+ -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -9361,7 +10166,7 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -9382,9 +10187,10 @@ fi
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- tmp=
+ tmp= ac_tmp=
trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
trap 'as_fn_exit 1' 1 2 13 15
}
@@ -9392,12 +10198,13 @@ $debug ||
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -9414,12 +10221,12 @@ if test "x$ac_cr" = x; then
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
+ ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF
@@ -9428,18 +10235,18 @@ _ACEOF
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -9447,7 +10254,7 @@ done
rm -f conf$$subs.sh
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
@@ -9495,7 +10302,7 @@ t delim
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
@@ -9527,21 +10334,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
s/^[^=]*=[ ]*$//
}'
fi
@@ -9559,7 +10374,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -9578,7 +10393,7 @@ do
for ac_f
do
case $ac_f in
- -) ac_f="$tmp/stdin";;
+ -) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
@@ -9587,7 +10402,7 @@ do
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -9613,8 +10428,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -9739,23 +10554,24 @@ s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
$ac_datarootdir_hack
"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
+which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
+which seems to be undefined. Please make sure it is defined" >&2;}
- rm -f "$tmp/stdin"
+ rm -f "$ac_tmp/stdin"
case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
@@ -9770,7 +10586,7 @@ _ACEOF
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -9791,7 +10607,7 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit $?
+ $ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
diff --git a/configure.in b/configure.in
index 6e67a92..a349952 100644
--- a/configure.in
+++ b/configure.in
@@ -27,7 +27,7 @@ AC_INIT([tkdnd], [2.4])
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------
-TEA_INIT([3.7])
+TEA_INIT([3.9])
AC_CONFIG_AUX_DIR(tclconfig)
@@ -109,7 +109,7 @@ else
fi
if test "${TEA_WINDOWINGSYSTEM}" = "x11"; then
- TEA_ADD_SOURCES([unix/TkDND_XDND.c])
+ TEA_ADD_SOURCES([unix/TkDND_XDND.c unix/tkUnixSelect.c])
fi
if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
diff --git a/library/tkdnd_unix.tcl b/library/tkdnd_unix.tcl
index e015ddb..05a87b3 100644
--- a/library/tkdnd_unix.tcl
+++ b/library/tkdnd_unix.tcl
@@ -88,7 +88,7 @@ proc xdnd::_HandleXdndPosition { drop_target rootX rootY } {
variable _drag_source
variable _drop_target
# debug "xdnd::_HandleXdndPosition: drop_target=$drop_target,\
- _drop_target=$_drop_target, rootX=$rootX, rootY=$rootY"
+ # _drop_target=$_drop_target, rootX=$rootX, rootY=$rootY"
if {![info exists _drag_source] && ![string length $_drag_source]} {
# debug "xdnd::_HandleXdndPosition: no or empty _drag_source:\
@@ -313,11 +313,14 @@ proc xdnd::_GetDroppedData { time } {
foreach type $_common_drag_source_types {
# puts "TYPE: $type ($_drop_target)"
# _get_selection $_drop_target $time $type
+ # selection get -displayof $_drop_target -selection XdndSelection \
+ # -type $type
+ # _selection_get -displayof $_drop_target -selection XdndSelection \
+ # -type $type -time $time
if {![catch {
- # selection get -displayof $_drop_target -selection XdndSelection \
- # -type $type -time $time
selection get -displayof $_drop_target -selection XdndSelection \
- -type $type} result options]} {
+ -type $type
+ } result options]} {
return [_normalise_data $type $result]
}
}
@@ -377,12 +380,13 @@ proc xdnd::_normalise_data { type data } {
STRING - UTF8_STRING - TEXT - COMPOUND_TEXT {return $data}
text/html -
text/plain {
- return [encoding convertfrom utf-8 [tkdnd::bytes_to_string $data]]
+ return [string map {\r\n \n} \
+ [encoding convertfrom utf-8 [tkdnd::bytes_to_string $data]]]
}
text/uri-list {
set string [tkdnd::bytes_to_string $data]
## Get rid of \r\n
- set string [string map {\r\n \n} $string]
+ set string [string trim [string map {\r\n \n} $string]]
set files {}
foreach quoted_file [split $string] {
set file [encoding convertfrom utf-8 [tkdnd::urn_unquote $quoted_file]]
diff --git a/tclconfig/ChangeLog b/tclconfig/ChangeLog
index 906dde1..17d8b9d 100644
--- a/tclconfig/ChangeLog
+++ b/tclconfig/ChangeLog
@@ -1,3 +1,20 @@
+2012-04-03 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * tcl.m4: [Bug 3511806] Compiler checks too early
+ This change allows to build the cygwin and mingw32 ports of
+ Tcl/Tk extensions to build out-of-the-box using a native or
+ cross-compiler.
+
+2011-04-02 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * install-sh: Fix issue with library stripping in install-sh
+ (backported from kevin_walzer's patch from Tcl 8.6 trunk)
+
+2011-04-05 Andreas Kupries <andreask@activestate.com>
+
+ * tcl.m4: Applied patch by Jeff Lawson. Nicer error message when
+ tclConfig.sh was not found.
+
2010-12-15 Stuart Cassoff <stwo@users.sourceforge.net>
* install-sh: Upgrade to newer install-sh and use it.
diff --git a/tclconfig/install-sh b/tclconfig/install-sh
index 3f83ce9..921da0f 100755
--- a/tclconfig/install-sh
+++ b/tclconfig/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2010-02-06.18; # UTC
+scriptversion=2011-04-20.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -120,6 +120,7 @@ Options:
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
+ -S $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
@@ -155,6 +156,9 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;;
+ -S) stripcmd="$stripprog $2"
+ shift;;
+
-t) dst_arg=$2
shift;;
diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4
index 55c0e06..d79d72a 100644
--- a/tclconfig/tcl.m4
+++ b/tclconfig/tcl.m4
@@ -8,8 +8,6 @@
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: tcl.m4,v 1.157 2010/12/15 05:35:07 stwo Exp $
AC_PREREQ(2.57)
@@ -170,7 +168,7 @@ AC_DEFUN([TEA_PATH_TCLCONFIG], [
if test x"${ac_cv_c_tclconfig}" = x ; then
TCL_BIN_DIR="# no Tcl configs found"
- AC_MSG_ERROR([Can't find Tcl configuration definitions])
+ AC_MSG_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh])
else
no_tcl=
TCL_BIN_DIR="${ac_cv_c_tclconfig}"
@@ -323,7 +321,7 @@ AC_DEFUN([TEA_PATH_TKCONFIG], [
if test x"${ac_cv_c_tkconfig}" = x ; then
TK_BIN_DIR="# no Tk configs found"
- AC_MSG_ERROR([Can't find Tk configuration definitions])
+ AC_MSG_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh])
else
no_tk=
TK_BIN_DIR="${ac_cv_c_tkconfig}"
@@ -417,25 +415,17 @@ AC_DEFUN([TEA_LOAD_TCLCONFIG], [
AC_SUBST(TCL_STUB_LIB_FLAG)
AC_SUBST(TCL_STUB_LIB_SPEC)
- case "`uname -s`" in
- *CYGWIN_*)
- AC_MSG_CHECKING([for cygwin variant])
- case ${TCL_EXTRA_CFLAGS} in
- *-mwin32*|*-mno-cygwin*)
- TEA_PLATFORM="windows"
- CFLAGS="$CFLAGS -mwin32"
- AC_MSG_RESULT([win32])
- ;;
- *)
- TEA_PLATFORM="unix"
- AC_MSG_RESULT([unix])
- ;;
- esac
- EXEEXT=".exe"
- ;;
- *)
- ;;
- esac
+ AC_MSG_CHECKING([platform])
+ hold_cc=$CC; CC="$TCL_CC"
+ AC_TRY_COMPILE(,[
+ #ifdef _WIN32
+ #error win32
+ #endif
+ ], TEA_PLATFORM="unix",
+ TEA_PLATFORM="windows"
+ )
+ CC=$hold_cc
+ AC_MSG_RESULT($TEA_PLATFORM)
# The BUILD_$pkg is to define the correct extern storage class
# handling when making this package
@@ -443,6 +433,7 @@ AC_DEFUN([TEA_LOAD_TCLCONFIG], [
[Building extension source?])
# Do this here as we have fully defined TEA_PLATFORM now
if test "${TEA_PLATFORM}" = "windows" ; then
+ EXEEXT=".exe"
CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
fi
@@ -874,12 +865,12 @@ AC_DEFUN([TEA_ENABLE_SYMBOLS], [
[tcl_ok=$enableval], [tcl_ok=no])
DBGX=""
if test "$tcl_ok" = "no"; then
- CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
- LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
+ CFLAGS_DEFAULT='${CFLAGS_OPTIMIZE}'
+ LDFLAGS_DEFAULT='${LDFLAGS_OPTIMIZE}'
AC_MSG_RESULT([no])
else
- CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
- LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
+ CFLAGS_DEFAULT='${CFLAGS_DEBUG}'
+ LDFLAGS_DEFAULT='${LDFLAGS_DEBUG}'
if test "$tcl_ok" = "yes"; then
AC_MSG_RESULT([yes (standard debugging)])
fi
@@ -1135,12 +1126,13 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
TCL_LIB_VERSIONS_OK=ok
CFLAGS_DEBUG=-g
- CFLAGS_OPTIMIZE=-O
AS_IF([test "$GCC" = yes], [
- # TEA specific:
CFLAGS_OPTIMIZE=-O2
CFLAGS_WARNING="-Wall"
- ], [CFLAGS_WARNING=""])
+ ], [
+ CFLAGS_OPTIMIZE=-O
+ CFLAGS_WARNING=""
+ ])
AC_CHECK_TOOL(AR, ar)
STLIB_LD='${AR} cr'
LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
@@ -1298,10 +1290,41 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
AC_CHECK_TOOL(RC, windres)
CFLAGS_DEBUG="-g"
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- SHLIB_LD="$CC -shared"
+ SHLIB_LD='${CC} -shared'
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
+
+ AC_CACHE_CHECK(for cross-compile version of gcc,
+ ac_cv_cross,
+ AC_TRY_COMPILE([
+ #ifdef __WIN32__
+ #error cross-compiler
+ #endif
+ ], [],
+ ac_cv_cross=yes,
+ ac_cv_cross=no)
+ )
+
+ if test "$ac_cv_cross" = "yes"; then
+ case "$do64bit" in
+ amd64|x64|yes)
+ CC="x86_64-w64-mingw32-gcc"
+ LD="x86_64-w64-mingw32-ld"
+ AR="x86_64-w64-mingw32-ar"
+ RANLIB="x86_64-w64-mingw32-ranlib"
+ RC="x86_64-w64-mingw32-windres"
+ ;;
+ *)
+ CC="i686-w64-mingw32-gcc"
+ LD="i686-w64-mingw32-ld"
+ AR="i686-w64-mingw32-ar"
+ RANLIB="i686-w64-mingw32-ranlib"
+ RC="i686-w64-mingw32-windres"
+ ;;
+ esac
+ fi
+
else
SHLIB_LD="${LINKBIN} -dll ${lflags}"
# link -lib only works when -lib is the first arg
@@ -1408,7 +1431,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
SHLIB_CFLAGS=""
SHLIB_LD='${CC} -shared'
SHLIB_SUFFIX=".dll"
- EXE_SUFFIX=".exe"
+ EXEEXT=".exe"
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
@@ -2003,6 +2026,99 @@ dnl # preprocessing tests use only CPPFLAGS.
# TEA specific: use PACKAGE_VERSION instead of VERSION
UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])
+ AC_CACHE_CHECK(for SEH support in compiler,
+ tcl_cv_seh,
+ AC_TRY_RUN([
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+ #undef WIN32_LEAN_AND_MEAN
+
+ int main(int argc, char** argv) {
+ int a, b = 0;
+ __try {
+ a = 666 / b;
+ }
+ __except (EXCEPTION_EXECUTE_HANDLER) {
+ return 0;
+ }
+ return 1;
+ }
+ ],
+ tcl_cv_seh=yes,
+ tcl_cv_seh=no,
+ tcl_cv_seh=no)
+ )
+ if test "$tcl_cv_seh" = "no" ; then
+ AC_DEFINE(HAVE_NO_SEH, 1,
+ [Defined when mingw does not support SEH])
+ fi
+
+ #
+ # Check to see if the excpt.h include file provided contains the
+ # definition for EXCEPTION_DISPOSITION; if not, which is the case
+ # with Cygwin's version as of 2002-04-10, define it to be int,
+ # sufficient for getting the current code to work.
+ #
+ AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
+ tcl_cv_eh_disposition,
+ AC_TRY_COMPILE([
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# undef WIN32_LEAN_AND_MEAN
+ ],[
+ EXCEPTION_DISPOSITION x;
+ ],
+ tcl_cv_eh_disposition=yes,
+ tcl_cv_eh_disposition=no)
+ )
+ if test "$tcl_cv_eh_disposition" = "no" ; then
+ AC_DEFINE(EXCEPTION_DISPOSITION, int,
+ [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
+ fi
+
+ # Check to see if winnt.h defines CHAR, SHORT, and LONG
+ # even if VOID has already been #defined. The win32api
+ # used by mingw and cygwin is known to do this.
+
+ AC_CACHE_CHECK(for winnt.h that ignores VOID define,
+ tcl_cv_winnt_ignore_void,
+ AC_TRY_COMPILE([
+ #define VOID void
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+ #undef WIN32_LEAN_AND_MEAN
+ ], [
+ CHAR c;
+ SHORT s;
+ LONG l;
+ ],
+ tcl_cv_winnt_ignore_void=yes,
+ tcl_cv_winnt_ignore_void=no)
+ )
+ if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
+ AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
+ [Defined when cygwin/mingw ignores VOID define in winnt.h])
+ fi
+
+ # See if the compiler supports casting to a union type.
+ # This is used to stop gcc from printing a compiler
+ # warning when initializing a union member.
+
+ AC_CACHE_CHECK(for cast to union support,
+ tcl_cv_cast_to_union,
+ AC_TRY_COMPILE([],
+ [
+ union foo { int i; double d; };
+ union foo f = (union foo) (int) 0;
+ ],
+ tcl_cv_cast_to_union=yes,
+ tcl_cv_cast_to_union=no)
+ )
+ if test "$tcl_cv_cast_to_union" = "yes"; then
+ AC_DEFINE(HAVE_CAST_TO_UNION, 1,
+ [Defined when compiler supports casting to union type.])
+ fi
+
AC_SUBST(CFLAGS_DEBUG)
AC_SUBST(CFLAGS_OPTIMIZE)
AC_SUBST(CFLAGS_WARNING)
diff --git a/unix/TkDND_XDND.c b/unix/TkDND_XDND.c
index f2faab8..5bd877c 100644
--- a/unix/TkDND_XDND.c
+++ b/unix/TkDND_XDND.c
@@ -37,6 +37,7 @@
*/
#include "tcl.h"
#include "tk.h"
+#include <string.h>
#include <X11/Xlib.h>
#include <X11/X.h>
#include <X11/Xatom.h>
@@ -48,7 +49,18 @@
#define LONG_MAX 0x7FFFFFFFL
#endif
-#define XDND_VERSION 5
+/*
+#define TKDND_SET_XDND_PROPERTY_ON_TARGET
+#define TKDND_SET_XDND_PROPERTY_ON_WRAPPER
+#define DEBUG_CLIENTMESSAGE_HANDLER
+ */
+#define TKDND_SET_XDND_PROPERTY_ON_TOPLEVEL
+
+#define TkDND_TkWindowChildren(tkwin) \
+ ((Tk_Window) (((Tk_FakeWin *) (tkwin))->dummy2))
+
+#define TkDND_TkWindowLastChild(tkwin) \
+ ((Tk_Window) (((Tk_FakeWin *) (tkwin))->dummy3))
#define TkDND_TkWin(x) \
(Tk_NameToWindow(interp, Tcl_GetString(x), Tk_MainWindow(interp)))
@@ -80,70 +92,158 @@ Tcl_Interp * TkDND_Interp(Tk_Window tkwin) {
#define Tk_Interp TkDND_Interp
#endif /* Tk_Interp */
+/*
+ * XDND Section
+ */
+#define XDND_VERSION 5
+
+/* XdndEnter */
+#define XDND_THREE 3
+#define XDND_ENTER_SOURCE_WIN(e) ((e)->xclient.data.l[0])
+#define XDND_ENTER_THREE_TYPES(e) (((e)->xclient.data.l[1] & 0x1UL) == 0)
+#define XDND_ENTER_THREE_TYPES_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL)
+#define XDND_ENTER_VERSION(e) ((e)->xclient.data.l[1] >> 24)
+#define XDND_ENTER_VERSION_SET(e,v) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~(0xFF << 24)) | ((v) << 24)
+#define XDND_ENTER_TYPE(e,i) ((e)->xclient.data.l[2 + i]) /* i => (0, 1, 2) */
+
+/* XdndPosition */
+#define XDND_POSITION_SOURCE_WIN(e) ((e)->xclient.data.l[0])
+#define XDND_POSITION_ROOT_X(e) ((e)->xclient.data.l[2] >> 16)
+#define XDND_POSITION_ROOT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFUL)
+#define XDND_POSITION_ROOT_SET(e,x,y) (e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL)
+#define XDND_POSITION_TIME(e) ((e)->xclient.data.l[3])
+#define XDND_POSITION_ACTION(e) ((e)->xclient.data.l[4])
+
+/* XdndStatus */
+#define XDND_STATUS_TARGET_WIN(e) ((e)->xclient.data.l[0])
+#define XDND_STATUS_WILL_ACCEPT(e) ((e)->xclient.data.l[1] & 0x1L)
+#define XDND_STATUS_WILL_ACCEPT_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL)
+#define XDND_STATUS_WANT_POSITION(e) ((e)->xclient.data.l[1] & 0x2UL)
+#define XDND_STATUS_WANT_POSITION_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x2UL) | (((b) == 0) ? 0 : 0x2UL)
+#define XDND_STATUS_RECT_X(e) ((e)->xclient.data.l[2] >> 16)
+#define XDND_STATUS_RECT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFL)
+#define XDND_STATUS_RECT_WIDTH(e) ((e)->xclient.data.l[3] >> 16)
+#define XDND_STATUS_RECT_HEIGHT(e) ((e)->xclient.data.l[3] & 0xFFFFL)
+#define XDND_STATUS_RECT_SET(e,x,y,w,h) {(e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL); (e)->xclient.data.l[3] = ((w) << 16) | ((h) & 0xFFFFUL); }
+#define XDND_STATUS_ACTION(e) ((e)->xclient.data.l[4])
+
+/* XdndLeave */
+#define XDND_LEAVE_SOURCE_WIN(e) ((e)->xclient.data.l[0])
+
+/* XdndDrop */
+#define XDND_DROP_SOURCE_WIN(e) ((e)->xclient.data.l[0])
+#define XDND_DROP_TIME(e) ((e)->xclient.data.l[2])
+
+/* XdndFinished */
+#define XDND_FINISHED_TARGET_WIN(e) ((e)->xclient.data.l[0])
+#define XDND_FINISHED_ACCEPTED(e) ((e)->xclient.data.l[1] & 0x1L)
+#define XDND_FINISHED_ACCEPTED_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL)
+#define XDND_FINISHED_ACTION(e) ((e)->xclient.data.l[2])
+
+
+/*
+ * Support for getting the wrapper window for our top-level...
+ */
+
int TkDND_RegisterTypesObjCmd(ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]) {
Atom version = XDND_VERSION;
- Tk_Window path = TkDND_TkWin(objv[1]);
+ Tk_Window path = NULL;
+ Tk_Window toplevel = NULL;
if (objc != 4) {
Tcl_WrongNumArgs(interp, 1, objv, "path toplevel types-list");
return TCL_ERROR;
}
+ path = TkDND_TkWin(objv[1]);
+ Tk_MakeWindowExist(path);
+
+#if defined(TKDND_SET_XDND_PROPERTY_ON_WRAPPER) || \
+ defined(TKDND_SET_XDND_PROPERTY_ON_TOPLEVEL)
+ toplevel = TkDND_TkWin(objv[2]);
+ if (!Tk_IsTopLevel(toplevel)) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "path \"", Tcl_GetString(objv[2]),
+ "\" is not a toplevel window!", (char *) NULL);
+ return TCL_ERROR;
+ }
+ Tk_MakeWindowExist(toplevel);
+ Tk_MapWindow(toplevel);
+#endif
+
/*
* We must make the toplevel that holds this widget XDND aware. This means
* that we have to set the XdndAware property on our toplevel.
*/
- Tk_MakeWindowExist(path);
+#ifdef TKDND_SET_XDND_PROPERTY_ON_TARGET
XChangeProperty(Tk_Display(path), Tk_WindowId(path),
Tk_InternAtom(path, "XdndAware"),
XA_ATOM, 32, PropModeReplace,
(unsigned char *) &version, 1);
- return TCL_OK;
-#if 0
- int status;
+#endif /* TKDND_SET_XDND_PROPERTY_ON_TARGET */
+
+#ifdef TKDND_SET_XDND_PROPERTY_ON_WRAPPER
+ if (Tk_HasWrapper(toplevel)) {
+ }
+#endif /* TKDND_SET_XDND_PROPERTY_ON_WRAPPER */
+
+#ifdef TKDND_SET_XDND_PROPERTY_ON_TOPLEVEL
Window root_return, parent, *children_return = 0;
unsigned int nchildren_return;
- Tk_Window toplevel = TkDND_TkWin(objv[2]);
- if (!Tk_IsTopLevel(toplevel)) {
- Tcl_ResetResult(interp);
- Tcl_AppendResult(interp, "path \"", Tcl_GetString(objv[2]),
- "\" is not a toplevel window!", (char *) NULL);
- return TCL_ERROR;
- }
- Tk_MakeWindowExist(toplevel);
- Tk_MapWindow(toplevel);
- status = XQueryTree(Tk_Display(toplevel), Tk_WindowId(toplevel),
- &root_return, &parent,
- &children_return, &nchildren_return);
+ XQueryTree(Tk_Display(toplevel), Tk_WindowId(toplevel),
+ &root_return, &parent,
+ &children_return, &nchildren_return);
if (children_return) XFree(children_return);
XChangeProperty(Tk_Display(toplevel), parent,
Tk_InternAtom(toplevel, "XdndAware"),
XA_ATOM, 32, PropModeReplace,
(unsigned char *) &version, 1);
+#endif /* TKDND_SET_XDND_PROPERTY_ON_TOPLEVEL */
return TCL_OK;
-#endif
} /* TkDND_RegisterTypesObjCmd */
-int TkDND_HandleXdndEnter(Tk_Window tkwin, XClientMessageEvent cm) {
+int TkDND_HandleXdndEnter(Tk_Window tkwin, XEvent *xevent) {
Tcl_Interp *interp = Tk_Interp(tkwin);
- Atom *typelist;
- const long *l = cm.data.l;
- int i, version = (int)(((unsigned long)(l[1])) >> 24);
+ Atom *typelist = NULL;
+ int i, version = (int) XDND_ENTER_VERSION(xevent);
Window drag_source;
+ // Window drop_toplevel, drop_window;
Tcl_Obj* objv[4], *element;
- if (interp == NULL) return False;
+ if (interp == NULL) return False;
if (version > XDND_VERSION) return False;
- drag_source = l[0];
- if (l[1] & 0x1UL) {
+#if XDND_VERSION >= 3
+ if (version < 3) return False;
+#endif
+
+//#if XDND_VERSION >= 3
+// /* XdndEnter is delivered to the toplevel window, which is the wrapper
+// * window for the Tk toplevel. We don't yet know the sub-window the mouse
+// * is in... */
+// drop_toplevel = xevent->xany.window;
+// drop_window = 0;
+//#else
+// drop_toplevel = 0
+// drop_window = xevent->xany.window;
+//#endif
+ drag_source = XDND_ENTER_SOURCE_WIN(xevent);
+
+ if (XDND_ENTER_THREE_TYPES(xevent)) {
+ typelist = (Atom *) Tcl_Alloc(sizeof(Atom)*4);
+ if (typelist == NULL) return False;
+ typelist[0] = xevent->xclient.data.l[2];
+ typelist[1] = xevent->xclient.data.l[3];
+ typelist[2] = xevent->xclient.data.l[4];
+ typelist[3] = None;
+ } else {
/* Get the types from XdndTypeList property. */
Atom actualType = None;
int actualFormat;
unsigned long itemCount, remainingBytes;
Atom *data;
- XGetWindowProperty(cm.display, drag_source,
+ XGetWindowProperty(xevent->xclient.display, drag_source,
Tk_InternAtom(tkwin, "XdndTypeList"), 0,
LONG_MAX, False, XA_ATOM, &actualType, &actualFormat,
&itemCount, &remainingBytes, (unsigned char **) &data);
@@ -152,13 +252,6 @@ int TkDND_HandleXdndEnter(Tk_Window tkwin, XClientMessageEvent cm) {
for (i=0; i<itemCount; i++) { typelist[i] = data[i]; }
typelist[itemCount] = None;
if (data) XFree((unsigned char*)data);
- } else {
- typelist = (Atom *) Tcl_Alloc(sizeof(Atom)*4);
- if (typelist == NULL) return False;
- typelist[0] = cm.data.l[2];
- typelist[1] = cm.data.l[3];
- typelist[2] = cm.data.l[4];
- typelist[3] = None;
}
/* We have all the information we need. Its time to pass it at the Tcl
* level.*/
@@ -175,14 +268,13 @@ int TkDND_HandleXdndEnter(Tk_Window tkwin, XClientMessageEvent cm) {
return True;
} /* TkDND_HandleXdndEnter */
-int TkDND_HandleXdndPosition(Tk_Window tkwin, XClientMessageEvent cm) {
+int TkDND_HandleXdndPosition(Tk_Window tkwin, XEvent *xevent) {
Tcl_Interp *interp = Tk_Interp(tkwin);
Tk_Window mouse_tkwin;
Tcl_Obj* result;
Tcl_Obj* objv[4];
- const unsigned long *l = (const unsigned long *) cm.data.l;
- int rootX, rootY, i, index, status;
- XClientMessageEvent response;
+ int rootX, rootY, dx, dy, i, index, status;
+ XEvent response;
int width = 1, height = 1;
static char *DropActions[] = {
"copy", "move", "link", "ask", "private", "refuse_drop", "default",
@@ -192,36 +284,31 @@ int TkDND_HandleXdndPosition(Tk_Window tkwin, XClientMessageEvent cm) {
ActionCopy, ActionMove, ActionLink, ActionAsk, ActionPrivate,
refuse_drop, ActionDefault
};
+ Time time;
+ Atom action;
if (interp == NULL) return False;
- rootX = (l[2] & 0xffff0000) >> 16;
- rootY = l[2] & 0x0000ffff;
+ /* Get the coordinates from the event... */
+ rootX = XDND_POSITION_ROOT_X(xevent);
+ rootY = XDND_POSITION_ROOT_Y(xevent);
+ /* Get the time from the event... */
+ time = XDND_POSITION_TIME(xevent);
+ /* Get the user action from the event... */
+ action = XDND_POSITION_ACTION(xevent);
+
+ /* Find the Tk widget under the mouse... */
+ Tk_GetRootCoords(tkwin, &dx, &dy);
mouse_tkwin = Tk_CoordsToWindow(rootX, rootY, tkwin);
if (mouse_tkwin == NULL) {
- /* We received the client message, but we cannot find a window? Strange...*/
- /* A last attemp: execute wm containing x, y */
- objv[0] = Tcl_NewStringObj("update", -1);
- TkDND_Eval(1);
- objv[0] = Tcl_NewStringObj("winfo", -1);
- objv[1] = Tcl_NewStringObj("containing", -1);
- objv[2] = Tcl_NewIntObj(rootX);
- objv[3] = Tcl_NewIntObj(rootY);
- TkDND_Status_Eval(4);
- if (status == TCL_OK) {
- result = Tcl_GetObjResult(interp); Tcl_IncrRefCount(result);
- mouse_tkwin = Tk_NameToWindow(interp, Tcl_GetString(result),
- Tk_MainWindow(interp));
- Tcl_DecrRefCount(result);
- }
+ mouse_tkwin = Tk_CoordsToWindow(rootX + dx, rootY + dy, tkwin);
}
- /* Get the drag source. */
- objv[0] = Tcl_NewStringObj("tkdnd::xdnd::_GetDragSource", -1);
- TkDND_Status_Eval(1); if (status != TCL_OK) return False;
- if (Tcl_GetLongFromObj(interp, Tcl_GetObjResult(interp),
- (long *)&response.window) != TCL_OK) return False;
- /* Now that we have found the containing widget, ask it whether it will accept
- * the drop... */
+#if 0
+ printf("mouse_win: %p (%s) (%d, %d %p %s) i=%p\n", mouse_tkwin,
+ mouse_tkwin?Tk_PathName(mouse_tkwin):"",
+ rootX, rootY, tkwin, Tk_PathName(tkwin), interp);
+#endif
+ /* Ask the Tk widget whether it will accept the drop... */
index = refuse_drop;
if (mouse_tkwin != NULL) {
objv[0] = Tcl_NewStringObj("tkdnd::xdnd::_HandleXdndPosition", -1);
@@ -238,37 +325,48 @@ int TkDND_HandleXdndPosition(Tk_Window tkwin, XClientMessageEvent cm) {
if (status != TCL_OK) index = refuse_drop;
}
}
- /* Sent */
- response.type = ClientMessage;
- response.format = 32;
- response.message_type = Tk_InternAtom(tkwin, "XdndStatus");
- response.data.l[0] = (mouse_tkwin!=NULL) ? Tk_WindowId(mouse_tkwin) : 0;
- response.data.l[1] = 1; /* yes */
- response.data.l[2] = ((rootX) << 16) | ((rootY) & 0xFFFFUL); /* x, y */
- response.data.l[3] = ((width) << 16) | ((height) & 0xFFFFUL); /* w, h */
- response.data.l[4] = 0; /* action */
+ /* Sent a XdndStatus event, to notify the drag source */
+ memset (&response, 0, sizeof(xevent));
+ response.xany.type = ClientMessage;
+ response.xany.display = xevent->xclient.display;
+ response.xclient.window = XDND_POSITION_SOURCE_WIN(xevent);
+ response.xclient.message_type = Tk_InternAtom(tkwin, "XdndStatus");
+ response.xclient.format = 32;
+ XDND_STATUS_WILL_ACCEPT_SET(&response, 1);
+ XDND_STATUS_WANT_POSITION_SET(&response, 1);
+ XDND_STATUS_RECT_SET(&response, rootX, rootY, width, height);
+#if XDND_VERSION >= 3
+ XDND_STATUS_TARGET_WIN(&response) = Tk_WindowId(tkwin);
+#else
+ XDND_STATUS_TARGET_WIN(&response) = xevent->xany.window;
+#endif
switch ((enum dropactions) index) {
case ActionDefault:
case ActionCopy:
- response.data.l[4] = Tk_InternAtom(tkwin, "XdndActionCopy"); break;
+ XDND_STATUS_ACTION(&response) = Tk_InternAtom(tkwin, "XdndActionCopy");
+ break;
case ActionMove:
- response.data.l[4] = Tk_InternAtom(tkwin, "XdndActionMove"); break;
+ XDND_STATUS_ACTION(&response) = Tk_InternAtom(tkwin, "XdndActionMove");
+ break;
case ActionLink:
- response.data.l[4] = Tk_InternAtom(tkwin, "XdndActionLink"); break;
+ XDND_STATUS_ACTION(&response) = Tk_InternAtom(tkwin, "XdndActionLink");
+ break;
case ActionAsk:
- response.data.l[4] = Tk_InternAtom(tkwin, "XdndActionAsk"); break;
+ XDND_STATUS_ACTION(&response) = Tk_InternAtom(tkwin, "XdndActionAsk");
+ break;
case ActionPrivate:
- response.data.l[4] = Tk_InternAtom(tkwin, "XdndActionPrivate"); break;
+ XDND_STATUS_ACTION(&response) = Tk_InternAtom(tkwin, "XdndActionPrivate");
+ break;
case refuse_drop: {
- response.data.l[1] = 0; /* Refuse drop. */
+ XDND_STATUS_WILL_ACCEPT_SET(&response, 0); /* Refuse drop. */
}
}
- XSendEvent(cm.display, response.window, False, NoEventMask,
- (XEvent*)&response);
+ XSendEvent(response.xany.display, response.xclient.window,
+ False, NoEventMask, (XEvent*)&response);
return True;
} /* TkDND_HandleXdndPosition */
-int TkDND_HandleXdndLeave(Tk_Window tkwin, XClientMessageEvent cm) {
+int TkDND_HandleXdndLeave(Tk_Window tkwin, XEvent *xevent) {
Tcl_Interp *interp = Tk_Interp(tkwin);
Tcl_Obj* objv[1];
int i;
@@ -278,12 +376,12 @@ int TkDND_HandleXdndLeave(Tk_Window tkwin, XClientMessageEvent cm) {
return True;
} /* TkDND_HandleXdndLeave */
-int TkDND_HandleXdndDrop(Tk_Window tkwin, XClientMessageEvent cm) {
- XClientMessageEvent finished;
+int TkDND_HandleXdndDrop(Tk_Window tkwin, XEvent *xevent) {
+ XEvent finished;
Tcl_Interp *interp = Tk_Interp(tkwin);
Tcl_Obj* objv[2], *result;
int status, i, index;
- Time time = cm.data.l[2];
+ Time time = XDND_DROP_TIME(xevent);
static char *DropActions[] = {
"copy", "move", "link", "ask", "private", "refuse_drop", "default",
(char *) NULL
@@ -295,25 +393,23 @@ int TkDND_HandleXdndDrop(Tk_Window tkwin, XClientMessageEvent cm) {
if (interp == NULL) return False;
- /* Get the drag source. */
- objv[0] = Tcl_NewStringObj("tkdnd::xdnd::_GetDragSource", -1);
- TkDND_Status_Eval(1); if (status != TCL_OK) return False;
- if (Tcl_GetLongFromObj(interp, Tcl_GetObjResult(interp),
- (long *) &finished.window) != TCL_OK) return False;
-
- /* Get the drop target. */
- objv[0] = Tcl_NewStringObj("tkdnd::xdnd::_GetDropTarget", -1);
- TkDND_Status_Eval(1);
- if (Tcl_GetLongFromObj(interp,
- Tcl_GetObjResult(interp), &finished.data.l[0]) != TCL_OK) {
- finished.data.l[0] = None;
- }
+ memset(&finished, 0, sizeof(XEvent));
+ finished.xany.type = ClientMessage;
+ finished.xany.display = xevent->xclient.display;
+ finished.xclient.window = XDND_DROP_SOURCE_WIN(xevent);
+ finished.xclient.message_type = Tk_InternAtom(tkwin, "XdndFinished");
+ finished.xclient.format = 32;
+#if XDND_VERSION >= 3
+ XDND_FINISHED_TARGET_WIN(&finished) = Tk_WindowId(tkwin);
+#else
+ XDND_FINISHED_TARGET_WIN(&finished) = xevent->xany.window;
+#endif
+ XDND_FINISHED_ACCEPTED_SET(&finished, 1);
/* Call out Tcl callback. */
objv[0] = Tcl_NewStringObj("tkdnd::xdnd::_HandleXdndDrop", -1);
- objv[1] = Tcl_NewWideIntObj(time);
+ objv[1] = Tcl_NewLongObj(time);
TkDND_Status_Eval(2);
- finished.data.l[1] = 1; /* Accept drop. */
if (status == TCL_OK) {
/* Get the returned action... */
result = Tcl_GetObjResult(interp); Tcl_IncrRefCount(result);
@@ -324,105 +420,176 @@ int TkDND_HandleXdndDrop(Tk_Window tkwin, XClientMessageEvent cm) {
switch ((enum dropactions) index) {
case ActionDefault:
case ActionCopy:
- finished.data.l[2] = Tk_InternAtom(tkwin, "XdndActionCopy"); break;
+ XDND_FINISHED_ACTION(&finished) =
+ Tk_InternAtom(tkwin, "XdndActionCopy"); break;
case ActionMove:
- finished.data.l[2] = Tk_InternAtom(tkwin, "XdndActionMove"); break;
+ XDND_FINISHED_ACTION(&finished) =
+ Tk_InternAtom(tkwin, "XdndActionMove"); break;
case ActionLink:
- finished.data.l[2] = Tk_InternAtom(tkwin, "XdndActionLink"); break;
+ XDND_FINISHED_ACTION(&finished) =
+ Tk_InternAtom(tkwin, "XdndActionLink"); break;
case ActionAsk:
- finished.data.l[2] = Tk_InternAtom(tkwin, "XdndActionAsk"); break;
+ XDND_FINISHED_ACTION(&finished) =
+ Tk_InternAtom(tkwin, "XdndActionAsk"); break;
case ActionPrivate:
- finished.data.l[2] = Tk_InternAtom(tkwin, "XdndActionPrivate"); break;
+ XDND_FINISHED_ACTION(&finished) =
+ Tk_InternAtom(tkwin, "XdndActionPrivate"); break;
case refuse_drop: {
- finished.data.l[1] = 0; /* Drop canceled. */
+ XDND_FINISHED_ACCEPTED_SET(&finished, 0); /* Drop canceled. */
}
}
} else {
- finished.data.l[1] = 0;
+ XDND_FINISHED_ACCEPTED_SET(&finished, 0);
}
/* Send XdndFinished. */
- finished.type = ClientMessage;
- finished.format = 32;
- finished.message_type = Tk_InternAtom(tkwin, "XdndFinished");
- XSendEvent(cm.display, finished.window, False, NoEventMask,
- (XEvent*)&finished);
+ XSendEvent(finished.xany.display, finished.xclient.window,
+ False, NoEventMask, (XEvent*)&finished);
return True;
} /* TkDND_HandleXdndDrop */
-int TkDND_HandleXdndStatus(Tk_Window tkwin, XClientMessageEvent cm) {
+int TkDND_HandleXdndStatus(Tk_Window tkwin, XEvent *xevent) {
return False;
} /* TkDND_HandleXdndStatus */
-int TkDND_HandleXdndFinished(Tk_Window tkwin, XClientMessageEvent cm) {
+int TkDND_HandleXdndFinished(Tk_Window tkwin, XEvent *xevent) {
return False;
} /* TkDND_HandleXdndFinished */
static int TkDND_XDNDHandler(Tk_Window tkwin, XEvent *xevent) {
- XClientMessageEvent clientMessage;
if (xevent->type != ClientMessage) return False;
- clientMessage = xevent->xclient;
- if (clientMessage.message_type == Tk_InternAtom(tkwin, "XdndPosition")) {
+ if (xevent->xclient.message_type == Tk_InternAtom(tkwin, "XdndPosition")) {
#ifdef DEBUG_CLIENTMESSAGE_HANDLER
printf("XDND_HandleClientMessage: Received XdndPosition\n");
#endif /* DEBUG_CLIENTMESSAGE_HANDLER */
- return TkDND_HandleXdndPosition(tkwin, clientMessage);
- } else if (clientMessage.message_type == Tk_InternAtom(tkwin, "XdndEnter")) {
+ return TkDND_HandleXdndPosition(tkwin, xevent);
+ } else if (xevent->xclient.message_type== Tk_InternAtom(tkwin, "XdndEnter")) {
#ifdef DEBUG_CLIENTMESSAGE_HANDLER
printf("XDND_HandleClientMessage: Received XdndEnter\n");
#endif /* DEBUG_CLIENTMESSAGE_HANDLER */
- return TkDND_HandleXdndEnter(tkwin, clientMessage);
- } else if (clientMessage.message_type == Tk_InternAtom(tkwin, "XdndStatus")) {
+ return TkDND_HandleXdndEnter(tkwin, xevent);
+ } else if (xevent->xclient.message_type==Tk_InternAtom(tkwin, "XdndStatus")) {
#ifdef DEBUG_CLIENTMESSAGE_HANDLER
printf("XDND_HandleClientMessage: Received XdndStatus\n");
#endif /* DEBUG_CLIENTMESSAGE_HANDLER */
- return TkDND_HandleXdndStatus(tkwin, clientMessage);
- } else if (clientMessage.message_type == Tk_InternAtom(tkwin, "XdndLeave")) {
+ return TkDND_HandleXdndStatus(tkwin, xevent);
+ } else if (xevent->xclient.message_type== Tk_InternAtom(tkwin, "XdndLeave")) {
#ifdef DEBUG_CLIENTMESSAGE_HANDLER
printf("XDND_HandleClientMessage: Received XdndLeave\n");
#endif /* DEBUG_CLIENTMESSAGE_HANDLER */
- return TkDND_HandleXdndLeave(tkwin, clientMessage);
- } else if (clientMessage.message_type == Tk_InternAtom(tkwin, "XdndDrop")) {
+ return TkDND_HandleXdndLeave(tkwin, xevent);
+ } else if (xevent->xclient.message_type == Tk_InternAtom(tkwin, "XdndDrop")) {
#ifdef DEBUG_CLIENTMESSAGE_HANDLER
printf("XDND_HandleClientMessage: Received XdndDrop\n");
#endif /* DEBUG_CLIENTMESSAGE_HANDLER */
- return TkDND_HandleXdndDrop(tkwin, clientMessage);
- } else if (clientMessage.message_type ==
+ return TkDND_HandleXdndDrop(tkwin, xevent);
+ } else if (xevent->xclient.message_type ==
Tk_InternAtom(tkwin, "XdndFinished")) {
#ifdef DEBUG_CLIENTMESSAGE_HANDLER
printf("XDND_HandleClientMessage: Received XdndFinished\n");
#endif /* DEBUG_CLIENTMESSAGE_HANDLER */
- return TkDND_HandleXdndFinished(tkwin, clientMessage);
+ return TkDND_HandleXdndFinished(tkwin, xevent);
} else {
#ifdef TKDND_ENABLE_MOTIF_DROPS
- if (MotifDND_HandleClientMessage(dnd, *xevent)) return True;
+ if (MotifDND_HandleClientMessage(dnd, xevent)) return True;
#endif /* TKDND_ENABLE_MOTIF_DROPS */
}
return False;
} /* TkDND_XDNDHandler */
+/*
+ * The following two functions were copied from tkSelect.c
+ * If TIP 370 gets implemented, they will not be required.
+ */
+static int TkDND_SelGetProc(ClientData clientData,
+ Tcl_Interp *interp, const char *portion) {
+ Tcl_DStringAppend(clientData, portion, -1);
+ return TCL_OK;
+}; /* TkDND_SelGetProc */
+
int TkDND_GetSelectionObjCmd(ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]) {
- Time time;
- Tk_Window path;
+ Tk_Window tkwin = Tk_MainWindow(interp);
+ Atom target;
Atom selection;
-
- if (objc != 4) {
- Tcl_WrongNumArgs(interp, 1, objv, "path time type");
- return TCL_ERROR;
+ Time time = CurrentTime;
+ const char *targetName = NULL;
+ Tcl_DString selBytes;
+ int result;
+ static const char *const getOptionStrings[] = {
+ "-displayof", "-selection", "-time", "-type", NULL
+ };
+ enum getOptions { GET_DISPLAYOF, GET_SELECTION, GET_TIME, GET_TYPE };
+ int getIndex;
+ int count;
+ Tcl_Obj **objs;
+ const char *string;
+ const char *path = NULL;
+ const char *selName = NULL;
+
+ for (count = objc-1, objs = ((Tcl_Obj **)objv)+1; count>0;
+ count-=2, objs+=2) {
+ string = Tcl_GetString(objs[0]);
+ if (string[0] != '-') {
+ break;
+ }
+ if (count < 2) {
+ Tcl_AppendResult(interp, "value for \"", string,
+ "\" missing", NULL);
+ return TCL_ERROR;
+ }
+
+ if (Tcl_GetIndexFromObj(interp, objs[0], getOptionStrings,
+ "option", 0, &getIndex) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ switch ((enum getOptions) getIndex) {
+ case GET_DISPLAYOF:
+ path = Tcl_GetString(objs[1]);
+ break;
+ case GET_SELECTION:
+ selName = Tcl_GetString(objs[1]);
+ break;
+ case GET_TYPE:
+ targetName = Tcl_GetString(objs[1]);
+ break;
+ case GET_TIME:
+ if (Tcl_GetLongFromObj(interp, objs[1], (long *) &time) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ break;
+ }
}
-
- if (Tcl_GetLongFromObj(interp, objv[2], (long *) &time) != TCL_OK) {
- return TCL_ERROR;
+ if (path != NULL) {
+ tkwin = Tk_NameToWindow(interp, path, tkwin);
}
-
- path = TkDND_TkWin(objv[1]);
- selection = Tk_InternAtom(path, "XdndSelection");
-
- XConvertSelection(Tk_Display(path), selection,
- Tk_InternAtom(path, Tcl_GetString(objv[3])),
- selection, Tk_WindowId(path), time);
- return TCL_OK;
+ if (tkwin == NULL) {
+ return TCL_ERROR;
+ }
+ if (selName != NULL) {
+ selection = Tk_InternAtom(tkwin, selName);
+ } else {
+ selection = XA_PRIMARY;
+ }
+ if (count > 1) {
+ Tcl_WrongNumArgs(interp, 1, objv, "?-option value ...?");
+ return TCL_ERROR;
+ } else if (count == 1) {
+ target = Tk_InternAtom(tkwin, Tcl_GetString(objs[0]));
+ } else if (targetName != NULL) {
+ target = Tk_InternAtom(tkwin, targetName);
+ } else {
+ target = XA_STRING;
+ }
+ Tcl_DStringInit(&selBytes);
+ result = TkDND_GetSelection(interp, tkwin, selection, target, time,
+ TkDND_SelGetProc, &selBytes);
+ if (1 ||result == TCL_OK) {
+ Tcl_DStringResult(interp, &selBytes);
+ }
+ Tcl_DStringFree(&selBytes);
+ return result;
} /* TkDND_GetSelectionObjCmd */
/*
@@ -439,6 +606,7 @@ DLLEXPORT int Tkdnd_SafeInit(Tcl_Interp *interp);
int DLLEXPORT Tkdnd_Init(Tcl_Interp *interp) {
int major, minor, patchlevel;
+ Tcl_CmdInfo info;
if (
#ifdef USE_TCL_STUBS
@@ -468,6 +636,10 @@ int DLLEXPORT Tkdnd_Init(Tcl_Interp *interp) {
return TCL_ERROR;
}
+ if (Tcl_GetCommandInfo(interp, "selection", &info) == 0) {
+ Tcl_SetResult(interp, "selection Tk command not found", TCL_STATIC);
+ return TCL_ERROR;
+ }
/* Register the various commands */
if (Tcl_CreateObjCommand(interp, "_register_types",
@@ -476,7 +648,7 @@ int DLLEXPORT Tkdnd_Init(Tcl_Interp *interp) {
return TCL_ERROR;
}
- if (Tcl_CreateObjCommand(interp, "_get_selection",
+ if (Tcl_CreateObjCommand(interp, "_selection_get",
(Tcl_ObjCmdProc*) TkDND_GetSelectionObjCmd,
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL) == NULL) {
return TCL_ERROR;
diff --git a/unix/tkSelect.h b/unix/tkSelect.h
new file mode 100644
index 0000000..74326d0
--- /dev/null
+++ b/unix/tkSelect.h
@@ -0,0 +1,167 @@
+/*
+ * tkSelect.h --
+ *
+ * Declarations of types shared among the files that implement selection
+ * support.
+ *
+ * Copyright (c) 1995 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution of
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#ifndef _TKSELECT
+#define _TKSELECT
+
+/*
+ * When a selection is owned by a window on a given display, one of the
+ * following structures is present on a list of current selections in the
+ * display structure. The structure is used to record the current owner of a
+ * selection for use in later retrieval requests. There is a list of such
+ * structures because a display can have multiple different selections active
+ * at the same time.
+ */
+
+typedef struct TkSelectionInfo {
+ Atom selection; /* Selection name, e.g. XA_PRIMARY. */
+ Tk_Window owner; /* Current owner of this selection. */
+ int serial; /* Serial number of last XSelectionSetOwner
+ * request made to server for this selection
+ * (used to filter out redundant
+ * SelectionClear events). */
+ Time time; /* Timestamp used to acquire selection. */
+ Tk_LostSelProc *clearProc; /* Procedure to call when owner loses
+ * selection. */
+ ClientData clearData; /* Info to pass to clearProc. */
+ struct TkSelectionInfo *nextPtr;
+ /* Next in list of current selections on this
+ * display. NULL means end of list. */
+} TkSelectionInfo;
+
+/*
+ * One of the following structures exists for each selection handler created
+ * for a window by calling Tk_CreateSelHandler. The handlers are linked in a
+ * list rooted in the TkWindow structure.
+ */
+
+typedef struct TkSelHandler {
+ Atom selection; /* Selection name, e.g. XA_PRIMARY. */
+ Atom target; /* Target type for selection conversion, such
+ * as TARGETS or STRING. */
+ Atom format; /* Format in which selection info will be
+ * returned, such as STRING or ATOM. */
+ Tk_SelectionProc *proc; /* Procedure to generate selection in this
+ * format. */
+ ClientData clientData; /* Argument to pass to proc. */
+ int size; /* Size of units returned by proc (8 for
+ * STRING, 32 for almost anything else). */
+ struct TkSelHandler *nextPtr;
+ /* Next selection handler associated with same
+ * window (NULL for end of list). */
+} TkSelHandler;
+
+/*
+ * When the selection is being retrieved, one of the following structures is
+ * present on a list of pending selection retrievals. The structure is used to
+ * communicate between the background procedure that requests the selection
+ * and the foreground event handler that processes the events in which the
+ * selection is returned. There is a list of such structures so that there can
+ * be multiple simultaneous selection retrievals (e.g. on different displays).
+ */
+
+typedef struct TkSelRetrievalInfo {
+ Tcl_Interp *interp; /* Interpreter for error reporting. */
+ TkWindow *winPtr; /* Window used as requestor for selection. */
+ Atom selection; /* Selection being requested. */
+ Atom property; /* Property where selection will appear. */
+ Atom target; /* Desired form for selection. */
+ Tk_GetSelProc *proc; /* Procedure to call to handle pieces of
+ * selection. */
+ ClientData clientData; /* Argument for proc. */
+ int result; /* Initially -1. Set to a Tcl return value
+ * once the selection has been retrieved. */
+ Tcl_TimerToken timeout; /* Token for current timeout procedure. */
+ int idleTime; /* Number of seconds that have gone by without
+ * hearing anything from the selection
+ * owner. */
+ Tcl_EncodingState encState; /* Holds intermediate state during translations
+ * of data that cross buffer boundaries. */
+ int encFlags; /* Encoding translation state flags. */
+ Tcl_DString buf; /* Buffer to hold translation data. */
+ struct TkSelRetrievalInfo *nextPtr;
+ /* Next in list of all pending selection
+ * retrievals. NULL means end of list. */
+} TkSelRetrievalInfo;
+
+/*
+ * The clipboard contains a list of buffers of various types and formats. All
+ * of the buffers of a given type will be returned in sequence when the
+ * CLIPBOARD selection is retrieved. All buffers of a given type on the same
+ * clipboard must have the same format. The TkClipboardTarget structure is
+ * used to record the information about a chain of buffers of the same type.
+ */
+
+typedef struct TkClipboardBuffer {
+ char *buffer; /* Null terminated data buffer. */
+ long length; /* Length of string in buffer. */
+ struct TkClipboardBuffer *nextPtr;
+ /* Next in list of buffers. NULL means end of
+ * list . */
+} TkClipboardBuffer;
+
+typedef struct TkClipboardTarget {
+ Atom type; /* Type conversion supported. */
+ Atom format; /* Representation used for data. */
+ TkClipboardBuffer *firstBufferPtr;
+ /* First in list of data buffers. */
+ TkClipboardBuffer *lastBufferPtr;
+ /* Last in list of clipboard buffers. Used to
+ * speed up appends. */
+ struct TkClipboardTarget *nextPtr;
+ /* Next in list of targets on clipboard. NULL
+ * means end of list. */
+} TkClipboardTarget;
+
+/*
+ * It is possible for a Tk_SelectionProc to delete the handler that it
+ * represents. If this happens, the code that is retrieving the selection
+ * needs to know about it so it doesn't use the now-defunct handler structure.
+ * One structure of the following form is created for each retrieval in
+ * progress, so that the retriever can find out if its handler is deleted. All
+ * of the pending retrievals (if there are more than one) are linked into a
+ * list.
+ */
+
+typedef struct TkSelInProgress {
+ TkSelHandler *selPtr; /* Handler being executed. If this handler is
+ * deleted, the field is set to NULL. */
+ struct TkSelInProgress *nextPtr;
+ /* Next higher nested search. */
+} TkSelInProgress;
+
+/*
+ * Chunk size for retrieving selection. It's defined both in words and in
+ * bytes; the word size is used to allocate buffer space that's guaranteed to
+ * be word-aligned and that has an extra character for the terminating NULL.
+ */
+
+#define TK_SEL_BYTES_AT_ONCE 4000
+#define TK_SEL_WORDS_AT_ONCE 1001
+
+/*
+ * Declarations for procedures that are used by the selection-related files
+ * but shouldn't be used anywhere else in Tk (or by Tk clients):
+ */
+
+MODULE_SCOPE TkSelInProgress *TkSelGetInProgress(void);
+MODULE_SCOPE void TkSelSetInProgress(TkSelInProgress *pendingPtr);
+MODULE_SCOPE void TkSelClearSelection(Tk_Window tkwin, XEvent *eventPtr);
+MODULE_SCOPE int TkSelDefaultSelection(TkSelectionInfo *infoPtr,
+ Atom target, char *buffer, int maxBytes,
+ Atom *typePtr);
+#ifndef TkSelUpdateClipboard
+MODULE_SCOPE void TkSelUpdateClipboard(TkWindow *winPtr,
+ TkClipboardTarget *targetPtr);
+#endif
+
+#endif /* _TKSELECT */
diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c
new file mode 100644
index 0000000..5d08d4e
--- /dev/null
+++ b/unix/tkUnixSelect.c
@@ -0,0 +1,380 @@
+/*
+ * tkUnixSelect.c --
+ *
+ * This file contains X specific routines for manipulating selections.
+ *
+ * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution of
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#include "tk.h"
+#include "tkInt.h"
+#include "tkSelect.h"
+
+static TkSelRetrievalInfo *pendingRetrievals = NULL;
+ /* List of all retrievals currently being
+ * waited for. */
+
+/*
+ * Forward declarations for functions defined in this file:
+ */
+
+static void TkDND_SelTimeoutProc(ClientData clientData);
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkDNDSelGetSelection --
+ *
+ * Retrieve the specified selection from another process.
+ *
+ * Results:
+ * The return value is a standard Tcl return value. If an error occurs
+ * (such as no selection exists) then an error message is left in the
+ * interp's result.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TkDNDSelGetSelection(
+ Tcl_Interp *interp, /* Interpreter to use for reporting errors. */
+ Tk_Window tkwin, /* Window on whose behalf to retrieve the
+ * selection (determines display from which to
+ * retrieve). */
+ Atom selection, /* Selection to retrieve. */
+ Atom target, /* Desired form in which selection is to be
+ * returned. */
+ Time time,
+ Tk_GetSelProc *proc, /* Function to call to process the selection,
+ * once it has been retrieved. */
+ ClientData clientData) /* Arbitrary value to pass to proc. */
+{
+ TkSelRetrievalInfo retr;
+ TkWindow *winPtr = (TkWindow *) tkwin;
+ TkDisplay *dispPtr = winPtr->dispPtr;
+
+ /*
+ * The selection is owned by some other process. To retrieve it, first
+ * record information about the retrieval in progress. Use an internal
+ * window as the requestor.
+ */
+
+ retr.interp = interp;
+ if (dispPtr->clipWindow == NULL) {
+ int result;
+
+ result = TkClipInit(interp, dispPtr);
+ if (result != TCL_OK) {
+printf("1\n");
+ return result;
+ }
+ }
+ retr.winPtr = (TkWindow *) dispPtr->clipWindow;
+ retr.selection = selection;
+ retr.property = selection;
+ retr.target = target;
+ retr.proc = proc;
+ retr.clientData = clientData;
+ retr.result = -1;
+ retr.idleTime = 0;
+ retr.encFlags = TCL_ENCODING_START;
+ retr.nextPtr = pendingRetrievals;
+ Tcl_DStringInit(&retr.buf);
+ pendingRetrievals = &retr;
+
+ /*
+ * Initiate the request for the selection. Note: can't use TkCurrentTime
+ * for the time. If we do, and this application hasn't received any X
+ * events in a long time, the current time will be way in the past and
+ * could even predate the time when the selection was made; if this
+ * happens, the request will be rejected.
+ */
+
+ XConvertSelection(winPtr->display, retr.selection, retr.target,
+ retr.property, retr.winPtr->window, time);
+
+ /*
+ * Enter a loop processing X events until the selection has been retrieved
+ * and processed. If no response is received within a few seconds, then
+ * timeout.
+ */
+
+ retr.timeout = Tcl_CreateTimerHandler(1000, TkDND_SelTimeoutProc,
+ &retr);
+ while (retr.result == -1) {
+ Tcl_DoOneEvent(0);
+ }
+ Tcl_DeleteTimerHandler(retr.timeout);
+
+ /*
+ * Unregister the information about the selection retrieval in progress.
+ */
+
+ if (pendingRetrievals == &retr) {
+ pendingRetrievals = retr.nextPtr;
+ } else {
+ TkSelRetrievalInfo *retrPtr;
+
+ for (retrPtr = pendingRetrievals; retrPtr != NULL;
+ retrPtr = retrPtr->nextPtr) {
+ if (retrPtr->nextPtr == &retr) {
+ retrPtr->nextPtr = retr.nextPtr;
+ break;
+ }
+ }
+ }
+ Tcl_DStringFree(&retr.buf);
+ return retr.result;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkDND_SelTimeoutProc --
+ *
+ * This function is invoked once every second while waiting for the
+ * selection to be returned. After a while it gives up and aborts the
+ * selection retrieval.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * A new timer callback is created to call us again in another second,
+ * unless time has expired, in which case an error is recorded for the
+ * retrieval.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+TkDND_SelTimeoutProc(
+ ClientData clientData) /* Information about retrieval in progress. */
+{
+ register TkSelRetrievalInfo *retrPtr = (TkSelRetrievalInfo *) clientData;
+
+ /*
+ * Make sure that the retrieval is still in progress. Then see how long
+ * it's been since any sort of response was received from the other side.
+ */
+
+ if (retrPtr->result != -1) {
+ return;
+ }
+ retrPtr->idleTime++;
+ if (retrPtr->idleTime >= 5) {
+ /*
+ * Use a careful function to store the error message, because the
+ * result could already be partially filled in with a partial
+ * selection return.
+ */
+
+ Tcl_SetResult(retrPtr->interp, "selection owner didn't respond",
+ TCL_STATIC);
+ retrPtr->result = TCL_ERROR;
+ } else {
+ retrPtr->timeout = Tcl_CreateTimerHandler(1000, TkDND_SelTimeoutProc,
+ (ClientData) retrPtr);
+ }
+}
+
+/*
+ * The structure below is used to keep each thread's pending list separate.
+ */
+
+typedef struct ThreadSpecificData {
+ TkSelInProgress *pendingPtr;
+ /* Topmost search in progress, or NULL if
+ * none. */
+} ThreadSpecificData;
+static Tcl_ThreadDataKey dataKey;
+
+int
+TkSelDefaultSelection(
+ TkSelectionInfo *infoPtr, /* Info about selection being retrieved. */
+ Atom target, /* Desired form of selection. */
+ char *buffer, /* Place to put selection characters. */
+ int maxBytes, /* Maximum # of bytes to store at buffer. */
+ Atom *typePtr) /* Store here the type of the selection, for
+ * use in converting to proper X format. */
+{
+ register TkWindow *winPtr = (TkWindow *) infoPtr->owner;
+ TkDisplay *dispPtr = winPtr->dispPtr;
+
+ if (target == dispPtr->timestampAtom) {
+ if (maxBytes < 20) {
+ return -1;
+ }
+ sprintf(buffer, "0x%x", (unsigned int) infoPtr->time);
+ *typePtr = XA_INTEGER;
+ return strlen(buffer);
+ }
+
+ if (target == dispPtr->targetsAtom) {
+ register TkSelHandler *selPtr;
+ int length;
+ Tcl_DString ds;
+
+ if (maxBytes < 50) {
+ return -1;
+ }
+ Tcl_DStringInit(&ds);
+ Tcl_DStringAppend(&ds,
+ "MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW", -1);
+ for (selPtr = winPtr->selHandlerList; selPtr != NULL;
+ selPtr = selPtr->nextPtr) {
+ if ((selPtr->selection == infoPtr->selection)
+ && (selPtr->target != dispPtr->applicationAtom)
+ && (selPtr->target != dispPtr->windowAtom)) {
+ const char *atomString = Tk_GetAtomName((Tk_Window) winPtr,
+ selPtr->target);
+ Tcl_DStringAppendElement(&ds, atomString);
+ }
+ }
+ length = Tcl_DStringLength(&ds);
+ if (length >= maxBytes) {
+ Tcl_DStringFree(&ds);
+ return -1;
+ }
+ memcpy(buffer, Tcl_DStringValue(&ds), (unsigned) (1+length));
+ Tcl_DStringFree(&ds);
+ *typePtr = XA_ATOM;
+ return length;
+ }
+
+ if (target == dispPtr->applicationAtom) {
+ int length;
+ Tk_Uid name = winPtr->mainPtr->winPtr->nameUid;
+
+ length = strlen(name);
+ if (maxBytes <= length) {
+ return -1;
+ }
+ strcpy(buffer, name);
+ *typePtr = XA_STRING;
+ return length;
+ }
+
+ if (target == dispPtr->windowAtom) {
+ int length;
+ char *name = winPtr->pathName;
+
+ length = strlen(name);
+ if (maxBytes <= length) {
+ return -1;
+ }
+ strcpy(buffer, name);
+ *typePtr = XA_STRING;
+ return length;
+ }
+
+ return -1;
+}
+
+int TkDND_GetSelection(Tcl_Interp *interp, Tk_Window tkwin, Atom selection,
+ Atom target, Time time,
+ Tk_GetSelProc *proc, ClientData clientData) {
+ TkWindow *winPtr = (TkWindow *) tkwin;
+ TkDisplay *dispPtr = winPtr->dispPtr;
+ TkSelectionInfo *infoPtr;
+ ThreadSpecificData *tsdPtr =
+ Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+
+ if (dispPtr->multipleAtom == None) {
+ TkSelInit(tkwin);
+ }
+
+ /*
+ * If the selection is owned by a window managed by this process, then
+ * call the retrieval function directly, rather than going through the X
+ * server (it's dangerous to go through the X server in this case because
+ * it could result in deadlock if an INCR-style selection results).
+ */
+
+ for (infoPtr = dispPtr->selectionInfoPtr; infoPtr != NULL;
+ infoPtr = infoPtr->nextPtr) {
+ if (infoPtr->selection == selection) {
+ break;
+ }
+ }
+ if (infoPtr != NULL) {
+ register TkSelHandler *selPtr;
+ int offset, result, count;
+ char buffer[TK_SEL_BYTES_AT_ONCE+1];
+ TkSelInProgress ip;
+
+ for (selPtr = ((TkWindow *) infoPtr->owner)->selHandlerList;
+ selPtr != NULL; selPtr = selPtr->nextPtr) {
+ if (selPtr->target==target && selPtr->selection==selection) {
+ break;
+ }
+ }
+ if (selPtr == NULL) {
+ Atom type;
+
+ count = TkSelDefaultSelection(infoPtr, target, buffer,
+ TK_SEL_BYTES_AT_ONCE, &type);
+ if (count > TK_SEL_BYTES_AT_ONCE) {
+ Tcl_Panic("selection handler returned too many bytes");
+ }
+ if (count < 0) {
+ goto cantget;
+ }
+ buffer[count] = 0;
+ result = proc(clientData, interp, buffer);
+ } else {
+ offset = 0;
+ result = TCL_OK;
+ ip.selPtr = selPtr;
+ ip.nextPtr = tsdPtr->pendingPtr;
+ tsdPtr->pendingPtr = &ip;
+ while (1) {
+ count = selPtr->proc(selPtr->clientData, offset, buffer,
+ TK_SEL_BYTES_AT_ONCE);
+ if ((count < 0) || (ip.selPtr == NULL)) {
+ tsdPtr->pendingPtr = ip.nextPtr;
+ goto cantget;
+ }
+ if (count > TK_SEL_BYTES_AT_ONCE) {
+ Tcl_Panic("selection handler returned too many bytes");
+ }
+ buffer[count] = '\0';
+ result = proc(clientData, interp, buffer);
+ if ((result != TCL_OK) || (count < TK_SEL_BYTES_AT_ONCE)
+ || (ip.selPtr == NULL)) {
+ break;
+ }
+ offset += count;
+ }
+ tsdPtr->pendingPtr = ip.nextPtr;
+ }
+ return result;
+ }
+
+ /*
+ * The selection is owned by some other process.
+ */
+
+ return TkDNDSelGetSelection(interp, tkwin, selection, target, time,
+ proc, clientData);
+
+ cantget:
+ Tcl_AppendResult(interp, Tk_GetAtomName(tkwin, selection),
+ " selection doesn't exist or form \"",
+ Tk_GetAtomName(tkwin, target), "\" not defined", NULL);
+ return TCL_ERROR;
+}
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 4
+ * fill-column: 78
+ * End:
+ */