[Mesa-dev] [PATCH 2/2] configure.ac: error out if python/mako is not found when required

Emil Velikov emil.l.velikov at gmail.com
Mon Mar 23 10:49:24 PDT 2015


In case of using a distribution tarball (or a dirty git tree) one can
have the generated sources locally. Make configure.ac error out
otherwise, to alert that about the unmet requirement(s) of python/mako.

Cc: Matt Turner <mattst88 at gmail.com>
Suggested-by: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 configure.ac | 45 +++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 43 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3e5b6f5..10a36cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,8 +123,49 @@ if test "x$INDENT" != "xcat"; then
 fi
 
 AX_CHECK_PYTHON_MAKO_MODULE($PYTHON_MAKO_REQUIRED)
-if test -n "$PYTHON2" -a "x$acv_mako_found" != "xyes"; then
-    AC_MSG_ERROR([Python mako module v$PYTHON_MAKO_REQUIRED or higher not found])
+
+if test -z "$PYTHON2"; then
+    if test ! -f "$srcdir/src/gallium/auxiliary/indices/u_indices_gen.c" -o \
+            ! -f "$srcdir/src/gallium/auxiliary/indices/u_unfilled_gen.c" -o \
+            ! -f "$srcdir/src/gallium/auxiliary/util/u_format_table.c" -o \
+            ! -f "$srcdir/src/glx/indirect.c" -o \
+            ! -f "$srcdir/src/glx/indirect.h" -o \
+            ! -f "$srcdir/src/glx/indirect_init.c" -o \
+            ! -f "$srcdir/src/glx/indirect_size.c" -o \
+            ! -f "$srcdir/src/glx/indirect_size.h" -o \
+            ! -f "$srcdir/src/mapi/es1api/glapi_mapi_tmp.h" -o \
+            ! -f "$srcdir/src/mapi/es2api/glapi_mapi_tmp.h" -o \
+            ! -f "$srcdir/src/mapi/glapi/glapi_mapi_tmp.h" -o \
+            ! -f "$srcdir/src/mapi/glapi/glprocs.h" -o \
+            ! -f "$srcdir/src/mapi/glapi/glapitemp.h" -o \
+            ! -f "$srcdir/src/mapi/glapi/glapitable.h" -o \
+            ! -f "$srcdir/src/mapi/glapi/glapi_gentable.c" -o \
+            ! -f "$srcdir/src/mapi/glapi/glapi_x86.S" -o \
+            ! -f "$srcdir/src/mapi/glapi/glapi_x86-64.S" -o \
+            ! -f "$srcdir/src/mapi/glapi/glapi_sparc.S" -o \
+            ! -f "$srcdir/src/mapi/shared-glapi/glapi_mapi_tmp.h" -o \
+            ! -f "$srcdir/src/mesa/drivers/dri/common/xmlpool/options.h" -o \
+            ! -f "$srcdir/src/mesa/main/enums.c" -o \
+            ! -f "$srcdir/src/mesa/main/api_exec.c" -o \
+            ! -f "$srcdir/src/mesa/main/dispatch.h" -o \
+            ! -f "$srcdir/src/mesa/main/format_info.h" -o \
+            ! -f "$srcdir/src/mesa/main/get_hash.h" -o \
+            ! -f "$srcdir/src/mesa/main/remap_helper.h" -o \
+            ! -f "$srcdir/src/util/format_srgb.c"; then
+        AC_MSG_ERROR([Python not found - unable to generate sources])
+    fi
+else
+    if test "x$acv_mako_found" = xno; then
+        if test ! -f "$srcdir/src/glsl/nir/nir_builder_opcodes.h" -o \
+                ! -f "$srcdir/src/glsl/nir/nir_constant_expressions.c" -o \
+                ! -f "$srcdir/src/glsl/nir/nir_opcodes.c" -o \
+                ! -f "$srcdir/src/glsl/nir/nir_opcodes.h" -o \
+                ! -f "$srcdir/src/glsl/nir/nir_opt_algebraic.c" -o \
+                ! -f "$srcdir/src/mesa/main/format_pack.c" -o \
+                ! -f "$srcdir/src/mesa/main/format_unpack.c"; then
+            AC_MSG_ERROR([Python mako module v$PYTHON_MAKO_REQUIRED or higher not found])
+        fi
+    fi
 fi
 
 AC_PROG_INSTALL
-- 
2.3.1



More information about the mesa-dev mailing list