Import Tk 8.6.12
This commit is contained in:
@@ -285,7 +285,7 @@ CC_SEARCH_FLAGS = @CC_SEARCH_FLAGS@
|
||||
LD_SEARCH_FLAGS = @LD_SEARCH_FLAGS@
|
||||
|
||||
# support for embedded libraries on Darwin / Mac OS X
|
||||
DYLIB_INSTALL_DIR = ${LIB_RUNTIME_DIR}
|
||||
DYLIB_INSTALL_DIR = $(libdir)
|
||||
|
||||
# support for building the Aqua resource file
|
||||
TK_RSRC_FILE = @TK_RSRC_FILE@
|
||||
@@ -729,16 +729,16 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE}
|
||||
echo "Creating package index $(PKG_INDEX)"; \
|
||||
rm -f "$(PKG_INDEX)"; \
|
||||
(\
|
||||
echo "if {[catch {package present Tcl 8.6.0}]} return";\
|
||||
echo "if {![package vsatisfies [package provide Tcl] 8.6.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 normalize [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)]]]";\
|
||||
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 normalize [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)]]]";\
|
||||
echo "} else {";\
|
||||
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 " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll]]]";\
|
||||
echo "}";\
|
||||
fi \
|
||||
) > "$(PKG_INDEX)"; \
|
||||
@@ -904,8 +904,10 @@ Makefile: $(UNIX_DIR)/Makefile.in
|
||||
# $(SHELL) config.status
|
||||
|
||||
clean:
|
||||
rm -rf *.vfs
|
||||
rm -f *.a *.o libtk* core errs *~ \#* TAGS *.E a.out \
|
||||
errors ${WISH_EXE} $(TKTEST_EXE) lib.exp Tk *.rsrc
|
||||
errors ${WISH_EXE} $(TKTEST_EXE) lib.exp Tk *.rsrc \
|
||||
*.zip
|
||||
|
||||
distclean: clean
|
||||
rm -rf Makefile config.status config.cache config.log tkConfig.sh \
|
||||
@@ -1163,7 +1165,7 @@ tkStubInit.o: $(GENERIC_DIR)/tkStubInit.c
|
||||
# even though they will be placed in a static archive
|
||||
|
||||
tkStubLib.o: $(GENERIC_DIR)/tkStubLib.c
|
||||
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubLib.c
|
||||
$(CC) -c $(CC_SWITCHES) @CFLAGS_NOLTO@ $(GENERIC_DIR)/tkStubLib.c
|
||||
|
||||
tkUndo.o: $(GENERIC_DIR)/tkUndo.c
|
||||
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkUndo.c
|
||||
@@ -1433,7 +1435,7 @@ ttkStubInit.o: $(TTK_DIR)/ttkStubInit.c
|
||||
$(CC) -c $(CC_SWITCHES) $(TTK_DIR)/ttkStubInit.c
|
||||
|
||||
ttkStubLib.o: $(TTK_DIR)/ttkStubLib.c
|
||||
$(CC) -c $(CC_SWITCHES) $(TTK_DIR)/ttkStubLib.c
|
||||
$(CC) -c $(CC_SWITCHES) @CFLAGS_NOLTO@ $(TTK_DIR)/ttkStubLib.c
|
||||
|
||||
ttkTagSet.o: $(TTK_DIR)/ttkTagSet.c
|
||||
$(CC) -c $(CC_SWITCHES) $(TTK_DIR)/ttkTagSet.c
|
||||
|
||||
125
unix/configure
vendored
125
unix/configure
vendored
@@ -308,7 +308,7 @@ ac_includes_default="\
|
||||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCLSH_PROG BUILD_TCLSH MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR ac_ct_AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT XFT_CFLAGS XFT_LIBS UNIX_FONT_OBJS TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_YEAR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_INCLUDE_SPEC TK_BUILD_STUB_LIB_SPEC TK_BUILD_STUB_LIB_PATH TK_SRC_DIR TK_SHARED_BUILD LD_LIBRARY_PATH_VAR TK_BUILD_LIB_SPEC TCL_STUB_FLAGS XINCLUDES XLIBSW LOCALES TK_WINDOWINGSYSTEM TK_PKG_DIR TK_LIBRARY LIB_RUNTIME_DIR PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_WISH_LIBS CFBUNDLELOCALIZATIONS TK_RSRC_FILE WISH_RSRC_FILE LIB_RSRC_FILE APP_RSRC_FILE REZ REZ_FLAGS LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCLSH_PROG BUILD_TCLSH MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS SHARED_BUILD RANLIB ac_ct_RANLIB AR ac_ct_AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING CFLAGS_NOLTO LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT XFT_CFLAGS XFT_LIBS UNIX_FONT_OBJS TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_YEAR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_INCLUDE_SPEC TK_BUILD_STUB_LIB_SPEC TK_BUILD_STUB_LIB_PATH TK_SRC_DIR TK_SHARED_BUILD LD_LIBRARY_PATH_VAR TK_BUILD_LIB_SPEC TCL_STUB_FLAGS XINCLUDES XLIBSW LOCALES TK_WINDOWINGSYSTEM TK_PKG_DIR TK_LIBRARY LIB_RUNTIME_DIR PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_WISH_LIBS CFBUNDLELOCALIZATIONS TK_RSRC_FILE WISH_RSRC_FILE LIB_RSRC_FILE APP_RSRC_FILE REZ REZ_FLAGS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@@ -1338,7 +1338,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
TK_VERSION=8.6
|
||||
TK_MAJOR_VERSION=8
|
||||
TK_MINOR_VERSION=6
|
||||
TK_PATCH_LEVEL=".11"
|
||||
TK_PATCH_LEVEL=".12"
|
||||
VERSION=${TK_VERSION}
|
||||
LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
|
||||
|
||||
@@ -4036,6 +4036,7 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# The statements below define a collection of compile flags. This
|
||||
# macro depends on the value of SHARED_BUILD, and should be called
|
||||
@@ -5201,7 +5202,7 @@ fi
|
||||
fi
|
||||
|
||||
;;
|
||||
Linux*|GNU*|NetBSD-Debian)
|
||||
Linux*|GNU*|NetBSD-Debian|DragonFly-*|FreeBSD-*)
|
||||
SHLIB_CFLAGS="-fPIC"
|
||||
SHLIB_SUFFIX=".so"
|
||||
|
||||
@@ -5215,6 +5216,20 @@ fi
|
||||
DL_OBJS="tclLoadDl.o"
|
||||
DL_LIBS="-ldl"
|
||||
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
|
||||
|
||||
case $system in
|
||||
DragonFly-*|FreeBSD-*)
|
||||
if test "${TCL_THREADS}" = "1"; then
|
||||
|
||||
# The -pthread needs to go in the LDFLAGS, not LIBS
|
||||
LIBS=`echo $LIBS | sed s/-pthread//`
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
if test $doRpath = yes; then
|
||||
|
||||
CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
|
||||
@@ -5402,38 +5417,6 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
;;
|
||||
DragonFly-*|FreeBSD-*)
|
||||
# This configuration from FreeBSD Ports.
|
||||
SHLIB_CFLAGS="-fPIC"
|
||||
SHLIB_LD="${CC} -shared"
|
||||
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
|
||||
SHLIB_SUFFIX=".so"
|
||||
DL_OBJS="tclLoadDl.o"
|
||||
DL_LIBS=""
|
||||
if test $doRpath = yes; then
|
||||
|
||||
CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
|
||||
LD_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
|
||||
fi
|
||||
|
||||
if test "${TCL_THREADS}" = "1"; then
|
||||
|
||||
# The -pthread needs to go in the LDFLAGS, not LIBS
|
||||
LIBS=`echo $LIBS | sed s/-pthread//`
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
|
||||
fi
|
||||
|
||||
case $system in
|
||||
FreeBSD-3.*)
|
||||
# Version numbers are dot-stripped by system policy.
|
||||
TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
|
||||
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
|
||||
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
|
||||
TCL_LIB_VERSIONS_OK=nodots
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
Darwin-*)
|
||||
CFLAGS_OPTIMIZE="-Os"
|
||||
@@ -6603,9 +6586,11 @@ fi
|
||||
AIX-*) ;;
|
||||
BSD/OS*) ;;
|
||||
CYGWIN_*|MINGW32_*|MSYS_*) ;;
|
||||
IRIX*) ;;
|
||||
NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;;
|
||||
HP-UX*) ;;
|
||||
Darwin-*) ;;
|
||||
IRIX*) ;;
|
||||
NetBSD-*|OpenBSD-*) ;;
|
||||
OSF1-*) ;;
|
||||
SCO_SV-3.2*) ;;
|
||||
*) SHLIB_CFLAGS="-fPIC" ;;
|
||||
esac
|
||||
@@ -6761,6 +6746,67 @@ cat >>confdefs.h <<\_ACEOF
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto"
|
||||
echo "$as_me:$LINENO: checking for working -fno-lto" >&5
|
||||
echo $ECHO_N "checking for working -fno-lto... $ECHO_C" >&6
|
||||
if test "${ac_cv_nolto+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. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_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_nolto=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_nolto=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_nolto" >&5
|
||||
echo "${ECHO_T}$ac_cv_nolto" >&6
|
||||
CFLAGS=$hold_cflags
|
||||
if test "$ac_cv_nolto" = "yes" ; then
|
||||
CFLAGS_NOLTO="-fno-lto"
|
||||
else
|
||||
CFLAGS_NOLTO=""
|
||||
fi
|
||||
|
||||
# FIXME: This subst was left in only because the TCL_DL_LIBS
|
||||
# entry in tclConfig.sh uses it. It is not clear why someone
|
||||
@@ -6788,6 +6834,7 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -9323,7 +9370,7 @@ cat >>confdefs.h <<\_ACEOF
|
||||
#define MAC_OSX_TK 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit"
|
||||
LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit -framework QuartzCore"
|
||||
EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c'
|
||||
TK_WINDOWINGSYSTEM=AQUA
|
||||
if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then
|
||||
@@ -11809,6 +11856,7 @@ s,@OBJEXT@,$OBJEXT,;t t
|
||||
s,@CPP@,$CPP,;t t
|
||||
s,@EGREP@,$EGREP,;t t
|
||||
s,@TCL_THREADS@,$TCL_THREADS,;t t
|
||||
s,@SHARED_BUILD@,$SHARED_BUILD,;t t
|
||||
s,@RANLIB@,$RANLIB,;t t
|
||||
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
|
||||
s,@AR@,$AR,;t t
|
||||
@@ -11823,6 +11871,7 @@ s,@LDAIX_SRC@,$LDAIX_SRC,;t t
|
||||
s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
|
||||
s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
|
||||
s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
|
||||
s,@CFLAGS_NOLTO@,$CFLAGS_NOLTO,;t t
|
||||
s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t
|
||||
s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t
|
||||
s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t
|
||||
|
||||
@@ -17,15 +17,16 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [
|
||||
/* Undef unused package specific autoheader defines so that we can
|
||||
* include both tclConfig.h and tkConfig.h at the same time: */
|
||||
/* override */ #undef PACKAGE_NAME
|
||||
/* override */ #undef PACKAGE_STRING
|
||||
/* override */ #undef PACKAGE_TARNAME
|
||||
/* override */ #undef PACKAGE_VERSION
|
||||
/* override */ #undef PACKAGE_STRING
|
||||
#endif /* _TKCONFIG */])
|
||||
])
|
||||
|
||||
TK_VERSION=8.6
|
||||
TK_MAJOR_VERSION=8
|
||||
TK_MINOR_VERSION=6
|
||||
TK_PATCH_LEVEL=".11"
|
||||
TK_PATCH_LEVEL=".12"
|
||||
VERSION=${TK_VERSION}
|
||||
LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
|
||||
|
||||
@@ -353,7 +354,7 @@ fi
|
||||
|
||||
if test $tk_aqua = yes; then
|
||||
AC_DEFINE(MAC_OSX_TK, 1, [Are we building TkAqua?])
|
||||
LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit"
|
||||
LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit -framework QuartzCore"
|
||||
EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c'
|
||||
TK_WINDOWINGSYSTEM=AQUA
|
||||
if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then
|
||||
|
||||
343
unix/tcl.m4
343
unix/tcl.m4
@@ -28,9 +28,9 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
|
||||
# we reset no_tcl in case something fails here
|
||||
no_tcl=true
|
||||
AC_ARG_WITH(tcl,
|
||||
AC_HELP_STRING([--with-tcl],
|
||||
AS_HELP_STRING([--with-tcl],
|
||||
[directory containing tcl configuration (tclConfig.sh)]),
|
||||
with_tclconfig="${withval}")
|
||||
[with_tclconfig="${withval}"])
|
||||
AC_MSG_CHECKING([for Tcl configuration])
|
||||
AC_CACHE_VAL(ac_cv_c_tclconfig,[
|
||||
|
||||
@@ -161,9 +161,9 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
|
||||
# we reset no_tk in case something fails here
|
||||
no_tk=true
|
||||
AC_ARG_WITH(tk,
|
||||
AC_HELP_STRING([--with-tk],
|
||||
AS_HELP_STRING([--with-tk],
|
||||
[directory containing tk configuration (tkConfig.sh)]),
|
||||
with_tkconfig="${withval}")
|
||||
[with_tkconfig="${withval}"])
|
||||
AC_MSG_CHECKING([for Tk configuration])
|
||||
AC_CACHE_VAL(ac_cv_c_tkconfig,[
|
||||
|
||||
@@ -508,7 +508,7 @@ AC_DEFUN([SC_BUILD_TCLSH], [
|
||||
AC_DEFUN([SC_ENABLE_SHARED], [
|
||||
AC_MSG_CHECKING([how to build libraries])
|
||||
AC_ARG_ENABLE(shared,
|
||||
AC_HELP_STRING([--enable-shared],
|
||||
AS_HELP_STRING([--enable-shared],
|
||||
[build and link with shared libraries (default: on)]),
|
||||
[tcl_ok=$enableval], [tcl_ok=yes])
|
||||
if test "$tcl_ok" = "yes" ; then
|
||||
@@ -519,6 +519,7 @@ AC_DEFUN([SC_ENABLE_SHARED], [
|
||||
SHARED_BUILD=0
|
||||
AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?])
|
||||
fi
|
||||
AC_SUBST(SHARED_BUILD)
|
||||
])
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
@@ -542,7 +543,7 @@ AC_DEFUN([SC_ENABLE_FRAMEWORK], [
|
||||
if test "`uname -s`" = "Darwin" ; then
|
||||
AC_MSG_CHECKING([how to package libraries])
|
||||
AC_ARG_ENABLE(framework,
|
||||
AC_HELP_STRING([--enable-framework],
|
||||
AS_HELP_STRING([--enable-framework],
|
||||
[package shared libraries in MacOSX frameworks (default: off)]),
|
||||
[enable_framework=$enableval], [enable_framework=no])
|
||||
if test $enable_framework = yes; then
|
||||
@@ -589,11 +590,12 @@ AC_DEFUN([SC_ENABLE_FRAMEWORK], [
|
||||
# TCL_THREADS
|
||||
# _REENTRANT
|
||||
# _THREAD_SAFE
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([SC_ENABLE_THREADS], [
|
||||
AC_ARG_ENABLE(threads,
|
||||
AC_HELP_STRING([--enable-threads],
|
||||
AS_HELP_STRING([--enable-threads],
|
||||
[build with threads (default: on)]),
|
||||
[tcl_ok=$enableval], [tcl_ok=yes])
|
||||
|
||||
@@ -707,7 +709,7 @@ AC_DEFUN([SC_ENABLE_THREADS], [
|
||||
AC_DEFUN([SC_ENABLE_SYMBOLS], [
|
||||
AC_MSG_CHECKING([for build with symbols])
|
||||
AC_ARG_ENABLE(symbols,
|
||||
AC_HELP_STRING([--enable-symbols],
|
||||
AS_HELP_STRING([--enable-symbols],
|
||||
[build with debugging symbols (default: off)]),
|
||||
[tcl_ok=$enableval], [tcl_ok=no])
|
||||
# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
|
||||
@@ -766,7 +768,7 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [
|
||||
|
||||
AC_DEFUN([SC_ENABLE_LANGINFO], [
|
||||
AC_ARG_ENABLE(langinfo,
|
||||
AC_HELP_STRING([--enable-langinfo],
|
||||
AS_HELP_STRING([--enable-langinfo],
|
||||
[use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
|
||||
[langinfo_ok=$enableval], [langinfo_ok=yes])
|
||||
|
||||
@@ -777,8 +779,8 @@ AC_DEFUN([SC_ENABLE_LANGINFO], [
|
||||
AC_MSG_CHECKING([whether to use nl_langinfo])
|
||||
if test "$langinfo_ok" = "yes"; then
|
||||
AC_CACHE_VAL(tcl_cv_langinfo_h, [
|
||||
AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
|
||||
[tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[nl_langinfo(CODESET);]])],
|
||||
[tcl_cv_langinfo_h=yes], [tcl_cv_langinfo_h=no])])
|
||||
AC_MSG_RESULT([$tcl_cv_langinfo_h])
|
||||
if test $tcl_cv_langinfo_h = yes; then
|
||||
AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
|
||||
@@ -818,22 +820,22 @@ AC_DEFUN([SC_ENABLE_LANGINFO], [
|
||||
AC_DEFUN([SC_CONFIG_MANPAGES], [
|
||||
AC_MSG_CHECKING([whether to use symlinks for manpages])
|
||||
AC_ARG_ENABLE(man-symlinks,
|
||||
AC_HELP_STRING([--enable-man-symlinks],
|
||||
AS_HELP_STRING([--enable-man-symlinks],
|
||||
[use symlinks for the manpages (default: off)]),
|
||||
test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks",
|
||||
enableval="no")
|
||||
[test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"],
|
||||
[enableval="no"])
|
||||
AC_MSG_RESULT([$enableval])
|
||||
|
||||
AC_MSG_CHECKING([whether to compress the manpages])
|
||||
AC_ARG_ENABLE(man-compression,
|
||||
AC_HELP_STRING([--enable-man-compression=PROG],
|
||||
AS_HELP_STRING([--enable-man-compression=PROG],
|
||||
[compress the manpages with PROG (default: off)]),
|
||||
[case $enableval in
|
||||
yes) AC_MSG_ERROR([missing argument to --enable-man-compression]);;
|
||||
no) ;;
|
||||
*) MAN_FLAGS="$MAN_FLAGS --compress $enableval";;
|
||||
esac],
|
||||
enableval="no")
|
||||
[enableval="no"])
|
||||
AC_MSG_RESULT([$enableval])
|
||||
if test "$enableval" != "no"; then
|
||||
AC_MSG_CHECKING([for compressed file suffix])
|
||||
@@ -847,14 +849,14 @@ AC_DEFUN([SC_CONFIG_MANPAGES], [
|
||||
|
||||
AC_MSG_CHECKING([whether to add a package name suffix for the manpages])
|
||||
AC_ARG_ENABLE(man-suffix,
|
||||
AC_HELP_STRING([--enable-man-suffix=STRING],
|
||||
AS_HELP_STRING([--enable-man-suffix=STRING],
|
||||
[use STRING as a suffix to manpage file names (default: no, AC_PACKAGE_NAME if enabled without specifying STRING)]),
|
||||
[case $enableval in
|
||||
yes) enableval="AC_PACKAGE_NAME" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
|
||||
no) ;;
|
||||
*) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
|
||||
esac],
|
||||
enableval="no")
|
||||
[enableval="no"])
|
||||
AC_MSG_RESULT([$enableval])
|
||||
|
||||
AC_SUBST(MAN_FLAGS)
|
||||
@@ -998,7 +1000,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
|
||||
AC_MSG_CHECKING([if 64bit support is requested])
|
||||
AC_ARG_ENABLE(64bit,
|
||||
AC_HELP_STRING([--enable-64bit],
|
||||
AS_HELP_STRING([--enable-64bit],
|
||||
[enable 64bit support (default: off)]),
|
||||
[do64bit=$enableval], [do64bit=no])
|
||||
AC_MSG_RESULT([$do64bit])
|
||||
@@ -1007,7 +1009,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
|
||||
AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
|
||||
AC_ARG_ENABLE(64bit-vis,
|
||||
AC_HELP_STRING([--enable-64bit-vis],
|
||||
AS_HELP_STRING([--enable-64bit-vis],
|
||||
[enable 64bit Sparc VIS support (default: off)]),
|
||||
[do64bitVIS=$enableval], [do64bitVIS=no])
|
||||
AC_MSG_RESULT([$do64bitVIS])
|
||||
@@ -1020,10 +1022,11 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
AC_CACHE_CHECK([if compiler supports visibility "hidden"],
|
||||
tcl_cv_cc_visibility_hidden, [
|
||||
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
|
||||
AC_TRY_LINK([
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
extern __attribute__((__visibility__("hidden"))) void f(void);
|
||||
void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes,
|
||||
tcl_cv_cc_visibility_hidden=no)
|
||||
void f(void) {}]], [[f();]])],
|
||||
[tcl_cv_cc_visibility_hidden=yes],
|
||||
[tcl_cv_cc_visibility_hidden=no])
|
||||
CFLAGS=$hold_cflags])
|
||||
AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
|
||||
AC_DEFINE(MODULE_SCOPE,
|
||||
@@ -1036,7 +1039,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
|
||||
AC_MSG_CHECKING([if rpath support is requested])
|
||||
AC_ARG_ENABLE(rpath,
|
||||
AC_HELP_STRING([--disable-rpath],
|
||||
AS_HELP_STRING([--disable-rpath],
|
||||
[disable rpath support (default: on)]),
|
||||
[doRpath=$enableval], [doRpath=yes])
|
||||
AC_MSG_RESULT([$doRpath])
|
||||
@@ -1196,13 +1199,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
|
||||
AC_CACHE_CHECK(for Cygwin version of gcc,
|
||||
ac_cv_cygwin,
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#ifdef __CYGWIN__
|
||||
#error cygwin
|
||||
#endif
|
||||
], [],
|
||||
ac_cv_cygwin=no,
|
||||
ac_cv_cygwin=yes)
|
||||
]], [[]])],
|
||||
[ac_cv_cygwin=no],
|
||||
[ac_cv_cygwin=yes])
|
||||
)
|
||||
if test "$ac_cv_cygwin" = "no"; then
|
||||
AC_MSG_ERROR([${CC} is not a cygwin compiler.])
|
||||
@@ -1369,7 +1372,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
])
|
||||
])
|
||||
;;
|
||||
Linux*|GNU*|NetBSD-Debian)
|
||||
Linux*|GNU*|NetBSD-Debian|DragonFly-*|FreeBSD-*)
|
||||
SHLIB_CFLAGS="-fPIC"
|
||||
SHLIB_SUFFIX=".so"
|
||||
|
||||
@@ -1383,6 +1386,17 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
DL_OBJS="tclLoadDl.o"
|
||||
DL_LIBS="-ldl"
|
||||
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
|
||||
|
||||
case $system in
|
||||
DragonFly-*|FreeBSD-*)
|
||||
AS_IF([test "${TCL_THREADS}" = "1"], [
|
||||
# The -pthread needs to go in the LDFLAGS, not LIBS
|
||||
LIBS=`echo $LIBS | sed s/-pthread//`
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
|
||||
;;
|
||||
esac
|
||||
|
||||
AS_IF([test $doRpath = yes], [
|
||||
CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
|
||||
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
|
||||
@@ -1391,7 +1405,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
|
||||
hold_cflags=$CFLAGS
|
||||
CFLAGS="$CFLAGS -m64"
|
||||
AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[tcl_cv_cc_m64=yes],[tcl_cv_cc_m64=no])
|
||||
CFLAGS=$hold_cflags])
|
||||
AS_IF([test $tcl_cv_cc_m64 = yes], [
|
||||
CFLAGS="$CFLAGS -m64"
|
||||
@@ -1488,32 +1503,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
])
|
||||
;;
|
||||
DragonFly-*|FreeBSD-*)
|
||||
# This configuration from FreeBSD Ports.
|
||||
SHLIB_CFLAGS="-fPIC"
|
||||
SHLIB_LD="${CC} -shared"
|
||||
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$[@]"
|
||||
SHLIB_SUFFIX=".so"
|
||||
DL_OBJS="tclLoadDl.o"
|
||||
DL_LIBS=""
|
||||
AS_IF([test $doRpath = yes], [
|
||||
CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
|
||||
LD_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
|
||||
AS_IF([test "${TCL_THREADS}" = "1"], [
|
||||
# The -pthread needs to go in the LDFLAGS, not LIBS
|
||||
LIBS=`echo $LIBS | sed s/-pthread//`
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
|
||||
case $system in
|
||||
FreeBSD-3.*)
|
||||
# Version numbers are dot-stripped by system policy.
|
||||
TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
|
||||
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
|
||||
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
|
||||
TCL_LIB_VERSIONS_OK=nodots
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
Darwin-*)
|
||||
CFLAGS_OPTIMIZE="-Os"
|
||||
SHLIB_CFLAGS="-fno-common"
|
||||
@@ -1533,8 +1522,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
tcl_cv_cc_arch_ppc64, [
|
||||
hold_cflags=$CFLAGS
|
||||
CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
|
||||
AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes,
|
||||
tcl_cv_cc_arch_ppc64=no)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[tcl_cv_cc_arch_ppc64=yes],[tcl_cv_cc_arch_ppc64=no])
|
||||
CFLAGS=$hold_cflags])
|
||||
AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [
|
||||
CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
|
||||
@@ -1545,8 +1534,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
tcl_cv_cc_arch_x86_64, [
|
||||
hold_cflags=$CFLAGS
|
||||
CFLAGS="$CFLAGS -arch x86_64"
|
||||
AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes,
|
||||
tcl_cv_cc_arch_x86_64=no)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[tcl_cv_cc_arch_x86_64=yes],[tcl_cv_cc_arch_x86_64=no])
|
||||
CFLAGS=$hold_cflags])
|
||||
AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [
|
||||
CFLAGS="$CFLAGS -arch x86_64"
|
||||
@@ -1565,7 +1554,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
|
||||
hold_ldflags=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
|
||||
AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;]])],[tcl_cv_ld_single_module=yes],
|
||||
[tcl_cv_ld_single_module=no])
|
||||
LDFLAGS=$hold_ldflags])
|
||||
AS_IF([test $tcl_cv_ld_single_module = yes], [
|
||||
SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
|
||||
@@ -1578,8 +1568,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
tcl_cv_ld_search_paths_first, [
|
||||
hold_ldflags=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
|
||||
AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes,
|
||||
tcl_cv_ld_search_paths_first=no)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;]])],[tcl_cv_ld_search_paths_first=yes],
|
||||
[tcl_cv_ld_search_paths_first=no])
|
||||
LDFLAGS=$hold_ldflags])
|
||||
AS_IF([test $tcl_cv_ld_search_paths_first = yes], [
|
||||
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
|
||||
@@ -1597,7 +1587,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
PLAT_SRCS='${MAC_OSX_SRCS}'
|
||||
AC_MSG_CHECKING([whether to use CoreFoundation])
|
||||
AC_ARG_ENABLE(corefoundation,
|
||||
AC_HELP_STRING([--enable-corefoundation],
|
||||
AS_HELP_STRING([--enable-corefoundation],
|
||||
[use CoreFoundation API on MacOSX (default: on)]),
|
||||
[tcl_corefoundation=$enableval], [tcl_corefoundation=yes])
|
||||
AC_MSG_RESULT([$tcl_corefoundation])
|
||||
@@ -1614,10 +1604,10 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
|
||||
done])
|
||||
LIBS="$LIBS -framework CoreFoundation"
|
||||
AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
|
||||
[CFBundleRef b = CFBundleGetMainBundle();],
|
||||
tcl_cv_lib_corefoundation=yes,
|
||||
tcl_cv_lib_corefoundation=no)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <CoreFoundation/CoreFoundation.h>]],
|
||||
[[CFBundleRef b = CFBundleGetMainBundle();]])],
|
||||
[tcl_cv_lib_corefoundation=yes],
|
||||
[tcl_cv_lib_corefoundation=no])
|
||||
AS_IF([test "$fat_32_64" = yes], [
|
||||
for v in CFLAGS CPPFLAGS LDFLAGS; do
|
||||
eval $v'="$hold_'$v'"'
|
||||
@@ -1634,10 +1624,10 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
for v in CFLAGS CPPFLAGS LDFLAGS; do
|
||||
eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
|
||||
done
|
||||
AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
|
||||
[CFBundleRef b = CFBundleGetMainBundle();],
|
||||
tcl_cv_lib_corefoundation_64=yes,
|
||||
tcl_cv_lib_corefoundation_64=no)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <CoreFoundation/CoreFoundation.h>]],
|
||||
[[CFBundleRef b = CFBundleGetMainBundle();]])],
|
||||
[tcl_cv_lib_corefoundation_64=yes],
|
||||
[tcl_cv_lib_corefoundation_64=no])
|
||||
for v in CFLAGS CPPFLAGS LDFLAGS; do
|
||||
eval $v'="$hold_'$v'"'
|
||||
done])
|
||||
@@ -1924,7 +1914,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
|
||||
hold_ldflags=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-Bexport"
|
||||
AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;]])],[tcl_cv_ld_Bexport=yes],[tcl_cv_ld_Bexport=no])
|
||||
LDFLAGS=$hold_ldflags])
|
||||
AS_IF([test $tcl_cv_ld_Bexport = yes], [
|
||||
LDFLAGS="$LDFLAGS -Wl,-Bexport"
|
||||
@@ -1951,7 +1941,7 @@ dnl # preprocessing tests use only CPPFLAGS.
|
||||
# Step 4: disable dynamic loading if requested via a command-line switch.
|
||||
|
||||
AC_ARG_ENABLE(load,
|
||||
AC_HELP_STRING([--enable-load],
|
||||
AS_HELP_STRING([--enable-load],
|
||||
[allow dynamic loading and "load" command (default: on)]),
|
||||
[tcl_ok=$enableval], [tcl_ok=yes])
|
||||
AS_IF([test "$tcl_ok" = no], [DL_OBJS=""])
|
||||
@@ -1979,9 +1969,11 @@ dnl # preprocessing tests use only CPPFLAGS.
|
||||
AIX-*) ;;
|
||||
BSD/OS*) ;;
|
||||
CYGWIN_*|MINGW32_*|MSYS_*) ;;
|
||||
IRIX*) ;;
|
||||
NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;;
|
||||
HP-UX*) ;;
|
||||
Darwin-*) ;;
|
||||
IRIX*) ;;
|
||||
NetBSD-*|OpenBSD-*) ;;
|
||||
OSF1-*) ;;
|
||||
SCO_SV-3.2*) ;;
|
||||
*) SHLIB_CFLAGS="-fPIC" ;;
|
||||
esac])
|
||||
@@ -2038,18 +2030,30 @@ dnl # preprocessing tests use only CPPFLAGS.
|
||||
|
||||
AC_CACHE_CHECK(for cast to union support,
|
||||
tcl_cv_cast_to_union,
|
||||
AC_TRY_COMPILE([],
|
||||
[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
|
||||
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)
|
||||
]])],
|
||||
[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
|
||||
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto"
|
||||
AC_CACHE_CHECK(for working -fno-lto,
|
||||
ac_cv_nolto,
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||
[ac_cv_nolto=yes],
|
||||
[ac_cv_nolto=no])
|
||||
)
|
||||
CFLAGS=$hold_cflags
|
||||
if test "$ac_cv_nolto" = "yes" ; then
|
||||
CFLAGS_NOLTO="-fno-lto"
|
||||
else
|
||||
CFLAGS_NOLTO=""
|
||||
fi
|
||||
|
||||
# FIXME: This subst was left in only because the TCL_DL_LIBS
|
||||
# entry in tclConfig.sh uses it. It is not clear why someone
|
||||
@@ -2064,6 +2068,7 @@ dnl # preprocessing tests use only CPPFLAGS.
|
||||
AC_SUBST(CFLAGS_DEBUG)
|
||||
AC_SUBST(CFLAGS_OPTIMIZE)
|
||||
AC_SUBST(CFLAGS_WARNING)
|
||||
AC_SUBST(CFLAGS_NOLTO)
|
||||
|
||||
AC_SUBST(LDFLAGS)
|
||||
AC_SUBST(LDFLAGS_DEBUG)
|
||||
@@ -2119,8 +2124,8 @@ dnl # preprocessing tests use only CPPFLAGS.
|
||||
|
||||
AC_DEFUN([SC_MISSING_POSIX_HEADERS], [
|
||||
AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [
|
||||
AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <dirent.h>], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||
#include <dirent.h>]], [[
|
||||
#ifndef _POSIX_SOURCE
|
||||
# ifdef __Lynx__
|
||||
/*
|
||||
@@ -2138,7 +2143,7 @@ d = opendir("foobar");
|
||||
entryPtr = readdir(d);
|
||||
p = entryPtr->d_name;
|
||||
closedir(d);
|
||||
], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
|
||||
]])],[tcl_cv_dirent_h=yes],[tcl_cv_dirent_h=no])])
|
||||
|
||||
if test $tcl_cv_dirent_h = no; then
|
||||
AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
|
||||
@@ -2168,7 +2173,7 @@ closedir(d);
|
||||
AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <dlfcn.h>?])])
|
||||
|
||||
# OS/390 lacks sys/param.h (and doesn't need it, by chance).
|
||||
AC_HAVE_HEADERS(sys/param.h)
|
||||
AC_CHECK_HEADERS([sys/param.h])
|
||||
])
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
@@ -2197,7 +2202,7 @@ AC_DEFUN([SC_PATH_X], [
|
||||
not_really_there=""
|
||||
if test "$no_x" = ""; then
|
||||
if test "$x_includes" = ""; then
|
||||
AC_TRY_CPP([#include <X11/Xlib.h>], , not_really_there="yes")
|
||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h>]])],[],[not_really_there="yes"])
|
||||
else
|
||||
if test ! -r $x_includes/X11/Xlib.h; then
|
||||
not_really_there="yes"
|
||||
@@ -2207,7 +2212,7 @@ AC_DEFUN([SC_PATH_X], [
|
||||
if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
|
||||
AC_MSG_CHECKING([for X11 header files])
|
||||
found_xincludes="no"
|
||||
AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
|
||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h>]])],[found_xincludes="yes"],[found_xincludes="no"])
|
||||
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
|
||||
@@ -2324,15 +2329,17 @@ AC_DEFUN([SC_TIME_HANDLER], [
|
||||
AC_CHECK_FUNCS(gmtime_r localtime_r mktime)
|
||||
|
||||
AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, [
|
||||
AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
|
||||
tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm tm; (void)tm.tm_tzadj;]])],
|
||||
[tcl_cv_member_tm_tzadj=yes],
|
||||
[tcl_cv_member_tm_tzadj=no])])
|
||||
if test $tcl_cv_member_tm_tzadj = yes ; then
|
||||
AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, [
|
||||
AC_TRY_COMPILE([#include <time.h>], [struct tm tm; (void)tm.tm_gmtoff;],
|
||||
tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm tm; (void)tm.tm_gmtoff;]])],
|
||||
[tcl_cv_member_tm_gmtoff=yes],
|
||||
[tcl_cv_member_tm_gmtoff=no])])
|
||||
if test $tcl_cv_member_tm_gmtoff = yes ; then
|
||||
AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
|
||||
fi
|
||||
@@ -2342,11 +2349,11 @@ AC_DEFUN([SC_TIME_HANDLER], [
|
||||
# (like convex) have timezone functions, etc.
|
||||
#
|
||||
AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
|
||||
AC_TRY_COMPILE([#include <time.h>],
|
||||
[extern long timezone;
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],
|
||||
[[extern long timezone;
|
||||
timezone += 1;
|
||||
exit (0);],
|
||||
tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
|
||||
exit (0);]])],
|
||||
[tcl_cv_timezone_long=yes], [tcl_cv_timezone_long=no])])
|
||||
if test $tcl_cv_timezone_long = yes ; then
|
||||
AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
|
||||
else
|
||||
@@ -2354,11 +2361,11 @@ AC_DEFUN([SC_TIME_HANDLER], [
|
||||
# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
|
||||
#
|
||||
AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [
|
||||
AC_TRY_COMPILE([#include <time.h>],
|
||||
[extern time_t timezone;
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],
|
||||
[[extern time_t timezone;
|
||||
timezone += 1;
|
||||
exit (0);],
|
||||
tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)])
|
||||
exit (0);]])],
|
||||
[tcl_cv_timezone_time=yes], [tcl_cv_timezone_time=no])])
|
||||
if test $tcl_cv_timezone_time = yes ; then
|
||||
AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
|
||||
fi
|
||||
@@ -2369,8 +2376,8 @@ AC_DEFUN([SC_TIME_HANDLER], [
|
||||
# SC_TCL_LINK_LIBS
|
||||
#
|
||||
# Search for the libraries needed to link the Tcl shell.
|
||||
# Things like the math library (-lm) and socket stuff (-lsocket vs.
|
||||
# -lnsl) are dealt with here.
|
||||
# Things like the math library (-lm), socket stuff (-lsocket vs.
|
||||
# -lnsl), zlib (-lz) and libtommath (-ltommath) are dealt with here.
|
||||
#
|
||||
# Arguments:
|
||||
# None.
|
||||
@@ -2456,11 +2463,11 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [
|
||||
|
||||
AC_DEFUN([SC_TCL_EARLY_FLAG],[
|
||||
AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
|
||||
AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
|
||||
AC_TRY_COMPILE([[#define ]$1[ 1
|
||||
]$2], $3,
|
||||
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
|
||||
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])],
|
||||
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#define ]$1[ 1
|
||||
]$2]], [[$3]])],
|
||||
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
|
||||
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)]))
|
||||
if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
|
||||
AC_DEFINE($1, 1, [Add the ]$1[ flag when building])
|
||||
tcl_flags="$tcl_flags $1"
|
||||
@@ -2507,14 +2514,14 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
|
||||
AC_CACHE_VAL(tcl_cv_type_64bit,[
|
||||
tcl_cv_type_64bit=none
|
||||
# See if the compiler knows natively about __int64
|
||||
AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
|
||||
tcl_type_64bit=__int64, tcl_type_64bit="long long")
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[__int64 value = (__int64) 0;]])],
|
||||
[tcl_type_64bit=__int64], [tcl_type_64bit="long long"])
|
||||
# See if we should use long anyway Note that we substitute in the
|
||||
# type that is our current guess for a 64-bit type inside this check
|
||||
# program, so it should be modified only carefully...
|
||||
AC_TRY_COMPILE(,[switch (0) {
|
||||
case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ;
|
||||
}],tcl_cv_type_64bit=${tcl_type_64bit})])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[switch (0) {
|
||||
case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
|
||||
}]])],[tcl_cv_type_64bit=${tcl_type_64bit}],[])])
|
||||
if test "${tcl_cv_type_64bit}" = none ; then
|
||||
AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?])
|
||||
AC_MSG_RESULT([using long])
|
||||
@@ -2525,26 +2532,26 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
|
||||
|
||||
# Now check for auxiliary declarations
|
||||
AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <dirent.h>],[struct dirent64 p;],
|
||||
tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||
#include <dirent.h>]], [[struct dirent64 p;]])],
|
||||
[tcl_cv_struct_dirent64=yes],[tcl_cv_struct_dirent64=no])])
|
||||
if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for DIR64], tcl_cv_DIR64,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <dirent.h>],[struct dirent64 *p; DIR64 d = opendir64(".");
|
||||
p = readdir64(d); rewinddir64(d); closedir64(d);],
|
||||
tcl_cv_DIR64=yes,tcl_cv_DIR64=no)])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||
#include <dirent.h>]], [[struct dirent64 *p; DIR64 d = opendir64(".");
|
||||
p = readdir64(d); rewinddir64(d); closedir64(d);]])],
|
||||
[tcl_cv_DIR64=yes], [tcl_cv_DIR64=no])])
|
||||
if test "x${tcl_cv_DIR64}" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_DIR64, 1, [Is 'DIR64' in <sys/types.h>?])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[
|
||||
AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
|
||||
],
|
||||
tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[struct stat64 p;
|
||||
]])],
|
||||
[tcl_cv_struct_stat64=yes], [tcl_cv_struct_stat64=no])])
|
||||
if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in <sys/stat.h>?])
|
||||
fi
|
||||
@@ -2552,9 +2559,9 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
|
||||
AC_CHECK_FUNCS(open64 lseek64)
|
||||
AC_MSG_CHECKING([for off64_t])
|
||||
AC_CACHE_VAL(tcl_cv_type_off64_t,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
|
||||
],
|
||||
tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>]], [[off64_t offset;
|
||||
]])],
|
||||
[tcl_cv_type_off64_t=yes], [tcl_cv_type_off64_t=no])])
|
||||
dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
|
||||
dnl functions lseek64 and open64 are defined.
|
||||
if test "x${tcl_cv_type_off64_t}" = "xyes" && \
|
||||
@@ -2587,9 +2594,9 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
|
||||
|
||||
AC_DEFUN([SC_TCL_CFG_ENCODING], [
|
||||
AC_ARG_WITH(encoding,
|
||||
AC_HELP_STRING([--with-encoding],
|
||||
AS_HELP_STRING([--with-encoding],
|
||||
[encoding for configuration values (default: iso8859-1)]),
|
||||
with_tcencoding=${withval})
|
||||
[with_tcencoding=${withval}])
|
||||
|
||||
if test x"${with_tcencoding}" != x ; then
|
||||
AC_DEFINE_UNQUOTED(TCL_CFGVAL_ENCODING,"${with_tcencoding}",
|
||||
@@ -2620,11 +2627,11 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[
|
||||
AC_CHECK_FUNC($1, tcl_ok=1, tcl_ok=0)
|
||||
if test ["$tcl_ok"] = 1; then
|
||||
AC_CACHE_CHECK([proper ]$1[ implementation], [tcl_cv_]$1[_unbroken],
|
||||
AC_TRY_RUN([[
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[[
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
int main() {]$2[}]],[tcl_cv_]$1[_unbroken]=ok,
|
||||
[tcl_cv_]$1[_unbroken]=broken,[tcl_cv_]$1[_unbroken]=unknown))
|
||||
int main() {]$2[}]]])],[tcl_cv_$1_unbroken=ok],
|
||||
[tcl_cv_$1_unbroken=broken],[tcl_cv_$1_unbroken=unknown]))
|
||||
if test ["$tcl_cv_]$1[_unbroken"] = "ok"; then
|
||||
tcl_ok=1
|
||||
else
|
||||
@@ -2669,9 +2676,9 @@ AC_DEFUN([SC_TCL_GETHOSTBYADDR_R_DECL], [AC_CHECK_DECLS(gethostbyaddr_r, [
|
||||
|
||||
AC_DEFUN([SC_TCL_GETHOSTBYADDR_R_TYPE], [AC_CHECK_FUNC(gethostbyaddr_r, [
|
||||
AC_CACHE_CHECK([for gethostbyaddr_r with 7 args], tcl_cv_api_gethostbyaddr_r_7, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <netdb.h>
|
||||
], [
|
||||
]], [[
|
||||
char *addr;
|
||||
int length;
|
||||
int type;
|
||||
@@ -2682,16 +2689,16 @@ AC_DEFUN([SC_TCL_GETHOSTBYADDR_R_TYPE], [AC_CHECK_FUNC(gethostbyaddr_r, [
|
||||
|
||||
(void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
|
||||
&h_errnop);
|
||||
], tcl_cv_api_gethostbyaddr_r_7=yes, tcl_cv_api_gethostbyaddr_r_7=no)])
|
||||
]])],[tcl_cv_api_gethostbyaddr_r_7=yes],[tcl_cv_api_gethostbyaddr_r_7=no])])
|
||||
tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETHOSTBYADDR_R_7, 1,
|
||||
[Define to 1 if gethostbyaddr_r takes 7 args.])
|
||||
else
|
||||
AC_CACHE_CHECK([for gethostbyaddr_r with 8 args], tcl_cv_api_gethostbyaddr_r_8, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <netdb.h>
|
||||
], [
|
||||
]], [[
|
||||
char *addr;
|
||||
int length;
|
||||
int type;
|
||||
@@ -2702,7 +2709,7 @@ AC_DEFUN([SC_TCL_GETHOSTBYADDR_R_TYPE], [AC_CHECK_FUNC(gethostbyaddr_r, [
|
||||
|
||||
(void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
|
||||
&resultp, &h_errnop);
|
||||
], tcl_cv_api_gethostbyaddr_r_8=yes, tcl_cv_api_gethostbyaddr_r_8=no)])
|
||||
]])],[tcl_cv_api_gethostbyaddr_r_8=yes],[tcl_cv_api_gethostbyaddr_r_8=no])])
|
||||
tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETHOSTBYADDR_R_8, 1,
|
||||
@@ -2750,9 +2757,9 @@ AC_DEFUN([SC_TCL_GETHOSTBYNAME_R_DECL], [AC_CHECK_DECLS(gethostbyname_r, [
|
||||
|
||||
AC_DEFUN([SC_TCL_GETHOSTBYNAME_R_TYPE], [AC_CHECK_FUNC(gethostbyname_r, [
|
||||
AC_CACHE_CHECK([for gethostbyname_r with 6 args], tcl_cv_api_gethostbyname_r_6, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <netdb.h>
|
||||
], [
|
||||
]], [[
|
||||
char *name;
|
||||
struct hostent *he, *res;
|
||||
char buffer[2048];
|
||||
@@ -2760,16 +2767,16 @@ AC_DEFUN([SC_TCL_GETHOSTBYNAME_R_TYPE], [AC_CHECK_FUNC(gethostbyname_r, [
|
||||
int h_errnop;
|
||||
|
||||
(void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
|
||||
], tcl_cv_api_gethostbyname_r_6=yes, tcl_cv_api_gethostbyname_r_6=no)])
|
||||
]])],[tcl_cv_api_gethostbyname_r_6=yes],[tcl_cv_api_gethostbyname_r_6=no])])
|
||||
tcl_ok=$tcl_cv_api_gethostbyname_r_6
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R_6, 1,
|
||||
[Define to 1 if gethostbyname_r takes 6 args.])
|
||||
else
|
||||
AC_CACHE_CHECK([for gethostbyname_r with 5 args], tcl_cv_api_gethostbyname_r_5, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <netdb.h>
|
||||
], [
|
||||
]], [[
|
||||
char *name;
|
||||
struct hostent *he;
|
||||
char buffer[2048];
|
||||
@@ -2777,22 +2784,22 @@ AC_DEFUN([SC_TCL_GETHOSTBYNAME_R_TYPE], [AC_CHECK_FUNC(gethostbyname_r, [
|
||||
int h_errnop;
|
||||
|
||||
(void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
|
||||
], tcl_cv_api_gethostbyname_r_5=yes, tcl_cv_api_gethostbyname_r_5=no)])
|
||||
]])],[tcl_cv_api_gethostbyname_r_5=yes],[tcl_cv_api_gethostbyname_r_5=no])])
|
||||
tcl_ok=$tcl_cv_api_gethostbyname_r_5
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R_5, 1,
|
||||
[Define to 1 if gethostbyname_r takes 5 args.])
|
||||
else
|
||||
AC_CACHE_CHECK([for gethostbyname_r with 3 args], tcl_cv_api_gethostbyname_r_3, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <netdb.h>
|
||||
], [
|
||||
]], [[
|
||||
char *name;
|
||||
struct hostent *he;
|
||||
struct hostent_data data;
|
||||
|
||||
(void) gethostbyname_r(name, he, &data);
|
||||
], tcl_cv_api_gethostbyname_r_3=yes, tcl_cv_api_gethostbyname_r_3=no)])
|
||||
]])],[tcl_cv_api_gethostbyname_r_3=yes],[tcl_cv_api_gethostbyname_r_3=no])])
|
||||
tcl_ok=$tcl_cv_api_gethostbyname_r_3
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R_3, 1,
|
||||
@@ -2826,34 +2833,34 @@ AC_DEFUN([SC_TCL_GETHOSTBYNAME_R_TYPE], [AC_CHECK_FUNC(gethostbyname_r, [
|
||||
|
||||
AC_DEFUN([SC_TCL_GETPWUID_R], [AC_CHECK_FUNC(getpwuid_r, [
|
||||
AC_CACHE_CHECK([for getpwuid_r with 5 args], tcl_cv_api_getpwuid_r_5, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
], [
|
||||
]], [[
|
||||
uid_t uid;
|
||||
struct passwd pw, *pwp;
|
||||
char buf[512];
|
||||
int buflen = 512;
|
||||
|
||||
(void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
|
||||
], tcl_cv_api_getpwuid_r_5=yes, tcl_cv_api_getpwuid_r_5=no)])
|
||||
]])],[tcl_cv_api_getpwuid_r_5=yes],[tcl_cv_api_getpwuid_r_5=no])])
|
||||
tcl_ok=$tcl_cv_api_getpwuid_r_5
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETPWUID_R_5, 1,
|
||||
[Define to 1 if getpwuid_r takes 5 args.])
|
||||
else
|
||||
AC_CACHE_CHECK([for getpwuid_r with 4 args], tcl_cv_api_getpwuid_r_4, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
], [
|
||||
]], [[
|
||||
uid_t uid;
|
||||
struct passwd pw;
|
||||
char buf[512];
|
||||
int buflen = 512;
|
||||
|
||||
(void)getpwnam_r(uid, &pw, buf, buflen);
|
||||
], tcl_cv_api_getpwuid_r_4=yes, tcl_cv_api_getpwuid_r_4=no)])
|
||||
]])],[tcl_cv_api_getpwuid_r_4=yes],[tcl_cv_api_getpwuid_r_4=no])])
|
||||
tcl_ok=$tcl_cv_api_getpwuid_r_4
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETPWUID_R_4, 1,
|
||||
@@ -2886,34 +2893,34 @@ AC_DEFUN([SC_TCL_GETPWUID_R], [AC_CHECK_FUNC(getpwuid_r, [
|
||||
|
||||
AC_DEFUN([SC_TCL_GETPWNAM_R], [AC_CHECK_FUNC(getpwnam_r, [
|
||||
AC_CACHE_CHECK([for getpwnam_r with 5 args], tcl_cv_api_getpwnam_r_5, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
], [
|
||||
]], [[
|
||||
char *name;
|
||||
struct passwd pw, *pwp;
|
||||
char buf[512];
|
||||
int buflen = 512;
|
||||
|
||||
(void) getpwnam_r(name, &pw, buf, buflen, &pwp);
|
||||
], tcl_cv_api_getpwnam_r_5=yes, tcl_cv_api_getpwnam_r_5=no)])
|
||||
]])],[tcl_cv_api_getpwnam_r_5=yes],[tcl_cv_api_getpwnam_r_5=no])])
|
||||
tcl_ok=$tcl_cv_api_getpwnam_r_5
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETPWNAM_R_5, 1,
|
||||
[Define to 1 if getpwnam_r takes 5 args.])
|
||||
else
|
||||
AC_CACHE_CHECK([for getpwnam_r with 4 args], tcl_cv_api_getpwnam_r_4, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
], [
|
||||
]], [[
|
||||
char *name;
|
||||
struct passwd pw;
|
||||
char buf[512];
|
||||
int buflen = 512;
|
||||
|
||||
(void)getpwnam_r(name, &pw, buf, buflen);
|
||||
], tcl_cv_api_getpwnam_r_4=yes, tcl_cv_api_getpwnam_r_4=no)])
|
||||
]])],[tcl_cv_api_getpwnam_r_4=yes],[tcl_cv_api_getpwnam_r_4=no])])
|
||||
tcl_ok=$tcl_cv_api_getpwnam_r_4
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETPWNAM_R_4, 1,
|
||||
@@ -2946,34 +2953,34 @@ AC_DEFUN([SC_TCL_GETPWNAM_R], [AC_CHECK_FUNC(getpwnam_r, [
|
||||
|
||||
AC_DEFUN([SC_TCL_GETGRGID_R], [AC_CHECK_FUNC(getgrgid_r, [
|
||||
AC_CACHE_CHECK([for getgrgid_r with 5 args], tcl_cv_api_getgrgid_r_5, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <grp.h>
|
||||
], [
|
||||
]], [[
|
||||
gid_t gid;
|
||||
struct group gr, *grp;
|
||||
char buf[512];
|
||||
int buflen = 512;
|
||||
|
||||
(void) getgrgid_r(gid, &gr, buf, buflen, &grp);
|
||||
], tcl_cv_api_getgrgid_r_5=yes, tcl_cv_api_getgrgid_r_5=no)])
|
||||
]])],[tcl_cv_api_getgrgid_r_5=yes],[tcl_cv_api_getgrgid_r_5=no])])
|
||||
tcl_ok=$tcl_cv_api_getgrgid_r_5
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETGRGID_R_5, 1,
|
||||
[Define to 1 if getgrgid_r takes 5 args.])
|
||||
else
|
||||
AC_CACHE_CHECK([for getgrgid_r with 4 args], tcl_cv_api_getgrgid_r_4, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <grp.h>
|
||||
], [
|
||||
]], [[
|
||||
gid_t gid;
|
||||
struct group gr;
|
||||
char buf[512];
|
||||
int buflen = 512;
|
||||
|
||||
(void)getgrgid_r(gid, &gr, buf, buflen);
|
||||
], tcl_cv_api_getgrgid_r_4=yes, tcl_cv_api_getgrgid_r_4=no)])
|
||||
]])],[tcl_cv_api_getgrgid_r_4=yes],[tcl_cv_api_getgrgid_r_4=no])])
|
||||
tcl_ok=$tcl_cv_api_getgrgid_r_4
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETGRGID_R_4, 1,
|
||||
@@ -3006,34 +3013,34 @@ AC_DEFUN([SC_TCL_GETGRGID_R], [AC_CHECK_FUNC(getgrgid_r, [
|
||||
|
||||
AC_DEFUN([SC_TCL_GETGRNAM_R], [AC_CHECK_FUNC(getgrnam_r, [
|
||||
AC_CACHE_CHECK([for getgrnam_r with 5 args], tcl_cv_api_getgrnam_r_5, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <grp.h>
|
||||
], [
|
||||
]], [[
|
||||
char *name;
|
||||
struct group gr, *grp;
|
||||
char buf[512];
|
||||
int buflen = 512;
|
||||
|
||||
(void) getgrnam_r(name, &gr, buf, buflen, &grp);
|
||||
], tcl_cv_api_getgrnam_r_5=yes, tcl_cv_api_getgrnam_r_5=no)])
|
||||
]])],[tcl_cv_api_getgrnam_r_5=yes],[tcl_cv_api_getgrnam_r_5=no])])
|
||||
tcl_ok=$tcl_cv_api_getgrnam_r_5
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETGRNAM_R_5, 1,
|
||||
[Define to 1 if getgrnam_r takes 5 args.])
|
||||
else
|
||||
AC_CACHE_CHECK([for getgrnam_r with 4 args], tcl_cv_api_getgrnam_r_4, [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <grp.h>
|
||||
], [
|
||||
]], [[
|
||||
char *name;
|
||||
struct group gr;
|
||||
char buf[512];
|
||||
int buflen = 512;
|
||||
|
||||
(void)getgrnam_r(name, &gr, buf, buflen);
|
||||
], tcl_cv_api_getgrnam_r_4=yes, tcl_cv_api_getgrnam_r_4=no)])
|
||||
]])],[tcl_cv_api_getgrnam_r_4=yes],[tcl_cv_api_getgrnam_r_4=no])])
|
||||
tcl_ok=$tcl_cv_api_getgrnam_r_4
|
||||
if test "$tcl_ok" = yes; then
|
||||
AC_DEFINE(HAVE_GETGRNAM_R_4, 1,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Name: tk
|
||||
Summary: Tk graphical toolkit for the Tcl scripting language.
|
||||
Version: 8.6.11
|
||||
Version: 8.6.12
|
||||
Release: 2
|
||||
License: BSD
|
||||
Group: Development/Languages
|
||||
|
||||
@@ -16,12 +16,16 @@
|
||||
#undef STATIC_BUILD
|
||||
#include "tk.h"
|
||||
#include "tkPort.h"
|
||||
#if TCL_MAJOR_VERSION < 9 && TCL_MINOR_VERSION < 7
|
||||
# define Tcl_LibraryInitProc Tcl_PackageInitProc
|
||||
# define Tcl_StaticLibrary Tcl_StaticPackage
|
||||
#endif
|
||||
|
||||
#ifdef TK_TEST
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern Tcl_PackageInitProc Tktest_Init;
|
||||
extern Tcl_LibraryInitProc Tktest_Init;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -120,12 +124,11 @@ Tcl_AppInit(
|
||||
if (Tk_Init(interp) == TCL_ERROR) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_StaticPackage(interp, "Tk", Tk_Init, Tk_SafeInit);
|
||||
Tcl_StaticLibrary(interp, "Tk", Tk_Init, Tk_SafeInit);
|
||||
|
||||
#if defined(USE_CUSTOM_EXIT_PROC)
|
||||
if (TkpWantsExitProc()) {
|
||||
/* The cast below avoids warnings from old gcc compilers. */
|
||||
Tcl_SetExitProc((void *)TkpExitProc);
|
||||
Tcl_SetExitProc(TkpExitProc);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -133,7 +136,7 @@ Tcl_AppInit(
|
||||
if (Tktest_Init(interp) == TCL_ERROR) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_StaticPackage(interp, "Tktest", Tktest_Init, 0);
|
||||
Tcl_StaticLibrary(interp, "Tktest", Tktest_Init, 0);
|
||||
#endif /* TK_TEST */
|
||||
|
||||
/*
|
||||
|
||||
@@ -251,6 +251,7 @@
|
||||
/* Undef unused package specific autoheader defines so that we can
|
||||
* include both tclConfig.h and tkConfig.h at the same time: */
|
||||
/* override */ #undef PACKAGE_NAME
|
||||
/* override */ #undef PACKAGE_STRING
|
||||
/* override */ #undef PACKAGE_TARNAME
|
||||
/* override */ #undef PACKAGE_VERSION
|
||||
/* override */ #undef PACKAGE_STRING
|
||||
#endif /* _TKCONFIG */
|
||||
|
||||
@@ -199,8 +199,12 @@ TkpBuildRegionFromAlphaData(
|
||||
|
||||
long
|
||||
Tk_GetUserInactiveTime(
|
||||
Display *dpy) /* The display for which to query the inactive
|
||||
#ifdef HAVE_XSS
|
||||
Display *dpy) /* The display for which to query the inactive
|
||||
* time. */
|
||||
#else
|
||||
TCL_UNUSED(Display *))
|
||||
#endif /* HAVE_XSS */
|
||||
{
|
||||
long inactiveTime = -1;
|
||||
#ifdef HAVE_XSS
|
||||
|
||||
@@ -979,6 +979,7 @@ EmbedWindowDeleted(
|
||||
prevPtr = NULL;
|
||||
containerPtr = tsdPtr->firstContainerPtr;
|
||||
while (1) {
|
||||
if (containerPtr == NULL) return;
|
||||
if (containerPtr->embeddedPtr == winPtr) {
|
||||
containerPtr->wrapper = None;
|
||||
containerPtr->embeddedPtr = NULL;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifdef HAVE_XKBKEYCODETOKEYSYM
|
||||
# include <X11/XKBlib.h>
|
||||
#else
|
||||
# define XkbOpenDisplay(D,V,E,M,m,R) ((V),(E),(M),(m),(R),(NULL))
|
||||
# define XkbOpenDisplay(D,V,E,M,m,R) (((void)D),((void)V),((void)E),((void)M),((void)m),((void)R),(NULL))
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -2763,9 +2763,9 @@ GetScreenFont(
|
||||
FontAttributes *wantPtr, /* Contains desired actual pixel-size if the
|
||||
* best font was scalable. */
|
||||
char **nameList, /* Array of XLFDs. */
|
||||
int bestIdx[2], /* Indices into above array for XLFD of best
|
||||
int bestIdx[], /* Indices into above array for XLFD of best
|
||||
* bitmapped and best scalable font. */
|
||||
unsigned bestScore[2]) /* Scores of best bitmapped and best scalable
|
||||
unsigned bestScore[]) /* Scores of best bitmapped and best scalable
|
||||
* font. XLFD corresponding to lowest score
|
||||
* will be constructed. */
|
||||
{
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
#else
|
||||
# include "../compat/unistd.h"
|
||||
#endif
|
||||
#if defined(__GNUC__) && !defined(__cplusplus)
|
||||
# pragma GCC diagnostic ignored "-Wc++-compat"
|
||||
#endif
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include <X11/keysym.h>
|
||||
@@ -188,7 +191,7 @@
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
#define TkpPrintWindowId(buf,w) \
|
||||
sprintf((buf), "%#08lx", (unsigned long) (w))
|
||||
sprintf((buf), "0x%08lx", (unsigned long) (w))
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -53,6 +53,10 @@ typedef struct {
|
||||
Region clipRegion; /* The clipping region, or None. */
|
||||
} ThreadSpecificData;
|
||||
static Tcl_ThreadDataKey dataKey;
|
||||
|
||||
TCL_DECLARE_MUTEX(xftMutex);
|
||||
#define LOCK Tcl_MutexLock(&xftMutex)
|
||||
#define UNLOCK Tcl_MutexUnlock(&xftMutex)
|
||||
|
||||
/*
|
||||
* Package initialization:
|
||||
@@ -122,7 +126,9 @@ GetFont(
|
||||
if (angle != 0.0) {
|
||||
FcPatternAddMatrix(pat, FC_MATRIX, &mat);
|
||||
}
|
||||
LOCK;
|
||||
ftFont = XftFontOpenPattern(fontPtr->display, pat);
|
||||
UNLOCK;
|
||||
if (!ftFont) {
|
||||
/*
|
||||
* The previous call to XftFontOpenPattern() should not fail, but
|
||||
@@ -131,11 +137,13 @@ GetFont(
|
||||
* fallback:
|
||||
*/
|
||||
|
||||
LOCK;
|
||||
ftFont = XftFontOpen(fontPtr->display, fontPtr->screen,
|
||||
FC_FAMILY, FcTypeString, "sans",
|
||||
FC_SIZE, FcTypeDouble, 12.0,
|
||||
FC_MATRIX, FcTypeMatrix, &mat,
|
||||
NULL);
|
||||
UNLOCK;
|
||||
}
|
||||
if (!ftFont) {
|
||||
/*
|
||||
@@ -150,7 +158,9 @@ GetFont(
|
||||
fontPtr->faces[i].ft0Font = ftFont;
|
||||
} else {
|
||||
if (fontPtr->faces[i].ftFont) {
|
||||
LOCK;
|
||||
XftFontClose(fontPtr->display, fontPtr->faces[i].ftFont);
|
||||
UNLOCK;
|
||||
}
|
||||
fontPtr->faces[i].ftFont = ftFont;
|
||||
fontPtr->faces[i].angle = angle;
|
||||
@@ -409,10 +419,14 @@ FinishedWithFont(
|
||||
|
||||
for (i = 0; i < fontPtr->nfaces; i++) {
|
||||
if (fontPtr->faces[i].ftFont) {
|
||||
LOCK;
|
||||
XftFontClose(fontPtr->display, fontPtr->faces[i].ftFont);
|
||||
UNLOCK;
|
||||
}
|
||||
if (fontPtr->faces[i].ft0Font) {
|
||||
LOCK;
|
||||
XftFontClose(fontPtr->display, fontPtr->faces[i].ft0Font);
|
||||
UNLOCK;
|
||||
}
|
||||
if (fontPtr->faces[i].charset) {
|
||||
FcCharSetDestroy(fontPtr->faces[i].charset);
|
||||
@@ -751,7 +765,9 @@ Tk_MeasureChars(
|
||||
ftFont = GetFont(fontPtr, c, 0.0);
|
||||
|
||||
if (!errorFlag) {
|
||||
LOCK;
|
||||
XftTextExtents32(fontPtr->display, ftFont, &c, 1, &extents);
|
||||
UNLOCK;
|
||||
} else {
|
||||
extents.xOff = 0;
|
||||
errorFlag = 0;
|
||||
@@ -962,8 +978,10 @@ Tk_DrawChars(
|
||||
ftFont = GetFont(fontPtr, c, 0.0);
|
||||
if (ftFont) {
|
||||
specs[nspec].glyph = XftCharIndex(fontPtr->display, ftFont, c);
|
||||
LOCK;
|
||||
XftGlyphExtents(fontPtr->display, ftFont, &specs[nspec].glyph, 1,
|
||||
&metrics);
|
||||
UNLOCK;
|
||||
|
||||
/*
|
||||
* Draw glyph only when it fits entirely into 16 bit coords.
|
||||
@@ -976,8 +994,10 @@ Tk_DrawChars(
|
||||
specs[nspec].x = x;
|
||||
specs[nspec].y = y;
|
||||
if (++nspec == NUM_SPEC) {
|
||||
LOCK;
|
||||
XftDrawGlyphFontSpec(fontPtr->ftDraw, xftcolor,
|
||||
specs, nspec);
|
||||
UNLOCK;
|
||||
nspec = 0;
|
||||
}
|
||||
}
|
||||
@@ -986,7 +1006,9 @@ Tk_DrawChars(
|
||||
}
|
||||
}
|
||||
if (nspec) {
|
||||
LOCK;
|
||||
XftDrawGlyphFontSpec(fontPtr->ftDraw, xftcolor, specs, nspec);
|
||||
UNLOCK;
|
||||
}
|
||||
|
||||
doUnderlineStrikeout:
|
||||
@@ -1113,8 +1135,11 @@ TkDrawAngledChars(
|
||||
* this information... but we'll be ready when it does!
|
||||
*/
|
||||
|
||||
LOCK;
|
||||
XftGlyphExtents(fontPtr->display, currentFtFont, glyphs,
|
||||
nglyph, &metrics);
|
||||
UNLOCK;
|
||||
|
||||
/*
|
||||
* Draw glyph only when it fits entirely into 16 bit coords.
|
||||
*/
|
||||
@@ -1137,8 +1162,10 @@ TkDrawAngledChars(
|
||||
* a very small barely readable font)
|
||||
*/
|
||||
|
||||
LOCK;
|
||||
XftDrawGlyphs(fontPtr->ftDraw, xftcolor, currentFtFont,
|
||||
originX, originY, glyphs, nglyph);
|
||||
UNLOCK;
|
||||
}
|
||||
}
|
||||
originX = ROUND16(x);
|
||||
@@ -1148,8 +1175,10 @@ TkDrawAngledChars(
|
||||
glyphs[nglyph++] = XftCharIndex(fontPtr->display, ftFont, c);
|
||||
}
|
||||
if (nglyph) {
|
||||
LOCK;
|
||||
XftGlyphExtents(fontPtr->display, currentFtFont, glyphs,
|
||||
nglyph, &metrics);
|
||||
UNLOCK;
|
||||
|
||||
/*
|
||||
* Draw glyph only when it fits entirely into 16 bit coords.
|
||||
@@ -1158,8 +1187,10 @@ TkDrawAngledChars(
|
||||
if (x >= minCoord && y >= minCoord &&
|
||||
x <= maxCoord - metrics.width &&
|
||||
y <= maxCoord - metrics.height) {
|
||||
LOCK;
|
||||
XftDrawGlyphs(fontPtr->ftDraw, xftcolor, currentFtFont,
|
||||
originX, originY, glyphs, nglyph);
|
||||
UNLOCK;
|
||||
}
|
||||
}
|
||||
#else /* !XFT_HAS_FIXED_ROTATED_PLACEMENT */
|
||||
@@ -1207,8 +1238,10 @@ TkDrawAngledChars(
|
||||
ft0Font = GetFont(fontPtr, c, 0.0);
|
||||
if (ftFont && ft0Font) {
|
||||
specs[nspec].glyph = XftCharIndex(fontPtr->display, ftFont, c);
|
||||
LOCK;
|
||||
XftGlyphExtents(fontPtr->display, ft0Font, &specs[nspec].glyph, 1,
|
||||
&metrics);
|
||||
UNLOCK;
|
||||
|
||||
/*
|
||||
* Draw glyph only when it fits entirely into 16 bit coords.
|
||||
@@ -1221,8 +1254,10 @@ TkDrawAngledChars(
|
||||
specs[nspec].x = ROUND16(x);
|
||||
specs[nspec].y = ROUND16(y);
|
||||
if (++nspec == NUM_SPEC) {
|
||||
LOCK;
|
||||
XftDrawGlyphFontSpec(fontPtr->ftDraw, xftcolor,
|
||||
specs, nspec);
|
||||
UNLOCK;
|
||||
nspec = 0;
|
||||
}
|
||||
}
|
||||
@@ -1231,7 +1266,9 @@ TkDrawAngledChars(
|
||||
}
|
||||
}
|
||||
if (nspec) {
|
||||
LOCK;
|
||||
XftDrawGlyphFontSpec(fontPtr->ftDraw, xftcolor, specs, nspec);
|
||||
UNLOCK;
|
||||
}
|
||||
#endif /* XFT_HAS_FIXED_ROTATED_PLACEMENT */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user