diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-04-27 13:42:33 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-04-28 14:36:28 -0400 |
commit | 0f68032a7cebe740421e5de4586d13c99a8728ab (patch) | |
tree | 1900e2d5b346b4c2a2f79694b2db35608587e017 | |
parent | 5efee4d4e68067a3fd85b9ff6a2636f502538768 (diff) |
configure.ac: Add options to enable GLES1/2 API support
-rw-r--r-- | configs/autoconf.in | 1 | ||||
-rw-r--r-- | configure.ac | 31 | ||||
-rw-r--r-- | src/mesa/Makefile | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/Makefile.template | 1 |
4 files changed, 34 insertions, 0 deletions
diff --git a/configs/autoconf.in b/configs/autoconf.in index b6cc9b3b73..c89441b251 100644 --- a/configs/autoconf.in +++ b/configs/autoconf.in @@ -14,6 +14,7 @@ ARCH_FLAGS = @ARCH_FLAGS@ ASM_FLAGS = @ASM_FLAGS@ PIC_FLAGS = @PIC_FLAGS@ DEFINES = @DEFINES@ +API_DEFINES = @API_DEFINES@ CFLAGS = @CPPFLAGS@ @CFLAGS@ \ $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ \ diff --git a/configure.ac b/configure.ac index 0e77707433..abb655135f 100644 --- a/configure.ac +++ b/configure.ac @@ -711,6 +711,37 @@ if test "x$with_dri_drivers" = x; then with_dri_drivers=no fi +dnl Determine which APIs to support +AC_ARG_ENABLE([opengl], + [AS_HELP_STRING([--disable-opengl], + [disable support for standard OpenGL API @<:@default=no@:>@])], + [enable_opengl="$enableval"], + [enable_opengl=yes]) +AC_ARG_ENABLE([gles1], + [AS_HELP_STRING([--enable-gles1], + [enable support for OpenGL ES 1.x API @<:@default=no@:>@])], + [enable_gles1="$enableval"], + [enable_gles1=no]) +AC_ARG_ENABLE([gles2], + [AS_HELP_STRING([--enable-gles2], + [enable support for OpenGL ES 2.x API @<:@default=no@:>@])], + [enable_gles2="$enableval"], + [enable_gles2=no]) + +API_DEFINES="" +if test "x$enable_opengl" = xno; then + API_DEFINES="$API_DEFINES -DFEATURE_GL=0" +else + API_DEFINES="$API_DEFINES -DFEATURE_GL=1" +fi +if test "x$enable_gles1" = xyes; then + API_DEFINES="$API_DEFINES -DFEATURE_ES1=1" +fi +if test "x$enable_gles2" = xyes; then + API_DEFINES="$API_DEFINES -DFEATURE_ES2=1" +fi +AC_SUBST([API_DEFINES]) + dnl If $with_dri_drivers is yes, directories will be added through dnl platform checks DRI_DIRS="" diff --git a/src/mesa/Makefile b/src/mesa/Makefile index e4040881f1..44e091f240 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -16,6 +16,7 @@ include sources.mak .S.o: $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ +CFLAGS += $(API_DEFINES) # Default: build dependencies, then asm_subdirs, GLSL built-in lib, diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template index 4cdd51efee..4b9a0c1786 100644 --- a/src/mesa/drivers/dri/Makefile.template +++ b/src/mesa/drivers/dri/Makefile.template @@ -31,6 +31,7 @@ SHARED_INCLUDES = \ -I$(TOP)/src/egl/drivers/dri \ $(LIBDRM_CFLAGS) +CFLAGS += $(API_DEFINES) ##### RULES ##### |