Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
83fef16b
Commit
83fef16b
authored
Oct 07, 2017
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure: Add check_cpp_condition() helper function to simplify some expressions
parent
a5e011c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
12 deletions
+26
-12
configure
configure
+26
-12
No files found.
configure
View file @
83fef16b
...
...
@@ -998,6 +998,14 @@ test_cpp_condition(){
EOF
}
check_cpp_condition
(){
log check_cpp_condition
"
$@
"
name
=
$1
shift
1
disable
$name
test_cpp_condition
"
$@
"
&&
enable
$name
}
test_cflags_cpp
(){
log test_cflags_cpp
"
$@
"
flags
=
$1
...
...
@@ -1197,6 +1205,14 @@ test_host_cpp_condition(){
EOF
}
check_host_cpp_condition
(){
log check_host_cpp_condition
"
$@
"
name
=
$1
shift
1
disable
$name
test_host_cpp_condition
"
$@
"
&&
enable
$name
}
cp_if_changed
(){
cmp
-s
"
$1
"
"
$2
"
&&
{
test
"
$quiet
"
!=
"yes"
&&
echo
"
$2
is unchanged"
;
}
&&
return
mkdir
-p
"
$(
dirname
$2
)
"
...
...
@@ -4232,14 +4248,14 @@ elif enabled alpha; then
elif
enabled arm
;
then
enabled msvc
&&
test_cpp_condition stddef.h
"defined _M_ARMT"
&&
enable
thumb
enabled msvc
&&
check_cpp_condition thumb stddef.h
"defined _M_ARMT"
test_cpp_condition stddef.h
"defined __thumb__"
&&
enable_weak thumb
enabled thumb
&&
check_cflags
-mthumb
||
check_cflags
-marm
if
test_cpp_condition
stddef.h
"defined __ARM_PCS_VFP"
;
then
enable
vfp_args
elif
test_cpp_condition
stddef.h
"defined _M_ARM_FP && _M_ARM_FP >= 30"
;
then
enable
vfp_args
if
check_cpp_condition vfp_args
stddef.h
"defined __ARM_PCS_VFP"
;
then
:
elif
check_cpp_condition vfp_args
stddef.h
"defined _M_ARM_FP && _M_ARM_FP >= 30"
;
then
:
elif
!
test_cpp_condition stddef.h
"defined __ARM_PCS || defined __SOFTFP__"
&&
[
$target_os
!=
darwin
]
;
then
case
"
${
cross_prefix
:-
$cc
}
"
in
*
hardfloat
*
)
enable
vfp_args
;
fpabi
=
vfp
;;
...
...
@@ -4334,7 +4350,7 @@ elif enabled ppc; then
fi
if
enabled power8
;
then
test_cpp_condition
"altivec.h"
"defined(_ARCH_PWR8)"
||
disable power8
check_cpp_condition power8 altivec.h
"defined(_ARCH_PWR8)"
fi
elif
enabled x86
;
then
...
...
@@ -4655,8 +4671,7 @@ enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFil
enabled libwebp
&&
require_pkg_config libwebp libwebp webp/encode.h WebPGetEncoderVersion
enabled libx264
&&
require_pkg_config libx264 x264
"stdint.h x264.h"
x264_encoder_encode
&&
require_cpp_condition x264.h
"X264_BUILD >= 118"
&&
{
test_cpp_condition x264.h
"X264_MPEG2"
&&
enable
libx262
;
}
check_cpp_condition libx262 x264.h
"X264_MPEG2"
enabled libx265
&&
require_pkg_config libx265 x265 x265.h x265_api_get
&&
require_cpp_condition x265.h
"X265_BUILD >= 57"
enabled libxavs
&&
require libxavs
"stdint.h xavs.h"
xavs_encoder_encode
-lxavs
...
...
@@ -4696,7 +4711,7 @@ check_lib user32 "windows.h winuser.h" GetShellWindow -luser32
check_lib vfw32
"windows.h vfw.h"
capCreateCaptureWindow
-lvfw32
# check that WM_CAP_DRIVER_CONNECT is defined to the proper value
# w32api 3.12 had it defined wrong
test_cpp_condition vfw.h
"WM_CAP_DRIVER_CONNECT > WM_USER"
&&
enable
vfwcap_defines
check_cpp_condition vfwcap_defines vfw.h
"WM_CAP_DRIVER_CONNECT > WM_USER"
# check for ioctl_meteor.h, ioctl_bt848.h and alternatives
check_header
"dev/bktr/ioctl_meteor.h dev/bktr/ioctl_bt848.h"
||
...
...
@@ -4761,8 +4776,7 @@ enabled vaapi &&
enable
vaapi_1
enabled vdpau
&&
test_cpp_condition vdpau/vdpau.h
"defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP"
||
disable vdpau
check_cpp_condition vdpau vdpau/vdpau.h
"defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP"
enabled vdpau
&&
check_lib vdpau_x11
"vdpau/vdpau.h vdpau/vdpau_x11.h"
vdp_device_create_x11
-lvdpau
-lX11
...
...
@@ -4970,7 +4984,7 @@ elif enabled_any msvc icl; then
disable inline_asm
fi
# msvcrt10 x64 incorrectly enables log2, only msvcrt12 (MSVC 2013) onwards actually has log2.
test_cpp_condition crtversion.h
"_VC_CRT_MAJOR_VERSION >= 12"
||
disable log2
check_cpp_condition log2 crtversion.h
"_VC_CRT_MAJOR_VERSION >= 12"
# The CRT headers contain __declspec(restrict) in a few places, but if redefining
# restrict, this might break. MSVC 2010 and 2012 fail with __declspec(__restrict)
# (as it ends up if the restrict redefine is done before including stdlib.h), while
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment