Depends on how it's given.
I hug my grandfather/uncle/family friend everytime I see them, mostly because I don't see them too often and I love them in a non-gay way. I don't hug my male friends, mostly because that's just not how we say hi. I know there are a lot of guys who would man-hug everytime they saw each other, and as long as their both comfortable with it (and not gay), then it's not gay. If two guys hug when they say hello, goodbye, sorry, thanks and just about everything else, it can likely be considered gay.
Sum-up: If the guys are okay with it, and don't do it ad nauseum, it really can't be considered gay.
Oh and as long as their balls don't touch. That's important.