OK, so I checked and I had installed the nvidia drivers as you described (including the cuda toolkit location). As such, I tried this:
CFLAGS=-I/usr/local/cuda/include LDFLAGS=-L/usr/lib64/nvidia ./configure --program-suffix=\-nvidia
For the record, I uninstalled my previous build first, the -nvidia was just in case I ended up finding it only working for nvidia and wanted to try to run an nvidia one and an ATI one side by side. When I tried to run cgminer-nvidia, I still get this:
[2011-07-21 09:26:33] Error: Getting Device IDs (num)
I then proceeded to uninstall again, remove the jansson-devel libraries just in case, configure without the program suffix just in case, compile and install again, see the same error when running cgminer, so I edited /etc/ld.so.conf.d/local.conf to remove these two lines:
/opt/ati-stream-sdk-v2.1-lnx64/lib/x86_64/
/opt/ati-stream-sdk-v2.1-lnx64/lib/x86/
I then ran ldoconfig. I still had to use CFLAGS=-I/usr/local/cuda/include LDFLAGS=-L/usr/lib64/nvidia in order to have gpu mining support enabled even though /etc/ld.so.conf.d/local.conf still had these lines:
/usr/local/cuda/lib64/
/usr/local/cuda/lib/
After all that (some of it perhaps grasping at straws), I STILL get the same error. Any other thoughts?
Turns out the issue was even simpler than I could have imagined. I put in an ATI card and recompiled using ATI's SDK and still got the same error. Here's the catch, I've been working from SSH this whole time. Turns out this miner doesn't work on an SSH console or on a local console at runlevel 3. I didn't try a local console at runlevel 5, but I used a terminal in X and it is running fine. I couldn't ever get it to detect the ATI and NVIDIA cards simultaneously (even with both sets of packages installed using rpm with --nodeps [after which point boot.grub must be edited]), but I never hooked the NVIDIA card up to a monitor after I made it secondary. Considering the fact that the executable behaves on linux the same way most do on Windows (can't be run in a remote session), I'm thinking maybe it couldn't see the NVIDIA card because of that (never tried booted to the NVIDIA card at X because I didn't figure out it just wouldn't work in SSH until after I had already made the ATI card primary).
EDIT: Also, I tried with -I 1 in Windows and cpu usage was still incredibly high. I also still got rejects on the 9500GT, but I'm thinking that maybe they are stale shares from long-polling not working right based on a post I saw earlier in this page (or the previous).