From ec641462e54dd9378224a2b4938801c9f05df8cf Mon Sep 17 00:00:00 2001 From: William Joye Date: Mon, 9 Jan 2017 14:46:36 -0500 Subject: update TEA 3.10 --- tkhtml1/Makefile.in | 36 ++- tkhtml1/aclocal.m4 | 0 tkhtml1/configure | 540 ++++++++++++++++++++++++++++++++++---------- tkhtml1/configure.ac | 197 ++++++++++++++++ tkhtml1/configure.in | 201 ----------------- tkhtml1/pkgIndex.tcl.in | 0 tkhtml1/tkhtml1Config.sh.in | 45 ++++ 7 files changed, 674 insertions(+), 345 deletions(-) mode change 100755 => 100644 tkhtml1/Makefile.in mode change 100755 => 100644 tkhtml1/aclocal.m4 create mode 100644 tkhtml1/configure.ac delete mode 100755 tkhtml1/configure.in mode change 100755 => 100644 tkhtml1/pkgIndex.tcl.in create mode 100755 tkhtml1/tkhtml1Config.sh.in diff --git a/tkhtml1/Makefile.in b/tkhtml1/Makefile.in old mode 100755 new mode 100644 index 13db13d..7ba2436 --- a/tkhtml1/Makefile.in +++ b/tkhtml1/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@ @@ -150,7 +150,7 @@ INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@ PKG_CFLAGS = @PKG_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. @@ -158,7 +158,7 @@ PKG_CFLAGS = @PKG_CFLAGS@ DEFS = @DEFS@ $(PKG_CFLAGS) # Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile -CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl +CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl tkhtml1Config.sh CLEANFILES = @CLEANFILES@ CPPFLAGS = @CPPFLAGS@ @@ -183,16 +183,6 @@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(C all: binaries libraries #doc -headers: src/makeheaders src/htmltokens.c - cd src; \ - ./makeheaders src/htmlcmd.c src/htmldraw.c src/htmlform.c src/htmlimage.c src/htmlindex.c src/htmllayout.c src/htmlparse.c src/htmlsizer.c src/htmltable.c src/htmltest.c src/htmlurl.c src/htmlwidget.c src/htmlexts.c htmltokens.c html.h - -src/makeheaders: tools/makeheaders.c - $(COMPILE) $< -o $@ - -src/htmltokens.c: src/tokenlist.txt tools/maketokens.tcl - $(TCLSH) tools/maketokens.tcl src/tokenlist.txt > src/htmltokens.c - #======================================================================== # The binaries target builds executable programs, Windows .dll's, unix # shared/static libraries, and any other platform-dependent files. @@ -326,9 +316,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 \ @@ -358,18 +348,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 @@ -417,6 +408,7 @@ install-lib-binaries: binaries echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ fi + $(INSTALL_DATA) tkhtml1Config.sh $(DESTDIR)$(libdir) #======================================================================== # Install binary executables (e.g. .exe files and dependent .dll files) diff --git a/tkhtml1/aclocal.m4 b/tkhtml1/aclocal.m4 old mode 100755 new mode 100644 diff --git a/tkhtml1/configure b/tkhtml1/configure index 20aaa88..c5b615b 100755 --- a/tkhtml1/configure +++ b/tkhtml1/configure @@ -620,8 +620,25 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +PATCHLEVEL +MINOR_VERSION +MAJOR_VERSION +tkhtml1_STUB_LIB_PATH +tkhtml1_BUILD_STUB_LIB_PATH +tkhtml1_STUB_LIB_SPEC +tkhtml1_BUILD_STUB_LIB_SPEC +tkhtml1_LIB_SPEC +tkhtml1_BUILD_LIB_SPEC WISH_PROG 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 @@ -635,6 +652,7 @@ CFLAGS_DEFAULT LD_LIBRARY_PATH_VAR SHLIB_CFLAGS SHLIB_LD_LIBS +SHLIB_SUFFIX SHLIB_LD STLIB_LD CFLAGS_WARNING @@ -643,6 +661,7 @@ CFLAGS_DEBUG RC CELIB_DIR AR +STUBS_BUILD SHARED_BUILD TCL_THREADS XMKMF @@ -655,8 +674,14 @@ EGREP GREP RANLIB SET_MAKE +INSTALL_LIBRARY +INSTALL_SCRIPT +INSTALL_PROGRAM +INSTALL_DATA +INSTALL_DATA_DIR INSTALL CPP +PRACTCL_WINDOWINGSYSTEM TK_XINCLUDES TK_LIBS TK_STUB_LIB_SPEC @@ -701,6 +726,7 @@ PKG_STUB_LIB_FILE PKG_LIB_FILE EXEEXT CYGPATH +TEA_TK_EXTENSION target_alias host_alias build_alias @@ -749,12 +775,14 @@ with_tkinclude with_x enable_threads enable_shared +enable_stubs enable_64bit enable_64bit_vis enable_rpath enable_wince with_celib enable_symbols +with_tclsh ' ac_precious_vars='build_alias host_alias @@ -1381,6 +1409,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) @@ -1397,6 +1427,7 @@ Optional Packages: --with-tkinclude directory containing the public Tk header files --with-x use the X Window System --with-celib=DIR use Windows/CE support library from DIR + --with-tclsh Specify a local tcl shell to use for dynamic code Some influential environment variables: CC C compiler command @@ -2198,20 +2229,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; } @@ -2222,6 +2252,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_*) @@ -2242,7 +2273,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 @@ -2267,9 +2298,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 @@ -2452,10 +2482,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)`" @@ -3375,9 +3408,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 @@ -3421,6 +3496,7 @@ _ACEOF if test x"${no_tk}" = x ; then # we reset no_tk in case something fails here no_tk=true + TEA_TK_EXTENSION=0 # Check whether --with-tk was given. if test "${with_tk+set}" = set; then : @@ -3549,6 +3625,7 @@ fi as_fn_error $? "Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh" "$LINENO" 5 else no_tk= + TEA_TK_EXTENSION=1 TK_BIN_DIR="${ac_cv_c_tkconfig}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } @@ -3612,20 +3689,44 @@ $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" # TEA specific: Ensure windowingsystem is defined - if test "${TEA_PLATFORM}" = "unix" ; then + case ${TK_DEFS} in + *PLATFORM_SDL*) + TEA_WINDOWINGSYSTEM="x11" + PRACTCL_WINDOWINGSYSTEM="sdl" + TEA_USE_SDL=yes + ;; + esac + if test "${TEA_USE_SDL}" = "yes" ; then + true + elif test "${TEA_PLATFORM}" = "unix" ; then case ${TK_DEFS} in *MAC_OSX_TK*) $as_echo "#define MAC_OSX_TK 1" >>confdefs.h TEA_WINDOWINGSYSTEM="aqua" + PRACTCL_WINDOWINGSYSTEM="cocoa" + TEA_USE_HITHEME=no; + if test "${TK_VERSION}" = "8.5" ; then + if test "${TK_PATCH_LEVEL}" > ".17" ; then + TEA_USE_HITHEME=yes; + fi + elif test "${TK_VERSION}" = "8.6" ; then + if test "${TK_PATCH_LEVEL}" > ".3" ; then + TEA_USE_HITHEME=yes; + fi + elif test "${TK_VERSION}" > "8.6" ; then + TEA_USE_HITHEME=yes; + fi ;; *) TEA_WINDOWINGSYSTEM="x11" + PRACTCL_WINDOWINGSYSTEM="x11" ;; esac elif test "${TEA_PLATFORM}" = "windows" ; then TEA_WINDOWINGSYSTEM="win32" + PRACTCL_WINDOWINGSYSTEM="windows" fi @@ -3643,6 +3744,8 @@ $as_echo "#define MAC_OSX_TK 1" >>confdefs.h # TEA specific: + # Practcl + #----------------------------------------------------------------------- @@ -4365,7 +4468,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}' + + + + + + #-------------------------------------------------------------------- @@ -5597,8 +5711,12 @@ src/htmltokens.c 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 @@ -5620,7 +5738,7 @@ src/htmltokens.c fi PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i" # this assumes it is in a VPATH dir - i=`basename $i` +# i=`basename $i` # handle user calling this before or after TEA_SETUP_COMPILER if test x"${OBJEXT}" != x ; then j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}" @@ -5656,7 +5774,7 @@ src/htmltokens.c # TEA_ADD_* any platform specific compiler/build info here. #-------------------------------------------------------------------- -CLEANFILES="$CLEANFILES src/makeheaders" +#CLEANFILES="$CLEANFILES pkgIndex.tcl" if test "${TEA_PLATFORM}" = "windows" ; then # Ensure no empty if clauses : @@ -5851,7 +5969,7 @@ $as_echo "${ac_cv_c_tkh}" >&6; } - if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then + if test "${PRACTCL_WINDOWINGSYSTEM}" != "x11"; then # On Windows and Aqua, we need the X compat headers { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5 $as_echo_n "checking for X11 header files... " >&6; } @@ -5866,7 +5984,7 @@ $as_echo "${INCLUDE_DIR_NATIVE}" >&6; } #TEA_PRIVATE_TK_HEADERS - if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then + if test "${PRACTCL_WINDOWINGSYSTEM}" = "x11" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } @@ -6530,23 +6648,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; } @@ -6554,10 +6689,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 @@ -6927,7 +7082,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: @@ -7091,13 +7248,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}" @@ -7107,8 +7286,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 @@ -7149,13 +7332,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 @@ -7259,6 +7442,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}" @@ -7270,7 +7455,7 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #ifdef __WIN32__ + #ifdef _WIN32 #error cross-compiler #endif @@ -7477,8 +7662,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="" ;; @@ -7795,7 +7982,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 : @@ -7803,7 +7997,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 @@ -7851,7 +8045,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 : @@ -7866,11 +8060,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" @@ -8232,8 +8430,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" @@ -8499,11 +8697,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 @@ -8694,6 +8894,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 @@ -9094,30 +9295,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 - - -$as_echo "#define USE_TK_STUBS 1" >>confdefs.h - - -#-------------------------------------------------------------------- # 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 @@ -9128,10 +9321,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" @@ -9139,67 +9334,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 + + + + + + + + @@ -9221,14 +9438,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}" @@ -9245,7 +9494,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; } @@ -9256,9 +9506,17 @@ $as_echo_n "checking for wish... " >&6; } if test -f "${TK_BIN_DIR}/Makefile" ; then # tkConfig.sh is in Tk build directory if test "${TEA_PLATFORM}" = "windows"; then + if test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" ; then WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" + elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}s${EXEEXT}" ; then + WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}$s{EXEEXT}" + elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}t${EXEEXT}" ; then + WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}t${EXEEXT}" + elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}st${EXEEXT}" ; then + WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}st${EXEEXT}" + fi else - WISH_PROG="${TK_BIN_DIR}/wish" + WISH_PROG="${TK_BIN_DIR}/wish" fi else # tkConfig.sh is in install location @@ -9284,12 +9542,49 @@ $as_echo "${WISH_PROG}" >&6; } #-------------------------------------------------------------------- +# These are for tkbltConfig.sh +#-------------------------------------------------------------------- + + + #-------------------------------------------------------------------- + # These are for tkhtml1Config.sh + #-------------------------------------------------------------------- + + # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib) + eval pkglibdir="${libdir}/tkhtml1${PACKAGE_VERSION}" + if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then + eval tkhtml1_LIB_FLAG="-ltkhtml1${PACKAGE_VERSION}${DBGX}" + eval tkhtml1_STUB_LIB_FLAG="-ltkhtml1stub${PACKAGE_VERSION}${DBGX}" + else + eval tkhtml1_LIB_FLAG="-ltkhtml1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}" + eval tkhtml1_STUB_LIB_FLAG="-ltkhtml1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}" + fi + tkhtml1_BUILD_LIB_SPEC="-L`$CYGPATH $(pwd)` ${tkhtml1_LIB_FLAG}" + tkhtml1_LIB_SPEC="-L`$CYGPATH ${pkglibdir}` ${tkhtml1_LIB_FLAG}" + tkhtml1_BUILD_STUB_LIB_SPEC="-L`$CYGPATH $(pwd)` ${tkhtml1_STUB_LIB_FLAG}" + tkhtml1_STUB_LIB_SPEC="-L`$CYGPATH ${pkglibdir}` ${tkhtml1_STUB_LIB_FLAG}" + tkhtml1_BUILD_STUB_LIB_PATH="`$CYGPATH $(pwd)`/${PKG_STUB_LIB_FILE}" + tkhtml1_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" +ac_config_files="$ac_config_files Makefile pkgIndex.tcl tkhtml1Config.sh" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -10000,6 +10295,7 @@ do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;; + "tkhtml1Config.sh") CONFIG_FILES="$CONFIG_FILES tkhtml1Config.sh" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/tkhtml1/configure.ac b/tkhtml1/configure.ac new file mode 100644 index 0000000..c97fd00 --- /dev/null +++ b/tkhtml1/configure.ac @@ -0,0 +1,197 @@ +#!/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([tkhtml1], [1.0]) + +#-------------------------------------------------------------------- +# 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([ +src/htmlcmd.c +src/htmldraw.c +src/htmlform.c +src/htmlimage.c +src/htmlindex.c +src/htmllayout.c +src/htmlparse.c +src/htmlsizer.c +src/htmltable.c +src/htmltest.c +src/htmlurl.c +src/htmlwidget.c +src/htmlexts.c +src/htmltokens.c +]) +TEA_ADD_HEADERS([]) +TEA_ADD_INCLUDES([-I./src]) +TEA_ADD_LIBS([]) +TEA_ADD_CFLAGS([-DUSE_INTERP_RESULT]) +TEA_ADD_STUB_SOURCES([]) +TEA_ADD_TCL_SOURCES([]) + +#-------------------------------------------------------------------- +# __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 + +#-------------------------------------------------------------------- +# These are for tkbltConfig.sh +#-------------------------------------------------------------------- + +TEA_EXPORT_CONFIG([tkhtml1]) + +#-------------------------------------------------------------------- +# 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 tkhtml1Config.sh]) diff --git a/tkhtml1/configure.in b/tkhtml1/configure.in deleted file mode 100755 index 1f9e504..0000000 --- a/tkhtml1/configure.in +++ /dev/null @@ -1,201 +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([tkhtml1], [1.0]) - -#-------------------------------------------------------------------- -# 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([ -src/htmlcmd.c -src/htmldraw.c -src/htmlform.c -src/htmlimage.c -src/htmlindex.c -src/htmllayout.c -src/htmlparse.c -src/htmlsizer.c -src/htmltable.c -src/htmltest.c -src/htmlurl.c -src/htmlwidget.c -src/htmlexts.c -src/htmltokens.c -]) -TEA_ADD_HEADERS([]) -TEA_ADD_INCLUDES([-I./src]) -TEA_ADD_LIBS([]) -TEA_ADD_CFLAGS([-DUSE_INTERP_RESULT]) -TEA_ADD_STUB_SOURCES([]) -TEA_ADD_TCL_SOURCES([]) - -#-------------------------------------------------------------------- -# __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 src/makeheaders" -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 - -#-------------------------------------------------------------------- -# 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]) diff --git a/tkhtml1/pkgIndex.tcl.in b/tkhtml1/pkgIndex.tcl.in old mode 100755 new mode 100644 diff --git a/tkhtml1/tkhtml1Config.sh.in b/tkhtml1/tkhtml1Config.sh.in new file mode 100755 index 0000000..2bd1677 --- /dev/null +++ b/tkhtml1/tkhtml1Config.sh.in @@ -0,0 +1,45 @@ +# tkhtml1Config.sh -- +# +# This shell script (for sh) is generated automatically by tkhtml1'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 tkhtml1 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. + +# tkhtml1's version number. +tkhtml1_VERSION='@PACKAGE_VERSION@' + +# The name of the tkhtml1 library (may be either a .a file or a shared library): +tkhtml1_LIB_FILE=@PKG_LIB_FILE@ + +# String to pass to linker to pick up the tkhtml1 library from its +# build directory. +tkhtml1_BUILD_LIB_SPEC='@tkhtml1_BUILD_LIB_SPEC@' + +# String to pass to linker to pick up the tkhtml1 library from its +# installed directory. +tkhtml1_LIB_SPEC='@tkhtml1_LIB_SPEC@' + +# The name of the tkhtml1 stub library (a .a file): +tkhtml1_STUB_LIB_FILE=@PKG_STUB_LIB_FILE@ + +# String to pass to linker to pick up the tkhtml1 stub library from its +# build directory. +tkhtml1_BUILD_STUB_LIB_SPEC='@tkhtml1_BUILD_STUB_LIB_SPEC@' + +# String to pass to linker to pick up the tkhtml1 stub library from its +# installed directory. +tkhtml1_STUB_LIB_SPEC='@tkhtml1_STUB_LIB_SPEC@' + +# String to pass to linker to pick up the tkhtml1 stub library from its +# build directory. +tkhtml1_BUILD_STUB_LIB_PATH='@tkhtml1_BUILD_STUB_LIB_PATH@' + +# String to pass to linker to pick up the tkhtml1 stub library from its +# installed directory. +tkhtml1_STUB_LIB_PATH='@tkhtml1_STUB_LIB_PATH@' -- cgit v0.12