Index: configure.in =================================================================== RCS file: /home/cvs/tclkit/configure.in,v retrieving revision 1.1 diff -u -p -u -p -r1.1 configure.in --- configure.in 14 Feb 2005 10:16:12 -0000 1.1 +++ configure.in 4 Jun 2005 10:41:31 -0000 @@ -71,8 +71,7 @@ TEA_SETUP_COMPILER # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- -TEA_ADD_SOURCES([src/winMain.c - src/kitInit.c +TEA_ADD_SOURCES([src/kitInit.c src/pwb.c src/rechan.c]) TEA_ADD_HEADERS([]) @@ -101,7 +100,7 @@ TEA_ADD_TCL_SOURCES([]) if test "${TEA_PLATFORM}" = "windows" ; then AC_DEFINE(BUILD_kit) CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch" - #TEA_ADD_SOURCES([win/winFile.c]) + TEA_ADD_SOURCES([src/winMain.c]) #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) else CLEANFILES="pkgIndex.tcl" Index: genkit =================================================================== RCS file: /home/cvs/tclkit/genkit,v retrieving revision 1.67 diff -u -p -u -p -r1.67 genkit --- genkit 14 Feb 2005 10:16:12 -0000 1.67 +++ genkit 4 Jun 2005 10:41:32 -0000 @@ -31,7 +31,7 @@ if {![info exists env(TCL_LIBRARY)]} { # # The idea is quite straightforward: # - the X array is set up so "$X(anything)" defaults to "anything" -# - the Z array is set up so "$X(anything)" defaults to "" +# - the Z array is set up so "$Z(anything)" defaults to "" # - i.e. "$X(foo)" defaults to "foo" and "$Z(foo)" defaults to "" # - then for each platform, we can add overrides to alter defaults # @@ -57,9 +57,18 @@ if {![info exists env(TCL_LIBRARY)]} { Windows* { array set Z {s s .exe .exe} array set X {. "" unix win tclsh8.4 tclsh84s.exe} } Darwin { array set Z {tclmakesuff - {GENERIC_FLAGS=-UHAVE_STRTOLL\ -UHAVE_STRTOULL\ -UHAVE_LANGINFO \ - COMPAT_OBJS=strtoll.o\ strtoull.o} \ - stripopt -x}} + {CFLAGS_OPTIMIZE=-mcpu=G3\ -mtune=G4\ -gfull\ -Os \ + CC_SWITCHES=\$(STUB_CC_SWITCHES)\ -mdynamic-no-pic \ + LDFLAGS_OPTIMIZE=-Wl,-dead_strip,-s} + stripopt -x + tkdynmakesuff {-o wish TK_SHLIB_LD_EXTRAS=}} + array set X {make + {make SHLIB_LD=cc\ -bundle\ \$(LDFLAGS)}} + if {[info exists env(TCLKIT_AQUA)] && "$env(TCLKIT_AQUA)" eq "1"} { + append Z(tkdynmakesuff) { \ + TK_SHLIB_LD_EXTRAS=-sectcreate\ __TEXT\ __tk_rsrc\ \$\(TK_RSRC_FILE\)} + set Z(tkconfig) --enable-aqua + }} default { array set X {} } } @@ -203,9 +212,10 @@ if {![info exists env(TCL_LIBRARY)]} { # run a configure script proc config {dir args} { + if {![file exists Makefile]} { eval [list run sh [file join ../../../src $dir configure] \ --prefix=$::P/noarch --exec-prefix=$::I] $args - } + }} # parse and load tcl/tk config files into global vars proc loadconf {name} { @@ -430,17 +440,19 @@ namespace eval commands { } tk { - config tk/$X(unix) --with-tcl=$B/tcl --disable-shared + config tk/$X(unix) --with-tcl=$B/tcl --disable-shared $Z(tkconfig) #run $X(make) genstubs eval run $X(make) binaries LD_SEARCH_FLAGS= CC_SEARCH_FLAGS= TK_LIBRARY= } tkdyn { - config tk/unix --with-tcl=$B/tcl + config tk/unix --with-tcl=$B/tcl $Z(tkconfig) #run $X(make) genstubs - eval run $X(make) binaries LD_SEARCH_FLAGS= CC_SEARCH_FLAGS= TK_LIBRARY= + close [open wish w] + eval run $X(make) binaries LD_SEARCH_FLAGS= CC_SEARCH_FLAGS= TK_LIBRARY= \ + $Z(tkdynmakesuff) file mkdir $I - eval run $X(make) install-binaries + eval run $X(make) install-binaries $Z(tkdynmakesuff) # don't keep the installed wish, just the shared lib file delete $I/bin/wish8.4 # results have been installed so shared lib can be packaged later @@ -514,7 +526,8 @@ namespace eval commands { append target $Z(.exe) eval run $X(gcc) -c $O $D $TCL_DEFS $TCL_CFLAGS_OPTIMIZE \ - [glob src/*.c] [list $S/tcl/unix/tclAppInit.c] + [lsearch -all -inline -exact -not [glob src/*.c] src/winMain.c] \ + [list $S/tcl/unix/tclAppInit.c] eval run $X(g++) -o $target [glob *.o] $L run strip $target