We exhibit an algorithm to decide if the fixed-points of a morphism avoid (long) abelian repetitions and we use it to show that long abelian squares are avoidable over the ternary alphabet. This gives a partial answer to one of M\"akel\"a's questions. Our algorithm can also decide if a morphism avoids additive repetitions or k-abelian repetitions and we use it to show that long 2-abelian square are avoidable over the binary alphabet and additive repetitions are avoidable over Z2.