diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2019-05-16 21:27:17 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2019-05-16 21:27:17 (GMT) |
commit | dcfcc6e1dbf1f90747815817b6a6260155006348 (patch) | |
tree | 7728f503588a26d721f4159c86dded0694f93524 /unix | |
parent | 285992e32a2df5121fca7469492f9ea2b82bfcad (diff) | |
parent | b238cea01980a48d55ed642fcb9bb387bbee4993 (diff) | |
download | tk-dcfcc6e1dbf1f90747815817b6a6260155006348.zip tk-dcfcc6e1dbf1f90747815817b6a6260155006348.tar.gz tk-dcfcc6e1dbf1f90747815817b6a6260155006348.tar.bz2 |
merge trunk
Diffstat (limited to 'unix')
-rw-r--r-- | unix/Makefile.in | 56 | ||||
-rwxr-xr-x | unix/configure | 291 | ||||
-rw-r--r-- | unix/configure.ac | 20 | ||||
-rw-r--r-- | unix/tcl.m4 | 142 | ||||
-rw-r--r-- | unix/tk.pc.in | 1 | ||||
-rw-r--r-- | unix/tkConfig.h.in | 6 | ||||
-rw-r--r-- | unix/tkConfig.sh.in | 3 | ||||
-rw-r--r-- | unix/tkUnixDefault.h | 7 | ||||
-rw-r--r-- | unix/tkUnixRFont.c | 29 |
9 files changed, 196 insertions, 359 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in index 56c343b..d26ab98 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -95,16 +95,16 @@ HTML_INSTALL_DIR = $(INSTALL_ROOT)$(HTML_DIR) CONFIG_INSTALL_DIR = $(INSTALL_ROOT)$(libdir) # Directory in which to install the demo files: -DEMO_INSTALL_DIR = $(INSTALL_ROOT)$(TK_LIBRARY)/demos +DEMO_INSTALL_DIR = $(INSTALL_ROOT)@DEMO_DIR@ # The directory containing the Tcl sources and headers appropriate # for this version of Tk ("srcdir" will be replaced or has already # been replaced by the configure script): -TCL_GENERIC_DIR = @TCL_ACTUAL_SRC_DIR@/generic +TCL_GENERIC_DIR = @TCL_SRC_DIR@/generic # The directory containing the platform specific Tcl sources and headers # appropriate for this version of Tk: -TCL_PLATFORM_DIR = @TCL_ACTUAL_SRC_DIR@/unix +TCL_PLATFORM_DIR = @TCL_SRC_DIR@/unix # The directory containing the Tcl library archive file appropriate # for this version of Tk: @@ -310,7 +310,7 @@ GENERIC_DIR = $(TOP_DIR)/generic TTK_DIR = $(GENERIC_DIR)/ttk UNIX_DIR = $(TOP_DIR)/unix BMAP_DIR = $(TOP_DIR)/bitmaps -TOOL_DIR = @TCL_ACTUAL_SRC_DIR@/tools +TOOL_DIR = @TCL_SRC_DIR@/tools TEST_DIR = $(TOP_DIR)/tests MAC_OSX_DIR = $(TOP_DIR)/macosx XLIB_DIR = $(TOP_DIR)/xlib @@ -356,7 +356,7 @@ CANV_OBJS = tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvImg.o \ tkCanvUtil.o tkCanvWind.o tkRectOval.o tkTrig.o IMAGE_OBJS = tkImage.o tkImgBmap.o tkImgGIF.o tkImgPNG.o tkImgPPM.o \ - tkImgPhoto.o tkImgPhInstance.o tkImgListFormat.o + tkImgPhoto.o tkImgPhInstance.o tkImgListFormat.o tkImgSVGnano.o TEXT_OBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o \ tkTextMark.o tkTextTag.o tkTextWind.o @@ -369,8 +369,9 @@ GENERIC_OBJS = tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkBusy.o \ tkClipboard.o \ tkCmds.o tkColor.o tkConfig.o tkConsole.o tkCursor.o tkError.o \ tkEvent.o tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o \ - tkGrid.o tkMain.o tkObj.o tkOldConfig.o tkOption.o tkPack.o tkPlace.o \ - tkSelect.o tkStyle.o tkUndo.o tkUtil.o tkVisual.o tkWindow.o + tkGrid.o tkMain.o tkObj.o tkOldConfig.o tkOption.o tkPack.o \ + tkPkgConfig.o tkPlace.o tkSelect.o tkStyle.o tkUndo.o tkUtil.o \ + tkVisual.o tkWindow.o TTK_OBJS = \ ttkBlink.o ttkButton.o ttkCache.o ttkClamTheme.o ttkClassicTheme.o \ @@ -431,6 +432,7 @@ GENERIC_SRCS = \ $(GENERIC_DIR)/tkGrid.c $(GENERIC_DIR)/tkConsole.c \ $(GENERIC_DIR)/tkMain.c $(GENERIC_DIR)/tkOption.c \ $(GENERIC_DIR)/tkPack.c $(GENERIC_DIR)/tkPlace.c \ + $(GENERIC_DIR)/tkPkgConfig.c \ $(GENERIC_DIR)/tkSelect.c $(GENERIC_DIR)/tkStyle.c \ $(GENERIC_DIR)/tkUndo.c $(GENERIC_DIR)/tkUtil.c \ $(GENERIC_DIR)/tkVisual.c $(GENERIC_DIR)/tkWindow.c \ @@ -449,6 +451,7 @@ GENERIC_SRCS = \ $(GENERIC_DIR)/tkTrig.c $(GENERIC_DIR)/tkImage.c \ $(GENERIC_DIR)/tkImgBmap.c $(GENERIC_DIR)/tkImgGIF.c \ $(GENERIC_DIR)/tkImgPNG.c $(GENERIC_DIR)/tkImgPPM.c \ + $(GENERIC_DIR)/tkImgSVGnano.c $(GENERIC_DIR)/tkImgSVGnano.c \ $(GENERIC_DIR)/tkImgPhoto.c $(GENERIC_DIR)/tkImgPhInstance.c \ $(GENERIC_DIR)/tkImgListFormat.c $(GENERIC_DIR)/tkText.c \ $(GENERIC_DIR)/tkTextBTree.c $(GENERIC_DIR)/tkTextDisp.c \ @@ -566,7 +569,7 @@ DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget SHELL_ENV = \ @LD_LIBRARY_PATH_VAR@="`pwd`:${TCL_BIN_DIR}:$${@LD_LIBRARY_PATH_VAR@}"; \ export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY=@TCL_ACTUAL_SRC_DIR@/library; export TCL_LIBRARY; \ + TCL_LIBRARY=@TCL_SRC_DIR@/library; export TCL_LIBRARY; \ TK_LIBRARY=@TK_SRC_DIR@/library; export TK_LIBRARY; all: binaries libraries doc @@ -576,7 +579,7 @@ binaries: ${LIB_FILE} ${WISH_EXE} libraries: $(TOP_DIR)/doc/man.macros: - $(INSTALL_DATA) $(TCLDIR)/doc/man.macros $(TOP_DIR)/doc/man.macros + $(INSTALL_DATA) @TCL_SRC_DIR@/doc/man.macros $(TOP_DIR)/doc/man.macros doc: $(TOP_DIR)/doc/man.macros @@ -682,7 +685,7 @@ demo: # This target can be used to run wish inside either gdb or insight gdb: ${WISH_EXE} @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:${TCL_BIN_DIR}:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run - @echo "set env TCL_LIBRARY=@TCL_ACTUAL_SRC_DIR@/library" >> gdb.run + @echo "set env TCL_LIBRARY=@TCL_SRC_DIR@/library" >> gdb.run @echo "set env TK_LIBRARY=@TK_SRC_DIR@/library" >> gdb.run gdb ./${WISH_EXE} --command=gdb.run rm gdb.run @@ -1010,6 +1013,32 @@ tkOption.o: $(GENERIC_DIR)/tkOption.c tkPack.o: $(GENERIC_DIR)/tkPack.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPack.c +# TIP #59, embedding of configuration information into the binary library. +# +# Part of Tk's configuration information are the paths where it was installed +# and where it will look for its libraries (which can be different). We derive +# this information from the variables which can be overridden by the user. As +# every path can be configured separately we do not remember one general +# prefix/exec_prefix but all the different paths individually. + +tkPkgConfig.o: $(GENERIC_DIR)/tkPkgConfig.c + $(CC) -c $(CC_SWITCHES) \ + -DCFG_INSTALL_LIBDIR="\"$(LIB_INSTALL_DIR)\"" \ + -DCFG_INSTALL_BINDIR="\"$(BIN_INSTALL_DIR)\"" \ + -DCFG_INSTALL_SCRDIR="\"$(SCRIPT_INSTALL_DIR)\"" \ + -DCFG_INSTALL_INCDIR="\"$(INCLUDE_INSTALL_DIR)\"" \ + -DCFG_INSTALL_DOCDIR="\"$(MAN_INSTALL_DIR)\"" \ + -DCFG_INSTALL_DEMODIR="\"$(DEMO_INSTALL_DIR)\"" \ + \ + -DCFG_RUNTIME_LIBDIR="\"$(libdir)\"" \ + -DCFG_RUNTIME_BINDIR="\"$(bindir)\"" \ + -DCFG_RUNTIME_SCRDIR="\"$(TK_LIBRARY)\"" \ + -DCFG_RUNTIME_INCDIR="\"$(includedir)\"" \ + -DCFG_RUNTIME_DOCDIR="\"$(mandir)\"" \ + -DCFG_RUNTIME_DEMODIR="\"$(DEMO_INSTALL_DIR)\"" \ + \ + $(GENERIC_DIR)/tkPkgConfig.c + tkPlace.o: $(GENERIC_DIR)/tkPlace.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPlace.c @@ -1118,6 +1147,9 @@ tkImgPNG.o: $(GENERIC_DIR)/tkImgPNG.c tkImgPPM.o: $(GENERIC_DIR)/tkImgPPM.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPPM.c +tkImgSVGnano.o: $(GENERIC_DIR)/tkImgSVGnano.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgSVGnano.c + tkImgPhoto.o: $(GENERIC_DIR)/tkImgPhoto.c $(GENERIC_DIR)/tkImgPhoto.h $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPhoto.c @@ -1534,7 +1566,7 @@ DISTROOT = /tmp/dist DISTNAME = tk${VERSION}${PATCH_LEVEL} ZIPNAME = tk${MAJOR_VERSION}${MINOR_VERSION}${PATCH_LEVEL}-src.zip DISTDIR = $(DISTROOT)/$(DISTNAME) -TCLDIR = @TCL_ACTUAL_SRC_DIR@ +TCLDIR = @TCL_SRC_DIR@ DIST_INSTALL_DATA = CPPROG='cp -p' $(INSTALL) -m 644 DIST_INSTALL_SCRIPT = CPPROG='cp -p' $(INSTALL) -m 755 @@ -1691,7 +1723,7 @@ BUILD_HTML = \ $(SHELL_ENV) TCLSH="$(BUILD_TCLSH)"; else \ TCLSH="$(TCL_EXE)"; fi ;\ "$${TCLSH}" $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \ - --tk --srcdir=$(TOP_DIR) $(BUILD_HTML_FLAGS) + --srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS) # # The list of all the targets that do not correspond to real files. This stops diff --git a/unix/configure b/unix/configure index d7408c4..66b1581 100755 --- a/unix/configure +++ b/unix/configure @@ -661,6 +661,8 @@ TK_PATCH_LEVEL TK_MINOR_VERSION TK_MAJOR_VERSION TK_VERSION +TK_DEMO_DIR +DEMO_DIR UNIX_FONT_OBJS XFT_LIBS XFT_CFLAGS @@ -707,6 +709,8 @@ LDFLAGS CFLAGS CC MAN_FLAGS +BUILD_TCLSH +TCLSH_PROG TCL_STUB_LIB_SPEC TCL_STUB_LIB_FLAG TCL_STUB_LIB_FILE @@ -717,11 +721,6 @@ TCL_SRC_DIR TCL_BIN_DIR TCL_PATCH_LEVEL TCL_VERSION -TCL_ACTUAL_SRC_DIR -TCL_SOURCE_MINOR_VERSION -TCL_SOURCE_MAJOR_VERSION -BUILD_TCLSH -TCLSH_PROG target_alias host_alias build_alias @@ -741,6 +740,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -768,6 +768,7 @@ with_tcl enable_man_symlinks enable_man_compression enable_man_suffix +with_encoding enable_shared enable_64bit enable_64bit_vis @@ -829,6 +830,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1081,6 +1083,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1218,7 +1229,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1371,6 +1382,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1430,6 +1442,8 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-tcl directory containing tcl configuration (tclConfig.sh) + --with-encoding encoding for configuration values (default: + iso8859-1) --with-x use the X Window System Some influential environment variables: @@ -2291,47 +2305,6 @@ LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv" # Find and load the tclConfig.sh file #-------------------------------------------------------------------- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5 -$as_echo_n "checking for tclsh... " >&6; } - if ${ac_cv_path_tclsh+:} false; then : - $as_echo_n "(cached) " >&6 -else - - search_path=`echo ${PATH} | sed -e 's/:/ /g'` - for dir in $search_path ; do - for j in `ls -r $dir/tclsh[8-9]* 2> /dev/null` \ - `ls -r $dir/tclsh* 2> /dev/null` ; do - if test x"$ac_cv_path_tclsh" = x ; then - if test -f "$j" ; then - ac_cv_path_tclsh=$j - break - fi - fi - done - done - -fi - - - if test -f "$ac_cv_path_tclsh" ; then - TCLSH_PROG="$ac_cv_path_tclsh" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH_PROG" >&5 -$as_echo "$TCLSH_PROG" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: No tclsh avaliable" >&5 -$as_echo "No tclsh avaliable" >&6; } - fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh in Tcl build directory" >&5 -$as_echo_n "checking for tclsh in Tcl build directory... " >&6; } - BUILD_TCLSH="${TCL_BIN_DIR}"/tclsh - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_TCLSH" >&5 -$as_echo "$BUILD_TCLSH" >&6; } - - - # # Ok, lets find the tcl configuration @@ -2513,144 +2486,6 @@ $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" - TCL_ACTUAL_SRC_DIR=` <<-'EOF' "$TCLSH_PROG" - "$srcdir" "$TCL_SRC_DIR" \ - "$TCL_MAJOR_VERSION" "$TCL_MINOR_VERSION" - - proc cat fname { - set chan [open $fname] - try { - read $chan - } finally { - close $chan - } - } - - proc main {argv0 argv} { - try { - lassign $argv -> srcdir tcl_src_dir majortarget minortarget - lappend candidates $tcl_src_dir - set srcdir [file dirname [file normalize $srcdir/...]] - set topsrcdir [file dirname $srcdir] - set sources [file dirname $topsrcdir] - foreach dirname [glob -nocomplain -directory $sources *] { - if {$dirname ni $candidates} { - lappend candidates $dirname - } - } - foreach candidate $candidates { - set res [check $candidate $majortarget $minortarget] - if {$res eq {}} continue else { - puts -nonewline $res - break - } - } - set status 0 - } on error {tres topts} { - puts stderr [dict get $topts -errorinfo] - set status 1 - } - exit $status - } - - proc check {candidate majortarget minortarget} { - set tclh $candidate/generic/tcl.h - - if {![file exists $tclh]} { - return {} - } - - set version [tclhversion [cat $tclh]] - if {[llength $version]} { - lassign $version major minor - if {[package vcompare $major.$minor \ - $majortarget.$minortarget] >= 0} { - return [list $candidate $major $minor] - } - } - - return {} - } - - proc tclhversion data { - if {[regexp -line {^#define\s+_TCL} $data]} { - if {[ - regexp -line {^#define\s+TCL_VERSION\s+\"([^.])+\.([^.\"]+)} \ - $data -> major minor - ]} { - return [list $major $minor] - } - } - return {} - } - main $argv0 $argv - EOF - - ` - - if test "x${TCL_ACTUAL_SRC_DIR}" = x; then - as_fn_error $? "could not find Tcl sources" "$LINENO" 5 - else - TCL_SOURCE_MAJOR_VERSION=` <<-'EOF' "$TCLSH_PROG" - "$TCL_ACTUAL_SRC_DIR " "1" - proc main {argv0 argv} { - try { - lassign $argv -> list index - puts -nonewline [lindex $list $index] - set status 0 - } on error {tres topts} { - puts stderr [dict get $topts -errorinfo] - set status 1 - } - exit $status - } - main $argv0 $argv - EOF - ` - - - - - TCL_SOURCE_MINOR_VERSION=` <<-'EOF' "$TCLSH_PROG" - "$TCL_ACTUAL_SRC_DIR " "2" - proc main {argv0 argv} { - try { - lassign $argv -> list index - puts -nonewline [lindex $list $index] - set status 0 - } on error {tres topts} { - puts stderr [dict get $topts -errorinfo] - set status 1 - } - exit $status - } - main $argv0 $argv - EOF - ` - - - - - TCL_ACTUAL_SRC_DIR=` <<-'EOF' "$TCLSH_PROG" - "$TCL_ACTUAL_SRC_DIR " "0" - proc main {argv0 argv} { - try { - lassign $argv -> list index - puts -nonewline [lindex $list $index] - set status 0 - } on error {tres topts} { - puts stderr [dict get $topts -errorinfo] - set status 1 - } - exit $status - } - main $argv0 $argv - EOF - ` - - - - - fi - - - @@ -2676,6 +2511,49 @@ fi fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5 +$as_echo_n "checking for tclsh... " >&6; } + if ${ac_cv_path_tclsh+:} false; then : + $as_echo_n "(cached) " >&6 +else + + search_path=`echo ${PATH} | sed -e 's/:/ /g'` + for dir in $search_path ; do + for j in `ls -r $dir/tclsh[8-9]* 2> /dev/null` \ + `ls -r $dir/tclsh* 2> /dev/null` ; do + if test x"$ac_cv_path_tclsh" = x ; then + if test -f "$j" ; then + ac_cv_path_tclsh=$j + break + fi + fi + done + done + +fi + + + if test -f "$ac_cv_path_tclsh" ; then + TCLSH_PROG="$ac_cv_path_tclsh" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH_PROG" >&5 +$as_echo "$TCLSH_PROG" >&6; } + else + # It is not an error if an installed version of Tcl can't be located. + TCLSH_PROG="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: No tclsh found on PATH" >&5 +$as_echo "No tclsh found on PATH" >&6; } + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh in Tcl build directory" >&5 +$as_echo_n "checking for tclsh in Tcl build directory... " >&6; } + BUILD_TCLSH="${TCL_BIN_DIR}"/tclsh + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_TCLSH" >&5 +$as_echo "$BUILD_TCLSH" >&6; } + + + #------------------------------------------------------------------------ # Handle the --prefix=... option #------------------------------------------------------------------------ @@ -4090,6 +3968,31 @@ $as_echo "$tcl_cv_cc_pipe" >&6; } fi fi +#------------------------------------------------------------------------ +# Embedded configuration information, encoding to use for the values, TIP #59 +#------------------------------------------------------------------------ + + + +# Check whether --with-encoding was given. +if test "${with_encoding+set}" = set; then : + withval=$with_encoding; with_tcencoding=${withval} +fi + + + if test x"${with_tcencoding}" != x ; then + +cat >>confdefs.h <<_ACEOF +#define TCL_CFGVAL_ENCODING "${with_tcencoding}" +_ACEOF + + else + +$as_echo "#define TCL_CFGVAL_ENCODING \"iso8859-1\"" >>confdefs.h + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5 $as_echo_n "checking how to build libraries... " >&6; } @@ -5368,12 +5271,6 @@ fi SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" - # Don't use -prebind when building for Mac OS X 10.4 or later only: - if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \ - "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then : - - LDFLAGS="$LDFLAGS -prebind" -fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5 $as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; } @@ -8466,6 +8363,18 @@ TK_STUB_LIB_PATH="${TK_STUB_LIB_DIR}/${TK_STUB_LIB_FILE}" eval "TK_INCLUDE_SPEC=\"-I${includedir}\"" #------------------------------------------------------------------------ +# Demo dir +#------------------------------------------------------------------------ + +if test x"${DEMO_DIR}" = x; then : + DEMO_DIR='$(TK_LIBRARY)/demos' +fi +eval "TK_DEMO_DIR=\"`echo ${DEMO_DIR} | tr '()' '{}'`\"" +eval "TK_DEMO_DIR=\"`echo ${TK_DEMO_DIR} | tr '()' '{}'`\"" + + + +#------------------------------------------------------------------------ # tkConfig.sh refers to this by a different name #------------------------------------------------------------------------ diff --git a/unix/configure.ac b/unix/configure.ac index a8c403b..f12d8de 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -32,8 +32,6 @@ LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv" #-------------------------------------------------------------------- # Find and load the tclConfig.sh file #-------------------------------------------------------------------- -SC_PROG_TCLSH -SC_BUILD_TCLSH SC_PATH_TCLCONFIG SC_LOAD_TCLCONFIG @@ -49,6 +47,8 @@ Found config for Tcl ${TCL_VERSION}]) fi fi +SC_PROG_TCLSH +SC_BUILD_TCLSH #------------------------------------------------------------------------ # Handle the --prefix=... option @@ -112,6 +112,12 @@ if test -z "$no_pipe" && test -n "$GCC"; then fi fi +#------------------------------------------------------------------------ +# Embedded configuration information, encoding to use for the values, TIP #59 +#------------------------------------------------------------------------ + +SC_TCL_CFG_ENCODING + SC_ENABLE_SHARED #-------------------------------------------------------------------- @@ -773,6 +779,16 @@ TK_STUB_LIB_PATH="${TK_STUB_LIB_DIR}/${TK_STUB_LIB_FILE}" eval "TK_INCLUDE_SPEC=\"-I${includedir}\"" #------------------------------------------------------------------------ +# Demo dir +#------------------------------------------------------------------------ + +AS_IF([test x"${DEMO_DIR}" = x], [DEMO_DIR='$(TK_LIBRARY)/demos']) +eval "TK_DEMO_DIR=\"`echo ${DEMO_DIR} | tr '()' '{}'`\"" +eval "TK_DEMO_DIR=\"`echo ${TK_DEMO_DIR} | tr '()' '{}'`\"" +AC_SUBST(DEMO_DIR) +AC_SUBST(TK_DEMO_DIR) + +#------------------------------------------------------------------------ # tkConfig.sh refers to this by a different name #------------------------------------------------------------------------ diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 99f5d29..a206f26 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -336,8 +336,6 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [ eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" - SC_TCL_FIND_SOURCES() - AC_SUBST(TCL_VERSION) AC_SUBST(TCL_PATCH_LEVEL) AC_SUBST(TCL_BIN_DIR) @@ -434,134 +432,6 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [ AC_SUBST(TK_STUB_LIB_SPEC) ]) - -#------------------------------------------------------------------------ -# SC_TCL_FIND_SOURCES -# Find a directory containing Tcl sources that match the version required by -# tclConfig.sh. The sources indicated by tclConfig.sh are preferred. -# -# Arguments: -# none -# -# Results: -# Substitutes the following vars: -# TCL_SOURCE_MAJOR_VERSION -# TCL_SOURCE_MINOR_VERSION -# TCL_ACTUAL_SRC_DIR -#------------------------------------------------------------------------ - -AC_DEFUN([SC_TCL_FIND_SOURCES],[ - [TCL_ACTUAL_SRC_DIR=` <<-'EOF' "$TCLSH_PROG" - "$srcdir" "$TCL_SRC_DIR" \ - "$TCL_MAJOR_VERSION" "$TCL_MINOR_VERSION" - - proc cat fname { - set chan [open $fname] - try { - read $chan - } finally { - close $chan - } - } - - proc main {argv0 argv} { - try { - lassign $argv -> srcdir tcl_src_dir majortarget minortarget - lappend candidates $tcl_src_dir - set srcdir [file dirname [file normalize $srcdir/...]] - set topsrcdir [file dirname $srcdir] - set sources [file dirname $topsrcdir] - foreach dirname [glob -nocomplain -directory $sources *] { - if {$dirname ni $candidates} { - lappend candidates $dirname - } - } - foreach candidate $candidates { - set res [check $candidate $majortarget $minortarget] - if {$res eq {}} continue else { - puts -nonewline $res - break - } - } - set status 0 - } on error {tres topts} { - puts stderr [dict get $topts -errorinfo] - set status 1 - } - exit $status - } - - proc check {candidate majortarget minortarget} { - set tclh $candidate/generic/tcl.h - - if {![file exists $tclh]} { - return {} - } - - set version [tclhversion [cat $tclh]] - if {[llength $version]} { - lassign $version major minor - if {[package vcompare $major.$minor \ - $majortarget.$minortarget] >= 0} { - return [list $candidate $major $minor] - } - } - - return {} - } - - proc tclhversion data { - if {[regexp -line {^#define\s+_TCL} $data]} { - if {[ - regexp -line {^#define\s+TCL_VERSION\s+\"([^.])+\.([^.\"]+)} \ - $data -> major minor - ]} { - return [list $major $minor] - } - } - return {} - } - main $argv0 $argv - EOF - ] - ` - - if test "x${TCL_ACTUAL_SRC_DIR}" = x; then - AC_MSG_ERROR([could not find Tcl sources]) - else - TCL_SOURCE_MAJOR_VERSION=SC_TCL_LINDEX([$TCL_ACTUAL_SRC_DIR] ,1) - AC_SUBST(TCL_SOURCE_MAJOR_VERSION) - TCL_SOURCE_MINOR_VERSION=SC_TCL_LINDEX([$TCL_ACTUAL_SRC_DIR] ,2) - AC_SUBST(TCL_SOURCE_MINOR_VERSION) - TCL_ACTUAL_SRC_DIR=SC_TCL_LINDEX([$TCL_ACTUAL_SRC_DIR] ,0) - AC_SUBST(TCL_ACTUAL_SRC_DIR) - fi -]) - - -#------------------------------------------------------------------------ -# SC_TCL_LINDEX -#------------------------------------------------------------------------ - -AC_DEFUN([SC_TCL_LINDEX], - [[` <<-'EOF' "$TCLSH_PROG" - "$1" "$2" - proc main {argv0 argv} { - try { - lassign $argv -> list index - puts -nonewline [lindex $list $index] - set status 0 - } on error {tres topts} { - puts stderr [dict get $topts -errorinfo] - set status 1 - } - exit $status - } - main $argv0 $argv - EOF - ` - ]] - -) - #------------------------------------------------------------------------ # SC_PROG_TCLSH # Locate a tclsh shell installed on the system path. This macro @@ -603,7 +473,9 @@ AC_DEFUN([SC_PROG_TCLSH], [ TCLSH_PROG="$ac_cv_path_tclsh" AC_MSG_RESULT([$TCLSH_PROG]) else - AC_MSG_RESULT([No tclsh avaliable]) + # It is not an error if an installed version of Tcl can't be located. + TCLSH_PROG="" + AC_MSG_RESULT([No tclsh found on PATH]) fi AC_SUBST(TCLSH_PROG) ]) @@ -1587,10 +1459,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" - # Don't use -prebind when building for Mac OS X 10.4 or later only: - AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \ - "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [ - LDFLAGS="$LDFLAGS -prebind"]) LDFLAGS="$LDFLAGS -headerpad_max_install_names" AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [ @@ -3142,7 +3010,7 @@ AC_DEFUN([SC_ZIPFS_SUPPORT], [ ZIP_PROG="$ac_cv_path_zip" AC_MSG_RESULT([$ZIP_PROG]) ZIP_PROG_OPTIONS="-rq" - ZIP_PROG_VFSSEARCH="." + ZIP_PROG_VFSSEARCH="*" AC_MSG_RESULT([Found INFO Zip in environment]) # Use standard arguments for zip else @@ -3150,7 +3018,7 @@ AC_DEFUN([SC_ZIPFS_SUPPORT], [ # We can use the locally distributed minizip instead ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}" ZIP_PROG_OPTIONS="-o -r" - ZIP_PROG_VFSSEARCH="." + ZIP_PROG_VFSSEARCH="*" ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}" AC_MSG_RESULT([No zip found on PATH. Building minizip]) fi diff --git a/unix/tk.pc.in b/unix/tk.pc.in index 68f2130..f1e7acd 100644 --- a/unix/tk.pc.in +++ b/unix/tk.pc.in @@ -4,6 +4,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ +demodir=@TK_DEMO_DIR@ Name: The Tk Toolkit Description: Tk is a cross-platform graphical user interface toolkit, the standard GUI not only for Tcl, but for many other dynamic languages as well. diff --git a/unix/tkConfig.h.in b/unix/tkConfig.h.in index d598ca3..c435f7c 100644 --- a/unix/tkConfig.h.in +++ b/unix/tkConfig.h.in @@ -136,6 +136,12 @@ /* Is this a static build? */ #undef STATIC_BUILD +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* What encoding should be used for embedded configuration info? */ +#undef TCL_CFGVAL_ENCODING + /* Is this a 64-bit build? */ #undef TCL_CFG_DO64BIT diff --git a/unix/tkConfig.sh.in b/unix/tkConfig.sh.in index bb85ad0..e08861b 100644 --- a/unix/tkConfig.sh.in +++ b/unix/tkConfig.sh.in @@ -95,3 +95,6 @@ TK_BUILD_STUB_LIB_PATH='@TK_BUILD_STUB_LIB_PATH@' # Path to the Tk stub library in the install directory. TK_STUB_LIB_PATH='@TK_STUB_LIB_PATH@' + +# Top-level directory in which Tk's demo files are installed. +TK_DEMO_DIR='@TK_DEMO_DIR@' diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h index 6153d21..9941bde 100644 --- a/unix/tkUnixDefault.h +++ b/unix/tkUnixDefault.h @@ -31,8 +31,7 @@ #define ACTIVE_BG "#ececec" #define SELECT_BG "#c3c3c3" #define TROUGH "#b3b3b3" -#define CHECK_INDICATOR WHITE -#define MENU_INDICATOR BLACK +#define INDICATOR WHITE #define DISABLED "#a3a3a3" /* @@ -79,7 +78,7 @@ #define DEF_LABCHKRAD_RELIEF "flat" #define DEF_BUTTON_REPEAT_DELAY "0" #define DEF_BUTTON_REPEAT_INTERVAL "0" -#define DEF_BUTTON_SELECT_COLOR CHECK_INDICATOR +#define DEF_BUTTON_SELECT_COLOR INDICATOR #define DEF_BUTTON_SELECT_MONO BLACK #define DEF_BUTTON_SELECT_IMAGE NULL #define DEF_BUTTON_STATE "normal" @@ -289,7 +288,7 @@ #define DEF_MENU_FG BLACK #define DEF_MENU_POST_COMMAND "" #define DEF_MENU_RELIEF "raised" -#define DEF_MENU_SELECT_COLOR MENU_INDICATOR +#define DEF_MENU_SELECT_COLOR BLACK #define DEF_MENU_SELECT_MONO BLACK #define DEF_MENU_TAKE_FOCUS "0" #define DEF_MENU_TEAROFF "0" diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index 9c15369..7dcddc9 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -56,25 +56,28 @@ typedef struct ThreadSpecificData { static Tcl_ThreadDataKey dataKey; /* - * Package initialization: - * Nothing to do here except register the fact that we're using Xft in - * the TIP 59 configuration database. + *------------------------------------------------------------------------- + * + * TkpFontPkgInit -- + * + * This procedure is called when an application is created. It + * initializes all the structures that are used by the + * platform-dependant code on a per application basis. + * Note that this is called before TkpInit() ! + * + * Results: + * None. + * + * Side effects: + * None. + * + *------------------------------------------------------------------------- */ -#ifndef TCL_CFGVAL_ENCODING -#define TCL_CFGVAL_ENCODING "ascii" -#endif - void TkpFontPkgInit( TkMainInfo *mainPtr) /* The application being created. */ { - static const Tcl_Config cfg[] = { - { "fontsystem", "xft" }, - { 0,0 } - }; - - Tcl_RegisterConfig(mainPtr->interp, "tk", cfg, TCL_CFGVAL_ENCODING); } static XftFont * |