[master] d437198 Dogfooding
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Tue Feb 21 09:17:04 CET 2017
commit d43719819face735e43eb30bfbc5c06e0f5cd6a6
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue Feb 21 09:09:41 2017 +0100
Dogfooding
It could also probably be improved further, we've been detecting python
_after_ looking for python-based tools rst2*. Or we can keep unrelated
checks, I don't think it hurts.
diff --git a/configure.ac b/configure.ac
index 4413e92..84afb95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,7 +67,10 @@ AC_ARG_WITH([dot],
fi])
AM_CONDITIONAL(HAVE_DOT,[test "x$DOT" != "xno"])
-# Checks for libraries.
+# Check for python.
+_VARNISH_CHECK_PYTHON
+
+# Check for libraries.
_VARNISH_SEARCH_LIBS(pthread, pthread_create, [thr pthread c_r])
_VARNISH_CHECK_LIB(rt, clock_gettime)
_VARNISH_CHECK_LIB(dl, dlopen)
@@ -346,10 +349,6 @@ fi
AM_MISSING_HAS_RUN
-AM_PATH_PYTHON([2.7], [], [
- AC_MSG_ERROR([Python 2.7 or later is needed to build Varnish.])
-])
-
AC_CHECK_DECL([SO_ACCEPTFILTER],
AC_DEFINE(HAVE_ACCEPT_FILTERS,1,[Define to 1 if you have accept filters]),
,
diff --git a/varnish.m4 b/varnish.m4
index 874c055..efb3c3b 100644
--- a/varnish.m4
+++ b/varnish.m4
@@ -101,6 +101,16 @@ AC_DEFUN([_VARNISH_CHECK_DEVEL], [
[CPPFLAGS=$_orig_cppflags]
])
+# _VARNISH_CHECK_PYTHON
+# ---------------------
+AC_DEFUN([_VARNISH_CHECK_PYTHON], [
+
+ AM_PATH_PYTHON([2.7], [], [
+ AC_MSG_ERROR([Python >= 2.7 is required.])
+ ])
+
+])
+
# _VARNISH_VMOD_CONFIG
# --------------------
AC_DEFUN([_VARNISH_VMOD_CONFIG], [
@@ -114,9 +124,7 @@ AC_DEFUN([_VARNISH_VMOD_CONFIG], [
AC_REQUIRE([AC_PROG_CPP])
AC_REQUIRE([AC_PROG_CPP_WERROR])
- AM_PATH_PYTHON([2.7], [], [
- AC_MSG_ERROR([Python 2.7 or later is needed to build VMODs.])
- ])
+ _VARNISH_CHECK_PYTHON
AS_IF([test -z "$RST2MAN"], [
AC_MSG_ERROR([rst2man is needed to build VMOD manuals.])
More information about the varnish-commit
mailing list