diff -Nurd -x'*~' blt2.4z.orig/Makefile.in blt2.4z/Makefile.in
--- blt2.4z.orig/Makefile.in	2002-02-18 19:11:43.000000000 -0500
+++ blt2.4z/Makefile.in	2008-08-27 21:14:50.000000000 -0400
@@ -47,9 +47,9 @@
 	(cd library; $(MAKE) install)
 	(cd man; $(MAKE) install)
 	(cd demos; $(MAKE) install)
-	$(INSTALL_DATA) $(srcdir)/README $(INSTALL_DIR)$(scriptdir)
-	$(INSTALL_DATA) $(srcdir)/PROBLEMS $(INSTALL_DIR)$(scriptdir)
-	$(INSTALL_DATA) $(srcdir)/NEWS $(INSTALL_DIR)$(scriptdir)
+	$(INSTALL_DATA) $(srcdir)/README $(INSTALL_ROOT)$(scriptdir)
+	$(INSTALL_DATA) $(srcdir)/PROBLEMS $(INSTALL_ROOT)$(scriptdir)
+	$(INSTALL_DATA) $(srcdir)/NEWS $(INSTALL_ROOT)$(scriptdir)
 
 mkdirs:
 	@for i in $(instdirs) ; do \
diff -Nurd -x'*~' blt2.4z.orig/configure blt2.4z/configure
--- blt2.4z.orig/configure	2002-10-04 01:33:59.000000000 -0400
+++ blt2.4z/configure	2008-08-27 21:50:54.000000000 -0400
@@ -3396,6 +3396,9 @@
   *-hpux*)
     SHLIB_SUFFIX="sl"
     ;;
+  *-darwin*)
+    SHLIB_SUFFIX="dylib"
+    ;;
   *)
     SHLIB_SUFFIX="so"
     ;;
@@ -3851,7 +3854,7 @@
 SHLIB_LD_FLAGS="$TCL_LD_FLAGS"
 SHLIB_RUNPATH="$TCL_LD_SEARCH_FLAGS"
 
-SHLIB_SUFFIX=".so"
+SHLIB_SUFFIX=".${SHLIB_SUFFIX}"
 SHLIB_TARGET=""
 SHLIB_CFLAGS=""
 SHLIB_LIB_SPECS="${JPEG_LIB_SPEC}"
@@ -4000,7 +4003,6 @@
       SHLIB_CFLAGS="+Z"
       SHLIB_LD="ld"
       SHLIB_LD_FLAGS="-b -E -n +s +b,${loader_run_path}:."
-      SHLIB_SUFFIX=".sl"
 
       # The run path is included in both LDFLAGS and SHLIB_LD_FLAGS
       # because SHLIB_LD is ld and LD is cc/gcc.
@@ -4208,6 +4210,9 @@
     SHLIB_LD_FLAGS=" -Wl,-Bexport"
     ;;
   
+  *-darwin*)
+    ;;
+
   *)
     build_shared="no"
     ;;
diff -Nurd -x'*~' blt2.4z.orig/library/Makefile.in blt2.4z/library/Makefile.in
--- blt2.4z.orig/library/Makefile.in	2002-07-14 19:33:24.000000000 -0400
+++ blt2.4z/library/Makefile.in	2008-08-27 21:00:45.000000000 -0400
@@ -58,7 +58,7 @@
 	for i in $(miscFiles) ; do \
 	    $(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_ROOT)$(scriptdir) ; \
 	done 
-	$(INSTALL_DATA) pkgIndex.tcl $(scriptdir)
+	$(INSTALL_DATA) pkgIndex.tcl $(INSTALL_ROOT)$(scriptdir)
 
 mkdirs:
 	@for i in $(instdirs) ; do \
diff -Nurd -x'*~' blt2.4z.orig/library/pkgIndex.tcl.in blt2.4z/library/pkgIndex.tcl.in
--- blt2.4z.orig/library/pkgIndex.tcl.in	2002-07-14 19:33:24.000000000 -0400
+++ blt2.4z/library/pkgIndex.tcl.in	2008-08-27 21:53:36.000000000 -0400
@@ -10,9 +10,9 @@
     # the "lite" tcl-only version.
     
     if { [info commands tk] == "tk" } {
-        set name ${prefix}BLT${version_no_dots}${suffix}
+        set name ${prefix}BLT.2${suffix}
     } else {
-        set name ${prefix}BLTlite${version_no_dots}${suffix}
+        set name ${prefix}BLTlite.2${suffix}
     }
     
     global tcl_platform
diff -Nurd -x'*~' blt2.4z.orig/src/bltHash.c blt2.4z/src/bltHash.c
--- blt2.4z.orig/src/bltHash.c	2002-08-09 03:15:18.000000000 -0400
+++ blt2.4z/src/bltHash.c	2008-08-27 19:04:43.000000000 -0400
@@ -1302,7 +1302,7 @@
     sprintf(result, "%ld entries in table, %ld buckets\n",
 	    tablePtr->numEntries, tablePtr->numBuckets);
 #else 
