ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Fri Mar 31 14:36:38 2017 -0300| [8d50dd976d29884463993b75dff1cc813c089b3a] | committer: James Almer
Merge commit 'c78495d1cdac6dd13786a7e5571b606604a360bd' * commit 'c78495d1cdac6dd13786a7e5571b606604a360bd': configure: Log name and parameters of all helper functions where it makes sense Merged-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8d50dd976d29884463993b75dff1cc813c089b3a --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index d9185bd..c024717 100755 --- a/configure +++ b/configure @@ -1251,6 +1251,7 @@ check_exec(){ } check_exec_crash(){ + log check_exec_crash "$@" code=$(cat) # exit() is not async signal safe. _Exit (C99) and _exit (POSIX) @@ -1321,6 +1322,7 @@ check_compile_assert(){ } require(){ + log require "$@" name="$1" headers="$2" func="$3" @@ -1337,6 +1339,7 @@ require_cpp(){ } use_pkg_config(){ + log use_pkg_config "$@" pkg="$1" check_pkg_config "$@" || return 1 add_cflags $(get_safe "${pkg}_cflags") ====================================================================== diff --cc configure index d9185bd,70a0d95..c024717 --- a/configure +++ b/configure @@@ -1328,41 -1106,10 +1330,42 @@@ require() check_lib "$headers" $func "$@" || die "ERROR: $name not found" } -require_pkg_config(){ - log require_pkg_config "$@" +require_cpp(){ + name="$1" + headers="$2" + classes="$3" + shift 3 + check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found" +} + +use_pkg_config(){ ++ log use_pkg_config "$@" pkg="$1" - check_pkg_config "$@" || die "ERROR: $pkg not found" + check_pkg_config "$@" || return 1 + add_cflags $(get_safe "${pkg}_cflags") + add_extralibs $(get_safe "${pkg}_libs") +} + +require_pkg_config(){ + use_pkg_config "$@" || die "ERROR: $pkg not found using pkg-config$pkg_config_fail_message" +} + +require_libfreetype(){ + log require_libfreetype "$@" + pkg="freetype2" + 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 <ft2build.h>" + echo "#include FT_FREETYPE_H" + echo "long check_func(void) { return (long) FT_Init_FreeType; }" + 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") } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog