aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-08-03 00:40:40 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-02 17:16:41 -0700
commiteb858c56cb9dcced05d61d47c0351b4f8768d379 (patch)
treed525347205ba88856075e803e1abd6ae8a5505e6 /configure.ac
parentc4b1b1401cedefe480e32ceccd4ed678f9409e89 (diff)
downloadgit-eb858c56cb9dcced05d61d47c0351b4f8768d379.tar.gz
git-eb858c56cb9dcced05d61d47c0351b4f8768d379.tar.xz
autoconf: Add support for setting PYTHON_PATH or NO_PYTHON
This patch adds support for setting either PYTHON_PATH or NO_PYTHON to autoconf generated ./configure script via --with-python=PATH (sets PYTHON_PATH) or --without-python (sets NO_PYTHON). Autodetect PYTHON_PATH via AC_PATH_PROGS. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index cfd1d4a0b..0a54b4493 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,6 +103,18 @@ AC_MSG_NOTICE([CHECKS for programs])
#
GIT_ARG_SET_PATH(shell)
GIT_ARG_SET_PATH(perl)
+AC_ARG_WITH(python,[AS_HELP_STRING([--with-python=PATH], [provide PATH to python])
+AS_HELP_STRING([--no-python], [don't use python scripts])],
+ [if test "$withval" = "no"; then \
+ NO_PYTHON=YesPlease; \
+ elif test "$withval" != "yes"; then \
+ PYTHON_PATH=$withval; \
+ fi; \
+ ])
+AC_SUBST(NO_PYTHON)
+AC_SUBST(PYTHON_PATH)
+
+
#
# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
# Define PYTHON_PATH to provide path to Python.
@@ -110,6 +122,16 @@ AC_PROG_CC
#AC_PROG_INSTALL # needs install-sh or install.sh in sources
AC_CHECK_TOOL(AR, ar, :)
AC_CHECK_PROGS(TAR, [gtar tar])
+if test -z "$NO_PYTHON"; then
+ AC_PATH_PROGS(PYTHON_PATH, [python2.4 python2.3 python2 python])
+ if test -n "$PYTHON_PATH"; then
+ GIT_CONF_APPEND_LINE([PYTHON_PATH=@PYTHON_PATH@])
+ else
+ GIT_CONF_APPEND_LINE([NO_PYTHON=@NO_PYTHON@])
+ fi
+else
+ GIT_CONF_APPEND_LINE([NO_PYTHON=@NO_PYTHON@])
+fi
## Checks for libraries.