[PATCH] put patented features under configure enable switch

Lucas Stach dev at lynxeye.de
Sun Mar 6 04:54:51 PST 2011


Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
 configure.ac               |   19 +++++++++++++++++++
 src/mesa/main/extensions.c |    6 ++++++
 2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index d33ca30..4590046 100644
--- a/configure.ac
+++ b/configure.ac
@@ -319,6 +319,25 @@ else
     esac
 fi
 
+dnl
+dnl patented features
+dnl
+AC_ARG_ENABLE([patented],
+    [AS_HELP_STRING([--enable-patented],
+        [enables patented OpenGL features @<:@default=disabled@:>@])],
+    [enable_patented="$enableval"],
+    [enable_patented=no]
+)
+if test "x$enable_patented" = xyes; then
+    DEFINES="$DEFINES -DENABLE_PATENTED"
+    if test "x$GCC" = xyes; then
+        CFLAGS="$CFLAGS -g"
+    fi
+    if test "x$GXX" = xyes; then
+        CXXFLAGS="$CXXFLAGS -g"
+    fi
+fi
+
 GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION}
 GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION}
 GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION}
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 1d408aa..12ddd8c 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -75,7 +75,9 @@ static const struct extension extension_table[] = {
    /* ARB Extensions */
    { "GL_ARB_ES2_compatibility",                   o(ARB_ES2_compatibility),                   GL             },
    { "GL_ARB_blend_func_extended",                 o(ARB_blend_func_extended),                 GL             },
+#ifdef ENABLE_PATENTED
    { "GL_ARB_color_buffer_float",                  o(ARB_color_buffer_float),                  GL             },
+#endif
    { "GL_ARB_copy_buffer",                         o(ARB_copy_buffer),                         GL             },
    { "GL_ARB_depth_buffer_float",                  o(ARB_depth_buffer_float),                  GL             },
    { "GL_ARB_depth_clamp",                         o(ARB_depth_clamp),                         GL             },
@@ -120,7 +122,9 @@ static const struct extension extension_table[] = {
    { "GL_ARB_texture_env_combine",                 o(ARB_texture_env_combine),                 GL             },
    { "GL_ARB_texture_env_crossbar",                o(ARB_texture_env_crossbar),                GL             },
    { "GL_ARB_texture_env_dot3",                    o(ARB_texture_env_dot3),                    GL             },
+#ifdef ENABLE_PATENTED
    { "GL_ARB_texture_float",                       o(ARB_texture_float),                       GL             },
+#endif
    { "GL_ARB_texture_mirrored_repeat",             o(ARB_texture_mirrored_repeat),             GL             },
    { "GL_ARB_texture_multisample",                 o(ARB_texture_multisample),                 GL             },
    { "GL_ARB_texture_non_power_of_two",            o(ARB_texture_non_power_of_two),            GL             },
@@ -261,7 +265,9 @@ static const struct extension extension_table[] = {
    { "GL_ATI_fragment_shader",                     o(ATI_fragment_shader),                     GL             },
    { "GL_ATI_separate_stencil",                    o(ATI_separate_stencil),                    GL             },
    { "GL_ATI_texture_env_combine3",                o(ATI_texture_env_combine3),                GL             },
+#ifdef ENABLE_PATENTED
    { "GL_ATI_texture_float",                       o(ARB_texture_float),                       GL             },
+#endif
    { "GL_ATI_texture_mirror_once",                 o(ATI_texture_mirror_once),                 GL             },
    { "GL_IBM_multimode_draw_arrays",               o(IBM_multimode_draw_arrays),               GL             },
    { "GL_IBM_rasterpos_clip",                      o(IBM_rasterpos_clip),                      GL             },
-- 
1.7.4


--=-vN3HQAun7gtmJJe+R/3O--



More information about the mesa-dev mailing list