@@ -68,6 +68,26 @@ else \
68
68
GIT_CONF_APPEND_LINE(${PACKAGE}DIR=$withval); \
69
69
fi \
70
70
] ) # GIT_PARSE_WITH
71
+ #
72
+ # GIT_PARSE_WITH_SET_MAKE_VAR(WITHNAME, VAR, HELP_TEXT)
73
+ # ---------------------
74
+ # Set VAR to the value specied by --with-WITHNAME.
75
+ # No verification of arguments is performed, but warnings are issued
76
+ # if either 'yes' or 'no' is specified.
77
+ # HELP_TEXT is presented when --help is called.
78
+ # This is a direct way to allow setting variables in the Makefile.
79
+ AC_DEFUN ( [ GIT_PARSE_WITH_SET_MAKE_VAR] ,
80
+ [ AC_ARG_WITH ( [ $1 ] ,
81
+ [ AS_HELP_STRING ( [ --with-$1 =VALUE] , $3 ) ] ,
82
+ if test - n "$withval"; then \
83
+ if test "$withval" = "yes" - o "$withval" = "no"; then \
84
+ AC_MSG_WARN ( [ You likely do not want either 'yes' or 'no' as]
85
+ [ a value for $1 ($2 ). Maybe you do...?] ) ; \
86
+ fi; \
87
+ \
88
+ AC_MSG_NOTICE ( [ Setting $2 to $withval] ) ; \
89
+ GIT_CONF_APPEND_LINE ( $2 = $withval ) ; \
90
+ fi ) ] ) # GIT_PARSE_WITH_SET_MAKE_VAR
71
91
72
92
dnl
73
93
dnl GIT_CHECK_FUNC(FUNCTION, IFTRUE, IFFALSE)
@@ -226,6 +246,29 @@ GIT_PARSE_WITH(iconv))
226
246
# Define USE_STDEV below if you want git to care about the underlying device
227
247
# change being considered an inode change from the update-index perspective.
228
248
249
+ #
250
+ # Allow user to set ETC_GITCONFIG variable
251
+ GIT_PARSE_WITH_SET_MAKE_VAR(gitconfig, ETC_GITCONFIG,
252
+ Use VALUE instead of /etc/gitconfig as the
253
+ global git configuration file.
254
+ If VALUE is not fully qualified it will be interpretted
255
+ as a path relative to the computed prefix at runtime.)
256
+
257
+ #
258
+ # Allow user to set the default pager
259
+ GIT_PARSE_WITH_SET_MAKE_VAR(pager, DEFAULT_PAGER,
260
+ Use VALUE as the fall-back pager instead of 'less'.
261
+ This is used by things like 'git log' when the user
262
+ does not specify a pager to use through alternate
263
+ methods. eg: /usr/bin/pager)
264
+ #
265
+ # Allow user to set the default editor
266
+ GIT_PARSE_WITH_SET_MAKE_VAR(editor, DEFAULT_EDITOR,
267
+ Use VALUE as the fall-back editor instead of 'vi'.
268
+ This is used by things like 'git commit' when the user
269
+ does not specify a preferred editor through other
270
+ methods. eg: /usr/bin/editor)
271
+
229
272
#
230
273
# Define SHELL_PATH to provide path to shell.
231
274
GIT_ARG_SET_PATH(shell)
0 commit comments