The engine will have a number etched into it towards the back near the bellhousing - look for it - it will say something like G13A-12345, G16A-12345 or maybe J18A-12345 or J20A-12345
This may not tell you what the engine came out of but it will tell you what engine it is and may tell you what year it was made in.
As far as I know the original engine in a Samurai would have been a 1324cc G13A, and the common replacements would be another G13, possibly a 1298cc G13B or BA which would not require an adapter plate, or a G16A or G16B which would - the SideKick you mention would have had a G16 engine. The last two examples - the J series engines are less likely but I suppose possible.
You could also post a picture, I'm sure many of the folks here would be willing to tell you what it is under the hood if they can recognize it.