build: improve GIT_CONF_SUBST signature

Now, in configure.ac, a call like: GIT_CONF_SUBST([FOO]) will be considered equivalent to: GIT_CONF_SUBST([FOO], [$FOO]) This is mostly a preparatory refactoring in view of future changes. No semantic change to the generated configure or config.mak.auto is intended. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefano Lattarini committed Sep 11, 2012 at 17:45 UTC 3a34c2bf6267a5198e926943f68023ad80c34d3d
1 file changed +8 -7
configure.ac
+8 -7
@@ -7,8 +7,9 @@
7 # ------------------------
8 # Cause the line "VAR=VAL" to be eventually appended to ${config_file}.
9 AC_DEFUN([GIT_CONF_SUBST],
10 - [AC_REQUIRE([GIT_CONF_SUBST_INIT])
11 - config_appended_defs="$config_appended_defs${newline}$1=$2"])
10 +[AC_REQUIRE([GIT_CONF_SUBST_INIT])
11 +config_appended_defs="$config_appended_defs${newline}dnl
12 +$1=m4_if([$#],[1],[${$1}],[$2])"])
13
14 # GIT_CONF_SUBST_INIT
15 # -------------------
@@ -179,7 +180,7 @@ AC_ARG_WITH([lib],
180 else
181 lib=$withval
182 AC_MSG_NOTICE([Setting lib to '$lib'])
182 - GIT_CONF_SUBST([lib], [$withval])
183 + GIT_CONF_SUBST([lib])
184 fi])
185
186 if test -z "$lib"; then
@@ -215,7 +216,7 @@ AC_ARG_ENABLE([jsmin],
216 [
217 JSMIN=$enableval;
218 AC_MSG_NOTICE([Setting JSMIN to '$JSMIN' to enable JavaScript minifying])
218 - GIT_CONF_SUBST([JSMIN], [$enableval])
219 + GIT_CONF_SUBST([JSMIN])
220 ])
221
222 # Define option to enable CSS minification
@@ -225,7 +226,7 @@ AC_ARG_ENABLE([cssmin],
226 [
227 CSSMIN=$enableval;
228 AC_MSG_NOTICE([Setting CSSMIN to '$CSSMIN' to enable CSS minifying])
228 - GIT_CONF_SUBST([CSSMIN], [$enableval])
229 + GIT_CONF_SUBST([CSSMIN])
230 ])
231
232 ## Site configuration (override autodetection)
@@ -265,8 +266,8 @@ AS_HELP_STRING([], [ARG can be also prefix for libpcre library and hea
266 else
267 USE_LIBPCRE=YesPlease
268 LIBPCREDIR=$withval
268 - AC_MSG_NOTICE([Setting LIBPCREDIR to $withval])
269 - GIT_CONF_SUBST([LIBPCREDIR], [$withval])
269 + AC_MSG_NOTICE([Setting LIBPCREDIR to $LIBPCREDIR])
270 + GIT_CONF_SUBST([LIBPCREDIR])
271 fi)
272 #
273 # Define NO_CURL if you do not have curl installed. git-http-pull and