[FFmpeg-devel] [PATCH 1/2] configure: add optional	pkg-config	helper and use it.
    Benoit Fouet 
    benoit.fouet at free.fr
       
    Tue Dec  2 14:26:42 CET 2014
    
    
  
Hi,
----- Mail original -----
> The require variant dies if the package is not present.
> The check variant does not import the flags to the used list.
> The new variant imports the flags if the package is present
> but does not die if it is not.
> The new call graph is: require -> use -> check.
> 
> Use use_pkg_config for libx264 and libsmbclient: more readable
> and three external call less per library.
> 
> Signed-off-by: Nicolas George <george at nsup.org>
> ---
>  configure | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/configure b/configure
> index d4a86c0..af89e05 100755
> --- a/configure
> +++ b/configure
> @@ -1203,13 +1203,17 @@ require_cpp(){
>      check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name
>      not found"
>  }
>  
> -require_pkg_config(){
> +use_pkg_config(){
>      pkg="$1"
> -    check_pkg_config "$@" || die "ERROR: $pkg not found"
> +    check_pkg_config "$@" || return
> 
IMHO, it would be clearer to have "return 1" here.
LGTM otherwise.
-- 
Ben
    
    
More information about the ffmpeg-devel
mailing list