summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Walton <bwalton@artsci.utoronto.ca>2010-01-31 21:15:04 -0500
committerJunio C Hamano <gitster@pobox.com>2010-02-01 13:03:54 -0800
commitf22cd7fcc54a98277b3d2b82f1bb0b593658925c (patch)
tree09cd673f7d7142917bc0cdc2fd9d1ddddc7a7637
parentb0883aa6c77111e88496bd0afe073caf68ab9f99 (diff)
downloadgit-f22cd7fcc54a98277b3d2b82f1bb0b593658925c.tar.gz
configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM
Add an optional second argument to both GIT_ARG_SET_PATH and GIT_CONF_APPEND_PATH such that any value of the second argument will enable configure to set NO_$PROGRAM in addition to an empty $PROGRAM_PATH. This is initially useful for allowing configure to disable the use of python, as the remote helper code has nothing leveraging it yet. The Makefile already recognizes NO_PYTHON, but configure provided no way to set it appropriately. Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--configure.ac15
1 files changed, 13 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 78345ebb60..995abe46dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,21 +23,32 @@ AC_DEFUN([GIT_CONF_APPEND_LINE],
# GIT_ARG_SET_PATH(PROGRAM)
# -------------------------
# Provide --with-PROGRAM=PATH option to set PATH to PROGRAM
+# Optional second argument allows setting NO_PROGRAM=YesPlease if
+# --without-PROGRAM version used.
AC_DEFUN([GIT_ARG_SET_PATH],
[AC_ARG_WITH([$1],
[AS_HELP_STRING([--with-$1=PATH],
[provide PATH to $1])],
- [GIT_CONF_APPEND_PATH($1)],[])
+ [GIT_CONF_APPEND_PATH($1,$2)],[])
])# GIT_ARG_SET_PATH
#
# GIT_CONF_APPEND_PATH(PROGRAM)
# ------------------------------
# Parse --with-PROGRAM=PATH option to set PROGRAM_PATH=PATH
# Used by GIT_ARG_SET_PATH(PROGRAM)
+# Optional second argument allows setting NO_PROGRAM=YesPlease if
+# --without-PROGRAM is used.
AC_DEFUN([GIT_CONF_APPEND_PATH],
[PROGRAM=m4_toupper($1); \
if test "$withval" = "no"; then \
- AC_MSG_ERROR([You cannot use git without $1]); \
+ if test -n "$2"; then \
+ m4_toupper($1)_PATH=$withval; \
+ AC_MSG_NOTICE([Disabling use of ${PROGRAM}]); \
+ GIT_CONF_APPEND_LINE(NO_${PROGRAM}=YesPlease); \
+ GIT_CONF_APPEND_LINE(${PROGRAM}_PATH=); \
+ else \
+ AC_MSG_ERROR([You cannot use git without $1]); \
+ fi; \
else \
if test "$withval" = "yes"; then \
AC_MSG_WARN([You should provide path for --with-$1=PATH]); \