At the end of `./configure', save the cache values, and the CPP

values.

* acgeneral.m4 (_AC_CACHE_DUMP): New macro.
(AC_CACHE_SAVE, AC_OUTPUT): Use it.
(AC_OUTPUT): Dump confdefs.h into config.log.
(_AC_INIT_PREPARE::config.log): Name the package being configured
if you can.
This commit is contained in:
Akim Demaille 2000-04-05 08:53:19 +00:00
parent 5ae14bc8c0
commit 2f491b084e
4 changed files with 151 additions and 68 deletions

View File

@ -1,3 +1,14 @@
2000-04-05 Akim Demaille <akim@epita.fr>
At the end of `./configure', save the cache values, and the CPP
values.
* acgeneral.m4 (_AC_CACHE_DUMP): New macro.
(AC_CACHE_SAVE, AC_OUTPUT): Use it.
(AC_OUTPUT): Dump confdefs.h into config.log.
(_AC_INIT_PREPARE::config.log): Name the package being configured
if you can.
2000-04-05 Steven G. Johnson <stevenj@alum.mit.edu>
Disable caching by default, so as not to cause problems when

View File

@ -1469,7 +1469,8 @@ echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure version AC_ACVERSION, executed with
It was created by configure ifset([AC_PACKAGE_STRING],
[(AC_PACKAGE_STRING)]) AC_ACVERSION, executed with
> [$]0 $ac_configure_args
" 1>&AC_FD_CC
@ -1876,7 +1877,7 @@ done
# AC_CACHE_LOAD
# -------------
define(AC_CACHE_LOAD,
define([AC_CACHE_LOAD],
[if test -r "$cache_file"; then
test "x$cache_file" != "x/dev/null" && echo "loading cache $cache_file"
dnl Some versions of bash will fail to source /dev/null, so we
@ -1886,15 +1887,43 @@ else
echo "creating cache $cache_file"
>$cache_file
fi
])
])# AC_CACHE_LOAD
# _AC_CACHE_DUMP
# --------------
# Dump the cache to stdout. It can be in a pipe (this is a requirement).
define([_AC_CACHE_DUMP],
[# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
{
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e ["s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1='\\2'/p"]
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e '[s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p]'
;;
esac;
}dnl
])# _AC_CACHE_DUMP
# AC_CACHE_SAVE
# -------------
# Save the cache.
# Allow a site initialization script to override cache values.
define(AC_CACHE_SAVE,
[[cat >confcache <<\EOF
define([AC_CACHE_SAVE],
[cat >confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
@ -1910,25 +1939,8 @@ define(AC_CACHE_SAVE,
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >>confcache
_AC_CACHE_DUMP() |
sed -e 's/^\([[^=]]*\)=\(.*\)$/\1=${\1=\2}/' >>confcache
if cmp -s $cache_file confcache; then :; else
if test -w $cache_file; then
test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
@ -1937,8 +1949,9 @@ if cmp -s $cache_file confcache; then :; else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
]])
rm -f confcache[]dnl
])# AC_CACHE_SAVE
# AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
# ------------------------------------------
@ -3614,6 +3627,14 @@ ifset([AC_LIST_HEADERS], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
dnl Commands to run before creating config.status.
AC_OUTPUT_COMMANDS_PRE()dnl
# Save into config.log some informations which might help to debug.
echo >>config.log
echo "The cache variables are:" >>config.log
_AC_CACHE_DUMP | sed -e 's/^/| /' >>config.log
echo >>config.log
echo "confdefs.h is:" >>config.log
cat confdefs.h | sed -e 's/^/| /' >>config.log
: ${CONFIG_STATUS=./config.status}
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
_AC_OUTPUT_CONFIG_STATUS()dnl

62
configure vendored
View File

@ -599,7 +599,7 @@ echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure version 2.14a, executed with
It was created by configure (Autoconf 2.14a) 2.14a, executed with
> $0 $ac_configure_args
" 1>&5
@ -1151,20 +1151,23 @@ EOF
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >>confcache
{
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1='\\2'/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p'
;;
esac;
} |
sed -e 's/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/' >>confcache
if cmp -s $cache_file confcache; then :; else
if test -w $cache_file; then
test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
@ -1174,7 +1177,6 @@ if cmp -s $cache_file confcache; then :; else
fi
fi
rm -f confcache
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
test "x$prefix" = xNONE && prefix=$ac_default_prefix
@ -1215,6 +1217,34 @@ ac_LF_and_DOT=`echo; echo .`
DEFS=`sed -f conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
rm -f conftest.defs
# Save into config.log some informations which might help to debug.
echo >>config.log
echo "The cache variables are:" >>config.log
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
{
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1='\\2'/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p'
;;
esac;
} | sed -e 's/^/| /' >>config.log
echo >>config.log
echo "confdefs.h is:" >>config.log
cat confdefs.h | sed -e 's/^/| /' >>config.log
: ${CONFIG_STATUS=./config.status}
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
echo creating $CONFIG_STATUS

View File

@ -1469,7 +1469,8 @@ echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure version AC_ACVERSION, executed with
It was created by configure ifset([AC_PACKAGE_STRING],
[(AC_PACKAGE_STRING)]) AC_ACVERSION, executed with
> [$]0 $ac_configure_args
" 1>&AC_FD_CC
@ -1876,7 +1877,7 @@ done
# AC_CACHE_LOAD
# -------------
define(AC_CACHE_LOAD,
define([AC_CACHE_LOAD],
[if test -r "$cache_file"; then
test "x$cache_file" != "x/dev/null" && echo "loading cache $cache_file"
dnl Some versions of bash will fail to source /dev/null, so we
@ -1886,15 +1887,43 @@ else
echo "creating cache $cache_file"
>$cache_file
fi
])
])# AC_CACHE_LOAD
# _AC_CACHE_DUMP
# --------------
# Dump the cache to stdout. It can be in a pipe (this is a requirement).
define([_AC_CACHE_DUMP],
[# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
{
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e ["s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1='\\2'/p"]
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e '[s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p]'
;;
esac;
}dnl
])# _AC_CACHE_DUMP
# AC_CACHE_SAVE
# -------------
# Save the cache.
# Allow a site initialization script to override cache values.
define(AC_CACHE_SAVE,
[[cat >confcache <<\EOF
define([AC_CACHE_SAVE],
[cat >confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
@ -1910,25 +1939,8 @@ define(AC_CACHE_SAVE,
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >>confcache
_AC_CACHE_DUMP() |
sed -e 's/^\([[^=]]*\)=\(.*\)$/\1=${\1=\2}/' >>confcache
if cmp -s $cache_file confcache; then :; else
if test -w $cache_file; then
test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
@ -1937,8 +1949,9 @@ if cmp -s $cache_file confcache; then :; else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
]])
rm -f confcache[]dnl
])# AC_CACHE_SAVE
# AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
# ------------------------------------------
@ -3614,6 +3627,14 @@ ifset([AC_LIST_HEADERS], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
dnl Commands to run before creating config.status.
AC_OUTPUT_COMMANDS_PRE()dnl
# Save into config.log some informations which might help to debug.
echo >>config.log
echo "The cache variables are:" >>config.log
_AC_CACHE_DUMP | sed -e 's/^/| /' >>config.log
echo >>config.log
echo "confdefs.h is:" >>config.log
cat confdefs.h | sed -e 's/^/| /' >>config.log
: ${CONFIG_STATUS=./config.status}
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
_AC_OUTPUT_CONFIG_STATUS()dnl