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

[PATCH] configure: ensure settings from user are also usable in the script

From
Ben Walton <bwalton@artsci.utoronto.ca>
Date
Mar 12, 2009, 19:20 UTC
Message-ID
<1236885612-22575-2-git-send-email-bwalton@artsci.utoronto.ca>
In-Reply-To
<1236885612-22575-1-git-send-email-bwalton@artsci.utoronto.ca>

Allow things set by the user (--with-lib, --with-iconv, etc) to set variables for use by other parts of the script. Display values as they're set.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
---
 configure.ac |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 082a03d..0b314d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,6 +42,8 @@ else \
 	if test "$withval" = "yes"; then \
 		AC_MSG_WARN([You should provide path for --with-$1=PATH]); \
 	else \
+		m4_toupper($1)_PATH=$withval; \
+		AC_MSG_NOTICE([Setting m4_toupper($1)_PATH to $withval]); \
 		GIT_CONF_APPEND_LINE(${PROGRAM}_PATH=$withval); \
 	fi; \
 fi; \
@@ -61,6 +63,8 @@ elif test "$withval" = "yes"; then \
 	m4_toupper(NO_$1)=; \
 else \
 	m4_toupper(NO_$1)=; \
+	m4_toupper($1)DIR=$withval; \
+	AC_MSG_NOTICE([Setting m4_toupper($1)DIR to $withval]); \
 	GIT_CONF_APPEND_LINE(${PACKAGE}DIR=$withval); \
 fi \
 ])# GIT_PARSE_WITH
@@ -86,9 +90,16 @@ AC_ARG_WITH([lib],
  [if test "$withval" = "no" || test "$withval" = "yes"; then \
 	AC_MSG_WARN([You should provide name for --with-lib=ARG]); \
 else \
+	lib=$withval; \
+	AC_MSG_NOTICE([Setting lib to '$lib']); \
 	GIT_CONF_APPEND_LINE(lib=$withval); \
 fi; \
 ],[])
+
+if test -z "$lib"; then
+   AC_MSG_NOTICE([Setting lib to 'lib' (the default)])
+   lib=lib
+fi
 #
 # Define SHELL_PATH to provide path to shell.
 GIT_ARG_SET_PATH(shell)
-- 
1.6.0.5
Previous: Ben WaltonNext: Ben Walton
Message 2 of 8 in “autoconf changes”
  1. Ben WaltonMar 12, 2009
  2. configure: ensure settings from user are also usable in the scriptBen Walton, Mar 12, 2009
  3. configure: reorganize flow of argument checksBen Walton, Mar 12, 2009
  4. configure: add macros to stash FLAG variablesBen Walton, Mar 12, 2009
  5. configure: wrap some library tests with GIT_STASH_FLAGSBen Walton, Mar 12, 2009
  6. configure: asciidoc version test cleanupBen Walton, Mar 12, 2009
  7. configure: make iconv tests aware of user argumentsBen Walton, Mar 12, 2009
  8. configure: rework pthread handling to allow for user defined flagsBen Walton, Mar 12, 2009

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.