summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-09-26 17:42:19 -0300
committerJames Almer <jamrial@gmail.com>2017-09-26 18:05:30 -0300
commitc83c164f05cba9e7cdb11c9dcd4fb87b90eb6c6d (patch)
tree05eed036ebca5d7f419587f391b3d2ff81e30ae3 /configure
parent14194090a6f65c5110689944c91a6b9030c65791 (diff)
parentbcaedef1189a3531aa4dfb020627eb0133ffa89c (diff)
Merge commit 'bcaedef1189a3531aa4dfb020627eb0133ffa89c'
* commit 'bcaedef1189a3531aa4dfb020627eb0133ffa89c': configure: Add require_cpp_condition() convenience function Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure14
1 files changed, 10 insertions, 4 deletions
diff --git a/configure b/configure
index 035e16ec14..b154924d09 100755
--- a/configure
+++ b/configure
@@ -1379,6 +1379,14 @@ require_header(){
check_header "$header" "$@" || die "ERROR: $header header not found"
}
+require_cpp_condition(){
+ log require "$@"
+ header="$1"
+ condition="$2"
+ shift 2
+ check_cpp_condition "$header" "$condition" "$@" || die "ERROR: $condition not satisfied"
+}
+
use_pkg_config(){
log use_pkg_config "$@"
pkg="$1"
@@ -6017,13 +6025,11 @@ enabled libwebp && {
enabled libx264 && { use_pkg_config x264 "stdint.h x264.h" x264_encoder_encode ||
{ require libx264 "stdint.h x264.h" x264_encoder_encode -lx264 &&
warn "using libx264 without pkg-config"; } } &&
- { check_cpp_condition x264.h "X264_BUILD >= 118" ||
- die "ERROR: libx264 must be installed and version must be >= 0.118."; } &&
+ require_cpp_condition x264.h "X264_BUILD >= 118" &&
{ check_cpp_condition x264.h "X264_MPEG2" &&
enable libx262; }
enabled libx265 && require_pkg_config x265 x265.h x265_api_get &&
- { check_cpp_condition x265.h "X265_BUILD >= 68" ||
- die "ERROR: libx265 version must be >= 68."; }
+ require_cpp_condition x265.h "X265_BUILD >= 68"
enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode -lxavs
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled libzimg && require_pkg_config "zimg >= 2.3.0" zimg.h zimg_get_api_version