summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2012-05-01 12:39:14 +0200
committerUoti Urpala <uau@mplayer2.org>2012-05-17 17:21:57 +0300
commitde1e483397bfe06b531adbdcd84c8d3d77d30a13 (patch)
treed0bbcf16a001fa2a34bbea88d5268e58e4a9bb63 /configure
parentf9beb08a61f5c631bab5c2e06e1ce44aea80dc10 (diff)
downloadmpv-de1e483397bfe06b531adbdcd84c8d3d77d30a13.tar.bz2
mpv-de1e483397bfe06b531adbdcd84c8d3d77d30a13.tar.xz
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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 11 insertions, 9 deletions
diff --git a/configure b/configure
index 6e90b4861d..53669f9102 100755
--- a/configure
+++ b/configure
@@ -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"