Only in tcljava0.4: .finderinfo Only in tcljava0.4: .resource Only in tcljava0.4: Makefile Only in tcljava0.4: README Only in tcljava0.4a: SCCS diff -c tcljava0.4/TclTest.java tcljava0.4a/TclTest.java *** tcljava0.4/TclTest.java Wed Apr 16 14:04:14 1997 --- tcljava0.4a/TclTest.java Wed Apr 16 14:03:56 1997 *************** *** 1,3 **** --- 1,4 ---- + /* Ptolemy Version: @(#)TclTest.java 1.2 04/16/97 */ /* * TclTest.java -- * *************** *** 10,16 **** * */ - import sun.tools.zip.*; import java.util.Enumeration; import java.util.Date; import tcl.*; --- 11,16 ---- *************** *** 32,38 **** /* * Eval the command, and ignore the result. */ ! interp.eval("source /proj/tcl/install/lib/tk4.1/demos/widget"); /* * Make sure the window can be seen, and return the result of this --- 32,38 ---- /* * Eval the command, and ignore the result. */ ! interp.eval("source $tk_library/demos/widget"); /* * Make sure the window can be seen, and return the result of this *************** *** 69,132 **** protected void finalize() { System.out.println("finalized Callback2"); } } - class zipCallback implements Command { - /* - * A slightly more intricate command. This command returns a tcl list of - * lists, that contain information about the elements of the particular - * zip file. - * - * The format of the four elements of the each sub-list are: - * { { name } { '/' delineated path, if given } \ - * { file size in bytes } { Date modified } } - */ - public Value invoke(Interp interp, Value args[]) - throws Tcl_ErrorException - { - ZipFile zf; - Object tmpobj; - String listing = ""; - if (args.length != 2) { - /* - * For this example, errors are handled here, in the invocation, - * rather than later, as in the other two callbacks. - */ - throw new Tcl_ErrorException(new Value(" wrong # args: should be \"zipfilelist filename\"")); - } - try { - /* - * ZipFile can return either of the two exceptions below, - * so we catch both of them. - */ - zf = new ZipFile(args[1].toString()); - } catch (sun.tools.zip.ZipFormatException e) { - throw new Tcl_ErrorException(new Value("Zip file has bad format.")); - } catch (java.io.IOException e) { - throw new Tcl_ErrorException(new Value("IO Error (maybe the file doesn't exist?)")); - } - /* - * Good! We successfully opened the zip file, and read its table - * of contents. Let's now turn that into a tcl list. Note that - * for our purposes, this is a list of lists, each of which have - * the four elements mentioned above. - */ - for (Enumeration e = zf.entries();e.hasMoreElements() ;) { - tmpobj = e.nextElement(); - Date d = new Date((((ZipEntry)(tmpobj)).lastModified())); - listing += "{ {"+((ZipEntry)(tmpobj)).getPath()+"} "+ - " {"+((ZipEntry)(tmpobj)).getName()+"} "+ - " {"+Long.toString((((ZipEntry)(tmpobj)).length()),10) +"} "+ - " {"+d.toString()+"} } "; - } - /* - * Our result is what we've worked so hard for: - */ - return new Value(listing); - } - public void deleted(Interp interp) { - System.out.println("deleting zipCallback..."); - } - } - class facCalc implements Command { /* * A silly little command to test call times. --- 69,74 ---- *************** *** 174,182 **** class TclTest { ! static { ! System.loadLibrary("jtk"); ! } /* * Eval the given command, printing it out on stdout, and --- 116,127 ---- class TclTest { ! /* jdk1.1 gets errors about 'create' being undefined unless ! * we load the library at the top of main(). ! */ ! //static { ! // System.loadLibrary("jtk"); ! //} /* * Eval the given command, printing it out on stdout, and *************** *** 199,204 **** --- 144,150 ---- } public static void main(String args[]) { + System.loadLibrary("jtk"); /* * We create an interpreter, and initialize it to handle * tk. *************** *** 212,218 **** */ interp.createCommand("callback1", new Callback1()); interp.createCommand("callback2", new Callback2()); - interp.createCommand("zipfilelist", new zipCallback()); interp.createCommand("javafac", new facCalc()); interp.createCommand("throwException", new Thrower()); --- 158,163 ---- *************** *** 225,233 **** evalPrint(interp, "button .java.b -text demo -command callback1"); evalPrint(interp, "button .java.b2 -text delete -command {rename callback1 {}}"); evalPrint(interp, "button .java.b3 -text gc -command callback2"); ! evalPrint(interp, "button .java.b4 -text {Zip Browser Demo} -command {source zipbrowser.tcl}"); ! evalPrint(interp, "button .java.b5 -text {Tcl console} -command { set argv0 JTk; set tcl_interactive 1;source tkcon.tcl; interp alias slave zipfilelist {} zipfilelist}"); ! evalPrint(interp, "pack .java.b .java.b2 .java.b3 .java.b4 .java.b5"); /* * Handle all the events that happen. We put the event loop in Java, --- 170,177 ---- evalPrint(interp, "button .java.b -text demo -command callback1"); evalPrint(interp, "button .java.b2 -text delete -command {rename callback1 {}}"); evalPrint(interp, "button .java.b3 -text gc -command callback2"); ! evalPrint(interp, "button .java.b5 -text {Tcl console} -command { set argv0 JTk; set tcl_interactive 1;source tkcon.tcl}"); ! evalPrint(interp, "pack .java.b .java.b2 .java.b3 .java.b5"); /* * Handle all the events that happen. We put the event loop in Java, Only in tcljava0.4: TclTest.tcl diff -c tcljava0.4/configure tcljava0.4a/configure *** tcljava0.4/configure Wed Apr 16 14:04:14 1997 --- tcljava0.4a/configure Wed Apr 16 13:47:10 1997 *************** *** 0 **** --- 1,1431 ---- + #! /bin/sh + + # Guess values for system-dependent variables and create Makefiles. + # Generated automatically using autoconf version 2.10 + # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. + # + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. + + # Defaults: + ac_help= + ac_default_prefix=/usr/local + # Any additions from configure.in: + ac_help="$ac_help + --with-tclinclude=DIR use Tcl 7.6 includes from DIR" + ac_help="$ac_help + --with-tcllib=DIR use Tcl 7.6 lib from DIR" + ac_help="$ac_help + --with-tkinclude=DIR use Tk 4.2 include from DIR" + ac_help="$ac_help + --with-tklib=DIR use Tk 4.2 libs from DIR" + ac_help="$ac_help + --with-java=DIR use Java binaries from DIR" + ac_help="$ac_help + --with-javaarchinclude=DIR use Java arch dependent includes from DIR" + + # Initialize some variables set by options. + # The variables have the same names as the options, with + # dashes changed to underlines. + build=NONE + cache_file=./config.cache + exec_prefix=NONE + host=NONE + no_create= + nonopt=NONE + no_recursion= + prefix=NONE + program_prefix=NONE + program_suffix=NONE + program_transform_name=s,x,x, + silent= + site= + srcdir= + target=NONE + verbose= + x_includes=NONE + x_libraries=NONE + bindir='${exec_prefix}/bin' + sbindir='${exec_prefix}/sbin' + libexecdir='${exec_prefix}/libexec' + datadir='${prefix}/share' + sysconfdir='${prefix}/etc' + sharedstatedir='${prefix}/com' + localstatedir='${prefix}/var' + libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' + infodir='${prefix}/info' + mandir='${prefix}/man' + + # Initialize some other variables. + subdirs= + MFLAGS= MAKEFLAGS= + + ac_prev= + for ac_option + do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF + Usage: configure [options] [host] + Options: [defaults in brackets after descriptions] + Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure + Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names + EOF + cat << EOF + Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] + Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR + EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.10" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac + done + + if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + fi + + trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + + # File descriptor usage: + # 0 standard input + # 1 file creation + # 2 errors and warnings + # 3 some systems may open it to /dev/tty + # 4 used on the Kubota Titan + # 6 checking for... messages and results + # 5 compiler messages saved in config.log + if test "$silent" = yes; then + exec 6>/dev/null + else + exec 6>&1 + fi + exec 5>./config.log + + echo "\ + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + " 1>&5 + + # Strip out --no-create and --no-recursion so they do not pile up. + # Also quote any args containing shell metacharacters. + ac_configure_args= + for ac_arg + do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac + done + + # NLS nuisances. + # Only set LANG and LC_ALL to C if already set. + # These must not be set unconditionally because not all systems understand + # e.g. LANG=C (notably SCO). + if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi + if test "${LANG+set}" = set; then LANG=C; export LANG; fi + + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -rf conftest* confdefs.h + # AIX cpp loses on an empty file, so make sure it contains at least a newline. + echo > confdefs.h + + # A filename unique to this package, relative to the directory that + # configure is in, which we can look for to find out if srcdir is correct. + ac_unique_file=tcl/Command.java + + # Find the source files, if location was not specified. + if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi + else + ac_srcdir_defaulted=no + fi + if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi + fi + srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + + # Prefer explicitly selected file to automatically selected ones. + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi + fi + for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi + done + + if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file + else + echo "creating cache $cache_file" + > $cache_file + fi + + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' + ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + + + + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" + fi + fi + CC="$ac_cv_prog_CC" + if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" + if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi + fi + fi + fi + CC="$ac_cv_prog_CC" + if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi + + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes + else + ac_cv_prog_gcc=no + fi + fi + + echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + if test $ac_cv_prog_gcc = yes; then + GCC=yes + if test "${CFLAGS+set}" != set; then + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + echo 'void f(){}' > conftest.c + if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_gcc_g=yes + else + ac_cv_prog_gcc_g=no + fi + rm -f conftest* + + fi + + echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 + if test $ac_cv_prog_gcc_g = yes; then + CFLAGS="-g -O" + else + CFLAGS="-O" + fi + fi + else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" + fi + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 + set dummy ${MAKE-make}; ac_make=$2 + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftestmake <<\EOF + all: + @echo 'ac_maketemp="${MAKE}"' + EOF + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` + if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes + else + eval ac_cv_prog_make_${ac_make}_set=no + fi + rm -f conftestmake + fi + if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= + else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" + fi + + + # + # User specified location of the tcl include + # + # Check whether --with-tclinclude or --without-tclinclude was given. + if test "${with_tclinclude+set}" = set; then + withval="$with_tclinclude" + TCL_INCLUDE_DIR=$withval + else + TCL_INCLUDE_DIR=/usr/local/include + fi + + if test ! -d $TCL_INCLUDE_DIR; then + { echo "configure: error: Tcl directory $TCL_INCLUDE_DIR doesn't exist" 1>&2; exit 1; } + fi + + echo $ac_n "checking for tcl.h""... $ac_c" 1>&6 + if test -f $TCL_INCLUDE_DIR/tcl.h; then + echo "$ac_t""$TCL_INCLUDE_DIR/tcl.h" 1>&6 + else + { echo "configure: error: Cannot find $TCL_INCLUDE_DIR/tcl.h, try --with-tclinclude=DIR" 1>&2; exit 1; } + fi + + # + # User specified location of the tcl lib + # + # Check whether --with-tcllib or --without-tcllib was given. + if test "${with_tcllib+set}" = set; then + withval="$with_tcllib" + TCL_LIB_DIR=$withval + else + TCL_LIB_DIR=/usr/local/lib + fi + + if test ! -d $TCL_LIB_DIR; then + { echo "configure: error: Tcl directory $TCL_LIB_DIR doesn't exist" 1>&2; exit 1; } + fi + + echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6 + if test -f $TCL_LIB_DIR/tclConfig.sh; then + echo "$ac_t""$TCL_LIB_DIR/tclConfig.sh" 1>&6 + else + { echo "configure: error: Cannot find $TCL_LIB_DIR/tclConfig.sh, try --with-tcllib=DIR" 1>&2; exit 1; } + fi + + file=$TCL_LIB_DIR/tclConfig.sh + . $file + + # The variables that we use from tclConfig.sh + TCL_CC=$TCL_CC + TCL_CFLAGS=$TCL_CFLAGS + TCL_LIB_SPEC=$TCL_LIB_SPEC + TCL_SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS + TCL_SHLIB_LD=$TCL_SHLIB_LD + TCL_SHLIB_LD_LIBS=$TCL_SHLIB_LD_LIBS + TCL_SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX + TCL_SHLIB_VERSION=$TCL_SHLIB_VERSION + # Tcl7.6 defines TCL_SRC_DIR, Tcl7.5 does not. + #TCL_SRC_DIR=$TCL_SRC_DIR + TCL_DL_LIBS=$TCL_DL_LIBS + TCL_LD_FLAGS=$TCL_LD_FLAGS + TCL_LD_SEARCH_FLAGS=$TCL_LD_SEARCH_FLAGS + + # + # User specified location of the tk include + # + # Check whether --with-tkinclude or --without-tkinclude was given. + if test "${with_tkinclude+set}" = set; then + withval="$with_tkinclude" + TK_INCLUDE_DIR=$withval + else + TK_INCLUDE_DIR=$TCL_INCLUDE_DIR + fi + + if test ! -d $TK_INCLUDE_DIR; then + { echo "configure: error: Tk directory $TK_INCLUDE_DIR doesn't exist" 1>&2; exit 1; } + fi + + echo $ac_n "checking for tk.h""... $ac_c" 1>&6 + if test -f $TK_INCLUDE_DIR/tk.h; then + echo "$ac_t""$TK_INCLUDE_DIR/tk.h" 1>&6 + else + { echo "configure: error: Cannot find $TK_INCLUDE_DIR/tk.h, try --with-tkinclude=DIR" 1>&2; exit 1; } + fi + + # + # User specified location of the tk lib + # + # Check whether --with-tklib or --without-tklib was given. + if test "${with_tklib+set}" = set; then + withval="$with_tklib" + TK_LIB_DIR=$withval + else + TK_LIB_DIR=$TCL_LIB_DIR + fi + + if test ! -d $TK_LIB_DIR; then + { echo "configure: error: Tk directory $TK_LIB_DIR doesn't exist" 1>&2; exit 1; } + fi + + echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6 + if test -f $TK_LIB_DIR/tkConfig.sh; then + echo "$ac_t""$TK_LIB_DIR/tkConfig.sh" 1>&6 + else + { echo "configure: error: Cannot find $TK_LIB_DIR/tkConfig.sh, try --with-tklib=DIR" 1>&2; exit 1; } + fi + + file=$TK_LIB_DIR/tkConfig.sh + . $file + + # The variables that we use from tkConfig.sh + TK_XINCLUDES=$TK_XINCLUDES + TK_LIBS=$TK_LIBS + TK_LIB_SPEC=$TK_LIB_SPEC + + + + # + # User specified location of the Java Development Kit (JDK) + # + # Check whether --with-java or --without-java was given. + if test "${with_java+set}" = set; then + withval="$with_java" + JAVAHOME=$withval + else + JAVAHOME=`cd /opt/SUNWjws/JDK; pwd` + fi + + + # + # If the user called configure with -without-java, then we don't + # set TYJAVA, and we won't cd down into the tyjava directory to do the build + # + if test "$with_java" = "no"; then + echo "configure: warning: Configure called with -without-java, so no java checking" 1>&2 + TYJAVA="" + else + TYJAVA=tyjava + if test ! -d $JAVAHOME; then + { echo "configure: error: Java directory $JAVAHOME doesn't exist" 1>&2; exit 1; } + fi + + if test ! -f $JAVAHOME/include/StubPreamble.h; then + { echo "configure: error: There's no StubPreamble.h in $JAVAHOME/include; use the --with-java= configure flag to specify the location of the Java Development Kit (JDK)" 1>&2; exit 1; } + fi + + echo $ac_n "checking for the java compiler""... $ac_c" 1>&6 + if test -f $JAVAHOME/bin/javac; then + echo "$ac_t""$JAVAHOME/bin/javac" 1>&6 + else + { echo "configure: error: Cannot find $JAVAHOME/bin/javac, try --with-java=DIR" 1>&2; exit 1; } + fi + + case "`uname -s" in + HP-UX) TMP_JAVA_ARCH_INCLUDE=$JAVAHOME/include/osfport + echo "To build tcljava under HPUX, see tyjava/tcljava/makefile" + ;; + Linux) TMP_JAVA_ARCH_INCLUDE=$JAVAHOME/include/linux;; + SunOS) TMP_JAVA_ARCH_INCLUDE=$JAVAHOME/include/solaris;; + *)TMP_JAVA_ARCH_INCLUDE=$JAVAHOME/include/idontknow;; + esac + # + # User specified Java architecture, used to find the jdk include files + # + # Check whether --with-javaarchinclude or --without-javaarchinclude was given. + if test "${with_javaarchinclude+set}" = set; then + withval="$with_javaarchinclude" + JAVA_ARCH_INCLUDE=$withval + else + JAVA_ARCH_INCLUDE="$TMP_JAVA_ARCH_INCLUDE" + fi + + if test ! -d $JAVA_ARCH_INCLUDE; then + { echo "configure: error: Java directory $JAVA_ARCH_INCLUDE doesn't exist" 1>&2; exit 1; } + fi + echo $ac_n "checking for the java oobj_md.h include file""... $ac_c" 1>&6 + if test -f $JAVA_ARCH_INCLUDE/oobj_md.h; then + echo "$ac_t""$JAVA_ARCH_INCLUDE/oobj_md.h" 1>&6 + else + { echo "configure: error: There's no oobj_md.h in $JAVA_ARCH_INCLUDE/include; use the --with-javaarchinclude= configure flag to specify the location of the architecture dependent include files in the (JDK) " 1>&2; exit 1; } + fi + fi + + + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= + fi + if test -z "$CPP"; then + if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out` + if test -z "$ac_err"; then + : + else + echo "$ac_err" >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out` + if test -z "$ac_err"; then + : + else + echo "$ac_err" >&5 + rm -rf conftest* + CPP=/lib/cpp + fi + rm -f conftest* + fi + rm -f conftest* + ac_cv_prog_CPP="$CPP" + fi + CPP="$ac_cv_prog_CPP" + else + ac_cv_prog_CPP="$CPP" + fi + echo "$ac_t""$CPP" 1>&6 + + # If we cannot run a trivial program, we must be cross compiling. + echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test "$cross_compiling" = yes; then + ac_cv_c_cross=yes + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } + if test -s conftest && (./conftest; exit) 2>/dev/null; then + ac_cv_c_cross=no + else + ac_cv_c_cross=yes + fi + fi + rm -fr conftest* + fi + + echo "$ac_t""$ac_cv_c_cross" 1>&6 + cross_compiling=$ac_cv_c_cross + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include + #include + #include + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out` + if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes + else + echo "$ac_err" >&5 + rm -rf conftest* + ac_cv_header_stdc=no + fi + rm -f conftest* + + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat > conftest.$ac_ext < + EOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : + else + rm -rf conftest* + ac_cv_header_stdc=no + fi + rm -f conftest* + + fi + + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat > conftest.$ac_ext < + EOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : + else + rm -rf conftest* + ac_cv_header_stdc=no + fi + rm -f conftest* + + fi + + if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : + else + cat > conftest.$ac_ext < + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') + #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) + #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) + int main () { int i; for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); + exit (0); } + + EOF + { (eval echo configure:1023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } + if test -s conftest && (./conftest; exit) 2>/dev/null; then + : + else + ac_cv_header_stdc=no + fi + fi + rm -fr conftest* + fi + fi + + echo "$ac_t""$ac_cv_header_stdc" 1>&6 + if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF + #define STDC_HEADERS 1 + EOF + + fi + + for ac_hdr in fcntl.h + do + ac_safe=`echo "$ac_hdr" | tr './\055' '___'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:1055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out` + if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" + fi + rm -f conftest* + fi + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + cat >> confdefs.h <&6 + fi + done + + + + echo $ac_n "checking for vprintf""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char vprintf(); + + int main() { return 0; } + int t() { + + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_vprintf) || defined (__stub___vprintf) + choke me + #else + vprintf(); + #endif + + ; return 0; } + EOF + if { (eval echo configure:1110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_func_vprintf=yes" + else + rm -rf conftest* + eval "ac_cv_func_vprintf=no" + fi + rm -f conftest* + + fi + if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF + #define HAVE_VPRINTF 1 + EOF + + else + echo "$ac_t""no" 1>&6 + fi + + if test "$ac_cv_func_vprintf" != yes; then + echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 + if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char _doprnt(); + + int main() { return 0; } + int t() { + + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub__doprnt) || defined (__stub____doprnt) + choke me + #else + _doprnt(); + #endif + + ; return 0; } + EOF + if { (eval echo configure:1160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_func__doprnt=yes" + else + rm -rf conftest* + eval "ac_cv_func__doprnt=no" + fi + rm -f conftest* + + fi + if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF + #define HAVE_DOPRNT 1 + EOF + + else + echo "$ac_t""no" 1>&6 + fi + + fi + + + echo $ac_n "checking command to build shared libs""... $ac_c" 1>&6 + if test "$TCL_CC" = "gcc"; then + # Under hppa10.20 gcc, we need to pass -fPIC to gcc so that + # collect will compile the intermediate file with -fPIC + TCL_SHLIB_LD="gcc -shared $TCL_SHLIB_CFLAGS" + fi + echo "$ac_t""$TCL_SHLIB_LD" 1>&6 + + + + + + + + + + + + + + + + + + + + + + + + + + + trap '' 1 2 15 + cat > confcache <<\EOF + # This file is a shell script that caches the results of configure + # tests run on this system so they can be shared between configure + # scripts and configure runs. It is not useful on other systems. + # If it contains results you don't want to keep, you may remove or edit it. + # + # By default, configure uses ./config.cache as the cache file, + # creating it if it does not exist already. You can give configure + # the --cache-file=FILE option to use a different cache file; that is + # what configure does when it calls configure scripts in + # subdirectories, so they share the cache. + # Giving --cache-file=/dev/null disables caching, for debugging configure. + # config.status only pays attention to the cache file if you give it the + # --recheck option to rerun configure. + # + EOF + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. + (set) 2>&1 | + sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ + >> confcache + if cmp -s $cache_file confcache; then + : + else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi + fi + rm -f confcache + + trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + + test "x$prefix" = xNONE && prefix=$ac_default_prefix + # Let make expand exec_prefix. + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + + # Any assignment to VPATH causes Sun make to only execute + # the first set of double-colon rules, so remove it if not needed. + # If there is a colon in the path, we need to keep it. + if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + fi + + trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + + # Transform confdefs.h into DEFS. + # Protect against shell expansion while executing Makefile rules. + # Protect against Makefile macro expansion. + cat > conftest.defs <<\EOF + s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g + s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g + s%\[%\\&%g + s%\]%\\&%g + s%\$%$$%g + EOF + DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` + rm -f conftest.defs + + + # Without the "./", some shells look in PATH for config.status. + : ${CONFIG_STATUS=./config.status} + + echo creating $CONFIG_STATUS + rm -f $CONFIG_STATUS + cat > $CONFIG_STATUS </dev/null | sed 1q`: + # + # $0 $ac_configure_args + # + # Compiler output produced by configure, useful for debugging + # configure, is in ./config.log if it exists. + + ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" + for ac_option + do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.10" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac + done + + ac_given_srcdir=$srcdir + + trap 'rm -fr `echo "makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 + EOF + cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF + $ac_vpsub + $extrasub + s%@CFLAGS@%$CFLAGS%g + s%@CPPFLAGS@%$CPPFLAGS%g + s%@CXXFLAGS@%$CXXFLAGS%g + s%@DEFS@%$DEFS%g + s%@LDFLAGS@%$LDFLAGS%g + s%@LIBS@%$LIBS%g + s%@exec_prefix@%$exec_prefix%g + s%@prefix@%$prefix%g + s%@program_transform_name@%$program_transform_name%g + s%@bindir@%$bindir%g + s%@sbindir@%$sbindir%g + s%@libexecdir@%$libexecdir%g + s%@datadir@%$datadir%g + s%@sysconfdir@%$sysconfdir%g + s%@sharedstatedir@%$sharedstatedir%g + s%@localstatedir@%$localstatedir%g + s%@libdir@%$libdir%g + s%@includedir@%$includedir%g + s%@oldincludedir@%$oldincludedir%g + s%@infodir@%$infodir%g + s%@mandir@%$mandir%g + s%@CC@%$CC%g + s%@SET_MAKE@%$SET_MAKE%g + s%@CPP@%$CPP%g + s%@JAVAHOME@%$JAVAHOME%g + s%@JAVA_ARCH_INCLUDE@%$JAVA_ARCH_INCLUDE%g + s%@TCL_CC@%$TCL_CC%g + s%@TCL_CFLAGS@%$TCL_CFLAGS%g + s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g + s%@TCL_INCLUDE_DIR@%$TCL_INCLUDE_DIR%g + s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g + s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g + s%@TCL_LIB_DIR@%$TCL_LIB_DIR%g + s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g + s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g + s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g + s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g + s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g + s%@TCL_SHLIB_VERSION@%$TCL_SHLIB_VERSION%g + s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g + s%@TK_INCLUDE_DIR@%$TK_INCLUDE_DIR%g + s%@TK_LIBS@%$TK_LIBS%g + s%@TK_LIB_DIR@%$TK_LIB_DIR%g + s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g + s%@TK_SRC_DIR@%$TK_SRC_DIR%g + s%@TK_XINCLUDES@%$TK_XINCLUDES%g + + CEOF + EOF + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust relative srcdir, etc. for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ + # $configure_input" ;; + *) ac_comsub= ;; + esac + sed -e "$ac_comsub + s%@configure_input@%$configure_input%g + s%@srcdir@%$srcdir%g + s%@top_srcdir@%$top_srcdir%g + " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file + fi; done + rm -f conftest.subs + + + + exit 0 + EOF + chmod +x $CONFIG_STATUS + rm -fr confdefs* $ac_clean_files + test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff -c tcljava0.4/configure.in tcljava0.4a/configure.in *** tcljava0.4/configure.in Wed Apr 16 14:04:14 1997 --- tcljava0.4a/configure.in Wed Apr 16 14:02:59 1997 *************** *** 0 **** --- 1,234 ---- + dnl This file is an input file used by autoconf to generate the configure file. + dnl + # Author: Christopher Hylands + # Version: @(#)configure.in 1.1 04/16/97 + # + # Copyright (c) 1996-1997 The Regents of the University of California. + # All rights reserved. + # + # Permission is hereby granted, without written agreement and without + # license or royalty fees, to use, copy, modify, and distribute this + # software and its documentation for any purpose, provided that the + # above copyright notice and the following two paragraphs appear in all + # copies of this software. + # + # IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY + # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + # ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + # THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # + # THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE + # PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF + # CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + # ENHANCEMENTS, OR MODIFICATIONS. + # + # PT_COPYRIGHT_VERSION_2 + # COPYRIGHTENDKEY + + dnl Process this file with autoconf to produce a configure script. + + # Check to see if this file exists + AC_INIT(tcl/Command.java) + + dnl Checks for programs. + AC_PROG_CC + AC_PROG_MAKE_SET + + # + # User specified location of the tcl include + # + AC_ARG_WITH(tclinclude, [ --with-tclinclude=DIR use Tcl 7.6 includes from DIR], + TCL_INCLUDE_DIR=$withval, TCL_INCLUDE_DIR=/usr/local/include) + if test ! -d $TCL_INCLUDE_DIR; then + AC_MSG_ERROR(Tcl directory $TCL_INCLUDE_DIR doesn't exist) + fi + + AC_MSG_CHECKING([for tcl.h]) + if test -f $TCL_INCLUDE_DIR/tcl.h; then + AC_MSG_RESULT($TCL_INCLUDE_DIR/tcl.h) + else + AC_MSG_ERROR([Cannot find $TCL_INCLUDE_DIR/tcl.h, try --with-tclinclude=DIR]) + fi + + # + # User specified location of the tcl lib + # + AC_ARG_WITH(tcllib, [ --with-tcllib=DIR use Tcl 7.6 lib from DIR], + TCL_LIB_DIR=$withval, TCL_LIB_DIR=/usr/local/lib) + if test ! -d $TCL_LIB_DIR; then + AC_MSG_ERROR(Tcl directory $TCL_LIB_DIR doesn't exist) + fi + + AC_MSG_CHECKING([for tclConfig.sh]) + if test -f $TCL_LIB_DIR/tclConfig.sh; then + AC_MSG_RESULT($TCL_LIB_DIR/tclConfig.sh) + else + AC_MSG_ERROR([Cannot find $TCL_LIB_DIR/tclConfig.sh, try --with-tcllib=DIR]) + fi + + file=$TCL_LIB_DIR/tclConfig.sh + . $file + + # The variables that we use from tclConfig.sh + TCL_CC=$TCL_CC + TCL_CFLAGS=$TCL_CFLAGS + TCL_LIB_SPEC=$TCL_LIB_SPEC + TCL_SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS + TCL_SHLIB_LD=$TCL_SHLIB_LD + TCL_SHLIB_LD_LIBS=$TCL_SHLIB_LD_LIBS + TCL_SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX + TCL_SHLIB_VERSION=$TCL_SHLIB_VERSION + # Tcl7.6 defines TCL_SRC_DIR, Tcl7.5 does not. + #TCL_SRC_DIR=$TCL_SRC_DIR + TCL_DL_LIBS=$TCL_DL_LIBS + TCL_LD_FLAGS=$TCL_LD_FLAGS + TCL_LD_SEARCH_FLAGS=$TCL_LD_SEARCH_FLAGS + + # + # User specified location of the tk include + # + AC_ARG_WITH(tkinclude, [ --with-tkinclude=DIR use Tk 4.2 include from DIR], + TK_INCLUDE_DIR=$withval, TK_INCLUDE_DIR=$TCL_INCLUDE_DIR) + if test ! -d $TK_INCLUDE_DIR; then + AC_MSG_ERROR(Tk directory $TK_INCLUDE_DIR doesn't exist) + fi + + AC_MSG_CHECKING([for tk.h]) + if test -f $TK_INCLUDE_DIR/tk.h; then + AC_MSG_RESULT($TK_INCLUDE_DIR/tk.h) + else + AC_MSG_ERROR([Cannot find $TK_INCLUDE_DIR/tk.h, try --with-tkinclude=DIR]) + fi + + # + # User specified location of the tk lib + # + AC_ARG_WITH(tklib, [ --with-tklib=DIR use Tk 4.2 libs from DIR], + TK_LIB_DIR=$withval, TK_LIB_DIR=$TCL_LIB_DIR) + if test ! -d $TK_LIB_DIR; then + AC_MSG_ERROR(Tk directory $TK_LIB_DIR doesn't exist) + fi + + AC_MSG_CHECKING([for tkConfig.sh]) + if test -f $TK_LIB_DIR/tkConfig.sh; then + AC_MSG_RESULT($TK_LIB_DIR/tkConfig.sh) + else + AC_MSG_ERROR([Cannot find $TK_LIB_DIR/tkConfig.sh, try --with-tklib=DIR]) + fi + + file=$TK_LIB_DIR/tkConfig.sh + . $file + + # The variables that we use from tkConfig.sh + TK_XINCLUDES=$TK_XINCLUDES + TK_LIBS=$TK_LIBS + TK_LIB_SPEC=$TK_LIB_SPEC + + + + # + # User specified location of the Java Development Kit (JDK) + # + AC_ARG_WITH(java, [ --with-java=DIR use Java binaries from DIR], + JAVAHOME=$withval, JAVAHOME=`cd /opt/SUNWjws/JDK; pwd`) + + # + # If the user called configure with -without-java, then we don't + # set TYJAVA, and we won't cd down into the tyjava directory to do the build + # + if test "$with_java" = "no"; then + AC_MSG_WARN([Configure called with -without-java, so no java checking]) + TYJAVA="" + else + TYJAVA=tyjava + if test ! -d $JAVAHOME; then + AC_MSG_ERROR(Java directory $JAVAHOME doesn't exist) + fi + + if test ! -f $JAVAHOME/include/StubPreamble.h; then + AC_MSG_ERROR(There's no StubPreamble.h in $JAVAHOME/include; use the --with-java= configure flag to specify the location of the Java Development Kit (JDK), or use --without-java if you don't have Java. ) + fi + + AC_MSG_CHECKING([for the java compiler]) + if test -f $JAVAHOME/bin/javac; then + AC_MSG_RESULT($JAVAHOME/bin/javac) + else + AC_MSG_ERROR([Cannot find $JAVAHOME/bin/javac, try --with-java=DIR]) + fi + + case "`uname -s" in + HP-UX) TMP_JAVA_ARCH_INCLUDE=$JAVAHOME/include/osfport + echo "To build tcljava under HPUX, see tyjava/tcljava/makefile" + ;; + Linux) TMP_JAVA_ARCH_INCLUDE=$JAVAHOME/include/linux;; + SunOS) TMP_JAVA_ARCH_INCLUDE=$JAVAHOME/include/solaris;; + *)TMP_JAVA_ARCH_INCLUDE=$JAVAHOME/include/idontknow;; + esac + # + # User specified Java architecture, used to find the jdk include files + # + AC_ARG_WITH(javaarchinclude, [ --with-javaarchinclude=DIR use Java arch dependent includes from DIR], + JAVA_ARCH_INCLUDE=$withval, JAVA_ARCH_INCLUDE="$TMP_JAVA_ARCH_INCLUDE") + if test ! -d $JAVA_ARCH_INCLUDE; then + AC_MSG_ERROR(Java directory $JAVA_ARCH_INCLUDE doesn't exist) + fi + AC_MSG_CHECKING([for the java oobj_md.h include file]) + if test -f $JAVA_ARCH_INCLUDE/oobj_md.h; then + AC_MSG_RESULT($JAVA_ARCH_INCLUDE/oobj_md.h) + else + AC_MSG_ERROR(There's no oobj_md.h in $JAVA_ARCH_INCLUDE/include; use the --with-javaarchinclude= configure flag to specify the location of the architecture dependent include files in the (JDK) ) + fi + fi + + + dnl Checks for libraries. + + dnl Checks for header files. + AC_HEADER_STDC + AC_CHECK_HEADERS(fcntl.h) + + dnl Checks for typedefs, structures, and compiler characteristics. + + dnl Checks for library functions. + AC_FUNC_VPRINTF + + dnl Unfortunately tcl7.6 has the wrong TCL_SHLIB_LD command in + dnl tclConfig.sh if we are running gcc. + AC_MSG_CHECKING([command to build shared libs]) + if test "$TCL_CC" = "gcc"; then + # Under hppa10.20 gcc, we need to pass -fPIC to gcc so that + # collect will compile the intermediate file with -fPIC + TCL_SHLIB_LD="gcc -shared $TCL_SHLIB_CFLAGS" + fi + AC_MSG_RESULT($TCL_SHLIB_LD) + + dnl Substitute the following variables in the Makefile (in alphabetical order) + AC_SUBST(JAVAHOME) + AC_SUBST(JAVA_ARCH_INCLUDE) + AC_SUBST(TCL_CC) + AC_SUBST(TCL_CFLAGS) + AC_SUBST(TCL_DL_LIBS) + AC_SUBST(TCL_INCLUDE_DIR) + AC_SUBST(TCL_LD_FLAGS) + AC_SUBST(TCL_LD_SEARCH_FLAGS) + AC_SUBST(TCL_LIB_DIR) + AC_SUBST(TCL_LIB_SPEC) + AC_SUBST(TCL_SHLIB_CFLAGS) + AC_SUBST(TCL_SHLIB_LD) + AC_SUBST(TCL_SHLIB_LD_LIBS) + AC_SUBST(TCL_SHLIB_SUFFIX) + AC_SUBST(TCL_SHLIB_VERSION) + AC_SUBST(TCL_SRC_DIR) + AC_SUBST(TK_INCLUDE_DIR) + AC_SUBST(TK_LIBS) + AC_SUBST(TK_LIB_DIR) + AC_SUBST(TK_LIB_SPEC) + AC_SUBST(TK_LIB_SPEC) + AC_SUBST(TK_SRC_DIR) + AC_SUBST(TK_XINCLUDES) + + + AC_OUTPUT(makefile) Only in tcljava0.4: doc Only in tcljava0.4: license.terms diff -c tcljava0.4/makefile.in tcljava0.4a/makefile.in *** tcljava0.4/makefile.in Wed Apr 16 14:04:14 1997 --- tcljava0.4a/makefile.in Wed Apr 16 14:02:15 1997 *************** *** 0 **** --- 1,325 ---- + # Makefile for compiling the Tcl/Java interface + # + # @Author: Christoper Hylands + # + # @Version: @(#)makefile.in 1.1 04/16/97 + # + # @Copyright (c) 1997 The Regents of the University of California. + # All rights reserved. + # + # Permission is hereby granted, without written agreement and without + # license or royalty fees, to use, copy, modify, and distribute this + # software and its documentation for any purpose, provided that the + # above copyright notice and the following two paragraphs appear in all + # copies of this software. + # + # IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY + # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + # ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + # THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # + # THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE + # PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF + # CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + # ENHANCEMENTS, OR MODIFICATIONS. + # + # PT_COPYRIGHT_VERSION_2 + # COPYRIGHTENDKEY + ########################################################################## + + # This makefile is an autoconf makefile, not a standard Ptolemy makefile + + # This file is a makefile for the Tcl/Java interface. + # If it has the name "makefile.in" + # then it is a template for a makefile; to generate the actual makefile, + # run "./configure", which is a configuration script generated by the + # "autoconf" program (constructs like "@foo@" will get replaced in the + # actual makefile. + + ## start of tcl.mk.in ## + SHELL = /bin/sh + + # Don't set srcdir or VPATH in this file or you will override the values + # in the makefile that includes this file. + #srcdir = @srcdir@ + #VPATH = @srcdir@ + + # Location of Tcl and Tk files + TCL_SRC_DIR = @TCL_SRC_DIR@ + TCL_INCLUDE_DIR = @TCL_INCLUDE_DIR@ + TCL_LIB_DIR = @TCL_LIB_DIR@ + + TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ + TCL_SHLIB_LD = @TCL_SHLIB_LD@ + + TCL_CFLAGS = @TCL_CFLAGS@ + + # String to pass to linker to pick up the Tcl library from its + # installed directory. + TCL_LIB_SPEC = @TCL_LIB_SPEC@ + + TK_INCLUDE_DIR = @TK_INCLUDE_DIR@ + TK_LIB_DIR = @TK_LIB_DIR@ + + LIB_INSTALL_DIR = $(TCL_LIB_DIR) + # Flags to pass to cc, such as "-Wl,-R,/usr/local/tcl/lib", that tell the + # run-time dynamic linker where to look for shared libraries such as + # libtcl.so. Used when linking applications. Only works if there + # is a variable "LIB_INSTALL_DIR" defined in the Makefile. + TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@ + + TK_SRC_DIR = @TK_SRC_DIR@ + + # -I switch(es) to use to make all of the X11 include files accessible: + TK_XINCLUDES = @TK_XINCLUDES@ + + # String to pass to linker to pick up the Tk library from its + # installed directory. + TK_LIB_SPEC = @TK_LIB_SPEC@ + + # Additional libraries to use when linking Tk. + TK_LIBS = @TK_LIBS@ + + CC = @TCL_CC@ + AC_FLAGS = @DEFS@ @TCL_SHLIB_CFLAGS@ + + # configure substitutes the stuff inside @..@ above this line + + LIBS = $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(TK_LIBS) + + TCL_INCLUDES = \ + -I$(TCL_INCLUDE_DIR) \ + -I$(TK_INCLUDE_DIR) \ + $(TK_XINCLUDES) + + CFLAGS = $(TCL_CFLAGS) $(AC_FLAGS) $(INCLUDE) $(OTHERCFLAGS) + ## end of tcl.mk.in ## + + srcdir = @srcdir@ + VPATH = @srcdir@ + + # Where's the root of the java distribution? + JAVAHOME = @JAVAHOME@ + + # What's the java compiler binary? + JAVAC = $(JAVAHOME)/bin/javac + + # What's the java header program? + JAVAH = $(JAVAHOME)/bin/javah + + # Directory that contains architecture dependent include files + # Usually $(JAVAHOME)/include/solaris or something similar + JAVA_ARCH_INCLUDE = @JAVA_ARCH_INCLUDE@ + + JAVA_INCLUDES = \ + -I$(JAVAHOME)/include \ + -I$(JAVA_ARCH_INCLUDE) + + TCL_CFLAGS = @TCL_CFLAGS@ + + # Location of Tcl and Tk files + TCL_INCLUDE_DIR = @TCL_INCLUDE_DIR@ + TCL_LIB_DIR = @TCL_LIB_DIR@ + + TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ + TCL_SHLIB_LD = @TCL_SHLIB_LD@ + + TCL_CFLAGS = @TCL_CFLAGS@ + + # String to pass to linker to pick up the Tcl library from its + # installed directory. + TCL_LIB_SPEC = @TCL_LIB_SPEC@ + + TK_INCLUDE_DIR = @TK_INCLUDE_DIR@ + TK_LIB_DIR = @TK_LIB_DIR@ + + LIB_INSTALL_DIR = $(TCL_LIB_DIR) + + LIB_RUNTIME_DIR = $(TCL_LIB_DIR) + + # Flags to pass to cc, such as "-Wl,-R,/usr/local/tcl/lib", that tell the + # run-time dynamic linker where to look for shared libraries such as + # libtcl.so. Used when linking applications. Only works if there + # is a variable "LIB_INSTALL_DIR" defined in the Makefile. + TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@ + + + # -I switch(es) to use to make all of the X11 include files accessible: + TK_XINCLUDES = @TK_XINCLUDES@ + + # String to pass to linker to pick up the Tk library from its + # installed directory. + TK_LIB_SPEC = @TK_LIB_SPEC@ + + # Additional libraries to use when linking Tk. + TK_LIBS = @TK_LIBS@ + + CC = @TCL_CC@ + AC_FLAGS = @DEFS@ @TCL_SHLIB_CFLAGS@ + + # configure substitutes the stuff inside @..@ above this line + + LIBS = $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(TK_LIBS) + + TCL_INCLUDES = \ + -I$(TCL_INCLUDE_DIR) \ + -I$(TK_INCLUDE_DIR) \ + $(TK_XINCLUDES) + + # To build under hppa, try something like: + # make OTHERCFLAGS="-DTCLEXECFIX -Dexecenv=javaexecenv -D_INT32_T -D_UINT32_T -D_INT16_T -D_UINT16_T -D_INT8_T -D_UINT8_T -Dint32_t=long" + + CFLAGS = $(TCL_CFLAGS) $(AC_FLAGS) $(INCLUDE) $(OTHERCFLAGS) + + + LIB = libjtk$(TCL_SHLIB_SUFFIX) + VERSION = 0.4 + + INCLUDE = \ + -I./ \ + -I$(srcdir) \ + $(JAVA_INCLUDES) \ + $(TCL_INCLUDES) + + # This provides a workaround for the 'exec' bug. It's a brain-dead + # replacement for the 'exec' command. It's basically a 'system("cmd string");' + # and nothing more. Probably only works under Unix, but maybe Dos? + OTHERCFLAGS= -DTCLEXECFIX + + SRCS = tclJava.c tcl_classes.c tkJava.c + HDRS = tcl_classes.h + + EXTRA_SRCS = makefile.in README TclTest.tcl license.terms \ + tkcon.tcl tkcon.zip zipbrowser.tcl + + # Checkjunk should ignore these + MISC_FILES = doc tcl + + # Sub directories to run make in. + DIRS = #doc tcl + + OBJS = tclJava.o tcl_classes.o tkJava.o + + # `make realclean` removes these files + REALCLEAN_STUFF = makefile + + LIBPATH = \ + -L$(TCL_LIB_DIR) \ + -L$(TK_LIB_DIR) + + CLASSPATH=. + CLASSES.tcl = \ + tcl.Command \ + tcl.Interp \ + tcl.Result \ + tcl.Tcl_BreakException \ + tcl.Tcl_ContinueException \ + tcl.Tcl_ControlException \ + tcl.Tcl_ErrorException \ + tcl.Tcl_ResultCodeException \ + tcl.Tcl_ReturnException \ + tcl.Tcl_UserException \ + tcl.Value \ + tcl.TkApplication + + JSRCS = \ + TclTest.java \ + tcl/Command.java \ + tcl/Interp.java \ + tcl/Tcl_BreakException.java \ + tcl/Tcl_ContinueException.java \ + tcl/Tcl_ControlException.java \ + tcl/Tcl_ErrorException.java \ + tcl/Tcl_ResultCodeException.java \ + tcl/Tcl_ReturnException.java \ + tcl/Tcl_UserException.java \ + tcl/Value.java \ + tcl/TkApplication.java + + TCL_JCLASSES = \ + tcl/Command.class \ + tcl/Interp.class \ + tcl/Result.class \ + tcl/Tcl_BreakException.class \ + tcl/Tcl_ContinueException.class \ + tcl/Tcl_ControlException.class \ + tcl/Tcl_ErrorException.class \ + tcl/Tcl_ResultCodeException.class \ + tcl/Tcl_ReturnException.class \ + tcl/Tcl_UserException.class \ + tcl/Value.class \ + tcl/TkApplication.class + + JCLASSES = $(TCL_JCLASSES) \ + Callback1.class \ + Callback2.class \ + TclTest.class \ + Thrower.class \ + facCalc.class \ + zipCallback.class + + all: $(LIB) tcl TclTest.class + + $(LIB) : $(OBJS) + $(TCL_SHLIB_LD) $(OBJS) -o $@ $(TCL_LD_SEARCH_FLAGS) $(LIBS) + + install: $(LIBDIR)/$(LIB) + + tcl_classes.c: $(TCL_JCLASSES) + $(JAVAH) -o tcl_classes.c -stubs $(CLASSES.tcl) + + tcl_classes.h: $(TCL_JCLASSES) + $(JAVAH) -o tcl_classes.h $(CLASSES.tcl) + + TclTest.java: $(LIB) + + # Stuff to clean + CRUD = tcl_* *.class *.o $(LIB) tcl/*.class *~ doc/*~ tcl/*~ + + tclJava.c: tcl_classes.h + tkJava.c: tcl_classes.h + tclJava.o: tclJava.c tcl_classes.h + tkJava.o: tkJava.c tcl_classes.h + + depend: + @echo "no dependencies in this directory" + + ## start of tycommon.mk ## + + ############## + # Java rules + + .SUFFIXES: .class .java + .java.class: + rm -f `basename .java`.class + CLASSPATH=$(CLASSPATH) $(JAVAC) $(JFLAGS) $< + + # Build all the Java class files. + jclass: $(JSRCS) $(JCLASS) + + # Build the Java documentation. + javadocs: doc/codeDoc/tree.html + jhtml: doc/codeDoc/tree.html + doc/codeDoc/tree.html: $(JSRCS) + @if [ "$(JSRCS)" = "" ]; then \ + echo "No java sources, so we don't run javadoc";\ + else \ + if [ ! -d doc/codeDoc ]; then mkdir -p doc/codeDoc; fi; \ + rm -f doc/codeDoc/*.html; \ + CLASSPATH=$(CLASSPATH):$(JAVAHOME)/lib/classes.zip $(JAVADOC) $(JDOCFLAGS) -d doc/codeDoc $(JSRCS); \ + for x in doc/codeDoc/*.html; do \ + echo "Fixing paths in $$x"; \ + sed -e 's| $$x.bak; \ + mv $$x.bak $$x; \ + done; \ + fi + + ## end of tycommon.mk ## + + makefile: $(srcdir)/makefile.in + (cd ../..; ./config.status) diff -c tcljava0.4/makefile.vc tcljava0.4a/makefile.vc *** tcljava0.4/makefile.vc Wed Apr 16 14:04:14 1997 --- tcljava0.4a/makefile.vc Wed Apr 16 14:02:15 1997 *************** *** 0 **** --- 1,144 ---- + # + # This file is the make file for the tcljava demonstration program. + # Based on the original tcljava0.4 Makefile + # + # + # Location of the Itcl sources, include the Tcl and Tk sources + SOURCE_ROOT = c:\Itcl2.2 + + # We want this rule to be first so that 'nmake -f makefile.vc' does the + # right thing. + all: TclTest.class libjtk + + # We include the makefile.vc from the Itcl2.2 distribution + # That makefile defines things like TCLHOME etc. + !include "$(SOURCE_ROOT)\makefile.vc" + + # Where's the root of the java distribution? + JAVAHOME=c:\jdk1.1 + + # What's the java compiler binary? + JAVAC = $(JAVAHOME)\bin\javac + + # What's the java header program? + JAVAH = $(JAVAHOME)\bin\javah + + # What's the javai library + JAVAILIB = $(JAVAHOME)\lib\javai.lib + + # What's the object code suffix on this machine? + SFX = .obj + + # What's the shared library suffix on this machine? + SHLIBSFX = .dll + + # If you're using a version of Tk earlier than 4.1b1, you'll + # need to uncomment this line + # OLDFLAGS += -DCREATEMAINWINDOWHACK + + # This provides a workaround for the 'exec' bug. It's a brain-dead + # replacement for the 'exec' command. It's basically a 'system("cmd string")' + # and nothing more. Probably only works under Unix, but maybe Dos? + #TCLEXECFIX = -DTCLEXECFIX + + # What flags to compile the C code with? + CFLAGS = $(INCLUDE) $(OLDFLAGS) $(TCLEXECFIX) $(TK_INCLUDES) + + CPU = i386 + INCLUDE = $(TOOLS32)\include + !include + + ##################### You shouldn't need to change things below here + + .SUFFIXES: .java .class + + LIBPATH = \ + -L$(TCLHOME)\unix \ + -L$(TKHOME)\unix \ + -L$(TCLHOME) \ + -L$(TKHOME) + + CLASSEStcl = \ + tcl.Command \ + tcl.Interp \ + tcl.Result \ + tcl.Tcl_BreakException \ + tcl.Tcl_ContinueException \ + tcl.Tcl_ControlException \ + tcl.Tcl_ErrorException \ + tcl.Tcl_ResultCodeException \ + tcl.Tcl_ReturnException \ + tcl.Tcl_UserException \ + tcl.Value \ + tcl.TkApplication + + FILESjava = \ + tcl\Command.java \ + tcl\Interp.java \ + tcl\Tcl_BreakException.java \ + tcl\Tcl_ContinueException.java \ + tcl\Tcl_ControlException.java \ + tcl\Tcl_ErrorException.java \ + tcl\Tcl_ResultCodeException.java \ + tcl\Tcl_ReturnException.java \ + tcl\Tcl_UserException.java \ + tcl\Value.java \ + tcl\TkApplication.java + + FILESclass = \ + tcl\Command.class \ + tcl\Interp.class \ + tcl\Result.class \ + tcl\Tcl_BreakException.class \ + tcl\Tcl_ContinueException.class \ + tcl\Tcl_ControlException.class \ + tcl\Tcl_ErrorException.class \ + tcl\Tcl_ResultCodeException.class \ + tcl\Tcl_ReturnException.class \ + tcl\Tcl_UserException.class \ + tcl\Value.class \ + tcl\TkApplication.class + + OBJS = tclJava$(SFX) tkJava$(SFX) tcl_classes$(SFX) + + LIBJTK = jtk$(SHLIBSFX) + libjtk: $(LIBJTK) + + TK_INCLUDES = -I$(TKDIR)\bitmaps -I$(TKDIR)\xlib -I$(TKDIR)\win \ + -I$(TKDIR)\generic \ + -I$(TKDIR) -I$(TCLDIR)\generic + + INCLUDE = \ + -I$(JAVAHOME)\include \ + -I$(JAVAHOME)\include\win32 \ + $(TK_INCLUDES) \ + -I$(TOOLS32)\include + + .java.class: + $(JAVAC) -g $< + + tcl_classes.c: TclTest.class $(FILESclass) + $(JAVAH) -stubs -o $@ $(CLASSEStcl) + + tcl_classes.h: TclTest.class $(FILESclass) + $(JAVAH) -o $@ $(CLASSEStcl) + + $(LIBJTK): tclJava.c tkJava.c tcl_classes.c tcl_classes.h + set LIB=c:\msdev\lib + cl /nologo -LDd -D_DEBUG \ + tcl_classes.c tclJava.c tkJava.c $(INCLUDE) \ + $(JAVAILIB) \ + $(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) \ + msvcrt.lib \ + -Fe$@ \ + /link /debug:full /VERBOSE:lib /NODEFAULTLIB:libc.lib \ + /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib \ + /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib + + + # $(guilibsdll) libc.lib + clean: + rm -f tcl_* *.class *$(SFX) $(LIBJTK) tcl\*.class *~ doc\*~ tcl\*~ + + tclJava.c: tcl_classes.h + tkJava.c: tcl_classes.h Only in tcljava0.4: tcl Only in tcljava0.4: tclJava.c diff -c tcljava0.4/tcljava0.4a.html tcljava0.4a/tcljava0.4a.html *** tcljava0.4/tcljava0.4a.html Wed Apr 16 14:04:14 1997 --- tcljava0.4a/tcljava0.4a.html Wed Apr 16 14:03:56 1997 *************** *** 0 **** --- 1,385 ---- + + + + Tcljava + + +

Tcljava

+ + Places to go: +
+ +
  • Sun's Tcl/Java + interface page. + +
  • Ken Corey's Talks and Papers, including a few on TclJava. + +
  • Ken Corey's TclJava Reference Manual + +
  • Distributing Objects across Java and Tcl/Tk Mark C. Reynolds, United Technologies + +
  • Jacl -- Tcl Interpreter for Java Ioi Lam, Cornell + +
  • + +
    +

    Sun's Tcl/Java + interface, available at ftp://ftp.sunlabs.com/pub/tcl/tcljava0.4.tar.gz + can be used to create a shared library that is loaded by the Java byte + interpreter. This shared library has Java classes that allow the user + to evaluate Tcl commands. We created a GNU autoconf file + that allows tcljava to be easily configured. +

    We are particularly interested in combining Itcl and Java for use in the + Tycho project. + +

    Downloads

    + +
  • The original Tcljava interface: ftp://ftp.sunlabs.com/pub/tcl/tcljava0.4.tar.gz + +
  • Tcljava0.4a (gzipped tar file) + patched for use with jdk1.1, configure and NT. - Patch to convert tcljava0.4 + to tcljava0.4a + +
  • Itcl2.2 makefile.vc files + that work with Microsoft Visual C++ (gzipped tar file). + + + +
  • tcljava0.4a.nt.tar.gz + contains NT 4.0 binaries for tcljava0.4a and + Itcl2.2. + +
  • + +
    +

    Installing Tcljava under Unix

    + I created a GNU autoconf configure script that can be used to configure + tcljava. This script works under Solaris. + +
      + +
    1. Install tcl and tk by configuring with the + --enable-shared option. + +
    2. You can either download a patched version of + Tcljava (tcljava0.4a), or + grab the original Tcljava interfaceftp://ftp.sunlabs.com/pub/tcl/tcljava0.4.tar.gz from Sun and then patch it with + the patch below. +
      If you downloaded tcljava0.4a, then skip to step 5 below. + +
    3. If you are using the unpatched Sun tcljava0.4 sources, then + grab the tcljava0.4a.patch, + file which contains the following new files: +
      +
      configure.in +
      Autoconf source file + +
      configure +
      Shell script to run that configures the installation + +
      makefile.in +
      Makefile template that configure uses to create makefile + +
      makefile.vc +
      Microsoft Visual C++ makefile for NT. +
      + The patch also contains a change to the following file: +
      +
      TclTest.java +
      Apparently, in jdk1.1, The package sun.tools.zip does + not exist. This package was present in jdk1.0.2. If you try to compile + TclTest.java with the jdk1.1 javac, you will get +
      + TclTest.java:13: Package sun.tools.zip not found in import.
      + import sun.tools.zip.*;
      + 
      +
      Fixed a bug where if the user hit the demo button, java would crash + because a pathname was hardwired in. +
      + + +
    4. Untar the Sun tcljava0.4tar file and then patch it with +
      + patch < tcljava0.4a.patch
      + 
      + while in the directory above tcljava0.4 directory. + + +
    5. configure has a number of options to set the paths. + You can use: configure -help to see them all. + +
      You will probably need to specify at least three arguments: +
      +
      --with-java + +
      You will probably need to use the --with-java + option to tell configure where your Java installation is. If you java + installation is at /opt/jdk1.1, then you would use + . + + +
      + If your tcltk installation is not installed in the default location + (/usr/local), then you may need to call configure + with other arguments. + +
    + +
    +

    Installing TclJava under NT

    + + tcljava0.4a.nt.tar.gz + contains NT 4.0 binaries for tcljava0.4a and + Itcl2.2. +

    The binaries contain hardwired paths, and are only available for testing + purposes. If you have problems with this tar file, try building from scratch below. + +

      +
    1. Download tcljava0.4a.nt.tar.gz + +
    2. Install it in your c: drive. The tar file consists of files + in two directories: c:\Program Files\Itcl2.2 and c:\tcljava0.4 + +
    3. Download and install the Java Development Kit from http://www.javasoft.com. + I installed it in c:\jdk1.1. You will need to set your Path + and the CLASSPATH environment variable according to the JDK + instructions. + +
    4. Set your path to include c:\Program Files\Itcl2.2\Bin + + +
    5. To run the tcljava interface, I had to set the + TCL_LIBRARY and TK_LIBRARY environment + variables. Under NT, I brought up the control panel, selected the + System Icon and then the Environment Tab. +
      I set TK_LIBRARY to + c:/Program Files/Itcl2.2/Lib/Itcl/Tk4.2 +
      I set TCL_LIBRARY to + c:/Program Files/Itcl2.2/Lib/Itcl/Tcl7.6 + +
    6. Start up the tcljava interface with the sample file: +
      + cd c:\tcljava0.4a
      + java TclTest
      + 
      + +
    + + +
    +

    Building Tcljava under NT

    + +

    I believe that to Install Tcljava under NT, you must rebuild Tcl from + scratch. If you do not rebuild Tcl from scratch, then when you try to + link with the tcl and tk dll, VC++ will complain about invalid + objects. + +

    Why not gcc?

    +

    + I don't think that java native methods can be compiled under gcc, if you + run javah, then the .c file that is generated + has a line like: +

    + __declspec(dllexport) stack_item *Java_tcl_Interp_native_0005feval_stub(stack_item *_P_,structexecenv *_EE_) {
    + 
    + I downloaded the cygwin gcc (version cygnus-2.7.2-961023), and it failed to + compile this line, the error message was: +
    + 	tcl_classes.c: In function `__declspec':
    + 	tcl_classes.c:8: syntax error before `{'
    + 
    + I also had problems compiling + c:\jdk1.\include\win32\typdefs_md.h, with gcc, there were + errors in the INT_OP declaration. I also had problems + __int64 in typdefs_md.h. + Perhaps gcc can be used here, but I did not look into this any further. + +

    Installation procedure

    +
      + +
    1. Download the Tcl/Tk sources. Locally, we use Itcl, an object + oriented extension to Tcl/Tk, so these instructions are based on Itcl sources. + The Itcl2.2 sources can be obtained from: + http://www.tcltk.com/itcl + + +
    2. I untar'd the Itcl2.2 sources in c:\Itcl2.2 + +
    3. The Itcl2.2 sources need several fixes the the makefile.vc + files. The itcl2.2a.tar.gz gzipped + tar file contains the appropriate fixes. You should grab itcl2.2a.tar.gz and untar it over the Itcl2.2 distribution. itcl2.2a.tar.gz contains the following fixes: + +
        + +
      1. tk4.2/win/makefile.vc needed the + $(IWISH) rule changed to $(WISH). + + +
      2. makefile.vc needed: +
        + 	TKLIBDIR	= $(TKDIR)\Win
        + 	
        + +
      3. itk/win/makefile.vc needed +
        + 	TARGET_DOC_ITK	= $(TARGET_DOC)\Itk
        + 	
        + +
      4. Also, I fixed the installation rules so that make + install + will not fail if it is run a second time because mkdir + fails. +
      + +
    4. Build and install the Itcl2.2 distribution with: +
      + cd c:\Itcl2.2
      + nmake -f makefile.vc dist
      + nmake -f makefile.vc install
      + 
      + Note that if you have already previously installed Tcl/Tk, you should + remove any preexisting Tcl/Tk libraries, such as tcl76.dll + or tcl76i.dll +
      If you have the problem where everytime you run nmake, + all the files are rebuilt, then try using the Cygnus chmod + and touch commands to update the mod times on all the files. + The problem I noticed was that many of the files are dated Dec 31, 1969. + +
    5. Download the Java Development Kit from http://www.javasoft.com. + I installed it in c:\jdk1.1 + +
    6. Download tcljava0.4a (gzipped tar + file). This file is based on tcljava0.4, but it has been + patched for use with jdk1.1, configure and NT. I installed this as + c:\tcljava0.4a + +
      + I had to make the following changes to tcljava0.4: +
        +
      1. tkJava.c was failing to compile with + lots of problems in rpcdce.h. The following small + test program fails to compile: +
        + 	#include 
        + 	#include 
        + 	int foo() { return 1;}
        + 	
        + The rule I used to test this was: +
        + 	tkj.obj:
        + 		cl -Ic:\jdk1.1\include -Ic:\jdk1.1\include\win32 \
        + 		-I$(TOOLS32)\include $(TK_INCLUDES)  \
        + 		/c tst.c
        + 	
        + The fix is to insert +
        + /* NT4.0, vc++: If you don't undef Status, then rpcdce.h won't compile -cxh */
        + #ifdef _MSC_VER
        + #undef Status
        + #endif
        + 	
        + right before the line that includes oobj.h. + +
      2. TclTest.java + JDK1.1 under Windows does not include the + sun.tools.zip package, so I had to comment out + a number of lines that tried to use it before the + TclTest.java class would compile + +
      3. When linking, I got an error about perror + not being defined, so I modified the makefile.vc to not + define EXECHACK + + +
      4. TclTest.java + When trying to run java TclTest, I kept getting + errors about create not being found. The fix was + to load the library at the top of main instead of + in the TclTest static section. + +
      + + +
    7. I compiled the tcljava interface with: +
      + cd c:\tcljava0.4a
      + nmake -f makefile.vc all
      + 
      + + +
    8. To run the tcljava interface, I had to set the + TCL_LIBRARY and TK_LIBRARY environment + variables. Under NT, I brought up the control panel, selected the + System Icon and then the Environment Tab. +
      I set TK_LIBRARY to + c:/Program Files/Itcl2.2/Lib/Itcl/Tk4.2 + +
    9. The command to actually run the interface is +
      + java TclTest
      + 
      + +
    + +

    Troubleshooting tcljava under NT

    + + + +
  • You might find the Tcl/Tk + on Windows FAQ useful. + + +
  • If you get an error message that looks likes: +
    + The instruction at "0x1000f36b" referenced memory at "0x00000000". The
    + memory could not be "read".
    + 
    + + The search for all the Tcl76 dlls and remove all of them except the + one that you built. Also, check to be sure that you compiled Tcl and Tk with + debugging turned on. Itcl2.2/tcl7.6/makefile.vc and +
    I fixed a bug in TclTest.java, where a path was hardwired + in so that if the user hit the demo button, then they + would see the above error. Try using a button other than demo. + +
  • If you get an error about not being able to find tk.tcl: +
    + bash$ java TclTest
    + java.lang.UnknownError: Can't find a usable tk.tcl in the following directories:
    +  
    +    {c:/Program Files/Itcl2.2/Lib/Itcl/Tk4.2/tk.tcl} . c:/tk4.2 ./lib/itcl/tk4.2
    +  c:/tk4.2/library c:/library
    + This probably means that Tk wasn't installed properly.
    + 
    +         at tcl.TkApplication.tkInit(TkApplication.java:39)
    +         at TclTest.main(TclTest.java:152)
    + bash$
    + 
    + + Try setting TK_LIBRARY and TCL_LIBRARYin the + system control panel under the Environment choice. + +
    I set TK_LIBRARY to + c:/Program Files/Itcl2.2/Lib/Itcl/Tk4.2 +
    I set TCL_LIBRARY to + c:/Program Files/Itcl2.2/Lib/Itcl/Tcl7.6 + +
  • + + +
    +

    +

    cxh@eecs.berkeley.edu
    +
    + + + diff -c tcljava0.4/tkJava.c tcljava0.4a/tkJava.c *** tcljava0.4/tkJava.c Wed Apr 16 14:04:14 1997 --- tcljava0.4a/tkJava.c Wed Apr 16 14:03:56 1997 *************** *** 1,3 **** --- 1,4 ---- + /* Ptolemy Version: @(#)tkJava.c 1.2 04/16/97 */ /* * tkJava.c -- * *************** *** 17,22 **** --- 18,28 ---- #include #include #include + + /* Under NT, we need to undefine Status, or we will see lots of error + * messages while compiling rpcdce.h + */ + #undef Status #include #include #include Only in tcljava0.4: tkcon.tcl Only in tcljava0.4: tkcon.zip Only in tcljava0.4: zipbrowser.tcl