the drain usually is 12 in from the wall
so whatever toilet you buy has to follow that. However, you can get a more rounded toilet that does not protrude as much. For example this one:
This is 24 inches deep, much shorter than the more standard depth of about 29 in.