First off, the compressor will NOT turn unless the appropriate amount of refrigerant is in the AC system. That's by DESIGN, and it protects the compressor from fatal damage due to lack of refrigerant. (Refrigerant is a lubricant for your compressor.)
You can check for this condition by putting a jumper across the low pressure switch on your accumulator. If the compressor engages then, you know the issue is low refrigerant. If it does NOT, then your issue is probably either more basic electrical issues, or a defective compressor clutch.
If your issue is lack of refrigerant, I STRONGLY suggest you employ the services of a professional shop with experience in working on AC systems. This part of your XJ requires tools and equipment that most DIY guys do not have. Furthermore, doing this without those tools increases the probably of damaging other parts SUBSTANTIALLY.
Pay a pro to check your system for leaks, and if none are found, have him refill it. You WILL save money in the long run.
I don't own an XJ any longer, but I still think they are the best of all the Jeep products ever made. My XJ was my favorite vehicle in my 50+ years of driving.
So...I stick around and give advice.