Have Cat Questions? Ask a Cat Vet Online.
Age? What are you seeing?
I will be honest, my feeling is that the problem is urinary. Constipation is not as common as male cats straining to urinate and having bladder issues.
You can pickup a product that helps with hairballs and constipation called LAXATONE at a petstore or vet clinic...but I think you need to have a vet visit and urinalysis. Male cats can go from straining to being completely blocked and a life threatening emergency. Urinating on the floor is also a good indication of a problem...they also hang out in the box...and will even cry while they strain.
Please take him into you vet, a quick check by your vet will determine if he is constipated...