How to configure the Atmel AVRISP MKii to work with Arduino IDE

I know this is ancient thread, but i had to register just to thank you for this post. This helped me to recover my arduino mega2560 from forever upload loop that many people experience. I borowed avr isp mk2, followed your instructions, burned new bootloader and now it works. Thanks again, cheers!
Tom