I've seen it done with surveyor's transits.
There might be somebody on the discussion group who could say whether or not some of the current laser alignment tools could do the task (and the cost involved). You might post this on the "Machines & Machining Engineering" group for lasers.
Or it might be as simple as snapping a chalk line.
You should better define your parameters: length of machine line, accuracy required, etc. And whether or not you have any type of locatable datum on your machines for reference.
TygerDawg