Section 2. That the location, the building and equipment of said houses of detention shall be with the approval of the mayor of the city, the chief of the department of public safety, the president of the board of inspectors of the county prison and their prison agent.