The attached patch provides a couple more compilation fixes by adding a Haiku section to the tcl.m4 script.
The section fixes a linker error where the networking symbols (such as socket(), inet_ntoa(), recv(), etc) are not found. Haiku provides them via -lnetwork. Additionally, this provides shared and dynamic library settings (e.g., dlopen() is in -lroot).
This is just a preliminary version that can probably be improved upon and expanded, but it results in a successful complete build.