Movement detection XYZ Lsm303agr

Hi, can you explain me how enable XYZ Motion detection interrupt INT2? it is for alarm school project.
Thanks