A South African court has ordered track star Oscar Pistorius to undergo evaluation for mental illness.