Index: configure ================================================================== --- configure +++ configure @@ -5575,11 +5575,10 @@ # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- vars="generic/xmlsimple.c \ - generic/utf8conv.c \ generic/dom.c \ generic/domhtml.c \ generic/domhtml5.c \ generic/domjson.c \ generic/domxpath.c \ DELETED configure-tcl8.0.5 Index: configure-tcl8.0.5 ================================================================== --- configure-tcl8.0.5 +++ configure-tcl8.0.5 @@ -1,4228 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --with-tcl directory containing tcl configuration (tclConfig.sh)" -ac_help="$ac_help - --with-tclinclude directory containing the public Tcl header files" -ac_help="$ac_help - --enable-threads build with threads" -ac_help="$ac_help - --enable-shared build and link with shared libraries [--enable-shared]" -ac_help="$ac_help - --enable-64bit enable 64bit support (where applicable)" -ac_help="$ac_help - --enable-64bit-vis enable 64bit Sparc VIS support" -ac_help="$ac_help - --disable-load disallow dynamic loading and "load" command" -ac_help="$ac_help - --enable-symbols build with debugging symbols [--disable-symbols]" -ac_help="$ac_help - --with-aolserver directory with AOLserver distribution" -ac_help="$ac_help - --enable-dtd build with the dtd support [--enable-dtd]" -ac_help="$ac_help - --enable-ns build with the namespace support [--enable-ns]" -ac_help="$ac_help - --enable-unknown enable built-in unknown command [--disable-unknown]" -ac_help="$ac_help - --enable-tdomalloc build with the tDOM allocator [--enable-tdomalloc]" - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=generic/tcldom.c - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -#----------------------------------------------------------------------- -# Be sure we're invoked from the platform directory. -#----------------------------------------------------------------------- - -if test ${srcdir} = "." ; then - echo "" - echo "Please cd to the platform-specific dir (unix or win) and invoke:" - echo " ../configure" - echo "" - exit 1 -fi - -#----------------------------------------------------------------------- -# These are needed for the expat compilation. Do this early so we -# do not step over some CFLAGS which will confuse the compiler. -#----------------------------------------------------------------------- - -for ac_func in memmove bcopy -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:572: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - -#----------------------------------------------------------------------- -# Where is the tcl.m4 and brothers? -#----------------------------------------------------------------------- - -ac_aux_dir= -for ac_dir in tclconfig $srcdir/tclconfig; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in tclconfig $srcdir/tclconfig" 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - -CONFIGDIR=${srcdir}/tclconfig - - -#---------------------------------------------------------------------- -# __CHANGE__ -# Set your package name and version numbers here. The NODOT_VERSION is -# required for constructing the library name on systems that don't like -# dots in library names (Windows). The VERSION variable is used on the -# other systems. Note that we substitute the VERSIN later down, after -# we have initialized TEA so we know which platform we're dealing with. -#---------------------------------------------------------------------- - -PACKAGE=tdom - - -TDOMSHELL=tcldomsh - - -MAJOR_VERSION=0 - - -MINOR_VERSION=8 - - -PATCHLEVEL=3 - -# This package name must be replaced statically for AC_SUBST to work - - -# Substitute stub_LIB_FILE if your package creates a stub library too. - - -#-------------------------------------------------------------------- -# Call TEA_INIT as the first TEA_ macro to set up initial vars. -# This will define a ${TEA_PLATFORM} variable == "unix" or "windows". -#-------------------------------------------------------------------- - - - echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6 -echo "configure:688: checking for correct TEA configuration" >&5 - if test x"${PACKAGE}" = x ; then - { echo "configure: error: -The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; } - fi - echo "$ac_t""ok" 1>&6 - TEA_INITED=ok - case "`uname -s`" in - *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*|*CYGWIN_ME*|*MINGW32_*) - # Extract the first word of "cygpath", so it can be a program name with args. -set dummy cygpath; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:700: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CYGPATH"; then - ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CYGPATH="cygpath -w" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" -fi -fi -CYGPATH="$ac_cv_prog_CYGPATH" -if test -n "$CYGPATH"; then - echo "$ac_t""$CYGPATH" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - EXEEXT=".exe" - TEA_PLATFORM="windows" - ;; - *) - CYGPATH=echo - EXEEXT="" - TEA_PLATFORM="unix" - ;; - esac - - - - - -#-------------------------------------------------------------------- -# Load the tclConfig.sh file -#-------------------------------------------------------------------- - - - if test x"${TEA_INITED}" = x ; then - # Can't refer to exact macro name or it will be substituted - { echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; } - fi - # - # Ok, lets find the tcl configuration - # First, look for one uninstalled. - # the alternative search directory is invoked by --with-tcl - # - - if test x"${no_tcl}" = x ; then - # we reset no_tcl in case something fails here - no_tcl=true - # Check whether --with-tcl or --without-tcl was given. -if test "${with_tcl+set}" = set; then - withval="$with_tcl" - with_tclconfig=${withval} -fi - - echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 -echo "configure:766: checking for Tcl configuration" >&5 - if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - - # First check to see if --with-tcl was specified. - if test x"${with_tclconfig}" != x ; then - if test -f "${with_tclconfig}/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` - else - { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } - fi - fi - - # then check for a private Tcl installation - if test x"${ac_cv_c_tclconfig}" = x ; then - for i in \ - ../tcl \ - `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ - ../../tcl \ - `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ - ../../../tcl \ - `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do - if test -f "$i/unix/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i/unix; pwd)` - break - fi - done - fi - - # check in a few common install locations - if test x"${ac_cv_c_tclconfig}" = x ; then - for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \ - `ls -d /usr/local/lib 2>/dev/null` \ - `ls -d /usr/contrib/lib 2>/dev/null` \ - `ls -d /usr/lib 2>/dev/null` \ - ; do - if test -f "$i/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i; pwd)` - break - fi - done - fi - - # check in a few other private locations - if test x"${ac_cv_c_tclconfig}" = x ; then - for i in \ - ${srcdir}/../tcl \ - `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do - if test -f "$i/unix/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i/unix; pwd)` - break - fi - done - fi - -fi - - - if test x"${ac_cv_c_tclconfig}" = x ; then - TCL_BIN_DIR="# no Tcl configs found" - echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2 - exit 0 - else - no_tcl= - TCL_BIN_DIR=${ac_cv_c_tclconfig} - echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6 - fi - fi - - - echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6 -echo "configure:839: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 - - if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then - echo "$ac_t""loading" 1>&6 - . $TCL_BIN_DIR/tclConfig.sh - else - echo "$ac_t""file not found" 1>&6 - fi - - # - # If the TCL_BIN_DIR is the build directory (not the install directory), - # then set the common variable name to the value of the build variables. - # For example, the variable TCL_LIB_SPEC will be set to the value - # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC - # instead of TCL_BUILD_LIB_SPEC since it will work with both an - # installed and uninstalled version of Tcl. - # - - if test -f $TCL_BIN_DIR/Makefile ; then - TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} - TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} - TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} - fi - - # - # eval is required to do the TCL_DBGX substitution - # - - eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" - eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" - eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" - - eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" - eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" - eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" - - - - - - - - - - - - - - #AC_SUBST(TCL_DBGX) - - - - - - #AC_SUBST(TCL_BUILD_LIB_SPEC) - #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC) - - -#-------------------------------------------------------------------- -# Load the tkConfig.sh file if necessary (Tk extension) -#-------------------------------------------------------------------- - -#TEA_PATH_TKCONFIG -#TEA_LOAD_TKCONFIG - -#----------------------------------------------------------------------- -# Handle the --prefix=... option by defaulting to what Tcl gave. -# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. -#----------------------------------------------------------------------- - - - # Should be AC_MSG_NOTICE, but that requires autoconf 2.50 - if test "${prefix}" = "NONE"; then - prefix_default=yes - if test x"${TCL_PREFIX}" != x; then - echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2 - prefix=${TCL_PREFIX} - else - prefix=/usr/local - fi - fi - if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then - if test x"${TCL_EXEC_PREFIX}" != x; then - echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2 - exec_prefix=${TCL_EXEC_PREFIX} - else - exec_prefix=$prefix - fi - fi - - -#----------------------------------------------------------------------- -# Standard compiler checks. -# This sets up CC by using the CC env var, or looks for gcc otherwise. -# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create -# the basic setup necessary to compile executables. -#----------------------------------------------------------------------- - -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:938: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:971: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes - - # If the user did not set CFLAGS, set it now to keep - # the AC_PROG_CC macro from adding "-g -O2". - if test "${CFLAGS+set}" != "set" ; then - CFLAGS="" - fi - - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1009: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1039: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1090: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1122: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 1133 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:1138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1164: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1169: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1197: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - - - #------------------------------------------------------------------------ - # If we're using GCC, see if the compiler understands -pipe. If so, use it. - # It makes compiling go faster. (This is only a performance feature.) - #------------------------------------------------------------------------ - - if test -z "$no_pipe" -a -n "$GCC"; then - echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6 -echo "configure:1236: checking if the compiler understands -pipe" >&5 - OLDCC="$CC" - CC="$CC -pipe" - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CC="$OLDCC" - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* - fi - - # Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1272: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - - #-------------------------------------------------------------------- - # Checks to see if the make program sets the $MAKE variable. - #-------------------------------------------------------------------- - - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1330: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - - - #-------------------------------------------------------------------- - # Find ranlib - #-------------------------------------------------------------------- - - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1364: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - #-------------------------------------------------------------------- - # Determines the correct binary file extension (.o, .obj, .exe etc.) - #-------------------------------------------------------------------- - - echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1397: checking for object suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - rm -f conftest* -echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done -else - { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_objext" 1>&6 -OBJEXT=$ac_cv_objext -ac_objext=$ac_cv_objext - - - -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1423: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then - ac_cv_exeext=.exe -else - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_exeext= - if { (eval echo configure:1433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then - for file in conftest.*; do - case $file in - *.c | *.o | *.obj) ;; - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - else - { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } - fi - rm -f conftest* - test x"${ac_cv_exeext}" = x && ac_cv_exeext=no -fi -fi - -EXEEXT="" -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} -echo "$ac_t""${ac_cv_exeext}" 1>&6 -ac_exeext=$EXEEXT - - - -#-------------------------------------------------------------------- -# __CHANGE__ -# Choose which headers you need. Extension authors should try very -# hard to only rely on the Tcl public header files. Internal headers -# contain private data structures and are subject to change without -# notice. -# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG -#-------------------------------------------------------------------- - - - echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6 -echo "configure:1466: checking for Tcl public headers" >&5 - - # Check whether --with-tclinclude or --without-tclinclude was given. -if test "${with_tclinclude+set}" = set; then - withval="$with_tclinclude" - with_tclinclude=${withval} -fi - - - if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - # Use the value from --with-tclinclude, if it was given - - if test x"${with_tclinclude}" != x ; then - if test -f "${with_tclinclude}/tcl.h" ; then - ac_cv_c_tclh=${with_tclinclude} - else - { echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; } - fi - else - # Check order: pkg --prefix location, Tcl's --prefix location, - # directory of tclConfig.sh, and Tcl source directory. - # Looking in the source dir is not ideal, but OK. - - eval "temp_includedir=${includedir}" - list="`ls -d ${temp_includedir} 2>/dev/null` \ - `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ - `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \ - `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`" - if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then - list="$list /usr/local/include /usr/include" - fi - for i in $list ; do - if test -f "$i/tcl.h" ; then - ac_cv_c_tclh=$i - break - fi - done - fi - -fi - - - # Print a message based on how we determined the include path - - if test x"${ac_cv_c_tclh}" = x ; then - { echo "configure: error: tcl.h not found. Please specify its location with --with-tclinclude" 1>&2; exit 1; } - else - echo "$ac_t""${ac_cv_c_tclh}" 1>&6 - fi - - # Convert to a native path and substitute into the output files. - - INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` - - TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" - - - -#TEA_PRIVATE_TCL_HEADERS - -#TEA_PUBLIC_TK_HEADERS -#TEA_PRIVATE_TK_HEADERS - -#-------------------------------------------------------------------- -# __CHANGE__ -# A few miscellaneous platform-specific items: -# -# Define a special symbol for Windows (BUILD_sample in this case) so -# that we create the export library with the dll. See sha1.h on how -# to use this. -# -# Windows creates a few extra files that need to be cleaned up. -# You can add more files to clean if your extension creates any extra -# files. -# -# Define any extra compiler flags in the PACKAGE_CFLAGS variable. -# These will be appended to the current set of compiler flags for -# your system. -#-------------------------------------------------------------------- - -if test "${TEA_PLATFORM}" = "windows" ; then - cat >> confdefs.h <<\EOF -#define BUILD_tdom 1 -EOF - - CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch" - EXTRA_SOURCES='$(WIN_SOURCES)' - VERSION=${MAJOR_VERSION}${MINOR_VERSION}${PATCHLEVEL} -else - CLEANFILES="pkgIndex.tcl" - EXTRA_SOURCES='$(UNIX_SOURCES)' - VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCHLEVEL} -fi - - - - - -#-------------------------------------------------------------------- -# We put this here so that you can compile with -DVERSION="1.2" to -# encode the package version directly into the source files. -#-------------------------------------------------------------------- - -eval cat >> confdefs.h <> confdefs.h <<\EOF -#define USE_THREAD_ALLOC 1 -EOF - - cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF - - cat >> confdefs.h <<\EOF -#define _THREAD_SAFE 1 -EOF - - echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1628: checking for pthread_mutex_init in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthread $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - tcl_ok=yes -else - echo "$ac_t""no" 1>&6 -tcl_ok=no -fi - - if test "$tcl_ok" = "no"; then - # Check a little harder for __pthread_mutex_init in the - # same library, as some systems hide it there until - # pthread.h is defined. We could alternatively do an - # AC_TRY_COMPILE with pthread.h, but that will work with - # libpthread really doesn't exist, like AIX 4.2. - # [Bug: 4359] - echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1676: checking for __pthread_mutex_init in -lpthread" >&5 -ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthread $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - tcl_ok=yes -else - echo "$ac_t""no" 1>&6 -tcl_ok=no -fi - - fi - - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -lpthread" - else - echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6 -echo "configure:1723: checking for pthread_mutex_init in -lpthreads" >&5 -ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthreads $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - tcl_ok=yes -else - echo "$ac_t""no" 1>&6 -tcl_ok=no -fi - - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -lpthreads" - else - echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6 -echo "configure:1768: checking for pthread_mutex_init in -lc" >&5 -ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - tcl_ok=yes -else - echo "$ac_t""no" 1>&6 -tcl_ok=no -fi - - if test "$tcl_ok" = "no"; then - echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6 -echo "configure:1810: checking for pthread_mutex_init in -lc_r" >&5 -ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lc_r $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - tcl_ok=yes -else - echo "$ac_t""no" 1>&6 -tcl_ok=no -fi - - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -pthread" - else - TCL_THREADS=0 - echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2 - fi - fi - fi - fi - - # Does the pthread-implementation provide - # 'pthread_attr_setstacksize' ? - for ac_func in pthread_attr_setstacksize -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1866: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - fi - else - TCL_THREADS=0 - fi - # Do checking message here to not mess up interleaved configure output - echo $ac_n "checking for building with threads""... $ac_c" 1>&6 -echo "configure:1924: checking for building with threads" >&5 - if test "${TCL_THREADS}" = "1"; then - cat >> confdefs.h <<\EOF -#define TCL_THREADS 1 -EOF - - echo "$ac_t""yes" 1>&6 - else - echo "$ac_t""no (default)" 1>&6 - fi - # TCL_THREADS sanity checking. See if our request for building with - # threads is the same as the way Tcl was built. If not, warn the user. - case ${TCL_DEFS} in - *THREADS=1*) - if test "${TCL_THREADS}" = "0"; then - echo "configure: warning: - Building ${PACKAGE} without threads enabled, but building against a Tcl - that IS thread-enabled." 1>&2 - fi - ;; - *) - if test "${TCL_THREADS}" = "1"; then - echo "configure: warning: - --enable-threads requested, but attempting building against a Tcl - that is NOT thread-enabled." 1>&2 - fi - ;; - esac - - - -#-------------------------------------------------------------------- -# The statement below defines a collection of symbols related to -# building as a shared library instead of a static library. -#-------------------------------------------------------------------- - - - echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:1962: checking how to build libraries" >&5 - # Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval -else - tcl_ok=yes -fi - - - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval - else - tcl_ok=yes - fi - - if test "$tcl_ok" = "yes" ; then - echo "$ac_t""shared" 1>&6 - SHARED_BUILD=1 - else - echo "$ac_t""static" 1>&6 - SHARED_BUILD=0 - cat >> confdefs.h <<\EOF -#define STATIC_BUILD 1 -EOF - - fi - - -#-------------------------------------------------------------------- -# This macro figures out what flags to use with the compiler/linker -# when building shared/static debug/optimized objects. This information -# can be taken from the tclConfig.sh file, but this figures it all out. -#-------------------------------------------------------------------- - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1999: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - - - if test x"${TEA_INITED}" = x ; then - # Can't refer to exact macro name or it will be substituted - { echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; } - fi - - # Step 0: Enable 64 bit support? - - echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6 -echo "configure:2087: checking if 64bit support is enabled" >&5 - # Check whether --enable-64bit or --disable-64bit was given. -if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval -else - do64bit=no -fi - - echo "$ac_t""$do64bit" 1>&6 - - # Step 0.b: Enable Solaris 64 bit VIS support? - - echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6 -echo "configure:2101: checking if 64bit Sparc VIS support is requested" >&5 - # Check whether --enable-64bit-vis or --disable-64bit-vis was given. -if test "${enable_64bit_vis+set}" = set; then - enableval="$enable_64bit_vis" - do64bitVIS=$enableval -else - do64bitVIS=no -fi - - echo "$ac_t""$do64bitVIS" 1>&6 - - if test "$do64bitVIS" = "yes"; then - # Force 64bit on with VIS - do64bit=yes - fi - - # Step 1: set the variable "system" to hold the name and version number - # for the system. This can usually be done via the "uname" command, but - # there are a few systems, like Next, where this doesn't work. - - echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6 -echo "configure:2122: checking system version (for dynamic loading)" >&5 - if test -f /usr/lib/NextStep/software_version; then - system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` - else - system=`uname -s`-`uname -r` - if test "$?" -ne 0 ; then - echo "$ac_t""unknown (can't find uname command)" 1>&6 - system=unknown - else - # Special check for weird MP-RAS system (uname returns weird - # results, and the version is kept in special file). - - if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then - system=MP-RAS-`awk '{print }' /etc/.relid'` - fi - if test "`uname -s`" = "AIX" ; then - system=AIX-`uname -v`.`uname -r` - fi - if test "${TEA_PLATFORM}" = "windows" ; then - system=windows - fi - echo "$ac_t""$system" 1>&6 - fi - fi - - # Step 2: check for existence of -ldl library. This is needed because - # Linux can use either -ldl or -ldld for dynamic loading. - - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:2151: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - have_dl=yes -else - echo "$ac_t""no" 1>&6 -have_dl=no -fi - - - # Step 3: set configuration options based on system name and version. - - do64bit_ok=no - EXTRA_CFLAGS="" - TCL_EXPORT_FILE_SUFFIX="" - UNSHARED_LIB_SUFFIX="" - TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' - ECHO_VERSION='`echo ${VERSION}`' - TCL_LIB_VERSIONS_OK=ok - CFLAGS_DEBUG=-g - CFLAGS_OPTIMIZE=-O - if test "$GCC" = "yes" ; then - CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int" - else - CFLAGS_WARNING="" - fi - TCL_NEEDS_EXP_FILE=0 - TCL_BUILD_EXP_FILE="" - TCL_EXP_FILE="" - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2214: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR="ar" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -AR="$ac_cv_prog_AR" -if test -n "$AR"; then - echo "$ac_t""$AR" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - STLIB_LD='${AR} cr' - case $system in - windows) - # This is a 2-stage check to make sure we have the 64-bit SDK - # We have to know where the SDK is installed. - if test "$do64bit" = "yes" ; then - if test "x${MSSDK}x" = "xx" ; then - MSSDK="C:/Progra~1/Microsoft SDK" - fi - # In order to work in the tortured autoconf environment, - # we need to ensure that this path has no spaces - MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'` - if test ! -d "${MSSDK}/bin/win64" ; then - echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2 - do64bit="no" - else - do64bit_ok="yes" - fi - fi - - if test "${SHARED_BUILD}" = "0" ; then - runtime=-MT - else - runtime=-MD - fi - - if test "$do64bit" = "yes" ; then - # All this magic is necessary for the Win64 SDK RC1 - hobbs - export CC="${MSSDK}/Bin/Win64/cl.exe \ - -I${MSSDK}/Include/prerelease -I${MSSDK}/Include/Win64/crt \ - -I${MSSDK}/Include" - export RC="${MSSDK}/bin/rc.exe" - export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \ - -LIBPATH:${MSSDK}/Lib/Prerelease/IA64" - export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}" - export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}" - CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d" - CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}" - else - RC="rc" - STLIB_LD="lib -nologo" - LINKBIN="link -link50compat" - CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" - CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}" - fi - - if test "$MINGW32" = "yes"; then - # mingw gcc mode - CFLAGS_DEBUG="-g" - CFLAGS_OPTIMIZE="-O2" - SHLIB_LD="gcc -shared" - STLIB_LD='${AR} cr' - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' - LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" - LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}" - else - SHLIB_LD="${LINKBIN} -dll -nologo" - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib' - EXTRA_CFLAGS="-YX" - # For information on what debugtype is most useful, see: - # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp - # This essentially turns it all on. - LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2" - LDFLAGS_OPTIMIZE="-release" - LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" - LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" - PATHTYPE=-w - fi - - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".dll" - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll' - - TCL_LIB_VERSIONS_OK=nodots - # Bogus to avoid getting this turned off - DL_OBJS="tclLoadNone.obj" - ;; - AIX-*) - if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then - # AIX requires the _r compiler when gcc isn't being used - if test "${CC}" != "cc_r" ; then - CC=${CC}_r - fi - echo "$ac_t""Using $CC for compiling with threads" 1>&6 - fi - LIBS="$LIBS -lc" - SHLIB_CFLAGS="" - SHLIB_SUFFIX=".so" - SHLIB_LD_LIBS='${LIBS}' - if test "`uname -m`" = "ia64" ; then - # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - # AIX-5 has dl* in libc.so - DL_LIBS="" - if test "$GCC" = "yes" ; then - LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - else - LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' - fi - else - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" - DL_LIBS="-ldl" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' - fi - DL_OBJS="tclLoadDl.o" - LDFLAGS="" - - # AIX v<=4.1 has some different flags than 4.2+ - if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then - LIBOBJS="$LIBOBJS tclLoadAix.o" - DL_LIBS="-lld" - fi - - # On AIX <=v4 systems, libbsd.a has to be linked in to support - # non-blocking file IO. This library has to be linked in after - # the MATH_LIBS or it breaks the pow() function. The way to - # insure proper sequencing, is to add it to the tail of MATH_LIBS. - # This library also supplies gettimeofday. - # - # AIX does not have a timezone field in struct tm. When the AIX - # bsd library is used, the timezone global and the gettimeofday - # methods are to be avoided for timezone deduction instead, we - # deduce the timezone by comparing the localtime result on a - # known GMT value. - - echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:2368: checking for gettimeofday in -lbsd" >&5 -ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lbsd $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - libbsd=yes -else - echo "$ac_t""no" 1>&6 -libbsd=no -fi - - if test $libbsd = yes; then - MATH_LIBS="$MATH_LIBS -lbsd" - cat >> confdefs.h <<\EOF -#define USE_DELTA_FOR_TZ 1 -EOF - - fi - - # Check to enable 64-bit flags for compiler/linker on AIX 5+ - if test "$do64bit" = "yes" -a "`uname -v`" -gt "4" ; then - if test "$GCC" = "yes" ; then - echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2 - else - do64bit_ok=yes - EXTRA_CFLAGS="-q64" - LDFLAGS="-q64" - fi - fi - ;; - BSD/OS-2.1*|BSD/OS-3*) - SHLIB_CFLAGS="" - SHLIB_LD="shlicc -r" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - BSD/OS-4.*) - SHLIB_CFLAGS="-export-dynamic -fPIC" - SHLIB_LD="cc -shared" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="-export-dynamic" - LD_SEARCH_FLAGS="" - ;; - dgux*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - HP-UX-*.11.*) - # Use updated header definitions where possible - cat >> confdefs.h <<\EOF -#define _XOPEN_SOURCE_EXTENDED 1 -EOF - - - SHLIB_SUFFIX=".sl" - echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2466: checking for shl_load in -ldld" >&5 -ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - tcl_ok=yes -else - echo "$ac_t""no" 1>&6 -tcl_ok=no -fi - - if test "$tcl_ok" = yes; then - SHLIB_CFLAGS="+z" - SHLIB_LD="ld -b" - SHLIB_LD_LIBS="" - DL_OBJS="tclLoadShl.o" - DL_LIBS="-ldld" - LDFLAGS="-Wl,-E" - LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - fi - - # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = "yes" ; then - if test "$GCC" = "yes" ; then - echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2 - else - do64bit_ok=yes - EXTRA_CFLAGS="+DA2.0W" - LDFLAGS="+DA2.0W $LDFLAGS" - fi - fi - ;; - HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) - SHLIB_SUFFIX=".sl" - echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2530: checking for shl_load in -ldld" >&5 -ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - tcl_ok=yes -else - echo "$ac_t""no" 1>&6 -tcl_ok=no -fi - - if test "$tcl_ok" = yes; then - SHLIB_CFLAGS="+z" - SHLIB_LD="ld -b" - SHLIB_LD_LIBS="" - DL_OBJS="tclLoadShl.o" - DL_LIBS="-ldld" - LDFLAGS="-Wl,-E" - LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - fi - ;; - IRIX-4.*) - SHLIB_CFLAGS="-G 0" - SHLIB_SUFFIX=".a" - SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" - SHLIB_LD_LIBS='${LIBS}' - DL_OBJS="tclLoadAout.o" - DL_LIBS="" - LDFLAGS="-Wl,-D,08000000" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' - ;; - IRIX-5.*) - SHLIB_CFLAGS="" - SHLIB_LD="ld -shared -rdata_shared" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - EXTRA_CFLAGS="" - LDFLAGS="" - ;; - IRIX-6.*|IRIX64-6.5*) - SHLIB_CFLAGS="" - SHLIB_LD="ld -n32 -shared -rdata_shared" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - if test "$GCC" = "yes" ; then - EXTRA_CFLAGS="-mabi=n32" - LDFLAGS="-mabi=n32" - else - case $system in - IRIX-6.3) - # Use to build 6.2 compatible binaries on 6.3. - EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS" - ;; - *) - EXTRA_CFLAGS="-n32" - ;; - esac - LDFLAGS="-n32" - fi - ;; - IRIX64-6.*) - SHLIB_CFLAGS="" - SHLIB_LD="ld -n32 -shared -rdata_shared" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - ;; - Linux*) - SHLIB_CFLAGS="-fPIC" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - - # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings - # when you inline the string and math operations. Turn this off to - # get rid of the warnings. - - CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" - - if test "$have_dl" = yes; then - SHLIB_LD="${CC} -shared" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="-rdynamic" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - else - ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2656: checking for dld.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - SHLIB_LD="ld -shared" - DL_OBJS="tclLoadDld.o" - DL_LIBS="-ldld" - LDFLAGS="" - LD_SEARCH_FLAGS="" -else - echo "$ac_t""no" 1>&6 -fi - - fi - if test "`uname -m`" = "alpha" ; then - EXTRA_CFLAGS="-mieee" - fi - - # The combo of gcc + glibc has a bug related - # to inlining of functions like strtod(). The - # -fno-builtin flag should address this problem - # but it does not work. The -fno-inline flag - # is kind of overkill but it works. - # Disable inlining only when one of the - # files in compat/*.c is being linked in. - if test x"${LIBOBJS}" != x ; then - EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline" - fi - - ;; - GNU*) - SHLIB_CFLAGS="-fPIC" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - - if test "$have_dl" = yes; then - SHLIB_LD="${CC} -shared" - DL_OBJS="" - DL_LIBS="-ldl" - LDFLAGS="-rdynamic" - LD_SEARCH_FLAGS="" - else - ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2723: checking for dld.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - SHLIB_LD="ld -shared" - DL_OBJS="" - DL_LIBS="-ldld" - LDFLAGS="" - LD_SEARCH_FLAGS="" -else - echo "$ac_t""no" 1>&6 -fi - - fi - if test "`uname -m`" = "alpha" ; then - EXTRA_CFLAGS="-mieee" - fi - ;; - MP-RAS-02*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - MP-RAS-*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="-Wl,-Bexport" - LD_SEARCH_FLAGS="" - ;; - NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*) - # Not available on all versions: check for include file. - ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:2788: checking for dlfcn.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - # NetBSD/SPARC needs -fPIC, -fpic will not do. - SHLIB_CFLAGS="-fPIC" - SHLIB_LD="ld -Bshareable -x" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:2825: checking for ELF" >&5 - cat > conftest.$ac_ext <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so' -else - rm -rf conftest* - echo "$ac_t""no" 1>&6 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' - -fi -rm -f conftest* - - -else - echo "$ac_t""no" 1>&6 - - SHLIB_CFLAGS="" - SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".a" - DL_OBJS="tclLoadAout.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' - -fi - - - # FreeBSD doesn't handle version numbers with dots. - - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' - TCL_LIB_VERSIONS_OK=nodots - ;; - FreeBSD-*) - # FreeBSD 3.* and greater have ELF. - SHLIB_CFLAGS="-fPIC" - SHLIB_LD="ld -Bshareable -x" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="-export-dynamic" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - if test "${TCL_THREADS}" = "1" ; then - EXTRA_CFLAGS="-pthread" - LDFLAGS="$LDFLAGS -pthread" - fi - case $system in - FreeBSD-3.*) - # FreeBSD-3 doesn't handle version numbers with dots. - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so' - TCL_LIB_VERSIONS_OK=nodots - ;; - esac - ;; - Rhapsody-*|Darwin-*) - SHLIB_CFLAGS="-fno-common" - SHLIB_LD="cc -dynamiclib \${LDFLAGS}" - TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr a000000" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".dylib" - DL_OBJS="tclLoadDyld.o" - DL_LIBS="" - LDFLAGS="-prebind" - LD_SEARCH_FLAGS="" - CFLAGS_OPTIMIZE="-O3" - EXTRA_CFLAGS="-arch ppc -pipe" - ;; - NEXTSTEP-*) - SHLIB_CFLAGS="" - SHLIB_LD="cc -nostdlib -r" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadNext.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - OS/390-*) - CFLAGS_OPTIMIZE="" # Optimizer is buggy - cat >> confdefs.h <<\EOF -#define _OE_SOCKETS 1 -EOF - # needed in sys/socket.h - ;; - OSF1-1.0|OSF1-1.1|OSF1-1.2) - # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 - SHLIB_CFLAGS="" - # Hack: make package name same as library name - SHLIB_LD='ld -R -export :' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadOSF.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - OSF1-1.*) - # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 - SHLIB_CFLAGS="-fPIC" - SHLIB_LD="ld -shared" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - OSF1-V*) - # Digital OSF/1 - SHLIB_CFLAGS="" - SHLIB_LD='ld -shared -expect_unresolved "*"' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - if test "$GCC" != "yes" ; then - EXTRA_CFLAGS="-DHAVE_TZSET -std1" - fi - # see pthread_intro(3) for pthread support on osf1, k.furukawa - if test "${TCL_THREADS}" = "1" ; then - EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" - EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" - LIBS=`echo $LIBS | sed s/-lpthreads//` - if test "$GCC" = "yes" ; then - LIBS="$LIBS -lpthread -lmach -lexc" - else - EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread" - LDFLAGS="-pthread" - fi - fi - - ;; - QNX-6*) - # QNX RTP - # This may work for all QNX, but it was only reported for v6. - SHLIB_CFLAGS="-fPIC" - SHLIB_LD="ld -Bshareable -x" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - # dlopen is in -lc on QNX - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - RISCos-*) - SHLIB_CFLAGS="-G 0" - SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".a" - DL_OBJS="tclLoadAout.o" - DL_LIBS="" - LDFLAGS="-Wl,-D,08000000" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - ;; - SCO_SV-3.2*) - # Note, dlopen is available only on SCO 3.2.5 and greater. However, - # this test works, since "uname -s" was non-standard in 3.2.4 and - # below. - if test "$GCC" = "yes" ; then - SHLIB_CFLAGS="-fPIC -melf" - LDFLAGS="-melf -Wl,-Bexport" - else - SHLIB_CFLAGS="-Kpic -belf" - LDFLAGS="-belf -Wl,-Bexport" - fi - SHLIB_LD="ld -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LD_SEARCH_FLAGS="" - ;; - SINIX*5.4*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - SunOS-4*) - SHLIB_CFLAGS="-PIC" - SHLIB_LD="ld" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - - # SunOS can't handle version numbers with dots in them in library - # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it - # requires an extra version number at the end of .so file names. - # So, the library has to have a name like libtcl75.so.1.0 - - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' - TCL_LIB_VERSIONS_OK=nodots - ;; - SunOS-5.[0-6]*) - - # Note: If _REENTRANT isn't defined, then Solaris - # won't define thread-safe library routines. - - cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF - - cat >> confdefs.h <<\EOF -#define _POSIX_PTHREAD_SEMANTICS 1 -EOF - - - SHLIB_CFLAGS="-KPIC" - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - - # Note: need the LIBS below, otherwise Tk won't find Tcl's - # symbols when dynamically loaded into tclsh. - - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - if test "$GCC" = "yes" ; then - LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - else - LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' - fi - ;; - SunOS-5*) - - # Note: If _REENTRANT isn't defined, then Solaris - # won't define thread-safe library routines. - - cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF - - cat >> confdefs.h <<\EOF -#define _POSIX_PTHREAD_SEMANTICS 1 -EOF - - - SHLIB_CFLAGS="-KPIC" - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - LDFLAGS="" - - # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = "yes" ; then - arch=`isainfo` - if test "$arch" = "sparcv9 sparc" ; then - if test "$GCC" = "yes" ; then - echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2 - else - do64bit_ok=yes - if test "$do64bitVIS" = "yes" ; then - EXTRA_CFLAGS="-xarch=v9a" - LDFLAGS="-xarch=v9a" - else - EXTRA_CFLAGS="-xarch=v9" - LDFLAGS="-xarch=v9" - fi - fi - else - echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2 - fi - fi - - # Note: need the LIBS below, otherwise Tk won't find Tcl's - # symbols when dynamically loaded into tclsh. - - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - if test "$GCC" = "yes" ; then - LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - else - LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' - fi - ;; - ULTRIX-4.*) - SHLIB_CFLAGS="-G 0" - SHLIB_SUFFIX=".a" - SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" - SHLIB_LD_LIBS='${LIBS}' - DL_OBJS="tclLoadAout.o" - DL_LIBS="" - LDFLAGS="-Wl,-D,08000000" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - if test "$GCC" != "yes" ; then - EXTRA_CFLAGS="-DHAVE_TZSET -std1" - fi - ;; - UNIX_SV* | UnixWare-5*) - SHLIB_CFLAGS="-KPIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers - # that don't grok the -Bexport option. Test that it does. - hold_ldflags=$LDFLAGS - echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6 -echo "configure:3150: checking for ld accepts -Bexport flag" >&5 - LDFLAGS="${LDFLAGS} -Wl,-Bexport" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - found=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - found=no -fi -rm -f conftest* - LDFLAGS=$hold_ldflags - echo "$ac_t""$found" 1>&6 - if test $found = yes; then - LDFLAGS="-Wl,-Bexport" - else - LDFLAGS="" - fi - LD_SEARCH_FLAGS="" - ;; - esac - - if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then - echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2 - fi - - # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic - # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop, - # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need - # to determine which of several header files defines the a.out file - # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we - # support only a file format that is more or less version-7-compatible. - # In particular, - # - a.out files must begin with `struct exec'. - # - the N_TXTOFF on the `struct exec' must compute the seek address - # of the text segment - # - The `struct exec' must contain a_magic, a_text, a_data, a_bss - # and a_entry fields. - # The following compilation should succeed if and only if either sys/exec.h - # or a.out.h is usable for the purpose. - # - # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the - # `struct exec' includes a second header that contains information that - # duplicates the v7 fields that are needed. - - if test "x$DL_OBJS" = "xtclLoadAout.o" ; then - echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 -echo "configure:3206: checking sys/exec.h" >&5 - cat > conftest.$ac_ext < -int main() { - - struct exec foo; - unsigned long seek; - int flag; -#if defined(__mips) || defined(mips) - seek = N_TXTOFF (foo.ex_f, foo.ex_o); -#else - seek = N_TXTOFF (foo); -#endif - flag = (foo.a_magic == OMAGIC); - return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; - -; return 0; } -EOF -if { (eval echo configure:3226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - tcl_ok=usable -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - tcl_ok=unusable -fi -rm -f conftest* - echo "$ac_t""$tcl_ok" 1>&6 - if test $tcl_ok = usable; then - cat >> confdefs.h <<\EOF -#define USE_SYS_EXEC_H 1 -EOF - - else - echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:3244: checking a.out.h" >&5 - cat > conftest.$ac_ext < -int main() { - - struct exec foo; - unsigned long seek; - int flag; -#if defined(__mips) || defined(mips) - seek = N_TXTOFF (foo.ex_f, foo.ex_o); -#else - seek = N_TXTOFF (foo); -#endif - flag = (foo.a_magic == OMAGIC); - return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; - -; return 0; } -EOF -if { (eval echo configure:3264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - tcl_ok=usable -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - tcl_ok=unusable -fi -rm -f conftest* - echo "$ac_t""$tcl_ok" 1>&6 - if test $tcl_ok = usable; then - cat >> confdefs.h <<\EOF -#define USE_A_OUT_H 1 -EOF - - else - echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:3282: checking sys/exec_aout.h" >&5 - cat > conftest.$ac_ext < -int main() { - - struct exec foo; - unsigned long seek; - int flag; -#if defined(__mips) || defined(mips) - seek = N_TXTOFF (foo.ex_f, foo.ex_o); -#else - seek = N_TXTOFF (foo); -#endif - flag = (foo.a_midmag == OMAGIC); - return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; - -; return 0; } -EOF -if { (eval echo configure:3302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - tcl_ok=usable -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - tcl_ok=unusable -fi -rm -f conftest* - echo "$ac_t""$tcl_ok" 1>&6 - if test $tcl_ok = usable; then - cat >> confdefs.h <<\EOF -#define USE_SYS_EXEC_AOUT_H 1 -EOF - - else - DL_OBJS="" - fi - fi - fi - fi - - # Step 5: disable dynamic loading if requested via a command-line switch. - - # Check whether --enable-load or --disable-load was given. -if test "${enable_load+set}" = set; then - enableval="$enable_load" - tcl_ok=$enableval -else - tcl_ok=yes -fi - - if test "$tcl_ok" = "no"; then - DL_OBJS="" - fi - - if test "x$DL_OBJS" != "x" ; then - BUILD_DLTEST="\$(DLTEST_TARGETS)" - else - echo "Can't figure out how to do dynamic loading or shared libraries" - echo "on this system." - SHLIB_CFLAGS="" - SHLIB_LD="" - SHLIB_SUFFIX="" - DL_OBJS="tclLoadNone.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - BUILD_DLTEST="" - fi - - # If we're running gcc, then change the C flags for compiling shared - # libraries to the right flags for gcc, instead of those for the - # standard manufacturer compiler. - - if test "$DL_OBJS" != "tclLoadNone.o" ; then - if test "$GCC" = "yes" ; then - case $system in - AIX-*) - ;; - BSD/OS*) - ;; - IRIX*) - ;; - NetBSD-*|FreeBSD-*|OpenBSD-*) - ;; - Rhapsody-*|Darwin-*) - ;; - RISCos-*) - ;; - SCO_SV-3.2*) - ;; - ULTRIX-4.*) - ;; - windows) - if test "$MINGW32" != "yes"; then - SHLIB_CFLAGS="-fPIC" - fi - ;; - *) - SHLIB_CFLAGS="-fPIC" - ;; - esac - fi - fi - - if test "$SHARED_LIB_SUFFIX" = "" ; then - SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}' - fi - if test "$UNSHARED_LIB_SUFFIX" = "" ; then - UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' - fi - - - - - - - - SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)' - - - - - - - - -TDOM_LD_SEARCH_FLAGS=${LD_SEARCH_FLAGS} - - -#-------------------------------------------------------------------- -# Set the default compiler switches based on the --enable-symbols option. -#-------------------------------------------------------------------- - - - if test x"${TEA_INITED}" = x ; then - # Can't refer to exact macro name or it will be substituted - { echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; } - fi - - if test "${TEA_PLATFORM}" = "windows" ; then - tcl_dbgx=d - else - tcl_dbgx=g - fi - - echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:3431: checking for build with symbols" >&5 - # Check whether --enable-symbols or --disable-symbols was given. -if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval -else - tcl_ok=no -fi - - if test "$tcl_ok" = "yes"; then - CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' - LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' - DBGX=${tcl_dbgx} - TCL_DBGX=${tcl_dbgx} - echo "$ac_t""yes" 1>&6 - else - CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' - LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - DBGX="" - TCL_DBGX="" - echo "$ac_t""no" 1>&6 - fi - - - - - - -if test "${SHARED_BUILD}" = "1" ; then - CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}' -else - CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}' -fi - - -#-------------------------------------------------------------------- -# Everyone should be linking against the Tcl stub library. If you -# can't for some reason, remove this definition. If you aren't using -# stubs, you also need to modify the SHLIB_LD_LIBS setting below to -# link against the non-stubbed Tcl library. Add Tk too if necessary. -#-------------------------------------------------------------------- - -#AC_DEFINE(USE_TCL_STUBS) -#AC_DEFINE(USE_TK_STUBS) - -#-------------------------------------------------------------------- -# This macro generates a line to use when building a library. It -# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, -# and TEA_LOAD_TCLCONFIG macros above. -# For tDOM we always build both, static and shared libraries -#-------------------------------------------------------------------- - - - if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then - MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)" - MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)" - MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)" - else - MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)" - MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}" - MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)" - fi - - if test "${SHARED_BUILD}" = "1" ; then - MAKE_LIB="${MAKE_SHARED_LIB} " - else - MAKE_LIB="${MAKE_STATIC_LIB} " - fi - - #-------------------------------------------------------------------- - # Shared libraries and static libraries have different names. - # Use the double eval to make sure the ${DBGX} in the suffix is - # substituted. - #-------------------------------------------------------------------- - - if test "${TEA_PLATFORM}" = "windows" ; then - if test "${SHARED_BUILD}" = "1" ; then - # We force the unresolved linking of symbols that are really in - # the private libraries of Tcl and Tk. - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" - if test x"${TK_BIN_DIR}" != x ; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" - fi - eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}" - RANLIB=: - else - eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}" - fi - # Some packages build there own stubs libraries - eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}" - else - if test "${SHARED_BUILD}" = "1" ; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}" - if test x"${TK_BIN_DIR}" != x ; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}" - fi - eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}" - RANLIB=: - else - eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}" - fi - # Some packages build there own stubs libraries - eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}" - fi - - - - - - - -#-------------------------------------------------------------------- -# __CHANGE__ -# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary. -#-------------------------------------------------------------------- - -#LIBS="${LIBS} -lsuperfly" - -#-------------------------------------------------------------------- -# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl -# file during the install process. Don't run the TCLSH_PROG through -# ${CYGPATH} because it's being used directly by make. -# Require that we use a tclsh shell version 8.2 or later since earlier -# versions have bugs in the pkg_mkIndex routine. -# Add WISH as well if this is a Tk extension. -#-------------------------------------------------------------------- - - - echo $ac_n "checking for tclsh""... $ac_c" 1>&6 -echo "configure:3560: checking for tclsh" >&5 - - if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'` - for dir in $search_path ; do - for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \ - `ls -r $dir/tclsh*${EXEEXT} 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 - echo "$ac_t""$TCLSH_PROG" 1>&6 - else - { echo "configure: error: No tclsh found in PATH: $search_path" 1>&2; exit 1; } - fi - - -#TEA_PROG_WISH - -#-------------------------------------------------------------------- -# Add some private include directories -#-------------------------------------------------------------------- - -TDOM_INCLUDES="-I${srcdir}/generic -I${srcdir}/expat" - - -#-------------------------------------------------------------------- -# Add optional AOLserver includes -#-------------------------------------------------------------------- - - - echo $ac_n "checking for AOLserver configuration""... $ac_c" 1>&6 -echo "configure:3605: checking for AOLserver configuration" >&5 - # Check whether --with-aol or --without-aol was given. -if test "${with_aol+set}" = set; then - withval="$with_aol" - \ - with_aolserver=${withval} -fi - - - if eval "test \"`echo '$''{'ac_cv_c_aolserver'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - if test x"${with_aolserver}" != x ; then - if test -f "${with_aolserver}/include/ns.h" ; then - ac_cv_c_aolserver=`(cd ${with_aolserver}; pwd)` - else - { echo "configure: error: ${with_aolserver} directory doesn't contain ns.h" 1>&2; exit 1; } - fi - fi - -fi - - if test x"${ac_cv_c_aolserver}" = x ; then - echo "$ac_t""none found" 1>&6 - else - AOL_DIR=${ac_cv_c_aolserver} - echo "$ac_t""found AOLserver in $AOL_DIR" 1>&6 - cat >> confdefs.h <<\EOF -#define NS_AOLSERVER 1 -EOF - - cat >> confdefs.h <<\EOF -#define USE_NORMAL_ALLOCATOR 1 -EOF - - fi - -if test x"${AOL_DIR}" != "x" ; then - AOL_INCLUDES="-I${AOL_DIR}/include" -else - AOL_INCLUDES= -fi - - - -#-------------------------------------------------------------------- -# Add some private preprocessor options -#-------------------------------------------------------------------- - - - echo $ac_n "checking wether to enable dtd support""... $ac_c" 1>&6 -echo "configure:3657: checking wether to enable dtd support" >&5 - # Check whether --enable-dtd or --disable-dtd was given. -if test "${enable_dtd+set}" = set; then - enableval="$enable_dtd" - tcl_ok=$enableval -else - tcl_ok=yes -fi - - - if test "${enable_dt+set}" = set; then - enableval="$enable_dtd" - tcl_ok=$enableval - else - tcl_ok=yes - fi - - if test "$tcl_ok" = "yes" ; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define XML_DTD 1 -EOF - - else - echo "$ac_t""no" 1>&6 - fi - - - echo $ac_n "checking wether to enable namespace support""... $ac_c" 1>&6 -echo "configure:3686: checking wether to enable namespace support" >&5 - # Check whether --enable-ns or --disable-ns was given. -if test "${enable_ns+set}" = set; then - enableval="$enable_ns" - tcl_ok=$enableval -else - tcl_ok=yes -fi - - - if test "${enable_ns+set}" = set; then - enableval="$enable_ns" - tcl_ok=$enableval - else - tcl_ok=yes - fi - - if test "$tcl_ok" = "yes" ; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define XML_NS 1 -EOF - - else - echo "$ac_t""no" 1>&6 - fi - - - echo $ac_n "checking wether to enable built-in unknown command""... $ac_c" 1>&6 -echo "configure:3715: checking wether to enable built-in unknown command" >&5 - # Check whether --enable-ucmd or --disable-ucmd was given. -if test "${enable_ucmd+set}" = set; then - enableval="$enable_ucmd" - tcl_ok=$enableval -else - tcl_ok=no -fi - - - if test "${enable_unknown+set}" = set; then - enableval="$enable_unknown" - tcl_ok=$enableval - else - tcl_ok=no - fi - - if test "$tcl_ok" = "no" ; then - echo "$ac_t""no" 1>&6 - cat >> confdefs.h <<\EOF -#define TDOM_NO_UNKNOWN_CMD 1 -EOF - - else - echo "$ac_t""yes" 1>&6 - fi - - - echo $ac_n "checking wether to enable tDOMs block allocator""... $ac_c" 1>&6 -echo "configure:3744: checking wether to enable tDOMs block allocator" >&5 - # Check whether --enable-tdomalloc or --disable-tdomalloc was given. -if test "${enable_tdomalloc+set}" = set; then - enableval="$enable_tdomalloc" - tcl_ok=$enableval -else - tcl_ok=yes -fi - - - if test "${enable_tdomalloc+set}" = set; then - enableval="$enable_tdomalloc" - tcl_ok=$enableval - else - tcl_ok=yes - fi - - if test "$tcl_ok" = "yes" ; then - echo "$ac_t""yes" 1>&6 - else - echo "$ac_t""no" 1>&6 - cat >> confdefs.h <<\EOF -#define USE_NORMAL_ALLOCATOR 1 -EOF - - fi - -echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3772: checking whether byte ordering is bigendian" >&5 -if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -cat > conftest.$ac_ext < -#include -int main() { - -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif -; return 0; } -EOF -if { (eval echo configure:3790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. -cat > conftest.$ac_ext < -#include -int main() { - -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif -; return 0; } -EOF -if { (eval echo configure:3805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_bigendian=no -fi -rm -f conftest* -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -if test $ac_cv_c_bigendian = unknown; then -if test "$cross_compiling" = yes; then - echo $ac_n "cross-compiling... " 2>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_c_bigendian=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_bigendian=yes -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 -if test $ac_cv_c_bigendian = unknown; then -echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 -echo "configure:3856: checking to probe for byte ordering" >&5 - -cat >conftest.c <&6 - ac_cv_c_bigendian=yes - fi - if test `grep -l LiTTleEnDian conftest.o` ; then - echo $ac_n ' little endian probe OK, ' 1>&6 - if test $ac_cv_c_bigendian = yes ; then - ac_cv_c_bigendian=unknown; - else - ac_cv_c_bigendian=no - fi - fi - echo $ac_n 'guessing bigendian ... ' >&6 - fi - fi -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 -fi -if test $ac_cv_c_bigendian = yes; then - cat >> confdefs.h <<\EOF -#define WORDS_BIGENDIAN 1 -EOF - - BYTEORDER=4321 -else - BYTEORDER=1234 -fi -if test $ac_cv_c_bigendian = unknown; then - { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; } -fi - - - -#-------------------------------------------------------------------- -# Finally, substitute all of the various values into the Makefile. -# You may alternatively have a special pkgIndex.tcl.in or other files -# which require substituting th AC variables in. Include these here. -#-------------------------------------------------------------------- - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile tdomConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CONFIGDIR@%$CONFIGDIR%g -s%@PACKAGE@%$PACKAGE%g -s%@TDOMSHELL@%$TDOMSHELL%g -s%@MAJOR_VERSION@%$MAJOR_VERSION%g -s%@MINOR_VERSION@%$MINOR_VERSION%g -s%@PATCHLEVEL@%$PATCHLEVEL%g -s%@tdom_LIB_FILE@%$tdom_LIB_FILE%g -s%@tdomstub_LIB_FILE@%$tdomstub_LIB_FILE%g -s%@CYGPATH@%$CYGPATH%g -s%@EXEEXT@%$EXEEXT%g -s%@TCL_VERSION@%$TCL_VERSION%g -s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g -s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g -s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g -s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g -s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g -s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g -s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g -s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g -s%@TCL_LIBS@%$TCL_LIBS%g -s%@TCL_DEFS@%$TCL_DEFS%g -s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g -s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g -s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g -s%@CC@%$CC%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@SET_MAKE@%$SET_MAKE%g -s%@RANLIB@%$RANLIB%g -s%@OBJEXT@%$OBJEXT%g -s%@TCL_INCLUDES@%$TCL_INCLUDES%g -s%@CLEANFILES@%$CLEANFILES%g -s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g -s%@VERSION@%$VERSION%g -s%@tdomstub_BUILD_SPEC@%$tdomstub_BUILD_SPEC%g -s%@tdomstub_FILE_SPEC@%$tdomstub_FILE_SPEC%g -s%@tdom_SRC_DIR@%$tdom_SRC_DIR%g -s%@TCL_THREADS@%$TCL_THREADS%g -s%@AR@%$AR%g -s%@CPP@%$CPP%g -s%@DL_LIBS@%$DL_LIBS%g -s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g -s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g -s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g -s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g -s%@STLIB_LD@%$STLIB_LD%g -s%@SHLIB_LD@%$SHLIB_LD%g -s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g -s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g -s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g -s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g -s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g -s%@TDOM_LD_SEARCH_FLAGS@%$TDOM_LD_SEARCH_FLAGS%g -s%@TCL_DBGX@%$TCL_DBGX%g -s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g -s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g -s%@SHARED_BUILD@%$SHARED_BUILD%g -s%@MAKE_LIB@%$MAKE_LIB%g -s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g -s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g -s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g -s%@TCLSH_PROG@%$TCLSH_PROG%g -s%@TDOM_INCLUDES@%$TDOM_INCLUDES%g -s%@AOL_DIR@%$AOL_DIR%g -s%@AOL_INCLUDES@%$AOL_INCLUDES%g -s%@BYTEORDER@%$BYTEORDER%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - Index: configure.in ================================================================== --- configure.in +++ configure.in @@ -94,11 +94,10 @@ # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- TEA_ADD_SOURCES([generic/xmlsimple.c \ - generic/utf8conv.c \ generic/dom.c \ generic/domhtml.c \ generic/domhtml5.c \ generic/domjson.c \ generic/domxpath.c \ Index: doc/dom.html ================================================================== --- doc/dom.html +++ doc/dom.html @@ -335,29 +335,10 @@ ?objVar?
Creates a new 'empty' DOM document object without any element node. objVar controls the memory handling as explained above.
- -
-dom setResultEncoding ?encodingName?
-
This option is for backward compatibility with Tcl - 8.0. If tDOM is build with any newer Tcl version this option - does not has any effect. If encodingName is not given - the current global result encoding is returned. Otherwise - the global result encoding is set to encodingName. - All character data, attribute values etc. will then be - converted from UTF-8, which is delivered from the Expat XML - parser, to the given 8 bit encoding at XML/DOM parse time. - Valid values for encodingName are: utf-8, ascii, - cp1250, cp1251, cp1252, cp1253, cp1254, cp1255, cp1256, - cp437, cp850, en, iso8859-1, iso8859-2, iso8859-3, - iso8859-4, iso8859-5, iso8859-6, iso8859-7, iso8859-8, - iso8859-9, koi8-r.
- - -
dom createNodeCmd ?-returnNodeCmd? ?-tagName name? ?-jsonType jsonType? ?-namespace URI? (element|comment|text|cdata|pi)Node commandName
This method creates Tcl commands, which in turn create Index: doc/dom.n ================================================================== --- doc/dom.n +++ doc/dom.n @@ -419,25 +419,10 @@ .TP \&\fB\fBdom\fP \fBcreateDocumentNode\fP ?\fIobjVar\fB? \&\fRCreates a new 'empty' DOM document object without any element node. \fIobjVar\fR controls the memory handling as explained above. .TP -\&\fB\fBdom\fP \fBsetResultEncoding\fP ?\fIencodingName\fB? -\&\fRThis option is for backward compatibility with Tcl -8.0. If tDOM is build with any newer Tcl version this option -does not has any effect. If \fIencodingName\fR is not given -the current global result encoding is returned. Otherwise -the global result encoding is set to \fIencodingName\fR. -All character data, attribute values etc. will then be -converted from UTF-8, which is delivered from the Expat XML -parser, to the given 8 bit encoding at XML/DOM parse time. -Valid values for \fIencodingName\fR are: utf-8, ascii, -cp1250, cp1251, cp1252, cp1253, cp1254, cp1255, cp1256, -cp437, cp850, en, iso8859-1, iso8859-2, iso8859-3, -iso8859-4, iso8859-5, iso8859-6, iso8859-7, iso8859-8, -iso8859-9, koi8-r. -.TP \&\fB\fBdom\fP \fBcreateNodeCmd\fP \fI?-returnNodeCmd?\fB \fI?-tagName name?\fB \fI?-jsonType jsonType?\fB \fI?-namespace URI?\fB \fI(element|comment|text|cdata|pi)Node\fB \fIcommandName\fB \&\fRThis method creates Tcl commands, which in turn create tDOM nodes. Tcl commands created by this command are only available inside a script given to the domNode methods \&\fIappendFromScript\fR or \fIinsertBeforeFromScript\fR. If Index: doc/dom.xml ================================================================== --- doc/dom.xml +++ doc/dom.xml @@ -325,27 +325,10 @@ ?objVar? Creates a new 'empty' DOM document object without any element node. objVar controls the memory handling as explained above. - - dom setResultEncoding ?encodingName? - This option is for backward compatibility with Tcl - 8.0. If tDOM is build with any newer Tcl version this option - does not has any effect. If encodingName is not given - the current global result encoding is returned. Otherwise - the global result encoding is set to encodingName. - All character data, attribute values etc. will then be - converted from UTF-8, which is delivered from the Expat XML - parser, to the given 8 bit encoding at XML/DOM parse time. - Valid values for encodingName are: utf-8, ascii, - cp1250, cp1251, cp1252, cp1253, cp1254, cp1255, cp1256, - cp437, cp850, en, iso8859-1, iso8859-2, iso8859-3, - iso8859-4, iso8859-5, iso8859-6, iso8859-7, iso8859-8, - iso8859-9, koi8-r. - - dom createNodeCmd ?-returnNodeCmd? ?-tagName name? ?-jsonType jsonType? ?-namespace URI? (element|comment|text|cdata|pi)Node commandName This method creates Tcl commands, which in turn create tDOM nodes. Tcl commands created by this command are only Index: doc/tdomcmd.html ================================================================== --- doc/tdomcmd.html +++ doc/tdomcmd.html @@ -41,19 +41,10 @@

