--- blt2.4z/configure	Fri Oct  4 05:33:59 2002
+++ blt2.4z-patched/configure	Wed Oct 30 10:10:52 2002
@@ -3401,8 +3401,8 @@
     ;;
 esac
 
-TCL_LIB_DIR="${TCL_SRC_DIR}/$blt_platform"
-TK_LIB_DIR="${TK_SRC_DIR}/$blt_platform"
+TCL_LIB_DIR="${prefix}/lib"
+TK_LIB_DIR="${prefix}/lib"
 
 if test "x${blt_with_tcl_libraries}" != "x" ; then
   for libname in \

--- blt2.4z/Makefile.in	Tue Feb 19 00:11:43 2002
+++ blt2.4z-patched/Makefile.in	Wed Oct 30 14:40:45 2002
@@ -6,12 +6,12 @@
 #       Source and target installation directories
 # ------------------------------------------------------------------------
 
-prefix =	@prefix@
-exec_prefix  =	@exec_prefix@
+prefix =	@install_prefix@
+exec_prefix  =	@install_prefix@
 srcdir =	@srcdir@
-bindir =	@bindir@
-includedir =	@includedir@
-libdir =	@libdir@
+bindir =	@install_prefix@/bin
+includedir =	@install_prefix@/include
+libdir =	@install_prefix@/lib
 version =	@BLT_VERSION@
 scriptdir =	$(prefix)/lib/blt$(version)
 
--- blt2.4z/demos/Makefile.in	Tue Feb 19 00:11:46 2002
+++ blt2.4z-patched/demos/Makefile.in	Wed Oct 30 14:41:01 2002
@@ -2,10 +2,10 @@
 # 	Makefile for demos 
 # ------------------------------------------------------------------------
 
-prefix =	@prefix@
-exec_prefix =	@exec_prefix@
+prefix =	@install_prefix@
+exec_prefix =	@install_prefix@
 version =	@BLT_VERSION@
-libdir =	@libdir@
+libdir =	@install_prefix@/lib
 scriptdir =	$(prefix)/lib/blt$(version)
 destdir =	$(scriptdir)/demos
 srcdir =	@srcdir@

--- blt2.4z/src/Makefile.in	Mon Jul 15 09:31:29 2002
+++ blt2.4z-patched/src/Makefile.in	Wed Oct 30 14:42:51 2002
@@ -20,13 +20,13 @@
 # 	Source and targer installation directories 
 # ------------------------------------------------------------------------
 
-bindir =	$(exec_prefix)/bin
-exec_prefix =	@exec_prefix@
+bindir =	@install_prefix@/bin
+exec_prefix =	@install_prefix@
 incdir =	$(prefix)/include
-libdir = 	@libdir@
+libdir = 	@install_prefix@/lib
 scriptdir =	$(exec_prefix)/lib
 
-prefix =	@prefix@
+prefix =	@install_prefix@
 srcdir =	@srcdir@
 
 instdirs =	$(prefix) $(exec_prefix) $(bindir) $(libdir) $(incdir)

--- blt2.4z/library/Makefile.in	Sun Jul 14 23:33:24 2002
+++ blt2.4z-patched/library/Makefile.in	Thu Oct 31 01:09:22 2002
@@ -2,13 +2,14 @@
 # 	Makefile for library files and directories of BLT library
 # ------------------------------------------------------------------------
 
-prefix       = @prefix@
-exec_prefix  = @exec_prefix@
+prefix       = @install_prefix@
+exec_prefix  = @install_prefix@
 version      = @BLT_VERSION@
 lib_prefix    = @BLT_LIB_PREFIX@
 srcdir       = @srcdir@
-libdir       = @libdir@
-scriptdir    = @BLT_LIBRARY@
+libdir       = @install_prefix@/lib
+scriptdir    = @install_prefix@/lib/blt2.4
+instlibdir    = @libdir@
 
 INSTALL      = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -47,7 +48,7 @@
 	rm -f pkgIndex.tcl
 	sed -e 's/%VERSION%/$(version)/' $(srcdir)/pkgIndex.tcl.in | \
 	sed -e 's/%LIB_PREFIX%/$(lib_prefix)/' | \
