autoconf: Preparing the way for autodetection
Prepares configure.ac to output autodetected and selected (by using --with/--without and --enable/disable parameters to generated ./configure script) building configuration in "git style", i.e. by appending appropriate variables to output file config.mak.autogen (via temporary file config.mak.append). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Jakub Narebski committed
Jul 8, 2006 at 23:07 UTC
d3a6db981179a1dc772768ff6af0414d17848d93
1 file changed
+16
-1
configure.ac
+16
-1
@@ -7,8 +7,19 @@ AC_INIT([git], [1.4.1], [git@vger.kernel.org])
7
AC_CONFIG_SRCDIR([git.c])
8
9
config_file=config.mak.autogen
10
+config_append=config.mak.append
11
config_in=config.mak.in
12
13
+echo "# ${config_append}. Generated by configure." > "${config_append}"
14
+
15
+
16
+## Definitions of macros
17
+# GIT_CONF_APPEND_LINE(LINE)
18
+# --------------------------
19
+# Append LINE to file ${config_append}
20
+AC_DEFUN([GIT_CONF_APPEND_LINE],
21
+[echo "$1" >> "${config_append}"])# GIT_CONF_APPEND_LINE
22
+
23
24
## Checks for programs.
25
# Define NO_PYTHON if you want to loose all benefits of the recursive merge.
@@ -121,6 +132,10 @@ config_in=config.mak.in
132
# Define USE_STDEV below if you want git to care about the underlying device
133
# change being considered an inode change from the update-cache perspective.
134
135
+
136
## Output files
125
-AC_CONFIG_FILES(["${config_file}":"${config_in}"])
137
+AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"])
138
AC_OUTPUT
139
+
140
+## Cleanup
141
+rm -f "${config_append}"