Цитата, чтоб потом не искать :)
I'm posting this here for my future self as much as anything. Here are a few simple steps to build the codecs for FreeBSD. Although the downloadable binaries are nice, they aren't kept up to date with changes to libc.so or other things as quickly as I'd always want. So, let's just build it by hand.
# fetch http://asterisk.hosting.lv/src/asterisk-g72x-1.1.tar.bz2
# gunzip asterisk-g72x-1.1.tar.bz2
# tar -xvf asterisk-g72x-1.1.tar
# cd asterisk-g72x-1.1
OK, now we need to edit the build script slightly.
# vi build-itu.sh
At the top, insert:
and comment out any other 'inc' and 'def' lines. The include path should be the same for all users who install asterisk from ports. The 'def' line reflects the version of asterisk (in this case version 11), so adjust this as your system requires.
I then had to edit the "o=" line for my CPU type. For me, this was just:
o="-march=core2 -msse -msse2 -msse3 -O3 -fomit-frame-pointer -fPIC"
Now let's build the thing and install.
# cp codec_g729.so /usr/local/lib/asterisk/modules/
# cp codec_g723.so /usr/local/lib/asterisk/modules/
Restart asterisk and use "core show translation recalc 10" to see if the codec was loaded.
These instructions don't use the Intel IPP compiler. But on modern hardware, perhaps that is less important than it used to be. I'll report back if it causes any problems in production.
If anyone is willing, turning these instructions into a FreeBSD port would be incredibly helpful!