As others have said in the thread, cats will purr for a variety of reasons. Many people hear a cat purring and think that it means they are happy. One of my cats purrs his head off when he goes to the vet because he's nervous and scared. You can tell a lot about whether the cat is happy purring or purring for other reasons from the body language of the cat when it's purring, and what it's doing while purring. If the cat is prancing back and forth sticking it's butt up in the air for pets, it's likely a happy kitty trying to get some attention and pets. If it's huddled somewhere purring by itself and not looking too comfortable, it could be in pain, sick, or scared and trying to reassure and calm itself down.
What makes you think that the cat isn't very happy? More detail is really needed about the situation to be able to form an opinion as to whether the cat is in need of some help or not.