*** Makefile.in.orig Tue Sep 27 15:49:26 1994 --- Makefile.in Tue Sep 27 15:49:26 1994 *************** *** 75,80 **** --- 75,82 ---- #GENERIC_FLAGS = -DTCL_GENERIC_ONLY UNIX_OBJS = panic.o tclEnv.o tclGlob.o tclMain.o tclUnixAZ.o \ tclUnixStr.o tclUnixUtil.o + UNIX_SOBJS = panic.so tclEnv.so tclGlob.so tclMain.so tclUnixAZ.so \ + tclUnixStr.so tclUnixUtil.so #UNIX_OBJS = # To enable memory debugging reverse the comment characters on the following *************** *** 95,100 **** --- 97,103 ---- #---------------------------------------------------------------- COMPAT_OBJS = @LIBOBJS@ + COMPAT_SOBJS = @LIBSOBJS@ AC_FLAGS = @DEFS@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ *************** *** 122,148 **** OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} ! all: libtcl.a tclsh libtcl.a: ${OBJS} rm -f libtcl.a ar cr libtcl.a ${OBJS} $(RANLIB) libtcl.a tclsh: tclAppInit.o libtcl.a ! ${CC} ${CC_SWITCHES} tclAppInit.o libtcl.a ${MATH_LIBS} -o tclsh tcltest: tclTest.o libtcl.a ! ${CC} ${CC_SWITCHES} tclTest.o libtcl.a ${MATH_LIBS} -o tcltest test: tcltest @cwd=`pwd`; \ cd $(SRC_DIR); TCL_LIBRARY=`pwd`/library; export TCL_LIBRARY; \ cd $$cwd; ( echo cd $(SRC_DIR)/tests\; source all ) | ./tcltest install: install-binaries install-libraries install-man ! install-binaries: libtcl.a tclsh @for i in $(LIB_DIR) $(BIN_DIR) ; \ do \ if [ ! -d $$i ] ; then \ --- 125,166 ---- OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} ! GENERIC_SOBJS = regexp.so tclAsync.so tclBasic.so tclCkalloc.so \ ! tclCmdAH.so tclCmdIL.so tclCmdMZ.so tclExpr.so tclGet.so \ ! tclHash.so tclHistory.so tclLink.so tclParse.so tclProc.so \ ! tclUtil.so tclVar.so ! ! SOBJS = ${GENERIC_SOBJS} ${UNIX_SOBJS} ${COMPAT_SOBJS} ! ! VERS_MAJOR=7 ! VERS_MINOR=3 ! ! all: libtcl.a libtcl.so.${VERS_MAJOR}.${VERS_MINOR} tclsh libtcl.a: ${OBJS} rm -f libtcl.a ar cr libtcl.a ${OBJS} $(RANLIB) libtcl.a + libtcl.so.${VERS_MAJOR}.${VERS_MINOR}: ${SOBJS} + rm -f libtcl.so.${VERS_MAJOR}.${VERS_MINOR} + ld -Bshareable -Bforcearchive -o libtcl.so.${VERS_MAJOR}.${VERS_MINOR} ${SOBJS} + tclsh: tclAppInit.o libtcl.a ! ${CC} ${CC_SWITCHES} tclAppInit.o -L. -ltcl ${MATH_LIBS} -o tclsh tcltest: tclTest.o libtcl.a ! ${CC} ${CC_SWITCHES} tclTest.o -L. -ltcl ${MATH_LIBS} -o tcltest test: tcltest @cwd=`pwd`; \ cd $(SRC_DIR); TCL_LIBRARY=`pwd`/library; export TCL_LIBRARY; \ + LD_LIBRARY_PATH=.; export LD_LIBRARY_PATH; \ cd $$cwd; ( echo cd $(SRC_DIR)/tests\; source all ) | ./tcltest install: install-binaries install-libraries install-man ! install-binaries: libtcl.a libtcl.so.${VERS_MAJOR}.${VERS_MINOR} tclsh @for i in $(LIB_DIR) $(BIN_DIR) ; \ do \ if [ ! -d $$i ] ; then \ *************** *** 155,160 **** --- 173,180 ---- @echo "Installing libtcl.a" @$(INSTALL_DATA) libtcl.a $(LIB_DIR) @$(RANLIB) $(LIB_DIR)/libtcl.a + @echo "Installing libtcl.so.${VERS_MAJOR}.${VERS_MINOR}" + @$(INSTALL_DATA) libtcl.so.${VERS_MAJOR}.${VERS_MINOR} $(LIB_DIR) @echo "Installing tclsh" @$(INSTALL_PROGRAM) tclsh $(BIN_DIR) *************** *** 215,255 **** $(SHELL) config.status clean: ! rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tclsh tcltest distclean: clean rm -f Makefile config.status getcwd.o: $(SRC_DIR)/compat/getcwd.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/getcwd.c opendir.o: $(SRC_DIR)/compat/opendir.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/opendir.c strerror.o: $(SRC_DIR)/compat/strerror.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strerror.c strstr.o: $(SRC_DIR)/compat/strstr.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strstr.c strtod.o: $(SRC_DIR)/compat/strtod.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtod.c strtol.o: $(SRC_DIR)/compat/strtol.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtol.c strtoul.o: $(SRC_DIR)/compat/strtoul.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtoul.c tmpnam.o: $(SRC_DIR)/compat/tmpnam.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/tmpnam.c waitpid.o: $(SRC_DIR)/compat/waitpid.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/waitpid.c .c.o: $(CC) -c $(CC_SWITCHES) $< ${OBJS}: $(SRC_DIR)/tcl.h $(SRC_DIR)/tclInt.h ${UNIX_OBJS}: $(SRC_DIR)/tclUnix.h tclCmdIL.o: $(SRC_DIR)/patchlevel.h --- 235,313 ---- $(SHELL) config.status clean: ! rm -f *.a *.o *.so *.so.* *.core errs *~ \#* TAGS *.E a.out errors tclsh tcltest distclean: clean rm -f Makefile config.status + PICFLAGS=-fpic -DPIC + getcwd.o: $(SRC_DIR)/compat/getcwd.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/getcwd.c + getcwd.so: $(SRC_DIR)/compat/getcwd.c + $(CC) $(PICFLAGS) -c $(CC_SWITCHES) $(SRC_DIR)/compat/getcwd.c -o getcwd.so + opendir.o: $(SRC_DIR)/compat/opendir.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/opendir.c + opendir.so: $(SRC_DIR)/compat/opendir.c + $(CC) $(PICFLAGS) -c $(CC_SWITCHES) $(SRC_DIR)/compat/opendir.c -o opendir.so + strerror.o: $(SRC_DIR)/compat/strerror.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strerror.c + strerror.so: $(SRC_DIR)/compat/strerror.c + $(CC) $(PICFLAGS) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strerror.c -o strerror.so + strstr.o: $(SRC_DIR)/compat/strstr.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strstr.c + strstr.so: $(SRC_DIR)/compat/strstr.c + $(CC) $(PICFLAGS) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strstr.c -o strstr.so + strtod.o: $(SRC_DIR)/compat/strtod.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtod.c + strtod.so: $(SRC_DIR)/compat/strtod.c + $(CC) $(PICFLAGS) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtod.c -o strtod.so + strtol.o: $(SRC_DIR)/compat/strtol.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtol.c + strtol.so: $(SRC_DIR)/compat/strtol.c + $(CC) $(PICFLAGS) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtol.c -o strtol.so + strtoul.o: $(SRC_DIR)/compat/strtoul.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtoul.c + strtoul.so: $(SRC_DIR)/compat/strtoul.c + $(CC) $(PICFLAGS) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtoul.c -o strtoul.so + tmpnam.o: $(SRC_DIR)/compat/tmpnam.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/tmpnam.c + tmpnam.so: $(SRC_DIR)/compat/tmpnam.c + $(CC) $(PICFLAGS) -c $(CC_SWITCHES) $(SRC_DIR)/compat/tmpnam.c -o tmpnam.so + waitpid.o: $(SRC_DIR)/compat/waitpid.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/waitpid.c + waitpid.so: $(SRC_DIR)/compat/waitpid.c + $(CC) $(PICFLAGS) -c $(CC_SWITCHES) $(SRC_DIR)/compat/waitpid.c -o waitpid.so + .c.o: $(CC) -c $(CC_SWITCHES) $< ${OBJS}: $(SRC_DIR)/tcl.h $(SRC_DIR)/tclInt.h ${UNIX_OBJS}: $(SRC_DIR)/tclUnix.h tclCmdIL.o: $(SRC_DIR)/patchlevel.h + + .SUFFIXES: .so + + .c.so: + $(CC) $(PICFLAGS) $(CC_SWITCHES) -c $< -o $@ + + ${SOBJS}: $(SRC_DIR)/tcl.h $(SRC_DIR)/tclInt.h + ${UNIX_SOBJS}: $(SRC_DIR)/tclUnix.h + tclCmdIL.so: $(SRC_DIR)/patchlevel.h *** configure:1.1.1.1 Tue Sep 27 15:49:27 1994 --- configure Tue Sep 27 15:49:27 1994 *************** *** 210,215 **** --- 210,216 ---- : else LIBOBJS="$LIBOBJS ${func}.o" + LIBSOBJS="$LIBSOBJS ${func}.so" test -n "$verbose" && echo " using ${func}.o instead" fi rm -f conftest* *************** *** 238,243 **** --- 239,245 ---- : else LIBOBJS="$LIBOBJS ${func}.o" + LIBSOBJS="$LIBSOBJS ${func}.so" test -n "$verbose" && echo " using ${func}.o instead" fi rm -f conftest* *************** *** 610,615 **** --- 612,618 ---- : else LIBOBJS="$LIBOBJS strstr.o" + LIBSOBJS="$LIBSOBJS strstr.so" fi rm -f conftest* *************** *** 666,671 **** --- 669,675 ---- rm -f conftest* if test $tcl_ok = 0; then LIBOBJS="$LIBOBJS strtoul.o" + LIBSOBJS="$LIBSOBJS strtoul.so" fi #-------------------------------------------------------------------- *************** *** 720,725 **** --- 724,730 ---- rm -f conftest* if test $tcl_ok = 0; then LIBOBJS="$LIBOBJS strtod.o" + LIBSOBJS="$LIBSOBJS strtod.so" fi #-------------------------------------------------------------------- *************** *** 914,919 **** --- 919,925 ---- EOF if eval $compile; then LIBOBJS="$LIBOBJS tclMtherr.o"; + LIBSOBJS="$LIBSOBJS tclMtherr.so"; { test -n "$verbose" && \ echo " defining NEED_MATHERR" *************** *** 967,972 **** --- 973,979 ---- RANLIB='$RANLIB' CC='$CC' LIBOBJS='$LIBOBJS' + LIBSOBJS='$LIBSOBJS' CPP='$CPP' LIBS='$LIBS' srcdir='$srcdir' *************** *** 1001,1006 **** --- 1008,1014 ---- s%@RANLIB@%$RANLIB%g s%@CC@%$CC%g s%@LIBOBJS@%$LIBOBJS%g + s%@LIBSOBJS@%$LIBSOBJS%g s%@CPP@%$CPP%g s%@LIBS@%$LIBS%g s%@srcdir@%$srcdir%g *** configure.in:1.1.1.1 Tue Sep 27 15:49:28 1994 --- configure.in Tue Sep 27 15:49:28 1994 *************** *** 73,79 **** { exit(strstr("\0test", "test") ? 1 : 0); } ! ], , [LIBOBJS="$LIBOBJS strstr.o"]) #-------------------------------------------------------------------- # Check for strtoul function. This is tricky because under some --- 73,79 ---- { exit(strstr("\0test", "test") ? 1 : 0); } ! ], , [LIBOBJS="$LIBOBJS strstr.o"; LIBSOBJS="$LIBSOBJS strstr.so"]) #-------------------------------------------------------------------- # Check for strtoul function. This is tricky because under some *************** *** 97,102 **** --- 97,103 ---- }], , tcl_ok=0) if test $tcl_ok = 0; then LIBOBJS="$LIBOBJS strtoul.o" + LIBSOBJS="$LIBSOBJS strtoul.so" fi #-------------------------------------------------------------------- *************** *** 120,125 **** --- 121,127 ---- }], , tcl_ok=0) if test $tcl_ok = 0; then LIBOBJS="$LIBOBJS strtod.o" + LIBSOBJS="$LIBSOBJS strtod.so" fi #-------------------------------------------------------------------- *************** *** 177,182 **** struct exception x; x.type = DOMAIN; x.type = SING; ! ], [LIBOBJS="$LIBOBJS tclMtherr.o"; AC_DEFINE(NEED_MATHERR)]) AC_OUTPUT(Makefile) --- 179,184 ---- struct exception x; x.type = DOMAIN; x.type = SING; ! ], [LIBOBJS="$LIBOBJS tclMtherr.o"; LIBSOBJS="$LIBSOBJS tclMtherr.so"; AC_DEFINE(NEED_MATHERR)]) AC_OUTPUT(Makefile) *** tclBasic.c:1.1.1.1 Tue Sep 27 15:49:29 1994 --- tclBasic.c Tue Sep 27 15:49:29 1994 *************** *** 35,40 **** --- 35,42 ---- # include "tclUnix.h" #endif + #include + /* * The following structure defines all of the commands in the Tcl core, * and the C procedures that execute them. *************** *** 276,281 **** --- 278,285 ---- error $msg\n\ }"; + fpsetround(FP_RN); + fpsetmask(0L); return Tcl_Eval(interp, initCmd); }