SSブログ

各種コーディックのインストール - opencode-amr 編 - [FreeBSD]

ライブラリopencode-amr
公式ページhttp://sourceforge.net/projects/opencore-amr/

AMRは、DoCoMoのFORMで着うたのファイルフォーマットとして使用されているものです。
AMRは、AMR-NBとAMR-WBがありますが、opencode-amrは、両方のライブラリを含んでいます。
FreeBSDのportsには、見つからなかったので、ソースよりコンパイルし、インストールします。

●準備
公式ページよりアーカイブを取得し、解凍します。


●./configure
解凍したディレクトリに移動し、./configureでコンパイルオプションを指定します。
./configure --helpでオプションを確認しても特に指定するオプションが無かったため、
オプションなしで実行します。
> cd opencore-amr-0.1.2
> ./configure



checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for memset... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating amrnb/Makefile
config.status: creating amrwb/Makefile
config.status: creating test/Makefile
config.status: creating amrnb/opencore-amrnb.pc
config.status: creating amrwb/opencore-amrwb.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

特に問題なく終了しました。

●コンパイル
コンパイルします。
> make



libtool: link: gcc -g -O2 -o .libs/amrnb-enc amrnb-enc.o ../amrnb/.libs/libopencore-amrnb.so -lm -Wl,-rpath -Wl,/usr/local/lib
g++ -DHAVE_CONFIG_H -I. -I.. -I../amrnb -I../amrwb -g -O2 -MT amrwb-dec.o -MD -MP -MF .deps/amrwb-dec.Tpo -c -o amrwb-dec.o amrwb-dec.cpp
mv -f .deps/amrwb-dec.Tpo .deps/amrwb-dec.Po
/bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o amrwb-dec amrwb-dec.o wav.o ../amrwb/libopencore-amrwb.la -lm
libtool: link: g++ -g -O2 -o .libs/amrwb-dec amrwb-dec.o wav.o ../amrwb/.libs/libopencore-amrwb.so -lm -Wl,-rpath -Wl,/usr/local/lib
gcc -DHAVE_CONFIG_H -I. -I.. -I../amrnb -I../amrwb -g -O2 -MT linkboth.o -MD -MP -MF .deps/linkboth.Tpo -c -o linkboth.o linkboth.c
mv -f .deps/linkboth.Tpo .deps/linkboth.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -static -o linkboth linkboth.o ../amrnb/libopencore-amrnb.la ../amrwb/libopencore-amrwb.la -lm
libtool: link: gcc -g -O2 -o linkboth linkboth.o ../amrnb/.libs/libopencore-amrnb.a ../amrwb/.libs/libopencore-amrwb.a -lm

これも特に問題なく終了しました。今回は、なんだか順調です。

チェック用のスクリプトが用意されているので、チェックします。
> make check
Making check in amrnb
Making check in amrwb
Making check in test

成功か失敗かよくわからないメッセージが表示されましたが、
エラーメッセージでは無いようなので、成功にしておきます。

rootになって、インストールします。
> su # make install



----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/include/opencore-amrwb" || .././install-sh -c -d "/usr/local/include/opencore-amrwb"
/usr/bin/install -c -m 644 dec_if.h if_rom.h '/usr/local/include/opencore-amrwb'
test -z "/usr/local/lib/pkgconfig" || .././install-sh -c -d "/usr/local/lib/pkgconfig"
/usr/bin/install -c -m 644 opencore-amrwb.pc '/usr/local/lib/pkgconfig'
Making install in test

無事インストールされました。
今回は、特に躓く箇所も無く、素直にインストールできました。
なんだか、ちょっと拍子抜けです。


この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。