cvs server: Diffing . Index: configure.ac =================================================================== RCS file: /cvsroot/autoconf/autoconf/configure.ac,v retrieving revision 1.38 diff -u -r1.38 configure.ac --- configure.ac 22 Apr 2002 14:33:05 -0000 1.38 +++ configure.ac 25 May 2002 04:07:13 -0000 @@ -31,6 +31,14 @@ AM_INIT_AUTOMAKE +AC_ARG_ENABLE([site-macro-dir], + AC_HELP_STRING([--enable-site-macro-dir=DIR], + [use site macro directory DIR @<:@DATADIR/autoconf/site_macros@:>@]), + , + [enable_site_macro_dir='${datadir}/autoconf/site_macros']) +SITE_MACRO_DIR="${enable_site_macro_dir}"; +AC_SUBST([SITE_MACRO_DIR]) + # Initialize the test suite and build position independent wrappers. AC_CONFIG_TESTDIR([tests]) AC_CONFIG_FILES([tests/Makefile tests/atlocal]) cvs server: Diffing bin Index: bin/Makefile.am =================================================================== RCS file: /cvsroot/autoconf/autoconf/bin/Makefile.am,v retrieving revision 1.5 diff -u -r1.5 Makefile.am --- bin/Makefile.am 10 Apr 2002 15:58:19 -0000 1.5 +++ bin/Makefile.am 25 May 2002 04:07:13 -0000 @@ -45,7 +45,8 @@ -e 's,@M4\@,$(M4),g' \ -e 's,@AWK\@,$(AWK),g' \ -e 's,@VERSION\@,$(VERSION),g' \ - -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' + -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ + -e 's,@SITE_MACRO_DIR\@,$(SITE_MACRO_DIR),g' # autoconf is written in M4sh. AUTOM4SH = $(top_builddir)/tests/autom4te --language M4sh Index: bin/autoconf.in =================================================================== RCS file: /cvsroot/autoconf/autoconf/bin/autoconf.in,v retrieving revision 1.147 diff -u -r1.147 autoconf.in --- bin/autoconf.in 22 Apr 2002 09:13:43 -0000 1.147 +++ bin/autoconf.in 25 May 2002 04:07:13 -0000 @@ -252,6 +252,16 @@ esac done +# Add $AC_MACRO_PATH +if test -n "${AC_MACRO_PATH}"; then + AUTOM4TE="$AUTOM4TE -I `echo ${AC_MACRO_PATH}|sed 's/:/ -I /'`"; +fi + +# Add site macro dir +if test "@SITE_MACRO_DIR@" != "no"; then + AUTOM4TE="$AUTOM4TE address@hidden@"; +fi + # Find the input file. case $# in 0) Index: bin/autom4te.in =================================================================== RCS file: /cvsroot/autoconf/autoconf/bin/autom4te.in,v retrieving revision 1.61 diff -u -r1.61 autom4te.in --- bin/autom4te.in 20 Apr 2002 06:09:01 -0000 1.61 +++ bin/autom4te.in 25 May 2002 04:07:13 -0000 @@ -267,6 +267,7 @@ my @warning; # M4 include path. +my @std_include; my @include; # 0 for EXIT_SUCCESS. @@ -389,7 +390,8 @@ The environment variable \`WARNINGS\' is honored. Library directories: - -I, --include=DIR look for FILES in DIR (cumulative) + -s, --std-include=DIR use standard include direcotry DIR + -I, --include=DIR look for FILES in DIR (cumulative) Tracing: -t, --trace=MACRO report the MACRO invocations @@ -493,6 +495,7 @@ "M|melt" => \$melt, # Library directories: + "s|std-include=s" => address@hidden, "I|include=s" => address@hidden, # Tracing: @@ -525,7 +528,10 @@ # a pain since it introduces a useless difference in the path which # invalidates the cache. And strip `.' which is implicit and always # first. - @include = grep { !/^\.$/ } uniq (@include); + @include = (@std_include, grep { !/^\.$/ } uniq (@include)); + #print "$me: include path:\n"; + #foreach (@include) { print "\t$_\n"; } + #print "\n"; # Convert @trace to %trace, and work around the M4 builtins tracing # problem. @@ -599,13 +605,10 @@ # # Neutralize its stdin, so that GNU M4 1.5 doesn't neutralize SIGINT. # - # Be extremely cautious to reverse the includes when talking to M4: - # it doesn't speak the same --include as we do. - # # We don't output directly to the cache files, to avoid problems # when we are interrupted (that leaves corrupted files). my $command = ("$m4" - . join (' --include=', '', reverse @include) + . join (' --include=', '', @include) . " --define=m4_warnings=$m4_warnings" . ' --debug=aflq' . " --error-output=$tcache" . $req->id . "t" @@ -1047,7 +1050,7 @@ # output but comments and empty lines. my $command = ("$m4" . ' --fatal-warning' - . join (' --include=', '', reverse @include) + . join (' --include=', '', @include) . ' --define=divert' . " @ARGV" . '