Have a look at /etc/os-release, there is also a man page (man os-release).
Thanks for this Lutz, but I think the solution from howardpc will be a tad more straight forward as 'issue' is just a one line text file.
I believe /etc/os-release is the nearest thing you'll get to a correct answer since this is officially sanctioned by both linux.org and freedesktop.org: hence you will also find it supported by Solaris etc., with standardised content.
Anything using conditional compilation is doomed to failure, since all you're doing is asking the build environment what it thinks it's compiling for. So as a specific example, you might be building a 32-bit Linux program with no GUI which is going to be run on a 64-bit distro with KDE.
Conditionals do have their uses, but what you're trying to do isn't one of them :-)
MarkMLl