From 48f7daba16e0fcdb83d9abd254800c7b9f4ab684 Mon Sep 17 00:00:00 2001 From: Aaron Levinson <alevi...@aracnet.com> Date: Thu, 13 Apr 2017 17:30:47 -0700 Subject: [PATCH] Enhanced require_pkg_config() in configure to fallback to require() if pkg-config is missing
Purpose: Enhanced require_pkg_config() in configure to fallback to require() if pkg-config is missing Notes: This is likely mainly of relevance when building with MSVC on Windows. In my case, I used this approach to get libmfx when invoking configure with --enable-libmfx, which is used for QuickSync (QSV). Comments: -- configure: Enhanced require_pkg_config() function to first check if $pkg_config is not false. If not false, it goes through the standard steps of calling use_pkg_config(), but if false, it issues a log message and then calls require() with all the inputted arguments and an additional argument: -l$1. So, for something like "require_pkg_config libmfx "mfx/mfxvideo.h" MFXInit", this becomes "require libmfx "mfx/mfxvideo.h" MFXInit -llibmfx". This is not a perfect solution, but the previous approach didn't work at all before when require_pkg_config() is used. --- configure | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 7f2b653..ad08b82 100755 --- a/configure +++ b/configure @@ -1347,7 +1347,12 @@ use_pkg_config(){ } require_pkg_config(){ - use_pkg_config "$@" || die "ERROR: $pkg not found using pkg-config$pkg_config_fail_message" + if test $pkg_config != false; then + use_pkg_config "$@" || die "ERROR: $pkg not found using pkg-config$pkg_config_fail_message" + else + log require_pkg_config "No pkg-config, using require for $@" + require "$@ -l$1" + fi } require_libfreetype(){ -- 2.10.1.windows.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel