@matheusbsbs / matheus-bagliano / commits / f8affe317d
Fork 0

autoconf: Check for subprocess.py

Add custom test for checking if Python comes with subprocess.py, or should we use our own subprocess.py by defining WITH_OWN_SUBPROCESS_PY. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jakub Narebski committed Sep 5, 2006 at 00:57 UTC f8affe317dbfa3d5eb3cc2705568efc184f844db
1 file changed +10
configure.ac
+10
@@ -261,6 +261,16 @@ AC_SUBST(NO_SETENV)
261 # Enable it on Windows. By default, symrefs are still used.
262 #
263 # Define WITH_OWN_SUBPROCESS_PY if you want to use with python 2.3.
264 +AC_CACHE_CHECK(for subprocess.py,
265 + ac_cv_python_has_subprocess_py,
266 +[if $PYTHON_PATH -c 'import subprocess' 2>/dev/null; then
267 + ac_cv_python_has_subprocess_py=yes
268 +else
269 + ac_cv_python_has_subprocess_py=no
270 +fi])
271 +if test $ac_cv_python_has_subprocess_py != yes; then
272 + GIT_CONF_APPEND_LINE([WITH_OWN_SUBPROCESS_PY=YesPlease])
273 +fi
274 #
275 # Define NO_ACCURATE_DIFF if your diff program at least sometimes misses
276 # a missing newline at the end of the file.