Index: Makefile.in =================================================================== RCS file: /cvsroot/swig/SWIG/Makefile.in,v retrieving revision 1.81 diff -u -p -u -p -r1.81 Makefile.in --- Makefile.in 27 Apr 2004 23:00:36 -0000 1.81 +++ Makefile.in 7 May 2004 20:56:26 -0000 @@ -330,7 +330,7 @@ install: install-main install-lib instal install-main: @echo "Installing SWIG executable" @$(MKINSTDIRS) $(DESTDIR)$(BIN_DIR) - @echo "Installing $(BIN_DIR)/$(TARGET)" + @echo "Installing $(DESTDIR)$(BIN_DIR)/$(TARGET)" @$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(BIN_DIR)/$(TARGET) lib-languages = tcl perl5 python guile java mzscheme ruby php4 ocaml \ Index: configure.in =================================================================== RCS file: /cvsroot/swig/SWIG/configure.in,v retrieving revision 1.113 diff -u -p -u -p -r1.113 configure.in --- configure.in 12 Feb 2004 22:36:25 -0000 1.113 +++ configure.in 7 May 2004 20:56:26 -0000 @@ -194,6 +194,7 @@ then then CCSHARED="-fpic"; else CCSHARED="+z"; fi;; + *-*-darwin*) CCSHARED="-fno-common";; *-*-linux*) CCSHARED="-fpic";; *-*-freebsd* | *-*-openbsd*) CCSHARED="-fpic";; *-*-netbsd*) CCSHARED="-fPIC";; @@ -432,6 +433,8 @@ AC_SUBST(XLIBSW) TCLINCLUDE= TCLLIB= TCLPACKAGE= +TCLSTUBLIB= +TCL_DBGX= AC_ARG_WITH(tclconfig,[ --with-tclconfig=path Set location of tclConfig.sh], with_tclconfig="$withval") @@ -466,12 +469,16 @@ if test x"${TCLCONFIG}" = x ; then else AC_MSG_RESULT(found $TCLCONFIG/tclConfig.sh) . $TCLCONFIG/tclConfig.sh + TCL_DBGX=$TCL_DBGX if test -z "$TCLINCLUDE"; then - TCLINCLUDE=$ISYSTEM$TCL_PREFIX/include + TCLINCLUDE=$TCL_INCLUDE_SPEC fi if test -z "$TCLLIB"; then TCLLIB=$TCL_LIB_SPEC fi + if test -z "$TCLSTUBLIB"; then + TCLSTUBLIB=$TCL_STUB_LIB_SPEC + fi fi if test -z "$TCLINCLUDE"; then @@ -486,6 +493,12 @@ if test -z "$TCLLIB"; then fi fi +if test -z "$TCLSTUBLIB"; then + if test -n "$TCLPACKAGE"; then + TCLSTUBLIB="-L$TCLPACKAGE/lib -ltclstub" + fi +fi + AC_MSG_CHECKING(for Tcl header files) if test -z "$TCLINCLUDE"; then AC_TRY_CPP([#include ], , TCLINCLUDE="") @@ -513,6 +526,7 @@ for i in $dirs ; do if test -r $i/libtcl.a; then AC_MSG_RESULT($i) TCLLIB="-L$i -ltcl" + TCLSTUBLIB="-L$i -ltclstub" break fi done @@ -525,12 +539,14 @@ fi # Cygwin (Windows) needs the library for dynamic linking case $host in -*-*-cygwin* | *-*-mingw*) TCLDYNAMICLINKING="$TCLLIB";; +*-*-cygwin* | *-*-mingw* | *-*-darwin*) TCLDYNAMICLINKING="$TCLLIB";; *)TCLDYNAMICLINKING="";; esac AC_SUBST(TCLINCLUDE) AC_SUBST(TCLLIB) +AC_SUBST(TCLSTUBLIB) +AC_SUBST(TCL_DBGX) AC_SUBST(TCLDYNAMICLINKING) #---------------------------------------------------------------- @@ -1392,7 +1408,7 @@ AC_SUBST(CSHARPLIBRARYPREFIX) # Is this #---------------------------------------------------------------- SKIP_TCL= -if test -z "$TCLINCLUDE" || test -z "$TCLLIB" ; then +if test -z "$TCLINCLUDE" || test -z "$TCLLIB" || test "$TCLPACKAGE" = no ; then SKIP_TCL="1" fi AM_CONDITIONAL(SKIP_TCL, test -n "$SKIP_TCL") @@ -1400,7 +1416,7 @@ AC_SUBST(SKIP_TCL) SKIP_PERL5= -if test -z "$PERL" || test -z "$PERL5EXT" ; then +if test -z "$PERL" || test -z "$PERL5EXT" || test "$PERL" = no ; then SKIP_PERL5="1" fi AM_CONDITIONAL(SKIP_PERL5, test -n "$SKIP_PERL5") @@ -1408,7 +1424,7 @@ AC_SUBST(SKIP_PERL5) SKIP_PYTHON= -if test -z "$PYINCLUDE" || test -z "$PYLIB" ; then +if test -z "$PYINCLUDE" || test -z "$PYLIB" || test "$PYTHON" = no ; then SKIP_PYTHON="1" fi AM_CONDITIONAL(SKIP_PYTHON, test -n "$SKIP_PYTHON") @@ -1416,7 +1432,7 @@ AC_SUBST(SKIP_PYTHON) SKIP_JAVA= -if test -z "$JAVA" || test -z "$JAVAC" || test -z "$JAVAINC" ; then +if test -z "$JAVA" || test -z "$JAVAC" || test -z "$JAVAINC" || test "$JAVA" = no ; then SKIP_JAVA="1" fi AM_CONDITIONAL(SKIP_JAVA, test -n "$SKIP_JAVA") @@ -1424,14 +1440,14 @@ AC_SUBST(SKIP_JAVA) SKIP_GUILE= -if test -z "$GUILEINCLUDE" || test -z "$GUILELIB" || test -z "$GUILE_GH_INTERFACE"; then +if test -z "$GUILEINCLUDE" || test -z "$GUILELIB" || test -z "$GUILE_GH_INTERFACE" || test "$GUILE" = no ; then SKIP_GUILE="1" fi AM_CONDITIONAL(SKIP_GUILE, test -n "$SKIP_GUILE") AC_SUBST(SKIP_GUILE) SKIP_GUILESCM= -if test -z "$GUILEINCLUDE" || test -z "$GUILELIB" || test -z "$GUILE_SCM_INTERFACE"; then +if test -z "$GUILEINCLUDE" || test -z "$GUILELIB" || test -z "$GUILE_SCM_INTERFACE" || test "$GUILE" = no ; then SKIP_GUILESCM="1" fi AM_CONDITIONAL(SKIP_GUILESCM, test -n "$SKIP_GUILESCM") @@ -1447,7 +1463,7 @@ AC_SUBST(SKIP_MZSCHEME) SKIP_RUBY= -if test -z "$RUBY" || test -z "$RUBYINCLUDE" || test -z "$RUBYLIB" ; then +if test -z "$RUBY" || test -z "$RUBYINCLUDE" || test -z "$RUBYLIB" || test "$RUBY" = no ; then SKIP_RUBY="1" fi AM_CONDITIONAL(SKIP_RUBY, test -n "$SKIP_RUBY") @@ -1455,7 +1471,7 @@ AC_SUBST(SKIP_RUBY) SKIP_PHP4= -if test -z "$PHP4" || test -z "$PHP4INC" ; then +if test -z "$PHP4" || test -z "$PHP4INC" || test "$PHP4" = no ; then SKIP_PHP4="1" fi AM_CONDITIONAL(SKIP_PHP4, test -n "$SKIP_PHP4") @@ -1463,7 +1479,7 @@ AC_SUBST(SKIP_PHP4) SKIP_OCAML= -if test -z "$OCAMLBIN" || test -z "$OCAMLINC" ; then +if test -z "$OCAMLBIN" || test -z "$OCAMLINC" || test "$OCAMLBIN" = no ; then SKIP_OCAML="1" fi AM_CONDITIONAL(SKIP_OCAML, test -n "$SKIP_OCAML") @@ -1471,7 +1487,7 @@ AC_SUBST(SKIP_OCAML) SKIP_PIKE="1" # Always skipped! -if test -z "$PIKE" || test -z "$PIKEINCLUDE" ; then +if test -z "$PIKE" || test -z "$PIKEINCLUDE" || test "$PIKE" = no ; then SKIP_PIKE="1" fi AM_CONDITIONAL(SKIP_PIKE, test -n "$SKIP_PIKE") @@ -1479,7 +1495,7 @@ AC_SUBST(SKIP_PIKE) SKIP_CHICKEN= -if test -z "$CHICKEN" || test -z "$CHICKENHOME" || test -z "$CHICKENLIB" ; then +if test -z "$CHICKEN" || test -z "$CHICKENHOME" || test -z "$CHICKENLIB" || test "$CHICKEN" = no ; then SKIP_CHICKEN="1" fi AM_CONDITIONAL(SKIP_CHICKEN, test -n "$SKIP_CHICKEN") @@ -1487,10 +1503,10 @@ AC_SUBST(SKIP_CHICKEN) SKIP_CSHARP= -if test -z "$CSHARPCOMPILER" ; then +if test -z "$CSHARPCOMPILER" || test "$CSHARPCOMPILER" = no ; then SKIP_CSHARP="1" else - if test "cscc" = "$CSHARPCOMPILER" && test -z "$CSHARPCILINTERPRETER" ; then + if test "cscc" = "$CSHARPCOMPILER" && test -z "$CSHARPCILINTERPRETER" || test "$CSHARPCILINTERPRETER" = no ; then SKIP_CSHARP="1" fi fi Index: Examples/Makefile.in =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/Makefile.in,v retrieving revision 1.45 diff -u -p -u -p -r1.45 Makefile.in --- Examples/Makefile.in 19 Mar 2004 11:45:22 -0000 1.45 +++ Examples/Makefile.in 7 May 2004 20:56:26 -0000 @@ -92,6 +92,8 @@ TCL_DLNK = @TCLDYNAMICLINKING@ TCL_LDSHARED = @TCL_LDSHARED@ TCL_CXXSHARED = @TCL_CXXSHARED@ TCL_SO = @TCL_SO@ +TCL_STUBLIB = @TCLSTUBLIB@ +TCL_DBGX = @TCL_DBGX@ # ----------------------------------------------------------- # Build a new version of the tclsh shell @@ -124,38 +126,38 @@ wish_cpp: $(SRCS) $(XINCLUDE) $(TCL_LIB) $(TK_OPTS) $(XLIB) $(LIBS) $(SYSLIBS) -o $(TARGET) # ----------------------------------------------------------- -# Build a Tcl dynamic loadable module (you might need to tweak this) +# Build a stubified Tcl dynamic loadable module (you might need to tweak this) # ----------------------------------------------------------- tcl: $(SRCS) $(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE) - $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) - $(TCL_LDSHARED) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) -o $(TARGET)$(TCL_SO) + $(CC) -c -DUSE_TCL_STUBS $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) + $(TCL_LDSHARED) $(OBJS) $(IOBJS) $(TCL_STUBLIB) $(LIBS) -o $(TARGET)$(TCL_SO) # ----------------------------------------------------------- -# Build a Tcl7.5 dynamic loadable module for C++ +# Build a stubified Tcl dynamic loadable module for C++ # ----------------------------------------------------------- tcl_cpp: $(SRCS) $(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE) - $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) - $(TCL_CXXSHARED) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(TCL_SO) + $(CXX) -c -DUSE_TCL_STUBS $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) + $(TCL_CXXSHARED) $(OBJS) $(IOBJS) $(TCL_STUBLIB) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(TCL_SO) # ----------------------------------------------------------- -# Build a Tcl7.5 dynamic loadable module, linked against SWIG runtime lib +# Build a stubified Tcl dynamic loadable module, linked against SWIG runtime lib # ----------------------------------------------------------- TCL_RUNTIME=-L$(RUNTIMEDIR) -lswigtcl8@release_suffix@ tcl_multi: $(SRCS) $(SWIG) -noruntime -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE) - $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) - $(TCL_LDSHARED) $(OBJS) $(IOBJS) $(TCL_RUNTIME) $(TCL_DLNK) $(LIBS) -o $(TARGET)$(TCL_SO) + $(CC) -c -DUSE_TCL_STUBS $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) + $(TCL_LDSHARED) $(OBJS) $(IOBJS) $(TCL_RUNTIME) $(TCL_STUBLIB) $(LIBS) -o $(TARGET)$(TCL_SO) tcl_multi_cpp: $(SRCS) $(SWIG) -noruntime -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE) - $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) - $(TCL_CXXSHARED) $(OBJS) $(IOBJS) $(TCL_RUNTIME) $(TCL_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(TCL_SO) + $(CXX) -c -DUSE_TCL_STUBS $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) + $(TCL_CXXSHARED) $(OBJS) $(IOBJS) $(TCL_RUNTIME) $(TCL_STUBLIB) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(TCL_SO) # ----------------------------------------------------------------- # Cleaning the Tcl examples Index: Runtime/Makefile.am =================================================================== RCS file: /cvsroot/swig/SWIG/Runtime/Makefile.am,v retrieving revision 1.22 diff -u -p -u -p -r1.22 Makefile.am --- Runtime/Makefile.am 28 Mar 2004 20:04:25 -0000 1.22 +++ Runtime/Makefile.am 7 May 2004 20:56:28 -0000 @@ -47,10 +47,11 @@ TCL_INCLUDE = @TCLINCLUDE@ TCL_RUNTIME = $(SWIGLIB)/tcl/swigtcl8.swg TCL_PRECOMMON = $(SWIGLIB)/tcl/precommon.swg TCL_DLNK = @TCLDYNAMICLINKING@ +TCL_STUBLIB = @TCLSTUBLIB@ libswigtcl8_la_SOURCES = libtcl8.c -libswigtcl8_la_LDFLAGS = @LIBTOOL_NO_UNDEFINED@ $(RELEASE_SUFFIX_LIBTOOL) $(TCL_DLNK) -libswigtcl8_la_CFLAGS = $(TCL_INCLUDE) +libswigtcl8_la_LDFLAGS = @LIBTOOL_NO_UNDEFINED@ $(RELEASE_SUFFIX_LIBTOOL) +libswigtcl8_la_CFLAGS = -DUSE_TCL_STUBS $(TCL_INCLUDE) libtcl8.c: $(TCL_PRECOMMON) $(SWIG_TYPECHECK) $(TCL_RUNTIME) ../preinst-swig -tcl -runtime -o libtcl8.c swigrun.i