When a joint road camp, and the prisoners thereof, are employed in the construction or maintenance of any county way, road or public work, the total expense of maintenance, operation and supervision, of said camp, and the compensation of the prisoners thereof shall be paid for from any funds which may be available for the construction or maintenance of such road, highway or other public works on which said prisoners are employed, or from the county general fund upon a four-fifths vote of the board of supervisors of said county.