look, you're probably running debian woody, that's the 'stable' debian version.
Software on woody is rather old, but very secure and indeed, stable. It's been tested again and again and again and again, it won't crash on you.
The problem you're having right now is that you're trying to compile a program that's recently been made.
It requires newer libraries and stuff than the programs/libraries on woody ('cause it's the stable version of Debian)
There are 3 sollutions to your problem:
1) Be happy with woody for it's security and stability.
Install the gaim that comes with it and don't try to build newer software, cause it'll fail frequently.
2) Upgrade only the programs/libraries you need to compile certain apps (like that gaim now).
It'll be a mix of woody and sarge (testing version) or SID (Still In Development - the 'unstable' Debian)
This setup is good if you want the stability of the woody, but still want to compile stuff from source
3) Totally upgrade (every program/library) to sarge(testing) or SID ('unstable').
You won't have the stability of woody (but it'll still be pretty good) but you'll have all the new software you won't even need to compile from source 'cause you can download those through apt -but that doesn't mean you can't build it from source, you just won't have to that's all
So, I hope I made myself clear here