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

autoconf: Improvements in NO_PYTHON/PYTHON_PATH handling

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>

Jakub Narebski committed Aug 8, 2006 at 18:38 UTC af6058cc2bf309631fc7f5cd44fb39b567286506
1 file changed +9 -6
configure.ac
+9 -6
@@ -105,7 +105,10 @@ AC_ARG_WITH(python,[AS_HELP_STRING([--with-python=PATH], [provide PATH to python
105 AS_HELP_STRING([--no-python], [don't use python scripts])],
106 [if test "$withval" = "no"; then \
107 NO_PYTHON=YesPlease; \
108 - elif test "$withval" != "yes"; then \
108 + elif test "$withval" = "yes"; then \
109 + NO_PYTHON=; \
110 + else \
111 + NO_PYTHON=; \
112 PYTHON_PATH=$withval; \
113 fi; \
114 ])
@@ -138,15 +141,15 @@ AC_CHECK_PROGS(TAR, [gtar tar])
141 # Define NO_PYTHON if you want to lose all benefits of the recursive merge.
142 # Define PYTHON_PATH to provide path to Python.
143 if test -z "$NO_PYTHON"; then
141 - AC_PATH_PROGS(PYTHON_PATH, [python2.4 python2.3 python2 python])
144 + if test -z "$PYTHON_PATH"; then
145 + AC_PATH_PROGS(PYTHON_PATH, [python python2.4 python2.3 python2])
146 + fi
147 if test -n "$PYTHON_PATH"; then
148 GIT_CONF_APPEND_LINE([PYTHON_PATH=@PYTHON_PATH@])
144 - else
145 - GIT_CONF_APPEND_LINE([NO_PYTHON=@NO_PYTHON@])
149 + NO_PYTHON=""
150 fi
147 -else
148 - GIT_CONF_APPEND_LINE([NO_PYTHON=@NO_PYTHON@])
151 fi
152 +GIT_CONF_APPEND_LINE([NO_PYTHON=@NO_PYTHON@])
153
154
155 ## Checks for libraries.