git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/4] autoconf: Improvements in NO_PYTHON/PYTHON_PATH handling

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 8, 2006, 16:38 UTC
Message-ID
<200608081838.06311.jnareb@gmail.com>
In-Reply-To
<200608081834.09271.jnareb@gmail.com>

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 to python2.4 etc.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
What might be unexpected is the fact that even for --with-python
(but only without setting PYTHON_PATH) autodetection might set NO_PYTHON
 configure.ac |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index c2ddd9b..c27a994 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,7 +105,10 @@ AC_ARG_WITH(python,[AS_HELP_STRING([--wi
 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; \
  ])
@@ -138,15 +141,15 @@ #
 # 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.
-- 
1.4.1.1
Previous: Jakub NarebskiNext: Jakub Narebski
Message 5 of 15 in “autoconf: Some improvements”
  1. 0/4 autoconf: Some improvementsJakub Narebski, Aug 8, 2006
  2. 1/4 autoconf: Add configure target to main MakefileJakub Narebski, Aug 8, 2006
  3. 5/4 autoconf: Mention "make configure" instead of "autoconf" in INSTALLJakub Narebski, Aug 8, 2006
  4. 2/4 autoconf: Error out on --without-shell and --without-perlJakub Narebski, Aug 8, 2006
  5. 3/4 autoconf: Improvements in NO_PYTHON/PYTHON_PATH handlingJakub Narebski, Aug 8, 2006
  6. 4/4 autoconf: Move variables which we always set to config.mak.inJakub Narebski, Aug 8, 2006
  7. 6/4 autoconf: Add forgotten NO_OPENSSL=@NO_OPENSSL@ to config.mak.inJakub Narebski, Aug 8, 2006
  8. autoconf: clean temporary file mak.appendJunio C Hamano, Aug 8, 2006
  9. Jakub NarebskiAug 8, 2006
  10. Junio C HamanoAug 8, 2006
  11. autoconf: Add support for setting CURLDIR, OPENSSLDIR, EXPATDIRJakub Narebski, Aug 9, 2006
  12. Jakub NarebskiAug 10, 2006
  13. Junio C HamanoAug 10, 2006
  14. Jakub NarebskiAug 10, 2006
  15. autoconf: It is --without-python, not --no-pythonJakub Narebski, Aug 9, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.