On OSX Yosemite I'm trying to build FFmpeg with freetype library included ( I need it for drawtext filter ). Unfortunately I cannot configure ffmpeg properly and every try ends with "freetype not found" error.
- Building plain FFmpeg-2.5.3 without freetype works perfectly well (followed this tutorial)
- Building Freetype-2.5.3 also works fine (followed this tutorial)
- Included extra library locations, where built freetype is located,
like this:
--extra-ldflags="-L$PREFIX/lib"
--extra-cflags="-I$PREFIX/include -I$PREFIX/include/freetype2"
./build_android.sh
ends up withERROR: freetype2 not found
build_android.sh:
#!/bin/bash
NDK=$HOME/Desktop/adt/android-ndk-r10d
SYSROOT=$NDK/platforms/android-9/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64
function build_one
{
./configure \
--prefix=$PREFIX \
--enable-shared \
--disable-static \
--enable-libfreetype \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--target-os=linux \
--arch=arm \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fpic $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}
CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -I$PREFIX/include"
ADDI_LDFLAGS="-L$PREFIX/lib"
build_one
Last 3 lines of config.log :
require_libfreetype
false --exists --print-errors freetype2
ERROR: freetype2 not found
Thanks in advance ( and sorry for my poor english )
PS: I've checked patch sources in guardian-project and I've found this:
# this is a fake pkg-config since ffmpeg requires pkg-config if you want to
# include external libraries like libfreetype or libass. The Android NDK does
# not provide any kind of pkg-config.
Does it mean I have to move to Linux ? Isn't pkg-config installed on OSX ?
algakzru$ pkg-config --version
0.28