diff options
author | KO Myung-Hun <komh@chollian.net> | 2017-12-28 23:41:30 +0900 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-01-07 00:09:40 -0300 |
commit | d03c39b46b21c893d6549a532289b7fb9935b3fc (patch) | |
tree | 1c1b4cb64f17702bc9b99b16d0519fabbd9c4178 /configure | |
parent | 9e68f472ec5d07538ea2f86c66f6ff534583028c (diff) | |
download | ffmpeg-streaming-d03c39b46b21c893d6549a532289b7fb9935b3fc.zip ffmpeg-streaming-d03c39b46b21c893d6549a532289b7fb9935b3fc.tar.gz |
configure: check SDL2 function with a header
SDL2 uses SDLCALL to specify a calling convention. On OS/2, it's defined
to `_System' which is similar to `_cdecl' but does not prepend '_'.
After all, without a header, a function is used without `_System'. And
linker will try to `_func' but fail because the function is `func' not
`_func'.
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6009,14 +6009,14 @@ fi if enabled sdl2; then SDL2_CONFIG="${cross_prefix}sdl2-config" if test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 2.1.0" SDL_events.h SDL_PollEvent; then - check_func SDL_Init $sdl2_extralibs $sdl2_cflags || + check_func_headers SDL.h SDL_Init $sdl2_extralibs $sdl2_cflags || disable sdl2 elif "${SDL2_CONFIG}" --version > /dev/null 2>&1; then sdl2_cflags=$("${SDL2_CONFIG}" --cflags) sdl2_extralibs=$("${SDL2_CONFIG}" --libs) check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && - check_func SDL_Init $sdl2_extralibs $sdl2_cflags && + check_func_headers SDL.h SDL_Init $sdl2_extralibs $sdl2_cflags && enable sdl2 fi if test $target_os = "mingw32"; then |