aricb I hope someone will fill in a few more details here. Some questions I have are:

What are the popular compilers used for Tcl extensions on OS X? What Mac-specific compiler arguments should an extension writer be familiar with?

The MacOS X page mentions that Tk can be compiled to have a native Aqua look and feel, or it can be compiled to use X-Windows. Does an extension writer need to worry about this distinction, and if so, what does one do differently in each case?

DAS - for simple extensions, I would strongly recommend looking at critcl, building extensions with critcl -pkg is much easier than using TEA or a handwritten Makefile.

generally the compiler to use on MacOS X is gcc, which comes with the system. There are commercial compilers available as well if you have special requirements.

If you use recent TEA, as an extension builder you do not need to know whether you are building against TkAqua or TkX11, TEA will extract this info from the tkConfig.sh file. However, if you use X11 calls in your code, the resulting binary will be tied to the Tk variant you built against and will not load or crash if loaded in the other variant of Tk (best to check tk windowingsystem in pkgIndex.tcl before loading). This is because the extension built against TkAqua will use emulated X11 calls whereas the other one will use real X11.

[Dscho] This did not work too well for me: linking as described above would result in many unresolved symbols. However, replacing "-L /Libaray/Frameworks/Tcl.framework/ -ltclstub8.4" with "-framework Tcl" (which is more OSXish, and shorter) helped! So, it is: