{"thread":{"id":"22463","subject":"[PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM","startedAt":"2010-02-01T02:15:03Z","lastAt":"2010-02-01T21:23:25Z","messageCount":5,"participants":["Ben Walton","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"133213","messageId":"1264990505-29578-1-git-send-email-bwalton@artsci.utoronto.ca","threadId":"22463","inReplyTo":null,"subject":"[PATCH 0/2] configure tweaks for NO_PYTHON","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2010-02-01T02:15:03Z","receivedAt":"2010-02-01T02:15:03Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"The following patches enable a user to ./configure git with python\ndisabled.  There is nothing using the remote helper libraries yet.  I\nnoticed this missing capability after the recent rpm .spec thread.\n\nBen Walton (2):\n  configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM\n  configure: Allow --without-python\n\n configure.ac |   17 ++++++++++++++---\n 1 files changed, 14 insertions(+), 3 deletions(-)\n"},{"id":"133212","messageId":"1264990505-29578-2-git-send-email-bwalton@artsci.utoronto.ca","threadId":"22463","inReplyTo":"1264990505-29578-1-git-send-email-bwalton@artsci.utoronto.ca","subject":"[PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2010-02-01T02:15:04Z","receivedAt":"2010-02-01T02:15:04Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"Add an optional second argument to both GIT_ARG_SET_PATH and\nGIT_CONF_APPEND_PATH such that any value of the second argument will\nenable configure to set NO_$PROGRAM in addition to an empty\n$PROGRAM_PATH.  This is initially useful for allowing configure to\ndisable the use of python, as the remote helper code has nothing\nleveraging it yet.\n\nThe Makefile already recognizes NO_PYTHON, but configure provided no\nway to set it appropriately.\n\nSigned-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n---\n configure.ac |   15 +++++++++++++--\n 1 files changed, 13 insertions(+), 2 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 229140e..9eaae7d 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -23,21 +23,32 @@ AC_DEFUN([GIT_CONF_APPEND_LINE],\n # GIT_ARG_SET_PATH(PROGRAM)\n # -------------------------\n # Provide --with-PROGRAM=PATH option to set PATH to PROGRAM\n+# Optional second argument allows setting NO_PROGRAM=YesPlease if\n+# --without-PROGRAM version used.\n AC_DEFUN([GIT_ARG_SET_PATH],\n [AC_ARG_WITH([$1],\n  [AS_HELP_STRING([--with-$1=PATH],\n                  [provide PATH to $1])],\n- [GIT_CONF_APPEND_PATH($1)],[])\n+ [GIT_CONF_APPEND_PATH($1,$2)],[])\n ])# GIT_ARG_SET_PATH\n #\n # GIT_CONF_APPEND_PATH(PROGRAM)\n # ------------------------------\n # Parse --with-PROGRAM=PATH option to set PROGRAM_PATH=PATH\n # Used by GIT_ARG_SET_PATH(PROGRAM)\n+# Optional second argument allows setting NO_PROGRAM=YesPlease if\n+# --without-PROGRAM is used.\n AC_DEFUN([GIT_CONF_APPEND_PATH],\n [PROGRAM=m4_toupper($1); \\\n if test \"$withval\" = \"no\"; then \\\n-\tAC_MSG_ERROR([You cannot use git without $1]); \\\n+\tif test -n \"$2\"; then \\\n+\t\tm4_toupper($1)_PATH=$withval; \\\n+\t\tAC_MSG_NOTICE([Disabling use of ${PROGRAM}]); \\\n+\t\tGIT_CONF_APPEND_LINE(NO_${PROGRAM}=YesPlease); \\\n+\t\tGIT_CONF_APPEND_LINE(${PROGRAM}_PATH=); \\\n+\telse \\\n+\t\tAC_MSG_ERROR([You cannot use git without $1]); \\\n+\tfi; \\\n else \\\n \tif test \"$withval\" = \"yes\"; then \\\n \t\tAC_MSG_WARN([You should provide path for --with-$1=PATH]); \\\n-- \n1.6.5.3\n"},{"id":"133214","messageId":"1264990505-29578-3-git-send-email-bwalton@artsci.utoronto.ca","threadId":"22463","inReplyTo":"1264990505-29578-2-git-send-email-bwalton@artsci.utoronto.ca","subject":"[PATCH 2/2] configure: Allow --without-python","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2010-02-01T02:15:05Z","receivedAt":"2010-02-01T02:15:05Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"This patch allows someone to use configure to build git while at the\nsame time disabling the python remote helper code.  It leverages the\nability of GIT_ARG_SET_PATH to accept an optional second argument\nindicating that --without-$PROGRAM is acceptable.\n\nSigned-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n---\n configure.ac |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 9eaae7d..914ae57 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -288,7 +288,7 @@ GIT_ARG_SET_PATH(shell)\n GIT_ARG_SET_PATH(perl)\n #\n # Define PYTHON_PATH to provide path to Python.\n-GIT_ARG_SET_PATH(python)\n+GIT_ARG_SET_PATH(python, allow-without)\n #\n # Define ZLIB_PATH to provide path to zlib.\n GIT_ARG_SET_PATH(zlib)\n-- \n1.6.5.3\n"},{"id":"133287","messageId":"7vwrywu08v.fsf@alter.siamese.dyndns.org","threadId":"22463","inReplyTo":"1264990505-29578-2-git-send-email-bwalton@artsci.utoronto.ca","subject":"Re: [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-01T21:14:40Z","receivedAt":"2010-02-01T21:14:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ben Walton <bwalton@artsci.utoronto.ca> writes:\n\n> Add an optional second argument to both GIT_ARG_SET_PATH and\n> GIT_CONF_APPEND_PATH such that any value of the second argument will\n> enable configure to set NO_$PROGRAM in addition to an empty\n> $PROGRAM_PATH.  This is initially useful for allowing configure to\n> disable the use of python, as the remote helper code has nothing\n> leveraging it yet.\n>\n> The Makefile already recognizes NO_PYTHON, but configure provided no\n> way to set it appropriately.\n>\n> Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n> ---\n\nInteresting.\n\nI noticed that even without this patch we seem to honor --without-tcltk\njust fine and wondered why.  It turns out that we already do the right\nthing when TCLTK_PATH is empty to set NO_TCLTK in our Makefile, but we at\nthe same time have a long custom code in configure.ac to support tcltk.\n\nPerhaps we can clean-up with-/without-tcltk part in configure.ac using\nthis?\n"},{"id":"133288","messageId":"1265059258-sup-1123@ntdws12.chass.utoronto.ca","threadId":"22463","inReplyTo":"7vwrywu08v.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2010-02-01T21:23:25Z","receivedAt":"2010-02-01T21:23:25Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"Excerpts from Junio C Hamano's message of Mon Feb 01 16:14:40 -0500 2010:\n\n> Perhaps we can clean-up with-/without-tcltk part in configure.ac using\n> this?\n\nSure and I'd be happy to do this.\n\nI noticed (after I sent the patches) that NO_PYTHON is set in the\nMakefile automatically if --with-python= is used (leaving PYTHON_PATH\nset to null).  I prefer the nicer --without-python personally.\n\nI'll fix up the tcltk option and scan for others that might need\nsimilar treatment.\n\nThanks\n-Ben\n-- \nBen Walton\nSystems Programmer - CHASS\nUniversity of Toronto\nC:416.407.5610 | W:416.978.4302\n\n"}]}