Unified · Split
| @@ -2374,7 +2374,7 @@ msvc_flags(){ · 2373 unmodified lines | ||
| 2374 | 2374 | msvc_common_flags "$@" |
| 2375 | 2375 | for flag; do |
| 2376 | 2376 | case $flag in |
| 2377 | − -Wall) echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 \ | |
| 2377 | + -Wall) echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 \ | |
| 2378 | 2378 | -wd4146 -wd4057 -wd4204 -wd4706 -wd4305 \ |
| 2379 | 2379 | -wd4152 -wd4324 -we4013 -wd4100 -wd4214 \ |
| 2380 | 2380 | -wd4996 -wd4273 ;; |
| @@ -2425,10 +2425,10 @@ suncc_flags(){ · 44 unmodified lines | ||
| 2425 | 2425 | corei7) echo -xarch=sse4_2 -xchip=nehalem ;; |
| 2426 | 2426 | corei7-avx) echo -xarch=avx -xchip=sandybridge ;; |
| 2427 | 2427 | amdfam10|barcelona|bdver*) echo -xarch=sse4_1 ;; |
| 2428 | − athlon-4|athlon-[mx]p) echo -xarch=ssea ;; | |
| 2428 | + athlon-4|athlon-[mx]p) echo -xarch=ssea ;; | |
| 2429 | 2429 | k8|opteron|athlon64|athlon-fx) |
| 2430 | − echo -xarch=sse2a ;; | |
| 2431 | − athlon*) echo -xarch=pentium_proa ;; | |
| 2430 | + echo -xarch=sse2a ;; | |
| 2431 | + athlon*) echo -xarch=pentium_proa ;; | |
| 2432 | 2432 | esac |
| 2433 | 2433 | ;; |
| 2434 | 2434 | -std=c99) echo -xc99 ;; |
| @@ -2588,7 +2588,8 @@ probe_cc(){ · 153 unmodified lines | ||
| 2588 | 2588 | _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs' |
| 2589 | 2589 | _cflags_speed="-O2" |
| 2590 | 2590 | _cflags_size="-O1" |
| 2591 | − # Nonstandard output options, to avoid msys path conversion issues, relies on wrapper to remap it | |
| 2591 | + # Nonstandard output options, to avoid msys path conversion issues. | |
| 2592 | + # Relies on wrapper to remap it. | |
| 2592 | 2593 | if $_cc 2>&1 | grep -q Linker; then |
| 2593 | 2594 | _ld_o='-out $@' |
| 2594 | 2595 | else |
| @@ -2608,10 +2609,12 @@ probe_cc(){ · 13 unmodified lines | ||
| 2608 | 2609 | _type=icl |
| 2609 | 2610 | _ident=$($cc 2>&1 | head -n1) |
| 2610 | 2611 | _depflags='-QMMD -QMF$(@:.o=.d) -QMT$@' |
| 2611 | − # Not only is O3 broken on 13.x+ but it's slower on all previous versions (tested) as well | |
| 2612 | + # Not only is O3 broken on 13.x+ but it is slower on all previous | |
| 2613 | + # versions (tested) as well. | |
| 2612 | 2614 | _cflags_speed="-O2" |
| 2613 | 2615 | _cflags_size="-O1 -Oi" # -O1 without -Oi miscompiles stuff |
| 2614 | − # Nonstandard output options, to avoid msys path conversion issues, relies on wrapper to remap it | |
| 2616 | + # Nonstandard output options, to avoid msys path conversion issues. | |
| 2617 | + # Relies on wrapper to remap it. | |
| 2615 | 2618 | if $_cc 2>&1 | grep -q Linker; then |
| 2616 | 2619 | _ld_o='-out $@' |
| 2617 | 2620 | else |
| @@ -2622,9 +2625,10 @@ probe_cc(){ · 4 unmodified lines | ||
| 2622 | 2625 | _flags_filter=icl_flags |
| 2623 | 2626 | _ld_lib='lib%.a' |
| 2624 | 2627 | _ld_path='-libpath:' |
| 2625 | − # -Qdiag-error to make icl error when presented with certain unknown arguments | |
| 2628 | + # -Qdiag-error to make icl error when seeing certain unknown arguments | |
| 2626 | 2629 | _flags='-nologo -Qdiag-error:4044,10157' |
| 2627 | − # -Qvec- -Qsimd- to prevent miscompilation, -GS for consistency with msvc which enables it by default | |
| 2630 | + # -Qvec- -Qsimd- to prevent miscompilation, -GS for consistency | |
| 2631 | + # with MSVC which enables it by default. | |
| 2628 | 2632 | _cflags='-D_USE_MATH_DEFINES -FIstdlib.h -Dstrtoll=_strtoi64 -Qms0 -Qvec- -Qsimd- -GS' |
| 2629 | 2633 | if [ $pfx = hostcc ]; then |
| 2630 | 2634 | append _cflags -Dsnprintf=_snprintf |
| @@ -2725,7 +2729,8 @@ if test -n "$sysroot"; then · 94 unmodified lines | ||
| 2725 | 2729 | fi |
| 2726 | 2730 | |
| 2727 | 2731 | if test "$cpu" = host; then |
| 2728 | − enabled cross_compile && die "--cpu=host makes no sense when cross-compiling." | |
| 2732 | + enabled cross_compile && | |
| 2733 | + die "--cpu=host makes no sense when cross-compiling." | |
| 2729 | 2734 | |
| 2730 | 2735 | case "$cc_type" in |
| 2731 | 2736 | gcc|llvm_gcc) |
| @@ -2741,7 +2746,8 @@ if test "$cpu" = host; then · 9 unmodified lines | ||
| 2741 | 2746 | ;; |
| 2742 | 2747 | esac |
| 2743 | 2748 | |
| 2744 | − test "${cpu:-host}" = host && die "--cpu=host not supported with compiler $cc" | |
| 2749 | + test "${cpu:-host}" = host && | |
| 2750 | + die "--cpu=host not supported with compiler $cc" | |
| 2745 | 2751 | fi |
| 2746 | 2752 | |
| 2747 | 2753 | # Deal with common $arch aliases |
| @@ -3059,7 +3065,9 @@ case $target_os in · 311 unmodified lines | ||
| 3059 | 3065 | # the Solaris assembler. As our libraries contain their own |
| 3060 | 3066 | # guards for processor-specific code, instead suppress |
| 3061 | 3067 | # generation of the HWCAPS ELF section on Solaris x86 only. |
| 3062 | − enabled_all suncc x86 && echo "hwcap_1 = OVERRIDE;" > mapfile && add_ldflags -Wl,-M,mapfile | |
| 3068 | + enabled_all suncc x86 && | |
| 3069 | + echo "hwcap_1 = OVERRIDE;" > mapfile && | |
| 3070 | + add_ldflags -Wl,-M,mapfile | |
| 3063 | 3071 | nm_default='nm -P -g' |
| 3064 | 3072 | ;; |
| 3065 | 3073 | netbsd) |
| @@ -3133,8 +3141,7 @@ case $target_os in · 67 unmodified lines | ||
| 3133 | 3141 | # Link to the import library instead of the normal static library |
| 3134 | 3142 | # for shared libs. |
| 3135 | 3143 | LD_LIB='%.lib' |
| 3136 | − # Cannot build shared and static libraries at the same time with | |
| 3137 | − # MSVC. | |
| 3144 | + # Cannot build shared and static libs at the same time with MSVC. | |
| 3138 | 3145 | disable static |
| 3139 | 3146 | fi |
| 3140 | 3147 | shlibdir_default="$bindir_default" |
| @@ -3707,47 +3714,47 @@ for func in $MATH_FUNCS; do · 566 unmodified lines | ||
| 3707 | 3714 | done |
| 3708 | 3715 | |
| 3709 | 3716 | # these are off by default, so fail if requested and not available |
| 3710 | −enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32 | |
| 3711 | −enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; } | |
| 3712 | −enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init | |
| 3713 | −enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac | |
| 3714 | −enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac | |
| 3715 | −enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType | |
| 3716 | −enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do | |
| 3717 | − check_lib "${gsm_hdr}" gsm_create -lgsm && break; | |
| 3718 | − done || die "ERROR: libgsm not found"; } | |
| 3719 | −enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc | |
| 3720 | −enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame | |
| 3721 | −enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb | |
| 3722 | −enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb | |
| 3723 | −enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader | |
| 3724 | −enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg | |
| 3725 | −enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create | |
| 3726 | −enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new | |
| 3727 | −enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket | |
| 3728 | −enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init | |
| 3729 | −enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex | |
| 3730 | −enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg | |
| 3731 | −enabled libvo_aacenc && require libvo_aacenc vo-aacenc/voAAC.h voGetAACEncAPI -lvo-aacenc | |
| 3732 | −enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc | |
| 3733 | −enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg | |
| 3734 | −enabled libvpx && { | |
| 3717 | +enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32 | |
| 3718 | +enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; } | |
| 3719 | +enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init | |
| 3720 | +enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac | |
| 3721 | +enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac | |
| 3722 | +enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType | |
| 3723 | +enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do | |
| 3724 | + check_lib "${gsm_hdr}" gsm_create -lgsm && break; | |
| 3725 | + done || die "ERROR: libgsm not found"; } | |
| 3726 | +enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc | |
| 3727 | +enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame | |
| 3728 | +enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb | |
| 3729 | +enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb | |
| 3730 | +enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader | |
| 3731 | +enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg | |
| 3732 | +enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create | |
| 3733 | +enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new | |
| 3734 | +enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket | |
| 3735 | +enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init | |
| 3736 | +enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex | |
| 3737 | +enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg | |
| 3738 | +enabled libvo_aacenc && require libvo_aacenc vo-aacenc/voAAC.h voGetAACEncAPI -lvo-aacenc | |
| 3739 | +enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc | |
| 3740 | +enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg | |
| 3741 | +enabled libvpx && { | |
| 3735 | 3742 | enabled libvpx_vp8_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_dec_init_ver -lvpx || |
| 3736 | − die "ERROR: libvpx decoder version must be >=0.9.1"; } | |
| 3743 | + die "ERROR: libvpx decoder version must be >=0.9.1"; } | |
| 3737 | 3744 | enabled libvpx_vp8_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_CQ" -lvpx || |
| 3738 | − die "ERROR: libvpx encoder version must be >=0.9.6"; } | |
| 3739 | − enabled libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; } | |
| 3745 | + die "ERROR: libvpx encoder version must be >=0.9.6"; } | |
| 3746 | + enabled libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; } | |
| 3740 | 3747 | enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx" -lvpx || disable libvpx_vp9_encoder; } } |
| 3741 | −enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack | |
| 3742 | −enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 && | |
| 3743 | − { check_cpp_condition x264.h "X264_BUILD >= 118" || | |
| 3744 | − die "ERROR: libx264 version must be >= 0.118."; } | |
| 3745 | −enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs | |
| 3746 | −enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore | |
| 3747 | −enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || | |
| 3748 | − check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || | |
| 3749 | − check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || | |
| 3750 | − die "ERROR: openssl not found"; } | |
| 3748 | +enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack | |
| 3749 | +enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 && | |
| 3750 | + { check_cpp_condition x264.h "X264_BUILD >= 118" || | |
| 3751 | + die "ERROR: libx264 version must be >= 0.118."; } | |
| 3752 | +enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs | |
| 3753 | +enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore | |
| 3754 | +enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || | |
| 3755 | + check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || | |
| 3756 | + check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || | |
| 3757 | + die "ERROR: openssl not found"; } | |
| 3751 | 3758 | |
| 3752 | 3759 | if enabled gnutls; then |
| 3753 | 3760 | { check_lib nettle/bignum.h nettle_mpz_get_str_256 -lnettle -lhogweed -lgmp && enable nettle; } || |
| @@ -3795,7 +3802,8 @@ check_header sndio.h · 41 unmodified lines | ||
| 3795 | 3802 | check_header sys/soundcard.h |
| 3796 | 3803 | check_header soundcard.h |
| 3797 | 3804 | |
| 3798 | −enabled_any alsa_indev alsa_outdev && check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound | |
| 3805 | +enabled_any alsa_indev alsa_outdev && | |
| 3806 | + check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound | |
| 3799 | 3807 | |
| 3800 | 3808 | enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && |
| 3801 | 3809 | check_func jack_port_get_latency_range -ljack |
| @@ -3803,7 +3811,8 @@ enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && · 1 unmodified line | ||
| 3803 | 3811 | enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio |
| 3804 | 3812 | |
| 3805 | 3813 | if enabled libcdio; then |
| 3806 | − check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio | |
| 3814 | + check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || | |
| 3815 | + check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio | |
| 3807 | 3816 | fi |
| 3808 | 3817 | |
| 3809 | 3818 | enabled x11grab && |
| @@ -3948,9 +3957,10 @@ elif enabled pathscale; then · 138 unmodified lines | ||
| 3948 | 3957 | elif enabled_any msvc icl; then |
| 3949 | 3958 | enabled x86_32 && disable aligned_stack |
| 3950 | 3959 | if enabled icl; then |
| 3951 | − # basically -fstrict-aliasing for icl that doesn't work (correctly) on 13.x+ | |
| 3960 | + # basically -fstrict-aliasing that does not work (correctly) on icl 13.x | |
| 3952 | 3961 | check_cpp_condition "windows.h" "__ICL < 1300" && add_cflags -Qansi-alias |
| 3953 | − # icl will pass the inline asm tests but inline asm is currently not supported (build will fail) | |
| 3962 | + # icl will pass the inline asm tests but inline asm is currently | |
| 3963 | + # not supported (build will fail) | |
| 3954 | 3964 | disable inline_asm |
| 3955 | 3965 | fi |
| 3956 | 3966 | fi |
| @@ -4273,10 +4283,10 @@ enabled movie_filter && prepend lavfi_libs "libavformat >= $LIBAVFORMAT_VERSI · 316 unmodified lines | ||
| 4273 | 4283 | enabled resample_filter && prepend lavfi_libs "libavresample >= $LIBAVRESAMPLE_VERSION," |
| 4274 | 4284 | enabled scale_filter && prepend lavfi_libs "libswscale >= $LIBSWSCALE_VERSION," |
| 4275 | 4285 | |
| 4276 | −pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION" "$LIBM" | |
| 4277 | −pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION" | |
| 4278 | −pkgconfig_generate libavformat "Libav container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION" | |
| 4279 | −pkgconfig_generate libavdevice "Libav device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION" | |
| 4280 | −pkgconfig_generate libavfilter "Libav video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$lavfi_libs" | |
| 4286 | +pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION" "$LIBM" | |
| 4287 | +pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION" | |
| 4288 | +pkgconfig_generate libavformat "Libav container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION" | |
| 4289 | +pkgconfig_generate libavdevice "Libav device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION" | |
| 4290 | +pkgconfig_generate libavfilter "Libav video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$lavfi_libs" | |
| 4281 | 4291 | pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION" |
| 4282 | −pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION" | |
| 4292 | +pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION" | |