Mesa (master): configure.ac: error out if python/ mako is not found when required

Emil Velikov evelikov at kemper.freedesktop.org
Wed Apr 1 19:39:31 UTC 2015


Module: Mesa
Branch: master
Commit: 4008975e6f4b2e15fceed4f07d8ec763dd0949d1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4008975e6f4b2e15fceed4f07d8ec763dd0949d1

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Mon Mar 23 17:49:24 2015 +0000

configure.ac: error out if python/mako is not found when required

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.

v2: Check only for a single file for each dependency.

Suggested-by: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 configure.ac |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3e5b6f5..3d8e0c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,8 +123,17 @@ 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/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/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




More information about the mesa-commit mailing list