Ed Rollins, Huckabee's top campaign manager, stated around the NH primary that Huckabee and McCain were entering into an alliance.
During the debates right before the NH primary, Huckabee and McCain double-teamed Romney.
Going into the SC primary, I don't think Huckabee ever criticized McCain. Huckabee stated after finishing 2nd in SC that he rather not win and not criticize an opponent than win and criticize an opponent during the process. So maybe some of the voters who voted for McCain in SC didn't know that he's against a ban on gay marriage. And maybe they forgot some of McCain's other views on issues.
Most pundits think that Huckabee wants to be the VP nominee if McCain wins the nomination.