From de1e483397bfe06b531adbdcd84c8d3d77d30a13 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 1 May 2012 12:39:14 +0200 Subject: 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. --- configure | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'configure') 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" -- cgit v1.2.3