-	sed -e 's;%LIB_DIR%;$(libdir);' > pkgIndex.tcl
+	sed -e 's;%LIB_DIR%;$(instlibdir);' > pkgIndex.tcl
 
 
 install: mkdirs pkgIndex

--- blt2.4z/man/Makefile.in	Tue Feb 19 00:11:46 2002
+++ blt2.4z-patched/man/Makefile.in	Thu Oct 31 08:49:52 2002
@@ -10,7 +10,7 @@
 
 instdirs	= $(mandir) $(mandir)/mann $(mandir)/man3
 
-MAN_N		= BLT.n barchart.n beep.n bgexec.n bitmap.n \
+MAN_N		= BLT.n barchart.n beep.n bgexec.n \
 		  bltdebug.n busy.n container.n cutbuffer.n \
 		  dragdrop.n eps.n graph.n hierbox.n  \
 		  hiertable.n htext.n spline.n stripchart.n \

--- blt2.4z/src/shared/Makefile.in	Tue May 14 21:37:19 2002
+++ blt2.4z-patched/src/shared/Makefile.in	Thu Oct 31 18:43:05 2002
@@ -2,7 +2,7 @@
 # 	Makefile for shared version of BLT library
 # ------------------------------------------------------------------------
 
-SHLIB_SUFFIX =	@SHLIB_SUFFIX@
+SHLIB_SUFFIX =	.dylib
 version =	@BLT_MAJOR_VERSION@@BLT_MINOR_VERSION@
 
 # ------------------------------------------------------------------------
@@ -20,11 +20,12 @@
 SHLIB_LD =	@SHLIB_LD@
 LDFLAGS =	@LDFLAGS@ @LD_RUN_PATH@
 
-prefix =	@prefix@
-exec_prefix =	@exec_prefix@
-libdir =	@libdir@
+prefix =	@install_prefix@
+exec_prefix =	@install_prefix@
+libdir =	@install_prefix@/lib
 bindir =	$(exec_prefix)/bin
 srcdir =	@srcdir@/..
+instlibdir =    @libdir@
 
 instdirs =	$(exec_prefix) $(libdir) 
 
@@ -120,8 +121,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,25 +145,25 @@
 	$(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 libBLT.2.4.dylib -install_name $(instlibdir)/$@ -compatibility_version 2.0 -current_version 2.4 bltInit.o $(OBJS) \
+		$(LIBS) ; $(LN_S) libBLT.2.4.dylib $(lib_so)
 
 $(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 libBLTlite.2.4.dylib -install_name $(instlibdir)/$@ -compatibility_version 2.0 -current_version 2.4 bltInit.o $(TCL_ONLY_OBJS) \
+		$(TCL_ONLY_LIB_SPECS) ; $(LN_S) libBLTlite.2.4.dylib $(tcl_only_lib_so)
 
 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)
 
 install-lib: $(lib_so) $(tcl_only_lib_so)
-	$(INSTALL) -m 0755 $(lib_so) $(INSTALL_ROOT)$(libdir)
-	$(INSTALL) -m 0755 $(tcl_only_lib_so) $(INSTALL_ROOT)$(libdir)
+	$(INSTALL) -m 0755 libBLT.2.4.dylib $(INSTALL_ROOT)$(libdir)
+	$(INSTALL) -m 0755 libBLTlite.2.4.dylib $(INSTALL_ROOT)$(libdir)
 
 mkdirs:
 	@for i in $(instdirs) ; do \

--- blt2.4z/library/pkgIndex.tcl.in	Sun Jul 14 23:33:24 2002
+++ blt2.4z-patched/library/pkgIndex.tcl.in	Thu Oct 31 18:49:33 2002
@@ -10,9 +10,9 @@
     # the "lite" tcl-only version.
     
     if { [info commands tk] == "tk" } {
-        set name ${prefix}BLT${version_no_dots}${suffix}
+        set name libBLT.2.dylib
     } else {
-        set name ${prefix}BLTlite${version_no_dots}${suffix}
+        set name libBLTlite.2.dylib
     }
     
     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	2005-11-10 18:20:37.000000000 -0500
@@ -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;
 }
