If any person is confined in any county jail by authority of the United States or of any state or territory other than this state or any county other than the county in which the county jail is located, the sheriff or other person in charge of the jail, may charge and collect a sum fixed by the county in addition to the charges allowed by law for any person confined by authority of the county, a sum necessary to fully compensate and reimburse the county for money actually and necessarily expended for utilities and other expenses in the keeping of the person, including the expense of building depreciation, administration, and a reasonable charge for obsolescence of the facility and all other tangible and intangible costs, to the county. The amount of the expense shall be fixed by the board of county commissioners and collected by the sheriff or other person in charge of the county jail in the manner and at the time other charges provided by law are collected. Upon collection of the money, the money collected for building depreciation, and tangible and intangible costs may be deposited into a special jail building fund. Moneys in the special jail building fund may only be used to make capital improvements to the existing jail or for the building of a new jail.
SDCL 24-11-8