summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2011-04-06 16:23:45 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2011-04-28 17:48:44 +0100
commita50878682cda541766c830e49ab406c78b38d903 (patch)
tree97d535a48894eb99eff3e98d2df98fe9be66e8ff /configure.ac
parentc5a612fc18a7f5c542fca580494e2c66ecfc2159 (diff)
configure: Look for Khronos OpenGL spec files using pkg-config
Look for Khronos OpenGL spec files using pkg-config, rather than downloading them Also add a --with-khronos-spec-dir=PATH configure option so XWin can be directed where to find these files without using the khronos-spec-files package XWin with AIGLX requires OpenGL spec files in order to generate wrapper code which: (1) thunks from the glapi dispatch table which uses the default cdecl calling convention to native GL functions using the stdcall calling convention. (2) performs function address lookup for OpenGL 1.2+ functions, which are treated as extensions and so not directly linkable. v2: KHRONOS_SPEC_DIR is only valid when XWIN_GLX_WINDOWS is defined. Avoid 'make dist' seeing invalid dependencies by only including rules using KHRONOS_SPEC_DIR if XWIN_GLX_WINDOWS is defined Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 30701b0cf..df2f9b62a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -598,6 +598,9 @@ AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with
GLX_USE_TLS=yes
fi])
AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
+AC_ARG_WITH(khronos-spec-dir, AS_HELP_STRING([--with-khronos-spec-dir=PATH], [Path to Khronos OpenGL registry database files (default: auto)]),
+ [KHRONOS_SPEC_DIR="${withval}"],
+ [KHRONOS_SPEC_DIR=auto])
dnl Extensions.
AC_ARG_ENABLE(registry, AS_HELP_STRING([--disable-registry], [Build string registry module (default: enabled)]), [XREGISTRY=$enableval], [XREGISTRY=yes])
@@ -1854,6 +1857,16 @@ if test "x$XWIN" = xyes; then
AC_DEFINE(DDXOSVERRORF, 1, [Use OsVendorVErrorF])
AC_DEFINE(DDXBEFORERESET, 1, [Use ddxBeforeReset ])
+
+dnl XWin with AIGLX requires OpenGL spec files in order to generate wrapper code for native GL functions
+ if [test "x$XWIN" = xyes && test "x$AIGLX" = xyes] ; then
+ if test "x$KHRONOS_SPEC_DIR" = "xauto" ; then
+ PKG_CHECK_MODULES([KHRONOS_OPENGL_REGISTRY], [khronos-opengl-registry])
+ KHRONOS_SPEC_DIR=`pkg-config khronos-opengl-registry --variable=specdir`
+ fi
+ AC_SUBST(KHRONOS_SPEC_DIR)
+ fi
+
fi
AM_CONDITIONAL(XWIN, [test "x$XWIN" = xyes])
AM_CONDITIONAL(XWIN_MULTIWINDOW, [test "x$XWIN" = xyes])