From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 3/3] autoconf: Add support for setting PYTHON_PATH or NO_PYTHON
Date: Thu, 3 Aug 2006 00:40:40 +0200 [thread overview]
Message-ID: <200608030040.40995.jnareb@gmail.com> (raw)
In-Reply-To: <200608030036.56298.jnareb@gmail.com>
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>
---
Tweaked a little to remove accidental trailing whitespace.
configure.ac | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+)
diff --git a/configure.ac b/configure.ac
index 73e12d3..0a54b44 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.
--
1.4.1.1
prev parent reply other threads:[~2006-08-02 22:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-02 22:36 [PATCH 0/3] autoconf: Add support for SHELL_PATH, PERL_PATH and PYTHON_PATH Jakub Narebski
2006-08-02 22:38 ` [PATCH 1/3] autoconf: Add support for setting SHELL_PATH and PERL_PATH Jakub Narebski
2006-08-02 22:38 ` [PATCH 2/3] autoconf: Move site configuration section earlier in configure.ac Jakub Narebski
2006-08-02 22:40 ` Jakub Narebski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200608030040.40995.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).