@ai-ecoverse/wasix-autoconf 0.0.0-stage → 2.72.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/LICENSE +338 -0
  2. package/README.md +2 -2
  3. package/bin/autoconf +215 -0
  4. package/bin/autoheader +335 -0
  5. package/bin/autom4te +1174 -0
  6. package/bin/autoreconf +937 -0
  7. package/bin/autoscan +686 -0
  8. package/bin/autoupdate +1074 -0
  9. package/bin/ifnames +158 -0
  10. package/package.json +75 -4
  11. package/share/autoconf/Autom4te/C4che.pm +263 -0
  12. package/share/autoconf/Autom4te/ChannelDefs.pm +549 -0
  13. package/share/autoconf/Autom4te/Channels.pm +856 -0
  14. package/share/autoconf/Autom4te/Config.pm +43 -0
  15. package/share/autoconf/Autom4te/Configure_ac.pm +112 -0
  16. package/share/autoconf/Autom4te/FileUtils.pm +429 -0
  17. package/share/autoconf/Autom4te/General.pm +413 -0
  18. package/share/autoconf/Autom4te/Getopt.pm +99 -0
  19. package/share/autoconf/Autom4te/Request.pm +121 -0
  20. package/share/autoconf/Autom4te/XFile.pm +304 -0
  21. package/share/autoconf/INSTALL +368 -0
  22. package/share/autoconf/autoconf/autoconf.m4 +105 -0
  23. package/share/autoconf/autoconf/autoconf.m4f +15460 -0
  24. package/share/autoconf/autoconf/autoheader.m4 +78 -0
  25. package/share/autoconf/autoconf/autoscan.m4 +51 -0
  26. package/share/autoconf/autoconf/autotest.m4 +81 -0
  27. package/share/autoconf/autoconf/autoupdate.m4 +123 -0
  28. package/share/autoconf/autoconf/c.m4 +2794 -0
  29. package/share/autoconf/autoconf/erlang.m4 +270 -0
  30. package/share/autoconf/autoconf/fortran.m4 +1933 -0
  31. package/share/autoconf/autoconf/functions.m4 +2127 -0
  32. package/share/autoconf/autoconf/general.m4 +3374 -0
  33. package/share/autoconf/autoconf/go.m4 +177 -0
  34. package/share/autoconf/autoconf/headers.m4 +839 -0
  35. package/share/autoconf/autoconf/lang.m4 +730 -0
  36. package/share/autoconf/autoconf/libs.m4 +493 -0
  37. package/share/autoconf/autoconf/oldnames.m4 +92 -0
  38. package/share/autoconf/autoconf/programs.m4 +1015 -0
  39. package/share/autoconf/autoconf/specific.m4 +763 -0
  40. package/share/autoconf/autoconf/status.m4 +1787 -0
  41. package/share/autoconf/autoconf/trailer.m4 +4 -0
  42. package/share/autoconf/autoconf/types.m4 +1133 -0
  43. package/share/autoconf/autom4te.cfg +169 -0
  44. package/share/autoconf/autoscan/autoscan.list +264 -0
  45. package/share/autoconf/autotest/autotest.m4 +27 -0
  46. package/share/autoconf/autotest/autotest.m4f +3915 -0
  47. package/share/autoconf/autotest/general.m4 +2292 -0
  48. package/share/autoconf/autotest/specific.m4 +74 -0
  49. package/share/autoconf/build-aux/config.guess +1807 -0
  50. package/share/autoconf/build-aux/config.sub +1960 -0
  51. package/share/autoconf/build-aux/install-sh +541 -0
  52. package/share/autoconf/m4sugar/foreach.m4 +362 -0
  53. package/share/autoconf/m4sugar/m4sh.m4 +2217 -0
  54. package/share/autoconf/m4sugar/m4sh.m4f +2046 -0
  55. package/share/autoconf/m4sugar/m4sugar.m4 +3307 -0
  56. package/share/autoconf/m4sugar/m4sugar.m4f +868 -0
  57. package/share/autoconf/version.m4 +12 -0
