If the occasion arises, just take a few grams of vitamin C every hour or so, with plenty of liquid, until you meet with success. Eat fiber-containing foods to provide roughage and bulk. Avoid constipating foods such as dairy products and proteins, especially cheese, red meats, and the free amino acids. Eat LESS total food, but drink MORE liquids. Just 10 minutes a day should be sufficient if you can work up a light sweat.
Constipation causes worry and stress, and they in turn cause constipation.
Your health is more important than what others, with hangups, may think. Moisture and volatile fatty acids lubricate the feces to such a degree that your time at the stool will be brief and pleasurable instead of being a time-consuming, painful, dreaded task that you tend to put off and thus make even more difficult. Your years of constipation will be just a bad memory. You'll not only feel better, but you'll feel better about yourself. You'll live much longer, too.