Your mouse drivers are set up in your xorg configuration. The standard "mouse" driver gives you basic functionality, but for advanced mice with extra multimedia buttons you'll probably have to use the evdev driver instead.
There's a good Gentoo wiki about it
here.
Note that xorg is going through a transition to a dynamic configuration system using hal-based .fdi policy rules, so you may have to set the drivers up there instead of the regular xorg.conf.