>From Nov 19 autoconf source, info autoconf says: -- Macro: AC_CONFIG_HEADERS (HEADER ..., [CMDS], [INIT-CMDS]) ... Usually the input file is named `HEADER.in'; however, you can override the input file name by appending to HEADER a colon-separated list of input files. Examples: AC_CONFIG_HEADERS([config.h:config.hin]) AC_CONFIG_HEADERS([defines.h:defs.pre:defines.h.in:defs.post]) Doing this allows you to keep your file names acceptable to DOS variants, or to prepend and/or append boilerplate to the file. but autoheader can't cope with the last variant. The attached patch seems to do the right thing, except I'm not sure what to do when I have the following in configure.ac: AC_CONFIG_HEADERS(config.h::config.h.in:config.post) i.e., no config.pre. Patched autoheader correctly creates config.h.in, but then running configure gets me: config.status: creating Makefile config.status: error: cannot find input file: Is that AC_CONFIG_HEADERS syntax simply not allowed? (missing file name) Cheers, Patrick
Index: autoheader.in =================================================================== RCS file: /cvsroot/autoconf/autoconf/bin/autoheader.in,v retrieving revision 1.146 diff -u -r1.146 autoheader.in --- autoheader.in 16 Oct 2006 20:58:44 -0000 1.146 +++ autoheader.in 5 Dec 2006 12:21:43 -0000 @@ -54,7 +54,9 @@ # Lib files. my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; local $config_h; +my $config_h_pre; my $config_h_in; +my $config_h_post; my @prepend_include; my @include; @@ -192,7 +194,12 @@ # We template only the first CONFIG_HEADER. $config_h =~ s/ .*//; # Support "outfile[:infile]", defaulting infile="outfile.in". -($config_h, $config_h_in) = split (':', $config_h, 2); +($config_h, $config_h_pre, $config_h_in, $config_h_post) + = split (':', $config_h, 4); +if (length($config_h_in) == 0 && length($config_h_post) == 0) + { + $config_h_in = $config_h_pre; + } $config_h_in ||= "$config_h.in"; # %SYMBOL might contain things like `F77_FUNC(name,NAME)', but we keep
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf