# Core iocp package
package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ \
    [list apply [list {dir} {
        if {$::tcl_platform(machine) eq "amd64"} {
            set path [file join $dir amd64 "@PKG_LIB_FILE@"]
        } else {
            set path [file join $dir x86 "@PKG_LIB_FILE@"]
        }
        if {![file exists $path]} {
            # To accomodate make test
            set path [file join $dir "@PKG_LIB_FILE@"]
        }
        uplevel #0 [list load $path]
    }] $dir]

# iocp_inet doesn't need anything other than core iocp
package ifneeded @PACKAGE_NAME@_inet @PACKAGE_VERSION@ \
    "package require @PACKAGE_NAME@"

if {@ENABLE_BLUETOOTH@} {
    # iocp_bt needs supporting script files
    package ifneeded @PACKAGE_NAME@_bt @PACKAGE_VERSION@ \
        "[list source [file join $dir bt.tcl]]"
}

