1. ogg vorbis is an audio encoding scheme.
2. gaim is an instant messaging program.
Gaim does not require ogg to operate... that would be like saying your stereo has to be on for your telephone to work.
libao is an audio output library. Gaim supports the playing of sounds via libao. The packages for Gaim are compiled with this sound support. So, if installing Gaim from one of the packages you will need to have libao installed. Otherwise, get the source for Gaim and compile it without sound support.
BTW: I found all this out by plugging the keywords libao and gaim into Google after I ran into the same problem [hint: I always check Google before coming here - I learn more that way]. Also, you can go to the website for the app you are trying to install...
http://gaim.sourceforge.net/faq.php
Cheers!
Mk.
--------
Laptop + Slackware 9 + wi-fi + car mount omni-directional antenna = I love your wireless network.