# Tcl package index file, version 1.0

proc Blt_MakePkgIndex { dir } {
    set suffix [info sharedlibextension]
    set version 2.4
    regsub {\.} $version {} version_no_dots
    foreach lib {  } {
	catch { load ${lib}${suffix} BLT }
    }
    # Determine whether to load the normal BLT library or 
    # the "lite" tcl-only version.
    if {[package vcompare [info tclversion] 8.2] < 0} {
      set taillib ${version}.so.8.0
    } else {
      if {[package vcompare [info tclversion] 8.3] < 0} {
        set taillib ${version}.so.8.2
      } else {
        set taillib ${version}.so.8.3
      }
    }
    if { [info commands tk] == "tk" } {
        set library BLT.${taillib}
    } else {
        set library BLTlite.${taillib}
    }
    global tcl_platform
    if { $tcl_platform(platform) == "unix" } {
	set library [file join [file dirname $dir] lib${library}]
    } 
    package ifneeded BLT ${version} [list load $library BLT]
}

Blt_MakePkgIndex $dir
rename Blt_MakePkgIndex ""
