English has a number of similar metaphors: on the level, level playing field, being straight with someone, to square it with someone, to get a square deal, or to get some matter squared away. All relate to the idea that a well-built building will be orthogonal in its construction. A poorly constructed building will often be crooked, the same word English uses to connote deception or dishonesty.
Such phrases are sometimes related to Freemasonry, particularly as expressed in the 1854 poem "We meet upon the level, and we part upon the square," but it seems likely that their origins are much older.
The Cheers sign is an ironic reference, a sign that could have been displayed in 19th century saloons, which might have dishonest employees as well as connections to gambling and prostitution. It refers not to the shape of the room or building, but to the behavior of employees and patrons. The owner is claiming he wishes to be informed if an employee is suspected of watering the drinks or short-changing a customer.
It comes from the expression "fair and square."
"The meaning of ‘fair’ is acceptable or right. In this expression, ‘square’ means true and honest. People started using ‘square’ in this way in the 16th century. It originated from the idea that a square has perfect straight sides – the opposite of crooked.
The first time this expression was recorded was in 1604 in Francis Bacon’s essay Of Prophecies: “Faire, and square. The gamester calls fooles holy-day.”