configure: Introduce new output variable to ax_check_python_mako_module.m4
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Mon, 2 Mar 2015 09:49:31 +0000 (10:49 +0100)
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Fri, 6 Mar 2015 08:39:41 +0000 (09:39 +0100)
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@igalia.com>
Reviewed-by: Kai Wasserbäch <kai@dev.carbon-project.org>
configure.ac
m4/ax_check_python_mako_module.m4

index ad64df012318ca1bb931c423cce73710ee23dd07..90c7737148e1bee7a97113c98b4e8b8b913501f6 100644 (file)
@@ -79,6 +79,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
@@ -114,7 +115,12 @@ 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_RESULT(yes)
+else
+    AC_MSG_ERROR([Python mako module v$PYTHON_MAKO_REQUIRED or higher not found])
+fi
 
 AC_PROG_INSTALL
 
index 2fc029b9a2b1ef53729efe3b02d2db8bbcf03d3e..ee68a7cdb0513911088ce0bdea2fe1331fe0069b 100644 (file)
@@ -54,8 +54,8 @@ else:
     " | $PYTHON2 -
 
     if test $? -ne 0 ; then
-       AC_MSG_ERROR(mako $1 or later is required.)
+       AC_SUBST(acv_mako_found, 'no')
     else
-        AC_MSG_RESULT(yes)
+       AC_SUBST(acv_mako_found, 'yes')
     fi
 ])