Returns the DOM tree as domDoc (see there) object.

- -
-tdom parserObj setResultEncoding -
- -

See the method setResultEncoding of the -dom command.

- -
tdom parserObj setStoreLineColumn ?boolean?

See the method setStoreLineColumn of the Index: doc/tdomcmd.n ================================================================== --- doc/tdomcmd.n +++ doc/tdomcmd.n @@ -193,18 +193,10 @@ \&\fR .RS .PP Returns the DOM tree as domDoc (see there) object. .RE -.TP -\&\fB\fBtdom\fP \fIparserObj\fB \fBsetResultEncoding\fP -\&\fR -.RS -.PP -See the method \fBsetResultEncoding\fR of the -\&\fBdom\fP command. -.RE .TP \&\fB\fBtdom\fP \fIparserObj\fB \fBsetStoreLineColumn\fP ?\fIboolean\fB? \&\fR .RS .PP Index: doc/tdomcmd.xml ================================================================== --- doc/tdomcmd.xml +++ doc/tdomcmd.xml @@ -38,17 +38,10 @@ tdom parserObj getdoc

Returns the DOM tree as domDoc (see there) object.

- - tdom parserObj setResultEncoding - -

See the method setResultEncoding of the -dom command.

-
- tdom parserObj setStoreLineColumn ?boolean?

