From a899e78efb8400376ec3ef09b2a0df396356dae3 Mon Sep 17 00:00:00 2001 From: William Joye Date: Fri, 13 Jan 2017 15:52:04 -0500 Subject: update TEA 3.10 --- tclxml/Makefile.in | 34 ++-- tclxml/TclxmlConfig.sh | 56 ------ tclxml/aclocal.m4 | 0 tclxml/configure | 490 +++++++++++++++++++++++++++++++++++++------------ tclxml/configure.ac | 284 ++++++++++++++++++++++++++++ tclxml/configure.in | 287 ----------------------------- tclxml/pkgIndex.tcl.in | 137 +------------- 7 files changed, 686 insertions(+), 602 deletions(-) mode change 100755 => 100644 tclxml/Makefile.in delete mode 100644 tclxml/TclxmlConfig.sh mode change 100755 => 100644 tclxml/aclocal.m4 create mode 100644 tclxml/configure.ac delete mode 100755 tclxml/configure.in diff --git a/tclxml/Makefile.in b/tclxml/Makefile.in old mode 100755 new mode 100644 index 9576e15..c24c8cc --- a/tclxml/Makefile.in +++ b/tclxml/Makefile.in @@ -86,12 +86,12 @@ pkgincludedir = $(includedir)/$(PKG_DIR) top_builddir = . INSTALL_OPTIONS = -INSTALL = $(SHELL) $(srcdir)/tclconfig/install-sh -c ${INSTALL_OPTIONS} -INSTALL_DATA_DIR = ${INSTALL} -d -m 755 -INSTALL_PROGRAM = ${INSTALL} -m 555 -INSTALL_DATA = ${INSTALL} -m 444 -INSTALL_SCRIPT = ${INSTALL_PROGRAM} -INSTALL_LIBRARY = ${INSTALL} -m 644 +INSTALL = @INSTALL@ ${INSTALL_OPTIONS} +INSTALL_DATA_DIR = @INSTALL_DATA_DIR@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_LIBRARY = @INSTALL_LIBRARY@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ @@ -151,7 +151,7 @@ INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ PKG_CFLAGS = @PKG_CFLAGS@ @XML2_CFLAGS@ @XSLT_CFLAGS@ # TCL_DEFS is not strictly need here, but if you remove it, then you -# must make sure that configure.in checks for the necessary components +# must make sure that configure.ac checks for the necessary components # that your library may use. TCL_DEFS can actually be a problem if # you do not compile with a similar machine setup as the Tcl core was # compiled with. @@ -159,7 +159,7 @@ PKG_CFLAGS = @PKG_CFLAGS@ @XML2_CFLAGS@ @XSLT_CFLAGS@ DEFS = @DEFS@ $(PKG_CFLAGS) # Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile -CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl include/tclxml/tclxml.h +CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl include/tclxml/tclxml.h tclxmlConfig.sh CLEANFILES = @CLEANFILES@ CPPFLAGS = @CPPFLAGS@ @@ -203,6 +203,10 @@ libraries: #======================================================================== doc: + @echo "If you have documentation to create, place the commands to" + @echo "build the docs in the 'doc:' target. For example:" + @echo " xml2nroff sample.xml > sample.n" + @echo " xml2html sample.xml > sample.html" install: all install-binaries install-libraries #install-doc @@ -239,6 +243,10 @@ test: binaries libraries -load "package ifneeded ${PACKAGE_NAME} ${PACKAGE_VERSION} \ [list load `@CYGPATH@ $(PKG_LIB_FILE)` $(PACKAGE_NAME)]" +genstubs: $(srcdir)/tools/genStubs.tcl $(srcdir)/src/tclxml.decls + @echo $(TCLSH) $(srcdir)/tools/genStubs.tcl $(srcdir)/src $(srcdir)/src/tclxml.decls + @$(TCLSH) $(srcdir)/tools/genStubs.tcl $(srcdir)/src $(srcdir)/src/tclxml.decls + shell: binaries libraries @$(TCLSH) $(SCRIPT) @@ -314,9 +322,9 @@ dist: dist-clean $(INSTALL_DATA_DIR) $(DIST_DIR) cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \ $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \ - $(DIST_DIR)/ + $(srcdir)/configure.ac $(DIST_DIR)/ chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4 - chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in + chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.ac for i in $(srcdir)/*.[ch]; do \ if [ -f $$i ]; then \ @@ -346,18 +354,19 @@ dist: dist-clean #======================================================================== # Don't modify the file to clean here. Instead, set the "CLEANFILES" -# variable in configure.in +# variable in configure.ac #======================================================================== clean: -test -z "$(BINARIES)" || rm -f $(BINARIES) - -rm -f $(PKG_OBJECTS) *.$(OBJEXT) core *.core + -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 + -rm -rf autom4te.cache #======================================================================== # Install binary object libraries. On Windows this includes both .dll and @@ -405,6 +414,7 @@ install-lib-binaries: binaries echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ fi + $(INSTALL_DATA) tclxmlConfig.sh $(DESTDIR)$(libdir) #======================================================================== # Install binary executables (e.g. .exe files and dependent .dll files) diff --git a/tclxml/TclxmlConfig.sh b/tclxml/TclxmlConfig.sh deleted file mode 100644 index 0e19a7b..0000000 --- a/tclxml/TclxmlConfig.sh +++ /dev/null @@ -1,56 +0,0 @@ -# tclxmlConfig.sh -- -# -# This shell script (for sh) is generated automatically by Tclxml'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 Tclxml 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. - -# Tclxml's version number. -Tclxml_VERSION='3.2' - -# The name of the Tclxml library (may be either a .a file or a shared library): -Tclxml_LIB_FILE='libTclxml3.2.a' - -# String to pass to linker to pick up the Tclxml library from its -# build directory. -Tclxml_BUILD_LIB_SPEC='-L/Users/joye/saods9/tclxml-3.2 -lTclxml3.2' - -# String to pass to linker to pick up the Tclxml library from its -# installed directory. -Tclxml_LIB_SPEC='-L/Users/joye/saods9/lib/Tclxml3.2 -lTclxml3.2' - -# The name of the Tclxml stub library (a .a file): -Tclxml_STUB_LIB_FILE='libTclxmlstub3.2.a' - -# String to pass to linker to pick up the Tclxml stub library from its -# build directory. -Tclxml_BUILD_STUB_LIB_SPEC='-L/Users/joye/saods9/tclxml-3.2 -lTclxmlstub3.2' - -# String to pass to linker to pick up the Tclxml stub library from its -# installed directory. -Tclxml_STUB_LIB_SPEC='-L/Users/joye/saods9/lib/Tclxml3.2 -lTclxmlstub3.2' - -# String to pass to linker to pick up the Tclxml stub library from its -# build directory. -Tclxml_BUILD_STUB_LIB_PATH='/Users/joye/saods9/tclxml-3.2/' - -# String to pass to linker to pick up the Tclxml stub library from its -# installed directory. -Tclxml_STUB_LIB_PATH='/Users/joye/saods9/lib/Tclxml3.2/' - -# String to pass to the compiler so that an extension can find -# installed header. -Tclxml_INCLUDE_SPEC='-I/Users/joye/saods9/include' - -# 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. -Tclxml_SRC_DIR='.' diff --git a/tclxml/aclocal.m4 b/tclxml/aclocal.m4 old mode 100755 new mode 100644 diff --git a/tclxml/configure b/tclxml/configure index fa15c7e..ac15056 100755 --- a/tclxml/configure +++ b/tclxml/configure @@ -620,11 +620,28 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +PATCHLEVEL +MINOR_VERSION +MAJOR_VERSION +tclxml_STUB_LIB_PATH +tclxml_BUILD_STUB_LIB_PATH +tclxml_STUB_LIB_SPEC +tclxml_BUILD_STUB_LIB_SPEC +tclxml_LIB_SPEC +tclxml_BUILD_LIB_SPEC XSLT_LIBS XSLT_CFLAGS XML2_LIBS XML2_CFLAGS TCLSH_PROG +PRACTCL_NAME_LIBRARY +PRACTCL_VC_MANIFEST_EMBED_EXE +PRACTCL_VC_MANIFEST_EMBED_DLL +PRACTCL_STUB_LIB +PRACTCL_STATIC_LIB +PRACTCL_SHARED_LIB +PRACTCL_TOOLSET +PRACTCL_CFLAGS VC_MANIFEST_EMBED_EXE VC_MANIFEST_EMBED_DLL RANLIB_STUB @@ -638,6 +655,7 @@ CFLAGS_DEFAULT LD_LIBRARY_PATH_VAR SHLIB_CFLAGS SHLIB_LD_LIBS +SHLIB_SUFFIX SHLIB_LD STLIB_LD CFLAGS_WARNING @@ -646,6 +664,7 @@ CFLAGS_DEBUG RC CELIB_DIR AR +STUBS_BUILD SHARED_BUILD TCL_THREADS TCL_INCLUDES @@ -656,6 +675,11 @@ EGREP GREP RANLIB SET_MAKE +INSTALL_LIBRARY +INSTALL_SCRIPT +INSTALL_PROGRAM +INSTALL_DATA +INSTALL_DATA_DIR INSTALL CPP TCL_SHLIB_LD_LIBS @@ -691,6 +715,7 @@ PKG_STUB_LIB_FILE PKG_LIB_FILE EXEEXT CYGPATH +TEA_TK_EXTENSION target_alias host_alias build_alias @@ -736,12 +761,14 @@ with_tcl with_tclinclude enable_threads enable_shared +enable_stubs enable_64bit enable_64bit_vis enable_rpath enable_wince with_celib enable_symbols +with_tclsh with_xml2_config with_xslt_config with_xml_static @@ -1366,6 +1393,8 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-threads build with threads --enable-shared build and link with shared libraries (default: on) + --enable-stubs build and link with stub libraries. Always true for + shared builds (default: on) --enable-64bit enable 64bit support (default: off) --enable-64bit-vis enable 64bit Sparc VIS support (default: off) --disable-rpath disable rpath support (default: on) @@ -1379,6 +1408,7 @@ Optional Packages: (tclConfig.sh) --with-tclinclude directory containing the public Tcl header files --with-celib=DIR use Windows/CE support library from DIR + --with-tclsh Specify a local tcl shell to use for dynamic code --with-xml2-config the xml2-config configuration script --with-xslt-config the xslt-config configuration script --with-xml-static statically link the XML libraries @@ -2182,20 +2212,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # TEA extensions pass this us the version of TEA they think they # are compatible with. - TEA_VERSION="3.9" - + TEA_VERSION="3.10" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5 $as_echo_n "checking for correct TEA configuration... " >&6; } if test x"${PACKAGE_NAME}" = x ; then as_fn_error $? " -The PACKAGE_NAME variable must be defined by your TEA configure.in" "$LINENO" 5 +The PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5 fi - if test x"3.9" = x ; then + if test x"3.10" = x ; then as_fn_error $? " TEA version not specified." "$LINENO" 5 - elif test "3.9" != "${TEA_VERSION}" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5 -$as_echo "warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; } + elif test "3.10" != "${TEA_VERSION}" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.10\", have \"${TEA_VERSION}\"" >&5 +$as_echo "warning: requested TEA version \"3.10\", have \"${TEA_VERSION}\"" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5 $as_echo "ok (TEA ${TEA_VERSION})" >&6; } @@ -2206,6 +2235,7 @@ $as_echo "ok (TEA ${TEA_VERSION})" >&6; } if test "${CFLAGS+set}" != "set" ; then CFLAGS="" fi + TEA_TK_EXTENSION=0 case "`uname -s`" in *win32*|*WIN32*|*MINGW32_*) @@ -2226,7 +2256,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CYGPATH="cygpath -w" + ac_cv_prog_CYGPATH="cygpath -m" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -2251,9 +2281,8 @@ fi TEA_PLATFORM="windows" ;; *CYGWIN_*) - CYGPATH=echo EXEEXT=".exe" - # TEA_PLATFORM is determined later in LOAD_TCLCONFIG + # CYGPATH and TEA_PLATFORM are determined later in LOAD_TCLCONFIG ;; *) CYGPATH=echo @@ -2436,10 +2465,13 @@ $as_echo "$as_me: WARNING: --with-tcl argument should refer to directory contain for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ - `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ + `ls -d /usr/local/lib 2>/dev/null` \ + `ls -d /usr/pkg/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ + `ls -d /usr/lib/tcl8.6 2>/dev/null` \ + `ls -d /usr/lib/tcl8.5 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i; pwd)`" @@ -3359,9 +3391,51 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - TEA_PLATFORM="unix" + + TEA_PLATFORM="unix" + CYGPATH=echo + +else + + TEA_PLATFORM="windows" + # Extract the first word of "cygpath", so it can be a program name with args. +set dummy cygpath; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CYGPATH+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CYGPATH"; then + ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CYGPATH="cygpath -m" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 +$as_echo "$CYGPATH" >&6; } else - TEA_PLATFORM="windows" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -4118,7 +4192,18 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu - INSTALL="\$(SHELL) \$(srcdir)/tclconfig/install-sh -c" + INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c' + INSTALL_DATA_DIR='${INSTALL} -d -m 755' + INSTALL_DATA='${INSTALL} -m 644' + INSTALL_PROGRAM='${INSTALL}' + INSTALL_SCRIPT='${INSTALL}' + INSTALL_LIBRARY='${INSTALL_DATA}' + + + + + + #-------------------------------------------------------------------- @@ -5335,8 +5420,12 @@ done vars="" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then - # Convert foo.lib to -lfoo for GCC. No-op if not *.lib - i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + case $i in + *.lib) + # Convert foo.lib to -lfoo for GCC + i=-l`echo "$i" | sed -e 's/\.[^.]*$//' -e 's/\.lib.*//'` + ;; + esac fi PKG_LIBS="$PKG_LIBS $i" done @@ -5843,23 +5932,40 @@ $as_echo "$as_me: WARNING: $as_echo_n "checking how to build libraries... " >&6; } # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; tcl_ok=$enableval + enableval=$enable_shared; shared_ok=$enableval else - tcl_ok=yes + shared_ok=yes fi if test "${enable_shared+set}" = set; then enableval="$enable_shared" - tcl_ok=$enableval + shared_ok=$enableval else - tcl_ok=yes + shared_ok=yes fi - if test "$tcl_ok" = "yes" ; then + # Check whether --enable-stubs was given. +if test "${enable_stubs+set}" = set; then : + enableval=$enable_stubs; stubs_ok=$enableval +else + stubs_ok=yes +fi + + + if test "${enable_stubs+set}" = set; then + enableval="$enable_stubs" + stubs_ok=$enableval + else + stubs_ok=yes + fi + + # Stubs are always enabled for shared builds + if test "$shared_ok" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 $as_echo "shared" >&6; } SHARED_BUILD=1 + STUBS_BUILD=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 $as_echo "static" >&6; } @@ -5867,10 +5973,30 @@ $as_echo "static" >&6; } $as_echo "#define STATIC_BUILD 1" >>confdefs.h + if test "$stubs_ok" = "yes" ; then + STUBS_BUILD=1 + else + STUBS_BUILD=0 + fi + fi + if test "${STUBS_BUILD}" = "1" ; then + +$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h + + +$as_echo "#define USE_TCLOO_STUBS 1" >>confdefs.h + + if test "${TEA_WINDOWINGSYSTEM}" != ""; then + +$as_echo "#define USE_TK_STUBS 1" >>confdefs.h + + fi fi + + #-------------------------------------------------------------------- # This macro figures out what flags to use with the compiler/linker # when building shared/static debug/optimized objects. This information @@ -6240,7 +6366,9 @@ fi STLIB_LD='${AR} cr' LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" if test "x$SHLIB_VERSION" = x; then : - SHLIB_VERSION="1.0" + SHLIB_VERSION="" +else + SHLIB_VERSION=".$SHLIB_VERSION" fi case $system in # TEA specific: @@ -6404,13 +6532,35 @@ $as_echo "found $CELIB_DIR" >&6; } else runtime=-MD fi + case "x`echo \${VisualStudioVersion}`" in + x1[4-9]*) + lflags="${lflags} -nodefaultlib:libucrt.lib" + + vars="ucrt.lib" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + case $i in + *.lib) + # Convert foo.lib to -lfoo for GCC + i=-l`echo "$i" | sed -e 's/\.[^.]*$//' -e 's/\.lib.*//'` + ;; + esac + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + ;; + *) + ;; + esac if test "$do64bit" != "no" ; then # All this magic is necessary for the Win64 SDK RC1 - hobbs CC="\"${PATH64}/cl.exe\"" CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" RC="\"${MSSDK}/bin/rc.exe\"" - lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" + lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" LINKBIN="\"${PATH64}/link.exe\"" CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" @@ -6420,8 +6570,12 @@ $as_echo "found $CELIB_DIR" >&6; } vars="bufferoverflowU.lib" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then - # Convert foo.lib to -lfoo for GCC. No-op if not *.lib - i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + case $i in + *.lib) + # Convert foo.lib to -lfoo for GCC + i=-l`echo "$i" | sed -e 's/\.[^.]*$//' -e 's/\.lib.*//'` + ;; + esac fi PKG_LIBS="$PKG_LIBS $i" done @@ -6462,13 +6616,13 @@ _ACEOF CFLAGS_DEBUG="-nologo -Zi -Od" CFLAGS_OPTIMIZE="-nologo -Ox" lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'` - lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo" + lflags="${lflags} -MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo" LINKBIN="\"${CEBINROOT}/link.exe\"" else RC="rc" - lflags="-nologo" - LINKBIN="link" + lflags="${lflags} -nologo" + LINKBIN="link" CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" fi @@ -6572,6 +6726,8 @@ fi CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" SHLIB_LD='${CC} -shared' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + PRACTCL_UNSHARED_LIB_SUFFIX='.a' + LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}" @@ -6583,7 +6739,7 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #ifdef __WIN32__ + #ifdef _WIN32 #error cross-compiler #endif @@ -6790,8 +6946,10 @@ fi CYGWIN_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a" SHLIB_SUFFIX=".dll" EXEEXT=".exe" + do64bit_ok=yes CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -7108,7 +7266,14 @@ fi LDFLAGS="" ;; *) - SHLIB_CFLAGS="-fPIC" + case "$arch" in + alpha|sparc64) + SHLIB_CFLAGS="-fPIC" + ;; + *) + SHLIB_CFLAGS="-fpic" + ;; + esac SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_SUFFIX=".so" if test $doRpath = yes; then : @@ -7116,7 +7281,7 @@ fi CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}' LDFLAGS="-Wl,-export-dynamic" ;; esac @@ -7164,7 +7329,7 @@ fi # This configuration from FreeBSD Ports. SHLIB_CFLAGS="-fPIC" SHLIB_LD="${CC} -shared" - TCL_SHLIB_LD_EXTRAS="-Wl,-soname=\$@" + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@" SHLIB_SUFFIX=".so" LDFLAGS="" if test $doRpath = yes; then : @@ -7179,11 +7344,15 @@ fi CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LDFLAGS="$LDFLAGS $PTHREAD_LIBS" fi - # Version numbers are dot-stripped by system policy. - TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .` - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1' - TCL_LIB_VERSIONS_OK=nodots + case $system in + FreeBSD-3.*) + # Version numbers are dot-stripped by system policy. + TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .` + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1' + TCL_LIB_VERSIONS_OK=nodots + ;; + esac ;; Darwin-*) CFLAGS_OPTIMIZE="-Os" @@ -7545,8 +7714,8 @@ fi else - SHLIB_CFLAGS="-Kpic -belf" - LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" + SHLIB_CFLAGS="-Kpic -belf" + LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" fi SHLIB_LD="ld -G" @@ -7812,11 +7981,13 @@ fi # TEA specific: use PACKAGE_VERSION instead of VERSION SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}' + fi if test "$UNSHARED_LIB_SUFFIX" = ""; then : # TEA specific: use PACKAGE_VERSION instead of VERSION UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a' + fi if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then @@ -8007,6 +8178,7 @@ $as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h + # These must be called after we do the basic CFLAGS checks and # verify any possible 64-bit or similar switches are necessary @@ -8407,28 +8579,22 @@ $as_echo "enabled $tcl_ok debugging" >&6; } #-------------------------------------------------------------------- -# 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. -#-------------------------------------------------------------------- - - -$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h - -#AC_DEFINE(USE_TK_STUBS, 1, [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. #-------------------------------------------------------------------- - if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then - MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)" - MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + PRACTCL_TOOLSET="gcc" + PRACTCL_VC_MANIFEST_EMBED_DLL=: + PRACTCL_VC_MANIFEST_EMBED_EXE=: + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then + PRACTCL_TOOLSET="msvc" + PRACTCL_STATIC_LIB="%STLIB_LD% -out:%OUTFILE% %LIBRARY_OBJECTS%" + PRACTCL_SHARED_LIB="%SHLIB_LD% %SHLIB_LD_LIBS% %LDFLAGS_DEFAULT% -out:%OUTFILE% %LIBRARY_OBJECTS%" + MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)" + MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(_MSC_VER) && _MSC_VER >= 1400 @@ -8439,10 +8605,12 @@ _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "manifest needed" >/dev/null 2>&1; then : - # Could do a CHECK_PROG for mt, but should always be with MSVC8+ - VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi" - VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi" - MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}" + # Could do a CHECK_PROG for mt, but should always be with MSVC8+ + PRACTCL_VC_MANIFEST_EMBED_DLL="mt.exe -nologo -manifest %OUTFILE%.manifest -outputresource:%OUTFILE%\;2" + PRACTCL_VC_MANIFEST_EMBED_EXE="mt.exe -nologo -manifest %OUTFILE%.manifest -outputresource:%OUTFILE%\;1" + VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi" + VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi" + MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}" CLEANFILES="$CLEANFILES *.manifest" @@ -8450,67 +8618,89 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | fi rm -f conftest* - MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)" - else - MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)" - MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}" - MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)" - fi + PRACTCL_STUB_LIB="%STLIB_LD% -nodefaultlib -out:%OUTFILE% %LIBRARY_OBJECTS%" + MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\$@ \$(PKG_STUB_OBJECTS)" + else + MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)" + MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}" + MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)" - if test "${SHARED_BUILD}" = "1" ; then - MAKE_LIB="${MAKE_SHARED_LIB} " - else - MAKE_LIB="${MAKE_STATIC_LIB} " - fi + PRACTCL_STATIC_LIB="%STLIB_LD% %OUTFILE% %LIBRARY_OBJECTS%" + PRACTCL_SHARED_LIB="%SHLIB_LD% -o %OUTFILE% %LIBRARY_OBJECTS% %SHLIB_LD_LIBS%" + PRACTCL_STUB_LIB="%STLIB_LD% %OUTFILE% %LIBRARY_OBJECTS%" + fi - #-------------------------------------------------------------------- - # Shared libraries and static libraries have different names. - # Use the double eval to make sure any variables in the suffix is - # substituted. (@@@ Might not be necessary anymore) - #-------------------------------------------------------------------- + if test "${SHARED_BUILD}" = "1" ; then + MAKE_LIB="${MAKE_SHARED_LIB} " + else + MAKE_LIB="${MAKE_STATIC_LIB} " + fi - if test "${TEA_PLATFORM}" = "windows" ; then - if test "${SHARED_BUILD}" = "1" ; then + #-------------------------------------------------------------------- + # Shared libraries and static libraries have different names. + # Use the double eval to make sure any variables in the suffix is + # substituted. (@@@ Might not be necessary anymore) + #-------------------------------------------------------------------- + if test "${TEA_PLATFORM}" = "windows" ; then + PRACTCL_NAME_LIBRARY="%LIBRARY_PREFIX%%LIBRARY_NAME%%LIBRARY_VERSION_NODOTS%" + 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}`\"" + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" - else - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" - fi - # Some packages build their own stubs libraries - eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" - if test "$GCC" = "yes"; then - PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE} - fi - # These aren't needed on Windows (either MSVC or gcc) - RANLIB=: - RANLIB_STUB=: - else - RANLIB_STUB="${RANLIB}" - 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}" + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" + if test "$GCC" = "yes"; then + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" fi - eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" - RANLIB=: - else - eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" - fi - # Some packages build their own stubs libraries - eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + else + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" + if test "$GCC" = "yes"; then + PKG_LIB_FILE=lib${PKG_LIB_FILE} + fi + fi + # Some packages build their own stubs libraries + eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + if test "$GCC" = "yes"; then + PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE} fi - - # These are escaped so that only CFLAGS is picked up at configure time. - # The other values will be substituted at make time. - CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" - if test "${SHARED_BUILD}" = "1" ; then - CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" + # These aren't needed on Windows (either MSVC or gcc) + RANLIB=: + RANLIB_STUB=: + else + PRACTCL_NAME_LIBRARY="lib%LIBRARY_PREFIX%%LIBRARY_NAME%%LIBRARY_VERSION%" + RANLIB_STUB="${RANLIB}" + 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 "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + RANLIB=: + else + eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi + # Some packages build their own stubs libraries + eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + fi + + # Store the raw CFLAGS before we add the trimmings + PRACTCL_CFLAGS=${CFLAGS} + # These are escaped so that only CFLAGS is picked up at configure time. + # The other values will be substituted at make time. + CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" + if test "${SHARED_BUILD}" = "1" ; then + CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" + fi + + + + + + + + @@ -8532,14 +8722,46 @@ rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5 $as_echo_n "checking for tclsh... " >&6; } - if test -f "${TCL_BIN_DIR}/Makefile" ; then + + +# Check whether --with-tclsh was given. +if test "${with_tclsh+set}" = set; then : + withval=$with_tclsh; with_tclsh=${withval} +fi + + # Use the value from --with-tclsh, if it was given + TCLSH_PROG=0 + if test x"${with_tclsh}" != x ; then + if test -f "${with_tclsh}" ; then + TCLSH_PROG=${with_tclsh} + else + if test -f "${with_tclsh}/tcl8.6" ; then + TCLSH_PROG="${with_tclsh}/tcl8.6" + else + if test -f "${with_tclsh}/tclsh86.exe" ; then + TCLSH_PROG="${with_tclsh}/tclsh86.exe" + else + as_fn_error $? "${with_tclsh} does not point to a valid Tcl executable" "$LINENO" 5 + fi + fi + fi + else + if test -f "${TCL_BIN_DIR}/Makefile" ; then # tclConfig.sh is in Tcl build directory if test "${TEA_PLATFORM}" = "windows"; then + if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" ; then TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" + elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}" ; then + TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}" + elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}" ; then + TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}" + elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}" ; then + TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}" + fi else TCLSH_PROG="${TCL_BIN_DIR}/tclsh" fi - else + else # tclConfig.sh is in install location if test "${TEA_PLATFORM}" = "windows"; then TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" @@ -8556,7 +8778,8 @@ $as_echo_n "checking for tclsh... " >&6; } fi done TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}" - fi + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5 $as_echo "${TCLSH_PROG}" >&6; } @@ -8683,12 +8906,49 @@ $as_echo "use static linking" >&6; } fi #-------------------------------------------------------------------- +# These are for tclxmlConfig.sh +#-------------------------------------------------------------------- + + + #-------------------------------------------------------------------- + # These are for tclxmlConfig.sh + #-------------------------------------------------------------------- + + # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib) + eval pkglibdir="${libdir}/tclxml${PACKAGE_VERSION}" + if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then + eval tclxml_LIB_FLAG="-ltclxml${PACKAGE_VERSION}${DBGX}" + eval tclxml_STUB_LIB_FLAG="-ltclxmlstub${PACKAGE_VERSION}${DBGX}" + else + eval tclxml_LIB_FLAG="-ltclxml`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}" + eval tclxml_STUB_LIB_FLAG="-ltclxmlstub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}" + fi + tclxml_BUILD_LIB_SPEC="-L`$CYGPATH $(pwd)` ${tclxml_LIB_FLAG}" + tclxml_LIB_SPEC="-L`$CYGPATH ${pkglibdir}` ${tclxml_LIB_FLAG}" + tclxml_BUILD_STUB_LIB_SPEC="-L`$CYGPATH $(pwd)` ${tclxml_STUB_LIB_FLAG}" + tclxml_STUB_LIB_SPEC="-L`$CYGPATH ${pkglibdir}` ${tclxml_STUB_LIB_FLAG}" + tclxml_BUILD_STUB_LIB_PATH="`$CYGPATH $(pwd)`/${PKG_STUB_LIB_FILE}" + tclxml_STUB_LIB_PATH="`$CYGPATH ${pkglibdir}`/${PKG_STUB_LIB_FILE}" + + + + + + + + + + + + + +#-------------------------------------------------------------------- # 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. #-------------------------------------------------------------------- -ac_config_files="$ac_config_files Makefile pkgIndex.tcl include/tclxml/tclxml.h" +ac_config_files="$ac_config_files Makefile pkgIndex.tcl include/tclxml/tclxml.h tclxmlConfig.sh" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -9400,6 +9660,7 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;; "include/tclxml/tclxml.h") CONFIG_FILES="$CONFIG_FILES include/tclxml/tclxml.h" ;; + "tclxmlConfig.sh") CONFIG_FILES="$CONFIG_FILES tclxmlConfig.sh" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -9849,3 +10110,4 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + diff --git a/tclxml/configure.ac b/tclxml/configure.ac new file mode 100644 index 0000000..7e72aae --- /dev/null +++ b/tclxml/configure.ac @@ -0,0 +1,284 @@ +#!/bin/bash -norc +dnl This file is an input file used by the GNU "autoconf" program to +dnl generate the file "configure", which is run during Tcl installation +dnl to configure the system for the local environment. + +#----------------------------------------------------------------------- +# Sample configure.ac for Tcl Extensions. The only places you should +# need to modify this file are marked by the string __CHANGE__ +#----------------------------------------------------------------------- + +#----------------------------------------------------------------------- +# __CHANGE__ +# Set your package name and version numbers here. +# +# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION +# set as provided. These will also be added as -D defs in your Makefile +# so you can encode the package version directly into the source files. +# This will also define a special symbol for Windows (BUILD_ +# so that we create the export library with the dll. +#----------------------------------------------------------------------- + +AC_INIT([Tclxml], [3.2]) + +#-------------------------------------------------------------------- +# Call TEA_INIT as the first TEA_ macro to set up initial vars. +# This will define a ${TEA_PLATFORM} variable == "unix" or "windows" +# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. +#-------------------------------------------------------------------- + +TEA_INIT([3.10]) + +AC_CONFIG_AUX_DIR(tclconfig) + +#-------------------------------------------------------------------- +# Load the tclConfig.sh file +#-------------------------------------------------------------------- + +TEA_PATH_TCLCONFIG +TEA_LOAD_TCLCONFIG + +#-------------------------------------------------------------------- +# 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. +#----------------------------------------------------------------------- + +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 and a few others to create the basic setup +# necessary to compile executables. +#----------------------------------------------------------------------- + +TEA_SETUP_COMPILER + +#----------------------------------------------------------------------- +# __CHANGE__ +# Specify the C source files to compile in TEA_ADD_SOURCES, +# public headers that need to be installed in TEA_ADD_HEADERS, +# stub library C source files to compile in TEA_ADD_STUB_SOURCES, +# and runtime Tcl library files in TEA_ADD_TCL_SOURCES. +# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS +# and PKG_TCL_SOURCES. +#----------------------------------------------------------------------- + +TEA_ADD_SOURCES([tclxml.c docObj.c tclxml-libxml2.c nodeObj.c tcldom-libxml2.c tclxslt-libxslt.c]) +TEA_ADD_HEADERS([include/tclxml-libxml2/docObj.h include/tclxml-libxml2/tclxml-libxml2.h include/tcldom/tcldom.h include/tcldom-libxml2/tcldom-libxml2.h include/tclxslt/tclxslt.h]) +TEA_ADD_INCLUDES([-I./include]) +TEA_ADD_LIBS([]) +TEA_ADD_CFLAGS([]) +TEA_ADD_STUB_SOURCES([tclxmlStubInit.c tclxmlStubLib.c]) +TEA_ADD_TCL_SOURCES([tclxml-tcl/xml__tcl.tcl tclxml-tcl/sgml-8.0.tcl tclxml-tcl/sgml-8.1.tcl tclxml-tcl/xml-8.0.tcl tclxml-tcl/xml-8.1.tcl tclxml-tcl/sgmlparser.tcl tclxml-tcl/tclparser-8.0.tcl tclxml-tcl/tclparser-8.1.tcl tclxml-tcl/xmldep.tcl tclxml-tcl/xpath.tcl tcldom-libxml2.tcl tcldom-tcl/xmlswitch.tcl tclxslt/process.tcl tclxslt/resources.tcl tclxslt/utilities.tcl tclxslt/xsltcache.tcl tclxslt-libxslt.tcl]) + +#-------------------------------------------------------------------- +# __CHANGE__ +# +# You can add more files to clean if your extension creates any extra +# files by extending CLEANFILES. +# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure +# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var. +# +# A few miscellaneous platform-specific items: +# TEA_ADD_* any platform specific compiler/build info here. +#-------------------------------------------------------------------- + +#CLEANFILES="$CLEANFILES pkgIndex.tcl" +if test "${TEA_PLATFORM}" = "windows" ; then + # Ensure no empty if clauses + : + #TEA_ADD_SOURCES([win/winFile.c]) + #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) +else + # Ensure no empty else clauses + : + #TEA_ADD_SOURCES([unix/unixFile.c]) + #TEA_ADD_LIBS([-lsuperfly]) +fi + +#-------------------------------------------------------------------- +# __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 +#-------------------------------------------------------------------- + +TEA_PUBLIC_TCL_HEADERS +#TEA_PRIVATE_TCL_HEADERS + +#TEA_PUBLIC_TK_HEADERS +#TEA_PRIVATE_TK_HEADERS +#TEA_PATH_X + +#-------------------------------------------------------------------- +# Check whether --enable-threads or --disable-threads was given. +# This auto-enables if Tcl was compiled threaded. +#-------------------------------------------------------------------- + +TEA_ENABLE_THREADS + +#-------------------------------------------------------------------- +# The statement below defines a collection of symbols related to +# building as a shared library instead of a static library. +#-------------------------------------------------------------------- + +TEA_ENABLE_SHARED + +#-------------------------------------------------------------------- +# 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. +#-------------------------------------------------------------------- + +TEA_CONFIG_CFLAGS + +#-------------------------------------------------------------------- +# Set the default compiler switches based on the --enable-symbols option. +#-------------------------------------------------------------------- + +TEA_ENABLE_SYMBOLS + +#-------------------------------------------------------------------- +# 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. +#-------------------------------------------------------------------- + +TEA_MAKE_LIB + +#-------------------------------------------------------------------- +# Determine the name of the tclsh and/or wish executables in the +# Tcl and Tk build directories or the location they were installed +# into. These paths are used to support running test cases only, +# the Makefile should not be making use of these paths to generate +# a pkgIndex.tcl file or anything else at extension build time. +#-------------------------------------------------------------------- + +TEA_PROG_TCLSH +#TEA_PROG_WISH + +#-------------------------------------------------------------------- +# Load libxml2 configuration +#-------------------------------------------------------------------- + +AC_MSG_CHECKING([for xml2-config script]) + +AC_ARG_WITH(xml2-config, + [ --with-xml2-config the xml2-config configuration script], + with_xml2_config=${withval}) + +LIBXML2_CONFIG= +if test "x${with_xml2_config}" = "x" ; then + for c in \ + /Library/Frameworks/libxml.framework/Resources/Scripts/xml2-config \ + ${prefix}/bin/xml2-config \ + /usr/bin/xml2-config \ + /usr/local/bin/xml2-config + do + if test -x "$c" ; then + LIBXML2_CONFIG="$c" + break + fi + done +else + LIBXML2_CONFIG="${with_xml2_config}" +fi +if test "x$LIBXML2_CONFIG" = "x" ; then + AC_MSG_ERROR([unable to find xml2-config]) +else + AC_MSG_RESULT([${LIBXML2_CONFIG}]) + XML2_CFLAGS=`${LIBXML2_CONFIG} --cflags` + XML2_LIBS="`${LIBXML2_CONFIG} --libs`" +fi + +AC_SUBST(XML2_CFLAGS) +AC_SUBST(XML2_LIBS) + +#-------------------------------------------------------------------- +# Load libxslt configuration +#-------------------------------------------------------------------- + +AC_MSG_CHECKING([for xslt-config script]) + +AC_ARG_WITH(xslt-config, + [ --with-xslt-config the xslt-config configuration script], + with_xslt_config=${withval}) + +LIBXSLT_CONFIG= +if test "x${with_xslt_config}" = "x" ; then + if test "x${with_xml2_config}" = "x" ; then + : + else + if test -x "`dirname ${with_xml2_config}`/xslt-config" ; then + LIBXSLT_CONFIG="`dirname ${with_xml2_config}`/xslt-config" + fi + fi +else + LIBXSLT_CONFIG="${with_xslt_config}" +fi +if test "x${LIBXSLT_CONFIG}" = "x" ; then + for c in \ + /Library/Frameworks/libxslt.framework/Resources/Scripts/xslt-config \ + ${prefix}/bin/xslt-config \ + /usr/bin/xslt-config \ + /usr/local/bin/xslt-config + do + if test -x "$c" ; then + LIBXSLT_CONFIG="$c" + break + fi + done +fi +if test "x$LIBXSLT_CONFIG" = "x" ; then + AC_MSG_ERROR([unable to find xslt-config script]) +else + AC_MSG_RESULT([${LIBXSLT_CONFIG}]) + XSLT_CFLAGS=`${LIBXSLT_CONFIG} --cflags` + XSLT_LIBS="`${LIBXSLT_CONFIG} --libs` -lexslt" +fi + +AC_SUBST(XSLT_CFLAGS) +AC_SUBST(XSLT_LIBS) + +#-------------------------------------------------------------------- +# See if we want to statically link the libxml2 and libxslt +# libraries. This is desirable for Tclkit. +#-------------------------------------------------------------------- + +AC_MSG_CHECKING([for static linking of XML/XSLT libraries]) +AC_ARG_WITH(xml-static, + AC_HELP_STRING([--with-xml-static], + [statically link the XML libraries]), + with_xml_static=${withval}) + +if test "x${with_xml_static}" = "x" ; then + AC_MSG_RESULT([use dynamic linking]) +else + TEA_ADD_CFLAGS([-DLIBXML_STATIC -DLIBXSLT_STATIC]) + AC_MSG_RESULT([use static linking]) +fi + +#-------------------------------------------------------------------- +# These are for tclxmlConfig.sh +#-------------------------------------------------------------------- + +TEA_EXPORT_CONFIG([tclxml]) + +#-------------------------------------------------------------------- +# 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. +#-------------------------------------------------------------------- + +AC_OUTPUT([Makefile pkgIndex.tcl include/tclxml/tclxml.h tclxmlConfig.sh]) + diff --git a/tclxml/configure.in b/tclxml/configure.in deleted file mode 100755 index 30aa32d..0000000 --- a/tclxml/configure.in +++ /dev/null @@ -1,287 +0,0 @@ -#!/bin/bash -norc -dnl This file is an input file used by the GNU "autoconf" program to -dnl generate the file "configure", which is run during Tcl installation -dnl to configure the system for the local environment. - -#----------------------------------------------------------------------- -# Sample configure.in for Tcl Extensions. The only places you should -# need to modify this file are marked by the string __CHANGE__ -#----------------------------------------------------------------------- - -#----------------------------------------------------------------------- -# __CHANGE__ -# Set your package name and version numbers here. -# -# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION -# set as provided. These will also be added as -D defs in your Makefile -# so you can encode the package version directly into the source files. -# This will also define a special symbol for Windows (BUILD_ -# so that we create the export library with the dll. -#----------------------------------------------------------------------- - -AC_INIT([Tclxml], [3.2]) - -#-------------------------------------------------------------------- -# Call TEA_INIT as the first TEA_ macro to set up initial vars. -# This will define a ${TEA_PLATFORM} variable == "unix" or "windows" -# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. -#-------------------------------------------------------------------- - -TEA_INIT([3.9]) - -AC_CONFIG_AUX_DIR(tclconfig) - -#-------------------------------------------------------------------- -# Load the tclConfig.sh file -#-------------------------------------------------------------------- - -TEA_PATH_TCLCONFIG -TEA_LOAD_TCLCONFIG - -#-------------------------------------------------------------------- -# 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. -#----------------------------------------------------------------------- - -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 and a few others to create the basic setup -# necessary to compile executables. -#----------------------------------------------------------------------- - -TEA_SETUP_COMPILER - -#----------------------------------------------------------------------- -# __CHANGE__ -# Specify the C source files to compile in TEA_ADD_SOURCES, -# public headers that need to be installed in TEA_ADD_HEADERS, -# stub library C source files to compile in TEA_ADD_STUB_SOURCES, -# and runtime Tcl library files in TEA_ADD_TCL_SOURCES. -# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS -# and PKG_TCL_SOURCES. -#----------------------------------------------------------------------- - -TEA_ADD_SOURCES([tclxml.c docObj.c tclxml-libxml2.c nodeObj.c tcldom-libxml2.c tclxslt-libxslt.c]) -TEA_ADD_HEADERS([include/tclxml-libxml2/docObj.h include/tclxml-libxml2/tclxml-libxml2.h include/tcldom/tcldom.h include/tcldom-libxml2/tcldom-libxml2.h include/tclxslt/tclxslt.h]) -TEA_ADD_INCLUDES([-I./include]) -TEA_ADD_LIBS([]) -TEA_ADD_CFLAGS([]) -TEA_ADD_STUB_SOURCES([tclxmlStubInit.c tclxmlStubLib.c]) -TEA_ADD_TCL_SOURCES([tclxml-tcl/xml__tcl.tcl tclxml-tcl/sgml-8.0.tcl tclxml-tcl/sgml-8.1.tcl tclxml-tcl/xml-8.0.tcl tclxml-tcl/xml-8.1.tcl tclxml-tcl/sgmlparser.tcl tclxml-tcl/tclparser-8.0.tcl tclxml-tcl/tclparser-8.1.tcl tclxml-tcl/xmldep.tcl tclxml-tcl/xpath.tcl tcldom-libxml2.tcl tcldom-tcl/xmlswitch.tcl tclxslt/process.tcl tclxslt/resources.tcl tclxslt/utilities.tcl tclxslt/xsltcache.tcl tclxslt-libxslt.tcl]) - -#-------------------------------------------------------------------- -# __CHANGE__ -# -# You can add more files to clean if your extension creates any extra -# files by extending CLEANFILES. -# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure -# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var. -# -# A few miscellaneous platform-specific items: -# TEA_ADD_* any platform specific compiler/build info here. -#-------------------------------------------------------------------- - -#CLEANFILES="$CLEANFILES pkgIndex.tcl" -if test "${TEA_PLATFORM}" = "windows" ; then - # Ensure no empty if clauses - : - #TEA_ADD_SOURCES([win/winFile.c]) - #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) -else - # Ensure no empty else clauses - : - #TEA_ADD_SOURCES([unix/unixFile.c]) - #TEA_ADD_LIBS([-lsuperfly]) -fi - -#-------------------------------------------------------------------- -# __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 -#-------------------------------------------------------------------- - -TEA_PUBLIC_TCL_HEADERS -#TEA_PRIVATE_TCL_HEADERS - -#TEA_PUBLIC_TK_HEADERS -#TEA_PRIVATE_TK_HEADERS -#TEA_PATH_X - -#-------------------------------------------------------------------- -# Check whether --enable-threads or --disable-threads was given. -# This auto-enables if Tcl was compiled threaded. -#-------------------------------------------------------------------- - -TEA_ENABLE_THREADS - -#-------------------------------------------------------------------- -# The statement below defines a collection of symbols related to -# building as a shared library instead of a static library. -#-------------------------------------------------------------------- - -TEA_ENABLE_SHARED - -#-------------------------------------------------------------------- -# 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. -#-------------------------------------------------------------------- - -TEA_CONFIG_CFLAGS - -#-------------------------------------------------------------------- -# Set the default compiler switches based on the --enable-symbols option. -#-------------------------------------------------------------------- - -TEA_ENABLE_SYMBOLS - -#-------------------------------------------------------------------- -# 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, 1, [Use Tcl stubs]) -#AC_DEFINE(USE_TK_STUBS, 1, [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. -#-------------------------------------------------------------------- - -TEA_MAKE_LIB - -#-------------------------------------------------------------------- -# Determine the name of the tclsh and/or wish executables in the -# Tcl and Tk build directories or the location they were installed -# into. These paths are used to support running test cases only, -# the Makefile should not be making use of these paths to generate -# a pkgIndex.tcl file or anything else at extension build time. -#-------------------------------------------------------------------- - -TEA_PROG_TCLSH -#TEA_PROG_WISH - -#-------------------------------------------------------------------- -# Load libxml2 configuration -#-------------------------------------------------------------------- - -AC_MSG_CHECKING([for xml2-config script]) - -AC_ARG_WITH(xml2-config, - [ --with-xml2-config the xml2-config configuration script], - with_xml2_config=${withval}) - -LIBXML2_CONFIG= -if test "x${with_xml2_config}" = "x" ; then - for c in \ - /Library/Frameworks/libxml.framework/Resources/Scripts/xml2-config \ - ${prefix}/bin/xml2-config \ - /usr/bin/xml2-config \ - /usr/local/bin/xml2-config - do - if test -x "$c" ; then - LIBXML2_CONFIG="$c" - break - fi - done -else - LIBXML2_CONFIG="${with_xml2_config}" -fi -if test "x$LIBXML2_CONFIG" = "x" ; then - AC_MSG_ERROR([unable to find xml2-config]) -else - AC_MSG_RESULT([${LIBXML2_CONFIG}]) - XML2_CFLAGS=`${LIBXML2_CONFIG} --cflags` - XML2_LIBS="`${LIBXML2_CONFIG} --libs`" -fi - -AC_SUBST(XML2_CFLAGS) -AC_SUBST(XML2_LIBS) - -#-------------------------------------------------------------------- -# Load libxslt configuration -#-------------------------------------------------------------------- - -AC_MSG_CHECKING([for xslt-config script]) - -AC_ARG_WITH(xslt-config, - [ --with-xslt-config the xslt-config configuration script], - with_xslt_config=${withval}) - -LIBXSLT_CONFIG= -if test "x${with_xslt_config}" = "x" ; then - if test "x${with_xml2_config}" = "x" ; then - : - else - if test -x "`dirname ${with_xml2_config}`/xslt-config" ; then - LIBXSLT_CONFIG="`dirname ${with_xml2_config}`/xslt-config" - fi - fi -else - LIBXSLT_CONFIG="${with_xslt_config}" -fi -if test "x${LIBXSLT_CONFIG}" = "x" ; then - for c in \ - /Library/Frameworks/libxslt.framework/Resources/Scripts/xslt-config \ - ${prefix}/bin/xslt-config \ - /usr/bin/xslt-config \ - /usr/local/bin/xslt-config - do - if test -x "$c" ; then - LIBXSLT_CONFIG="$c" - break - fi - done -fi -if test "x$LIBXSLT_CONFIG" = "x" ; then - AC_MSG_ERROR([unable to find xslt-config script]) -else - AC_MSG_RESULT([${LIBXSLT_CONFIG}]) - XSLT_CFLAGS=`${LIBXSLT_CONFIG} --cflags` - XSLT_LIBS="`${LIBXSLT_CONFIG} --libs` -lexslt" -fi - -AC_SUBST(XSLT_CFLAGS) -AC_SUBST(XSLT_LIBS) - -#-------------------------------------------------------------------- -# See if we want to statically link the libxml2 and libxslt -# libraries. This is desirable for Tclkit. -#-------------------------------------------------------------------- - -AC_MSG_CHECKING([for static linking of XML/XSLT libraries]) -AC_ARG_WITH(xml-static, - AC_HELP_STRING([--with-xml-static], - [statically link the XML libraries]), - with_xml_static=${withval}) - -if test "x${with_xml_static}" = "x" ; then - AC_MSG_RESULT([use dynamic linking]) -else - TEA_ADD_CFLAGS([-DLIBXML_STATIC -DLIBXSLT_STATIC]) - AC_MSG_RESULT([use static linking]) -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. -#-------------------------------------------------------------------- - -AC_OUTPUT([Makefile pkgIndex.tcl include/tclxml/tclxml.h]) diff --git a/tclxml/pkgIndex.tcl.in b/tclxml/pkgIndex.tcl.in index dc90a23..d7566b4 100644 --- a/tclxml/pkgIndex.tcl.in +++ b/tclxml/pkgIndex.tcl.in @@ -1,134 +1,5 @@ -# TclXML combo package index file - handcrafted # -# $Id: pkgIndex.tcl.in,v 1.1.1.1 2009/01/16 22:11:49 joye Exp $ - -namespace eval ::xml { - variable _init 0 -} -namespace eval ::xml::libxml2 { - variable _init 0 -} -namespace eval ::dom { - variable _init 0 -} -namespace eval ::dom::libxml2 { - variable _init 0 -} -namespace eval ::xslt { - variable _init 0 -} - -namespace eval ::xml { - variable pkginit - - if {![info exists pkginit]} { - set pkginit 0 - } - - proc pkgload {dir {binary 0}} { - variable pkginit - - if {$pkginit} {return {}} - - namespace eval :: " - package require xmldefs @PACKAGE_VERSION@ - package require xml::tcl @PACKAGE_VERSION@ - if {\[catch {load \[file join $dir @PKG_LIB_FILE@\] Tclxml}\]} { - # Mac OS X frameworks are different - if {\[catch {load \[file join $dir .. .. Tclxml\] Tclxml}\]} { - # Unable to load binary implmentation, - # just use pure-Tcl implmentation instead - if {$binary} { - return -code error \"unable to load shared library\" - } - } else { - set ::xml::libxml2::_init 1 - set ::dom::libxml2::_init 1 - set ::xslt::_init 1 - source \[file join $dir tcldom-libxml2.tcl\] - source \[file join $dir tclxslt-libxslt.tcl\] - } - } else { - set ::xml::libxml2::_init 1 - set ::dom::libxml2::_init 1 - set ::xslt::_init 1 - source \[file join $dir tcldom-libxml2.tcl\] - source \[file join $dir tclxslt-libxslt.tcl\] - } - package require xml::tclparser @PACKAGE_VERSION@ - package provide tclparser @PACKAGE_VERSION@ - package provide xml::libxml2 @PACKAGE_VERSION@ - package provide xml @PACKAGE_VERSION@ - package provide dom @PACKAGE_VERSION@ - package provide dom::libxml2 @PACKAGE_VERSION@ - package provide xslt @PACKAGE_VERSION@ - package provide xslt::libxslt @PACKAGE_VERSION@ - - set pkginit 1 - " - } -} - -package ifneeded xml::tcl @PACKAGE_VERSION@ [list source [file join $dir xml__tcl.tcl]] -package ifneeded sgmlparser 1.1 [list source [file join $dir sgmlparser.tcl]] -package ifneeded xpath 1.0 [list source [file join $dir xpath.tcl]] -package ifneeded xmldep 1.0 [list source [file join $dir xmldep.tcl]] - -# Requesting a specific package means we want it to be the default parser class. - -package ifneeded xml::libxml2 @PACKAGE_VERSION@ " - ::xml::pkgload $dir 1 - ::xml::parser default libxml2 -" - -# tclparser works with either xml::c or xml::tcl -package ifneeded tclparser @PACKAGE_VERSION@ " - ::xml::pkgload $dir 0 - ::xml::parser default tclparser - package provide tclparser @PACKAGE_VERSION@ -" - -# use tcl only (mainly for testing) -package ifneeded puretclparser @PACKAGE_VERSION@ " - package require xml::tcl @PACKAGE_VERSION@ - package require xmldefs - package require xml::tclparser @PACKAGE_VERSION@ - package provide puretclparser @PACKAGE_VERSION@ -" - -# Requesting the generic package leaves the choice of default parser automatic - -package ifneeded xml @PACKAGE_VERSION@ " - ::xml::pkgload $dir 0 -" -package ifneeded dom @PACKAGE_VERSION@ " - ::xml::pkgload $dir 0 -" -package ifneeded dom::libxml2 @PACKAGE_VERSION@ " - ::xml::pkgload $dir 1 -" -package ifneeded xslt @PACKAGE_VERSION@ " - ::xml::pkgload $dir 1 -" -package ifneeded xslt::libxslt @PACKAGE_VERSION@ " - ::xml::pkgload $dir 1 -" - -package ifneeded xmlswitch @PACKAGE_VERSION@ [list source [file join $dir xmlswitch.tcl]] - -package ifneeded xslt::cache @PACKAGE_VERSION@ [list source [file join $dir xsltcache.tcl]] -package ifneeded xslt::utilities @PACKAGE_VERSION@ [list source [file join $dir utilities.tcl]] -package ifneeded xslt::process 1.1 [list source [file join $dir process.tcl]] -package ifneeded xslt::resources 1.3 [list source [file join $dir resources.tcl]] - -if {[info tclversion] <= 8.0} { - package ifneeded sgml 1.9 [list source [file join $dir sgml-8.0.tcl]] - package ifneeded xmldefs @PACKAGE_VERSION@ [list source [file join $dir xml-8.0.tcl]] - package ifneeded xml::tclparser @PACKAGE_VERSION@ [list source [file join $dir tclparser-8.0.tcl]] -} else { - package ifneeded sgml 1.9 [list source [file join $dir sgml-8.1.tcl]] - package ifneeded xmldefs @PACKAGE_VERSION@ [list source [file join $dir xml-8.1.tcl]] - package ifneeded xml::tclparser @PACKAGE_VERSION@ [list source [file join $dir tclparser-8.1.tcl]] -} - - +# Tcl package index file +# +package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ \ + [list load [file join $dir @PKG_LIB_FILE@] @PACKAGE_NAME@] -- cgit v0.12