mirror of https://github.com/mpv-player/mpv
configure: don't enable GL/X11 without X11
The OpenGL autodetection checked for all backends regardless of which
features had been enabled previously. Stop checking for X11 backend if
X11 support is disabled, and stop checking for w32 backend if we are
not on Windows.
This makes the changes in commit 3862d469ae
("configure: OSX: check
for X11 header conflict with corevideo") work as intended. That commit
disabled X11 when a header conflict was detected, but the GL X11
backend could still be autodetected despite that and trigger a
compilation failure.
This commit is contained in:
parent
f9beb08a61
commit
de1e483397
|
@ -4518,15 +4518,17 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
EOF
|
||||
_gl=no
|
||||
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
|
||||
if test "$_x11" = yes ; then
|
||||
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
|
||||
fi
|
||||
if win32 && cc_check -DGL_WIN32 -lopengl32 ; then
|
||||
_gl=yes
|
||||
_gl_win32=yes
|
||||
libs_mplayer="$libs_mplayer -lopengl32 -lgdi32"
|
||||
|
|
Loading…
Reference in New Issue