-    sprintf(result, "%d entries in table, %d buckets\n",
+    sprintf(result, "%zd entries in table, %zd buckets\n",
 	    tablePtr->numEntries, tablePtr->numBuckets);
 #endif
     p = result + strlen(result);
@@ -1311,7 +1311,7 @@
 	sprintf(p, "number of buckets with %ld entries: %ld\n",
 		i, count[i]);
 #else 
-	sprintf(p, "number of buckets with %d entries: %d\n",
+	sprintf(p, "number of buckets with %zd entries: %zd\n",
 		i, count[i]);
 #endif
 	p += strlen(p);
@@ -1320,7 +1320,7 @@
     sprintf(p, "number of buckets with %d or more entries: %ld\n",
 	    NUM_COUNTERS, overflow);
 #else 
-    sprintf(p, "number of buckets with %d or more entries: %d\n",
+    sprintf(p, "number of buckets with %d or more entries: %zd\n",
 	    NUM_COUNTERS, overflow);
 #endif
     p += strlen(p);
@@ -1329,7 +1329,7 @@
 #if SIZEOF_VOID_P == 8
     sprintf(p, "maximum search distance for entry: %ld", max);
 #else
-    sprintf(p, "maximum search distance for entry: %d", max);
+    sprintf(p, "maximum search distance for entry: %zd", max);
 #endif
     return result;
 }
diff -Nurd -x'*~' blt2.4z.orig/src/shared/Makefile.in blt2.4z/src/shared/Makefile.in
--- blt2.4z.orig/src/shared/Makefile.in	2002-05-14 17:37:19.000000000 -0400
+++ blt2.4z/src/shared/Makefile.in	2008-08-27 22:01:37.000000000 -0400
@@ -120,8 +120,8 @@
 LN_S =		@LN_S@
 bltwish =	bltwish$(version)
 bltsh =		bltsh$(version)
-lib_so =	libBLT$(version)$(SHLIB_SUFFIX)
-tcl_only_lib_so = libBLTlite$(version)$(SHLIB_SUFFIX)
+lib_so =	libBLT.2$(SHLIB_SUFFIX)
+tcl_only_lib_so = libBLTlite.2$(SHLIB_SUFFIX)
 
 all: build_lib build_demo
 
@@ -144,19 +144,19 @@
 	$(CC) -c $(CC_SWITCHES) -DBLT_LIBRARY=\"$(scriptdir)\" \
 		$(srcdir)/bltInit.c
 	$(RM) $@
-	$(SHLIB_LD) $(SHLIB_LD_FLAGS) -o $@ bltInit.o $(OBJS) \
-		$(SHLIB_LIB_SPECS)
+	$(SHLIB_LD) $(SHLIB_LD_FLAGS) -o $@ -install_name $(libdir)/$@ -compatibility_version 2.0 -current_version 2.4 bltInit.o $(OBJS) \
+		$(SHLIB_LIB_SPECS) $(LIBS)
 
 $(tcl_only_lib_so): $(TCL_ONLY_OBJS)
 	$(CC) -c $(CC_SWITCHES) -DTCL_ONLY -DBLT_LIBRARY=\"$(scriptdir)\" \
 		$(srcdir)/bltInit.c
 	$(RM) $@
-	$(SHLIB_LD) $(SHLIB_LD_FLAGS) -o $@ bltInit.o $(TCL_ONLY_OBJS) \
-		$(SHLIB_TCL_ONLY_LIB_SPECS)
+	$(SHLIB_LD) $(SHLIB_LD_FLAGS) -o $@ -install_name $(libdir)/$@ -compatibility_version 2.0 -current_version 2.4 bltInit.o $(TCL_ONLY_OBJS) \
+		$(SHLIB_TCL_ONLY_LIB_SPECS) $(TCL_ONLY_LIB_SPECS)
 
 install: mkdirs install-lib install-demo
 
-install-demo: $(bltwish)
+install-demo: $(bltwish) $(bltsh)
 	$(INSTALL) -m 0755 bltwish$(version) $(INSTALL_ROOT)$(bindir)
 	$(INSTALL) -m 0755 bltsh$(version) $(INSTALL_ROOT)$(bindir)
 
diff -r -u blt2.4z.orig/src/bltTree.c blt2.4z/src/bltTree.c
--- blt2.4z.orig/src/bltTree.c	2002-09-29 07:44:12.000000000 +0200
+++ blt2.4z/src/bltTree.c	2004-11-05 12:27:45.797366712 +0100
@@ -95,17 +95,16 @@
  */
 
 #define REBUILD_MULTIPLIER	3
+#define START_LOGSIZE		5 /* Initial hash table size is 32. */
+#define MAX_LIST_VALUES		20 /* Convert to hash table when node
+				    * value list gets bigger than this
+				    * many values. */
 
 #if (SIZEOF_VOID_P == 8)
 #define RANDOM_INDEX(i)		HashOneWord(mask, downshift, i)
 #define BITSPERWORD		64
 #else 
 
-#define START_LOGSIZE		5 /* Initial hash table size is 32. */
-#define MAX_LIST_VALUES		20 /* Convert to hash table when node
-				    * value list gets bigger than this
-				    * many values. */
-
 /*
  * The following macro takes a preliminary integer hash value and
  * produces an index into a hash tables bucket list.  The idea is
