summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2012-01-24 11:34:42 -0500
committerMatt Turner <[email protected]>2012-01-24 11:34:42 -0500
commit027ce0c493a85c863df88b43f61aea34bcd4cd58 (patch)
treef845bb4ce46ffe9dfa3e77ed88f51d4e354ade96 /configure.ac
parenta208468e04353239f2876cc2013f860b48a4f1c1 (diff)
Revert "Always build shared glapi"
This reverts commit adefee50d954151f76150af80207081ae3c247d9. Shared glapi was never tested with --enable-xlib-glx and turns out to cause a lot of problems. Conflicts: configure.ac
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 27 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index f68a54fe5ad..18a40fceade 100644
--- a/configure.ac
+++ b/configure.ac
@@ -703,6 +703,18 @@ if test "x$enable_gles2" = xyes; then
fi
AC_SUBST([API_DEFINES])
+AC_ARG_ENABLE([shared-glapi],
+ [AS_HELP_STRING([--enable-shared-glapi],
+ [EXPERIMENTAL. Enable shared glapi for OpenGL @<:@default=no@:>@])],
+ [enable_shared_glapi="$enableval"],
+ [enable_shared_glapi=no])
+
+SHARED_GLAPI="0"
+if test "x$enable_shared_glapi" = xyes; then
+ SHARED_GLAPI="1"
+fi
+AC_SUBST([SHARED_GLAPI])
+
dnl
dnl Driver configuration. Options are xlib, dri and osmesa right now.
dnl More later: fbdev, ...
@@ -788,7 +800,7 @@ dnl Driver specific build directories
dnl
dnl this variable will be prepended to SRC_DIRS and is not exported
-CORE_DIRS="mapi/shared-glapi"
+CORE_DIRS=""
SRC_DIRS=""
GLU_DIRS="sgi"
@@ -798,6 +810,13 @@ GALLIUM_WINSYS_DIRS="sw"
GALLIUM_DRIVERS_DIRS="galahad trace rbug noop identity"
GALLIUM_STATE_TRACKERS_DIRS=""
+# build shared-glapi if enabled for OpenGL or if OpenGL ES is enabled
+case "x$enable_shared_glapi$enable_gles1$enable_gles2" in
+x*yes*)
+ CORE_DIRS="$CORE_DIRS mapi/shared-glapi"
+ ;;
+esac
+
# build glapi if OpenGL is enabled
if test "x$enable_opengl" = xyes; then
CORE_DIRS="$CORE_DIRS mapi/glapi"
@@ -1365,6 +1384,13 @@ if test "x$enable_gbm" = xyes; then
PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
AC_MSG_ERROR([gbm needs udev]))
+
+ if test "x$enable_dri" = xyes; then
+ GBM_BACKEND_DIRS="$GBM_BACKEND_DIRS dri"
+ if test "$SHARED_GLAPI" -eq 0; then
+ AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
+ fi
+ fi
fi
GBM_PC_REQ_PRIV="libudev"
GBM_PC_LIB_PRIV="$DLOPEN_LIBS"