(1) After the hearing of the petition for an order of support the court shall make an order granting or denying it and fixing, if allowed, the terms and amount of the support. (2) The court has the same power to compel the attendance of witnesses and the production of testimony as in actions and suits, to make such decree or orders as are equitable in view of the circumstances of both parties and to punish violations thereof as other contempts are punished.