See the method setStoreLineColumn of the dom command.

DELETED encodings/GenCompactCodings Index: encodings/GenCompactCodings ================================================================== --- encodings/GenCompactCodings +++ encodings/GenCompactCodings @@ -1,383 +0,0 @@ -#!/opt/tcl/bin/tclsh -#----------------------------------------------------------------------------- -# Copyright (c) 1999 Jochen C. Loewer (loewerj@hotmail.com) -#----------------------------------------------------------------------------- -# -# -# Script to generate 'space and time optimal' C code for fixed -# converting tables from Unicode to 8bit encodings (ISO-8859*,CP850...) -# from the Tcl 8.2 encoding files (*.enc) -# -# -# -# The contents of this file are subject to the Mozilla Public License -# Version 1.1 (the "License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -# License for the specific language governing rights and limitations -# under the License. -# -# The Original Code is tDOM. -# -# The Initial Developer of the Original Code is Jochen Loewer -# Portions created by Jochen Loewer are Copyright (C) 1998, 1999 -# Jochen Loewer. All Rights Reserved. -# -# Contributor(s): -# -# -# written by Jochen Loewer -# November, 1999 -# -#----------------------------------------------------------------------------- - - - -#----------------------------------------------------------------------------- -# Log -# -#----------------------------------------------------------------------------- -proc Log { message } { - puts stderr $message -} - - -#----------------------------------------------------------------------------- -# HexValue -# -#----------------------------------------------------------------------------- -proc HexValue { v } { - return [format "0x%2X" $v] -} - - -#----------------------------------------------------------------------------- -# HEX -# -#----------------------------------------------------------------------------- -proc HEX { v } { - return [format "\\%03o" $v] -} - - -#----------------------------------------------------------------------------- -# ReadEncodingFile -# -#----------------------------------------------------------------------------- -proc ReadEncodingFile { encodingFile info_var map_var } { - - upvar $info_var info $map_var map - - catch { unset info } - catch { unset map } - - set info(max) 0 - - Log "Reading encoding file $encodingFile ..." - - set fd [open $encodingFile r] - - #-------------------------------------------------------------- - # read header - # - #-------------------------------------------------------------- - set line [gets $fd] ;# ignore comment line - - set line [gets $fd] - - if {$line != "S"} { - error "Only single byte encodings are supported" - } - set line [gets $fd] - scan $line "%s %d %d" fbHex info(symbol) info(npages) - - set fb [binary format H2 [string range $fbHex 2 4]] - binary scan $fb c info(fallback) - - #-------------------------------------------------------------- - # read each single mapping page - # - #-------------------------------------------------------------- - for {set p 0} {$p < $info(npages)} {incr p} { - - set line [gets $fd] - - binary scan [binary format H2 $line] c page - - #---------------------------------------------------- - # read 16 * 16 hex number -> 256 mappings - # - #---------------------------------------------------- - for {set l 0} {$l < 16} {incr l} { - - set line [gets $fd] - - for {set k 0} {$k < 16} {incr k} { - - set hex [string range $line 0 3] - set line [string range $line 4 end] - binary scan [binary format H4 $hex] S from - set to [expr ($page << 8) + ($l * 16) + $k] - Log "$from -> $to" - - #------------------------------ - # set mapping - #------------------------------ - set map($from) $to - - if {$from > $info(max)} {set info(max) $from} - } - } - } - close $fd - Log "fallback='$info(fallback)' max=$info(max) symbol=$info(symbol) npages=$info(npages)" - Log "Reading done." - Log "" -} - - - - -#----------------------------------------------------------------------------- -# BuildInitalRanges -# -#----------------------------------------------------------------------------- -proc BuildInitalRanges { info_var map_var} { - - upvar $info_var info $map_var map - - set mode different - set last -1 - - set ranges {} - - for {set from 1} {$from <= $info(max)} {incr from} { - if {![info exists map($from)]} { - set to $info(fallback) - } else { - set to $map($from) - } - if {$mode == "identic"} { - if {$from == $to} { - set last $from - } else { - lappend ranges [list $identicStart [expr $last - $identicStart +1] {}] - Log "$identicStart, $last, IDENTIC, NULL, " - if {$to == $info(fallback)} { - set mode fallback - } else { - lappend ranges [list $from 1 $to] - Log "$from -> $to" - set mode different - } - } - } elseif {$mode == "different"} { - if {$from == $to} { - set identicStart $from - set last $from - set mode identic - } elseif {$to == $info(fallback)} { - set mode fallback - } else { - lappend ranges [list $from 1 $to] - Log"$from -> $to" - } - } else { - if {$to != $info(fallback)} { - if {$from == $to} { - set identicStart $from - set last $from - set mode identic - } else { - lappend ranges [list $from 1 $to] - Log "$from -> $to" - } - } - } - } - if {$mode == "identic"} { - lappend ranges [list $identicStart [expr $last - $identicStart +1] {}] - Log "$identicStart, $last, IDENTIC, NULL, " - } - return $ranges -} - - -#----------------------------------------------------------------------------- -# OptimizeRanges -# -#----------------------------------------------------------------------------- -proc OptimizeRanges { fallback ranges } { - - set newranges {} - set lastfrom {} - - foreach range $ranges { - foreach {from len values} $range break - - if {($len > 50) && ($values == {}) } { - if {$lastfrom != {} } { - lappend newranges [list $lastfrom $lastlen $lastvalues] - } - lappend newranges [list $from $len $values] - set lastfrom {} - } elseif {$lastfrom != {} } { - #Log "lastfrom=$lastfrom lastlen=$lastlen" - if { ($lastfrom + $lastlen + 20) > $from} { - - if {$lastvalues == {}} { - for {set j 0} {$j < $lastlen} {incr j} { - lappend lastvalues [expr $lastfrom + $j] - } - incr lastlen $lastlen - } - for {set i [expr $lastfrom + $lastlen]} {$i < $from} {incr i} { - lappend lastvalues $fallback - incr lastlen - } - if {$values == {}} { - for {set j 0} {$j < $len} {incr j} { - lappend lastvalues [expr $from + $j] - } - incr lastlen $len - } else { - set lastvalues [concat $lastvalues $values] - incr lastlen $len - } - } else { - lappend newranges [list $lastfrom $lastlen $lastvalues] - set lastfrom $from - set lastlen $len - set lastvalues $values - } - } else { - set lastfrom $from - set lastlen $len - set lastvalues $values - } - } - if {$lastfrom != {} } { - lappend newranges [list $lastfrom $lastlen $lastvalues] - } - return $newranges -} - - -#----------------------------------------------------------------------------- -# OutputCode -# -#----------------------------------------------------------------------------- -proc OutputCode { encVar fallback ranges } { - - puts "static TEncodingRule TDOM_UnicodeTo$encVar \[\] = \{" - - foreach range $ranges { - foreach {from len values} $range break - if {$values == {}} { - puts " \{ ENC_IDENTITY, $from, $len, \"\" \}, " - } else { - puts " \{ ENC_MAP, $from, $len, " - set i 0 - foreach value $values { - if {$i == 0} { - puts -nonewline " \"" - } - puts -nonewline "[HEX $value]" - incr i - if {$i == 14} { - puts -nonewline "\"\n" - set i 0 - } - } - if {$i > 0} { - puts -nonewline "\" \},\n" - } else { - puts -nonewline " \},\n" - } - } - } - puts " \{ ENC_END, 0, 0, NULL \} " - puts "\};\n" -} - - - -#----------------------------------------------------------------------------- -# begin of main part -#----------------------------------------------------------------------------- - - - puts "/*------------------------------------------------------------------------" - puts "| WARNING! This is file automatically generated by GenCompactCodings ! " - puts "| WARNING! Do not edit! " - puts "| " - puts "| Unicode(UTF) ---> 8bit code conversion tables " - puts "| " - puts "\\-----------------------------------------------------------------------*/" - - - set fallbacks {} - set encodings {} - - foreach encodingFile $argv { - - regsub {(\.enc)$} $encodingFile {} encoding - set encVar [string toupper $encoding] - regsub -- {-} $encVar {} encVar - - ReadEncodingFile $encodingFile info map - - foreach from [lsort -integer [array names map]] { - Log "$from -> $map($from)" - } - - #------------------------------------------- - # build the initial map ranges - #------------------------------------------- - set ranges [ BuildInitalRanges info map ] - - Log "Starting ranges [llength $ranges]:" - foreach range $ranges { - foreach {from len values} $range break - Log [format "%3d %3d '%s'" $from $len $values] - } - - #------------------------------------------- - # iterate to optimize ranges - #------------------------------------------- - for {set loop 0} {$loop < 4} {incr loop} { - set ranges [OptimizeRanges $info(fallback) $ranges] - } - - Log "End ranges [llength $ranges]:" - foreach range $ranges { - foreach {from len values} $range break - Log [format "%3d %3d '%s'\n" $from $len $values] - } - - lappend fallbacks $info(fallback) - lappend encodings $encoding $encVar - - OutputCode $encVar $info(fallback) $ranges - } - - puts "" - puts "static TEncoding TDOM_UnicodeTo8bitEncodings \[\] = \{" - foreach {encoding encVar} $encodings fallback $fallbacks { - puts stdout [format " { %-12s, %4s, %s }," \ - "\"$encoding\"" \ - [HexValue $fallback] \ - TDOM_UnicodeTo$encVar ] - - } - puts " { NULL, 0, NULL }" - puts "\};" - - -#----------------------------------------------------------------------------- -# end of main part -#----------------------------------------------------------------------------- - DELETED encodings/ascii.enc Index: encodings/ascii.enc ================================================================== --- encodings/ascii.enc +++ encodings/ascii.enc @@ -1,20 +0,0 @@ -# Encoding file: ascii, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E0000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 DELETED encodings/cp1250.enc Index: encodings/cp1250.enc ================================================================== --- encodings/cp1250.enc +++ encodings/cp1250.enc @@ -1,20 +0,0 @@ -# Encoding file: cp1250, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -00800081201A0083201E2026202020210088203001602039015A0164017D0179 -009020182019201C201D202220132014009821220161203A015B0165017E017A -00A002C702D8014100A4010400A600A700A800A9015E00AB000000AD00AE017B -00B000B102DB014200B400B500B600B700B80105015F00BB013D02DD013E017C -015400C100C2010200C40139010600C7010C00C9011800CB011A00CD00CE010E -01100143014700D300D4015000D600D70158016E00DA017000DC00DD016200DF -015500E100E2010300E4013A010700E7010D00E9011900EB011B00ED00EE010F -01110144014800F300F4015100F600F70159016F00FA017100FC00FD016302D9 DELETED encodings/cp1251.enc Index: encodings/cp1251.enc ================================================================== --- encodings/cp1251.enc +++ encodings/cp1251.enc @@ -1,20 +0,0 @@ -# Encoding file: cp1251, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -04020403201A0453201E2026202020210088203004092039040A040C040B040F -045220182019201C201D202220132014009821220459203A045A045C045B045F -00A0040E045E040800A4049000A600A7040100A9040400AB00AC00AD00AE0407 -00B000B104060456049100B500B600B704512116045400BB0458040504550457 -0410041104120413041404150416041704180419041A041B041C041D041E041F -0420042104220423042404250426042704280429042A042B042C042D042E042F -0430043104320433043404350436043704380439043A043B043C043D043E043F -0440044104420443044404450446044704480449044A044B044C044D044E044F DELETED encodings/cp1252.enc Index: encodings/cp1252.enc ================================================================== --- encodings/cp1252.enc +++ encodings/cp1252.enc @@ -1,20 +0,0 @@ -# Encoding file: cp1252, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -00800081201A0192201E20262020202102C62030016020390152008D008E008F -009020182019201C201D20222013201402DC21220161203A0153009D009E0178 -00A000A100A200A300A400A500A600A700A800A900AA00AB00AC00AD00AE00AF -00B000B100B200B300B400B500B600B700B800B900BA00BB00BC00BD00BE00BF -00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF -00D000D100D200D300D400D500D600D700D800D900DA00DB00DC00DD00DE00DF -00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF -00F000F100F200F300F400F500F600F700F800F900FA00FB00FC00FD00FE00FF DELETED encodings/cp1253.enc Index: encodings/cp1253.enc ================================================================== --- encodings/cp1253.enc +++ encodings/cp1253.enc @@ -1,20 +0,0 @@ -# Encoding file: cp1253, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -00800081201A0192201E20262020202100882030008A2039008C008D008E008F -009020182019201C201D20222013201400982122009A203A009C009D009E009F -00A00385038600A300A400A500A600A700A800A9000000AB00AC00AD00AE2015 -00B000B100B200B3038400B500B600B703880389038A00BB038C00BD038E038F -0390039103920393039403950396039703980399039A039B039C039D039E039F -03A003A1000003A303A403A503A603A703A803A903AA03AB03AC03AD03AE03AF -03B003B103B203B303B403B503B603B703B803B903BA03BB03BC03BD03BE03BF -03C003C103C203C303C403C503C603C703C803C903CA03CB03CC03CD03CE0000 DELETED encodings/cp1254.enc Index: encodings/cp1254.enc ================================================================== --- encodings/cp1254.enc +++ encodings/cp1254.enc @@ -1,20 +0,0 @@ -# Encoding file: cp1254, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -00800081201A0192201E20262020202102C62030016020390152008D008E008F -009020182019201C201D20222013201402DC21220161203A0153009D009E0178 -00A000A100A200A300A400A500A600A700A800A900AA00AB00AC00AD00AE00AF -00B000B100B200B300B400B500B600B700B800B900BA00BB00BC00BD00BE00BF -00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF -011E00D100D200D300D400D500D600D700D800D900DA00DB00DC0130015E00DF -00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF -011F00F100F200F300F400F500F600F700F800F900FA00FB00FC0131015F00FF DELETED encodings/cp1255.enc Index: encodings/cp1255.enc ================================================================== --- encodings/cp1255.enc +++ encodings/cp1255.enc @@ -1,20 +0,0 @@ -# Encoding file: cp1255, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -00800081201A0192201E20262020202102C62030008A2039008C008D008E008F -009020182019201C201D20222013201402DC2122009A203A009C009D009E009F -00A0000000A200A320AA00A500A600A700A800A9000000AB00AC00AD00AE00AF -00B000B100B200B300B400B500B600B7000000B9000000BB00BC00BD00BE0000 -05B005B105B205B305B405B505B605B705B805B905BA05BB05BC05BD05BE05BF -05C005C105C205C305F005F105F2000000000000000000000000000000000000 -05D005D105D205D305D405D505D605D705D805D905DA05DB05DC05DD05DE05DF -05E005E105E205E305E405E505E605E705E805E905EA00000000200E200F0000 DELETED encodings/cp1256.enc Index: encodings/cp1256.enc ================================================================== --- encodings/cp1256.enc +++ encodings/cp1256.enc @@ -1,20 +0,0 @@ -# Encoding file: cp1256, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -0080067E201A0192201E20262020202102C62030008A2039015206860698008F -06AF20182019201C201D20222013201400982122009A203A0153200C200D009F -00A0060C00A200A300A400A500A600A700A800A9000000AB00AC00AD00AE00AF -00B000B100B200B300B400B500B600B700B800B9061B00BB00BC00BD00BE061F -0000062106220623062406250626062706280629062A062B062C062D062E062F -063006310632063306340635063600D7063706380639063A0640064106420643 -00E0064400E2064506460647064800E700E800E900EA00EB0649064A00EE00EF -064B064C064D064E00F4064F065000F7065100F9065200FB00FC200E200F0000 DELETED encodings/cp437.enc Index: encodings/cp437.enc ================================================================== --- encodings/cp437.enc +++ encodings/cp437.enc @@ -1,20 +0,0 @@ -# Encoding file: cp437, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -00C700FC00E900E200E400E000E500E700EA00EB00E800EF00EE00EC00C400C5 -00C900E600C600F400F600F200FB00F900FF00D600DC00A200A300A520A70192 -00E100ED00F300FA00F100D100AA00BA00BF231000AC00BD00BC00A100AB00BB -259125922593250225242561256225562555256325512557255D255C255B2510 -25142534252C251C2500253C255E255F255A25542569256625602550256C2567 -2568256425652559255825522553256B256A2518250C25882584258C25902580 -03B100DF039303C003A303C300B503C403A6039803A903B4221E03C603B52229 -226100B1226522642320232100F7224800B0221900B7221A207F00B225A000A0 DELETED encodings/cp850.enc Index: encodings/cp850.enc ================================================================== --- encodings/cp850.enc +++ encodings/cp850.enc @@ -1,20 +0,0 @@ -# Encoding file: cp850, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -00C700FC00E900E200E400E000E500E700EA00EB00E800EF00EE00EC00C400C5 -00C900E600C600F400F600F200FB00F900FF00D600DC00F800A300D800D70192 -00E100ED00F300FA00F100D100AA00BA00BF00AE00AC00BD00BC00A100AB00BB -2591259225932502252400C100C200C000A9256325512557255D00A200A52510 -25142534252C251C2500253C00E300C3255A25542569256625602550256C00A4 -00F000D000CA00CB00C8013100CD00CE00CF2518250C2588258400A600CC2580 -00D300DF00D400D200F500D500B500FE00DE00DA00DB00D900FD00DD00AF00B4 -00AD00B1201700BE00B600A700F700B800B000A800B700B900B300B225A000A0 DELETED encodings/iso8859-1.enc Index: encodings/iso8859-1.enc ================================================================== --- encodings/iso8859-1.enc +++ encodings/iso8859-1.enc @@ -1,20 +0,0 @@ -# Encoding file: iso8859-1, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -0080008100820083008400850086008700880089008A008B008C008D008E008F -0090009100920093009400950096009700980099009A009B009C009D009E009F -00A000A100A200A300A400A500A600A700A800A900AA00AB00AC00AD00AE00AF -00B000B100B200B300B400B500B600B700B800B900BA00BB00BC00BD00BE00BF -00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF -00D000D100D200D300D400D500D600D700D800D900DA00DB00DC00DD00DE00DF -00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF -00F000F100F200F300F400F500F600F700F800F900FA00FB00FC00FD00FE00FF DELETED encodings/iso8859-2.enc Index: encodings/iso8859-2.enc ================================================================== --- encodings/iso8859-2.enc +++ encodings/iso8859-2.enc @@ -1,20 +0,0 @@ -# Encoding file: iso8859-2, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -0080008100820083008400850086008700880089008A008B008C008D008E008F -0090009100920093009400950096009700980099009A009B009C009D009E009F -00A0010402D8014100A4013D015A00A700A80160015E0164017900AD017D017B -00B0010502DB014200B4013E015B02C700B80161015F0165017A02DD017E017C -015400C100C2010200C40139010600C7010C00C9011800CB011A00CD00CE010E -01100143014700D300D4015000D600D70158016E00DA017000DC00DD016200DF -015500E100E2010300E4013A010700E7010D00E9011900EB011B00ED00EE010F -01110144014800F300F4015100F600F70159016F00FA017100FC00FD016302D9 DELETED encodings/iso8859-3.enc Index: encodings/iso8859-3.enc ================================================================== --- encodings/iso8859-3.enc +++ encodings/iso8859-3.enc @@ -1,20 +0,0 @@ -# Encoding file: iso8859-3, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -0080008100820083008400850086008700880089008A008B008C008D008E008F -0090009100920093009400950096009700980099009A009B009C009D009E009F -00A0012602D800A300A40000012400A700A80130015E011E013400AD0000017B -00B0012700B200B300B400B5012500B700B80131015F011F013500BD0000017C -00C000C100C2000000C4010A010800C700C800C900CA00CB00CC00CD00CE00CF -000000D100D200D300D4012000D600D7011C00D900DA00DB00DC016C015C00DF -00E000E100E2000000E4010B010900E700E800E900EA00EB00EC00ED00EE00EF -000000F100F200F300F4012100F600F7011D00F900FA00FB00FC016D015D02D9 DELETED encodings/iso8859-4.enc Index: encodings/iso8859-4.enc ================================================================== --- encodings/iso8859-4.enc +++ encodings/iso8859-4.enc @@ -1,20 +0,0 @@ -# Encoding file: iso8859-4, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -0080008100820083008400850086008700880089008A008B008C008D008E008F -0090009100920093009400950096009700980099009A009B009C009D009E009F -00A001040138015600A40128013B00A700A8016001120122016600AD017D00AF -00B0010502DB015700B40129013C02C700B80161011301230167014A017E014B -010000C100C200C300C400C500C6012E010C00C9011800CB011600CD00CE012A -01100145014C013600D400D500D600D700D8017200DA00DB00DC0168016A00DF -010100E100E200E300E400E500E6012F010D00E9011900EB011700ED00EE012B -01110146014D013700F400F500F600F700F8017300FA00FB00FC0169016B02D9 DELETED encodings/iso8859-5.enc Index: encodings/iso8859-5.enc ================================================================== --- encodings/iso8859-5.enc +++ encodings/iso8859-5.enc @@ -1,20 +0,0 @@ -# Encoding file: iso8859-5, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -0080008100820083008400850086008700880089008A008B008C008D008E008F -0090009100920093009400950096009700980099009A009B009C009D009E009F -00A0040104020403040404050406040704080409040A040B040C00AD040E040F -0410041104120413041404150416041704180419041A041B041C041D041E041F -0420042104220423042404250426042704280429042A042B042C042D042E042F -0430043104320433043404350436043704380439043A043B043C043D043E043F -0440044104420443044404450446044704480449044A044B044C044D044E044F -2116045104520453045404550456045704580459045A045B045C00A7045E045F DELETED encodings/iso8859-6.enc Index: encodings/iso8859-6.enc ================================================================== --- encodings/iso8859-6.enc +++ encodings/iso8859-6.enc @@ -1,20 +0,0 @@ -# Encoding file: iso8859-6, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0660066106620663066406650666066706680669003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -0080008100820083008400850086008700880089008A008B008C008D008E008F -0090009100920093009400950096009700980099009A009B009C009D009E009F -00A000000000000000A40000000000000000000000000000060C00AD00000000 -00000000000000000000000000000000000000000000061B000000000000061F -0000062106220623062406250626062706280629062A062B062C062D062E062F -0630063106320633063406350636063706380639063A00000000000000000000 -0640064106420643064406450646064706480649064A064B064C064D064E064F -0650065106520000000000000000000000000000000000000000000000000000 DELETED encodings/iso8859-7.enc Index: encodings/iso8859-7.enc ================================================================== --- encodings/iso8859-7.enc +++ encodings/iso8859-7.enc @@ -1,20 +0,0 @@ -# Encoding file: iso8859-7, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -0080008100820083008400850086008700880089008A008B008C008D008E008F -0090009100920093009400950096009700980099009A009B009C009D009E009F -00A002BD02BC00A30000000000A600A700A800A9000000AB00AC00AD00002015 -00B000B100B200B303840385038600B703880389038A00BB038C00BD038E038F -0390039103920393039403950396039703980399039A039B039C039D039E039F -03A003A1000003A303A403A503A603A703A803A903AA03AB03AC03AD03AE03AF -03B003B103B203B303B403B503B603B703B803B903BA03BB03BC03BD03BE03BF -03C003C103C203C303C403C503C603C703C803C903CA03CB03CC03CD03CE0000 DELETED encodings/iso8859-8.enc Index: encodings/iso8859-8.enc ================================================================== --- encodings/iso8859-8.enc +++ encodings/iso8859-8.enc @@ -1,20 +0,0 @@ -# Encoding file: iso8859-8, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -0080008100820083008400850086008700880089008A008B008C008D008E008F -0090009100920093009400950096009700980099009A009B009C009D009E009F -00A0000000A200A300A400A500A600A700A800A900D700AB00AC00AD00AE203E -00B000B100B200B300B400B500B600B700B800B900F700BB00BC00BD00BE0000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000002017 -05D005D105D205D305D405D505D605D705D805D905DA05DB05DC05DD05DE05DF -05E005E105E205E305E405E505E605E705E805E905EA00000000000000000000 DELETED encodings/iso8859-9.enc Index: encodings/iso8859-9.enc ================================================================== --- encodings/iso8859-9.enc +++ encodings/iso8859-9.enc @@ -1,20 +0,0 @@ -# Encoding file: iso8859-9, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -0080008100820083008400850086008700880089008A008B008C008D008E008F -0090009100920093009400950096009700980099009A009B009C009D009E009F -00A000A100A200A300A400A500A600A700A800A900AA00AB00AC00AD00AE00AF -00B000B100B200B300B400B500B600B700B800B900BA00BB00BC00BD00BE00BF -00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF -011E00D100D200D300D400D500D600D700D800D900DA00DB00DC0130015E00DF -00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF -011F00F100F200F300F400F500F600F700F800F900FA00FB00FC0131015F00FF DELETED encodings/koi8-r.enc Index: encodings/koi8-r.enc ================================================================== --- encodings/koi8-r.enc +++ encodings/koi8-r.enc @@ -1,20 +0,0 @@ -# Encoding file: koi8-r, single-byte -S -003F 0 1 -00 -0000000100020003000400050006000700080009000A000B000C000D000E000F -0010001100120013001400150016001700180019001A001B001C001D001E001F -0020002100220023002400250026002700280029002A002B002C002D002E002F -0030003100320033003400350036003700380039003A003B003C003D003E003F -0040004100420043004400450046004700480049004A004B004C004D004E004F -0050005100520053005400550056005700580059005A005B005C005D005E005F -0060006100620063006400650066006700680069006A006B006C006D006E006F -0070007100720073007400750076007700780079007A007B007C007D007E007F -25002502250C251025142518251C2524252C2534253C258025842588258C2590 -259125922593232025A02219221A22482264226500A0232100B000B200B700F7 -25502551255204512553255425552556255725582559255A255B255C255D255E -255F25602561040125622563256425652566256725682569256A256B256C00A9 -044E0430043104460434043504440433044504380439043A043B043C043D043E -043F044F044004410442044304360432044C044B04370448044D04490447044A -042E0410041104260414041504240413042504180419041A041B041C041D041E -041F042F042004210422042304160412042C042B04170428042D04290427042A Index: generic/dom.c ================================================================== --- generic/dom.c +++ generic/dom.c @@ -45,15 +45,12 @@ /*--------------------------------------------------------------------------- | Includes | \--------------------------------------------------------------------------*/ #include -#include -#include #include #include -#include #include /* #define DEBUG */ /*---------------------------------------------------------------------------- @@ -112,11 +109,10 @@ static char tdom_usage[] = "Usage tdom , where subCommand can be:\n" " enable \n" " getdoc \n" - " setResultEncoding \n" " setStoreLineColumn \n" ; /*--------------------------------------------------------------------------- @@ -152,11 +148,10 @@ domNode *currentNode; int depth; int ignoreWhiteSpaces; int cdataSection; Tcl_DString *cdata; - TEncoding *encoding_8bit; int storeLineColumn; int ignorexmlns; int feedbackAfter; Tcl_Obj *feedbackCmd; XML_Index nextFeedbackPosition; @@ -1247,13 +1242,10 @@ attrnode->nodeFlags = IS_NS_NODE; attrnode->namespace = ns->index; attrnode->nodeName = (char *)&(h->key); attrnode->parentNode = node; len = strlen(atPtr[1]); - if (TclOnly8Bits && info->encoding_8bit) { - tdom_Utf8to8Bit(info->encoding_8bit, atPtr[1], &len); - } attrnode->valueLength = len; attrnode->nodeValue = (char*)MALLOC(len+1); strcpy(attrnode->nodeValue, atPtr[1]); if (node->firstAttr) { lastAttr->nextSibling = attrnode; @@ -1355,13 +1347,10 @@ } attrnode->namespace = 0; attrnode->nodeName = (char *)&(h->key); attrnode->parentNode = node; len = strlen(atPtr[1]); - if (TclOnly8Bits && info->encoding_8bit) { - tdom_Utf8to8Bit(info->encoding_8bit, atPtr[1], &len); - } attrnode->valueLength = len; attrnode->nodeValue = (char*)MALLOC(len+1); strcpy(attrnode->nodeValue, (char *)atPtr[1]); if (node->firstAttr) { @@ -1512,13 +1501,10 @@ len = Tcl_DStringLength (info->cdata); if (!len && !info->cdataSection) return; s = Tcl_DStringValue (info->cdata); - if (TclOnly8Bits && info->encoding_8bit) { - tdom_Utf8to8Bit( info->encoding_8bit, s, &len); - } parentNode = info->currentNode; if (!parentNode) return; if ( parentNode->lastChild && parentNode->lastChild->nodeType == TEXT_NODE @@ -1624,13 +1610,10 @@ } DispatchPCDATA (info); len = strlen(s); - if (TclOnly8Bits && info->encoding_8bit) { - tdom_Utf8to8Bit(info->encoding_8bit, s, &len); - } parentNode = info->currentNode; if (info->storeLineColumn) { node = (domTextNode*) domAlloc(sizeof(domTextNode) + sizeof(domLineColumn)); @@ -1733,21 +1716,15 @@ Tcl_SetHashValue (h, tdomstrdup (XML_GetBase (info->parser))); node->nodeFlags |= HAS_BASEURI; } len = strlen(target); - if (TclOnly8Bits && info->encoding_8bit) { - tdom_Utf8to8Bit(info->encoding_8bit, target, &len); - } node->targetLength = len; node->targetValue = (char*)MALLOC(len); memmove(node->targetValue, target, len); len = strlen(data); - if (TclOnly8Bits && info->encoding_8bit) { - tdom_Utf8to8Bit(info->encoding_8bit, data, &len); - } node->dataLength = len; node->dataValue = (char*)MALLOC(len); memmove(node->dataValue, data, len); node->ownerDocument = info->document; @@ -1883,16 +1860,12 @@ Tcl_ListObjAppendElement(info->interp, cmdPtr, Tcl_NewObj()); } -#if TclOnly8Bits - result = Tcl_GlobalEvalObj(info->interp, cmdPtr); -#else result = Tcl_EvalObjEx (info->interp, cmdPtr, TCL_EVAL_DIRECT | TCL_EVAL_GLOBAL); -#endif Tcl_DecrRefCount(cmdPtr); if (result != TCL_OK) { info->status = result; @@ -2130,11 +2103,10 @@ XML_Parser parser, char *xml, int length, int ignoreWhiteSpaces, int keepCDATA, - TEncoding *encoding_8bit, int storeLineColumn, int ignorexmlns, int feedbackAfter, Tcl_Obj *feedbackCmd, Tcl_Channel channel, @@ -2149,16 +2121,14 @@ int done, tclLen; enum XML_Status status; size_t len; domReadInfo info; char buf[8192]; -#if !TclOnly8Bits Tcl_Obj *bufObj; Tcl_DString dStr; int useBinary; char *str; -#endif domDocument *doc = domCreateDoc(baseurl, storeLineColumn); if (extResolver) { doc->extResolver = tdomstrdup (Tcl_GetString (extResolver)); } @@ -2172,11 +2142,10 @@ info.depth = 0; info.ignoreWhiteSpaces = ignoreWhiteSpaces; info.cdata = (Tcl_DString*) MALLOC (sizeof (Tcl_DString)); Tcl_DStringInit (info.cdata); info.cdataSection = 0; - info.encoding_8bit = encoding_8bit; info.storeLineColumn = storeLineColumn; info.ignorexmlns = ignorexmlns; info.feedbackAfter = feedbackAfter; info.feedbackCmd = feedbackCmd; info.nextFeedbackPosition = feedbackAfter; @@ -2236,11 +2205,10 @@ return NULL; case XML_STATUS_OK: break; } } else { -#if !TclOnly8Bits Tcl_DStringInit (&dStr); if (Tcl_GetChannelOption (interp, channel, "-encoding", &dStr) != TCL_OK) { FREE ( (char*) info.activeNS ); FREE ( info.baseURIstack ); Tcl_DStringFree (info.cdata); @@ -2306,37 +2274,10 @@ break; } } while (!done); Tcl_DecrRefCount (bufObj); } -#else - do { - len = Tcl_Read (channel, buf, sizeof(buf)); - done = len < sizeof(buf); - str = Tcl_GetStringFromObj(bufObj, &tclLen); - switch (status) { - case XML_STATUS_SUSPENDED: - DBG(fprintf(stderr, "XML_STATUS_SUSPENDED\n");); - if (info.status == TCL_BREAK) { - Tcl_ResetResult(interp); - } - /* fall throu */ - case XML_STATUS_ERROR: - DBG(fprintf(stderr, "XML_STATUS_ERROR\n");) - FREE ( info.activeNS ); - FREE ( info.baseURIstack ); - Tcl_DStringFree (info.cdata); - FREE ( info.cdata); - domFreeDocument (doc, NULL, NULL); - Tcl_DecrRefCount (bufObj); - *resultcode = info.status; - return NULL; - case XML_STATUS_OK: - break; - } - } while (!done); -#endif } FREE ( info.activeNS ); FREE ( info.baseURIstack ); Tcl_DStringFree (info.cdata); FREE ( info.cdata); @@ -5206,11 +5147,10 @@ domNode *currentNode; int depth; int ignoreWhiteSpaces; int cdataSection; Tcl_DString *cdata; - TEncoding *encoding_8bit; int storeLineColumn; int ignorexmlns; int feedbackAfter; Tcl_Obj *feedbackCmd; int nextFeedbackPosition; @@ -5338,28 +5278,26 @@ ClientData dummy; Tcl_Interp *interp; int objc; Tcl_Obj *const objv[]; { - char *encodingName; CHandlerSet *handlerSet; int methodIndex, result, bool; tdomCmdReadInfo *info; TclGenExpatInfo *expat; Tcl_Obj *newObjName = NULL; - TEncoding *encoding; static const char *tdomMethods[] = { "enable", "getdoc", - "setResultEncoding", "setStoreLineColumn", + "setStoreLineColumn", "setExternalEntityResolver", "keepEmpties", "remove", "ignorexmlns", "keepCDATA", NULL }; enum tdomMethod { m_enable, m_getdoc, - m_setResultEncoding, m_setStoreLineColumn, + m_setStoreLineColumn, m_setExternalEntityResolver, m_keepEmpties, m_remove, m_ignorexmlns, m_keepCDATA }; if (objc < 3 || objc > 4) { @@ -5416,11 +5354,10 @@ info->depth = 0; info->ignoreWhiteSpaces = 1; info->cdataSection = 0; info->cdata = (Tcl_DString*) MALLOC (sizeof (Tcl_DString)); Tcl_DStringInit (info->cdata); - info->encoding_8bit = 0; info->storeLineColumn = 0; info->ignorexmlns = 0; info->feedbackAfter = 0; info->feedbackCmd = NULL; info->nextFeedbackPosition = 0; @@ -5457,45 +5394,10 @@ result = tcldom_returnDocumentObj (interp, info->document, 0, newObjName, 0, 0); info->document = NULL; return result; - case m_setResultEncoding: - info = CHandlerSetGetUserData (interp, objv[1], "tdom"); - if (!info) { - Tcl_SetResult (interp, "parser object isn't tdom enabled.", NULL); - return TCL_ERROR; - } - if (info->encoding_8bit == NULL) { - Tcl_AppendResult (interp, "UTF-8", NULL); - } - else { - Tcl_AppendResult (interp, - tdom_GetEncodingName (info->encoding_8bit), - NULL); - } - if (objc == 4) { - encodingName = Tcl_GetString(objv[3]); - - if ( (strcmp(encodingName, "UTF-8") == 0) - ||(strcmp(encodingName, "UTF8" ) == 0) - ||(strcmp(encodingName, "utf-8") == 0) - ||(strcmp(encodingName, "utf8" ) == 0)) { - - info->encoding_8bit = NULL; - } else { - encoding = tdom_GetEncoding ( encodingName ); - if (encoding == NULL) { - Tcl_AppendResult(interp, "encoding not found", NULL); - return TCL_ERROR; - } - info->encoding_8bit = encoding; - } - } - info->tdomStatus = 1; - break; - case m_setStoreLineColumn: info = CHandlerSetGetUserData (interp, objv[1], "tdom"); if (!info) { Tcl_SetResult (interp, "parser object isn't tdom enabled.", NULL); return TCL_ERROR; Index: generic/dom.h ================================================================== --- generic/dom.h +++ generic/dom.h @@ -35,13 +35,14 @@ #ifndef __DOM_H__ #define __DOM_H__ #include +#include +#include #include #include -#include #include /* * tDOM provides it's own memory allocator which is optimized for * low heap usage. It uses the native Tcl allocator underneath, @@ -134,30 +135,20 @@ #define XSLT_CMD(s,doc) sprintf((s), "XSLTcmd%p", (doc)) #define XML_NAMESPACE "http://www.w3.org/XML/1998/namespace" #define XMLNS_NAMESPACE "http://www.w3.org/2000/xmlns" -#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) || TCL_MAJOR_VERSION < 8 -#define TclOnly8Bits 1 -#else -#define TclOnly8Bits 0 -#endif - #define UTF8_1BYTE_CHAR(c) ( 0 == ((c) & 0x80)) #define UTF8_2BYTE_CHAR(c) ( 0xC0 == ((c) & 0xE0)) #define UTF8_3BYTE_CHAR(c) ( 0xE0 == ((c) & 0xF0)) #define UTF8_4BYTE_CHAR(c) ( 0xF0 == ((c) & 0xF8)) -#if TclOnly8Bits -#define UTF8_CHAR_LEN(c) 1 -#else #define UTF8_CHAR_LEN(c) \ UTF8_1BYTE_CHAR((c)) ? 1 : \ (UTF8_2BYTE_CHAR((c)) ? 2 : \ (UTF8_3BYTE_CHAR((c)) ? 3 : \ (UTF8_4BYTE_CHAR((c)) ? 4 : 0))) -#endif /* The following 2 defines are out of the expat code */ /* A 2 byte UTF-8 representation splits the characters 11 bits between the bottom 5 and 6 bits of the bytes. @@ -215,15 +206,11 @@ ? UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)(p)) \ : ((n) == 3 \ ? UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)(p)) \ : 0))) -#if TclOnly8Bits -# define UTF8_XMLCHAR(p,n) \ - (*(p) < 0x80 ? CharBit[(int)(*(p))] : 1) -#else -# define UTF8_XMLCHAR3(p) \ +#define UTF8_XMLCHAR3(p) \ (*(p) == 0xED \ ? ((p)[1] < 0xA0 ? 1 : 0) \ : (*(p) == 0xEF \ ? ((p)[1] == 0xBF \ ? ((p)[2] == 0xBE || (p)[2] == 0xBF ? 0 : 1) \ @@ -234,20 +221,19 @@ * utf-8 character beyond #xFFFF as valid, no matter, if Unicode has * (so far) defined a character for that encoding point. Additionally, * this define does not care about the discouraged characters beyond * #xFFFF (but after all, they are only discouraged, not * forbidden). */ -# define UTF8_XMLCHAR(p, n) \ +#define UTF8_XMLCHAR(p, n) \ ((n) == 1 \ ? CharBit[(int)(*(p))] \ : ((n) == 2 \ ? 1 \ : ((n) == 3 \ ? (UTF8_XMLCHAR3(p)) \ : ((n) == 4 \ ? 1 : 0)))) -#endif #include "../expat/nametab.h" static const unsigned char nameChar7Bit[] = { /* 0x00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -345,21 +331,14 @@ /* 0x70 */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* 0x78 */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, }; -#if TclOnly8Bits == 1 -# define isNameStart(x) (isalpha(*x) || ((*x)=='_') || ((*x)==':')) -# define isNameChar(x) (isalnum(*x) || ((*x)=='_') || ((*x)=='-') || ((*x)=='.') || ((*x)==':')) -# define isNCNameStart(x) (isalpha(*x) || ((*x)=='_')) -# define isNCNameChar(x) (isalnum(*x) || ((*x)=='_') || ((*x)=='-') || ((*x)=='.')) -#else -# define isNameStart(x) UTF8_GET_NAME_START((x),UTF8_CHAR_LEN(*(x))) -# define isNCNameStart(x) UTF8_GET_NCNAME_START((x),UTF8_CHAR_LEN(*(x))) -# define isNameChar(x) UTF8_GET_NAMING_NMTOKEN((x),UTF8_CHAR_LEN(*(x))) -# define isNCNameChar(x) UTF8_GET_NAMING_NCNMTOKEN((x),UTF8_CHAR_LEN(*(x))) -#endif +#define isNameStart(x) UTF8_GET_NAME_START((x),UTF8_CHAR_LEN(*(x))) +#define isNCNameStart(x) UTF8_GET_NCNAME_START((x),UTF8_CHAR_LEN(*(x))) +#define isNameChar(x) UTF8_GET_NAMING_NMTOKEN((x),UTF8_CHAR_LEN(*(x))) +#define isNCNameChar(x) UTF8_GET_NAMING_NCNMTOKEN((x),UTF8_CHAR_LEN(*(x))) #define IS_XML_WHITESPACE(c) ((c)==' ' || (c)=='\n' || (c)=='\r' || (c)=='\t') /*-------------------------------------------------------------------------- | DOMString @@ -730,11 +709,10 @@ domDocument * domReadDocument (XML_Parser parser, char *xml, int length, int ignoreWhiteSpaces, int keepCDATA, - TEncoding *encoding_8bit, int storeLineColumn, int ignoreXMLNS, int feedbackAfter, Tcl_Obj *feedbackCmd, Tcl_Channel channel, Index: generic/domhtml.c ================================================================== --- generic/domhtml.c +++ generic/domhtml.c @@ -98,15 +98,11 @@ | The size of the hash table. For best results this should | be a prime number which is about the same size as the number of | character entity references known to the system. | \---------------------------------------------------------------------------*/ -#if TclOnly8Bits -#define ER_HASH_SIZE 107 -#else #define ER_HASH_SIZE 257 -#endif /*---------------------------------------------------------------------------- | The following flag is TRUE if entity reference hash table needs | to be initialized. | @@ -163,108 +159,10 @@ { "amp", "&", 0 }, { "lt", "<", 0 }, { "gt", ">", 0 }, { "apos", "'", 0 }, { "quot", "\"", 0 }, -#if TclOnly8Bits - { "nbsp", "\240", 0 }, - { "iexcl", "\241", 0 }, /* inverted exclamation mark */ - { "cent", "\242", 0 }, /* cent sign */ - { "pound", "\243", 0 }, /* pound sterling sign */ - { "curren", "\244", 0 }, /* general currency sign */ - { "yen", "\245", 0 }, /* yen sign */ - { "brvbar", "\246", 0 }, /* broken (vertical) bar */ - { "sect", "\247", 0 }, /* section sign */ - { "uml", "\250", 0 }, /* umlaut (dieresis) */ - { "copy", "\251", 0 }, /* copyright sign */ - { "ordf", "\252", 0 }, /* ordinal indicator, feminine */ - { "laquo", "\253", 0 }, /* angle quotation mark, left */ - { "not", "\254", 0 }, /* not sign */ - { "shy", "\255", 0 }, /* soft hyphen */ - { "reg", "\256", 0 }, /* registered sign */ - { "macr", "\257", 0 }, /* macron */ - { "deg", "\260", 0 }, /* degree sign */ - { "plusmn", "\261", 0 }, /* plus-or-minus sign */ - { "sup2", "\262", 0 }, /* superscript two */ - { "sup3", "\263", 0 }, /* superscript three */ - { "acute", "\264", 0 }, /* acute accent */ - { "micro", "\265", 0 }, /* micro sign */ - { "para", "\266", 0 }, /* pilcrow (paragraph sign) */ - { "middot", "\267", 0 }, /* middle dot */ - { "cedil", "\270", 0 }, /* cedilla */ - { "sup1", "\271", 0 }, /* superscript one */ - { "ordm", "\272", 0 }, /* ordinal indicator, masculine */ - { "raquo", "\273", 0 }, /* angle quotation mark, right */ - { "frac14", "\274", 0 }, /* fraction one-quarter */ - { "frac12", "\275", 0 }, /* fraction one-half */ - { "frac34", "\276", 0 }, /* fraction three-quarters */ - { "iquest", "\277", 0 }, /* inverted question mark */ - { "Agrave", "\300", 0 }, /* capital A, grave accent */ - { "Aacute", "\301", 0 }, /* capital A, acute accent */ - { "Acirc", "\302", 0 }, /* capital A, circumflex accent */ - { "Atilde", "\303", 0 }, /* capital A, tilde */ - { "Auml", "\304", 0 }, /* capital A, dieresis or umlaut mark */ - { "Aring", "\305", 0 }, /* capital A, ring */ - { "AElig", "\306", 0 }, /* capital AE diphthong (ligature) */ - { "Ccedil", "\307", 0 }, /* capital C, cedilla */ - { "Egrave", "\310", 0 }, /* capital E, grave accent */ - { "Eacute", "\311", 0 }, /* capital E, acute accent */ - { "Ecirc", "\312", 0 }, /* capital E, circumflex accent */ - { "Euml", "\313", 0 }, /* capital E, dieresis or umlaut mark */ - { "Igrave", "\314", 0 }, /* capital I, grave accent */ - { "Iacute", "\315", 0 }, /* capital I, acute accent */ - { "Icirc", "\316", 0 }, /* capital I, circumflex accent */ - { "Iuml", "\317", 0 }, /* capital I, dieresis or umlaut mark */ - { "ETH", "\320", 0 }, /* capital Eth, Icelandic */ - { "Ntilde", "\321", 0 }, /* capital N, tilde */ - { "Ograve", "\322", 0 }, /* capital O, grave accent */ - { "Oacute", "\323", 0 }, /* capital O, acute accent */ - { "Ocirc", "\324", 0 }, /* capital O, circumflex accent */ - { "Otilde", "\325", 0 }, /* capital O, tilde */ - { "Ouml", "\326", 0 }, /* capital O, dieresis or umlaut mark */ - { "times", "\327", 0 }, /* multiply sign */ - { "Oslash", "\330", 0 }, /* capital O, slash */ - { "Ugrave", "\331", 0 }, /* capital U, grave accent */ - { "Uacute", "\332", 0 }, /* capital U, acute accent */ - { "Ucirc", "\333", 0 }, /* capital U, circumflex accent */ - { "Uuml", "\334", 0 }, /* capital U, dieresis or umlaut mark */ - { "Yacute", "\335", 0 }, /* capital Y, acute accent */ - { "THORN", "\336", 0 }, /* capital THORN, Icelandic */ - { "szlig", "\337", 0 }, /* small sharp s, German (sz ligature) */ - { "agrave", "\340", 0 }, /* small a, grave accent */ - { "aacute", "\341", 0 }, /* small a, acute accent */ - { "acirc", "\342", 0 }, /* small a, circumflex accent */ - { "atilde", "\343", 0 }, /* small a, tilde */ - { "auml", "\344", 0 }, /* small a, dieresis or umlaut mark */ - { "aring", "\345", 0 }, /* small a, ring */ - { "aelig", "\346", 0 }, /* small ae diphthong (ligature) */ - { "ccedil", "\347", 0 }, /* small c, cedilla */ - { "egrave", "\350", 0 }, /* small e, grave accent */ - { "eacute", "\351", 0 }, /* small e, acute accent */ - { "ecirc", "\352", 0 }, /* small e, circumflex accent */ - { "euml", "\353", 0 }, /* small e, dieresis or umlaut mark */ - { "igrave", "\354", 0 }, /* small i, grave accent */ - { "iacute", "\355", 0 }, /* small i, acute accent */ - { "icirc", "\356", 0 }, /* small i, circumflex accent */ - { "iuml", "\357", 0 }, /* small i, dieresis or umlaut mark */ - { "eth", "\360", 0 }, /* small eth, Icelandic */ - { "ntilde", "\361", 0 }, /* small n, tilde */ - { "ograve", "\362", 0 }, /* small o, grave accent */ - { "oacute", "\363", 0 }, /* small o, acute accent */ - { "ocirc", "\364", 0 }, /* small o, circumflex accent */ - { "otilde", "\365", 0 }, /* small o, tilde */ - { "ouml", "\366", 0 }, /* small o, dieresis or umlaut mark */ - { "divide", "\367", 0 }, /* divide sign */ - { "oslash", "\370", 0 }, /* small o, slash */ - { "ugrave", "\371", 0 }, /* small u, grave accent */ - { "uacute", "\372", 0 }, /* small u, acute accent */ - { "ucirc", "\373", 0 }, /* small u, circumflex accent */ - { "uuml", "\374", 0 }, /* small u, dieresis or umlaut mark */ - { "yacute", "\375", 0 }, /* small y, acute accent */ - { "thorn", "\376", 0 }, /* small thorn, Icelandic */ - { "yuml", "\377", 0 }, /* small y, dieresis or umlaut mark */ -#else { "nbsp", "\xC2\xA0", 0 }, { "iexcl", "\xC2\xA1", 0 }, { "cent", "\xC2\xA2", 0 }, { "pound", "\xC2\xA3", 0 }, { "curren", "\xC2\xA4", 0 }, @@ -511,11 +409,10 @@ { "loz", "\xE2\x97\x8A", 0 }, { "spades", "\xE2\x99\xA0", 0 }, { "clubs", "\xE2\x99\xA3", 0 }, { "hearts", "\xE2\x99\xA5", 0 }, { "diams", "\xE2\x99\xA6", 0 }, -#endif }; /*---------------------------------------------------------------------------- | ErInit -- @@ -641,13 +538,10 @@ for (j = from; j < i; j++) { z[to++] = z[j]; } from = i; } else { -#if TclOnly8Bits - z[to++] = value; -#else if (value < 0x80) { z[to++] = value; } else if (value <= 0x7FF) { z[to++] = (char) ((value >> 6) | 0xC0); z[to++] = (char) ((value | 0x80) & 0xBF); @@ -656,11 +550,10 @@ z[to++] = (char) (((value >> 6) | 0x80) & 0xBF); z[to++] = (char) ((value | 0x80) & 0xBF); } else { /* error */ } -#endif from = i+1; } } else { while (z[i] && isalpha((unsigned char)z[i])) { i++; Index: generic/domxpath.c ================================================================== --- generic/domxpath.c +++ generic/domxpath.c @@ -2856,19 +2856,15 @@ int left = 0; double dRight = 0.0; char *leftStr = NULL, *rightStr = NULL; const char *str; Tcl_DString dStr; -#if TclOnly8Bits - char *fStr; -#else int found, j; int lenstr, fromlen, utfCharLen; char utfBuf[TCL_UTF_MAX]; Tcl_DString tstr, tfrom, tto, tresult; Tcl_UniChar *ufStr, *upfrom, unichar; -#endif switch (step->intvalue) { case f_position: XPATH_ARITYCHECK(step,0,errMsg); @@ -2981,13 +2977,10 @@ xpathRSFree( &leftResult ); DBG(fprintf(stderr, "leftStr='%s'\n", leftStr);) if (step->intvalue == f_string) rsSetString (result, leftStr); else if (step->intvalue == f_stringLength) { -#if TclOnly8Bits - rsSetInt (result, strlen(leftStr)); -#else pto = leftStr; len = 0; while (*pto) { len++; i = UTF8_CHAR_LEN (*pto); @@ -2998,11 +2991,10 @@ return XPATH_I18N_ERR; } pto += i; } rsSetInt (result, len); -#endif } else { pwhite = 1; pfrom = pto = leftStr; while (*pfrom) { @@ -3406,34 +3398,13 @@ } from = 0; } } else { if (from < 0) from = 0; -#if TclOnly8Bits - len = strlen(leftStr) - from; -#else len = INT_MAX; -#endif - } - -#if TclOnly8Bits - if (from >= (int) strlen(leftStr)) { - rsSetString (result, ""); - FREE(leftStr); - return XPATH_OK; - } else { - if ( (len == INT_MAX) || ((from + len) > (int) strlen(leftStr)) ) { - len = strlen(leftStr) - from; - } - } - DBG(fprintf(stderr, "substring leftStr='%s' from=%d len=%d \n", - leftStr, from, len); - ) - - *(leftStr+from+len) = '\0'; - rsSetString (result, (leftStr+from)); -#else + } + pfrom = leftStr; while (*pfrom && (from > 0)) { i = UTF8_CHAR_LEN (*pfrom); if (!i) { FREE (leftStr); @@ -3458,11 +3429,10 @@ len--; } *pto = '\0'; } rsSetString (result, pfrom); -#endif FREE(leftStr); break; case f_translate: XPATH_ARITYCHECK(step,3,errMsg); @@ -3486,28 +3456,10 @@ leftStr = xpathFuncString( &leftResult ); rightStr = xpathFuncString( &rightResult ); replaceStr = xpathFuncString( &replaceResult ); -#if TclOnly8Bits - len = strlen(replaceStr); - pfrom = pto = leftStr; - while (*pfrom) { - fStr = strchr(rightStr, *pfrom); - if (fStr == NULL) { - *pto++ = *pfrom; - } else { - i = (fStr - rightStr); - if (i < len) { - *pto++ = *(replaceStr+i); - } - } - pfrom++; - } - *pto = '\0'; - rsSetString (result, leftStr); -#else Tcl_DStringInit (&tstr); Tcl_DStringInit (&tfrom); Tcl_DStringInit (&tto); Tcl_DStringInit (&tresult); @@ -3545,11 +3497,10 @@ rsSetString (result, Tcl_DStringValue (&tresult)); Tcl_DStringFree (&tstr); Tcl_DStringFree (&tfrom); Tcl_DStringFree (&tto); Tcl_DStringFree (&tresult); -#endif xpathRSFree( &replaceResult ); xpathRSFree( &rightResult ); xpathRSFree( &leftResult ); FREE(leftStr); FREE(rightStr); FREE(replaceStr); Index: generic/domxslt.c ================================================================== --- generic/domxslt.c +++ generic/domxslt.c @@ -47,15 +47,12 @@ /*---------------------------------------------------------------------------- | Includes | \---------------------------------------------------------------------------*/ #include -#include -#include #include #include -#include #include #include #include #include #include /* for hash tables */ @@ -302,23 +299,10 @@ | xsltDecimalFormat | \-------------------------------------------------------------------------*/ typedef struct xsltDecimalFormat { -#if TclOnly8Bits - char * name; - char * uri; - char decimalSeparator; - char groupingSeparator; - char * infinity; - char minusSign; - char * NaN; - char percent; - char zeroDigit; - char digit; - char patternSeparator; -#else char * name; char * uri; Tcl_UniChar decimalSeparator; Tcl_UniChar groupingSeparator; char * infinity; @@ -327,11 +311,10 @@ Tcl_UniChar percent; Tcl_UniChar perMille; Tcl_UniChar zeroDigit; Tcl_UniChar digit; Tcl_UniChar patternSeparator; -#endif /* TclOnly8Bits */ struct xsltDecimalFormat * next; } xsltDecimalFormat; @@ -1114,217 +1097,10 @@ /*---------------------------------------------------------------------------- | xsltFormatNumber | \---------------------------------------------------------------------------*/ -#if TclOnly8Bits -static int xsltFormatNumber ( - double number, - char * formatStr, - xsltDecimalFormat * df, - char ** resultStr, - int * resultLen, - char ** errMsg -) -{ - char *p, prefix[800], suffix[800], s[2400], n[800], f[800]; - char *negformat = NULL, save = '\0', save1; - int i, l, zl, g, nHash, nZero, fHash, fZero, gLen, isNeg; -/* struct lconv *lc = NULL; */ - char wrongFormat[] = "Unable to interpret format pattern."; - - DBG(fprintf(stderr, "\nformatStr='%s' \n", formatStr);) - if (number < 0.0) { - isNeg = 1; - number *= -1.0; - } else { - isNeg = 0; - } - p = formatStr; - while (*p) { - if (*p == df->patternSeparator) { - *p = '\0'; - negformat = ++p; - break; - } - p++; - } - /* Check for more than one patternSeparator in the formatStr */ - while (*p) { - if (*p == df->patternSeparator) { - *errMsg = tdomstrdup(wrongFormat); - return -1; - } - p++; - } - p = formatStr; - - i = 0; - while (*p - && (*p!=df->zeroDigit) - && (*p!=df->digit) - && (*p!=df->groupingSeparator) - && (*p!=df->decimalSeparator)) { - if (i<79) { prefix[i++] = *p; } - p++; - } - prefix[i] = '\0'; - nHash = nZero = fHash = fZero = 0; - gLen = -2222; - while (*p) { - if (*p==df->digit) { - if (nZero) {*errMsg = tdomstrdup(wrongFormat); return -1;} - nHash++;} - else if (*p==df->zeroDigit) { nZero++; } - else if (*p==df->groupingSeparator) { gLen=-1; } - else break; - p++; gLen++; - } - if (*p && (*p==df->decimalSeparator)) { - p++; - while (*p && (*p==df->zeroDigit)) { p++; fZero++; } - while (*p && (*p==df->digit)) { p++; fHash++; } - } - i = 0; - while (*p) { - if (i<79) { suffix[i++] = *p; } - p++; - } - suffix[i] = '\0'; - if (save) *p = save; - - if (isNeg && negformat) { - /* Only prefix and suffix are taken from the second format string */ - p++; - i = 0; - while (*p - && *p!=df->zeroDigit - && *p!=df->digit - && *p!=df->groupingSeparator - && *p!=df->decimalSeparator) { - if (i<79) { prefix[i++] = *p; } - p++; - } - prefix[i] = '\0'; - while (*p - && ((*p==df->zeroDigit) - || (*p==df->digit) - || (*p==df->groupingSeparator) - || (*p==df->decimalSeparator))) p++; - i = 0; - while (*p) { - if (i<79) { suffix[i++] = *p; } - p++; - } - suffix[i] = '\0'; - } - - if (isNeg) { - if (negformat) { - if (prefix[0]=='\0' && suffix[0]=='\0') { - prefix[0] = df->minusSign; - prefix[1] = '\0'; - } - } else { - i = 0; - save = prefix[0]; - prefix[0] = df->minusSign; - while (i < 79) { - i++; - if (save == '\0') { - prefix[i] = save; - break; - } - save1 = prefix[i]; - prefix[i] = save; - save = save1; - } - if (i == 79) prefix[79] = '\0'; - } - } - if (prefix[0]=='\xc2' && prefix[1]=='\xa4') { -/* lc = localeconv(); */ -/* if (strlen (lc->currency_symbol) > 79 */ -/* || lc->currency_symbol[0] == '\0') { */ - prefix[0] = '$'; - prefix[1] = '\0'; -/* } else { */ -/* strcpy (prefix, lc->currency_symbol); */ -/* } */ - } - - if (suffix[0] == df->percent) { - number *= 100.0; - } else - if (suffix[0]=='\xe2' && suffix[1]=='\x80' && suffix[2]=='\xb0') { - number *= 1000.0; - } - - if (fHash + fZero == 0) { - i = (int) (number+0.5); - } else { - i = (int) number; - } - DBG(fprintf(stderr,"normal part nZero=%d i=%d glen=%d\n", nZero, i, gLen);) - /* fill in grouping char */ - if (gLen > 0) { - if (i < 0.0) {isNeg = 1; i *= -1;} - else isNeg = 0; - sprintf(s,"%0*d", nZero, i); - l = strlen(s); - /* if (l > (nHash+nZero)) { l = nHash+nZero; } */ - DBG(fprintf(stderr,"s='%s isNeg=%d'\n", s, isNeg);) - zl = l + ((l-1) / gLen); - DBG(fprintf(stderr, "l=%d zl=%d \n", l, zl);) - n[zl--] = '\0'; - p = s + strlen(s) -1; - g = 0; - while (zl>=0) { - g++; - n[zl--] = *p--; - if ((g == gLen) && (zl>=1)) { - n[zl--] = df->groupingSeparator; - g = 0; - } - } - DBG(fprintf(stderr,"s='%s' --> n='%s'\n", s, n);) - - } else { - sprintf(n,"%0*d", nZero, i); - DBG(fprintf(stderr,"n='%s'\n", n);) - } - - DBG(fprintf(stderr, "number=%f Hash=%d fZero=%d \n", number, fHash, fZero);) - if ((fHash+fZero) > 0) { - i = (int) number; - /* format fraction part */ - if (number >= 0.0) { - sprintf(f,"%0.*f", fZero+fHash, number -i); - } else { - sprintf(f,"%0.*f", fZero+fHash, -1.0 * (number -i) ); - } - l = strlen(f); - while (l>0 && fHash>0) { /* strip not need 0's */ - if (f[l-1] == '0') { - f[l-1]='\0'; l--; fHash--; - } else { - break; - } - } - DBG(fprintf(stderr, "f='%s'\n", f);) - sprintf(s,"%s%s%c%s%s", prefix, n, df->decimalSeparator, &(f[2]), suffix); - } else { - sprintf(s,"%s%s%s", prefix, n, suffix); - } - DBG(fprintf(stderr, "returning s='%s' \n\n", s);) - *resultStr = tdomstrdup(s); - *resultLen = strlen(s); - return 0; -} - -#else - static int addCurrencySymbol ( Tcl_UniChar *p, Tcl_UniChar *result, int *i ) @@ -1748,13 +1524,10 @@ xsltFormatNumberError: Tcl_DStringFree (&dStr); Tcl_DStringFree (&s); return -1; } - -#endif /* TclOnly8Bits */ - static xsltNodeSet * createXsltNodeSet (void) { xsltNodeSet * ns; @@ -2521,31 +2294,17 @@ double realB, int * greater ) { int rc; -#if TclOnly8Bits == 0 char *strAptr, *strBptr; int lenA, lenB, len; Tcl_UniChar unicharA, unicharB; -#endif *greater = 0; if (typeText) { - -#if TclOnly8Bits - /* TODO: this only works for 7 bit ASCII */ - rc = STRCASECMP(strA, strB); - if (rc == 0) { - rc = strcmp (strA, strB); - if (!upperFirst) { - rc *= -1; - } - } -DBG( fprintf(stderr, "nodeGreater %d <-- strA='%s' strB='%s'\n", rc, strA, strB);) -#else lenA = Tcl_NumUtfChars (strA, -1); lenB = Tcl_NumUtfChars (strB, -1); len = (lenA < lenB ? lenA : lenB); rc = Tcl_UtfNcasecmp (strA, strB, len); if (rc == 0) { @@ -2568,11 +2327,10 @@ } if (!upperFirst) { rc *= -1; } } -#endif if (asc) *greater = (rc > 0); else *greater = (rc < 0); } else { DBG( fprintf(stderr, "nodeGreater realA='%f' realB='%f'\n",realA, realB);) @@ -5939,15 +5697,11 @@ Tcl_NewStringObj (href, strlen (href)) : Tcl_NewStringObj ("", 0))); Tcl_ListObjAppendElement (interp, cmdPtr, Tcl_NewStringObj ("", 0)); -#if TclOnly8Bits - result = Tcl_GlobalEvalObj(interp, cmdPtr); -#else result = Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT | TCL_EVAL_GLOBAL); -#endif Tcl_DecrRefCount (cmdPtr); resultObj = Tcl_GetObjResult (interp); Tcl_IncrRefCount (resultObj); @@ -6018,11 +5772,11 @@ extResolver = Tcl_NewStringObj(xsltDoc->extResolver, -1); Tcl_IncrRefCount (extResolver); } /* keep white space, no fiddling with the encoding (is this a good idea?) */ - doc = domReadDocument (parser, xmlstring, len, 0, 0, 0, storeLineColumn, + doc = domReadDocument (parser, xmlstring, len, 0, 0, storeLineColumn, 0, 0, NULL, chan, extbase, extResolver, 0, (int) XML_PARAM_ENTITY_PARSING_ALWAYS, interp, &resultcode); if (xsltDoc->extResolver) { Tcl_DecrRefCount (extResolver); @@ -6349,21 +6103,10 @@ if (df == NULL) { df = (xsltDecimalFormat*)MALLOC(sizeof(xsltDecimalFormat)); memset (df, 0, sizeof (xsltDecimalFormat)); newdf = 1; /* initialize to defaults */ -#if TclOnly8Bits - df->decimalSeparator = '.'; - df->groupingSeparator = ','; - df->infinity = "Infinity"; - df->minusSign = '-'; - df->NaN = "NaN"; - df->percent = '%'; - df->zeroDigit = '0'; - df->digit = '#'; - df->patternSeparator = ';'; -#else df->decimalSeparator = 46; df->groupingSeparator = 44; df->infinity = "Infinity"; df->minusSign = 45; df->NaN = "NaN"; @@ -6370,11 +6113,10 @@ df->percent = 37; df->perMille = 0x2030; df->zeroDigit = 48; df->digit = 35; df->patternSeparator = 59; -#endif /* TclOnly8Bits */ df->name = tdomstrdup(str); if (ns) df->uri = tdomstrdup(ns->uri); else df->uri = NULL; /* prepend into list of decimal format after the default one */ @@ -6385,169 +6127,104 @@ /* definitions for default decimal format */ df = xs->decimalFormats; } str = getAttr(node, "decimal-separator", a_decimalSeparator); if (str) { -#if TclOnly8Bits - if (str[1] != '\0') { - reportError (node, "decimal-separator has to be a" - " single char", errMsg); - if (newdf) FREE((char*)df); - return -1; - } - df->decimalSeparator = str[0]; -#else clen = UTF8_CHAR_LEN (str[0]); if (str[clen] != '\0') { reportError (node, "decimal-separator has to be a" " single char", errMsg); if (newdf) FREE((char*)df); return -1; } Tcl_UtfToUniChar (str, &df->decimalSeparator); -#endif /* TclOnly8Bits */ } str = getAttr(node, "grouping-separator", a_groupingSeparator); if (str) { -#if TclOnly8Bits - if (str[1] != '\0') { - reportError (node, "grouping-separator has to be a" - " single char", errMsg); - if (newdf) FREE((char*)df); - return -1; - } - df->groupingSeparator = str[0]; -#else clen = UTF8_CHAR_LEN (str[0]); if (str[clen] != '\0') { reportError (node, "groupingSeparator has to be a" " single char", errMsg); if (newdf) FREE((char*)df); return -1; } Tcl_UtfToUniChar (str, &df->groupingSeparator); -#endif /* TclOnly8Bits */ } str = getAttr(node, "infinity", a_infinity); if (str) df->infinity = str; str = getAttr(node, "minus-sign", a_minusSign); if (str) { -#if TclOnly8Bits - if (str[1] != '\0') { - reportError (node, "minus-sign has to be a single" - " char", errMsg); - return -1; - } - df->minusSign = str[0]; -#else clen = UTF8_CHAR_LEN (str[0]); if (str[clen] != '\0') { reportError (node, "minus-sign has to be a single" " char", errMsg); if (newdf) FREE((char*)df); return -1; } Tcl_UtfToUniChar (str, &df->minusSign); -#endif /* TclOnly8Bits */ } str = getAttr(node, "NaN", a_nan); if (str) df->NaN = str; str = getAttr(node, "percent", a_percent); if (str) { -#if TclOnly8Bits if (str[1] != '\0') { reportError (node, "percent has to be a single" " char", errMsg); return -1; } df->percent = str[0]; -#else clen = UTF8_CHAR_LEN (str[0]); if (str[clen] != '\0') { reportError (node, "percent has to be a single" " char", errMsg); if (newdf) FREE((char*)df); return -1; } Tcl_UtfToUniChar (str, &df->percent); -#endif /* TclOnly8Bits */ } str = getAttr(node, "per-mille", a_perMille); if (str) { -#if TclOnly8Bits - reportError (node, "User defined per-mille sign not" - " supported, sorry.", errMsg); - return -1; -#else clen = UTF8_CHAR_LEN (str[0]); if (str[clen] != '\0') { reportError (node, "per-mille has to be a single" " char", errMsg); if (newdf) FREE((char*)df); return -1; } Tcl_UtfToUniChar (str, &df->perMille); -#endif /* TclOnly8Bits */ } str = getAttr(node, "zero-digit", a_zeroDigit); if (str) { -#if TclOnly8Bits - if (str[1] != '\0') { - reportError (node, "zero-digit has to be a single" - " char", errMsg); - return -1; - } - df->zeroDigit = str[0]; -#else clen = UTF8_CHAR_LEN (str[0]); if (str[clen] != '\0') { reportError (node, "zero-digit has to be a single" " char", errMsg); if (newdf) FREE((char*)df); return -1; } Tcl_UtfToUniChar (str, &df->zeroDigit); -#endif /* TclOnly8Bits */ } str = getAttr(node, "digit", a_digit); if (str) { -#if TclOnly8Bits - if (str[1] != '\0') { - reportError (node, "digit has to be a single char", - errMsg); - return -1; - } - df->digit = str[0]; -#else clen = UTF8_CHAR_LEN (str[0]); if (str[clen] != '\0') { reportError (node, "digit has to be a single char", errMsg); if (newdf) FREE((char*)df); return -1; } Tcl_UtfToUniChar (str, &df->digit); -#endif /* TclOnly8Bits */ } str = getAttr(node, "pattern-separator", a_patternSeparator); if (str) { -#if TclOnly8Bits - if (str[1] != '\0') { - reportError (node, "pattern-separator has to be a" - " single char", errMsg); - return -1; - } - df->patternSeparator = str[0]; -#else clen = UTF8_CHAR_LEN (str[0]); if (str[clen] != '\0') { reportError (node, "pattern-separator has to be a" " single char", errMsg); return -1; } Tcl_UtfToUniChar (str, &df->patternSeparator); -#endif /* TclOnly8Bits */ } break; case import: if (nonImportElemSeen) { @@ -7335,28 +7012,18 @@ Tcl_InitHashTable ( &(xs->formats), TCL_STRING_KEYS); Tcl_InitHashTable ( &(xs->topLevelVars), TCL_STRING_KEYS); Tcl_InitHashTable ( &(xs->keyInfos), TCL_STRING_KEYS); xs->decimalFormats->name = NULL; xs->decimalFormats->uri = NULL; -#if TclOnly8Bits - xs->decimalFormats->decimalSeparator = '.'; - xs->decimalFormats->groupingSeparator = ','; - xs->decimalFormats->minusSign = '-'; - xs->decimalFormats->percent = '%'; - xs->decimalFormats->zeroDigit = '0'; - xs->decimalFormats->digit = '#'; - xs->decimalFormats->patternSeparator = ';'; -#else xs->decimalFormats->decimalSeparator = 46; xs->decimalFormats->groupingSeparator = 44; xs->decimalFormats->minusSign = 45; xs->decimalFormats->percent = 37; xs->decimalFormats->perMille = 0x2030; xs->decimalFormats->zeroDigit = 48; xs->decimalFormats->digit = 35; xs->decimalFormats->patternSeparator = 59; -#endif /* TclOnly8Bits */ xs->decimalFormats->infinity = "Infinity"; xs->decimalFormats->NaN = "NaN"; xs->decimalFormats->next = NULL; xs->indentOutput = 0; memset (&xs->doctype, 0, sizeof (domDocInfo)); DELETED generic/encodings.inc Index: generic/encodings.inc ================================================================== --- generic/encodings.inc +++ generic/encodings.inc @@ -1,531 +0,0 @@ -/*------------------------------------------------------------------------ -| WARNING! This is file automatically generated by GenCompactCodings ! -| WARNING! Do not edit! -| -| Unicode(UTF) ---> 8bit code conversion tables -| -\-----------------------------------------------------------------------*/ -static TEncodingRule TDOM_UnicodeToASCII [] = { - { ENC_IDENTITY, 1, 126, "" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToCP1250 [] = { - { ENC_IDENTITY, 1, 129, "" }, - { ENC_MAP, 131, 153, - "\203\077\077\077\210\077\077\077\077\077\077\077\220\077" - "\077\077\077\077\077\077\230\077\077\077\077\077\077\077" - "\240\077\077\077\244\077\246\247\250\251\077\253\077\255" - "\256\077\260\261\077\077\264\265\266\267\270\077\077\273" - "\077\077\077\077\077\301\302\077\304\077\077\307\077\311" - "\077\313\077\315\316\077\077\077\077\323\324\077\326\327" - "\077\077\332\077\334\335\077\337\077\341\342\077\344\077" - "\077\347\077\351\077\353\077\355\356\077\077\077\077\363" - "\364\077\366\367\077\077\372\077\374\375\077\077\077\077" - "\303\343\245\271\306\346\077\077\077\077\310\350\317\357" - "\320\360\077\077\077\077\077\077\312\352\314\354" }, - { ENC_MAP, 313, 70, - "\305\345\077\077\274\276\077\077\243\263\321\361\077\077" - "\322\362\077\077\077\077\077\077\077\325\365\077\077\300" - "\340\077\077\330\370\214\234\077\077\252\272\212\232\336" - "\376\215\235\077\077\077\077\077\077\077\077\331\371\333" - "\373\077\077\077\077\077\077\077\217\237\257\277\216\236" - }, - { ENC_MAP, 711, 23, - "\241\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\077\077\242\377\077\262\077\275" }, - { ENC_MAP, 8211, 40, - "\226\227\077\077\077\221\222\202\077\223\224\204\077\206" - "\207\225\077\077\077\205\077\077\077\077\077\077\077\077" - "\077\211\077\077\077\077\077\077\077\077\213\233" }, - { ENC_MAP, 8482, 1, - "\231" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToCP1251 [] = { - { ENC_IDENTITY, 1, 127, "" }, - { ENC_MAP, 136, 52, - "\210\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\230\077\077\077\077\077\077\077\240\077\077\077\244" - "\077\246\247\077\251\077\253\254\255\256\077\260\261\077" - "\077\077\265\266\267\077\077\077\273" }, - { ENC_MAP, 1025, 95, - "\250\200\201\252\275\262\257\243\212\214\216\215\077\241" - "\217\300\301\302\303\304\305\306\307\310\311\312\313\314" - "\315\316\317\320\321\322\323\324\325\326\327\330\331\332" - "\333\334\335\336\337\340\341\342\343\344\345\346\347\350" - "\351\352\353\354\355\356\357\360\361\362\363\364\365\366" - "\367\370\371\372\373\374\375\376\377\077\270\220\203\272" - "\276\263\277\274\232\234\236\235\077\242\237" }, - { ENC_MAP, 1168, 2, - "\245\264" }, - { ENC_MAP, 8211, 40, - "\226\227\077\077\077\221\222\202\077\223\224\204\077\206" - "\207\225\077\077\077\205\077\077\077\077\077\077\077\077" - "\077\211\077\077\077\077\077\077\077\077\213\233" }, - { ENC_MAP, 8470, 13, - "\271\077\077\077\077\077\077\077\077\077\077\077\231" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToCP1252 [] = { - { ENC_IDENTITY, 1, 129, "" }, - { ENC_MAP, 141, 18, - "\215\216\217\220\077\077\077\077\077\077\077\077\235\236" - }, - { ENC_IDENTITY, 160, 96, "" }, - { ENC_MAP, 338, 16, - "\214\234\077\077\077\077\077\077\077\077\077\077\077\077" - "\212\232" }, - { ENC_MAP, 376, 1, - "\237" }, - { ENC_MAP, 402, 1, - "\203" }, - { ENC_MAP, 710, 1, - "\210" }, - { ENC_MAP, 732, 1, - "\230" }, - { ENC_MAP, 8211, 40, - "\226\227\077\077\077\221\222\202\077\223\224\204\077\206" - "\207\225\077\077\077\205\077\077\077\077\077\077\077\077" - "\077\211\077\077\077\077\077\077\077\077\213\233" }, - { ENC_MAP, 8482, 1, - "\231" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToCP1253 [] = { - { ENC_IDENTITY, 1, 129, "" }, - { ENC_MAP, 136, 54, - "\210\212\077\214\215\216\217\220\077\077\077\077\077\077" - "\077\230\077\232\077\234\235\236\237\240\077\077\243\244" - "\245\246\247\250\251\077\253\254\255\256\077\260\261\262" - "\263\077\265\266\267\077\077\077\273\077\275" }, - { ENC_MAP, 402, 1, - "\203" }, - { ENC_MAP, 900, 75, - "\264\241\242\077\270\271\272\077\274\077\276\277\300\301" - "\302\303\304\305\306\307\310\311\312\313\314\315\316\317" - "\320\321\077\323\324\325\326\327\330\331\332\333\334\335" - "\336\337\340\341\342\343\344\345\346\347\350\351\352\353" - "\354\355\356\357\360\361\362\363\364\365\366\367\370\371" - "\372\373\374\375\376" }, - { ENC_MAP, 8211, 40, - "\226\227\257\077\077\221\222\202\077\223\224\204\077\206" - "\207\225\077\077\077\205\077\077\077\077\077\077\077\077" - "\077\211\077\077\077\077\077\077\077\077\213\233" }, - { ENC_MAP, 8482, 1, - "\231" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToCP1254 [] = { - { ENC_IDENTITY, 1, 129, "" }, - { ENC_MAP, 141, 115, - "\215\216\217\220\077\077\077\077\077\077\077\077\235\236" - "\077\240\241\242\243\244\245\246\247\250\251\252\253\254" - "\255\256\257\260\261\262\263\264\265\266\267\270\271\272" - "\273\274\275\276\277\300\301\302\303\304\305\306\307\310" - "\311\312\313\314\315\316\317\077\321\322\323\324\325\326" - "\327\330\331\332\333\334\077\077\337\340\341\342\343\344" - "\345\346\347\350\351\352\353\354\355\356\357\077\361\362" - "\363\364\365\366\367\370\371\372\373\374\077\077\377" }, - { ENC_MAP, 286, 20, - "\320\360\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\077\077\077\335\375" }, - { ENC_MAP, 338, 16, - "\214\234\077\077\077\077\077\077\077\077\077\077\336\376" - "\212\232" }, - { ENC_MAP, 376, 1, - "\237" }, - { ENC_MAP, 402, 1, - "\203" }, - { ENC_MAP, 710, 1, - "\210" }, - { ENC_MAP, 732, 1, - "\230" }, - { ENC_MAP, 8211, 40, - "\226\227\077\077\077\221\222\202\077\223\224\204\077\206" - "\207\225\077\077\077\205\077\077\077\077\077\077\077\077" - "\077\211\077\077\077\077\077\077\077\077\213\233" }, - { ENC_MAP, 8482, 1, - "\231" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToCP1255 [] = { - { ENC_IDENTITY, 1, 129, "" }, - { ENC_MAP, 138, 53, - "\212\214\215\216\217\220\077\077\077\077\077\077\077\077" - "\077\232\077\234\235\236\237\240\077\242\243\077\245\246" - "\247\250\251\077\253\254\255\256\257\260\261\262\263\264" - "\265\266\267\077\271\077\273\274\275\276" }, - { ENC_MAP, 402, 1, - "\203" }, - { ENC_MAP, 710, 1, - "\210" }, - { ENC_MAP, 732, 1, - "\230" }, - { ENC_MAP, 1456, 67, - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315" - "\316\317\320\321\322\323\077\077\077\077\077\077\077\077" - "\077\077\077\077\340\341\342\343\344\345\346\347\350\351" - "\352\353\354\355\356\357\360\361\362\363\364\365\366\367" - "\370\371\372\077\077\077\077\077\324\325\326" }, - { ENC_MAP, 8206, 45, - "\375\376\077\077\077\226\227\077\077\077\221\222\202\077" - "\223\224\204\077\206\207\225\077\077\077\205\077\077\077" - "\077\077\077\077\077\077\211\077\077\077\077\077\077\077" - "\077\213\233" }, - { ENC_MAP, 8362, 1, - "\244" }, - { ENC_MAP, 8482, 1, - "\231" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToCP1256 [] = { - { ENC_IDENTITY, 1, 128, "" }, - { ENC_MAP, 138, 53, - "\212\077\077\077\217\077\077\077\077\077\077\077\077\230" - "\077\232\077\077\077\077\237\240\077\242\243\244\245\246" - "\247\250\251\077\253\254\255\256\257\260\261\262\263\264" - "\265\266\267\270\271\077\273\274\275\276" }, - { ENC_MAP, 215, 38, - "\327\077\077\077\077\077\077\077\340\077\342\077\077\077" - "\077\347\350\351\352\353\077\077\356\357\077\077\077\077" - "\364\077\077\367\077\371\077\373\374" }, - { ENC_MAP, 338, 2, - "\214\234" }, - { ENC_MAP, 402, 1, - "\203" }, - { ENC_MAP, 710, 1, - "\210" }, - { ENC_MAP, 1548, 71, - "\241\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\272\077\077\077\277\077\301\302\303\304\305\306\307" - "\310\311\312\313\314\315\316\317\320\321\322\323\324\325" - "\326\330\331\332\333\077\077\077\077\077\334\335\336\337" - "\341\343\344\345\346\354\355\360\361\362\363\365\366\370" - "\372" }, - { ENC_MAP, 1662, 27, - "\201\077\077\077\077\077\077\077\215\077\077\077\077\077" - "\077\077\077\077\077\077\077\077\077\077\077\077\216" }, - { ENC_MAP, 1711, 1, - "\220" }, - { ENC_MAP, 8204, 47, - "\235\236\375\376\077\077\077\226\227\077\077\077\221\222" - "\202\077\223\224\204\077\206\207\225\077\077\077\205\077" - "\077\077\077\077\077\077\077\077\211\077\077\077\077\077" - "\077\077\077\213\233" }, - { ENC_MAP, 8482, 1, - "\231" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToCP437 [] = { - { ENC_IDENTITY, 1, 127, "" }, - { ENC_MAP, 160, 96, - "\377\255\233\234\077\235\077\077\077\077\246\256\252\077" - "\077\077\370\361\375\077\077\346\077\372\077\077\247\257" - "\254\253\077\250\077\077\077\077\216\217\222\200\077\220" - "\077\077\077\077\077\077\077\245\077\077\077\077\231\077" - "\077\077\077\077\232\077\077\341\205\240\203\077\204\206" - "\221\207\212\202\210\211\215\241\214\213\077\244\225\242" - "\223\077\224\366\077\227\243\226\201\077\077\230" }, - { ENC_MAP, 402, 1, - "\237" }, - { ENC_MAP, 915, 52, - "\342\077\077\077\077\351\077\077\077\077\077\077\077\077" - "\077\077\344\077\077\350\077\077\352\077\077\077\077\077" - "\077\077\340\077\077\353\356\077\077\077\077\077\077\077" - "\077\077\077\343\077\077\345\347\077\355" }, - { ENC_MAP, 8319, 1, - "\374" }, - { ENC_MAP, 8359, 1, - "\236" }, - { ENC_MAP, 8729, 17, - "\371\373\077\077\077\354\077\077\077\077\077\077\077\077" - "\077\077\357" }, - { ENC_MAP, 8776, 1, - "\367" }, - { ENC_MAP, 8801, 5, - "\360\077\077\363\362" }, - { ENC_MAP, 8976, 18, - "\251\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\077\364\365" }, - { ENC_MAP, 9472, 161, - "\304\077\263\077\077\077\077\077\077\077\077\077\332\077" - "\077\077\277\077\077\077\300\077\077\077\331\077\077\077" - "\303\077\077\077\077\077\077\077\264\077\077\077\077\077" - "\077\077\302\077\077\077\077\077\077\077\301\077\077\077" - "\077\077\077\077\305\077\077\077\077\077\077\077\077\077" - "\077\077\077\077\077\077\077\077\077\077\315\272\325\326" - "\311\270\267\273\324\323\310\276\275\274\306\307\314\265" - "\266\271\321\322\313\317\320\312\330\327\316\077\077\077" - "\077\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\077\337\077\077\077\334\077\077\077\333\077\077\077" - "\335\077\077\077\336\260\261\262\077\077\077\077\077\077" - "\077\077\077\077\077\077\376" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToCP850 [] = { - { ENC_IDENTITY, 1, 127, "" }, - { ENC_MAP, 160, 96, - "\377\255\275\234\317\276\335\365\371\270\246\256\252\360" - "\251\356\370\361\375\374\357\346\364\372\367\373\247\257" - "\254\253\363\250\267\265\266\307\216\217\222\200\324\220" - "\322\323\336\326\327\330\321\245\343\340\342\345\231\236" - "\235\353\351\352\232\355\350\341\205\240\203\306\204\206" - "\221\207\212\202\210\211\215\241\214\213\320\244\225\242" - "\223\344\224\366\233\227\243\226\201\354\347\230" }, - { ENC_MAP, 305, 1, - "\325" }, - { ENC_MAP, 402, 1, - "\237" }, - { ENC_MAP, 8215, 1, - "\362" }, - { ENC_MAP, 9472, 161, - "\304\077\263\077\077\077\077\077\077\077\077\077\332\077" - "\077\077\277\077\077\077\300\077\077\077\331\077\077\077" - "\303\077\077\077\077\077\077\077\264\077\077\077\077\077" - "\077\077\302\077\077\077\077\077\077\077\301\077\077\077" - "\077\077\077\077\305\077\077\077\077\077\077\077\077\077" - "\077\077\077\077\077\077\077\077\077\077\315\272\077\077" - "\311\077\077\273\077\077\310\077\077\274\077\077\314\077" - "\077\271\077\077\313\077\077\312\077\077\316\077\077\077" - "\077\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\077\337\077\077\077\334\077\077\077\333\077\077\077" - "\077\077\077\077\077\260\261\262\077\077\077\077\077\077" - "\077\077\077\077\077\077\376" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToISO88591 [] = { - { ENC_IDENTITY, 1, 255, "" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToISO88592 [] = { - { ENC_IDENTITY, 1, 160, "" }, - { ENC_MAP, 164, 120, - "\244\077\247\250\077\077\077\077\255\077\077\260\077\077" - "\077\264\077\077\077\270\077\077\077\077\077\077\077\077" - "\301\302\077\304\077\077\307\077\311\077\313\077\315\316" - "\077\077\077\077\323\324\077\326\327\077\077\332\077\334" - "\335\077\337\077\341\342\077\344\077\077\347\077\351\077" - "\353\077\355\356\077\077\077\077\363\364\077\366\367\077" - "\077\372\077\374\375\077\077\077\077\303\343\241\261\306" - "\346\077\077\077\077\310\350\317\357\320\360\077\077\077" - "\077\077\077\312\352\314\354" }, - { ENC_MAP, 313, 70, - "\305\345\077\077\245\265\077\077\243\263\321\361\077\077" - "\322\362\077\077\077\077\077\077\077\325\365\077\077\300" - "\340\077\077\330\370\246\266\077\077\252\272\251\271\336" - "\376\253\273\077\077\077\077\077\077\077\077\331\371\333" - "\373\077\077\077\077\077\077\077\254\274\257\277\256\276" - }, - { ENC_MAP, 711, 23, - "\267\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\077\077\242\377\077\262\077\275" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToISO88593 [] = { - { ENC_IDENTITY, 1, 160, "" }, - { ENC_MAP, 163, 147, - "\243\244\247\250\077\077\077\077\255\077\077\260\077\262" - "\263\264\265\077\267\270\077\077\077\077\275\077\077\300" - "\301\302\077\304\077\077\307\310\311\312\313\314\315\316" - "\317\077\321\322\323\324\077\326\327\077\331\332\333\334" - "\077\077\337\340\341\342\077\344\077\077\347\350\351\352" - "\353\354\355\356\357\077\361\362\363\364\077\366\367\077" - "\371\372\373\374\077\077\077\077\077\077\077\077\077\077" - "\077\306\346\305\345\077\077\077\077\077\077\077\077\077" - "\077\077\077\077\077\077\077\330\370\253\273\325\365\077" - "\077\246\266\241\261\077\077\077\077\077\077\077\077\251" - "\271\077\077\254\274" }, - { ENC_MAP, 348, 33, - "\336\376\252\272\077\077\077\077\077\077\077\077\077\077" - "\077\077\335\375\077\077\077\077\077\077\077\077\077\077" - "\077\077\077\257\277" }, - { ENC_MAP, 728, 2, - "\242\377" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToISO88594 [] = { - { ENC_IDENTITY, 1, 160, "" }, - { ENC_MAP, 164, 219, - "\244\077\247\250\077\077\077\077\255\077\257\260\077\077" - "\077\264\077\077\077\270\077\077\077\077\077\077\077\077" - "\301\302\303\304\305\306\077\077\311\077\313\077\315\316" - "\077\077\077\077\077\324\325\326\327\330\077\332\333\334" - "\077\077\337\077\341\342\343\344\345\346\077\077\351\077" - "\353\077\355\356\077\077\077\077\077\364\365\366\367\370" - "\077\372\373\374\077\077\077\300\340\077\077\241\261\077" - "\077\077\077\077\077\310\350\077\077\320\360\252\272\077" - "\077\314\354\312\352\077\077\077\077\077\077\077\077\253" - "\273\077\077\077\077\245\265\317\357\077\077\307\347\077" - "\077\077\077\077\077\323\363\242\077\077\246\266\077\077" - "\077\077\077\077\077\077\321\361\077\077\077\275\277\322" - "\362\077\077\077\077\077\077\077\077\243\263\077\077\077" - "\077\077\077\077\077\251\271\077\077\077\077\254\274\335" - "\375\336\376\077\077\077\077\077\077\331\371\077\077\077" - "\077\077\077\077\077\077\256\276" }, - { ENC_MAP, 711, 21, - "\267\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\077\077\077\377\077\262" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToISO88595 [] = { - { ENC_IDENTITY, 1, 160, "" }, - { ENC_MAP, 167, 7, - "\375\077\077\077\077\077\255" }, - { ENC_MAP, 1025, 95, - "\241\242\243\244\245\246\247\250\251\252\253\254\077\256" - "\257\260\261\262\263\264\265\266\267\270\271\272\273\274" - "\275\276\277\300\301\302\303\304\305\306\307\310\311\312" - "\313\314\315\316\317\320\321\322\323\324\325\326\327\330" - "\331\332\333\334\335\336\337\340\341\342\343\344\345\346" - "\347\350\351\352\353\354\355\356\357\077\361\362\363\364" - "\365\366\367\370\371\372\373\374\077\376\377" }, - { ENC_MAP, 8470, 1, - "\360" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToISO88596 [] = { - { ENC_IDENTITY, 1, 47, "" }, - { ENC_IDENTITY, 58, 103, "" }, - { ENC_MAP, 164, 10, - "\244\077\077\077\077\077\077\077\255" }, - { ENC_MAP, 1548, 94, - "\254\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\273\077\077\077\277\077\301\302\303\304\305\306\307" - "\310\311\312\313\314\315\316\317\320\321\322\323\324\325" - "\326\327\330\331\332\077\077\077\077\077\340\341\342\343" - "\344\345\346\347\350\351\352\353\354\355\356\357\360\361" - "\362\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\060\061\062\063\064\065\066\067\070\071" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToISO88597 [] = { - { ENC_IDENTITY, 1, 160, "" }, - { ENC_MAP, 163, 27, - "\243\077\246\247\250\251\077\253\254\255\077\077\260\261" - "\262\263\077\077\077\267\077\077\077\273\077\275" }, - { ENC_MAP, 700, 2, - "\242\241" }, - { ENC_MAP, 900, 75, - "\264\265\266\077\270\271\272\077\274\077\276\277\300\301" - "\302\303\304\305\306\307\310\311\312\313\314\315\316\317" - "\320\321\077\323\324\325\326\327\330\331\332\333\334\335" - "\336\337\340\341\342\343\344\345\346\347\350\351\352\353" - "\354\355\356\357\360\361\362\363\364\365\366\367\370\371" - "\372\373\374\375\376" }, - { ENC_MAP, 8213, 1, - "\257" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToISO88598 [] = { - { ENC_IDENTITY, 1, 160, "" }, - { ENC_MAP, 162, 54, - "\242\243\244\245\246\247\250\251\253\254\255\256\260\261" - "\262\263\264\265\266\267\270\271\273\274\275\276\077\077" - "\077\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\077\077\252" }, - { ENC_MAP, 247, 1, - "\272" }, - { ENC_MAP, 1488, 27, - "\340\341\342\343\344\345\346\347\350\351\352\353\354\355" - "\356\357\360\361\362\363\364\365\366\367\370\371\372" }, - { ENC_MAP, 8215, 1, - "\337" }, - { ENC_MAP, 8254, 1, - "\257" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToISO88599 [] = { - { ENC_IDENTITY, 1, 207, "" }, - { ENC_MAP, 209, 54, - "\321\322\323\324\325\326\327\330\331\332\333\334\337\340" - "\341\342\343\344\345\346\347\350\351\352\353\354\355\356" - "\357\361\362\363\364\365\366\367\370\371\372\373\374\377" - }, - { ENC_MAP, 286, 20, - "\320\360\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\077\077\077\335\375" }, - { ENC_MAP, 350, 2, - "\336\376" }, - { ENC_END, 0, 0, NULL } -}; - -static TEncodingRule TDOM_UnicodeToKOI8R [] = { - { ENC_IDENTITY, 1, 127, "" }, - { ENC_MAP, 160, 24, - "\232\077\077\077\077\077\077\077\077\277\077\077\077\077" - "\077\077\234\077\235\077\077\077\077\236" }, - { ENC_MAP, 247, 1, - "\237" }, - { ENC_MAP, 1025, 81, - "\263\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\341\342\367\347\344\345\366\372\351\352\353\354\355" - "\356\357\360\362\363\364\365\346\350\343\376\373\375\377" - "\371\370\374\340\361\301\302\327\307\304\305\326\332\311" - "\312\313\314\315\316\317\320\322\323\324\325\306\310\303" - "\336\333\335\337\331\330\334\300\321\077\243" }, - { ENC_MAP, 8729, 2, - "\225\226" }, - { ENC_MAP, 8776, 1, - "\227" }, - { ENC_MAP, 8804, 2, - "\230\231" }, - { ENC_MAP, 8992, 2, - "\223\233" }, - { ENC_MAP, 9472, 161, - "\200\077\201\077\077\077\077\077\077\077\077\077\202\077" - "\077\077\203\077\077\077\204\077\077\077\205\077\077\077" - "\206\077\077\077\077\077\077\077\207\077\077\077\077\077" - "\077\077\210\077\077\077\077\077\077\077\211\077\077\077" - "\077\077\077\077\212\077\077\077\077\077\077\077\077\077" - "\077\077\077\077\077\077\077\077\077\077\240\241\242\244" - "\245\246\247\250\251\252\253\254\255\256\257\260\261\262" - "\264\265\266\267\270\271\272\273\274\275\276\077\077\077" - "\077\077\077\077\077\077\077\077\077\077\077\077\077\077" - "\077\077\213\077\077\077\214\077\077\077\215\077\077\077" - "\216\077\077\077\217\220\221\222\077\077\077\077\077\077" - "\077\077\077\077\077\077\224" }, - { ENC_END, 0, 0, NULL } -}; - - -static TEncoding TDOM_UnicodeTo8bitEncodings [] = { - { "ascii" , 0x3F, TDOM_UnicodeToASCII }, - { "cp1250" , 0x3F, TDOM_UnicodeToCP1250 }, - { "cp1251" , 0x3F, TDOM_UnicodeToCP1251 }, - { "cp1252" , 0x3F, TDOM_UnicodeToCP1252 }, - { "cp1253" , 0x3F, TDOM_UnicodeToCP1253 }, - { "cp1254" , 0x3F, TDOM_UnicodeToCP1254 }, - { "cp1255" , 0x3F, TDOM_UnicodeToCP1255 }, - { "cp1256" , 0x3F, TDOM_UnicodeToCP1256 }, - { "cp437" , 0x3F, TDOM_UnicodeToCP437 }, - { "cp850" , 0x3F, TDOM_UnicodeToCP850 }, - { "iso8859-1" , 0x3F, TDOM_UnicodeToISO88591 }, - { "iso8859-2" , 0x3F, TDOM_UnicodeToISO88592 }, - { "iso8859-3" , 0x3F, TDOM_UnicodeToISO88593 }, - { "iso8859-4" , 0x3F, TDOM_UnicodeToISO88594 }, - { "iso8859-5" , 0x3F, TDOM_UnicodeToISO88595 }, - { "iso8859-6" , 0x3F, TDOM_UnicodeToISO88596 }, - { "iso8859-7" , 0x3F, TDOM_UnicodeToISO88597 }, - { "iso8859-8" , 0x3F, TDOM_UnicodeToISO88598 }, - { "iso8859-9" , 0x3F, TDOM_UnicodeToISO88599 }, - { "koi8-r" , 0x3F, TDOM_UnicodeToKOI8R }, - { NULL, 0, NULL } -}; Index: generic/tcldom.c ================================================================== --- generic/tcldom.c +++ generic/tcldom.c @@ -40,13 +40,10 @@ /*---------------------------------------------------------------------------- | Includes | \---------------------------------------------------------------------------*/ #include -#include -#include -#include #include #include #include #include #include @@ -146,19 +143,13 @@ if (!tcldom_PIValueCheck(interp, text)) {\ return TCL_ERROR; \ } \ } -#if TclOnly8Bits -#define writeChars(var,chan,buf,len) (chan) ? \ - ((void)Tcl_Write ((chan), (buf), (len) )) : \ - (Tcl_AppendToObj ((var), (buf), (len) )); -#else #define writeChars(var,chan,buf,len) (chan) ? \ ((void)Tcl_WriteChars ((chan), (buf), (len) )) : \ (Tcl_AppendToObj ((var), (buf), (len) )); -#endif #define DOM_CREATECMDMODE_AUTO 0 #define DOM_CREATECMDMODE_CMDS 1 #define DOM_CREATECMDMODE_TOKENS 2 @@ -165,21 +156,19 @@ /*---------------------------------------------------------------------------- | Module Globals | \---------------------------------------------------------------------------*/ #ifndef TCL_THREADS - static TEncoding *Encoding_to_8bit = NULL; static int storeLineColumn = 0; static int dontCreateObjCommands = 0; static int dontCheckCharData = 0; static int dontCheckName = 0; static int domCreateCmdMode = 0; # define TSD(x) x # define GetTcldomTSD() #else typedef struct ThreadSpecificData { - TEncoding *Encoding_to_8bit; int storeLineColumn; int dontCreateObjCommands; int dontCheckCharData; int dontCheckName; int domCreateCmdMode; @@ -214,11 +203,10 @@ TDomThreaded( " attachDocument domDoc ?objVar? \n" " detachDocument domDoc \n" ) " createNodeCmd ?-returnNodeCmd? ?-tagName name? ?-jsonType jsonType? ?-namespace URI? (element|comment|text|cdata|pi)Node cmdName \n" - " setResultEncoding ?encodingName? \n" " setStoreLineColumn ?boolean? \n" " setNameCheck ?boolean? \n" " setTextCheck ?boolean? \n" " setObjectCommands ?(automatic|token|command)? \n" " isCharData string \n" @@ -1228,11 +1216,10 @@ doc = domReadDocument(parser, xml_string, xml_string_len, 1, 0, - TSD(Encoding_to_8bit), TSD(storeLineColumn), ignorexmlns, 0, NULL, NULL, @@ -2211,15 +2198,13 @@ #define APESC_BUF_SIZE 512 #define AP(c) *b++ = c; #define AE(s) pc1 = s; while(*pc1) *b++ = *pc1++; char buf[APESC_BUF_SIZE+80], *b, *bLimit, *pc, *pc1, *pEnd, charRef[10]; int charDone, i; -#if !TclOnly8Bits int clen = 0; int unicode; Tcl_UniChar uniChar; -#endif b = buf; bLimit = b + APESC_BUF_SIZE; pc = pEnd = value; if (value_length != -1) { @@ -2241,16 +2226,12 @@ } else { charDone = 0; if (htmlEntities) { charDone = 1; -#if TclOnly8Bits - switch ((unsigned int)*pc) -#else Tcl_UtfToUniChar(pc, &uniChar); switch (uniChar) -#endif { case 0240: AE(" "); break; case 0241: AE("¡"); break; case 0242: AE("¢"); break; case 0243: AE("£"); break; @@ -2344,11 +2325,10 @@ case 0373: AE("û"); break; case 0374: AE("ü"); break; case 0375: AE("ý"); break; case 0376: AE("þ"); break; case 0377: AE("ÿ"); break; -#if !TclOnly8Bits /* "Special" chars, according to XHTML xhtml-special.ent */ case 338: AE("Œ"); break; case 339: AE("œ"); break; case 352: AE("Š"); break; case 353: AE("š"); break; @@ -2499,34 +2479,17 @@ case 9674: AE("◊"); break; case 9824: AE("♠"); break; case 9827: AE("♣"); break; case 9829: AE("♥"); break; case 9830: AE("♦"); break; -#endif default: charDone = 0; } -#if !TclOnly8Bits if (charDone) { clen = UTF8_CHAR_LEN(*pc); pc += (clen - 1); } -#endif - } -#if TclOnly8Bits - if (!charDone) { - if (escapeNonASCII && ((unsigned char)*pc > 127)) { - AP('&') AP('#') - sprintf(charRef, "%d", (unsigned char)*pc); - for (i = 0; i < 3; i++) { - AP(charRef[i]); - } - AP(';') - } else { - AP(*pc); - } - } -#else + } if (!charDone) { if ((unsigned char)*pc > 127) { clen = UTF8_CHAR_LEN(*pc); if (!clen) { domPanic("tcldom_AppendEscaped: can only handle " @@ -2559,11 +2522,10 @@ } } else { AP(*pc); } } -#endif } if (b >= bLimit) { writeChars(xmlString, chan, buf, b - buf); b = buf; } @@ -6096,56 +6058,10 @@ } return tcldom_returnDocumentObj (interp, doc, setVariable, newObjName, 1, 0); } - -/*---------------------------------------------------------------------------- -| tcldom_setResultEncoding -| -\---------------------------------------------------------------------------*/ -static -int tcldom_setResultEncoding ( - ClientData clientData, - Tcl_Interp *interp, - int objc, - Tcl_Obj * const objv[] -) -{ - GetTcldomTSD() - - TEncoding *encoding; - char *encodingName; - - CheckArgs(1,2,1,"?encodingName?"); - if (objc == 1) { - if (TSD(Encoding_to_8bit) == NULL) { - Tcl_AppendResult(interp, "UTF-8", NULL); - } else { - Tcl_AppendResult(interp, TSD(Encoding_to_8bit->name), NULL); - } - return TCL_OK; - } - encodingName = Tcl_GetString(objv[1]); - if ( (strcmp(encodingName, "UTF-8")==0) - ||(strcmp(encodingName, "UTF8")==0) - ||(strcmp(encodingName, "utf-8")==0) - ||(strcmp(encodingName, "utf8")==0)) { - - TSD(Encoding_to_8bit) = NULL; - } else { - encoding = tdom_GetEncoding ( encodingName ); - if (encoding == NULL) { - Tcl_AppendResult(interp, "encoding not found", NULL); - return TCL_ERROR; - } - TSD(Encoding_to_8bit) = encoding; - } - return TCL_OK; -} - - /*---------------------------------------------------------------------------- | tcldom_parse | \---------------------------------------------------------------------------*/ static @@ -6581,11 +6497,10 @@ doc = domReadDocument(parser, xml_string, xml_string_len, ignoreWhiteSpaces, keepCDATA, - TSD(Encoding_to_8bit), TSD(storeLineColumn), ignorexmlns, feedbackAfter, feedbackCmd, chan, @@ -6793,11 +6708,11 @@ Tcl_CmdInfo cmdInfo; Tcl_Obj * mobjv[MAX_REWRITE_ARGS]; static const char *domMethods[] = { "createDocument", "createDocumentNS", "createNodeCmd", - "parse", "setResultEncoding", "setStoreLineColumn", + "parse", "setStoreLineColumn", "isCharData", "isName", "isPIName", "isQName", "isComment", "isCDATA", "isPIValue", "isNCName", "createDocumentNode", "setNameCheck", "setTextCheck", "setObjectCommands", "featureinfo", "isBMPCharData", @@ -6806,11 +6721,11 @@ #endif NULL }; enum domMethod { m_createDocument, m_createDocumentNS, m_createNodeCmd, - m_parse, m_setResultEncoding, m_setStoreLineColumn, + m_parse, m_setStoreLineColumn, m_isCharData, m_isName, m_isPIName, m_isQName, m_isComment, m_isCDATA, m_isPIValue, m_isNCName, m_createDocumentNode, m_setNameCheck, m_setTextCheck, m_setObjectCommands, m_featureinfo, m_isBMPCharData @@ -6927,13 +6842,10 @@ return TCL_OK; } break; #endif - case m_setResultEncoding: - return tcldom_setResultEncoding(clientData, interp, --objc, objv+1); - case m_setStoreLineColumn: if (objc == 3) { if (Tcl_GetBooleanFromObj(interp, objv[2], &bool) != TCL_OK) { return TCL_ERROR; } Index: generic/tclexpat.c ================================================================== --- generic/tclexpat.c +++ generic/tclexpat.c @@ -897,16 +897,14 @@ char s[255], buf[8*1024]; int fd; XML_Parser parser; Tcl_Channel channel = NULL; CHandlerSet *activeCHandlerSet; -#if !TclOnly8Bits Tcl_Obj *bufObj = NULL; Tcl_DString dStr; int useBinary; char *str; -#endif if (expat->finished) { if ((result = TclExpatInitializeParser (interp, expat, 0)) != TCL_OK) return TCL_ERROR; } @@ -951,11 +949,10 @@ Tcl_ResetResult (interp); Tcl_AppendResult (interp, "channel \"", data, "wasn't opened for reading", (char *) NULL); return TCL_ERROR; } -#if !TclOnly8Bits Tcl_DStringInit (&dStr); if (Tcl_GetChannelOption (interp, channel, "-encoding", &dStr) != TCL_OK) { return TCL_ERROR; } @@ -987,19 +984,10 @@ reads */ if (result) { Tcl_DecrRefCount (bufObj); } } -#else - expat->parsingState = 2; - do { - bytesread = Tcl_Read (channel, buf, sizeof (buf)); - done = bytesread < sizeof (buf); - result = XML_Parse (expat->parser, buf, bytesread, done); - if (result != XML_STATUS_OK) break; - } while (!done); -#endif /* !TclOnly8Bits */ expat->parsingState = 1; break; case EXPAT_INPUT_FILENAME: fd = open(data, O_BINARY|O_RDONLY); @@ -1051,15 +1039,13 @@ XML_ErrorString(XML_GetErrorCode(expat->parser)), "\" at line ", s, " character ", NULL); sprintf(s, "%ld", XML_GetCurrentColumnNumber(expat->parser)); Tcl_AppendResult(interp, s, NULL); } -#if !TclOnly8Bits if (bufObj) { Tcl_DecrRefCount (bufObj); } -#endif return TCL_ERROR; } switch (expat->status) { case TCL_OK: case TCL_BREAK: DELETED generic/utf8conv.c Index: generic/utf8conv.c ================================================================== --- generic/utf8conv.c +++ generic/utf8conv.c @@ -1,209 +0,0 @@ -/*--------------------------------------------------------------------------- -| Copyright (C) 1999 Jochen C. Loewer (loewerj@hotmail.com) -+---------------------------------------------------------------------------- -| -| $Id$ -| -| -| Functions, which (try) to convert UTF-8 encoded Unicode strings back -| to some 8bit encodings like ISO-8859-*, ... -| -| -| The contents of this file are subject to the Mozilla Public License -| Version 1.1 (the "License"); you may not use this file except in -| compliance with the License. You may obtain a copy of the License at -| http://www.mozilla.org/MPL/ -| -| Software distributed under the License is distributed on an "AS IS" -| basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -| License for the specific language governing rights and limitations -| under the License. -| -| The Original Code is tDOM. -| -| The Initial Developer of the Original Code is Jochen Loewer -| Portions created by Jochen Loewer are Copyright (C) 1998, 1999 -| Jochen Loewer. All Rights Reserved. -| -| Contributor(s): -| -| -| $Log$ -| Revision 1.2 2004/08/14 14:42:27 rolf -| Use 'Id' cvs keyword (instead of 'Header') in the file heads. -| -| Revision 1.1.1.1 2002/02/22 01:05:35 rolf -| tDOM0.7test with Jochens first set of patches -| -| -| -| written by Jochen Loewer -| November, 1999 -| -\--------------------------------------------------------------------------*/ - - - -/*--------------------------------------------------------------------------- -| Includes -| -\--------------------------------------------------------------------------*/ -#include -#include -#include -#include - -/*--------------------------------------------------------------------------- -| Defines -| -\--------------------------------------------------------------------------*/ -#define DBG(x) - -#define ENC_END 0 -#define ENC_IDENTITY 1 -#define ENC_MAP 2 - -#if defined(_MSC_VER) -# define STRCASECMP(a,b) stricmp (a,b) -#else -# define STRCASECMP(a,b) strcasecmp (a,b) -#endif - - -/*--------------------------------------------------------------------------- -| Static Globals -| -\--------------------------------------------------------------------------*/ -#include "encodings.inc" - - - -/*--------------------------------------------------------------------------- -| tdom_GetEncoding - Looks up a encoding table for the given encoding -| name. If nothing was found NULL is returned. -| -\--------------------------------------------------------------------------*/ -TEncoding * -tdom_GetEncoding ( - char * name -) -{ - TEncoding *encoding = TDOM_UnicodeTo8bitEncodings; - - while (encoding && encoding->name) { - DBG(fprintf(stderr, "encoding=%x encoding->name='%s' name='%s'", - encoding, encoding->name, name);) - if (STRCASECMP(encoding->name,name)==0) { - return encoding; - } - encoding++; - } - return NULL; -} - - -/*--------------------------------------------------------------------------- -| tdom_GetEncodingName -| -\--------------------------------------------------------------------------*/ -char * -tdom_GetEncodingName (TEncoding *encoding) -{ - TEncoding *knownencoding = TDOM_UnicodeTo8bitEncodings; - - while (knownencoding && knownencoding->name) { - if (knownencoding == encoding) { - return (char*) knownencoding->name; - } - knownencoding++; - } - return NULL; -} - - -/*--------------------------------------------------------------------------- -| tdom_Utf8to8Bit - Convert a UTF-8 encode string with byte length -| *len to 8bit encoding using the specify encoding. -| -\--------------------------------------------------------------------------*/ -void -tdom_Utf8to8Bit ( - TEncoding * encoding, - const char * utf8_string, - int * len -) -{ - unsigned char *in, *end, *out; - TEncodingRule *rule; - int byte; - int unicode; - - - if (encoding == NULL) { - /* don't convert; keep UTF-8 */ - return; - } - - in = (unsigned char*) utf8_string; - out = (unsigned char*) utf8_string; - end = in + *len; - unicode = 0; - - while (in < end) { - - byte = *in; - - /* extract unicode character from (multiple) UTF-8 bytes */ - - if (byte < 0xC0) { - unicode = byte; - in++; - } else if (byte < 0xE0) { - if ((in[1] & 0xC0) == 0x80) { - unicode = ((byte & 0x1F) << 6) | (in[1] & 0x3F); - in += 2; - } else { - unicode = byte; - in++; - } - } else if (byte < 0xF0) { - if (((in[1] & 0xC0) == 0x80) && ((in[2] & 0xC0) == 0x80)) { - unicode = ((byte & 0x0F) << 12) - | ((in[1] & 0x3F) << 6 ) - | ((in[2] & 0x3F) ); - in += 3; - } else { - unicode = byte; - in++; - } - } else { - /* ??? > 3 bytes UTF chars ??? */ - in++; - } - - /* convert unicode character to 8bit representation */ - rule = encoding->rules; - while (rule && rule->type != ENC_END) { - if ( (unicode >= rule->start_code) - && (unicode < (rule->start_code + rule->len)) ) { - - if (rule->type == ENC_MAP) { - *out++ = rule->map[unicode - rule->start_code]; - } else { - *out++ = unicode & 0xFF; - } - break; - } - rule++; - } - if (rule->type == ENC_END) { - /* no rule foun, use fallback */ - *out++ = encoding->fallback_char & 0x0FF; - } - } - if (out < end) { - *out = '\0'; - } - *len = ( (char*)out - utf8_string); -} - DELETED generic/utf8conv.h Index: generic/utf8conv.h ================================================================== --- generic/utf8conv.h +++ generic/utf8conv.h @@ -1,91 +0,0 @@ -/*--------------------------------------------------------------------------- -| Copyright (C) 1999 Jochen C. Loewer (loewerj@hotmail.com) -+---------------------------------------------------------------------------- -| -| $Id$ -| -| -| Functions, which (try) to convert UTF-8 encoded Unicode strings back -| to some 8bit encodings like ISO-8859-*, ... -| -| -| The contents of this file are subject to the Mozilla Public License -| Version 1.1 (the "License"); you may not use this file except in -| compliance with the License. You may obtain a copy of the License at -| http://www.mozilla.org/MPL/ -| -| Software distributed under the License is distributed on an "AS IS" -| basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -| License for the specific language governing rights and limitations -| under the License. -| -| The Original Code is tDOM. -| -| The Initial Developer of the Original Code is Jochen Loewer -| Portions created by Jochen Loewer are Copyright (C) 1998, 1999 -| Jochen Loewer. All Rights Reserved. -| -| Contributor(s): -| -| -| $Log$ -| Revision 1.3 2004/08/14 14:42:27 rolf -| Use 'Id' cvs keyword (instead of 'Header') in the file heads. -| -| Revision 1.2 2002/07/04 15:06:49 zoran -| fixed reference to unsigned* to char since Sun compiler barfs at it. -| -| Revision 1.1.1.1 2002/02/22 01:05:35 rolf -| tDOM0.7test with Jochens first set of patches -| -| -| -| written by Jochen Loewer -| November, 1999 -| -\--------------------------------------------------------------------------*/ - -#ifndef __UTF8CONV_H__ -#define __UTF8CONV_H__ - - -/*--------------------------------------------------------------------------- -| Includes -| -\--------------------------------------------------------------------------*/ -#include -#include -#include - - -/*--------------------------------------------------------------------------- -| Typedefs -| -\--------------------------------------------------------------------------*/ -typedef struct { - int type; - int start_code; - int len; - char * map; -} TEncodingRule; - -typedef struct { - const char * name; - int fallback_char; - TEncodingRule * rules; -} TEncoding; - - - -/*-------------------------------------------------------------------------- -| Function prototypes -| -\-------------------------------------------------------------------------*/ -TEncoding * tdom_GetEncoding (char *name); -char * tdom_GetEncodingName (TEncoding *encoding); -void tdom_Utf8to8Bit (TEncoding *encoding, - const char *utf8_string, int *len); - -#endif - - Index: generic/xmlsimple.c ================================================================== --- generic/xmlsimple.c +++ generic/xmlsimple.c @@ -171,15 +171,11 @@ { "amp", "&", 0 }, { "lt", "<", 0 }, { "gt", ">", 0 }, { "apos", "'", 0 }, { "quot", "\"", 0 }, -#if TclOnly8Bits - { "nbsp", "\240", 0 }, -#else { "nbsp", "\xC2\xA0", 0 }, -#endif }; /*---------------------------------------------------------------------------- | ErInit -- @@ -285,13 +281,10 @@ if (!z[i] || (z[i]!=';')) { return 0; /* error */ } from = i+1; -#if TclOnly8Bits - z[to++] = value; -#else if (value < 0x80) { z[to++] = value; } else if (value <= 0x7FF) { z[to++] = (char) ((value >> 6) | 0xC0); z[to++] = (char) ((value | 0x80) & 0xBF); @@ -301,11 +294,10 @@ z[to++] = (char) ((value | 0x80) & 0xBF); } else { /* error */ return 0; } -#endif } else { while (z[i] && isalpha((unsigned char)z[i])) { i++; } if (!z[i] || (z[i]!=';')) { Index: tests/OASIS-suite.tcl ================================================================== --- tests/OASIS-suite.tcl +++ tests/OASIS-suite.tcl @@ -7,11 +7,11 @@ # The following is not needed, given, that tDOM is correctly # installed. This code only ensures, that the tDOM script library gets # sourced, if the script is called with a tcldomsh out of the build # dir of a complete tDOM source installation. -if {[lsearch [namespace children] ::tDOM] == -1} { +if {[info commands ::tDOM::xmlReadFile] == ""} { # tcldomsh without the script library. Source the lib. source [file join [file dir [info script]] ../lib tdom.tcl] } # Import the tDOM helper procs Index: unix/CONFIG ================================================================== --- unix/CONFIG +++ unix/CONFIG @@ -2,13 +2,12 @@ # # This is a small collection of example settings you can use to # compile tdom on different platforms. Just uncomment the line(s) # you need and run this script with "sh CONFIG". # -# With the exception of the --enable-tdomalloc option it's best, to -# leave the tDOM specific configuration options alone (that is: use the -# defaults, do nothing). +# For typical use it's best, to leave the tDOM specific configuration +# options alone (that is: use the defaults, do nothing). # # --enable-tdomalloc # Default: off # With this option on, a special memory allocator is used, which is # optimized for low memory allocation overhead. This allocator works @@ -53,25 +52,15 @@ # # # Comment-out next line if building with GCC compiler. # CC=gcc; export CC # -# -# Tcl 8.0.5 on Unix. Uses public Tcl library -# ------------------------------------------- -# ../configure-tcl8.0.5 -# # # Tcl 8.1+ on Unix. Uses public Tcl library # ------------------------------------------- # ../configure # -# -# For 64-bit Unix you've to use --disable-tdomalloc -# ------------------------------------------------- -# ../configure --disable-tdomalloc -# # # AOLserver 3.X. It delivers its own patched Tcl lib. # Also, this one builds tdom as AOLserver module. # Please do not use "make install" after doing "make". # You have to manually adjust AOLserver config file Index: win/makefile.vc ================================================================== --- win/makefile.vc +++ win/makefile.vc @@ -27,11 +27,10 @@ PRJ_OBJS = \ $(TMP_DIR)\xmlrole.obj \ $(TMP_DIR)\xmltok.obj \ $(TMP_DIR)\xmlparse.obj \ $(TMP_DIR)\xmlsimple.obj \ - $(TMP_DIR)\utf8conv.obj \ $(TMP_DIR)\dom.obj \ $(TMP_DIR)\domalloc.obj \ $(TMP_DIR)\domhtml.obj \ $(TMP_DIR)\domhtml5.obj \ $(TMP_DIR)\domxslt.obj \ DELETED win/makefile805.vc Index: win/makefile805.vc ================================================================== --- win/makefile805.vc +++ win/makefile805.vc @@ -1,235 +0,0 @@ -#---------------------------------------------------------------------------- -# This is derivated from the tcl8.3 win makefile and surely not -# perfect. It works for me. -# rolf ade, 2001 (rolf@pointsman.de) -# -# Changes for 8.0.5 by Sumit Pokhariyal (sumitp@pune.tcs.co.in) -# -# Project directories -# -# ROOT = top of source tree -# -# TOOLS32 = location of VC++ 32-bit development tools. -# -# INSTALLDIR = location of the Tcl installation -# -#---------------------------------------------------------------------------- - -!if "$(MSVCDIR)" == "" -MSG = ^ -You'll need to run vcvars32.bat from Developer Studio, first, to setup^ -the environment. -!error $(MSG) -!endif -# emacs: ' - -# Set this to the appropriate value of /MACHINE: for your platform -MACHINE = IX86 -ROOT = .. -INSTALLDIR = c:\Progra~1\Tcl - -TOOLS32 = $(MSVCDIR) -TOOLS32_rc = $(MSVCDIR)\..\common\MSDev98 - -# Uncomment the following line to compile with thread support -#THREADDEFINES = -DTCL_THREADS=1 - -# Set NODEBUG to 0 to compile with symbols -NODEBUG = 1 - -# The following defines can be used to control the amount of debugging -# code that is added to the compilation. -# -# -DTCL_MEM_DEBUG Enables the debugging memory allocator. -# -DTCL_COMPILE_DEBUG Enables byte compilation logging. -# -DTCL_COMPILE_STATS Enables byte compilation statistics gathering. -# -DUSE_TCLALLOC=0 Disables the Tcl memory allocator in favor -# of the native malloc implementation. This is -# -# DEBUGDEFINES = -DTCL_MEM_DEBUG -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS -# DEBUGDEFINES = -DUSE_TCLALLOC=0 - - -#------------------------------------------------------------------------- -# -# Do not modify below this line -# -#------------------------------------------------------------------------- - -NAMEPREFIX = libtdom -DOTVERSION = 0.8.3 -VERSION = 083 - -BINROOT = . -!IF "$(NODEBUG)" == "1" -TMPDIRNAME = -DBGX = -!ELSE -TMPDIRNAME = Debug -DBGX = d -!ENDIF -TMPDIR = $(BINROOT) -OUTDIRNAME = $(TMPDIRNAME) -OUTDIR = $(TMPDIR) -TOP_DIR = $(BINROOT)\.. - -TDOMLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)$(DBGX).lib -TDOMDLLNAME = $(NAMEPREFIX)$(VERSION)$(DBGX).dll -TDOMDLL = $(OUTDIR)\$(TDOMDLLNAME) - -MKDIR = .\mkd.bat -RM = del - -LIB_INSTALL_DIR = $(INSTALLDIR)\lib -BIN_INSTALL_DIR = $(INSTALLDIR)\bin -SCRIPT_INSTALL_DIR = $(INSTALLDIR)\lib\tcl$(DOTVERSION) -INCLUDE_INSTALL_DIR = $(INSTALLDIR)\include - - -TDOMOBJS = $(TMPDIR)\xmlrole.obj \ - $(TMPDIR)\xmltok.obj \ - $(TMPDIR)\xmlparse.obj \ - $(TMPDIR)\xmlsimple.obj \ - $(TMPDIR)\utf8conv.obj \ - $(TMPDIR)\dom.obj \ - $(TMPDIR)\domalloc.obj \ - $(TMPDIR)\domhtml.obj \ - $(TMPDIR)\domxslt.obj \ - $(TMPDIR)\nodecmd.obj \ - $(TMPDIR)\domxpath.obj \ - $(TMPDIR)\domlock.obj \ - $(TMPDIR)\domjson.obj \ - $(TMPDIR)\tclexpat.obj \ - $(TMPDIR)\tcldom.obj \ - $(TMPDIR)\tdominit.obj - - -cc32 = "$(TOOLS32)\bin\cl.exe" -link32 = "$(TOOLS32)\bin\link.exe" -rc32 = "$(TOOLS32_rc)\bin\rc.exe" -include32 = -I"$(TOOLS32)\include" -libpath32 = /LIBPATH:"$(TOOLS32)\lib" -tcllibpath = /LIBPATH:"$(INSTALLDIR)\lib" -lib32 = "$(TOOLS32)\bin\lib.exe" - -WINDIR = $(ROOT)\win -GENERICDIR = $(ROOT)\generic -EXPATDIR = $(ROOT)\expat -TCLINCDIR = $(INSTALLDIR)\Include - -TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(EXPATDIR)" -I"$(TCLINCDIR)" -TCL_DEFINES = $(DEBUGDEFINES) $(THREADDEFINES) - -#------------------------------------------------------------------------- -# -# Compile flags -# -#------------------------------------------------------------------------- - -!IF "$(NODEBUG)" == "1" -# This cranks the optimization level to maximize speed -cdebug = -O2 -Gs -GD -!ELSE -!IF "$(MACHINE)" == "IA64" -cdebug = -Od -Zi -!ELSE -cdebug = -Z7 -Od -!ENDIF -!ENDIF - -# declarations common to all compiler options -cflags = -c -W3 -nologo -Fp$(TMPDIR)\ -YX -DHAVE_MEMMOVE -DXML_DTD -DXML_NS -DTDOM_NO_UNKNOWN_CMD -DVERSION="\"$(DOTVERSION)\"" -cvarsdll = -MD$(DBGX) - -TCL_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) \ - $(TCL_INCLUDES) $(TCL_DEFINES) -CON_CFLAGS = $(cdebug) $(cflags) $(include32) -DCONSOLE - -#------------------------------------------------------------------------- -# -# Link flags -# -#------------------------------------------------------------------------- - -!IF "$(NODEBUG)" == "1" -ldebug = /RELEASE -!ELSE -ldebug = -debug:full -debugtype:cv -!ENDIF - -# declarations common to all linker options -lflags = /NODEFAULTLIB /NOLOGO /MACHINE:$(MACHINE) $(libpath32) $(tcllibpath) - -# declarations for use on Intel i386, i486, and Pentium systems -DLLENTRY = @12 -dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll - - -conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup -guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup - -libc = libc$(DBGX).lib oldnames.lib -libcdll = msvcrt$(DBGX).lib oldnames.lib - -baselibs = kernel32.lib $(optlibs) advapi32.lib user32.lib tcl80$(DBGX).lib -#baselibs = kernel32.lib $(optlibs) advapi32.lib user32.lib tcl83.lib -winlibs = $(baselibs) gdi32.lib comdlg32.lib winspool.lib - - -guilibs = $(libc) $(winlibs) -conlibs = $(libc) $(baselibs) -guilibsdll = $(libcdll) $(winlibs) -conlibsdll = $(libcdll) $(baselibs) - -#------------------------------------------------------------------------- -# -# Project specific targets -# -#------------------------------------------------------------------------- - -all: dlls -dlls: $(TDOMDLL) - -install: all - @echo installing tDOM - @$(MKDIR) "$(INSTALLDIR)\lib\tDOM" - @xcopy /y $(TDOMDLL) "$(INSTALLDIR)\lib\tDOM" - @xcopy /y pkgIndex.tcl "$(INSTALLDIR)\lib\tDOM" - @xcopy /y ..\lib\tdom.tcl "$(INSTALLDIR)\lib\tDOM" - @xcopy /y ..\lib\domhtml.tcl "$(INSTALLDIR)\lib\tDOM" - -$(TDOMLIB): $(TDOMDLL) - -$(TDOMDLL): $(TDOMOBJS) - $(link32) $(ldebug) $(dlllflags) \ - -out:$@ $(guilibsdll) @<< -$(TDOMOBJS) -<< - - - $(cc32) $(cdebug) $(cflags) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $? - - -#--------------------------------------------------------------------- -# Dedependency rules -#--------------------------------------------------------------------- - - -#------------------------------------------------------------------------- -# Implicit rules -#------------------------------------------------------------------------- - -{$(EXPATDIR)}.c{$(TMPDIR)}.obj: - $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $< - -{$(GENERICDIR)}.c{$(TMPDIR)}.obj: - $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $< - -clean: - -@$(RM) $(OUTDIR)\*.exp 2>nul - -@$(RM) $(OUTDIR)\*.lib 2>nul - -@$(RM) $(OUTDIR)\*.dll 2>nul - -@$(RM) $(TMPDIR)\*.pch 2>nul - -@$(RM) $(TMPDIR)\*.obj 2>nul - -@$(RM) $(TMPDIR)\*.ilk 2>nul - -@$(RM) $(TMPDIR)\*.pdb 2>nul