From 2663203cd6994166e107e796c4724a4ed3b59370 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Tue, 18 Jun 2013 18:03:05 +0100 Subject: [PATCH] configure.ac: Check for python at configure time when building XWin with AIGLX Check for python at configure time when building XWin with AIGLX, it's used to generate the wrapper code for native GL functions. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- configure.ac | 4 ++++ hw/xwin/glx/Makefile.am | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index d0d0fd7002..c6ecba4180 100644 --- a/configure.ac +++ b/configure.ac @@ -1944,6 +1944,10 @@ if test "x$XWIN" = xyes; then 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 + AC_CHECK_PROG(PYTHON, python, python) + if test -z "$PYTHON"; then + AC_MSG_ERROR([python not found]) + fi 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` diff --git a/hw/xwin/glx/Makefile.am b/hw/xwin/glx/Makefile.am index 59f6879a79..f969af277b 100644 --- a/hw/xwin/glx/Makefile.am +++ b/hw/xwin/glx/Makefile.am @@ -33,10 +33,10 @@ AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ if XWIN_GLX_WINDOWS generated_gl_wrappers.c: gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.spec $(KHRONOS_SPEC_DIR)/gl.tm - $(AM_V_GEN)$(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/gl.spec --typemap=$(KHRONOS_SPEC_DIR)/gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c + $(AM_V_GEN)$(PYTHON) $(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/gl.spec --typemap=$(KHRONOS_SPEC_DIR)/gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c generated_wgl_wrappers.c: gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/wglext.spec $(KHRONOS_SPEC_DIR)/wgl.tm - $(AM_V_GEN)$(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/wglext.spec --typemap=$(KHRONOS_SPEC_DIR)/wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c + $(AM_V_GEN)$(PYTHON) $(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/wglext.spec --typemap=$(KHRONOS_SPEC_DIR)/wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c endif BUILT_SOURCES = generated_gl_wrappers.c generated_wgl_wrappers.c