Index: Makefile.in =================================================================== RCS file: Makefile.in diff -N Makefile.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ Makefile.in 3 Jun 2005 23:14:43 -0000 @@ -0,0 +1,466 @@ +# Makefile.in -- +# +# This file is a Makefile for TclDOM TEA Extension. If it has the name +# "Makefile.in" then it is a template for a Makefile; to generate the +# actual Makefile, run "./configure", which is a configuration script +# generated by the "autoconf" program (constructs like "@foo@" will get +# replaced in the actual Makefile. +# +# Copyright (c) 1999 Scriptics Corporation. +# Copyright (c) 2002 ActiveState SRL. +# Copyright (c) 2003 Zveno Pty Ltd. +# +# See the file "LICENSE" for information on usage and redistribution +# of this file and for a DISCLAIMER OF ALL WAARANTIES. +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: Makefile.in,v 1.25 2003/12/15 05:20:39 balls Exp $ + +#======================================================================== +# RUNTIME_SOURCES identifies Tcl runtime files that are associated with +# this package that need to be installed, if any. +#======================================================================== + +#RUNTIME_SOURCES = + +#======================================================================== +# This is a list of header files to be installed +#======================================================================== + +GENERIC_HDRS = + +#======================================================================== +# This is a list of script files to be installed +#======================================================================== + +GENERIC_SCRIPTS = \ + $(srcdir)/library/dom.tcl \ + $(srcdir)/library/dommap.tcl \ + $(srcdir)/library/xmlswitch.tcl \ + library/pkgIndex.tcl + +#======================================================================== +# Add additional lines to handle any additional AC_SUBST cases that +# have been added to the configure script. +#======================================================================== + +#TCLDOM_NEW_VAR = @TCLDOM_NEW_VAR@ + +#======================================================================== +# Nothing of the variables below this line need to be changed. Please +# check the TARGETS section below to make sure the make targets are +# correct. +#======================================================================== + +#======================================================================== +# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the +# library that we are building. +#======================================================================== + +lib_BINARIES = +BINARIES = + +SHELL = @SHELL@ + +srcdir = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +libdir = @libdir@ +datadir = @datadir@ +mandir = @mandir@ +includedir = @includedir@ + +DESTDIR = + +PKG_DIR = $(PACKAGE)$(VERSION) +pkgdatadir = $(datadir)/$(PKG_DIR) +pkglibdir = $(libdir)/$(PKG_DIR) +pkgincludedir = $(includedir)/$(PKG_DIR) + +top_builddir = . + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ +CC = @CC@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ +CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ +CLEANFILES = @CLEANFILES@ +EXEEXT = @EXEEXT@ +LDFLAGS_DEBUG = @LDFLAGS_DEBUG@ +LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ +LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ +MAKE_LIB = @MAKE_LIB@ +MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ +MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ +MAKE_STUB_LIB = @MAKE_STUB_LIB@ +OBJEXT = @OBJEXT@ +RANLIB = @RANLIB@ +RANLIB_STUB = @RANLIB_STUB@ +SHLIB_CFLAGS = @SHLIB_CFLAGS@ +SHLIB_LD = @SHLIB_LD@ +SHLIB_LDFLAGS = @SHLIB_LDFLAGS@ +SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ +STLIB_LD = @STLIB_LD@ +TCL_DEFS = @TCL_DEFS@ +TCL_BIN_DIR = @TCL_BIN_DIR@ +TCL_SRC_DIR = @TCL_SRC_DIR@ +# This is necessary for packages that use private Tcl headers +#TCL_TOP_DIR_NATIVE = @TCL_TOP_DIR_NATIVE@ +# Not used, but retained for reference of what libs Tcl required +TCL_LIBS = @TCL_LIBS@ + +#======================================================================== +# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our +# package without installing. The other environment variables allow us +# to test against an uninstalled Tcl. Add special env vars that you +# require for testing here (like TCLX_LIBRARY). +#======================================================================== + +EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) +TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ + LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \ + DYLD_LIBRARY_PATH="$(EXTRA_PATH):$(DYLD_LIBRARY_PATH)" \ + LIBPATH="$(EXTRA_PATH):${LIBPATH}" \ + SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \ + PATH="$(EXTRA_PATH):$(PATH)" +TCLSH_PROG = @TCLSH_PROG@ +TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) +SHARED_BUILD = @SHARED_BUILD@ + +INCLUDES = @TCL_INCLUDES@ + +EXTRA_CFLAGS = $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@ + +DEFS = $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS) + +CONFIG_CLEAN_FILES = Makefile + +CPPFLAGS = @CPPFLAGS@ +LIBS = @LIBS@ +AR = ar +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +#======================================================================== +# Start of user-definable TARGETS section +#======================================================================== + +#======================================================================== +# TEA TARGETS. Please note that the "libraries:" target refers to platform +# independent files, and the "binaries:" target inclues executable programs and +# platform-dependent libraries. Modify these targets so that they install +# the various pieces of your package. The make and install rules +# for the BINARIES that you specified above have already been done. +#======================================================================== + +all: binaries libraries doc + +#======================================================================== +# The binaries target builds executable programs, Windows .dll's, unix +# shared/static libraries, and any other platform-dependent files. +# The list of targets to build for "binaries:" is specified at the top +# of the Makefile, in the "BINARIES" variable. +#======================================================================== + +binaries: $(BINARIES) + +libraries: + +doc: + +install: all install-binaries install-libraries install-doc + +install-binaries: binaries install-lib-binaries install-bin-binaries + if test "x$(SHARED_BUILD)" = "x1"; then \ + $(INSTALL_DATA) library/pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ + fi + +#======================================================================== +# This rule installs platform-independent files, such as header files. +#======================================================================== + +install-libraries: libraries + @mkdir -p $(DESTDIR)$(includedir) + @echo "Installing header files in $(DESTDIR)$(includedir)" + @for i in $(GENERIC_HDRS) ; do \ + echo "Installing $$i" ; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \ + done; + @for p in $(GENERIC_SCRIPTS); do \ + if test -f $$p; then \ + echo "Installing $$p"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(pkglibdir); \ + else :; fi; \ + done + @echo "libraries done" + +#======================================================================== +# Install documentation. Unix manpages should go in the $(mandir) +# directory. +#======================================================================== + +install-doc: doc + + +testshell = $(TCLSH_PROG) $(srcdir)/testshell + +#test: binaries libraries +# $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) +# $(testshell) \ +# -load 'load ./$(Tcldom_LIB_FILE)' \ +# -testdir $(srcdir)/tea.tests + +test: binaries libraries + echo package require dom \; cd $(srcdir)/tests \; source all.tcl | $(TCLSH) $(TESTFLAGS) + +shell: binaries libraries + @$(TCLSH) $(SCRIPT) + +gdb: + $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) + +depend: + +#======================================================================== +# We need to enumerate the list of .c to .o lines here. +# +# In the following lines, $(srcdir) refers to the toplevel directory +# containing your extension. If your sources are in a subdirectory, +# you will have to modify the paths to reflect this: +# +# Tcldom.$(OBJEXT): $(srcdir)/generic/Tcldom.c +# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/Tcldom.c` -o $@ +# +# Setting the VPATH variable to a list of paths will cause the makefile +# to look into these paths when resolving .c to .obj dependencies. +# As necessary, add $(srcdir):$(srcdir)/compat:.... +#======================================================================== + +VPATH = $(srcdir) + +.c.$(OBJEXT): + $(COMPILE) -c `@CYGPATH@ $<` -o $@ + +#======================================================================== +# Create the pkgIndex.tcl file. +# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but +# you may find that you need to customize the package. If so, either +# modify the -hand version, or create a pkgIndex.tcl.in file and have +# the configure script output the pkgIndex.tcl by editing configure.in. +#======================================================================== +# +# The configure generates the index, nothing to be done here. +# +# pkgIndex.tcl: +# ( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH) +# +# pkgIndex.tcl-hand: +# (echo 'package ifneeded $(PACKAGE) $(VERSION) \ +# [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\ +# ) > pkgIndex.tcl + +#======================================================================== +# Distribution creation +# You may need to tweak this target to make it work correctly. +#======================================================================== + +#COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar +COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) +DIST_ROOT = /tmp/dist +DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) + +dist-clean: + rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* + +dist: dist-clean doc + mkdir -p $(DIST_DIR) + cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \ + $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \ + $(DIST_DIR)/ + chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4 + chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in + + mkdir $(DIST_DIR)/tclconfig + cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \ + $(DIST_DIR)/tclconfig/ + chmod 664 $(DIST_DIR)/tclconfig/tcl.m4 + chmod +x $(DIST_DIR)/tclconfig/install-sh + + -list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \ + for p in $$list; do \ + if test -d $(srcdir)/$$p ; then \ + mkdir -p $(DIST_DIR)/$$p; \ + cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \ + fi; \ + done + + -list='doc'; \ + for p in $$list; do \ + if test -d $$p ; then \ + mkdir -p $(DIST_DIR)/$$p; \ + cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \ + fi; \ + done + -mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art + rm -rf $(DIST_DIR)/htdocs + + (cd $(DIST_ROOT); $(COMPRESS);) + +dist_orig: + rm -rf $(PKG_DIR)* + ls -d $(srcdir)/* > __FILES + mkdir $(PKG_DIR) + cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR) + rm __FILES + find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \; + cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE + -tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz + -tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2 + -zip -r $(PKG_DIR).zip $(PKG_DIR) + rm -rf $(PKG_DIR) + +#======================================================================== +# End of user-definable section +#======================================================================== + +#======================================================================== +# Don't modify the file to clean here. Instead, set the "CLEANFILES" +# variable in configure.in +#======================================================================== + +clean: + -test -z "$(BINARIES)" || rm -f $(BINARIES) + -rm -f *.$(OBJEXT) core *.core + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean: clean + -rm -f *.tab.c + -rm -f $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log config.status + +#======================================================================== +# Install binary object libraries. On Windows this includes both .dll and +# .lib files. Because the .lib files are not explicitly listed anywhere, +# we need to deduce their existence from the .dll file of the same name. +# Library files go into the lib directory. +# In addition, this will generate the pkgIndex.tcl +# file in the install location (assuming it can find a usable tclsh shell) +# +# You should not have to modify this target. +#======================================================================== + +install-lib-binaries: + @mkdir -p $(DESTDIR)$(pkglibdir) + @list='$(lib_BINARIES)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ + stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ + if test "x$$stub" = "xstub"; then \ + echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ + $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ + else \ + echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ + $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ + fi; \ + ext=`echo $$p|sed -e "s/.*\.//"`; \ + if test "x$$ext" = "xdll"; then \ + lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ + if test -f $$lib; then \ + echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ + $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ + fi; \ + fi; \ + fi; \ + done + @list='$(RUNTIME_SOURCES)'; for p in $$list; do \ + if test -f $(srcdir)/library/$$p; then \ + echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \ + $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \ + fi; \ + done + +#======================================================================== +# Install binary executables (e.g. .exe files and dependent .dll files) +# This is for files that must go in the bin directory (located next to +# wish and tclsh), like dependent .dll files on Windows. +# +# You should not have to modify this target, except to define bin_BINARIES +# above if necessary. +#======================================================================== + +install-bin-binaries: + @mkdir -p $(DESTDIR)$(bindir) + @list='$(bin_BINARIES)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ + fi; \ + done + +.SUFFIXES: .c .$(OBJEXT) + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +uninstall-binaries: + list='$(lib_BINARIES)'; for p in $$list; do \ + rm -f $(DESTDIR)$(pkglibdir)/$$p; \ + done + list='$(RUNTIME_SOURCES)'; for p in $$list; do \ + rm -f $(DESTDIR)$(pkglibdir)/$$p; \ + done + list='$(bin_BINARIES)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/$$p; \ + done + +#======================================================================== +# +# Target to regenerate header files and stub files from the *.decls tables. +# +#======================================================================== + +genstubs: + $(TCLSH_PROG) \ + $(srcdir)/../tcl/tools/genStubs.tcl $(srcdir) \ + $(Tcldom_DECLS) + +#======================================================================== +# +# Target to check that all exported functions have an entry in the stubs +# tables. +# +#======================================================================== + +Tcldom_DECLS = \ + $(srcdir)/tcldom.decls + +checkstubs: + -@for i in `nm -p $(Tcldom_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \ + | sort -n`; do \ + match=0; \ + for j in $(Tcldom_DECLS); do \ + if [ `grep -c $$i $$j` -gt 0 ]; then \ + match=1; \ + fi; \ + done; \ + if [ $$match -eq 0 ]; then echo $$i; fi \ + done + + +.PHONY: all binaries clean depend distclean doc install libraries test + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Index: configure.in =================================================================== RCS file: configure.in diff -N configure.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ configure.in 3 Jun 2005 23:14:43 -0000 @@ -0,0 +1,124 @@ +#! /bin/bash -norc +dnl +dnl Process this file with autoconf to produce a configure script. +dnl +AC_REVISION($Id: configure.in,v 1.25 2003/12/15 05:20:39 balls Exp $) + +#-------------------------------------------------------------------- +# Configure script for package 'TclDOM', as distributed at November 20, 2001. +# TEA compliant. +#-------------------------------------------------------------------- + +#-------------------------------------------------------------------- +# This very first macro is used to verify that the configure script can +# find the sources. The argument to AC_INIT is a unique filename for +# this package. +#-------------------------------------------------------------------- + +AC_INIT(./library/dom.tcl) + +AC_CONFIG_AUX_DIR(tclconfig) +CONFIGDIR=${srcdir}/tclconfig +AC_SUBST(CONFIGDIR) + +#-------------------------------------------------------------------- +# Setting our package name and version numbers. 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. +#-------------------------------------------------------------------- + +PACKAGE=Tcldom + +MAJOR_VERSION=3 +MINOR_VERSION=1 +PATCHLEVEL= + +VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL} +NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION} +TCLDOM_VERSION=${VERSION} + +AC_SUBST(PACKAGE) +AC_SUBST(VERSION) +AC_SUBST(TCLDOM_VERSION) + +#-------------------------------------------------------------------- +# This was placed here so that we can compile with -DVERSION="1.2" to +# encode the package version directly into the source files. +#-------------------------------------------------------------------- + +eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}") +eval AC_DEFINE_UNQUOTED(TCLDOM_VERSION, "${TCLDOM_VERSION}") + +#-------------------------------------------------------------------- +# Call TEA_INIT as the first TEA_ macro to set up initial vars. +# This will define a ${TEA_PLATFORM} variable == "unix" or "windows". +#-------------------------------------------------------------------- + +TEA_INIT + +#-------------------------------------------------------------------- +# Load the tclConfig.sh file +#-------------------------------------------------------------------- + +TEA_PATH_TCLCONFIG +TEA_LOAD_TCLCONFIG + +#----------------------------------------------------------------------- +# Handle the --prefix=... option by defaulting to what Tcl gave. +# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. +#----------------------------------------------------------------------- + +TEA_PREFIX + +#----------------------------------------------------------------------- +# 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. +#----------------------------------------------------------------------- + +TEA_SETUP_COMPILER + +#-------------------------------------------------------------------- +# A few miscellaneous platform-specific items: +# +# We have to define a special symbol for Windows (BUILD_Tcldom in this +# case) so that we create the export library with the dll. +# +# Windows creates a few extra files that need to be cleaned up. +# We can add more files to clean if our extension creates any extra +# files in the future. +# +# Define any extra compiler flags in the PACKAGE_CFLAGS variable. +# These will be appended to the current set of compiler flags for +# your system. +#-------------------------------------------------------------------- + +CLEANFILES="pkgIndex.tcl" +AC_SUBST(CLEANFILES) + +#-------------------------------------------------------------------- +# 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. +#-------------------------------------------------------------------- + +TEA_PROG_TCLSH + +AC_SUBST(MAJOR_VERSION) +AC_SUBST(MINOR_VERSION) +AC_SUBST(PATCHLEVEL) + +#-------------------------------------------------------------------- +# 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 the AC variables in. Include these here. +#-------------------------------------------------------------------- + +AC_OUTPUT([Makefile library/pkgIndex.tcl]) + +#-------------------------------------------------------------------- Index: examples/cgi2dom.tcl =================================================================== RCS file: /cvsroot/tclxml/tcldom/examples/cgi2dom.tcl,v retrieving revision 1.4 diff -u -p -u -p -r1.4 cgi2dom.tcl --- examples/cgi2dom.tcl 9 Dec 2003 04:56:40 -0000 1.4 +++ examples/cgi2dom.tcl 3 Jun 2005 23:14:43 -0000 @@ -9,7 +9,7 @@ # # $Id: cgi2dom.tcl,v 1.4 2003/12/09 04:56:40 balls Exp $ -package require dom 2.5 +package require dom 3.0 package require xpath package provide cgi2dom 1.1 Index: include/tcldom-libxml2/tcldomlibxml2.h =================================================================== RCS file: /cvsroot/tclxml/tcldom/include/tcldom-libxml2/tcldomlibxml2.h,v retrieving revision 1.2 diff -u -p -u -p -r1.2 tcldomlibxml2.h --- include/tcldom-libxml2/tcldomlibxml2.h 24 May 2005 21:09:56 -0000 1.2 +++ include/tcldom-libxml2/tcldomlibxml2.h 3 Jun 2005 23:14:43 -0000 @@ -77,7 +77,7 @@ extern "C" { EXTERN CONST char * Tcldom_libxml2_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, CONST char *version, int exact)); -#ifndef USE_TCLDOMXML_STUBS +#ifndef USE_TCLDOM_LIBXML2_STUBS /* * When not using stubs, make it a macro. Index: library/dom.tcl =================================================================== RCS file: /cvsroot/tclxml/tcldom/library/dom.tcl,v retrieving revision 1.23 diff -u -p -u -p -r1.23 dom.tcl --- library/dom.tcl 25 Feb 2004 20:10:28 -0000 1.23 +++ library/dom.tcl 3 Jun 2005 23:14:44 -0000 @@ -17,7 +17,7 @@ package require xml 3.0 -package provide dom::tcl 3.0 +package provide dom::tcl 3.1 # Define generic constants Index: library/dommap.tcl =================================================================== RCS file: /cvsroot/tclxml/tcldom/library/dommap.tcl,v retrieving revision 1.5 diff -u -p -u -p -r1.5 dommap.tcl --- library/dommap.tcl 9 Dec 2003 04:56:43 -0000 1.5 +++ library/dommap.tcl 3 Jun 2005 23:14:44 -0000 @@ -13,7 +13,7 @@ package provide dommap 1.0 # We need the DOM -package require dom 2.6 +package require dom 3.0 namespace eval dommap { namespace export map Index: library/pkgIndex.tcl.in =================================================================== RCS file: /cvsroot/tclxml/tcldom/library/pkgIndex.tcl.in,v retrieving revision 1.16 diff -u -p -u -p -r1.16 pkgIndex.tcl.in --- library/pkgIndex.tcl.in 3 Dec 2003 20:18:43 -0000 1.16 +++ library/pkgIndex.tcl.in 3 Jun 2005 23:14:44 -0000 @@ -2,7 +2,7 @@ # # $Id: pkgIndex.tcl.in,v 1.16 2003/12/03 20:18:43 balls Exp $ -package ifneeded dom::c @VERSION@ [list load [file join $dir @Tcldom_LIB_FILE@]] +##package ifneeded dom::c @VERSION@ [list load [file join $dir @Tcldom_LIB_FILE@]] package ifneeded dom::tcl @VERSION@ [list source [file join $dir dom.tcl]] package ifneeded dommap 1.0 [list source [file join $dir dommap.tcl]] package ifneeded xmlswitch 1.0 [list source [file join $dir xmlswitch.tcl]] @@ -15,18 +15,3 @@ package ifneeded domtext @VERSIO ## Provided by separate package. ##package ifneeded dom::libxml2 @VERSION@ [list load [file join $dir @RELPATH@ @TCLDOM_XML2_LIB_FILE@] Tcldomxml] -namespace eval ::dom {} - -# Requesting the generic dom package loads the C package -# if available, otherwise falls back to the generic Tcl package. -# The application can tell which it got by examining the -# list of packages loaded (and looking for dom::c, dom::libxml2 or dom::tcl). - -package ifneeded dom @VERSION@ { - if {[catch {package require dom::libxml2 @VERSION@}]} { - if {[catch {package require dom::c @VERSION@}]} { - package require dom::tcl @VERSION@ - } - } - package provide dom @VERSION@ -} Index: src-libxml2/Makefile.in =================================================================== RCS file: /cvsroot/tclxml/tcldom/src-libxml2/Makefile.in,v retrieving revision 1.17 diff -u -p -u -p -r1.17 Makefile.in --- src-libxml2/Makefile.in 21 May 2005 11:51:23 -0000 1.17 +++ src-libxml2/Makefile.in 3 Jun 2005 23:14:44 -0000 @@ -61,7 +61,7 @@ tcldom_libxml2stub_LIB_FILE = @tcldom_li # this package that need to be installed, if any. #======================================================================== -RUNTIME_SOURCES = $(srcdir)/impl.tcl +RUNTIME_SOURCES = impl.tcl #======================================================================== # This is a list of header files to be installed @@ -88,6 +88,8 @@ LIBXML2_LIBDIR = @LIBXML2_LIBDIR@ ## ICONV_INCLUDEDIR = @ICONV_INCLUDEDIR@ ICONV_LIBDIR = @ICONV_LIBDIR@ +TCLXML_LIBXML2_VERSION = @tclxml_libxml2_VERSION@ + #======================================================================== # Nothing of the variables below this line need to be changed. Please # check the TARGETS section below to make sure the make targets are @@ -146,6 +148,7 @@ MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ MAKE_STUB_LIB = @MAKE_STUB_LIB@ OBJEXT = @OBJEXT@ RANLIB = @RANLIB@ +RANLIB_STUB = @RANLIB_STUB@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_LD = @SHLIB_LD@ SHLIB_LDFLAGS = @SHLIB_LDFLAGS@ @@ -169,6 +172,7 @@ TCL_LIBS = @TCL_LIBS@ EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \ + DYLD_LIBRARY_PATH="$(EXTRA_PATH):$(DYLD_LIBRARY_PATH)" \ LIBPATH="$(EXTRA_PATH):${LIBPATH}" \ SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \ PATH="$(EXTRA_PATH):$(PATH)" \ @@ -178,9 +182,10 @@ TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) SHARED_BUILD = @SHARED_BUILD@ INCLUDES = @TCL_INCLUDES@ \ - -I../include \ + -I$(srcdir)/../include \ -I$(includedir) \ - -I$(LIBXML2_INCLUDEDIR) + -I$(LIBXML2_INCLUDEDIR) \ + -I$(TCLXML_LIBXML2_INCLUDEDIR) EXTRA_CFLAGS = $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@ @@ -188,7 +193,9 @@ DEFS = $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAG CONFIG_CLEAN_FILES = Makefile -CPPFLAGS = @CPPFLAGS@ +CPPFLAGS = @CPPFLAGS@ \ + -DTCLXML_LIBXML2_VERSION=\"$(TCLXML_LIBXML2_VERSION)\" + LIBS = @LIBS@ AR = ar CFLAGS = @CFLAGS@ @@ -290,7 +297,7 @@ $($(PACKAGE)_LIB_FILE): $($(PACKAGE)_OBJ $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS) -rm -f $($(PACKAGE)stub_LIB_FILE) ${MAKE_STUB_LIB} - $(RANLIB) $($(PACKAGE)stub_LIB_FILE) + $(RANLIB_STUB) $($(PACKAGE)stub_LIB_FILE) #======================================================================== # We need to enumerate the list of .c to .o lines here. @@ -436,8 +443,13 @@ install-lib-binaries: if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ + if test "x$$stub" = "xstub"; then \ + echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ + $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ + else \ echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ + fi; \ ext=`echo $$p|sed -e "s/.*\.//"`; \ if test "x$$ext" = "xdll"; then \ lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ @@ -454,7 +466,7 @@ install-lib-binaries: $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$p; \ fi; \ done - $(INSTALL_DATA) tcldomlibxml2Config.sh $(DESTDIR)$(libdir) + $(INSTALL_DATA) tcldomlibxml2Config.sh $(DESTDIR)$(libdir)/tcldom_libxml2Config.sh #======================================================================== # Install binary executables (e.g. .exe files and dependent .dll files) @@ -498,9 +510,15 @@ uninstall-binaries: #======================================================================== genstubs: + cd $(srcdir) && \ + cp -p tcldomlibxml2StubInit.c tcldom_libxml2StubInit.c && \ + cp -p ../include/tcldom-libxml2/tcldomlibxml2Decls.h tcldom_libxml2Decls.h $(TCLSH_PROG) \ - $(srcdir)/../tools/genStubs.tcl $(srcdir) \ - $(srcdir)/tcldomxml.decls + $(srcdir)/../tcl/tools/genStubs.tcl $(srcdir) \ + $(Tcldom_libxml2_DECLS) + cd $(srcdir) && \ + mv -f tcldom_libxml2StubInit.c tcldomlibxml2StubInit.c && \ + mv -f tcldom_libxml2Decls.h ../include/tcldom-libxml2/tcldomlibxml2Decls.h #======================================================================== # Index: src-libxml2/configure.in =================================================================== RCS file: /cvsroot/tclxml/tcldom/src-libxml2/configure.in,v retrieving revision 1.14 diff -u -p -u -p -r1.14 configure.in --- src-libxml2/configure.in 20 May 2005 14:07:35 -0000 1.14 +++ src-libxml2/configure.in 3 Jun 2005 23:14:44 -0000 @@ -87,6 +87,12 @@ TEA_PREFIX TEA_SETUP_COMPILER +TEA_PATH_CONFIG(tclxml_libxml2) +TEA_LOAD_CONFIG(tclxml_libxml2) +AC_SUBST(tclxml_libxml2_VERSION) +TCLXML_LIBXML2_INCLUDEDIR=${tclxml_libxml2_SRC_DIR}/../include +AC_SUBST(TCLXML_LIBXML2_INCLUDEDIR) + #-------------------------------------------------------------------- # __CHANGE__ # Choose which headers you need. Extension authors should try very @@ -161,6 +167,7 @@ TEA_ENABLE_SYMBOLS #-------------------------------------------------------------------- AC_DEFINE(USE_TCL_STUBS) +AC_DEFINE(USE_TCLXML_LIBXML2_STUBS) #-------------------------------------------------------------------- # This macro generates a line to use when building a library. It @@ -258,6 +265,10 @@ do LIBXML2_LIBDIR="$d" break fi + if test -f "$d/libxml2.a" ; then + LIBXML2_LIBDIR="$d" + break + fi done if test "x$LIBXML2_LIBDIR" = "x"; then AC_MSG_ERROR([not found, please use --with-libxml2-lib]) @@ -311,8 +322,10 @@ fi if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${LIBXML2_LIBDIR}/libxml2_a.lib`\"" SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${ICONV_LIBDIR}/iconv.lib`\"" + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tclxml_libxml2_STUB_LIB_PATH}`\"" else SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -L\${LIBXML2_LIBDIR} -lxml2" + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tclxml_libxml2_STUB_LIB_SPEC}" fi ## SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_LIBS}" Index: src-libxml2/tcldomlibxml2.c =================================================================== RCS file: /cvsroot/tclxml/tcldom/src-libxml2/tcldomlibxml2.c,v retrieving revision 1.2 diff -u -p -u -p -r1.2 tcldomlibxml2.c --- src-libxml2/tcldomlibxml2.c 24 May 2005 21:09:56 -0000 1.2 +++ src-libxml2/tcldomlibxml2.c 3 Jun 2005 23:14:45 -0000 @@ -291,6 +291,11 @@ Tcldom_libxml2_Init (interp) return TCL_ERROR; } #endif +#ifdef USE_TCLXML_LIBXML2_STUBS + if (TclXML_libxml2_InitStubs(interp, TCLXML_LIBXML2_VERSION, 1) == NULL) { + return TCL_ERROR; + } +#endif if (Tcl_PkgRequire(interp, "xml", TCLDOM_LIBXML2_VERSION, 0) == NULL) { Tcl_SetResult(interp, "unable to load XML package", NULL); @@ -724,11 +729,7 @@ void DeleteNamespace (interp, ns) #if (TCL_MAJOR_VERSION < 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 5)) -EXTERN Tcl_Namespace * Tcl_FindNamespace _ANSI_ARGS_((Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * contextNsPtr, - int flags)); -EXTERN void Tcl_DeleteNamespace _ANSI_ARGS_((Tcl_Namespace * nsPtr)); +#include #endif /* Tcl < 8.5 */ Index: src-libxml2/tcldomlibxml2Config.sh.in =================================================================== RCS file: /cvsroot/tclxml/tcldom/src-libxml2/tcldomlibxml2Config.sh.in,v retrieving revision 1.1 diff -u -p -u -p -r1.1 tcldomlibxml2Config.sh.in --- src-libxml2/tcldomlibxml2Config.sh.in 20 May 2005 14:07:36 -0000 1.1 +++ src-libxml2/tcldomlibxml2Config.sh.in 3 Jun 2005 23:14:45 -0000 @@ -1,55 +1,55 @@ -# tcldomConfig.sh -- +# tcldom_libxml2Config.sh -- # -# This shell script (for sh) is generated automatically by tcldomxml's +# This shell script (for sh) is generated automatically by tcldom_libxml2's # configure script. It will create shell variables for most of # the configuration options discovered by the configure script. # This script is intended to be included by the configure scripts -# for tcldomxml extensions so that they don't have to figure this all +# for tcldom_libxml2 extensions so that they don't have to figure this all # out for themselves. This file does not duplicate information # already provided by tclConfig.sh, so you may need to use that # file in addition to this one. # # The information in this file is specific to a single platform. -# tcldomxml's version number. -tcldomxml_VERSION='@VERSION@' -tcldomxml_MAJOR_VERSION='@MAJOR_VERSION@' -tcldomxml_MINOR_VERSION='@MINOR_VERSION@' -tcldomxml_RELEASE_LEVEL='@PATCHLEVEL@' +# tcldom_libxml2's version number. +tcldom_libxml2_VERSION='@VERSION@' +tcldom_libxml2_MAJOR_VERSION='@MAJOR_VERSION@' +tcldom_libxml2_MINOR_VERSION='@MINOR_VERSION@' +tcldom_libxml2_RELEASE_LEVEL='@PATCHLEVEL@' -# The name of the tcldomxml library (may be either a .a file or a shared library): -tcldomxml_LIB_FILE=@tcldomxml_LIB_FILE@ +# The name of the tcldom_libxml2 library (may be either a .a file or a shared library): +tcldom_libxml2_LIB_FILE=@tcldom_libxml2_LIB_FILE@ -# String to pass to linker to pick up the tcldomxml library from its +# String to pass to linker to pick up the tcldom_libxml2 library from its # build directory. -tcldomxml_BUILD_LIB_SPEC='@tcldomxml_BUILD_LIB_SPEC@' +tcldom_libxml2_BUILD_LIB_SPEC='@tcldom_libxml2_BUILD_LIB_SPEC@' -# String to pass to linker to pick up the tcldomxml library from its +# String to pass to linker to pick up the tcldom_libxml2 library from its # installed directory. -tcldomxml_LIB_SPEC='@tcldomxml_LIB_SPEC@' +tcldom_libxml2_LIB_SPEC='@tcldom_libxml2_LIB_SPEC@' -# The name of the tcldomxml stub library (a .a file): -tcldomxml_STUB_LIB_FILE=@tcldomxmlstub_LIB_FILE@ +# The name of the tcldom_libxml2 stub library (a .a file): +tcldom_libxml2_STUB_LIB_FILE=@tcldom_libxml2stub_LIB_FILE@ -# String to pass to linker to pick up the tcldomxml stub library from its +# String to pass to linker to pick up the tcldom_libxml2 stub library from its # build directory. -tcldomxml_BUILD_STUB_LIB_SPEC='@tcldomxml_BUILD_STUB_LIB_SPEC@' +tcldom_libxml2_BUILD_STUB_LIB_SPEC='@tcldom_libxml2_BUILD_STUB_LIB_SPEC@' -# String to pass to linker to pick up the tcldomxml stub library from its +# String to pass to linker to pick up the tcldom_libxml2 stub library from its # installed directory. -tcldomxml_STUB_LIB_SPEC='@tcldomxml_STUB_LIB_SPEC@' +tcldom_libxml2_STUB_LIB_SPEC='@tcldom_libxml2_STUB_LIB_SPEC@' -# String to pass to linker to pick up the tcldomxml stub library from its +# String to pass to linker to pick up the tcldom_libxml2 stub library from its # build directory. -tcldomxml_BUILD_STUB_LIB_PATH='@tcldomxml_BUILD_STUB_LIB_PATH@' +tcldom_libxml2_BUILD_STUB_LIB_PATH='@tcldom_libxml2_BUILD_STUB_LIB_PATH@' -# String to pass to linker to pick up the tcldomxml stub library from its +# String to pass to linker to pick up the tcldom_libxml2 stub library from its # installed directory. -tcldomxml_STUB_LIB_PATH='@tcldomxml_STUB_LIB_PATH@' +tcldom_libxml2_STUB_LIB_PATH='@tcldom_libxml2_STUB_LIB_PATH@' # Location of the top-level source directories from which [incr Tcl] # was built. This is the directory that contains generic, unix, etc. # If [incr Tcl] was compiled in a different place than the directory # containing the source files, this points to the location of the sources, # not the location where [incr Tcl] was compiled. -tcldomxml_SRC_DIR='@srcdir@' +tcldom_libxml2_SRC_DIR='@srcdir@'