1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063 |
- eval 'case $# in 0) exec /usr/bin/env perl -S "$0";; *) exec /usr/bin/env perl -S "$0" "$@";; esac'
- if 0;
- BEGIN
- {
- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '/opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/share/autoconf';
- unshift @INC, $pkgdatadir;
-
-
-
-
- $ENV{'SHELL'} = '/bin/sh' if ($^O eq 'dos');
- }
- use Autom4te::ChannelDefs;
- use Autom4te::Channels;
- use Autom4te::Configure_ac;
- use Autom4te::FileUtils;
- use Autom4te::General;
- use Autom4te::XFile;
- use File::Basename;
- use strict;
- my $autom4te = $ENV{'AUTOM4TE'} || '/opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/autom4te';
- my $autoconf = "$autom4te --language=autoconf";
- my @prepend_include;
- my @include = ('/opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/share/autoconf');
- my $force = 0;
- my $m4 = $ENV{"M4"} || 'm4';
- $help = "Usage: $0 [OPTION]... [TEMPLATE-FILE]...
- Update each TEMPLATE-FILE if given, or `configure.ac' if present,
- or else `configure.in', to the syntax of the current version of
- Autoconf. The original files are backed up.
- Operation modes:
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -v, --verbose verbosely report processing
- -d, --debug don't remove temporary files
- -f, --force consider all files obsolete
- Library directories:
- -B, --prepend-include=DIR prepend directory DIR to search path
- -I, --include=DIR append directory DIR to search path
- Report bugs to <bug-autoconf\@gnu.org>.
- GNU Autoconf home page: <http://www.gnu.org/software/autoconf/>.
- General help using GNU software: <http://www.gnu.org/gethelp/>.
- ";
- $version = "autoupdate (GNU Autoconf) 2.69
- Copyright (C) 2012 Free Software Foundation, Inc.
- License GPLv3+/Autoconf: GNU GPL version 3 or later
- <http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law.
- Written by David J. MacKenzie and Akim Demaille.
- ";
- sub parse_args ()
- {
- my $srcdir;
- getopt ('I|include=s' => \@include,
- 'B|prepend-include=s' => \@prepend_include,
- 'f|force' => \$force);
- if (! @ARGV)
- {
- my $configure_ac = require_configure_ac;
- push @ARGV, $configure_ac;
- }
- }
- my (%ac_macros, %au_macros, %m4_builtins);
- sub handle_autoconf_macros ()
- {
-
- xsystem ("echo dumpdef | $m4 2>" . shell_quote ("$tmp/m4.defs") . " >/dev/null");
- my $m4_defs = new Autom4te::XFile "< " . open_quote ("$tmp/m4.defs");
- while ($_ = $m4_defs->getline)
- {
- $m4_builtins{$1} = 1
- if /^(\w+):/;
- }
- $m4_defs->close;
- my $macros = new Autom4te::XFile ("$autoconf"
- . " --trace AU_DEFINE:'AU:\$f:\$1'"
- . " --trace define:'AC:\$f:\$1'"
- . " --melt /dev/null |");
- while ($_ = $macros->getline)
- {
- chomp;
- my ($domain, $file, $macro) = /^(AC|AU):(.*):([^:]*)$/ or next;
- if ($domain eq "AU")
- {
- $au_macros{$macro} = 1;
- }
- elsif ($file =~ /(^|\/)m4sugar\/(m4sugar|version)\.m4$/)
- {
-
- $m4_builtins{$macro} = 1;
- }
- else
- {
-
- $ac_macros{$macro} = 1;
- }
- }
- $macros->close;
-
- delete $ac_macros{$_}
- foreach (keys %au_macros);
-
-
- delete $ac_macros{$_}
- foreach (keys %m4_builtins);
- error "no current Autoconf macros found"
- unless keys %ac_macros;
- error "no obsolete Autoconf macros found"
- unless keys %au_macros;
- if ($debug)
- {
- print STDERR "Current Autoconf macros:\n";
- print STDERR join (' ', sort keys %ac_macros) . "\n\n";
- print STDERR "Obsolete Autoconf macros:\n";
- print STDERR join (' ', sort keys %au_macros) . "\n\n";
- }
-
-
- my $ac_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/ac.m4");
- print $ac_m4 "# ac.m4 -- autoquoting definitions of the AC macros.\n";
- my $unac_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/unac.m4");
- print $unac_m4 "# unac.m4 -- undefine the AC macros.\n";
- foreach (sort keys %ac_macros)
- {
- print $ac_m4 "_au_m4_define([$_], [m4_if(\$#, 0, [[\$0]], [[\$0(\$\@)]])])\n";
- print $unac_m4 "_au_m4_undefine([$_])\n";
- }
-
-
-
- my $m4save_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/m4save.m4");
- print $m4save_m4 "# m4save.m4 -- save the m4 builtins.\n";
- my $unm4_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/unm4.m4");
- print $unm4_m4 "# unm4.m4 -- disable the m4 builtins.\n";
- my $m4_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/m4.m4");
- print $m4_m4 "# m4.m4 -- enable the m4 builtins.\n";
- foreach (sort keys %m4_builtins)
- {
- print $m4save_m4 "_au__save([$_])\n";
- print $unm4_m4 "_au__undefine([$_])\n";
- print $m4_m4 "_au__restore([$_])\n";
- }
- }
- parse_args;
- $autoconf .= " --debug" if $debug;
- $autoconf .= " --force" if $force;
- $autoconf .= " --verbose" if $verbose;
- $autoconf .= join (' --include=', '', map { shell_quote ($_) } @include);
- $autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include);
- mktmpdir ('au');
- handle_autoconf_macros;
- my $au_changequote =
- 's/\b(' . join ('|', keys %au_macros) . ')\b/_au_m4_changequote([,])$1/g';
- xsystem ("$autoconf --trace AU_DEFINE:'_au_defun(\@<:\@\$1\@:>\@,
- \@<:\@\$2\@:>\@)' --melt /dev/null "
- . ">" . shell_quote ("$tmp/au.m4"));
- foreach my $file (@ARGV)
- {
-
- if ($file eq '-')
- {
- $file = "$tmp/stdin";
- system "cat >" . shell_quote ($file);
- }
- elsif (! -r "$file")
- {
- die "$me: $file: No such file or directory";
- }
-
-
-
- my $input_m4 = <<\EOF;
- divert(-1) -*- Autoconf -*-
- changequote([,])
-
- define([_au__defn], defn([defn]))
- define([_au__divert], defn([divert]))
- define([_au__ifdef], defn([ifdef]))
- define([_au__include], defn([include]))
- define([_au___undefine], defn([undefine]))
- define([_au__undefine], [_au__ifdef([$1], [_au___undefine([$1])])])
- define([_au__save], [m4_ifdef([$1],
- [m4_define([_au_$1], _m4_defn([$1]))])])
- define([_au__restore],
- [_au_m4_ifdef([_au_$1],
- [_au_m4_define([$1], _au__defn([_au_$1]))])])
-
- include(m4sugar/m4sugar.m4)
-
- m4_define([__file__], [$file])
-
- m4_define([m4_location], [__file__:m4_eval(__line__ - _au__first_line)])
-
- m4_include([m4save.m4])
-
-
-
- _au_m4_define([_au_defun],
- [_au_m4_define([$1],
- [_au_enable()dnl
- $2[]dnl
- _au_disable()])])
-
- _au__include([au.m4])
-
-
-
-
-
-
-
-
-
-
-
-
-
- _au_m4_define([__au_enable],
- [_au__divert(-1)
-
- _au_m4_changecom([
- _au__include([m4.m4])
- _au__include([ac.m4])
- _au__divert(0)])
-
-
-
-
- _au_m4_define([_au_enable],
- [_au_m4_ifdef([_au_enabled],
- [],
- [__au_enable()])_au_dnl
- _au_m4_pushdef([_au_enabled])])
-
-
-
- _au_m4_define([__au_disable],
- [_au__divert(-1)
- _au__include([unac.m4])
- _au__include([unm4.m4])
-
- _au_m4_changequote()
- _au_m4_changecom()
- _au__divert(0)])
-
-
-
-
- _au_m4_define([_au_disable],
- [_au_m4_popdef([_au_enabled])_au_dnl
- _au_m4_ifdef([_au_enabled],
- [],
- [__au_disable()])])
-
-
-
-
-
- _au__include([unm4.m4])
-
- _au_m4_changequote()
- _au_m4_changecom()
- _au_m4_define(_au__first_line, _au___line__)_au__divert(0)_au_dnl
- EOF
- $input_m4 =~ s/^ //mg;
- $input_m4 =~ s/\$file/$file/g;
-
- open INPUT_M4, "> " . open_quote ("$tmp/input.m4")
- or error "cannot open: $!";
- open FILE, "< " . open_quote ($file)
- or error "cannot open: $!";
- print INPUT_M4 "$input_m4";
- while (<FILE>)
- {
- eval $au_changequote;
- print INPUT_M4;
- }
- close FILE
- or error "cannot close $file: $!";
- close INPUT_M4
- or error "cannot close $tmp/input.m4: $!";
-
- xsystem ("$m4 --include=" . shell_quote ($tmp)
- . join (' --include=', '', map { shell_quote ($_) } reverse (@prepend_include))
- . join (' --include=', '', map { shell_quote ($_) } @include)
- . " " . shell_quote ("$tmp/input.m4") . " > " . shell_quote ("$tmp/updated"));
- update_file ("$tmp/updated",
- "$file" eq "$tmp/stdin" ? '-' : "$file");
- }
- exit 0;
|