summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-01-28 14:45:45 -0500
committerTingPing <tingping@tingping.se>2014-01-28 16:19:06 -0500
commite962039f8362a69917778ef056c7de8dfdccb8e4 (patch)
tree0d946a1299e6e0a51c1e78cf7acda5616f8b7b7a
parent696407967305a24fbdf2b84b21a2e907f14d0089 (diff)
configure: Don't error when python not found
-rw-r--r--configure.ac18
1 files changed, 12 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 0ff129b0..699937c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -293,25 +293,31 @@ if test "x$python" != xno ; then
 		case $python in
 			dnl set python2 default here
 			python2)
-				PKG_CHECK_MODULES([PY], [python-2.7], [], [AC_MSG_ERROR(Cannot find python-2.7!)])
+				PKG_CHECK_MODULES([PY], [python-2.7], [], [AC_MSG_WARN(Cannot find python-2.7!)])
 				PY_VER="`$PKG_CONFIG --modversion python-2.7`";;
 			dnl set python3 default here
 			python3)
-				PKG_CHECK_MODULES([PY], [python-3.3], [], [AC_MSG_ERROR(Cannot find python-3.3!)])
+				PKG_CHECK_MODULES([PY], [python-3.3], [], [AC_MSG_WARN(Cannot find python-3.3!)])
 				PY_VER="`$PKG_CONFIG --modversion python-3.3`";;
 			dnl add broken versions here
 			python2.5|python2.6|python3.1|python3.2)
 				AC_MSG_ERROR(Unsupported Python version ${python}!);;
 			python*)
 				python="python-${python#python}" # stay posix compliant
-				PKG_CHECK_MODULES([PY], [${python}], [], [AC_MSG_ERROR(Cannot find "${python}.pc"!)])
+				PKG_CHECK_MODULES([PY], [${python}], [], [AC_MSG_WARN(Cannot find "${python}.pc"!)])
 				PY_VER="`$PKG_CONFIG --modversion ${python}`";;
 			*)
-				AC_MSG_ERROR(Unsupported Python ${python}!)
+				AC_MSG_WARN(Unsupported Python ${python}!)
 		esac
 		AC_MSG_CHECKING(Python version)
-		AC_MSG_RESULT($PY_VER)
-		python="python-${PY_VER}"
+
+		if test "$PY_VER"; then
+			AC_MSG_RESULT($PY_VER)
+			python="python-${PY_VER}"
+		else
+			AC_MSG_RESULT(Not found)
+			python=no
+		fi
 	else
 		AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for Python])
 		python=no