all the versions of the iMac G4 have a headphone/optical digital audio out port and an audio line in port.
or did I miss something?
The CD player, with a limited life expectancy, I would look around for a replacement superdrive for that machine. You might try macsales.com.
Installation is real easy on the iMac G5.
My two current iMac annoyances are:
1) When I insert an audio CD the player into my iMac's superdrive (Matshita DVD-R UJ-846) it initially revs up with a fair amount of noise, but because this is very short it's tolerable. Then it comes up in iTunes and I can start play by clicking one of the tracks. However, if I stop it later and restart it, the "rev up" noise comes on again and STAYS ON -- very annoying. The only way to stop it is to eject the disk and start it up from scratch again.
2) Previous models (e.g., iMac G3) sported a mic/line external input. The G5 only has a external line input. (So does my MacBook.) Does any company provide a cheap, small audio preamp that I can use with my headset?
Otherwise I love my Mac.