Index: configure.in =================================================================== RCS file: /cvsroot/swig/SWIG/configure.in,v retrieving revision 1.137 diff -u -p -u -p -r1.137 configure.in --- configure.in 1 Jun 2005 20:38:48 -0000 1.137 +++ configure.in 3 Jun 2005 23:16:50 -0000 @@ -172,6 +172,7 @@ then then CCSHARED="-fpic"; else CCSHARED="+z"; fi;; + *-*-darwin*) CCSHARED="-fno-common";; *-*-linux*) CCSHARED="-fpic";; *-*-freebsd* | *-*-openbsd*) CCSHARED="-fpic";; *-*-netbsd*) CCSHARED="-fPIC";; @@ -402,6 +403,8 @@ AC_ARG_WITH(alllang, AS_HELP_STRING([--w TCLINCLUDE= TCLLIB= TCLPACKAGE= +TCLSTUBLIB= +TCL_DBGX= AC_ARG_WITH(tclconfig, AS_HELP_STRING([--without-tcl], [Disable Tcl]) AS_HELP_STRING([--with-tclconfig=path], [Set location of tclConfig.sh]), @@ -442,12 +445,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 @@ -462,6 +469,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="") @@ -489,6 +502,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 @@ -501,13 +515,15 @@ fi # Cygwin (Windows) needs the library for dynamic linking case $host in -*-*-cygwin* | *-*-mingw*) TCLDYNAMICLINKING="$TCLLIB";; +*-*-cygwin* | *-*-mingw* | *-*-darwin*) TCLDYNAMICLINKING="$TCLLIB";; *)TCLDYNAMICLINKING="";; esac fi AC_SUBST(TCLINCLUDE) AC_SUBST(TCLLIB) +AC_SUBST(TCLSTUBLIB) +AC_SUBST(TCL_DBGX) AC_SUBST(TCLDYNAMICLINKING) #---------------------------------------------------------------- @@ -1495,41 +1511,41 @@ AC_SUBST(CSHARPSO) #---------------------------------------------------------------- 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 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 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 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 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 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 AC_SUBST(SKIP_GUILESCM) @@ -1543,45 +1559,45 @@ 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 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 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 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 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 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.54 diff -u -p -u -p -r1.54 Makefile.in --- Examples/Makefile.in 17 Mar 2005 07:28:17 -0000 1.54 +++ Examples/Makefile.in 3 Jun 2005 23:16:50 -0000 @@ -93,6 +93,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 @@ -125,22 +127,22 @@ 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 $(LIBPREFIX)$(TARGET)$(TCL_SO) + $(CC) -c -DUSE_TCL_STUBS $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) + $(TCL_LDSHARED) $(OBJS) $(IOBJS) $(TCL_STUBLIB) $(LIBS) -o $(LIBPREFIX)$(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 $(LIBPREFIX)$(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 $(LIBPREFIX)$(TARGET)$(TCL_SO) # ----------------------------------------------------------------- # Cleaning the Tcl examples