Browse Source

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>
maint
Stefano Lattarini 12 years ago committed by Junio C Hamano
parent
commit
3a34c2bf62
  1. 15
      configure.ac

15
configure.ac

@ -7,8 +7,9 @@
# ------------------------ # ------------------------
# Cause the line "VAR=VAL" to be eventually appended to ${config_file}. # Cause the line "VAR=VAL" to be eventually appended to ${config_file}.
AC_DEFUN([GIT_CONF_SUBST], AC_DEFUN([GIT_CONF_SUBST],
[AC_REQUIRE([GIT_CONF_SUBST_INIT]) [AC_REQUIRE([GIT_CONF_SUBST_INIT])
config_appended_defs="$config_appended_defs${newline}$1=$2"]) config_appended_defs="$config_appended_defs${newline}dnl
$1=m4_if([$#],[1],[${$1}],[$2])"])


# GIT_CONF_SUBST_INIT # GIT_CONF_SUBST_INIT
# ------------------- # -------------------
@ -179,7 +180,7 @@ AC_ARG_WITH([lib],
else else
lib=$withval lib=$withval
AC_MSG_NOTICE([Setting lib to '$lib']) AC_MSG_NOTICE([Setting lib to '$lib'])
GIT_CONF_SUBST([lib], [$withval]) GIT_CONF_SUBST([lib])
fi]) fi])


if test -z "$lib"; then if test -z "$lib"; then
@ -215,7 +216,7 @@ AC_ARG_ENABLE([jsmin],
[ [
JSMIN=$enableval; JSMIN=$enableval;
AC_MSG_NOTICE([Setting JSMIN to '$JSMIN' to enable JavaScript minifying]) AC_MSG_NOTICE([Setting JSMIN to '$JSMIN' to enable JavaScript minifying])
GIT_CONF_SUBST([JSMIN], [$enableval]) GIT_CONF_SUBST([JSMIN])
]) ])


# Define option to enable CSS minification # Define option to enable CSS minification
@ -225,7 +226,7 @@ AC_ARG_ENABLE([cssmin],
[ [
CSSMIN=$enableval; CSSMIN=$enableval;
AC_MSG_NOTICE([Setting CSSMIN to '$CSSMIN' to enable CSS minifying]) AC_MSG_NOTICE([Setting CSSMIN to '$CSSMIN' to enable CSS minifying])
GIT_CONF_SUBST([CSSMIN], [$enableval]) GIT_CONF_SUBST([CSSMIN])
]) ])


## Site configuration (override autodetection) ## Site configuration (override autodetection)
@ -265,8 +266,8 @@ AS_HELP_STRING([], [ARG can be also prefix for libpcre library and hea
else else
USE_LIBPCRE=YesPlease USE_LIBPCRE=YesPlease
LIBPCREDIR=$withval LIBPCREDIR=$withval
AC_MSG_NOTICE([Setting LIBPCREDIR to $withval]) AC_MSG_NOTICE([Setting LIBPCREDIR to $LIBPCREDIR])
GIT_CONF_SUBST([LIBPCREDIR], [$withval]) GIT_CONF_SUBST([LIBPCREDIR])
fi) fi)
# #
# Define NO_CURL if you do not have curl installed. git-http-pull and # Define NO_CURL if you do not have curl installed. git-http-pull and

Loading…
Cancel
Save