diff --git a/configure b/configure index c6c7c2efe6..1ef69d4bc1 100755 --- a/configure +++ b/configure @@ -4945,15 +4945,14 @@ int main(void) { } EOF _gl=no - if cc_check -lGL $_ld_lm ; then - _gl=yes - _gl_x11=yes - libs_mplayer="$libs_mplayer -lGL $_ld_dl" - elif cc_check -lGL $_ld_lm $_ld_pthread ; then - _gl=yes - _gl_x11=yes - libs_mplayer="$libs_mplayer -lGL $_ld_pthread $_ld_dl" - fi + for _ld_tmp in -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do + if cc_check $_ld_tmp $_ld_lm ; then + _gl=yes + _gl_x11=yes + libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl" + break + fi + done if cc_check -DGL_WIN32 -lopengl32 ; then _gl=yes _gl_win32=yes