You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
2.0 KiB

  1. --- a/configure
  2. +++ b/configure
  3. @@ -3791,20 +3791,20 @@ cws2fws_extralibs="zlib_extralibs"
  4. # libraries, in any order
  5. avcodec_deps="avutil"
  6. -avcodec_suggest="libm"
  7. +avcodec_suggest="libm stdatomic"
  8. avdevice_deps="avformat avcodec avutil"
  9. -avdevice_suggest="libm"
  10. +avdevice_suggest="libm stdatomic"
  11. avfilter_deps="avutil"
  12. -avfilter_suggest="libm"
  13. +avfilter_suggest="libm stdatomic"
  14. avformat_deps="avcodec avutil"
  15. -avformat_suggest="libm network zlib"
  16. -avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt"
  17. +avformat_suggest="libm network zlib stdatomic"
  18. +avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt stdatomic"
  19. postproc_deps="avutil gpl"
  20. -postproc_suggest="libm"
  21. +postproc_suggest="libm stdatomic"
  22. swresample_deps="avutil"
  23. -swresample_suggest="libm libsoxr"
  24. +swresample_suggest="libm libsoxr stdatomic"
  25. swscale_deps="avutil"
  26. -swscale_suggest="libm"
  27. +swscale_suggest="libm stdatomic"
  28. avcodec_extralibs="pthreads_extralibs iconv_extralibs dxva2_extralibs"
  29. avfilter_extralibs="pthreads_extralibs"
  30. @@ -6321,7 +6321,14 @@ check_headers asm/types.h
  31. # it seems there are versions of clang in some distros that try to use the
  32. # gcc headers, which explodes for stdatomic
  33. # so we also check that atomics actually work here
  34. -check_builtin stdatomic stdatomic.h "atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0); foo += bar"
  35. +#
  36. +# some configurations also require linking to libatomic, so try
  37. +# both with -latomic and without
  38. +for LATOMIC in "-latomic" ""; do
  39. + check_builtin stdatomic stdatomic.h \
  40. + "atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0); foo += bar" \
  41. + $LATOMIC && eval stdatomic_extralibs="\$LATOMIC" && break
  42. +done
  43. check_lib advapi32 "windows.h" RegCloseKey -ladvapi32
  44. check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt &&