diff options
author | dgp <dgp@users.sourceforge.net> | 2013-03-22 15:11:22 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-03-22 15:11:22 (GMT) |
commit | 799b9f787adc4145bcf9d3834de9656e0b93f04c (patch) | |
tree | 398503485909642466d8b09fb3aca93606f46b57 /unix | |
parent | c8f45542bbffa9d476314be5fdafc6dc87216641 (diff) | |
parent | 1e43f52d3f5a853bf95be27798ace31ea8ee2884 (diff) | |
download | tk-799b9f787adc4145bcf9d3834de9656e0b93f04c.zip tk-799b9f787adc4145bcf9d3834de9656e0b93f04c.tar.gz tk-799b9f787adc4145bcf9d3834de9656e0b93f04c.tar.bz2 |
merge trunk
Diffstat (limited to 'unix')
-rw-r--r-- | unix/Makefile.in | 9 | ||||
-rwxr-xr-x | unix/configure | 607 | ||||
-rw-r--r-- | unix/configure.in | 133 | ||||
-rw-r--r-- | unix/tcl.m4 | 14 | ||||
-rw-r--r-- | unix/tkUnixKey.c | 25 | ||||
-rw-r--r-- | unix/tkUnixSend.c | 6 | ||||
-rw-r--r-- | unix/tkUnixWm.c | 2 |
7 files changed, 484 insertions, 312 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in index 37fabf9..bfa4bc0 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -8,7 +8,6 @@ # Current Tk version; used in various names. TCLVERSION = @TCL_VERSION@ -TCLPATCHL = @TCL_PATCH_LEVEL@ VERSION = @TK_VERSION@ MAJOR_VERSION = @TK_MAJOR_VERSION@ MINOR_VERSION = @TK_MINOR_VERSION@ @@ -187,7 +186,7 @@ KEYSYM_FLAGS = # Tk does not used deprecated Tcl constructs so it should # compile fine with -DTCL_NO_DEPRECATED. To remove its own # set of deprecated code uncomment the second line. -NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED +NO_DEPRECATED_FLAGS = #NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED -DTK_NO_DEPRECATED # Some versions of make, like SGI's, use the following variable to @@ -703,13 +702,13 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) ${WISH_EXE} echo "if {[catch {package present Tcl 8.5.0}]} return";\ relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\ if test "x$(DLL_INSTALL_DIR)" != "x$(BIN_INSTALL_DIR)"; then \ - echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\ + echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}$(TK_LIB_FILE)]] Tk]";\ else \ echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\ echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\ - echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)] Tk]";\ + echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)]] Tk]";\ echo "} else {";\ - echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll] Tk]";\ + echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll]] Tk]";\ echo "}";\ fi \ ) > "$(PKG_INDEX)"; \ diff --git a/unix/configure b/unix/configure index 3fa4f75..93c2451 100755 --- a/unix/configure +++ b/unix/configure @@ -862,8 +862,8 @@ Optional Features: on) --enable-symbols build with debugging symbols (default: off) --enable-aqua use Aqua windowingsystem on Mac OS X (default: off) - --enable-xss use XScreenSaver for activity timer (default: on) --enable-xft use freetype/fontconfig/xft (default: on) + --enable-xss use XScreenSaver for activity timer (default: on) --enable-framework package shared libraries in MacOSX frameworks (default: off) @@ -5632,7 +5632,7 @@ fi fi ;; - Linux*) + Linux*|GNU*|NetBSD-Debian) SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" @@ -5738,21 +5738,6 @@ fi fi ;; - GNU*) - SHLIB_CFLAGS="-fPIC" - SHLIB_SUFFIX=".so" - - SHLIB_LD='${CC} -shared' - DL_OBJS="" - DL_LIBS="-ldl" - LDFLAGS="$LDFLAGS -Wl,--export-dynamic" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - if test "`uname -m`" = "alpha"; then - CFLAGS="$CFLAGS -mieee" -fi - - ;; Lynx*) SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" @@ -10115,7 +10100,7 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. + # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10123,7 +10108,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <X11/Xlib.h> +#include <X11/Intrinsic.h> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -10150,7 +10135,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then + if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi @@ -10164,18 +10149,18 @@ if test "$ac_x_libraries" = no; then # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" + LIBS="-lXt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <X11/Xlib.h> +#include <X11/Intrinsic.h> int main () { -XrmInitialize () +XtMalloc (0) ; return 0; } @@ -10641,6 +10626,374 @@ rm -f conftest.err conftest.$ac_objext \ fi #-------------------------------------------------------------------- +# Check for freetype / fontconfig / Xft support. +#-------------------------------------------------------------------- + +if test $tk_aqua = no; then + echo "$as_me:$LINENO: checking whether to use xft" >&5 +echo $ECHO_N "checking whether to use xft... $ECHO_C" >&6 + # Check whether --enable-xft or --disable-xft was given. +if test "${enable_xft+set}" = set; then + enableval="$enable_xft" + enable_xft=$enableval +else + enable_xft="default" +fi; + XFT_CFLAGS="" + XFT_LIBS="" + if test "$enable_xft" = "no" ; then + echo "$as_me:$LINENO: result: $enable_xft" >&5 +echo "${ECHO_T}$enable_xft" >&6 + else + found_xft="yes" + XFT_CFLAGS=`xft-config --cflags 2>/dev/null` || found_xft="no" + XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no" + if test "$found_xft" = "no" ; then + found_xft=yes + XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no" + XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || found_xft="no" + fi + echo "$as_me:$LINENO: result: $found_xft" >&5 +echo "${ECHO_T}$found_xft" >&6 + if test "$found_xft" = "yes" ; then + tk_oldCFlags=$CFLAGS + CFLAGS="$CFLAGS $XINCLUDES $XFT_CFLAGS" + tk_oldLibs=$LIBS + LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW" + echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5 +echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6 +if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <X11/Xlib.h> + +#include <X11/Xft/Xft.h> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_X11_Xft_Xft_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_X11_Xft_Xft_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6 +if test $ac_cv_header_X11_Xft_Xft_h = yes; then + : +else + + found_xft=no + +fi + + + CFLAGS=$tk_oldCFlags + LIBS=$tk_oldLibs + fi + if test "$found_xft" = "yes" ; then + tk_oldCFlags=$CFLAGS + CFLAGS="$CFLAGS $XINCLUDES $XFT_CFLAGS" + tk_oldLibs=$LIBS + LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW" + +echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5 +echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6 +if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXft $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XftFontOpen (); +int +main () +{ +XftFontOpen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_Xft_XftFontOpen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_Xft_XftFontOpen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5 +echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6 +if test $ac_cv_lib_Xft_XftFontOpen = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXFT 1 +_ACEOF + + LIBS="-lXft $LIBS" + +else + + found_xft=no + +fi + + CFLAGS=$tk_oldCFlags + LIBS=$tk_oldLibs + fi + if test "$found_xft" = "no" ; then + if test "$enable_xft" = "yes" ; then + { echo "$as_me:$LINENO: WARNING: Can't find xft configuration, or xft is unusable" >&5 +echo "$as_me: WARNING: Can't find xft configuration, or xft is unusable" >&2;} + fi + enable_xft=no + XFT_CFLAGS="" + XFT_LIBS="" + else + enable_xft=yes + fi + fi + if test $enable_xft = "yes" ; then + UNIX_FONT_OBJS=tkUnixRFont.o + +cat >>confdefs.h <<\_ACEOF +#define HAVE_XFT 1 +_ACEOF + + else + UNIX_FONT_OBJS=tkUnixFont.o + fi + + + +fi + +#-------------------------------------------------------------------- +# Check for XkbKeycodeToKeysym. +#-------------------------------------------------------------------- + +if test $tk_aqua = no; then + tk_oldCFlags=$CFLAGS + tk_oldLibs=$LIBS + CFLAGS="$CFLAGS $XINCLUDES" + LIBS="$LIBS $XLIBSW" + echo "$as_me:$LINENO: checking for X11/XKBlib.h" >&5 +echo $ECHO_N "checking for X11/XKBlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_X11_XKBlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <X11/Xlib.h> + +#include <X11/XKBlib.h> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_X11_XKBlib_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_X11_XKBlib_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_X11_XKBlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_XKBlib_h" >&6 +if test $ac_cv_header_X11_XKBlib_h = yes; then + + xkblib_header_found=yes + +else + + xkblib_header_found=no + +fi + + + if test $xkblib_header_found = "yes" ; then + echo "$as_me:$LINENO: checking for XkbKeycodeToKeysym in -lX11" >&5 +echo $ECHO_N "checking for XkbKeycodeToKeysym in -lX11... $ECHO_C" >&6 +if test "${ac_cv_lib_X11_XkbKeycodeToKeysym+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lX11 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XkbKeycodeToKeysym (); +int +main () +{ +XkbKeycodeToKeysym (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_X11_XkbKeycodeToKeysym=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_X11_XkbKeycodeToKeysym=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XkbKeycodeToKeysym" >&5 +echo "${ECHO_T}$ac_cv_lib_X11_XkbKeycodeToKeysym" >&6 +if test $ac_cv_lib_X11_XkbKeycodeToKeysym = yes; then + + xkbkeycodetokeysym_found=yes + +else + + xkbkeycodetokeysym_found=no + +fi + + else + xkbkeycodetokeysym_found=no + fi + if test $xkbkeycodetokeysym_found = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_XKBKEYCODETOKEYSYM 1 +_ACEOF + + fi + CFLAGS=$tk_oldCFlags + LIBS=$tk_oldLibs +fi + +#-------------------------------------------------------------------- +# XXX Do this last. +# It might modify XLIBSW which could affect other tests. +# # Check whether the header and library for the XScreenSaver # extension are available, and set HAVE_XSS if so. # XScreenSaver is needed for Tk_GetUserInactiveTime(). @@ -10984,214 +11337,6 @@ _ACEOF fi #-------------------------------------------------------------------- -# Check for freetype / fontconfig / Xft support. -#-------------------------------------------------------------------- - -if test $tk_aqua = no; then - echo "$as_me:$LINENO: checking whether to use xft" >&5 -echo $ECHO_N "checking whether to use xft... $ECHO_C" >&6 - # Check whether --enable-xft or --disable-xft was given. -if test "${enable_xft+set}" = set; then - enableval="$enable_xft" - enable_xft=$enableval -else - enable_xft="default" -fi; - XFT_CFLAGS="" - XFT_LIBS="" - if test "$enable_xft" = "no" ; then - echo "$as_me:$LINENO: result: $enable_xft" >&5 -echo "${ECHO_T}$enable_xft" >&6 - else - found_xft="yes" - XFT_CFLAGS=`xft-config --cflags 2>/dev/null` || found_xft="no" - XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no" - if test "$found_xft" = "no" ; then - found_xft=yes - XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no" - XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || found_xft="no" - fi - echo "$as_me:$LINENO: result: $found_xft" >&5 -echo "${ECHO_T}$found_xft" >&6 - if test "$found_xft" = "yes" ; then - tk_oldCFlags=$CFLAGS - CFLAGS="$CFLAGS $XINCLUDES $XFT_CFLAGS" - tk_oldLibs=$LIBS - LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW" - echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5 -echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6 -if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <X11/Xlib.h> - -#include <X11/Xft/Xft.h> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_X11_Xft_Xft_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_X11_Xft_Xft_h=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6 -if test $ac_cv_header_X11_Xft_Xft_h = yes; then - : -else - - found_xft=no - -fi - - - CFLAGS=$tk_oldCFlags - LIBS=$tk_oldLibs - fi - if test "$found_xft" = "yes" ; then - tk_oldCFlags=$CFLAGS - CFLAGS="$CFLAGS $XINCLUDES $XFT_CFLAGS" - tk_oldLibs=$LIBS - LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW" - -echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5 -echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6 -if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXft $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char XftFontOpen (); -int -main () -{ -XftFontOpen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_Xft_XftFontOpen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_Xft_XftFontOpen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5 -echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6 -if test $ac_cv_lib_Xft_XftFontOpen = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBXFT 1 -_ACEOF - - LIBS="-lXft $LIBS" - -else - - found_xft=no - -fi - - CFLAGS=$tk_oldCFlags - LIBS=$tk_oldLibs - fi - if test "$found_xft" = "no" ; then - if test "$enable_xft" = "yes" ; then - { echo "$as_me:$LINENO: WARNING: Can't find xft configuration, or xft is unusable" >&5 -echo "$as_me: WARNING: Can't find xft configuration, or xft is unusable" >&2;} - fi - enable_xft=no - XFT_CFLAGS="" - XFT_LIBS="" - else - enable_xft=yes - fi - fi - if test $enable_xft = "yes" ; then - UNIX_FONT_OBJS=tkUnixRFont.o - -cat >>confdefs.h <<\_ACEOF -#define HAVE_XFT 1 -_ACEOF - - else - UNIX_FONT_OBJS=tkUnixFont.o - fi - - - -fi - -#-------------------------------------------------------------------- # Figure out whether "char" is unsigned. If so, set a # #define for __CHAR_UNSIGNED__. #-------------------------------------------------------------------- diff --git a/unix/configure.in b/unix/configure.in index deb271e..0e7db3c 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -462,56 +462,6 @@ if test -d /usr/include/mit -a $tk_aqua = no; then fi #-------------------------------------------------------------------- -# Check whether the header and library for the XScreenSaver -# extension are available, and set HAVE_XSS if so. -# XScreenSaver is needed for Tk_GetUserInactiveTime(). -#-------------------------------------------------------------------- - -if test $tk_aqua = no; then - tk_oldCFlags=$CFLAGS - CFLAGS="$CFLAGS $XINCLUDES" - tk_oldLibs=$LIBS - LIBS="$tk_oldLibs $XLIBSW" - xss_header_found=no - xss_lib_found=no - AC_MSG_CHECKING([whether to try to use XScreenSaver]) - AC_ARG_ENABLE(xss, - AC_HELP_STRING([--enable-xss], - [use XScreenSaver for activity timer (default: on)]), - [enable_xss=$enableval], [enable_xss=yes]) - if test "$enable_xss" = "no" ; then - AC_MSG_RESULT([$enable_xss]) - else - AC_MSG_RESULT([$enable_xss]) - AC_CHECK_HEADER(X11/extensions/scrnsaver.h, [ - xss_header_found=yes - ],,[#include <X11/Xlib.h>]) - AC_CHECK_FUNC(XScreenSaverQueryInfo,,[ - AC_CHECK_LIB(Xext, XScreenSaverQueryInfo, [ - XLIBSW="$XLIBSW -lXext" - xss_lib_found=yes - ], [ - AC_CHECK_LIB(Xss, XScreenSaverQueryInfo, [ - if test "$tcl_cv_ld_weak_l" = yes; then - # On Darwin, weak link libXss if possible, - # as it is only available on Tiger or later. - XLIBSW="$XLIBSW -Wl,-weak-lXss -lXext" - else - XLIBSW="$XLIBSW -lXss -lXext" - fi - xss_lib_found=yes - ],, -lXext) - ]) - ]) - fi - if test $enable_xss = yes -a $xss_lib_found = yes -a $xss_header_found = yes; then - AC_DEFINE(HAVE_XSS, 1, [Is XScreenSaver available?]) - fi - CFLAGS=$tk_oldCFlags - LIBS=$tk_oldLibs -fi - -#-------------------------------------------------------------------- # Check for freetype / fontconfig / Xft support. #-------------------------------------------------------------------- @@ -585,6 +535,89 @@ if test $tk_aqua = no; then fi #-------------------------------------------------------------------- +# Check for XkbKeycodeToKeysym. +#-------------------------------------------------------------------- + +if test $tk_aqua = no; then + tk_oldCFlags=$CFLAGS + tk_oldLibs=$LIBS + CFLAGS="$CFLAGS $XINCLUDES" + LIBS="$LIBS $XLIBSW" + AC_CHECK_HEADER(X11/XKBlib.h, [ + xkblib_header_found=yes + ], [ + xkblib_header_found=no + ], [#include <X11/Xlib.h>]) + if test $xkblib_header_found = "yes" ; then + AC_CHECK_LIB(X11, XkbKeycodeToKeysym, [ + xkbkeycodetokeysym_found=yes + ], [ + xkbkeycodetokeysym_found=no + ]) + else + xkbkeycodetokeysym_found=no + fi + if test $xkbkeycodetokeysym_found = "yes" ; then + AC_DEFINE(HAVE_XKBKEYCODETOKEYSYM, 1, [Do we have XkbKeycodeToKeysym?]) + fi + CFLAGS=$tk_oldCFlags + LIBS=$tk_oldLibs +fi + +#-------------------------------------------------------------------- +# XXX Do this last. +# It might modify XLIBSW which could affect other tests. +# +# Check whether the header and library for the XScreenSaver +# extension are available, and set HAVE_XSS if so. +# XScreenSaver is needed for Tk_GetUserInactiveTime(). +#-------------------------------------------------------------------- + +if test $tk_aqua = no; then + tk_oldCFlags=$CFLAGS + CFLAGS="$CFLAGS $XINCLUDES" + tk_oldLibs=$LIBS + LIBS="$tk_oldLibs $XLIBSW" + xss_header_found=no + xss_lib_found=no + AC_MSG_CHECKING([whether to try to use XScreenSaver]) + AC_ARG_ENABLE(xss, + AC_HELP_STRING([--enable-xss], + [use XScreenSaver for activity timer (default: on)]), + [enable_xss=$enableval], [enable_xss=yes]) + if test "$enable_xss" = "no" ; then + AC_MSG_RESULT([$enable_xss]) + else + AC_MSG_RESULT([$enable_xss]) + AC_CHECK_HEADER(X11/extensions/scrnsaver.h, [ + xss_header_found=yes + ],,[#include <X11/Xlib.h>]) + AC_CHECK_FUNC(XScreenSaverQueryInfo,,[ + AC_CHECK_LIB(Xext, XScreenSaverQueryInfo, [ + XLIBSW="$XLIBSW -lXext" + xss_lib_found=yes + ], [ + AC_CHECK_LIB(Xss, XScreenSaverQueryInfo, [ + if test "$tcl_cv_ld_weak_l" = yes; then + # On Darwin, weak link libXss if possible, + # as it is only available on Tiger or later. + XLIBSW="$XLIBSW -Wl,-weak-lXss -lXext" + else + XLIBSW="$XLIBSW -lXss -lXext" + fi + xss_lib_found=yes + ],, -lXext) + ]) + ]) + fi + if test $enable_xss = yes -a $xss_lib_found = yes -a $xss_header_found = yes; then + AC_DEFINE(HAVE_XSS, 1, [Is XScreenSaver available?]) + fi + CFLAGS=$tk_oldCFlags + LIBS=$tk_oldLibs +fi + +#-------------------------------------------------------------------- # Figure out whether "char" is unsigned. If so, set a # #define for __CHAR_UNSIGNED__. #-------------------------------------------------------------------- diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 3974753..668fa2f 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1410,7 +1410,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ ]) ]) ;; - Linux*) + Linux*|GNU*|NetBSD-Debian) SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" @@ -1448,18 +1448,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"]) ;; - GNU*) - SHLIB_CFLAGS="-fPIC" - SHLIB_SUFFIX=".so" - - SHLIB_LD='${CC} -shared' - DL_OBJS="" - DL_LIBS="-ldl" - LDFLAGS="$LDFLAGS -Wl,--export-dynamic" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"]) - ;; Lynx*) SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index b7fc97f..a730001 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -11,7 +11,12 @@ */ #include "tkInt.h" -#include <X11/XKBlib.h> + +#ifdef HAVE_XKBKEYCODETOKEYSYM +# include <X11/XKBlib.h> +#else +# define XkbKeycodeToKeysym(D,K,G,L) XKeycodeToKeysym(D,K,L) +#endif /* * Prototypes for local functions defined in this file: @@ -280,6 +285,15 @@ TkpGetKeySym( int index; TkKeyEvent* kePtr = (TkKeyEvent*) eventPtr; + /* + * Refresh the mapping information if it's stale. This must happen before + * we do any input method processing. [Bug 3599312] + */ + + if (dispPtr->bindInfoStale) { + TkpInitKeymapInfo(dispPtr); + } + #ifdef TK_USE_INPUT_METHODS /* * If input methods are active, we may already have determined a keysym. @@ -292,6 +306,7 @@ TkpGetKeySym( Tcl_DString ds; TkWindow *winPtr = (TkWindow *) Tk_IdToWindow(eventPtr->xany.display, eventPtr->xany.window); + Tcl_DStringInit(&ds); (void) TkpGetString(winPtr, eventPtr, &ds); Tcl_DStringFree(&ds); @@ -303,14 +318,6 @@ TkpGetKeySym( #endif /* - * Refresh the mapping information if it's stale - */ - - if (dispPtr->bindInfoStale) { - TkpInitKeymapInfo(dispPtr); - } - - /* * Figure out which of the four slots in the keymap vector to use for this * key. Refer to Xlib documentation for more info on how this computation * works. diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index fb4cdd4..3fb745e 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -1022,7 +1022,7 @@ Tk_SendCmd( localInterp = riPtr->interp; Tcl_Preserve((ClientData) localInterp); if (firstArg == (argc-1)) { - result = Tcl_GlobalEval(localInterp, argv[firstArg]); + result = Tcl_EvalEx(localInterp, argv[firstArg], -1, TCL_EVAL_GLOBAL); } else { Tcl_DStringInit(&request); Tcl_DStringAppend(&request, argv[firstArg], -1); @@ -1030,7 +1030,7 @@ Tk_SendCmd( Tcl_DStringAppend(&request, " ", 1); Tcl_DStringAppend(&request, argv[i], -1); } - result = Tcl_GlobalEval(localInterp, Tcl_DStringValue(&request)); + result = Tcl_EvalEx(localInterp, Tcl_DStringValue(&request), -1, TCL_EVAL_GLOBAL); Tcl_DStringFree(&request); } if (interp != localInterp) { @@ -1556,7 +1556,7 @@ SendEventProc( remoteInterp = riPtr->interp; Tcl_Preserve((ClientData) remoteInterp); - result = Tcl_GlobalEval(remoteInterp, script); + result = Tcl_EvalEx(remoteInterp, script, -1, TCL_EVAL_GLOBAL); /* * The call to Tcl_Release may have released the interpreter which diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index 940cf73..d230b9f 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -6206,7 +6206,7 @@ TkWmProtocolEventProc( Tcl_Preserve((ClientData) protPtr); interp = protPtr->interp; Tcl_Preserve((ClientData) interp); - result = Tcl_GlobalEval(interp, protPtr->command); + result = Tcl_EvalEx(interp, protPtr->command, -1, TCL_EVAL_GLOBAL); if (result != TCL_OK) { Tcl_AddErrorInfo(interp, "\n (command for \""); Tcl_AddErrorInfo(interp, protocolName); |