[FFmpeg-devel] [PATCH 1/2] Add libfribidi support to configure script

Clément Bœsch u at pkh.me
Thu Jul 10 07:50:09 CEST 2014


On Wed, Jul 09, 2014 at 05:07:04PM +0100, Marc Jeffreys wrote:
> ---
>  configure | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/configure b/configure
> index e20bf8e..cb7d392 100755
> --- a/configure
> +++ b/configure
> @@ -209,6 +209,7 @@ External library support:
>    --enable-libfdk-aac      enable AAC de/encoding via libfdk-aac [no]
>    --enable-libflite        enable flite (voice synthesis) support via libflite [no]
>    --enable-libfreetype     enable libfreetype [no]
> +  --enable-libfribidi      enable libfribidi [no]
>    --enable-libgme          enable Game Music Emu via libgme [no]
>    --enable-libgsm          enable GSM de/encoding via libgsm [no]
>    --enable-libiec61883     enable iec61883 via libiec61883 [no]
> @@ -1215,6 +1216,25 @@ require_libfreetype(){
>      add_extralibs $(get_safe ${pkg}_libs)
>  }
>  
> +require_libfribidi(){
> +    log require_libfribidi "$@"
> +    pkg="fribidi"
> +    check_cmd $pkg_config --exists --print-errors $pkg \
> +      || die "ERROR: $pkg not found"
> +    pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg)
> +    pkg_libs=$($pkg_config --libs $pkg_config_flags $pkg)
> +    {
> +        echo "#include <fribidi.h>"
> +        echo "char* check_func(void) { return (char*) fribidi_version_info; }"
> +        echo "int main(void) { return 0; }"
> +    } | check_ld "cc" $pkg_cflags $pkg_libs \
> +      && set_safe ${pkg}_cflags $pkg_cflags \
> +      && set_safe ${pkg}_libs   $pkg_libs \
> +      || die "ERROR: $pkg not found"
> +    add_cflags    $(get_safe ${pkg}_cflags)
> +    add_extralibs $(get_safe ${pkg}_libs)
> +}
> +
>  hostcc_e(){
>      eval printf '%s\\n' $HOSTCC_E
>  }
> @@ -1332,6 +1352,7 @@ EXTERNAL_LIBRARY_LIST="
>      libflite
>      libfontconfig
>      libfreetype
> +    libfribidi
>      libgme
>      libgsm
>      libiec61883
> @@ -4719,6 +4740,7 @@ enabled libflite          && require2 libflite "flite/flite.h" flite_init $flite
>  enabled fontconfig        && enable libfontconfig
>  enabled libfontconfig     && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit
>  enabled libfreetype       && require_libfreetype
> +enabled libfribidi        && require_libfribidi

Please just do require_pkg_config fribidi fribidi.h fribidi_version_info

The require_libfreetype is a very special case because it has a very weird
way of doing includes (it's #include MACRO, which doesn't fit well in
require_pkg_config)

Also, as requested in the other thread, please have this hunk squashed
with the feature patch.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140710/aa7e2544/attachment.asc>


More information about the ffmpeg-devel mailing list