--- unix/Makefile.in.org	2006-04-28 13:14:01.000000000 -0700
+++ unix/Makefile.in	2006-04-28 13:38:04.000000000 -0700
@@ -56,7 +56,7 @@
 
 # To change the compiler switches, for example to change from -O
 # to -g, change the following line:
-CFLAGS = -O # -DINET6
+CFLAGS = -O -DBIND_8_COMPAT=1
 
 # NMICMPD should contain the full path to the installed nmicmpd binary.
 NMICMPD = $(BIN_INSTALL_DIR)/nmicmpd
@@ -175,7 +175,7 @@
 
 # Base command to use for combining object files into a shared
 # library:
-SHLIB_LD = @SHLIB_LD@
+SHLIB_LD = ${CC} -dynamiclib ${CFLAGS} ${LDFLAGS} ${TCL_LIB_SPEC} ${TK_LIB_SPEC} -Wl,-single_module
 
 # Suffix to use for the name of the shared library.  An empty string
 # means we don't know how to use shared libraries on this platform.
@@ -485,7 +485,7 @@
 	$(LD) $(LD_FLAGS) $(LD_SEARCH_FLAGS) -o scotty scotty.o $(TCL_LIB_SPEC) $(LIBS) $(DL_LIBS) -lm
 
 tnm$(SHLIB_SUFFIX): $(TNM_OBJS)
-	$(SHLIB_LD) $(TNM_OBJS) -o tnm$(SHLIB_SUFFIX) $(LIBS)
+	$(SHLIB_LD) $(TNM_OBJS) -o tnm$(SHLIB_SUFFIX) $(LIBS) $(X11_LIBS)
 
 tkined: tkined$(SHLIB_SUFFIX) $(UNIX_DIR)/tkined.in
 	@sed -e 's+%WISH%+$(TK_WISH)+' \
@@ -495,7 +495,7 @@
 	    $(UNIX_DIR)/tkined.in > tkined
 
 tkined$(SHLIB_SUFFIX): $(TKI_GENERIC_OBJS)
-	$(SHLIB_LD) $(TKI_GENERIC_OBJS) -o tkined$(SHLIB_SUFFIX) $(LIBS)
+	$(SHLIB_LD) $(TKI_GENERIC_OBJS) -o tkined$(SHLIB_SUFFIX) $(LIBS) $(X11_LIBS)
 
 test:
 	@echo
