+2003-10-03 Akim Demaille <akim@epita.fr>
+
+ * lib/autom4te.in (Autoreconf-preselections): Trace AC_CONFIG_AUX_DIR.
+ * bin/autoreconf.in (autoreconf_current_directory): Create the
+ AUX_DIR if needed, for sake of automake --add-missing etc.
+ Suggested by Alexandre Duret-Lutz.
+
2003-10-03 Akim Demaille <akim@epita.fr>
* configure.ac: Quotation and formatting changes.
-* Major changes in Autoconf 2.57f -*- outline -*-
+* Major changes in Autoconf 2.57g -*- outline -*-
+
+** autoreconf and auxiliary directory
+ Autoreconf creates the auxiliary directory if needed. This is
+ especially useful for initial "bootstrapping" of fresh CVS checkouts.
+
+* Major changes in Autoconf 2.57f
Released 2003-10-01, by Akim Demaille.
# Perform a single trace reading to avoid --force forcing a rerun
# between two --trace, that's useless. If there is no AC_INIT, then
# we are not interested: it looks like a Cygnus thingy.
+ my $aux_dir;
my $uses_gettext_via_traces;
my $uses_libtool;
my $uses_autoheader;
. join (' --trace=', '',
# If you change this list, update the
# `Autoreconf-preselections' section of autom4te.in.
+ 'AC_CONFIG_AUX_DIR:AC_CONFIG_AUX_DIR:\$1',
'AC_CONFIG_HEADERS',
'AC_CONFIG_SUBDIRS:AC_CONFIG_SUBDIRS:\$1',
'AC_INIT',
. ' |');
while ($_ = $traces->getline)
{
+ $aux_dir = $1 if /AC_CONFIG_AUX_DIR:(.*)/;
$uses_autoconf = 1 if /AC_INIT/;
$uses_gettext_via_traces = 1 if /AM_GNU_GETTEXT/;
$uses_libtool = 1 if /AC_PROG_LIBTOOL/;
if $uses_gettext && ! $uses_gettext_via_traces;
+ # ---------------------------- #
+ # Setting up the source tree. #
+ # ---------------------------- #
+
+ # libtoolize, automake --add-missing etc. will drop files in the
+ # $AUX_DIR. But these tools fail to install these files if the
+ # directory itself does not exist, which valid: just imagine a CVS
+ # repository with hand written code only (there is not even a need
+ # for a Makefile.am!).
+
+ if (defined $aux_dir && ! -d $aux_dir)
+ {
+ verb "$configure_ac: creating directory $aux_dir";
+ mkdir $aux_dir
+ or error "cannot create $aux_dir: $!";
+ }
+
+
# -------------------- #
# Running libtoolize. #
# -------------------- #
## -------------------------- ##
begin-language: "Autoreconf-preselections"
+args: --preselect AC_CONFIG_AUX_DIR
args: --preselect AC_CONFIG_HEADERS
args: --preselect AC_CONFIG_SUBDIRS
args: --preselect AC_INIT