]> git.sesse.net Git - ffmpeg/commitdiff
configure: extend the check for bcrypt
authorJames Almer <jamrial@gmail.com>
Sun, 15 Apr 2018 23:33:37 +0000 (20:33 -0300)
committerJames Almer <jamrial@gmail.com>
Mon, 16 Apr 2018 13:20:46 +0000 (10:20 -0300)
Some old mingw-w64 builds seem to provide an incomplete implementation
of the API. Add an extra check to make sure it's disabled for those.

Signed-off-by: James Almer <jamrial@gmail.com>
configure

index a6f32f8d9abf23ec387e25434d4bff10669c0606..323a7dc0f6ff69a97856e6161cba91c1a4207bc9 100755 (executable)
--- a/configure
+++ b/configure
@@ -5828,7 +5828,8 @@ check_header asm/types.h
 check_builtin stdatomic stdatomic.h "atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0); foo += bar"
 
 check_lib advapi32 "windows.h"            RegCloseKey          -ladvapi32
-check_lib bcrypt   "windows.h bcrypt.h"   BCryptGenRandom      -lbcrypt
+check_lib bcrypt   "windows.h bcrypt.h"   BCryptGenRandom      -lbcrypt &&
+    check_cpp_condition bcrypt bcrypt.h "defined BCRYPT_RNG_ALGORITHM"
 check_lib ole32    "windows.h"            CoTaskMemFree        -lole32
 check_lib shell32  "windows.h shellapi.h" CommandLineToArgvW   -lshell32
 check_lib psapi    "windows.h psapi.h"    GetProcessMemoryInfo -lpsapi