[Development] qt5.8 : configuring the use of PulseAudio and/or GStreamer (and libGL ...)

René J. V. Bertin rjvbertin at gmail.com
Wed Jan 18 13:28:14 CET 2017


Seems the configure process also picks up the X11 libGL when it's available.

I used to protect against that in the configure script, but the OpenGL detection 
logic has been moved from out of there, too :-/


diff --git a/qtbase/configure b/qtbase/configure
index 0b8b417..91c6bc1 100755
--- a/qtbase/configure
+++ b/qtbase/configure
@@ -5310,8 +5310,19 @@ if [ "$XPLATFORM_MAC" = "yes" ]; then
 fi
 
 # auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher)
+doOpenGLTest() {
+    if [ "$QT_QPA_DEFAULT_PLATFORM" = "cocoa" ] || [ "$QT_QPA_DEFAULT_PLATFORM" 
= "" -a "$XPLATFORM_MAC" = "yes" ]; then
+        # QT_QPA_DEFAULT_PLATFORM is either empty or set by the user, so we 
have to check 
+        # both manually and automatically selected cocoa. It qpa=cocoa, we do 
NOT want to
+        # use pkg-config to find the OpenGL libraries because it's too likely 
to find
+        # OpenGL libraries that are not the system frameworks appropriate for 
cocoa mode.
+        compileTest unix/opengldesktop "OpenGL"
+    else
+        compileTestWithPkgConfig gl unix/opengldesktop "OpenGL" OPENGL
+    fi
+}
 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
-    if compileTestWithPkgConfig gl unix/opengldesktop "OpenGL" OPENGL; then
+    if doOpenGLTest; then
         CFG_OPENGL=desktop
     elif compileTestWithPkgConfig glesv2 unix/opengles2 "OpenGL ES 2.0" 
OPENGL_ES2; then
         CFG_OPENGL=es2
@@ -5339,7 +5350,7 @@ elif [ "$CFG_OPENGL" = "es2" ]; then
     fi
 elif [ "$CFG_OPENGL" = "desktop" ]; then
     # Desktop OpenGL support
-    compileTestWithPkgConfig gl unix/opengldesktop "OpenGL" OPENGL
+    doOpenGLTest
     if [ $? != "0" ]; then
         echo "The OpenGL functionality test failed!"
         echo " You might need to modify the include and library search paths by 
editing"





More information about the Development mailing list