9mm and .40 are both pretty ineffective for wild animals. Thicker hides, harder bones... If you are set on a semi auto, go with 10mm... Glock 20 would be my suggestion.
Otherwise, get a good 357mag, 41mag, or 44 mag revolver. You're not going to need a ton of rounds if you're looking at defending against, or hunting, a wild animal. 6 rounds should be plenty.
Just my 2 cents.