X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=e8470ae236ba4f1a3ab3ca9c4da6bceafa6f30f0;hb=a050f56c0903c718d8ef0b14dc09195785fdf564;hp=54237fa65a0efb534daa4fc0108853b56ae9106b;hpb=68e479e3ada8ebdb8f2fdb2f339cc9992757eb85;p=ffmpeg diff --git a/configure b/configure index 54237fa65a0..e8470ae236b 100755 --- a/configure +++ b/configure @@ -462,7 +462,6 @@ EOF exit 0 } -quotes='""' if test -t 1 && which tput >/dev/null 2>&1; then ncolors=$(tput colors) if test -n "$ncolors" && test $ncolors -ge 8; then @@ -639,13 +638,13 @@ disable_weak(){ enable_sanitized(){ for var; do - enable $(echo "$var" | sed 's/[^A-Za-z0-9_]/_/g') + enable $(sanitize_var_name $var) done } disable_sanitized(){ for var; do - disable $(echo "$var" | sed 's/[^A-Za-z0-9_]/_/g') + disable $(sanitize_var_name $var) done } @@ -678,17 +677,17 @@ enable_deep_weak(){ } requested(){ - test "${1#!}" = "$1" && op='=' || op=!= + test "${1#!}" = "$1" && op="=" || op="!=" eval test "x\$${1#!}_requested" $op "xyes" } enabled(){ - test "${1#!}" = "$1" && op='=' || op=!= + test "${1#!}" = "$1" && op="=" || op="!=" eval test "x\$${1#!}" $op "xyes" } disabled(){ - test "${1#!}" = "$1" && op='=' || op=!= + test "${1#!}" = "$1" && op="=" || op="!=" eval test "x\$${1#!}" $op "xno" } @@ -1081,6 +1080,7 @@ check_objcflags(){ test_ldflags(){ log test_ldflags "$@" + set -- $($ldflags_filter "$@") check_ld "cc" "$@" </dev/null | grep -Eq 'TMS470|TI ARM'; then - _type=tms470 - _ident=$($_cc -version | head -n1 | tr -s ' ') - _flags='--gcc --abi=eabi -me' - _cc_e='-ppl -fe=$@' - _cc_o='-fe=$@' - _depflags='-ppa -ppd=$(@:.o=.d)' - _cflags_speed='-O3 -mf=5' - _cflags_size='-O3 -mf=2' - _flags_filter=tms470_flags elif $_cc -v 2>&1 | grep -q clang; then _type=clang _ident=$($_cc --version 2>/dev/null | head -n1) @@ -4275,14 +4239,6 @@ probe_cc(){ _cflags_speed='-O2' _cflags_size='-Os' _flags_filter='filter_out -Wdisabled-optimization|-Wtype-limits|-fno-signed-zeros' - elif $_cc -V 2>&1 | grep -q Portland; then - _type=pgi - _ident="PGI $($_cc -V 2>&1 | awk '/^pgcc/ { print $2; exit }')" - opt_common='-alias=ansi -Mdse -Mlre -Mpre' - _cflags_speed="-O3 -Mautoinline -Munroll=c:4 $opt_common" - _cflags_size="-O2 -Munroll=c:1 $opt_common" - _cflags_noopt="-O" - _flags_filter=pgi_flags elif $_cc 2>&1 | grep -q 'Microsoft.*ARM.*Assembler'; then _type=armasm _ident=$($_cc | head -n1) @@ -4431,12 +4387,6 @@ fi if $ar 2>&1 | grep -q Microsoft; then arflags="-nologo" ar_o='-out:$@' -elif $ar 2>&1 | grep -q 'Texas Instruments'; then - arflags="rq" - ar_o='$@' -elif $ar 2>&1 | grep -q 'Usage: ar.*-X.*any'; then - arflags='-Xany -r -c' - ar_o='$@' elif $ar 2>&1 | grep -q "\[D\] "; then arflags="rcD" ar_o='$@' @@ -4456,10 +4406,6 @@ if test -n "$sysroot"; then add_cppflags --sysroot="$sysroot" add_ldflags --sysroot="$sysroot" ;; - tms470) - add_cppflags -I"$sysinclude" - add_ldflags --sysroot="$sysroot" - ;; esac fi @@ -4887,59 +4833,52 @@ check_64bit(){ expr=$3 check_code cc "" "int test[2*($expr) - 1]" && subarch=$arch64 || subarch=$arch32 + enable $subarch } case "$arch" in aarch64|alpha|ia64) - spic=$shared + enabled shared && enable_weak pic ;; mips) check_64bit mips mips64 '_MIPS_SIM > 1' - spic=$shared + enabled shared && enable_weak pic ;; parisc) check_64bit parisc parisc64 'sizeof(void *) > 4' - spic=$shared + enabled shared && enable_weak pic ;; ppc) check_64bit ppc ppc64 'sizeof(void *) > 4' - spic=$shared + enabled shared && enable_weak pic ;; s390) check_64bit s390 s390x 'sizeof(void *) > 4' - spic=$shared + enabled shared && enable_weak pic ;; sparc) check_64bit sparc sparc64 'sizeof(void *) > 4' - spic=$shared + enabled shared && enable_weak pic ;; x86) check_64bit x86_32 x86_64 'sizeof(void *) > 4' - # Treat x32 as x64 for now. Note it also needs spic=$shared + # Treat x32 as x64 for now. Note it also needs pic if shared test "$subarch" = "x86_32" && check_cpp_condition stddef.h 'defined(__x86_64__)' && - subarch=x86_64 - if test "$subarch" = "x86_64"; then - spic=$shared + subarch=x86_64 && enable x86_64 && disable x86_32 + if enabled x86_64; then + enabled shared && enable_weak pic + objformat=elf64 fi ;; - ppc) - check_cc < ffbuild/config.fate - check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable_weak pic set_default libdir @@ -5860,16 +5779,13 @@ if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then enable pthreads fi check_code cc "pthread.h" "static pthread_mutex_t atomic_lock = PTHREAD_MUTEX_INITIALIZER" || disable pthreads -fi - -if enabled pthreads; then - check_func pthread_cancel $pthreads_extralibs + if enabled pthreads; then + check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); sem_timedwait(s,0); sem_destroy(s)" $pthreads_extralibs + check_func pthread_cancel $pthreads_extralibs + fi fi -enabled pthreads && - check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); sem_timedwait(s,0); sem_destroy(s)" $pthreads_extralibs - enabled zlib && check_lib zlib zlib.h zlibVersion -lz enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2 enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma @@ -5991,22 +5907,22 @@ enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h enabled libvpx && { enabled libvpx_vp8_decoder && { - check_pkg_config libvpx_vp8_decoder "vpx >= 0.9.1" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx || - check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_dec_init_ver -lvpx || - die "ERROR: libvpx decoder version must be >=0.9.1"; + check_pkg_config libvpx_vp8_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx || + check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_dec_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -lvpx || + die "ERROR: libvpx decoder version must be >=1.4.0"; } enabled libvpx_vp8_encoder && { - check_pkg_config libvpx_vp8_encoder "vpx >= 0.9.7" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx || - check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VP8E_SET_MAX_INTRA_BITRATE_PCT" -lvpx || - die "ERROR: libvpx encoder version must be >=0.9.7"; + check_pkg_config libvpx_vp8_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx || + check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -lvpx || + die "ERROR: libvpx encoder version must be >=1.4.0"; } enabled libvpx_vp9_decoder && { - check_pkg_config libvpx_vp9_decoder "vpx >= 1.3.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx || - check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx + check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx || + check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx } enabled libvpx_vp9_encoder && { - check_pkg_config libvpx_vp9_encoder "vpx >= 1.3.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx || - check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VP9E_SET_AQ_MODE" -lvpx + check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx || + check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx } if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then die "libvpx enabled but no supported decoders found" @@ -6118,9 +6034,12 @@ fi enabled securetransport && check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && - check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" || + check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" || disable securetransport +enabled securetransport && + check_func SecItemImport "-Wl,-framework,CoreFoundation -Wl,-framework,Security" + enabled schannel && check_func_headers "windows.h security.h" InitializeSecurityContext -DSECURITY_WIN32 -lsecur32 && check_cpp_condition winerror.h "defined(SEC_I_CONTEXT_EXPIRED)" && @@ -6375,6 +6294,7 @@ if enabled proper_dce; then echo "X { local: *; };" > $TMPV if test_ldflags -Wl,${version_script},$TMPV; then append SHFLAGS '-Wl,${version_script},\$(SUBDIR)lib\$(NAME).ver' + quotes='""' check_cc < Makefile +esc(){ + echo "$*" | sed 's/%/%25/g;s/:/%3a/g' +} + +echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $FFMPEG_CONFIGURATION)" > ffbuild/config.fate + enabled stripping || strip="echo skipping strip" enabled stripping || striptype="" @@ -6857,6 +6789,7 @@ endif CC_IDENT=$cc_ident ARCH=$arch INTRINSICS=$intrinsics +EXTERN_PREFIX=$extern_prefix CC=$cc CXX=$cxx AS=$as @@ -6902,7 +6835,6 @@ LD_O=$LD_O X86ASM_O=$X86ASM_O LD_LIB=$LD_LIB LD_PATH=$LD_PATH -DLLTOOL=$dlltool WINDRES=$windres DEPWINDRES=$dep_cc DOXYGEN=$doxygen @@ -6956,7 +6888,6 @@ LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD EXTRALIBS=$extralibs COMPAT_OBJS=$compat_objs INSTALL=$install -LIBTARGET=${LIBTARGET} SLIBNAME=${SLIBNAME} SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION} SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR} @@ -7006,7 +6937,9 @@ test -n "$malloc_prefix" && if enabled x86asm; then append config_files $TMPASM - printf '' >$TMPASM + cat > $TMPASM <> $TMPH @@ -7033,7 +6966,7 @@ touch ffbuild/.config enabled x86asm && cp_if_changed $TMPASM config.asm cat > $TMPH < ffbuild/config.sh < $TMPH <> ffbuild/config.sh + echo ${lib}_deps=\"$lib_deps\" >> $TMPH done + +cp_if_changed $TMPH ffbuild/config.sh