The California elevator code (
http://ia700308.us.archive.org/9/items/gov.ca.elevator/ca_elevator.pdf) says:
Machine Rooms and Machinery Spaces.
7?3011.
(a) Enclosure of Machine Rooms and Machinery Spaces.
The enclosure shall be building walls, ceiling material, and fireproofing
conforming to the governing building codes. The material
and height limitations outlined in this section establish the
minimum standards for machine room enclosures. These regulations
are not intended to supersede applicable local building codes
establishing higher standards.
1. Elevator driving machines, motor generator sets, controllers,
and auxiliary control equipment shall be installed in a room
or enclosure set aside for that purpose.
(I think this is modeled on the ASME A17.1.)
Each jurisdiction may vary, but I've never seen an elevator in modern construction without one.