Usually, the .config used to build the kernel is supposed to be copied to /boot along with the actual kernel itself. So you should be able to grep the contents of it with a command like:
Code:
grep "y" /boot/config-2.6.16
(or whatever your .config is named under /boot)
As for an actual command to pull the same information from the kernel, I don't
think there is one. At least, none that I am aware of.
I know that one of the kernel options allows the .config file to actually be built into the kernel, which can then be extracted with a tool or by reading from /proc. But I don't know when this option was added to the kernel, and now many distributions even use the function.