You need the geoip library and header files installed. (In Debian, its "libgeoip-dev")
This is FreeBSD and error is like this:
(~/anope-1.9.1) - gmake modules
gmake[1]: Entering directory `/home/user/anope-1.9.1/lang'
gmake[1]: Nothing to be done for `all'.
gmake[1]: `language.h' is up to date.
gmake[1]: Leaving directory `/home/user/anope-1.9.1/lang'
gmake[1]: Entering directory `/home/user/anope-1.9.1/include'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/home/user/anope-1.9.1/include'
gmake[1]: Entering directory `/home/user/anope-1.9.1/src'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/home/user/anope-1.9.1/src'
ls: *.cpp: No such file or directory
gmake[1]: Entering directory `/home/user/anope-1.9.1/src/modules'
g++ -pipe -g -I/usr/local/include/mysql -fno-strict-aliasing -pipe -export-dynamic -g -Wall -ansi -pedantic -Wshadow -rdynamic -Wall -fPIC -DPIC -shared -I../../include -o os_locate.so os_locate.c
os_locate.c:28:19: GeoIP.h: No such file or directory
os_locate.c:29:23: GeoIPCity.h: No such file or directory
os_locate.c:48: error: expected unqualified-id before string constant
os_locate.c: In constructor `OSLocate::OSLocate(const std::string&, const std::string&)':
os_locate.c:195: error: `CommandOSLocate' has not been declared
gmake[1]: *** [os_locate.so] Error 1
gmake[1]: Leaving directory `/home/user/anope-1.9.1/src/modules'
gmake: *** [modules] Error 2