DirectFB-examples-1.2.0 の クロスコンパイル

これまた、しばし嵌る。

$ ./configure CC=arm-none-linux-gnueabi-gcc --host=arm-none-linux-gnueabi \
  --prefix="${ROOTFS_DIR}/usr"

.....snip.....

checking for pkg-config... /usr/bin/pkg-config
configure: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org.
checking pkg-config is at least version 0.9.0... yes
checking for DIRECTFB... no
configure: error: No package 'directfb' found
*** DirectFB 1.2.0 or newer is required. The latest version
*** of DirectFB is available from http://www.directfb.org/.
$

pkg-config を使ってコンパイルオプションとるのか・・・・・

ロスコンパイル環境って考慮してくれんのねぇ。


「自動化は、同環境へのメンテナンスコストを下げるが
 環境が変化したときのメンテナンスコストが高くなる」


自分のProjectでは忘れないようにしておかないと.....バランスって大事。


それはさておき、host の pkg-config が呼ばれるので
どうにかhostの pkg-config を騙してDirectFBを認識させる手口を見つけないとね。

Googleで調べることしばし。

環境変数 PKG_CONFIG_PATH を使って非標準の検索パスを足せそうで。

$ PKG_CONFIG_PATH="${ROOTFS_DIR}/usr/lib/pkgconfig" ./configure CC=arm-none-linux-gnueabi-gcc \
  --host=arm-none-linux-gnueabi \
  --prefix="${ROOTFS_DIR}/usr"

.....snip.....

checking pkg-config is at least version 0.9.0... yes
checking for DIRECTFB... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating data/Makefile
config.status: creating data/df_neo/Makefile
config.status: creating data/spacedream/Makefile
config.status: creating src/Makefile
config.status: creating src/df_knuckles/Makefile
config.status: creating src/df_neo/Makefile
config.status: creating src/spacedream/Makefile
config.status: executing depfiles commands
$

configure 通った!

$ make

問題なし。

$ make install

問題なし。

やっとこさ compile 終了〜。