Check the engine - if it's the 2.46L I4, it's either the AX-4 (four-speed) or AX-5 (five-speed.) The 1989 4.0L I6 could come with either the Peugeot BA-10/5 (early) or Aisin AX-15 (late) - and they're easily identifiable by the way the case splits. The BA-10 is a "clamshell" case, which can be easily spotted by the longwise split down the main case (you split the case in half to load it.) The AX-15 case is built of three cases assembled front-to-back, so you'll readily see the sections.
IIRC, pretty much all manual XJs came with the NP231 1987-up - with a 21-spline used behind the BA-10 and 23-spline pretty much everywhere else. Of course, it's possible to change the input gear - but be sure to use an early 23-spline gear (1994 and down, methinks) as they changed the helix on the input gear teeth slightly. It will mesh without the gears moving, but the first fluid change will probably have you draining teeth.
It's entirely possible to swap in a 242 behind the AX-15 (I'm planning on doing it myself, unless I happen to score a good gear-driven case instead,) but you'll probably need a new shift linkage for the transfer case. I've heard good reports from the field on the kit that Novak sells, and that's what I'm planning to do when my time comes. (My "ideal" combination would end up being the NV3550 and D300 - my "acceptable" will be the external AX-15 and the NP242. I do like having the full-time option for driving around with the rest of these mopes in the excuses for foul weather we see around here.)
Note that your 1989 AX-15 will still have the "internal" slave, and the transmission may be swapped in place of an extant BA-10 while still using the same hydraulics and clutch kit. If you are converting from the AW4, you'll want to be sure to grab the clutch pedal, linkage, operating rod, hydraulics,
et al as well - if you think you'll need it, grab it! If you don't need it, no worries - but if you need it and didn't get it, you'll kick yourself very hard and say many evil words... The same crossmember should be useable (the crossmember is the same with the AW4 and BA-10 - I checked - and you'll just need to use the rearward set of holes to mount the crossmember.)
While this thread is primarily aimed toward those swapping an AX-15 in in favour of that wretched BA-10, it should still yield quite a bit of useful information for what you're doing as well - so give it a read. It may generate more questions for you, but it should answer quite a few as well.
http://www.naxja.org/forum/showthread.php?t=70388
Good luck!