5 eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
8 # aclocal - create aclocal.m4 by scanning configure.ac
10 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
11 # Free Software Foundation, Inc.
13 # This program is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2, or (at your option)
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
28 # Written by Tom Tromey <tromey@redhat.com>, and
29 # Alexandre Duret-Lutz <adl@gnu.org>.
33 my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@';
34 unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
40 use Automake::General;
41 use Automake::Configure_ac;
42 use Automake::Channels;
43 use Automake::ChannelDefs;
45 use Automake::FileUtils;
52 # Include paths for searching macros. We search macros in this order:
53 # user-supplied directories first, then the directory containing the
54 # automake macros, and finally the system-wide directories for
55 # third-party macro. @user_includes can be augmented with -I.
56 # @system_includes can be augmented with the `dirlist' file. Also
57 # --acdir will reset both @automake_includes and @system_includes.
58 my @user_includes = ();
59 my @automake_includes = ("@datadir@/aclocal-$APIVERSION");
60 my @system_includes = ('@datadir@/aclocal');
62 # Whether we should copy M4 file in $user_includes[0].
71 # configure.ac or configure.in.
75 my $output_file = 'aclocal.m4';
80 # Modification time of the youngest dependency.
81 my $greatest_mtime = 0;
83 # Which macros have been seen.
86 # Remember the order into which we scanned the files.
87 # It's important to output the contents of aclocal.m4 in the opposite order.
88 # (Definitions in first files we have scanned should override those from
89 # later files. So they must appear last in the output.)
92 # Map macro names to file names.
95 # Ditto, but records the last definition of each macro as returned by --trace.
96 my %map_traced_defs = ();
98 # Map basenames to macro names.
101 # Map file names to file contents.
102 my %file_contents = ();
104 # Map file names to file types.
106 use constant FT_USER => 1;
107 use constant FT_AUTOMAKE => 2;
108 use constant FT_SYSTEM => 3;
110 # Map file names to included files (transitively closed).
111 my %file_includes = ();
113 # Files which have already been added.
116 # Files that have already been scanned.
117 my %scanned_configure_dep = ();
119 # Serial numbers, for files that have one.
120 # The key is the basename of the file,
121 # the value is the serial number represented as a list.
124 # Matches a macro definition.
125 # AC_DEFUN([macroname], ...)
127 # AC_DEFUN(macroname, ...)
128 # When macroname is `['-quoted , we accept any character in the name,
129 # except `]'. Otherwise macroname stops on the first `]', `,', `)',
130 # or `\n' encountered.
132 "(?:AU_ALIAS|A[CU]_DEFUN|AC_DEFUN_ONCE)\\((?:\\[([^]]+)\\]|([^],)\n]+))";
134 # Matches an AC_REQUIRE line.
135 my $ac_require_rx = "AC_REQUIRE\\((?:\\[([^]]+)\\]|([^],)\n]+))\\)";
137 # Matches an m4_include line
138 my $m4_include_rx = "(?:m4_)?(s?)include\\((?:\\[([^]]+)\\]|([^],)\n]+))\\)";
140 # Match a serial number
141 my $serial_line_rx = '^#\s*serial\s+(\S*)';
142 my $serial_number_rx = '^\d+(?:\.\d+)*$';
144 ################################################################
146 # Check macros in acinclude.m4. If one is not used, warn.
147 sub check_acinclude ()
149 foreach my $key (keys %map)
151 # FIXME: should print line number of acinclude.m4.
152 msg ('syntax', "warning: macro `$key' defined in "
153 . "acinclude.m4 but never used")
154 if $map{$key} eq 'acinclude.m4' && ! exists $macro_seen{$key};
164 %map_traced_defs = ();
169 %scanned_configure_dep = ();
175 # install_file ($SRC, $DEST)
176 sub install_file ($$)
178 my ($src, $dest) = @_;
179 my $diff_dest = $dest;
182 || !exists $file_contents{$dest}
183 || $file_contents{$src} ne $file_contents{$dest})
187 msg 'note', "overwriting `$dest' with `$src'";
191 msg 'note', "installing `$dest' from `$src'";
192 $diff_dest = '/dev/null';
197 my @cmd = (@diff_command, $diff_dest, $src);
199 verb "running: @cmd";
200 my $res = system (@cmd);
201 Automake::FileUtils::handle_exec_errors "@cmd", 1
206 xsystem ('cp', $src, $dest);
211 # Compare two lists of numbers.
212 sub list_compare (\@\@)
220 return (0 == @r) ? 0 : -1;
226 elsif ($l[0] < $r[0])
230 elsif ($l[0] > $r[0])
239 ################################################################
241 # scan_m4_dirs($TYPE, @DIRS)
242 # --------------------------
243 # Scan all M4 files installed in @DIRS for new macro definitions.
244 # Register each file as of type $TYPE (one of the FT_* constants).
245 sub scan_m4_dirs ($@)
247 my ($type, @dirlist) = @_;
249 foreach my $m4dir (@dirlist)
251 if (! opendir (DIR, $m4dir))
253 fatal "couldn't open directory `$m4dir': $!";
256 # We reverse the directory contents so that foo2.m4 gets
257 # used in preference to foo1.m4.
258 foreach my $file (reverse sort grep (! /^\./, readdir (DIR)))
260 # Only examine .m4 files.
261 next unless $file =~ /\.m4$/;
263 # Skip some files when running out of srcdir.
264 next if $file eq 'aclocal.m4';
266 my $fullfile = File::Spec->canonpath ("$m4dir/$file");
267 &scan_file ($type, $fullfile, 'aclocal');
273 # Scan all the installed m4 files and construct a map.
276 # First, scan configure.ac. It may contain macro definitions,
277 # or may include other files that define macros.
278 &scan_file (FT_USER, $configure_ac, 'aclocal');
280 # Then, scan acinclude.m4 if it exists.
281 if (-f 'acinclude.m4')
283 &scan_file (FT_USER, 'acinclude.m4', 'aclocal');
286 # Finally, scan all files in our search paths.
287 scan_m4_dirs (FT_USER, @user_includes);
288 scan_m4_dirs (FT_AUTOMAKE, @automake_includes);
289 scan_m4_dirs (FT_SYSTEM, @system_includes);
291 # Construct a new function that does the searching. We use a
292 # function (instead of just evaluating $search in the loop) so that
293 # "die" is correctly and easily propagated if run.
294 my $search = "sub search {\nmy \$found = 0;\n";
295 foreach my $key (reverse sort keys %map)
297 $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { & add_macro ("' . $key
298 . '"); $found = 1; }' . "\n");
300 $search .= "return \$found;\n};\n";
302 prog_error "$@\n search is $search" if $@;
305 ################################################################
307 # Add a macro to the output.
312 # Ignore unknown required macros. Either they are not really
313 # needed (e.g., a conditional AC_REQUIRE), in which case aclocal
314 # should be quiet, or they are needed and Autoconf itself will
315 # complain when we trace for macro usage later.
316 return unless defined $map{$macro};
318 verb "saw macro $macro";
319 $macro_seen{$macro} = 1;
320 &add_file ($map{$macro});
323 # scan_configure_dep ($file)
324 # --------------------------
325 # Scan a configure dependency (configure.ac, or separate m4 files)
326 # for uses of known macros and AC_REQUIREs of possibly unknown macros.
327 # Recursively scan m4_included files.
328 sub scan_configure_dep ($)
331 # Do not scan a file twice.
333 if exists $scanned_configure_dep{$file};
334 $scanned_configure_dep{$file} = 1;
336 my $mtime = mtime $file;
337 $greatest_mtime = $mtime if $greatest_mtime < $mtime;
339 my $contents = exists $file_contents{$file} ?
340 $file_contents{$file} : contents $file;
345 foreach (split ("\n", $contents))
348 # Remove comments from current line.
352 while (/$m4_include_rx/go)
354 my $ifile = $2 || $3;
355 # Skip missing `sinclude'd files.
356 next if $1 eq 's' && ! -f $ifile;
360 while (/$ac_require_rx/go)
362 push (@rlist, $1 || $2);
365 # The search function is constructed dynamically by
366 # scan_m4_files. The last parenthetical match makes sure we
367 # don't match things that look like macro assignments or
369 if (! &search && /(^|\s+)(AM_[A-Z0-9_]+)($|[^\]\)=A-Z0-9_])/)
371 # Macro not found, but AM_ prefix found.
372 # Make this just a warning, because we do not know whether
373 # the macro is actually used (it could be called conditionally).
374 msg ('unsupported', "$file:$line",
375 "warning: macro `$2' not found in library");
379 add_macro ($_) foreach (@rlist);
380 &scan_configure_dep ($_) foreach @ilist;
385 # Add $FILE to output.
390 # Only add a file once.
391 return if ($file_added{$file});
392 $file_added{$file} = 1;
394 scan_configure_dep $file;
397 # Point to the documentation for underquoted AC_DEFUN only once.
398 my $underquoted_manual_once = 0;
400 # scan_file ($TYPE, $FILE, $WHERE)
401 # --------------------------------
402 # Scan a single M4 file ($FILE), and all files it includes.
403 # Return the list of included files.
404 # $TYPE is one of FT_USER, FT_AUTOMAKE, or FT_SYSTEM, depending
405 # on where the file comes from.
406 # $WHERE is the location to use in the diagnostic if the file
410 my ($type, $file, $where) = @_;
411 my $basename = basename $file;
413 # Do not scan the same file twice.
414 return @{$file_includes{$file}} if exists $file_includes{$file};
415 # Prevent potential infinite recursion (if two files include each other).
416 return () if exists $file_contents{$file};
418 unshift @file_order, $file;
420 $file_type{$file} = $type;
422 fatal "$where: file `$file' does not exist" if ! -e $file;
424 my $fh = new Automake::XFile $file;
431 my $serial_older = 0;
433 while ($_ = $fh->getline)
441 if ($line =~ /$serial_line_rx/go)
444 if ($number !~ /$serial_number_rx/go)
446 msg ('syntax', "$file:$.",
447 "warning: ill-formed serial number `$number', "
448 . "expecting a version string with only digits and dots");
452 # aclocal removes all definitions from M4 file with the
453 # same basename if a greater serial number is found.
454 # Encountering a serial after some macros will undefine
456 msg ('syntax', "$file:$.",
457 'the serial number must appear before any macro definition');
459 # We really care about serials only for non-automake macros
460 # and when --install is used. But the above diagnostics are
461 # made regardless of this, because not using --install is
462 # not a reason not the fix macro files.
463 elsif ($install && $type != FT_AUTOMAKE)
466 my @new = split (/\./, $number);
468 verb "$file:$.: serial $number";
470 if (!exists $serial{$basename}
471 || list_compare (@new, @{$serial{$basename}}) > 0)
473 # Delete any definition we knew from the old macro.
474 foreach my $def (@{$invmap{$basename}})
476 verb "$file:$.: ignoring previous definition of $def";
479 $invmap{$basename} = [];
480 $serial{$basename} = \@new;
489 while ($line =~ /$ac_defun_rx/go)
494 msg ('syntax', "$file:$.", "warning: underquoted definition of $2"
495 . "\n run info '(automake)Extending aclocal'\n"
496 . " or see http://sources.redhat.com/automake/"
497 . "automake.html#Extending-aclocal")
498 unless $underquoted_manual_once;
499 $underquoted_manual_once = 1;
502 # If this macro does not have a serial and we have already
503 # seen a macro with the same basename earlier, we should
504 # ignore the macro (don't exit immediately so we can still
505 # diagnose later #serial numbers and underquoted macros).
506 $serial_older ||= ($type != FT_AUTOMAKE
507 && !$serial_seen && exists $serial{$basename});
509 my $macro = $1 || $2;
510 if (!$serial_older && !defined $map{$macro})
512 verb "found macro $macro in $file: $.";
513 $map{$macro} = $file;
514 push @{$invmap{$basename}}, $macro;
518 # Note: we used to give an error here if we saw a
519 # duplicated macro. However, this turns out to be
520 # extremely unpopular. It causes actual problems which
521 # are hard to work around, especially when you must
522 # mix-and-match tool versions.
523 verb "ignoring macro $macro in $file: $.";
527 while ($line =~ /$m4_include_rx/go)
529 my $ifile = $2 || $3;
530 # Skip missing `sinclude'd files.
531 next if $1 eq 's' && ! -f $ifile;
532 push (@inc_files, $ifile);
533 $inc_lines{$ifile} = $.;
537 # Ignore any file that has an old serial (or no serial if we know
538 # another one with a serial).
541 ($type != FT_AUTOMAKE && !$serial_seen && exists $serial{$basename}));
543 $file_contents{$file} = $contents;
545 # For some reason I don't understand, it does not work
546 # to do `map { scan_file ($_, ...) } @inc_files' below.
547 # With Perl 5.8.2 it undefines @inc_files.
548 my @copy = @inc_files;
549 my @all_inc_files = (@inc_files,
550 map { scan_file ($type, $_,
551 "$file:$inc_lines{$_}") } @copy);
552 $file_includes{$file} = \@all_inc_files;
553 return @all_inc_files;
556 # strip_redundant_includes (%FILES)
557 # ---------------------------------
558 # Each key in %FILES is a file that must be present in the output.
559 # However some of these files might already include other files in %FILES,
560 # so there is no point in including them another time.
561 # This removes items of %FILES which are already included by another file.
562 sub strip_redundant_includes (%)
566 # Always include acinclude.m4, even if it does not appear to be used.
567 $files{'acinclude.m4'} = 1 if -f 'acinclude.m4';
568 # File included by $configure_ac are redundant.
569 $files{$configure_ac} = 1;
571 # Files at the end of @file_order should override those at the beginning,
572 # so it is important to preserve these trailing files. We can remove
573 # a file A if it is going to be output before a file B that includes
574 # file A, not the converse.
575 foreach my $file (reverse @file_order)
577 next unless exists $files{$file};
578 foreach my $ifile (@{$file_includes{$file}})
580 next unless exists $files{$ifile};
581 delete $files{$ifile};
582 verb "$ifile is already included by $file";
586 # configure.ac is implicitly included.
587 delete $files{$configure_ac};
592 sub trace_used_macros ()
594 my %files = map { $map{$_} => 1 } keys %macro_seen;
595 %files = strip_redundant_includes %files;
597 my $traces = ($ENV{AUTOM4TE} || 'autom4te');
598 $traces .= " --language Autoconf-without-aclocal-m4 ";
599 # All candidate files.
600 $traces .= join (' ', grep { exists $files{$_} } @file_order) . " ";
601 # All candidate macros.
602 $traces .= join (' ',
603 (map { "--trace='$_:\$f::\$n::\$1'" } ('AC_DEFUN',
606 # Do not trace $1 for all other macros as we do
607 # not need it and it might contains harmful
608 # characters (like newlines).
609 (map { "--trace='$_:\$f::\$n'" } (keys %macro_seen)));
611 verb "running $traces $configure_ac";
613 my $tracefh = new Automake::XFile ("$traces $configure_ac |");
617 while ($_ = $tracefh->getline)
620 my ($file, $macro, $arg1) = split (/::/);
622 $traced{$macro} = 1 if exists $macro_seen{$macro};
624 $map_traced_defs{$arg1} = $file
625 if ($macro eq 'AC_DEFUN'
626 || $macro eq 'AC_DEFUN_ONCE'
627 || $macro eq 'AU_DEFUN');
635 sub scan_configure ()
637 # Make sure we include acinclude.m4 if it exists.
638 if (-f 'acinclude.m4')
640 add_file ('acinclude.m4');
642 scan_configure_dep ($configure_ac);
645 ################################################################
648 # Return 0 iff some files were installed locally.
649 sub write_aclocal ($@)
651 my ($output_file, @macros) = @_;
655 # Get the list of files containing definitions for the macros used.
656 # (Filter out unused macro definitions with $map_traced_defs. This
657 # can happen when an Autoconf macro is conditionally defined:
658 # aclocal sees the potential definition, but this definition is
659 # actually never processed and the Autoconf implementation is used
664 if (exists $map_traced_defs{$m}
665 && $map{$m} eq $map_traced_defs{$m});
667 # Do not explicitly include a file that is already indirectly included.
668 %files = strip_redundant_includes %files;
672 for my $file (grep { exists $files{$_} } @file_order)
674 # Check the time stamp of this file, and of all files it includes.
675 for my $ifile ($file, @{$file_includes{$file}})
677 my $mtime = mtime $ifile;
678 $greatest_mtime = $mtime if $greatest_mtime < $mtime;
681 # If the file to add looks like outside the project, copy it
682 # to the output. The regex catches filenames starting with
683 # things like `/', `\', or `c:\'.
684 if ($file_type{$file} != FT_USER
685 || $file =~ m,^(?:\w:)?[\\/],)
687 if (!$install || $file_type{$file} != FT_SYSTEM)
689 # Copy the file into aclocal.m4.
690 $output .= $file_contents{$file} . "\n";
694 # Install the file (and any file it includes).
696 for my $ifile (@{$file_includes{$file}}, $file)
698 $dest = "$user_includes[0]/" . basename $ifile;
699 verb "installing $ifile to $dest";
700 install_file ($ifile, $dest);
707 # Otherwise, simply include the file.
708 $output .= "m4_include([$file])\n";
714 verb "running aclocal anew, because some files were installed locally";
718 # Nothing to output?!
719 # FIXME: Shouldn't we diagnose this?
720 return 1 if ! length ($output);
722 # We used to print `# $output_file generated automatically etc.' But
723 # this creates spurious differences when using autoreconf. Autoreconf
724 # creates aclocal.m4t and then rename it to aclocal.m4, but the
725 # rebuild rules generated by Automake create aclocal.m4 directly --
726 # this would gives two ways to get the same file, with a different
727 # name in the header.
728 $output = "# generated automatically by aclocal $VERSION -*- Autoconf -*-
730 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
731 # 2005 Free Software Foundation, Inc.
732 # This file is free software; the Free Software Foundation
733 # gives unlimited permission to copy and/or distribute it,
734 # with or without modifications, as long as this notice is preserved.
736 # This program is distributed in the hope that it will be useful,
737 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
738 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
739 # PARTICULAR PURPOSE.
743 # We try not to update $output_file unless necessary, because
744 # doing so invalidate Autom4te's cache and therefore slows down
745 # tools called after aclocal.
747 # We need to overwrite $output_file in the following situations.
748 # * The --force option is in use.
749 # * One of the dependencies is younger.
750 # (Not updating $output_file in this situation would cause
751 # make to call aclocal in loop.)
752 # * The contents of the current file are different from what
755 && $greatest_mtime < mtime ($output_file)
756 && $output eq contents ($output_file))
758 verb "$output_file unchanged";
762 verb "writing $output_file";
766 my $out = new Automake::XFile "> $output_file";
772 ################################################################
774 # Print usage and exit.
779 print "Usage: aclocal [OPTIONS] ...
781 Generate `aclocal.m4' by scanning `configure.ac' or `configure.in'
784 --acdir=DIR directory holding config files (for debugging)
785 --diff[=COMMAND] run COMMAND [diff -u] on M4 files that would be
786 changed (implies --install and --dry-run)
787 --dry-run pretend to, but do not actually update any file
788 --force always update output file
789 --help print this help, then exit
790 -I DIR add directory to search list for .m4 files
791 --install copy third-party files to the first -I directory
792 --output=FILE put output in FILE (default aclocal.m4)
793 --print-ac-dir print name of directory holding m4 files, then exit
794 --verbose don't be silent
795 --version print version number, then exit
796 -W, --warnings=CATEGORY report the warnings falling in CATEGORY
798 Warning categories include:
799 `syntax' dubious syntactic constructs (default)
800 `unsupported' unknown macros (default)
801 `all' all the warnings (default)
802 `no-CATEGORY' turn off warnings in CATEGORY
803 `none' turn off all the warnings
804 `error' treat warnings as errors
806 Report bugs to <bug-automake\@gnu.org>.\n";
811 # Print version and exit.
815 aclocal (GNU $PACKAGE) $VERSION
816 Written by Tom Tromey <tromey\@redhat.com>
817 and Alexandre Duret-Lutz <adl\@gnu.org>.
819 Copyright (C) 2005 Free Software Foundation, Inc.
820 This is free software; see the source for copying conditions. There is NO
821 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
826 # Parse command line.
827 sub parse_arguments ()
829 my $print_and_exit = 0;
834 'acdir=s' => sub # Setting --acdir overrides both the
835 { # automake (versioned) directory and the
836 # public (unversioned) system directory.
837 @automake_includes = ();
838 @system_includes = ($_[1])
840 'diff:s' => \$diff_command,
841 'dry-run' => \$dry_run,
842 'force' => \$force_output,
843 'I=s' => \@user_includes,
844 'install' => \$install,
845 'output=s' => \$output_file,
846 'print-ac-dir' => \$print_and_exit,
847 'verbose' => sub { setup_channel 'verb', silent => 0; },
848 'W|warnings=s' => \&parse_warnings,
851 Getopt::Long::config ("bundling", "pass_through");
853 # See if --version or --help is used. We want to process these before
854 # anything else because the GNU Coding Standards require us to
855 # `exit 0' after processing these options, and we can't guarantee this
856 # if we treat other options first. (Handling other options first
857 # could produce error diagnostics, and in this condition it is
858 # confusing if aclocal does `exit 0'.)
859 my %cli_options_1st_pass =
861 'version' => \&version,
862 'help' => sub { usage(0); },
863 # Recognize all other options (and their arguments) but do nothing.
864 map { $_ => sub {} } (keys %cli_options)
866 my @ARGV_backup = @ARGV;
867 Getopt::Long::GetOptions %cli_options_1st_pass
869 @ARGV = @ARGV_backup;
871 # Now *really* process the options. This time we know that --help
872 # and --version are not present, but we specify them nonetheless so
873 # that ambiguous abbreviation are diagnosed.
874 Getopt::Long::GetOptions %cli_options, 'version' => sub {}, 'help' => sub {}
880 for my $k (keys %cli_options)
884 map { $argopts{(length ($_) == 1)
885 ? "-$_" : "--$_" } = 1; } (split (/\|/, $1));
888 if (exists $argopts{$ARGV[0]})
890 fatal ("option `$ARGV[0]' requires an argument\n"
891 . "Try `$0 --help' for more information.");
895 fatal ("unrecognized option `$ARGV[0]'\n"
896 . "Try `$0 --help' for more information.");
902 print "@system_includes\n";
906 if (defined $diff_command)
908 $diff_command = 'diff -u' if $diff_command eq '';
909 @diff_command = split (' ', $diff_command);
914 if ($install && !@user_includes)
916 fatal ("--install should copy macros in the directory indicated by the"
917 . "\nfirst -I option, but no -I was supplied.");
920 if (! -d $system_includes[0])
922 # By default $(datadir)/aclocal doesn't exist. We don't want to
923 # get an error in the case where we are searching the default
924 # directory and it hasn't been created. (We know
925 # @system_includes has its default value if @automake_includes
926 # is not empty, because --acdir is the only way to change this.)
927 @system_includes = () if @automake_includes;
931 # Finally, adds any directory listed in the `dirlist' file.
932 if (open (DIRLIST, "$system_includes[0]/dirlist"))
938 # strip off newlines and end-of-line comments
941 push (@system_includes, $_) if -d $_;
948 ################################################################
950 parse_WARNINGS; # Parse the WARNINGS environment variable.
952 $configure_ac = require_configure_ac;
954 # We may have to rerun aclocal if some file have been installed, but
955 # it should not happen more than once. The reason we must run again
956 # is that once the file has been moved from /usr/share/aclocal/ to the
957 # local m4/ directory it appears at a new place in the search path,
958 # hence it should be output at a different position in aclocal.m4. If
959 # we did not rerun aclocal, the next run of aclocal would produce a
960 # different aclocal.m4.
965 prog_error "Too many loops." if $loop > 2;
971 my %macro_traced = trace_used_macros;
972 last if write_aclocal ($output_file, keys %macro_traced);
979 ### Setup "GNU" style for perl-mode and cperl-mode.
981 ## perl-indent-level: 2
982 ## perl-continued-statement-offset: 2
983 ## perl-continued-brace-offset: 0
984 ## perl-brace-offset: 0
985 ## perl-brace-imaginary-offset: 0
986 ## perl-label-offset: -2
987 ## cperl-indent-level: 2
988 ## cperl-brace-offset: 0
989 ## cperl-continued-brace-offset: 0
990 ## cperl-label-offset: -2
991 ## cperl-extra-newline-before-brace: t
992 ## cperl-merge-trailing-else: nil
993 ## cperl-continued-statement-offset: 2