Mesa (10.5): configure: Introduce new output variable to ax_check_python_mako_module.m4

Emil Velikov evelikov at kemper.freedesktop.org
Thu Mar 26 01:44:45 UTC 2015


Module: Mesa
Branch: 10.5
Commit: e98909b0567b8a83a6a953cfa4ee4e7beef436b9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e98909b0567b8a83a6a953cfa4ee4e7beef436b9

Author: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
Date:   Mon Mar  2 10:49:31 2015 +0100

configure: Introduce new output variable to ax_check_python_mako_module.m4

This output variables gives more flexibility for future changes
in autoconf to detect if it is needed to auto-generate files and
check for the auto-generation dependencies.

It is still returning error when Python is not installed.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
Reviewed-by: Kai Wasserbäch <kai at dev.carbon-project.org>
(cherry picked from commit ced9425327be6cb557a4a1217a1dac29b18d1a09)

Squashed with commit

configure.ac: move AC_MSG_RESULT reporting back into the m4 macro

The one who does AC_MSG_CHECKING should provide the AC_MSG_RESULT.

Fixes: ced9425327b (configure: Introduce new output variable to
ax_check_python_mako_module.m4"

Cc: "10.5" <mesa-stable at lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89328
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Reviewed-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
(cherry picked from commit 248eb54eb6117cc5a863ba2deaa14c3bee0b5d41)

---

 configure.ac                      |    6 +++++-
 m4/ax_check_python_mako_module.m4 |    6 ++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index f596a9d..20e6d62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,7 @@ XCBDRI2_REQUIRED=1.8
 XCBGLX_REQUIRED=1.8.1
 XSHMFENCE_REQUIRED=1.1
 XVMC_REQUIRED=1.0.6
+PYTHON_MAKO_REQUIRED=0.3.4
 
 dnl Check for progs
 AC_PROG_CPP
@@ -113,7 +114,10 @@ if test "x$INDENT" != "xcat"; then
     fi
 fi
 
-AX_CHECK_PYTHON_MAKO_MODULE(0.3.4)
+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])
+fi
 
 AC_PROG_INSTALL
 
diff --git a/m4/ax_check_python_mako_module.m4 b/m4/ax_check_python_mako_module.m4
index 2fc029b..7d9bb51 100644
--- a/m4/ax_check_python_mako_module.m4
+++ b/m4/ax_check_python_mako_module.m4
@@ -54,8 +54,10 @@ else:
     " | $PYTHON2 -
 
     if test $? -ne 0 ; then
-       AC_MSG_ERROR(mako $1 or later is required.)
+       AC_MSG_RESULT(no)
+       AC_SUBST(acv_mako_found, 'no')
     else
-        AC_MSG_RESULT(yes)
+       AC_MSG_RESULT(yes)
+       AC_SUBST(acv_mako_found, 'yes')
     fi
 ])




More information about the mesa-commit mailing list