package/bin/ifnames ADDED
@@ -0,0 +1,158 @@
1
+ #!/usr/bin/perl
2
+ # -*- perl -*-
3
+ # Generated from bin/ifnames.in; do not edit by hand.
4
+
5
+ eval 'case $# in 0) exec /usr/bin/perl -S "$0";; *) exec /usr/bin/perl -S "$0" "$@";; esac'
6
+ if 0;
7
+
8
+ # ifnames - print the identifiers used in C preprocessor conditionals
9
+
10
+ # Copyright (C) 1994-1995, 1999-2003, 2005-2017, 2020-2023 Free Software
11
+ # Foundation, Inc.
12
+
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 3 of the License, or
16
+ # (at your option) any later version.
17
+
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.
22
+
23
+ # You should have received a copy of the GNU General Public License
24
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
25
+
26
+ # Reads from stdin if no files are given.
27
+ # Writes to stdout.
28
+
29
+ # Written by David MacKenzie <djm@gnu.ai.mit.edu>
30
+ # and Paul Eggert <eggert@twinsun.com>.
31
+
32
+ use 5.006;
33
+ use strict;
34
+ use warnings FATAL => 'all';
35
+
36
+ BEGIN
37
+ {
38
+ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || do { require File::Basename; require File::Spec; File::Spec->catdir(File::Basename::dirname(File::Basename::dirname(File::Spec->rel2abs($0))), 'share', 'autoconf') };
39
+ unshift @INC, $pkgdatadir;
40
+
41
+ # Override SHELL. On DJGPP SHELL may not be set to a shell
42
+ # that can handle redirection and quote arguments correctly,
43
+ # e.g.: COMMAND.COM. For DJGPP always use the shell that configure
44
+ # has detected.
45
+ $ENV{'SHELL'} = '/bin/sh' if ($^O eq 'dos');
46
+ }
47
+
48
+ use Autom4te::General;
49
+ use Autom4te::XFile;
50
+ use Autom4te::FileUtils;
51
+
52
+ # $HELP
53
+ # -----
54
+ $help = "Usage: $0 [OPTION]... [FILE]...
55
+
56
+ Scan all of the C source FILES (or the standard input, if none are
57
+ given) and write to the standard output a sorted list of all the
58
+ identifiers that appear in those files in '#if', '#elif', '#ifdef', or
59
+ '#ifndef' directives. Print each identifier on a line, followed by a
60
+ space-separated list of the files in which that identifier occurs.
61
+
62
+ -h, --help print this help, then exit
63
+ -V, --version print version number, then exit
64
+
65
+ Report bugs to <bug-autoconf\@gnu.org>.
66
+
67
+ The full documentation for Autoconf can be read via 'info autoconf',
68
+ or on the Web at <https://www.gnu.org/software/autoconf/manual/>.
69
+ ";
70
+
71
+
72
+ # $VERSION
73
+ # --------
74
+ $version = "ifnames (GNU Autoconf) 2.72
75
+ Copyright (C) 2023 Free Software Foundation, Inc.
76
+ License GPLv3+/Autoconf: GNU GPL version 3 or later
77
+ <https://gnu.org/licenses/gpl.html>, <https://gnu.org/licenses/exceptions.html>
78
+ This is free software: you are free to change and redistribute it.
79
+ There is NO WARRANTY, to the extent permitted by law.
80
+
81
+ Written by David J. MacKenzie and Paul Eggert.
82
+ ";
83
+
84
+
85
+ # &parse_args ()
86
+ # --------------
87
+ # Process any command line arguments.
88
+ sub parse_args ()
89
+ {
90
+ getopt ();
91
+ }
92
+
93
+
94
+ # %OCCURRENCE
95
+ # -----------
96
+ my %occurrence;
97
+
98
+
99
+ # &scan_file ($FILE-NAME)
100
+ # -----------------------
101
+ sub scan_file ($)
102
+ {
103
+ my ($file_name) = @_;
104
+ my $file = new Autom4te::XFile ($file_name, "<");
105
+ while ($_ = $file->getline)
106
+ {
107
+ # Continuation lines.
108
+ $_ .= $file->getline
109
+ while (s/\\$//);
110
+
111
+ # Preprocessor directives.
112
+ if (s/^\s*\#\s*(if|ifdef|ifndef|elif)\s+//)
113
+ {
114
+ # Remove comments. Not perfect, but close enough.
115
+ s(/\*.*?\*/)();
116
+ s(/\*.*)();
117
+ s(//.*)();
118
+ foreach my $word (split (/\W+/))
119
+ {
120
+ next
121
+ if $word eq 'defined' || $word !~ /^[a-zA-Z_]/;
122
+ $occurrence{$word}{$file_name} = 1;
123
+ }
124
+ }
125
+ }
126
+ }
127
+
128
+
129
+ ## ------ ##
130
+ ## Main. ##
131
+ ## ------ ##
132
+
133
+ parse_args();
134
+ foreach (@ARGV)
135
+ {
136
+ scan_file ($_);
137
+ }
138
+ foreach (sort keys %occurrence)
139
+ {
140
+ print "$_ ", join (' ', sort keys %{$occurrence{$_}}), "\n";
141
+ }
142
+
143
+ ### Setup "GNU" style for perl-mode and cperl-mode.
144
+ ## Local Variables:
145
+ ## perl-indent-level: 2
146
+ ## perl-continued-statement-offset: 2
147
+ ## perl-continued-brace-offset: 0
148
+ ## perl-brace-offset: 0
149
+ ## perl-brace-imaginary-offset: 0
150
+ ## perl-label-offset: -2
151
+ ## cperl-indent-level: 2
152
+ ## cperl-brace-offset: 0
153
+ ## cperl-continued-brace-offset: 0
154
+ ## cperl-label-offset: -2
155
+ ## cperl-extra-newline-before-brace: t
156
+ ## cperl-merge-trailing-else: nil
157
+ ## cperl-continued-statement-offset: 2
158
+ ## End:
package/package.json CHANGED
@@ -1,6 +1,77 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/wasix-autoconf",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2.72.0-2",
4
+ "description": "GNU Autoconf for slicc (scripts; needs wasix-perl + wasix-m4)",
5
+ "license": "GPL-3.0-or-later",
6
+ "files": [
7
+ "README.md",
8
+ "LICENSE",
9
+ "bin",
10
+ "share"
11
+ ],
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "homescoop": {
16
+ "recipe": "wasix-autoconf",
17
+ "upstream": "2.72"
18
+ },
19
+ "slicc": {
20
+ "abi": "wasi",
21
+ "commands": {
22
+ "autoconf": {
23
+ "script": "bin/autoconf",
24
+ "env": {
25
+ "autom4te_perllibdir": "${package}/share/autoconf",
26
+ "AC_MACRODIR": "${package}/share/autoconf",
27
+ "trailer_m4": "${package}/share/autoconf/autoconf/trailer.m4"
28
+ }
29
+ },
30
+ "autoheader": {
31
+ "script": "bin/autoheader",
32
+ "env": {
33
+ "autom4te_perllibdir": "${package}/share/autoconf",
34
+ "AC_MACRODIR": "${package}/share/autoconf"
35
+ }
36
+ },
37
+ "autom4te": {
38
+ "script": "bin/autom4te",
39
+ "env": {
40
+ "autom4te_perllibdir": "${package}/share/autoconf",
41
+ "AC_MACRODIR": "${package}/share/autoconf"
42
+ }
43
+ },
44
+ "autoreconf": {
45
+ "script": "bin/autoreconf",
46
+ "env": {
47
+ "autom4te_perllibdir": "${package}/share/autoconf",
48
+ "AC_MACRODIR": "${package}/share/autoconf"
49
+ }
50
+ },
51
+ "autoscan": {
52
+ "script": "bin/autoscan",
53
+ "env": {
54
+ "autom4te_perllibdir": "${package}/share/autoconf",
55
+ "AC_MACRODIR": "${package}/share/autoconf"
56
+ }
57
+ },
58
+ "autoupdate": {
59
+ "script": "bin/autoupdate",
60
+ "env": {
61
+ "autom4te_perllibdir": "${package}/share/autoconf",
62
+ "AC_MACRODIR": "${package}/share/autoconf"
63
+ }
64
+ },
65
+ "ifnames": {
66
+ "script": "bin/ifnames",
67
+ "env": {
68
+ "autom4te_perllibdir": "${package}/share/autoconf"
69
+ }
70
+ }
71
+ }
72
+ },
73
+ "dependencies": {
74
+ "@ai-ecoverse/wasix-perl": "^5.42.0-2",
75
+ "@ai-ecoverse/wasix-m4": "^1.4.20-1"
76
+ }
77
+ }
@@ -0,0 +1,263 @@
1
+ # autoconf -- create 'configure' using m4 macros
2
+ # Copyright (C) 2003, 2006, 2009-2017, 2020-2023 Free Software
3
+ # Foundation, Inc.
4
+
5
+ # This program is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # This program is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU General Public License
16
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+
18
+ package Autom4te::C4che;
19
+
20
+ =head1 NAME
21
+
22
+ Autom4te::C4che - a single m4 run request
23
+
24
+ =head1 SYNOPSIS
25
+
26
+ use Autom4te::C4che;
27
+
28
+ =head1 DESCRIPTION
29
+
30
+ This Perl module handles the cache of M4 runs used by autom4te.
31
+
32
+ =cut
33
+
34
+ use 5.006;
35
+ use strict;
36
+ use warnings FATAL => 'all';
37
+
38
+ use Carp;
39
+ use Data::Dumper;
40
+
41
+ use Autom4te::Request;
42
+
43
+ =over 4
44
+
45
+ =item @request
46
+
47
+ List of requests.
48
+
49
+ Must be a package global so it can be accessed by code evaluated via
50
+ 'eval', below.
51
+
52
+ =cut
53
+
54
+ our @request;
55
+
56
+ =item C<$req = Autom4te::C4che-E<gt>retrieve (%attr)>
57
+
58
+ Find a request with the same path and input.
59
+
60
+ =cut
61
+
62
+ sub retrieve($%)
63
+ {
64
+ my ($self, %attr) = @_;
65
+
66
+ foreach (@request)
67
+ {
68
+ # Same path.
69
+ next
70
+ if join ("\n", @{$_->path}) ne join ("\n", @{$attr{path}});
71
+
72
+ # Same inputs.
73
+ next
74
+ if join ("\n", @{$_->input}) ne join ("\n", @{$attr{input}});
75
+
76
+ # Found it.
77
+ return $_;
78
+ }
79
+
80
+ return undef;
81
+ }
82
+
83
+ =item C<$req = Autom4te::C4che-E<gt>register (%attr)>
84
+
85
+ Create and register a request for these path and input.
86
+
87
+ =cut
88
+
89
+ # $REQUEST-OBJ
90
+ # register ($SELF, %ATTR)
91
+ # -----------------------
92
+ # NEW should not be called directly.
93
+ # Private.
94
+ sub register ($%)
95
+ {
96
+ my ($self, %attr) = @_;
97
+
98
+ # path and input are the only ID for a request object.
99
+ my $obj = new Autom4te::Request ('path' => $attr{path},
100
+ 'input' => $attr{input});
101
+ push @request, $obj;
102
+
103
+ # Assign an id for cache file.
104
+ $obj->id ("$#request");
105
+
106
+ return $obj;
107
+ }
108
+
109
+
110
+ =item C<$req = Autom4te::C4che-E<gt>request (%request)>
111
+
112
+ Get (retrieve or create) a request for the path C<$request{path}> and
113
+ the input C<$request{input}>.
114
+
115
+ =cut
116
+
117
+ # $REQUEST-OBJ
118
+ # request($SELF, %REQUEST)
119
+ # ------------------------
120
+ sub request ($%)
121
+ {
122
+ my ($self, %request) = @_;
123
+
124
+ my $req =
125
+ Autom4te::C4che->retrieve (%request)
126
+ || Autom4te::C4che->register (%request);
127
+
128
+ # If there are new traces to produce, then we are not valid.
129
+ foreach (@{$request{'macro'}})
130
+ {
131
+ if (! exists ${$req->macro}{$_})
132
+ {
133
+ ${$req->macro}{$_} = 1;
134
+ $req->valid (0);
135
+ }
136
+ }
137
+
138
+ # It would be great to have $REQ check that it is up to date wrt
139
+ # its dependencies, but that requires getting traces (to fetch the
140
+ # included files), which is out of the scope of Request (currently?).
141
+
142
+ return $req;
143
+ }
144
+
145
+
146
+ =item C<$string = Autom4te::C4che-E<gt>marshall ()>
147
+
148
+ Serialize all the current requests.
149
+
150
+ =cut
151
+
152
+
153
+ # marshall($SELF)
154
+ # ---------------
155
+ sub marshall ($)
156
+ {
157
+ my ($caller) = @_;
158
+
159
+ my $marshall = Data::Dumper->new ([\@request], [qw (*request)]);
160
+ $marshall->Indent(2)->Terse(0);
161
+
162
+ # The Sortkeys method was added in Data::Dumper 2.12_01, so it is
163
+ # available in 5.8.x and 5.6.2 but not in 5.6.1 or earlier.
164
+ # Ignore failure of method lookup.
165
+ eval { $marshall->Sortkeys(1); };
166
+
167
+ return $marshall->Dump . "\n";
168
+ }
169
+
170
+
171
+ =item C<Autom4te::C4che-E<gt>save ($file, $version)>
172
+
173
+ Save the cache in the C<$file> file object.
174
+
175
+ =cut
176
+
177
+ # SAVE ($FILE, $VERSION)
178
+ # ----------------------
179
+ sub save ($$)
180
+ {
181
+ my ($self, $file, $version) = @_;
182
+
183
+ confess "cannot save a single request\n"
184
+ if ref ($self);
185
+
186
+ $file->seek (0, 0);
187
+ $file->truncate (0);
188
+ print $file
189
+ "# This file was generated by Autom4te $version.\n",
190
+ "# It contains the lists of macros which have been traced.\n",
191
+ "# It can be safely removed.\n",
192
+ "\n",
193
+ $self->marshall;
194
+ }
195
+
196
+
197
+ =item C<Autom4te::C4che-E<gt>good_version ($file, $version)>
198
+
199
+ Succeed if the cache from the C<$file> file object is of the given version.
200
+
201
+ =cut
202
+
203
+ # GOOD_VERSION ($FILE, $VERSION)
204
+ # ------------------------------
205
+ sub good_version ($$)
206
+ {
207
+ my ($self, $file, $version) = @_;
208
+ my ($line) = $file->getline;
209
+ return defined ($line) && $line eq "# This file was generated by Autom4te $version.\n";
210
+ }
211
+
212
+ =item C<Autom4te::C4che-E<gt>load ($file)>
213
+
214
+ Load the cache from the C<$file> file object.
215
+
216
+ =cut
217
+
218
+ # LOAD ($FILE)
219
+ # ------------
220
+ sub load ($$)
221
+ {
222
+ my ($self, $file) = @_;
223
+ my $fname = $file->name;
224
+
225
+ confess "cannot load a single request\n"
226
+ if ref ($self);
227
+
228
+ my $contents = join "", $file->getlines;
229
+
230
+ eval $contents;
231
+
232
+ confess "cannot eval $fname: $@\n" if $@;
233
+ }
234
+
235
+
236
+ =head1 SEE ALSO
237
+
238
+ L<Autom4te::Request>
239
+
240
+ =head1 HISTORY
241
+
242
+ Written by Akim Demaille E<lt>F<akim@freefriends.org>E<gt>.
243
+
244
+ =cut
245
+
246
+ 1; # for require
247
+
248
+ ### Setup "GNU" style for perl-mode and cperl-mode.
249
+ ## Local Variables:
250
+ ## perl-indent-level: 2
251
+ ## perl-continued-statement-offset: 2
252
+ ## perl-continued-brace-offset: 0
253
+ ## perl-brace-offset: 0
254
+ ## perl-brace-imaginary-offset: 0
255
+ ## perl-label-offset: -2
256
+ ## cperl-indent-level: 2
257
+ ## cperl-brace-offset: 0
258
+ ## cperl-continued-brace-offset: 0
259
+ ## cperl-label-offset: -2
260
+ ## cperl-extra-newline-before-brace: t
261
+ ## cperl-merge-trailing-else: nil
262
+ ## cperl-continued-statement-offset: 2
263
+ ## End: