Title: [153885] trunk
Revision
153885
Author
[email protected]
Date
2013-08-09 05:46:05 -0700 (Fri, 09 Aug 2013)

Log Message

[Automake] Clean up OpenGL graphics configuration sections
https://bugs.webkit.org/show_bug.cgi?id=119554

Reviewed by Martin Robinson.

Clean up sections in the Automake configuration process that are configuring the OpenGL graphics
features and dependencies. Remove unnecessary variable assignments, merge similar code paths,
clarify a couple of comments and error messages and fix a few whitespace problems.

* Source/autotools/FindDependencies.m4:
* Source/autotools/ReadCommandLineArguments.m4:
* Source/autotools/SetupAutomake.m4:

Modified Paths

Diff

Modified: trunk/ChangeLog (153884 => 153885)


--- trunk/ChangeLog	2013-08-09 12:11:20 UTC (rev 153884)
+++ trunk/ChangeLog	2013-08-09 12:46:05 UTC (rev 153885)
@@ -1,3 +1,18 @@
+2013-08-09  Zan Dobersek  <[email protected]>
+
+        [Automake] Clean up OpenGL graphics configuration sections
+        https://bugs.webkit.org/show_bug.cgi?id=119554
+
+        Reviewed by Martin Robinson.
+
+        Clean up sections in the Automake configuration process that are configuring the OpenGL graphics
+        features and dependencies. Remove unnecessary variable assignments, merge similar code paths,
+        clarify a couple of comments and error messages and fix a few whitespace problems.
+
+        * Source/autotools/FindDependencies.m4:
+        * Source/autotools/ReadCommandLineArguments.m4:
+        * Source/autotools/SetupAutomake.m4:
+
 2013-08-04  Sam Weinig  <[email protected]>
 
         Remove support for HTML5 MicroData

Modified: trunk/Source/autotools/FindDependencies.m4 (153884 => 153885)


--- trunk/Source/autotools/FindDependencies.m4	2013-08-09 12:11:20 UTC (rev 153884)
+++ trunk/Source/autotools/FindDependencies.m4	2013-08-09 12:46:05 UTC (rev 153885)
@@ -187,9 +187,6 @@
 AC_SUBST(CAIRO_CFLAGS)
 AC_SUBST(CAIRO_LIBS)
 
-
-found_opengl=no
-have_glx=no
 AC_CHECK_HEADERS([GL/glx.h], [have_glx="yes"], [have_glx="no"])
 AC_MSG_CHECKING([whether to enable GLX support])
 if test "$enable_glx" != "no"; then
@@ -205,7 +202,6 @@
 fi
 AC_MSG_RESULT([$enable_glx])
 
-have_egl=no
 AC_CHECK_HEADERS([EGL/egl.h], [have_egl="yes"], [have_egl="no"])
 AC_MSG_CHECKING([whether to enable EGL support])
 if test "$enable_egl" != "no"; then
@@ -221,19 +217,18 @@
 fi
 AC_MSG_RESULT([$enable_egl])
 
-have_gles2=no
 AC_CHECK_HEADERS([GLES2/gl2.h], [have_gles2="yes"], [have_gles2="no"])
 AC_MSG_CHECKING([whether to use OpenGL ES 2 support])
 if test "$enable_glx" = "yes"; then
     if test "$enable_gles2" = "yes"; then
-        AC_MSG_ERROR([Cannot enable OpenGL ES 2 support with GLX])
+        AC_MSG_ERROR([Cannot enable OpenGL ES 2 support with GLX enabled.])
     else
         enable_gles2=no
     fi
 fi
 if test "$enable_egl" = "no"; then
     if test "$enable_gles2" = "yes"; then
-        AC_MSG_ERROR([Cannot enable OpenGL ES 2 support without EGL])
+        AC_MSG_ERROR([Cannot enable OpenGL ES 2 support without EGL enabled.])
     else
         enable_gles2=no
     fi
@@ -241,18 +236,20 @@
 if test "$enable_gles2" != "no"; then
     if test "$have_gles2" = "no"; then
         if test "$enable_gles2" = "yes"; then
-            AC_MSG_ERROR([--enable-gles2 specified, but not available])
+            AC_MSG_ERROR([--enable-gles2 specified, but not available.])
         else
             enable_gles2=no
         fi
-   else
+    else
         enable_gles2=yes
-        found_opengl=yes
-   fi
+    fi
 fi
 AC_MSG_RESULT([$enable_gles2])
 
-if test "$enable_gles2" != "yes"; then
+found_opengl=no
+if test "$enable_gles2" = "yes"; then
+    found_opengl=yes
+else
     AC_CHECK_HEADERS([GL/gl.h], [found_opengl="yes"], [])
 fi
 
@@ -265,28 +262,25 @@
     AC_SUBST(XDAMAGE_LIBS)
 fi
 
-# OpenGL is turned on by default if available (along with WebGL and accelerated compositing).
-if test "$enable_webgl" = "auto"; then
-    if test "$found_opengl" = yes; then
-        enable_webgl="yes";
+if test "$enable_webgl" != "no"; then
+    if test "$found_opengl" = "yes"; then
+        enable_webgl=yes
     else
-        enable_webgl="no";
+        if test "$enable_webgl" = "yes"; then
+            AC_MSG_ERROR([OpenGL support must be present to enable WebGL.])
+        fi
+        enable_webgl=no
     fi
 fi
 
-if test "$enable_webgl" = "yes" && test "$found_opengl" != "yes"; then
-    AC_MSG_ERROR([OpenGL must be active to use WebGL.])
-fi;
-
-if test "$enable_accelerated_compositing" = "yes" && test "$found_opengl" != "yes"; then
-    AC_MSG_ERROR([OpenGL must be active to use accelerated compositing.])
-fi
-
-if test "$enable_accelerated_compositing" = "auto"; then
+if test "$enable_accelerated_compositing" != "no"; then
     if test "$found_opengl" = "yes"; then
-        enable_accelerated_compositing="yes";
+        enable_accelerated_compositing=yes
     else
-        enable_accelerated_compositing="no";
+        if test "$enable_accelerated_compositing" = "yes"; then
+            AC_MSG_ERROR([OpenGL support must be present to enable accelerated compositing.])
+        fi
+        enable_accelerated_compositing=no
     fi
 fi
 
@@ -435,10 +429,8 @@
 
     # Check whether dlopen() is in the core libc like on FreeBSD, or in a separate
     # libdl like on GNU/Linux (in which case we want to link to libdl).
-    AC_CHECK_FUNC([dlopen], [], [AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
-    AC_SUBST([DLOPEN_LIBS])
+    AC_CHECK_FUNC([dlopen], [], [AC_CHECK_LIB([dl], [dlopen], [OPENGL_LIBS="$OPENGL_LIBS -ldl"])])
 
-    OPENGL_LIBS="$OPENGL_LIBS $DLOPEN_LIBS"
     acceleration_description="$acceleration_description)"
 fi
 AC_SUBST([OPENGL_LIBS])

Modified: trunk/Source/autotools/ReadCommandLineArguments.m4 (153884 => 153885)


--- trunk/Source/autotools/ReadCommandLineArguments.m4	2013-08-09 12:11:20 UTC (rev 153884)
+++ trunk/Source/autotools/ReadCommandLineArguments.m4	2013-08-09 12:46:05 UTC (rev 153885)
@@ -169,14 +169,14 @@
 AC_MSG_RESULT([$enable_debug_symbols])
 
 AC_MSG_CHECKING([whether to enable WebGL support])
-AC_ARG_ENABLE(webgl, AC_HELP_STRING([--enable-webgl], [enable support for WebGL [default=check]]),
+AC_ARG_ENABLE(webgl, AC_HELP_STRING([--enable-webgl], [enable support for WebGL [default=auto]]),
     [],
     [enable_webgl="auto"])
 AC_MSG_RESULT([$enable_webgl])
 
 AC_MSG_CHECKING([whether to enable accelerated compositing support])
 AC_ARG_ENABLE(accelerated_compositing,
-    AC_HELP_STRING([--enable-accelerated-compositing], [enable support for accelerated compositing [default=check]]),
+    AC_HELP_STRING([--enable-accelerated-compositing], [enable support for accelerated compositing [default=auto]]),
     [],
     [enable_accelerated_compositing="auto"])
 AC_MSG_RESULT([$enable_accelerated_compositing])

Modified: trunk/Source/autotools/SetupAutomake.m4 (153884 => 153885)


--- trunk/Source/autotools/SetupAutomake.m4	2013-08-09 12:11:20 UTC (rev 153884)
+++ trunk/Source/autotools/SetupAutomake.m4	2013-08-09 12:46:05 UTC (rev 153885)
@@ -37,14 +37,13 @@
 
 # Accelerated compositing conditionals.
 AM_CONDITIONAL([USE_ACCELERATED_COMPOSITING], [test "$enable_accelerated_compositing" = "yes"])
-AM_CONDITIONAL([USE_TEXTURE_MAPPER_GL],
-    [test "$enable_accelerated_compositing" = "yes" && test "$found_opengl" = "yes"])
+AM_CONDITIONAL([USE_TEXTURE_MAPPER_GL], [test "$enable_accelerated_compositing" = "yes" && test "$found_opengl" = "yes"])
 
-# These are the same for now, but they will soon be separate.
-AM_CONDITIONAL([USE_OPENGL], [test "$found_opengl" = "yes"])
+# OpenGL graphics conditionals.
+AM_CONDITIONAL([USE_GLX], [test "$enable_glx" = "yes"])
 AM_CONDITIONAL([USE_EGL], [test "$enable_egl" = "yes"])
+AM_CONDITIONAL([USE_OPENGL], [test "$found_opengl" = "yes"])
 AM_CONDITIONAL([USE_GLES2], [test "$enable_gles2" = "yes"])
-AM_CONDITIONAL([USE_GLX], [test "$enable_glx" = "yes"])
 
 # WebKit feature conditionals.
 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug" = "yes"])
@@ -59,4 +58,3 @@
 
 # Introspection conditional.
 AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"])
-
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to