You need to install correspoinding kernel source code.
In order to get NVIDIA kernel source code compiled, you need to install the correspoinding kernel source file to /usr/src/linux. I used to have the same trouble as you. I can't find the kernel-source-2.4.18-19.7.x in RedHat web site. So I install the old rpm from the CDROM, and update it.