Whichever combination of those items provides the best risk-adjusted return is the one (or several) that they should choose. The risk of share buybacks is quite low. You more or less know what the outcome will be, so even if the reward of a successful M&A or an organic expansion project is higher, it may still be smarter to buyback shares once you discount the former possibilities for the uncertainty. This is even more true if you believe the stock market is undervaluing your firm's shares, which of course then becomes a very common storyline when buyback programs are announced or expanded.
If you invested because you believe in the long-term growth prospects of the company, then you expect them to plow their cash into increasing the top line, and a buyback can be a disappointing signal. If you invested because you believe it's a good income stock, a buyback is exactly what you want.
What the previous poster is trying to get at is that a big-ticket buyback signals an inability to invest that sum in a way that will improve growth or profitability. The best move to increase EPS is invest in capital improvements to increase earnings. If you can deploy money effectively, that means you're also growing in the long-term. Reducing the number of shares via a buyback also increases EPS, but it doesn't improve the top line.
In other words, a buyback is a way to increase your (and the CEO's) earnings per share even in the midst of stalling growth. So what I'm getting out of the previous comment is: don't confuse a buyback with continued growth; it's actually a "cashing out" moment.