Seems like the problem is having two optical drives on the same IDE controller - it works fine if I unplug either of them.
But they are definitely correctly jumpered.
I tried all sorts of possible configurations, and finally got the following to work:
IDE Primary Master - 4Gb Seagate HDD
IDE Primary Slave - Panasonic CD-ROM
IDE Secondary Master - Samsung CD-RW
IDE Secondary Slave - 10Gb Samsung HDD
The BIOS still didn't autodetect the CD-ROM, but when I manually set it as a CD-ROM it then worked OK, including allowing me to boot from it. It isn't an ideal setup, but it will do for this machine.
In case anyone cares, the mobo is a Fujitsu-Siemens D1170 that started life in an RM machine and the CD-ROM is a Panasonic CR-583-B.