Skip to content

Commit

Permalink
autoconf: Improvements in NO_PYTHON/PYTHON_PATH handling
Browse files Browse the repository at this point in the history
Unset NO_PYTHON for --with-python without arguments, and when
PYTHON_PATH is set.  Do not check for PYTHON_PATH if it is set
via --with-python=PYTHON_PATH.  Prefer "python" over version
specific names such as "python2.4".

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Aug 8, 2006
1 parent b52b1d4 commit af6058c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ 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 \
elif test "$withval" = "yes"; then \
NO_PYTHON=; \
else \
NO_PYTHON=; \
PYTHON_PATH=$withval; \
fi; \
])
Expand Down Expand Up @@ -138,15 +141,15 @@ AC_CHECK_PROGS(TAR, [gtar tar])
# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
# Define PYTHON_PATH to provide path to Python.
if test -z "$NO_PYTHON"; then
AC_PATH_PROGS(PYTHON_PATH, [python2.4 python2.3 python2 python])
if test -z "$PYTHON_PATH"; then
AC_PATH_PROGS(PYTHON_PATH, [python python2.4 python2.3 python2])
fi
if test -n "$PYTHON_PATH"; then
GIT_CONF_APPEND_LINE([PYTHON_PATH=@PYTHON_PATH@])
else
GIT_CONF_APPEND_LINE([NO_PYTHON=@NO_PYTHON@])
NO_PYTHON=""
fi
else
GIT_CONF_APPEND_LINE([NO_PYTHON=@NO_PYTHON@])
fi
GIT_CONF_APPEND_LINE([NO_PYTHON=@NO_PYTHON@])


## Checks for libraries.
Expand Down

0 comments on commit af6058c

Please sign in to comment.