···2727{
2828 struct nsd *nsd;
2929 struct nsd_child *child;
3030- int child_num;
3131-3232- /* pointer to the socket, as it may change if it is restarted */
3333- int *xfrd_sock;
3434- struct buffer *packet;
3535- int forward_mode;
3636- size_t got_bytes;
3737- uint16_t total_bytes;
3838- uint32_t acl_num;
3939- int32_t acl_xfr;
4030};
41314232/*
···8373 * Handle interprocess communication with parent process, read and write.
8474 */
8575void xfrd_handle_ipc(int fd, short event, void* arg);
7676+7777+/* receive incoming notifies received by and from the serve processes */
7878+void xfrd_handle_notify(int fd, short event, void* arg);
86798780/* check if all children have exited in an orderly fashion and set mode */
8881void parent_check_all_children_exited(struct nsd* nsd);
+61
usr.sbin/nsd/simdzone/CHANGELOG.md
···11+# Changelog
22+33+All notable changes to simdzone will be documented in this file.
44+55+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0),
66+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77+88+## [0.2.0] - 2024-12-12
99+1010+### Added
1111+1212+- Add semantic checks for DS and ZONEMD digests (NLnetLabs/nsd#205).
1313+- Support registering a callback for $INCLUDE entries (NLnetLabs/nsd#229).
1414+- Add tls-supported-groups SvcParam support.
1515+- Check iana registries for unimplemented (new) RR types and SvcParamKeys.
1616+- Add support for NINFO, RKEY, RESINFO, WALLET, CLA and TA RR types.
1717+1818+### Fixed
1919+2020+- Prepend -march to CFLAGS to fix architecture detection (NLnetLabs/nsd#372).
2121+- Fix propagation of implicit TTLs (NLnetLabs/nsd#375).
2222+- Fix detection of Westmere architecture by checking for CLMUL too.
2323+- Fix compilation on NetBSD (#233).
2424+- Fix reading specialized symbolic links (NLnetLabs/nsd#380).
2525+2626+## [0.1.1] - 2024-07-19
2727+2828+### Added
2929+3030+- Test to verify configure.ac and Makefile.in are correct.
3131+- Add support for reading from stdin if filename is "-".
3232+- Add support for building with Oracle Developer Studio 12.6.
3333+- Add support for "time" service for Well-Know Services (WKS) RR.
3434+3535+### Fixed
3636+3737+- Fix makefile dependencies.
3838+- Fix makefile to use source directory for build dependencies.
3939+- Fix changelog to reflect v0.1.0 release.
4040+- Update makefile to not use target-specific variables.
4141+- Fix makefile clean targets.
4242+- Fix state keeping in fallback scanner for contiguous and quoted.
4343+- Fix bug in name scanner.
4444+- Fix type mnemonic parsing in fallback parser.
4545+- Fix endian.h to include machine/endian.h on OpenBSD releases before 5.6.
4646+- Fix use after free on buffer resize.
4747+- Fix parsing of numeric protocols in WKS RRs.
4848+- Make devclean target depend on realclean target.
4949+- Fix detection of AVX2 support by checking generic AVX support by the
5050+ processor and operating system (#222).
5151+5252+### Changed
5353+5454+- Make relative includes relative to current working directory.
5555+- Split Autoconf and CMake compiler tests for supported SIMD instructions.
5656+5757+## [0.1.0] - 2024-04-16
5858+5959+### Added
6060+6161+- Initial release.
+75
usr.sbin/nsd/simdzone/CONTRIBUTING.md
···11+# Contributing to simdzone
22+33+The simdzone library is open source and made available under the permissive
44+3-clause BSD license.
55+66+Contributions are very welcome!
77+88+> The original specification in [RFC1035][1] is rather ambiguous and does not
99+> cover additions from later RFCs. See [SYNTAX.md](SYNTAX.md) for a quick
1010+> summary of the format and interpretation in simdzone.
1111+1212+[1]: https://datatracker.ietf.org/doc/html/rfc1035#section-5
1313+1414+## Reference data
1515+1616+1. [Zone Data for .se and .nu][2] can be obtained via a DNS zone transfer.
1717+1818+2. The [Centralized Zone Data Service (CZDS)][3] provides access to zone data
1919+ for participating gTLDs.
2020+2121+ > Downloading zone data via the browser can be problematic. The
2222+ > [The CZDS API client in Java][4] can be used as a workaround.
2323+2424+3. The *Hint and Zone Files* can be obtained from Internet Assigned Numbers
2525+ Authority (IANA) [Root Zone Management][5] page.
2626+2727+[2]: https://internetstiftelsen.se/en/zone-data/
2828+[3]: https://czds.icann.org/
2929+[4]: https://github.com/icann/czds-api-client-java/
3030+[5]: https://www.iana.org/domains/root
3131+3232+## Source layout
3333+3434+`include` contains only headers required for consumption of the library.
3535+3636+`src` contains the implementation and internal headers.
3737+3838+The layout of `src` is (of course) inspired by the layout in simdjson. The
3939+structure is intentionally simple and without (too much) hierarchy, but as
4040+simdzone has very architecture specific code to maximize performance, there
4141+are some caveats.
4242+4343+Processors may support multiple instruction sets. e.g. x86\_64 may support
4444+SSE4.2, AVX2 and AVX-512 instruction sets depending on the processor family.
4545+The preferred implementation is automatically selected at runtime. As a result,
4646+code may need to be compiled more than once. To improve code reuse, shared
4747+logic resides in headers rather than source files and is declared static to
4848+avoid name clashes. Bits and pieces are then mixed and matched in a
4949+`src/<arch>/parser.c` compilation target to allow for multiple implementations
5050+to co-exist.
5151+5252+Sources and headers common to all architectures that do not implement parsing
5353+for a specific data-type reside directly under `src`. Code specific to an
5454+architecture resides in a directory under `src`, e.g. `haswell` or `fallback`.
5555+`src/generic` contains scanner and parser code common to all implementations,
5656+but leans towards code shared by SIMD implementations.
5757+5858+For example, SIMD-optimized scanner code resides in `src/generic/scanner.h`,
5959+abstractions for intrinsics reside in e.g. `src/haswell/simd.h` and `lex(...)`,
6060+which is used by all implementations, is implemented in `src/lexer.h`.
6161+A fallback scanner is implemented in `src/fallback/scanner.h`.
6262+6363+A SIMD-optimized type parser is implemented in `src/generic/type.h`, a fallback
6464+type parser is implemented in `src/fallback/type.h`. Future versions are
6565+expected to add more optimized parsers for specific data types, even parsers
6666+that are tied to a specific instruction set. The layout accommodates these
6767+scenarios. e.g. an AVX2 optimized parser may reside in `src/haswell/<type>.h`,
6868+an SSE4.2 optimized parser may reside in `src/westmere/<type>.h`, etc.
6969+7070+## Symbol visibility
7171+7272+All exported symbols, identifiers, etc must be prefixed with `zone_`, or
7373+`ZONE_` for macros. Non-exported symbols are generally not prefixed. e.g.
7474+`lex(...)` and `scan(...)` are declared static and as such are not required to
7575+be prefixed.
+311
usr.sbin/nsd/simdzone/FORMAT.md
···11+# Zone files
22+33+Zone files are text files that contain resource records (RRs) in text form.
44+Zones can be defined by expressing them in the form of a list of RRs.
55+66+Zone files were originally specified in RFC1035 Section 5, but the DNS
77+has seen many additions since and the specification is rather ambiguous.
88+Consequently, various name servers implement slightly different dialects. This
99+document aims to clarify the format by listing (some of) the relevant
1010+specifications and then proceed to explain why certain design decisions were
1111+made in simdzone.
1212+1313+* [RFC 1034 Section 3.6.1][rfc1034#3.6.1]
1414+* [RFC 1035 Section 5][rfc1035#5]
1515+* [RFC 2065 Section 4.5][rfc2065#4.5]
1616+* [RFC 2181 Section 8][rfc2181#8]
1717+* [RFC 2308 Section 4][rfc2308#4]
1818+* [RFC 3597 Section 5][rfc3597#5]
1919+* [RFC 9460 Section 2.1][rfc9460#2.1]
2020+2121+2222+## Clarification (work-in-progress)
2323+2424+> NOTE: BIND behavior is more-or-less considered the de facto standard.
2525+2626+Historically, master files where edited by hand, which is reflected in the
2727+syntax. Consider the format a tabular serialization format with provisions
2828+for convenient editing. i.e. the owner, class and ttl fields may be omitted
2929+(provided the line starts with \<blank\> for the owner) and $INCLUDE directives
3030+can be used for templating.
3131+3232+The format is NOT context-free. The field following the owner (if specified)
3333+may represent either a type, class or ttl and a symbolic constant, e.g. A
3434+or NS, may have a different meaning if specified as an RDATA field.
3535+3636+The DNS is intentionally extensible. The specification is not explicit about
3737+how that affects syntax, but it explains why no specific notation for
3838+data-types can be enforced by RFC 1035. To make it easier for data-types to
3939+be added at a later stage the syntax cannot enforce a certain notation (or
4040+the scanner would need to be revised). Consequently, the scanner only
4141+identifies items (or fields) and structural characters, which can be
4242+expressed as either a contiguous set of characters without interior spaces,
4343+or as a quoted string.
4444+4545+The format allows for including structural characters in fields by means of
4646+escaping the actual character or enclosing the field in quotes. The example
4747+provided by the specification here is using ASCII dots in domain name labels.
4848+The dot is normally a label separator, replaced by the length of the label
4949+on the wire. If a domain name includes an actual ASCII dot, the character
5050+must be escaped in the textual representation (`\X` or `\DDD`).
5151+5252+Note that ASCII dot characters strictly speaking do not have to be escaped
5353+in a quoted string. RFC 1035 clearly states labels in domain names are
5454+expressed as character strings. However, behavior differs across
5555+implementations, so support for quoted labels is best dropped (see below).
5656+5757+RFC 1035 states both \<contiguous\> and \<quoted\> are \<character-string\>.
5858+Meaning, items can be either \<contiguous\> or \<quoted\>. Wether a specific
5959+item is interpreted as a \<character-string\> depends on type of value for
6060+that item. E.g., TTLs are decimal integers and therefore cannot be expressed
6161+as \<quoted\> as it is not a \<character-string\>. Similarly, base64
6262+sequences are encoded binary blobs, not \<character-string\>s and therefore
6363+cannot be expressed as such. Escape sequences are valid only in
6464+\<character-string\>s.
6565+6666+* Mnemonics are NOT character strings.
6767+6868+ > BIND does not accept quoted fields for A or NS RDATA. TTL values in SOA
6969+ > RDATA, base64 Signature in DNSKEY RDATA, as well as type, class and TTL
7070+ > header fields all result in a syntax error too if quoted.
7171+7272+* Some integer fields allow for using mnemonics too. E.g., the algorithm
7373+ field in RRSIG records.
7474+7575+* RFC 1035 states: A freestanding @ denotes the current origin.
7676+ There has been discussion in which locations @ is interpreted as the origin.
7777+ e.g. how is a freestanding @ be interpreted in the RDATA section of a TXT RR.
7878+ Note that there is no mention of text expansion in the original text. A
7979+ freestanding @ denotes the origin. As such, it stands to reason that it's
8080+ use is limited to locations where domain names are expressed, which also
8181+ happens to be the most practical way to implement the functionality.
8282+8383+ > This also seems to be the behavior that other name servers implement (at
8484+ > least BIND and PowerDNS). The BIND manual states: "When used in the label
8585+ > (or name) field, the asperand or at-sign (@) symbol represents the current
8686+ > origin. At the start of the zone file, it is the \<zone\_name\>, followed
8787+ > by a trailing dot (.).
8888+8989+ > It may also make sense to interpret a quoted freestanding @ differently
9090+ > than a non-quoted one. At least, BIND throws an error if a quoted
9191+ > freestanding @ is encountered in the RDATA sections for CNAME and NS RRs.
9292+ > However, a quoted freestanding @ is accepted and interpreted as origin
9393+ > if specified as the OWNER.
9494+9595+ > Found mentions of what happens when a zone that uses freestanding @ in
9696+ > RDATA is written to disk. Of course, this particular scenario rarely occurs
9797+ > as it does not need to be written to disk when loaded on a primary and no
9898+ > file exists if received over AXFR/IXFR. However, it may make sense to
9999+ > implement optimistic compression of this form, and make it configurable.
100100+101101+* Class and type names are mutually exclusive in practice.
102102+ RFC1035 states: The RR begins with optional TTL and class fields, ...
103103+ Therefore, if a type name matches a class name, the parser cannot distinguish
104104+ between the two in text representation and must resort to generic notation
105105+ (RFC3597) or, depending on the RDATA format for the record type, a
106106+ look-ahead may be sufficient. Realistically, it is highly likely that because
107107+ of this, no type name will ever match a class name.
108108+109109+ > This means both can reside in the same table.
110110+111111+* The encoding is non-ASCII. Some characters have special meaning, but users
112112+ are technically allowed to put in non-printable octets outside the ASCII
113113+ range without custom encoding. Of course, this rarely occurs in practice
114114+ and users are encouraged to use the \DDD encoding for "special".
115115+116116+* Parenthesis may not be nested.
117117+118118+* $ORIGIN must be an absolute domain.
119119+120120+* Escape sequences must NOT be unescaped in the scanner as is common with
121121+ programming languages like C that have a preprocessor. Instead, the
122122+ original text is necessary in the parsing stage to distinguish between
123123+ label separators (dots).
124124+125125+* RFC 1035 specifies that the current origin should be restored after an
126126+ $INCLUDE, but it is silent on whether the current domain name should also be
127127+ restored. BIND 9 restores both of them. This could be construed as a
128128+ deviation from RFC 1035, a feature, or both.
129129+130130+* RFC 1035 states: and text literals can contain CRLF within the text.
131131+ BIND, however, does not allow newlines in text (escaped or not). For
132132+ performance reasons, we may adopt the same behavior as that would relieve
133133+ the need to keep track of possibly embedded newlines.
134134+135135+* From: http://www.zytrax.com/books/dns/ch8/include.html (mentioned in chat)
136136+ > Source states: The RFC is silent on the topic of embedded `$INCLUDE`s in
137137+ > `$INCLUDE`d files - BIND 9 documentation is similarly silent. Assume they
138138+ > are not permitted.
139139+140140+ All implementations, including BIND, allow for embedded `$INCLUDE`s.
141141+ The current implementation is such that (embedded) includes are allowed by
142142+ default. However, `$INCLUDE` directives can be disabled, which is useful
143143+ when parsing from an untrusted source. There is also protection against
144144+ cyclic includes.
145145+146146+ > There is no maximum to the amount of embedded includes (yet). NSD limits
147147+ > the number of includes to 10 by default (compile option). For security, it
148148+ > must be possible to set a hard limit.
149149+150150+* Default values for TTLs can be quite complicated.
151151+152152+ A [commit to ldns](https://github.com/NLnetLabs/ldns/commit/cb101c9) by
153153+ @wtoorop nicely sums it up in code.
154154+155155+ RFC 1035 section 5.1:
156156+ > Omitted class and TTL values are default to the last explicitly stated
157157+ > values.
158158+159159+ This behavior is updated by RFC 2308 section 4:
160160+ > All resource records appearing after the directive, and which do not
161161+ > explicitly include a TTL value, have their TTL set to the TTL given
162162+ > in the $TTL directive. SIG records without a explicit TTL get their
163163+ > TTL from the "original TTL" of the SIG record [RFC 2065 Section 4.5].
164164+165165+ The TTL rules for `SIG` RRs stated in RFC 2065 Section 4.5:
166166+ > If the original TTL, which applies to the type signed, is the same as
167167+ > the TTL of the SIG RR itself, it may be omitted. The date field
168168+ > which follows it is larger than the maximum possible TTL so there is
169169+ > no ambiguity.
170170+171171+ The same applies applies to `RRSIG` RRs, although not stated as explicitly
172172+ in RFC 4034 Section 3:
173173+ > The TTL value of an RRSIG RR MUST match the TTL value of the RRset it
174174+ > covers. This is an exception to the [RFC2181] rules for TTL values
175175+ > of individual RRs within a RRset: individual RRSIG RRs with the same
176176+ > owner name will have different TTL values if the RRsets they cover
177177+ > have different TTL values.
178178+179179+ Logic spanning RRs must not be handled during deserialization. The order in
180180+ which RRs appear in the zone file is not relevant and keeping a possibly
181181+ infinite backlog of RRs to handle it "automatically" is inefficient. As
182182+ the name server retains RRs in a database already it seems most elegant to
183183+ signal the TTL value was omitted and a default was used so that it may be
184184+ updated in some post processing step.
185185+186186+ [RFC 2181 Section 8][rfc2181#8] contains additional notes on the maximum
187187+ value for TTLs. During deserialization, any value exceeding 2147483647 is
188188+ considered an error in primary mode, or a warning in secondary mode.
189189+ [RFC 8767 Section 4][rfc8767#4] updates the text, but the update does not
190190+ update handling during deserialization.
191191+192192+ [RFC 2181 Section 5][rfc2181#5.2] states the TTLs of all RRs in an RRSet
193193+ must be the same. As with default values for `SIG` and `RRSIG` RRs, this
194194+ must NOT be handled during deserialization. Presumably, the application
195195+ should transparently fix TTLs (NLnetLabs/nsd#178).
196196+197197+* Do NOT allow for quoted labels in domain names.
198198+ [RFC 1035 Section 5][rfc1035#5] states:
199199+ > The labels in the domain name are expressed as character strings and
200200+ > separated by dots.
201201+202202+ [RFC 1035 section 5][rfc1035#5] states:
203203+ > \<character-string\> is expressed in one or two ways: as a contiguous set
204204+ > of characters without interior spaces, or as string beginning with a " and
205205+ > ending with a ".
206206+207207+ However, quoted labels in domain names are very uncommon and implementations
208208+ handle quoted names both in OWNER and RDATA very differently. The Flex+Bison
209209+ based parser used in NSD before was the only parser that got it right.
210210+211211+ * BIND
212212+ * owner: yes, interpreted as quoted
213213+ ```
214214+ dig @127.0.0.1 A quoted.example.com.
215215+ ```
216216+ ```
217217+ quoted.example.com. xxx IN A x.x.x.x
218218+ ```
219219+ * rdata: no, syntax error (even with `check-names master ignored;`)
220220+ * Knot
221221+ * owner: no, syntax error
222222+ * rdata: no, syntax error
223223+ * PowerDNS
224224+ * owner: no, not interpreted as quoted
225225+ ```
226226+ pdnsutil list-zone example.com.
227227+ ```
228228+ ```
229229+ "quoted".example.com xxx IN A x.x.x.x
230230+ ```
231231+ * rdata: no, not interpreted as quoted
232232+ ```
233233+ dig @127.0.0.1 NS example.com.
234234+ ```
235235+ ```
236236+ example.com. xxx IN NS \"quoted.example.com.\".example.com.
237237+ ```
238238+239239+ > [libzscanner](https://github.com/CZ-NIC/knot/tree/master/src/libzscanner),
240240+ > the (standalone) zone parser used by Knot seems mosts consistent.
241241+242242+ Drop support for quoted labels or domain names for consistent behavior.
243243+244244+* Should any domain names that are not valid host names as specified by
245245+ RFC 1123 section 2, i.e. use characters not in the preferred naming syntax
246246+ as specified by RFC 1035 section 2.3.1, be accepted? RFC 2181 section 11 is
247247+ very specific on this topic, but it merely states that labels may contain
248248+ characters outside the set on the wire, it does not address what is, or is
249249+ not, allowed in zone files.
250250+251251+ BIND's zone parser throws a syntax error for any name that is not a valid
252252+ hostname unless `check-names master ignored;` is specified. Knot
253253+ additionally accepts `-`, `_` and `/` according to
254254+ [NOTES](https://github.com/CZ-NIC/knot/blob/master/src/libzscanner/NOTES).
255255+256256+ * [RFC1035 Section 2.3.1][rfc1035#2.3.1]
257257+ * [RFC1123 Section 2][rfc1123#2]
258258+ * [RFC2181 Section 11][rfc2181#11]
259259+260260+* RFC 1035 specifies two control directives "$INCLUDE" and "$ORIGIN". RFC 2308
261261+ specifies the "$TTL" directive. BIND additionally implements the "$DATE" and
262262+ "$GENERATE" directives. Since "$" (dollar sign) is not reserved, both
263263+ "$DATE" and "$GENERATE" (and "$TTL" before RFC2308) are considered valid
264264+ domain names in other implementations (based on what is accepted for domain
265265+ names, see earlier points). It seems "$" is better considered a reserved
266266+ character (possibly limiting its special status to the start of the
267267+ line), to allow for reliable extensibility in the future.
268268+269269+ > BIND seems to already throw an error if "$" is encountered, see
270270+ > `lib/dns/master.c`. Presumably, the "$DATE" directive is written when the
271271+ > zone is written to disk(?) In the code it is referred to as
272272+ > __dump_time__ and later used to calculate __ttl_offset__.
273273+274274+* BIND10 had a nice writeup on zone files, kindly provided by Shane Kerr.
275275+ [Zone File Loading Requirements on Wayback Machine](https://web.archive.org/web/20140928215002/http://bind10.isc.org:80/wiki/ZoneLoadingRequirements)
276276+277277+* `TYPE0` is sometimes used for debugging and therefore may occur in type
278278+ bitmaps or as unknown RR type.
279279+280280+* `pdns/master/regression-tests/zones/test.com` contains regression tests
281281+ that may be useful for testing simdzone.
282282+283283+* Some implementations (Knot, possibly PowerDNS) will silently split-up
284284+ strings longer than 255 characters. Others (BIND, simdzone) will throw a
285285+ syntax error.
286286+287287+* How do we handle the corner case where the first record does not have a TTL
288288+ when the file does not define a zone? (from @shane-kerr).
289289+290290+ At this point in time, the application provides a default TTL value before
291291+ parsing. Whether that is the right approach is unclear, but it is what NSD
292292+ did before.
293293+294294+* Leading zeroes in integers appear to be allowed judging by the zone file
295295+ generated for the [socket10kxfr][socket10kxfr.pre#L64] test in NSD. BIND
296296+ and Knot parsed it without problems too.
297297+298298+[rfc1034#3.6.1]: https://datatracker.ietf.org/doc/html/rfc1034#section-3.6.1
299299+[rfc1035#5]: https://datatracker.ietf.org/doc/html/rfc1035#section-5
300300+[rfc1035#2.3.1]: https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.1
301301+[rfc1123#2]: https://datatracker.ietf.org/doc/html/rfc1123#section-2
302302+[rfc2065#4.5]: https://datatracker.ietf.org/doc/html/rfc2065#section-4.5
303303+[rfc2181#5.2]: https://datatracker.ietf.org/doc/html/rfc2181#section-5.2
304304+[rfc2181#8]: https://datatracker.ietf.org/doc/html/rfc2181#section-8
305305+[rfc2181#11]: https://datatracker.ietf.org/doc/html/rfc2181#section-11
306306+[rfc2308#4]: https://datatracker.ietf.org/doc/html/rfc2308#section-4
307307+[rfc3597#5]: https://datatracker.ietf.org/doc/html/rfc3597#section-5
308308+[rfc8767#4]: https://www.rfc-editor.org/rfc/rfc8767#section-4
309309+[rfc9460#2.1]: https://datatracker.ietf.org/doc/html/rfc9460#section-2.1
310310+311311+[socket10kxfr.pre#L64]: https://github.com/NLnetLabs/nsd/blob/86a6961f2ca64f169d7beece0ed8a5e1dd1cd302/tpkg/long/socket10kxfr.tdir/socket10kxfr.pre#L64
+29
usr.sbin/nsd/simdzone/LICENSE
···11+BSD 3-Clause License
22+33+Copyright (c) 2022, NLnet Labs.
44+All rights reserved.
55+66+Redistribution and use in source and binary forms, with or without
77+modification, are permitted provided that the following conditions are met:
88+99+1. Redistributions of source code must retain the above copyright notice, this
1010+ list of conditions and the following disclaimer.
1111+1212+2. Redistributions in binary form must reproduce the above copyright notice,
1313+ this list of conditions and the following disclaimer in the documentation
1414+ and/or other materials provided with the distribution.
1515+1616+3. Neither the name of the copyright holder nor the names of its
1717+ contributors may be used to endorse or promote products derived from
1818+ this software without specific prior written permission.
1919+2020+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2121+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2222+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2323+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
2424+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2525+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2626+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2727+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2828+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2929+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
···11+
22+[](https://scan.coverity.com/projects/nlnetlabs-simdzone)
33+[](https://fosstodon.org/@nlnetlabs)
44+55+# simdzone: Parsing zone files really fast
66+77+Fast and standards compliant DNS presentation format parser.
88+99+DNS resource records (RRs) can be expressed in text form using the
1010+presentation format. The format is most frequently used to define a zone in
1111+master files, more commonly known as zone files, and is best considered a
1212+tabular serialization format with provisions for convenient editing.
1313+1414+The format is originally defined in [RFC1035 section 5][rfc1035-section-5] and
1515+[RFC1034 section 3.6.1][rfc1034-section-3-6-1], but as the DNS is
1616+intentionally extensible, the format has been extended over time too.
1717+1818+This project provides a lightning fast presentation format deserializer (and
1919+serializer eventually) for other projects to leverage. Learn more about
2020+simdzone by reading the [documentation](https://simdzone.docs.nlnetlabs.nl/).
2121+2222+## Research paper
2323+2424+* Jeroen Koekkoek and Daniel Lemire, [Parsing Millions of DNS Records per Second](https://arxiv.org/abs/2411.12035), Software: Practice and Experience (to appear)
2525+2626+2727+2828+2929+## Motivation
3030+Zone files can become quite large (.com ~24G, .se ~1.3G) and the parser in
3131+NSD left something to be desired. simdjson demonstrates that applying SIMD
3232+instructions for parsing structured text can significantly boost performance.
3333+simdzone, whose name is a play on [simdjson][simdjson], aims to achieve a
3434+similar performance boost for parsing zone data.
3535+3636+> Currently SSE4.2 and AVX2 are supported, a fallback is used otherwise.
3737+3838+> simdzone copies some code from the [simdjson][simdjson] project, with
3939+> permission to use and distribute it under the terms of
4040+> [The 3-Clause BSD License][bsd-3-clause].
4141+4242+[rfc1035-section-5]: https://datatracker.ietf.org/doc/html/rfc1035#section-5
4343+[rfc1034-section-3-6-1]: https://datatracker.ietf.org/doc/html/rfc1034#section-3.6.1
4444+[nsd]: https://nlnetlabs.nl/projects/nsd/about/
4545+[simdjson]: https://github.com/simdjson/simdjson
4646+[bsd-3-clause]: https://opensource.org/license/bsd-3-clause/
4747+4848+## Results
4949+Running `zone-bench` on my system (Intel Core i7-1065G7) against an older
5050+`.com` zone file of 12482791271 bytes under Linux (Fedora 39).
5151+5252+clang version 17.0.6, release mode:
5353+```
5454+$ time ./zone-bench parse ../../zones/com.zone
5555+Selected target haswell
5656+Parsed 341535548 records
5757+5858+real 0m13.533s
5959+user 0m12.355s
6060+sys 0m1.160s
6161+```
6262+6363+There are bound to be bugs and quite possibly smarter ways of implementing
6464+some operations, but the results are promising.
6565+6666+## Compiling
6767+Make sure the following tools are installed:
6868+ * C toolchain (the set of tools to compile C code)
6969+ * [cmocka](https://cmocka.org/) (if configured with `-DBUILD_TESTING=on`)
7070+ * [Doxygen](https://www.doxygen.nl/) (if configured with `-DBUILD_DOCUMENTATION=on`)
7171+ * [Sphinx](https://www.sphinx-doc.org/en/master/) (if configured with `-DBUILD_DOCUMENTATION=on`)
7272+7373+To compile in release mode:
7474+```
7575+$ cd zone-parser
7676+$ mkdir build
7777+$ cd build
7878+$ cmake -DCMAKE_BUILD_TYPE=Release ..
7979+$ cmake --build .
8080+```
8181+8282+To compile in debug mode with testing:
8383+```
8484+$ cd zone-parser
8585+$ mkdir build
8686+$ cd build
8787+$ cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=on ..
8888+$ cmake --build .
8989+```
9090+9191+## Contributing
9292+Contributions in any way, shape or form are very welcome! Please see
9393+[CONTRIBUTING.md](CONTRIBUTING.md) to find out how you can help.
9494+9595+Design decisions and notes on the [FORMAT](FORMAT.md).
+78
usr.sbin/nsd/simdzone/compat/getopt.c
···11+#include <stdio.h>
22+#include <string.h>
33+#include "getopt.h"
44+55+/*
66+ * Here's something you've all been waiting for: the AT&T public domain
77+ * source for getopt(3). It is the code which was given out at the 1985
88+ * UNIFORUM conference in Dallas. I obtained it by electronic mail
99+ * directly from AT&T. The people there assure me that it is indeed
1010+ * in the public domain.
1111+ *
1212+ * There is no manual page. That is because the one they gave out at
1313+ * UNIFORUM was slightly different from the current System V Release 2
1414+ * manual page. The difference apparently involved a note about the
1515+ * famous rules 5 and 6, recommending using white space between an option
1616+ * and its first argument, and not grouping options that have arguments.
1717+ * Getopt itself is currently lenient about both of these things White
1818+ * space is allowed, but not mandatory, and the last option in a group can
1919+ * have an argument. That particular version of the man page evidently
2020+ * has no official existence, and my source at AT&T did not send a copy.
2121+ * The current SVR2 man page reflects the actual behavior of this getopt.
2222+ * However, I am not about to post a copy of anything licensed by AT&T.
2323+ */
2424+2525+#define ERR(szz,czz) if(opterr){fprintf(stderr,"%s%s%c\n",argv[0],szz,czz);}
2626+2727+int opterr = 1;
2828+int optind = 1;
2929+int optopt;
3030+char *optarg;
3131+3232+int
3333+getopt(
3434+ int argc,
3535+ char **argv,
3636+ const char *opts)
3737+{
3838+ static int sp = 1;
3939+ register int c;
4040+ register char *cp;
4141+4242+ if (sp == 1) {
4343+ if (optind >= argc ||
4444+ argv[optind][0] != '-' || argv[optind][1] == '\0')
4545+ return (EOF);
4646+ else if (strcmp(argv[optind], "--") == 0) {
4747+ optind++;
4848+ return (EOF);
4949+ }
5050+ }
5151+ optopt = c = argv[optind][sp];
5252+ if (c == ':' || (cp = strchr(opts, c)) == NULL) {
5353+ ERR(": illegal option -- ", c);
5454+ if (argv[optind][++sp] == '\0') {
5555+ optind++;
5656+ sp = 1;
5757+ }
5858+ return ('?');
5959+ }
6060+ if (*++cp == ':') {
6161+ if (argv[optind][sp + 1] != '\0')
6262+ optarg = &argv[optind++][sp + 1];
6363+ else if (++optind >= argc) {
6464+ ERR(": option requires an argument -- ", c);
6565+ sp = 1;
6666+ return ('?');
6767+ } else
6868+ optarg = argv[optind++];
6969+ sp = 1;
7070+ } else {
7171+ if (argv[optind][++sp] == '\0') {
7272+ sp = 1;
7373+ optind++;
7474+ }
7575+ optarg = NULL;
7676+ }
7777+ return (c);
7878+}
+19
usr.sbin/nsd/simdzone/compat/getopt.h
···11+/*
22+ * getopt.h -- getopt definitions for platform that are missing unistd.h
33+ *
44+ * Copyright (c) 2023, NLnet Labs. All rights reserved.
55+ *
66+ * SPDX-License-Identifier: BSD-3-Clause
77+ *
88+ */
99+#ifndef GETOPT_H
1010+#define GETOPT_H
1111+1212+extern int opterr;
1313+extern int optind;
1414+extern int optopt;
1515+extern char *optarg;
1616+1717+int getopt(int argc, char **argv, const char *opts);
1818+1919+#endif /* GETOPT_H */
+1754
usr.sbin/nsd/simdzone/config.guess
···11+#! /bin/sh
22+# Attempt to guess a canonical system name.
33+# Copyright 1992-2022 Free Software Foundation, Inc.
44+55+# shellcheck disable=SC2006,SC2268 # see below for rationale
66+77+timestamp='2022-01-09'
88+99+# This file is free software; you can redistribute it and/or modify it
1010+# under the terms of the GNU General Public License as published by
1111+# the Free Software Foundation, either version 3 of the License, or
1212+# (at your option) any later version.
1313+#
1414+# This program is distributed in the hope that it will be useful, but
1515+# WITHOUT ANY WARRANTY; without even the implied warranty of
1616+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1717+# General Public License for more details.
1818+#
1919+# You should have received a copy of the GNU General Public License
2020+# along with this program; if not, see <https://www.gnu.org/licenses/>.
2121+#
2222+# As a special exception to the GNU General Public License, if you
2323+# distribute this file as part of a program that contains a
2424+# configuration script generated by Autoconf, you may include it under
2525+# the same distribution terms that you use for the rest of that
2626+# program. This Exception is an additional permission under section 7
2727+# of the GNU General Public License, version 3 ("GPLv3").
2828+#
2929+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
3030+#
3131+# You can get the latest version of this script from:
3232+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
3333+#
3434+# Please send patches to <config-patches@gnu.org>.
3535+3636+3737+# The "shellcheck disable" line above the timestamp inhibits complaints
3838+# about features and limitations of the classic Bourne shell that were
3939+# superseded or lifted in POSIX. However, this script identifies a wide
4040+# variety of pre-POSIX systems that do not have POSIX shells at all, and
4141+# even some reasonably current systems (Solaris 10 as case-in-point) still
4242+# have a pre-POSIX /bin/sh.
4343+4444+4545+me=`echo "$0" | sed -e 's,.*/,,'`
4646+4747+usage="\
4848+Usage: $0 [OPTION]
4949+5050+Output the configuration name of the system \`$me' is run on.
5151+5252+Options:
5353+ -h, --help print this help, then exit
5454+ -t, --time-stamp print date of last modification, then exit
5555+ -v, --version print version number, then exit
5656+5757+Report bugs and patches to <config-patches@gnu.org>."
5858+5959+version="\
6060+GNU config.guess ($timestamp)
6161+6262+Originally written by Per Bothner.
6363+Copyright 1992-2022 Free Software Foundation, Inc.
6464+6565+This is free software; see the source for copying conditions. There is NO
6666+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
6767+6868+help="
6969+Try \`$me --help' for more information."
7070+7171+# Parse command line
7272+while test $# -gt 0 ; do
7373+ case $1 in
7474+ --time-stamp | --time* | -t )
7575+ echo "$timestamp" ; exit ;;
7676+ --version | -v )
7777+ echo "$version" ; exit ;;
7878+ --help | --h* | -h )
7979+ echo "$usage"; exit ;;
8080+ -- ) # Stop option processing
8181+ shift; break ;;
8282+ - ) # Use stdin as input.
8383+ break ;;
8484+ -* )
8585+ echo "$me: invalid option $1$help" >&2
8686+ exit 1 ;;
8787+ * )
8888+ break ;;
8989+ esac
9090+done
9191+9292+if test $# != 0; then
9393+ echo "$me: too many arguments$help" >&2
9494+ exit 1
9595+fi
9696+9797+# Just in case it came from the environment.
9898+GUESS=
9999+100100+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
101101+# compiler to aid in system detection is discouraged as it requires
102102+# temporary files to be created and, as you can see below, it is a
103103+# headache to deal with in a portable fashion.
104104+105105+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
106106+# use `HOST_CC' if defined, but it is deprecated.
107107+108108+# Portable tmp directory creation inspired by the Autoconf team.
109109+110110+tmp=
111111+# shellcheck disable=SC2172
112112+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
113113+114114+set_cc_for_build() {
115115+ # prevent multiple calls if $tmp is already set
116116+ test "$tmp" && return 0
117117+ : "${TMPDIR=/tmp}"
118118+ # shellcheck disable=SC2039,SC3028
119119+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
120120+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
121121+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
122122+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
123123+ dummy=$tmp/dummy
124124+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
125125+ ,,) echo "int x;" > "$dummy.c"
126126+ for driver in cc gcc c89 c99 ; do
127127+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
128128+ CC_FOR_BUILD=$driver
129129+ break
130130+ fi
131131+ done
132132+ if test x"$CC_FOR_BUILD" = x ; then
133133+ CC_FOR_BUILD=no_compiler_found
134134+ fi
135135+ ;;
136136+ ,,*) CC_FOR_BUILD=$CC ;;
137137+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
138138+ esac
139139+}
140140+141141+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
142142+# (ghazi@noc.rutgers.edu 1994-08-24)
143143+if test -f /.attbin/uname ; then
144144+ PATH=$PATH:/.attbin ; export PATH
145145+fi
146146+147147+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
148148+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
149149+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
150150+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
151151+152152+case $UNAME_SYSTEM in
153153+Linux|GNU|GNU/*)
154154+ LIBC=unknown
155155+156156+ set_cc_for_build
157157+ cat <<-EOF > "$dummy.c"
158158+ #include <features.h>
159159+ #if defined(__UCLIBC__)
160160+ LIBC=uclibc
161161+ #elif defined(__dietlibc__)
162162+ LIBC=dietlibc
163163+ #elif defined(__GLIBC__)
164164+ LIBC=gnu
165165+ #else
166166+ #include <stdarg.h>
167167+ /* First heuristic to detect musl libc. */
168168+ #ifdef __DEFINED_va_list
169169+ LIBC=musl
170170+ #endif
171171+ #endif
172172+ EOF
173173+ cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
174174+ eval "$cc_set_libc"
175175+176176+ # Second heuristic to detect musl libc.
177177+ if [ "$LIBC" = unknown ] &&
178178+ command -v ldd >/dev/null &&
179179+ ldd --version 2>&1 | grep -q ^musl; then
180180+ LIBC=musl
181181+ fi
182182+183183+ # If the system lacks a compiler, then just pick glibc.
184184+ # We could probably try harder.
185185+ if [ "$LIBC" = unknown ]; then
186186+ LIBC=gnu
187187+ fi
188188+ ;;
189189+esac
190190+191191+# Note: order is significant - the case branches are not exclusive.
192192+193193+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
194194+ *:NetBSD:*:*)
195195+ # NetBSD (nbsd) targets should (where applicable) match one or
196196+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
197197+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
198198+ # switched to ELF, *-*-netbsd* would select the old
199199+ # object file format. This provides both forward
200200+ # compatibility and a consistent mechanism for selecting the
201201+ # object file format.
202202+ #
203203+ # Note: NetBSD doesn't particularly care about the vendor
204204+ # portion of the name. We always set it to "unknown".
205205+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
206206+ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
207207+ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
208208+ echo unknown)`
209209+ case $UNAME_MACHINE_ARCH in
210210+ aarch64eb) machine=aarch64_be-unknown ;;
211211+ armeb) machine=armeb-unknown ;;
212212+ arm*) machine=arm-unknown ;;
213213+ sh3el) machine=shl-unknown ;;
214214+ sh3eb) machine=sh-unknown ;;
215215+ sh5el) machine=sh5le-unknown ;;
216216+ earmv*)
217217+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
218218+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
219219+ machine=${arch}${endian}-unknown
220220+ ;;
221221+ *) machine=$UNAME_MACHINE_ARCH-unknown ;;
222222+ esac
223223+ # The Operating System including object format, if it has switched
224224+ # to ELF recently (or will in the future) and ABI.
225225+ case $UNAME_MACHINE_ARCH in
226226+ earm*)
227227+ os=netbsdelf
228228+ ;;
229229+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
230230+ set_cc_for_build
231231+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
232232+ | grep -q __ELF__
233233+ then
234234+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
235235+ # Return netbsd for either. FIX?
236236+ os=netbsd
237237+ else
238238+ os=netbsdelf
239239+ fi
240240+ ;;
241241+ *)
242242+ os=netbsd
243243+ ;;
244244+ esac
245245+ # Determine ABI tags.
246246+ case $UNAME_MACHINE_ARCH in
247247+ earm*)
248248+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
249249+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
250250+ ;;
251251+ esac
252252+ # The OS release
253253+ # Debian GNU/NetBSD machines have a different userland, and
254254+ # thus, need a distinct triplet. However, they do not need
255255+ # kernel version information, so it can be replaced with a
256256+ # suitable tag, in the style of linux-gnu.
257257+ case $UNAME_VERSION in
258258+ Debian*)
259259+ release='-gnu'
260260+ ;;
261261+ *)
262262+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
263263+ ;;
264264+ esac
265265+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
266266+ # contains redundant information, the shorter form:
267267+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
268268+ GUESS=$machine-${os}${release}${abi-}
269269+ ;;
270270+ *:Bitrig:*:*)
271271+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
272272+ GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
273273+ ;;
274274+ *:OpenBSD:*:*)
275275+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
276276+ GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
277277+ ;;
278278+ *:SecBSD:*:*)
279279+ UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
280280+ GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
281281+ ;;
282282+ *:LibertyBSD:*:*)
283283+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
284284+ GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
285285+ ;;
286286+ *:MidnightBSD:*:*)
287287+ GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
288288+ ;;
289289+ *:ekkoBSD:*:*)
290290+ GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
291291+ ;;
292292+ *:SolidBSD:*:*)
293293+ GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
294294+ ;;
295295+ *:OS108:*:*)
296296+ GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
297297+ ;;
298298+ macppc:MirBSD:*:*)
299299+ GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
300300+ ;;
301301+ *:MirBSD:*:*)
302302+ GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
303303+ ;;
304304+ *:Sortix:*:*)
305305+ GUESS=$UNAME_MACHINE-unknown-sortix
306306+ ;;
307307+ *:Twizzler:*:*)
308308+ GUESS=$UNAME_MACHINE-unknown-twizzler
309309+ ;;
310310+ *:Redox:*:*)
311311+ GUESS=$UNAME_MACHINE-unknown-redox
312312+ ;;
313313+ mips:OSF1:*.*)
314314+ GUESS=mips-dec-osf1
315315+ ;;
316316+ alpha:OSF1:*:*)
317317+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
318318+ trap '' 0
319319+ case $UNAME_RELEASE in
320320+ *4.0)
321321+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
322322+ ;;
323323+ *5.*)
324324+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
325325+ ;;
326326+ esac
327327+ # According to Compaq, /usr/sbin/psrinfo has been available on
328328+ # OSF/1 and Tru64 systems produced since 1995. I hope that
329329+ # covers most systems running today. This code pipes the CPU
330330+ # types through head -n 1, so we only detect the type of CPU 0.
331331+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
332332+ case $ALPHA_CPU_TYPE in
333333+ "EV4 (21064)")
334334+ UNAME_MACHINE=alpha ;;
335335+ "EV4.5 (21064)")
336336+ UNAME_MACHINE=alpha ;;
337337+ "LCA4 (21066/21068)")
338338+ UNAME_MACHINE=alpha ;;
339339+ "EV5 (21164)")
340340+ UNAME_MACHINE=alphaev5 ;;
341341+ "EV5.6 (21164A)")
342342+ UNAME_MACHINE=alphaev56 ;;
343343+ "EV5.6 (21164PC)")
344344+ UNAME_MACHINE=alphapca56 ;;
345345+ "EV5.7 (21164PC)")
346346+ UNAME_MACHINE=alphapca57 ;;
347347+ "EV6 (21264)")
348348+ UNAME_MACHINE=alphaev6 ;;
349349+ "EV6.7 (21264A)")
350350+ UNAME_MACHINE=alphaev67 ;;
351351+ "EV6.8CB (21264C)")
352352+ UNAME_MACHINE=alphaev68 ;;
353353+ "EV6.8AL (21264B)")
354354+ UNAME_MACHINE=alphaev68 ;;
355355+ "EV6.8CX (21264D)")
356356+ UNAME_MACHINE=alphaev68 ;;
357357+ "EV6.9A (21264/EV69A)")
358358+ UNAME_MACHINE=alphaev69 ;;
359359+ "EV7 (21364)")
360360+ UNAME_MACHINE=alphaev7 ;;
361361+ "EV7.9 (21364A)")
362362+ UNAME_MACHINE=alphaev79 ;;
363363+ esac
364364+ # A Pn.n version is a patched version.
365365+ # A Vn.n version is a released version.
366366+ # A Tn.n version is a released field test version.
367367+ # A Xn.n version is an unreleased experimental baselevel.
368368+ # 1.2 uses "1.2" for uname -r.
369369+ OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
370370+ GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
371371+ ;;
372372+ Amiga*:UNIX_System_V:4.0:*)
373373+ GUESS=m68k-unknown-sysv4
374374+ ;;
375375+ *:[Aa]miga[Oo][Ss]:*:*)
376376+ GUESS=$UNAME_MACHINE-unknown-amigaos
377377+ ;;
378378+ *:[Mm]orph[Oo][Ss]:*:*)
379379+ GUESS=$UNAME_MACHINE-unknown-morphos
380380+ ;;
381381+ *:OS/390:*:*)
382382+ GUESS=i370-ibm-openedition
383383+ ;;
384384+ *:z/VM:*:*)
385385+ GUESS=s390-ibm-zvmoe
386386+ ;;
387387+ *:OS400:*:*)
388388+ GUESS=powerpc-ibm-os400
389389+ ;;
390390+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
391391+ GUESS=arm-acorn-riscix$UNAME_RELEASE
392392+ ;;
393393+ arm*:riscos:*:*|arm*:RISCOS:*:*)
394394+ GUESS=arm-unknown-riscos
395395+ ;;
396396+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
397397+ GUESS=hppa1.1-hitachi-hiuxmpp
398398+ ;;
399399+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
400400+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
401401+ case `(/bin/universe) 2>/dev/null` in
402402+ att) GUESS=pyramid-pyramid-sysv3 ;;
403403+ *) GUESS=pyramid-pyramid-bsd ;;
404404+ esac
405405+ ;;
406406+ NILE*:*:*:dcosx)
407407+ GUESS=pyramid-pyramid-svr4
408408+ ;;
409409+ DRS?6000:unix:4.0:6*)
410410+ GUESS=sparc-icl-nx6
411411+ ;;
412412+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
413413+ case `/usr/bin/uname -p` in
414414+ sparc) GUESS=sparc-icl-nx7 ;;
415415+ esac
416416+ ;;
417417+ s390x:SunOS:*:*)
418418+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
419419+ GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
420420+ ;;
421421+ sun4H:SunOS:5.*:*)
422422+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
423423+ GUESS=sparc-hal-solaris2$SUN_REL
424424+ ;;
425425+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
426426+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
427427+ GUESS=sparc-sun-solaris2$SUN_REL
428428+ ;;
429429+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
430430+ GUESS=i386-pc-auroraux$UNAME_RELEASE
431431+ ;;
432432+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
433433+ set_cc_for_build
434434+ SUN_ARCH=i386
435435+ # If there is a compiler, see if it is configured for 64-bit objects.
436436+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
437437+ # This test works for both compilers.
438438+ if test "$CC_FOR_BUILD" != no_compiler_found; then
439439+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
440440+ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
441441+ grep IS_64BIT_ARCH >/dev/null
442442+ then
443443+ SUN_ARCH=x86_64
444444+ fi
445445+ fi
446446+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
447447+ GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
448448+ ;;
449449+ sun4*:SunOS:6*:*)
450450+ # According to config.sub, this is the proper way to canonicalize
451451+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
452452+ # it's likely to be more like Solaris than SunOS4.
453453+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
454454+ GUESS=sparc-sun-solaris3$SUN_REL
455455+ ;;
456456+ sun4*:SunOS:*:*)
457457+ case `/usr/bin/arch -k` in
458458+ Series*|S4*)
459459+ UNAME_RELEASE=`uname -v`
460460+ ;;
461461+ esac
462462+ # Japanese Language versions have a version number like `4.1.3-JL'.
463463+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
464464+ GUESS=sparc-sun-sunos$SUN_REL
465465+ ;;
466466+ sun3*:SunOS:*:*)
467467+ GUESS=m68k-sun-sunos$UNAME_RELEASE
468468+ ;;
469469+ sun*:*:4.2BSD:*)
470470+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
471471+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
472472+ case `/bin/arch` in
473473+ sun3)
474474+ GUESS=m68k-sun-sunos$UNAME_RELEASE
475475+ ;;
476476+ sun4)
477477+ GUESS=sparc-sun-sunos$UNAME_RELEASE
478478+ ;;
479479+ esac
480480+ ;;
481481+ aushp:SunOS:*:*)
482482+ GUESS=sparc-auspex-sunos$UNAME_RELEASE
483483+ ;;
484484+ # The situation for MiNT is a little confusing. The machine name
485485+ # can be virtually everything (everything which is not
486486+ # "atarist" or "atariste" at least should have a processor
487487+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
488488+ # to the lowercase version "mint" (or "freemint"). Finally
489489+ # the system name "TOS" denotes a system which is actually not
490490+ # MiNT. But MiNT is downward compatible to TOS, so this should
491491+ # be no problem.
492492+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
493493+ GUESS=m68k-atari-mint$UNAME_RELEASE
494494+ ;;
495495+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
496496+ GUESS=m68k-atari-mint$UNAME_RELEASE
497497+ ;;
498498+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
499499+ GUESS=m68k-atari-mint$UNAME_RELEASE
500500+ ;;
501501+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
502502+ GUESS=m68k-milan-mint$UNAME_RELEASE
503503+ ;;
504504+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
505505+ GUESS=m68k-hades-mint$UNAME_RELEASE
506506+ ;;
507507+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
508508+ GUESS=m68k-unknown-mint$UNAME_RELEASE
509509+ ;;
510510+ m68k:machten:*:*)
511511+ GUESS=m68k-apple-machten$UNAME_RELEASE
512512+ ;;
513513+ powerpc:machten:*:*)
514514+ GUESS=powerpc-apple-machten$UNAME_RELEASE
515515+ ;;
516516+ RISC*:Mach:*:*)
517517+ GUESS=mips-dec-mach_bsd4.3
518518+ ;;
519519+ RISC*:ULTRIX:*:*)
520520+ GUESS=mips-dec-ultrix$UNAME_RELEASE
521521+ ;;
522522+ VAX*:ULTRIX*:*:*)
523523+ GUESS=vax-dec-ultrix$UNAME_RELEASE
524524+ ;;
525525+ 2020:CLIX:*:* | 2430:CLIX:*:*)
526526+ GUESS=clipper-intergraph-clix$UNAME_RELEASE
527527+ ;;
528528+ mips:*:*:UMIPS | mips:*:*:RISCos)
529529+ set_cc_for_build
530530+ sed 's/^ //' << EOF > "$dummy.c"
531531+#ifdef __cplusplus
532532+#include <stdio.h> /* for printf() prototype */
533533+ int main (int argc, char *argv[]) {
534534+#else
535535+ int main (argc, argv) int argc; char *argv[]; {
536536+#endif
537537+ #if defined (host_mips) && defined (MIPSEB)
538538+ #if defined (SYSTYPE_SYSV)
539539+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
540540+ #endif
541541+ #if defined (SYSTYPE_SVR4)
542542+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
543543+ #endif
544544+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
545545+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
546546+ #endif
547547+ #endif
548548+ exit (-1);
549549+ }
550550+EOF
551551+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
552552+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
553553+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
554554+ { echo "$SYSTEM_NAME"; exit; }
555555+ GUESS=mips-mips-riscos$UNAME_RELEASE
556556+ ;;
557557+ Motorola:PowerMAX_OS:*:*)
558558+ GUESS=powerpc-motorola-powermax
559559+ ;;
560560+ Motorola:*:4.3:PL8-*)
561561+ GUESS=powerpc-harris-powermax
562562+ ;;
563563+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
564564+ GUESS=powerpc-harris-powermax
565565+ ;;
566566+ Night_Hawk:Power_UNIX:*:*)
567567+ GUESS=powerpc-harris-powerunix
568568+ ;;
569569+ m88k:CX/UX:7*:*)
570570+ GUESS=m88k-harris-cxux7
571571+ ;;
572572+ m88k:*:4*:R4*)
573573+ GUESS=m88k-motorola-sysv4
574574+ ;;
575575+ m88k:*:3*:R3*)
576576+ GUESS=m88k-motorola-sysv3
577577+ ;;
578578+ AViiON:dgux:*:*)
579579+ # DG/UX returns AViiON for all architectures
580580+ UNAME_PROCESSOR=`/usr/bin/uname -p`
581581+ if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
582582+ then
583583+ if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
584584+ test "$TARGET_BINARY_INTERFACE"x = x
585585+ then
586586+ GUESS=m88k-dg-dgux$UNAME_RELEASE
587587+ else
588588+ GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
589589+ fi
590590+ else
591591+ GUESS=i586-dg-dgux$UNAME_RELEASE
592592+ fi
593593+ ;;
594594+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
595595+ GUESS=m88k-dolphin-sysv3
596596+ ;;
597597+ M88*:*:R3*:*)
598598+ # Delta 88k system running SVR3
599599+ GUESS=m88k-motorola-sysv3
600600+ ;;
601601+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
602602+ GUESS=m88k-tektronix-sysv3
603603+ ;;
604604+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
605605+ GUESS=m68k-tektronix-bsd
606606+ ;;
607607+ *:IRIX*:*:*)
608608+ IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
609609+ GUESS=mips-sgi-irix$IRIX_REL
610610+ ;;
611611+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
612612+ GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
613613+ ;; # Note that: echo "'`uname -s`'" gives 'AIX '
614614+ i*86:AIX:*:*)
615615+ GUESS=i386-ibm-aix
616616+ ;;
617617+ ia64:AIX:*:*)
618618+ if test -x /usr/bin/oslevel ; then
619619+ IBM_REV=`/usr/bin/oslevel`
620620+ else
621621+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
622622+ fi
623623+ GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
624624+ ;;
625625+ *:AIX:2:3)
626626+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
627627+ set_cc_for_build
628628+ sed 's/^ //' << EOF > "$dummy.c"
629629+ #include <sys/systemcfg.h>
630630+631631+ main()
632632+ {
633633+ if (!__power_pc())
634634+ exit(1);
635635+ puts("powerpc-ibm-aix3.2.5");
636636+ exit(0);
637637+ }
638638+EOF
639639+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
640640+ then
641641+ GUESS=$SYSTEM_NAME
642642+ else
643643+ GUESS=rs6000-ibm-aix3.2.5
644644+ fi
645645+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
646646+ GUESS=rs6000-ibm-aix3.2.4
647647+ else
648648+ GUESS=rs6000-ibm-aix3.2
649649+ fi
650650+ ;;
651651+ *:AIX:*:[4567])
652652+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
653653+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
654654+ IBM_ARCH=rs6000
655655+ else
656656+ IBM_ARCH=powerpc
657657+ fi
658658+ if test -x /usr/bin/lslpp ; then
659659+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
660660+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
661661+ else
662662+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
663663+ fi
664664+ GUESS=$IBM_ARCH-ibm-aix$IBM_REV
665665+ ;;
666666+ *:AIX:*:*)
667667+ GUESS=rs6000-ibm-aix
668668+ ;;
669669+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
670670+ GUESS=romp-ibm-bsd4.4
671671+ ;;
672672+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
673673+ GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
674674+ ;; # report: romp-ibm BSD 4.3
675675+ *:BOSX:*:*)
676676+ GUESS=rs6000-bull-bosx
677677+ ;;
678678+ DPX/2?00:B.O.S.:*:*)
679679+ GUESS=m68k-bull-sysv3
680680+ ;;
681681+ 9000/[34]??:4.3bsd:1.*:*)
682682+ GUESS=m68k-hp-bsd
683683+ ;;
684684+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
685685+ GUESS=m68k-hp-bsd4.4
686686+ ;;
687687+ 9000/[34678]??:HP-UX:*:*)
688688+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
689689+ case $UNAME_MACHINE in
690690+ 9000/31?) HP_ARCH=m68000 ;;
691691+ 9000/[34]??) HP_ARCH=m68k ;;
692692+ 9000/[678][0-9][0-9])
693693+ if test -x /usr/bin/getconf; then
694694+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
695695+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
696696+ case $sc_cpu_version in
697697+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
698698+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
699699+ 532) # CPU_PA_RISC2_0
700700+ case $sc_kernel_bits in
701701+ 32) HP_ARCH=hppa2.0n ;;
702702+ 64) HP_ARCH=hppa2.0w ;;
703703+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
704704+ esac ;;
705705+ esac
706706+ fi
707707+ if test "$HP_ARCH" = ""; then
708708+ set_cc_for_build
709709+ sed 's/^ //' << EOF > "$dummy.c"
710710+711711+ #define _HPUX_SOURCE
712712+ #include <stdlib.h>
713713+ #include <unistd.h>
714714+715715+ int main ()
716716+ {
717717+ #if defined(_SC_KERNEL_BITS)
718718+ long bits = sysconf(_SC_KERNEL_BITS);
719719+ #endif
720720+ long cpu = sysconf (_SC_CPU_VERSION);
721721+722722+ switch (cpu)
723723+ {
724724+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
725725+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
726726+ case CPU_PA_RISC2_0:
727727+ #if defined(_SC_KERNEL_BITS)
728728+ switch (bits)
729729+ {
730730+ case 64: puts ("hppa2.0w"); break;
731731+ case 32: puts ("hppa2.0n"); break;
732732+ default: puts ("hppa2.0"); break;
733733+ } break;
734734+ #else /* !defined(_SC_KERNEL_BITS) */
735735+ puts ("hppa2.0"); break;
736736+ #endif
737737+ default: puts ("hppa1.0"); break;
738738+ }
739739+ exit (0);
740740+ }
741741+EOF
742742+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
743743+ test -z "$HP_ARCH" && HP_ARCH=hppa
744744+ fi ;;
745745+ esac
746746+ if test "$HP_ARCH" = hppa2.0w
747747+ then
748748+ set_cc_for_build
749749+750750+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
751751+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
752752+ # generating 64-bit code. GNU and HP use different nomenclature:
753753+ #
754754+ # $ CC_FOR_BUILD=cc ./config.guess
755755+ # => hppa2.0w-hp-hpux11.23
756756+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
757757+ # => hppa64-hp-hpux11.23
758758+759759+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
760760+ grep -q __LP64__
761761+ then
762762+ HP_ARCH=hppa2.0w
763763+ else
764764+ HP_ARCH=hppa64
765765+ fi
766766+ fi
767767+ GUESS=$HP_ARCH-hp-hpux$HPUX_REV
768768+ ;;
769769+ ia64:HP-UX:*:*)
770770+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
771771+ GUESS=ia64-hp-hpux$HPUX_REV
772772+ ;;
773773+ 3050*:HI-UX:*:*)
774774+ set_cc_for_build
775775+ sed 's/^ //' << EOF > "$dummy.c"
776776+ #include <unistd.h>
777777+ int
778778+ main ()
779779+ {
780780+ long cpu = sysconf (_SC_CPU_VERSION);
781781+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
782782+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
783783+ results, however. */
784784+ if (CPU_IS_PA_RISC (cpu))
785785+ {
786786+ switch (cpu)
787787+ {
788788+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
789789+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
790790+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
791791+ default: puts ("hppa-hitachi-hiuxwe2"); break;
792792+ }
793793+ }
794794+ else if (CPU_IS_HP_MC68K (cpu))
795795+ puts ("m68k-hitachi-hiuxwe2");
796796+ else puts ("unknown-hitachi-hiuxwe2");
797797+ exit (0);
798798+ }
799799+EOF
800800+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
801801+ { echo "$SYSTEM_NAME"; exit; }
802802+ GUESS=unknown-hitachi-hiuxwe2
803803+ ;;
804804+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
805805+ GUESS=hppa1.1-hp-bsd
806806+ ;;
807807+ 9000/8??:4.3bsd:*:*)
808808+ GUESS=hppa1.0-hp-bsd
809809+ ;;
810810+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
811811+ GUESS=hppa1.0-hp-mpeix
812812+ ;;
813813+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
814814+ GUESS=hppa1.1-hp-osf
815815+ ;;
816816+ hp8??:OSF1:*:*)
817817+ GUESS=hppa1.0-hp-osf
818818+ ;;
819819+ i*86:OSF1:*:*)
820820+ if test -x /usr/sbin/sysversion ; then
821821+ GUESS=$UNAME_MACHINE-unknown-osf1mk
822822+ else
823823+ GUESS=$UNAME_MACHINE-unknown-osf1
824824+ fi
825825+ ;;
826826+ parisc*:Lites*:*:*)
827827+ GUESS=hppa1.1-hp-lites
828828+ ;;
829829+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
830830+ GUESS=c1-convex-bsd
831831+ ;;
832832+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
833833+ if getsysinfo -f scalar_acc
834834+ then echo c32-convex-bsd
835835+ else echo c2-convex-bsd
836836+ fi
837837+ exit ;;
838838+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
839839+ GUESS=c34-convex-bsd
840840+ ;;
841841+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
842842+ GUESS=c38-convex-bsd
843843+ ;;
844844+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
845845+ GUESS=c4-convex-bsd
846846+ ;;
847847+ CRAY*Y-MP:*:*:*)
848848+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
849849+ GUESS=ymp-cray-unicos$CRAY_REL
850850+ ;;
851851+ CRAY*[A-Z]90:*:*:*)
852852+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
853853+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
854854+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
855855+ -e 's/\.[^.]*$/.X/'
856856+ exit ;;
857857+ CRAY*TS:*:*:*)
858858+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
859859+ GUESS=t90-cray-unicos$CRAY_REL
860860+ ;;
861861+ CRAY*T3E:*:*:*)
862862+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
863863+ GUESS=alphaev5-cray-unicosmk$CRAY_REL
864864+ ;;
865865+ CRAY*SV1:*:*:*)
866866+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
867867+ GUESS=sv1-cray-unicos$CRAY_REL
868868+ ;;
869869+ *:UNICOS/mp:*:*)
870870+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
871871+ GUESS=craynv-cray-unicosmp$CRAY_REL
872872+ ;;
873873+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
874874+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
875875+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
876876+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
877877+ GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
878878+ ;;
879879+ 5000:UNIX_System_V:4.*:*)
880880+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
881881+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
882882+ GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
883883+ ;;
884884+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
885885+ GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
886886+ ;;
887887+ sparc*:BSD/OS:*:*)
888888+ GUESS=sparc-unknown-bsdi$UNAME_RELEASE
889889+ ;;
890890+ *:BSD/OS:*:*)
891891+ GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
892892+ ;;
893893+ arm:FreeBSD:*:*)
894894+ UNAME_PROCESSOR=`uname -p`
895895+ set_cc_for_build
896896+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
897897+ | grep -q __ARM_PCS_VFP
898898+ then
899899+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
900900+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
901901+ else
902902+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
903903+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
904904+ fi
905905+ ;;
906906+ *:FreeBSD:*:*)
907907+ UNAME_PROCESSOR=`/usr/bin/uname -p`
908908+ case $UNAME_PROCESSOR in
909909+ amd64)
910910+ UNAME_PROCESSOR=x86_64 ;;
911911+ i386)
912912+ UNAME_PROCESSOR=i586 ;;
913913+ esac
914914+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
915915+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
916916+ ;;
917917+ i*:CYGWIN*:*)
918918+ GUESS=$UNAME_MACHINE-pc-cygwin
919919+ ;;
920920+ *:MINGW64*:*)
921921+ GUESS=$UNAME_MACHINE-pc-mingw64
922922+ ;;
923923+ *:MINGW*:*)
924924+ GUESS=$UNAME_MACHINE-pc-mingw32
925925+ ;;
926926+ *:MSYS*:*)
927927+ GUESS=$UNAME_MACHINE-pc-msys
928928+ ;;
929929+ i*:PW*:*)
930930+ GUESS=$UNAME_MACHINE-pc-pw32
931931+ ;;
932932+ *:SerenityOS:*:*)
933933+ GUESS=$UNAME_MACHINE-pc-serenity
934934+ ;;
935935+ *:Interix*:*)
936936+ case $UNAME_MACHINE in
937937+ x86)
938938+ GUESS=i586-pc-interix$UNAME_RELEASE
939939+ ;;
940940+ authenticamd | genuineintel | EM64T)
941941+ GUESS=x86_64-unknown-interix$UNAME_RELEASE
942942+ ;;
943943+ IA64)
944944+ GUESS=ia64-unknown-interix$UNAME_RELEASE
945945+ ;;
946946+ esac ;;
947947+ i*:UWIN*:*)
948948+ GUESS=$UNAME_MACHINE-pc-uwin
949949+ ;;
950950+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
951951+ GUESS=x86_64-pc-cygwin
952952+ ;;
953953+ prep*:SunOS:5.*:*)
954954+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
955955+ GUESS=powerpcle-unknown-solaris2$SUN_REL
956956+ ;;
957957+ *:GNU:*:*)
958958+ # the GNU system
959959+ GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
960960+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
961961+ GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
962962+ ;;
963963+ *:GNU/*:*:*)
964964+ # other systems with GNU libc and userland
965965+ GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
966966+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
967967+ GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
968968+ ;;
969969+ *:Minix:*:*)
970970+ GUESS=$UNAME_MACHINE-unknown-minix
971971+ ;;
972972+ aarch64:Linux:*:*)
973973+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
974974+ ;;
975975+ aarch64_be:Linux:*:*)
976976+ UNAME_MACHINE=aarch64_be
977977+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
978978+ ;;
979979+ alpha:Linux:*:*)
980980+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
981981+ EV5) UNAME_MACHINE=alphaev5 ;;
982982+ EV56) UNAME_MACHINE=alphaev56 ;;
983983+ PCA56) UNAME_MACHINE=alphapca56 ;;
984984+ PCA57) UNAME_MACHINE=alphapca56 ;;
985985+ EV6) UNAME_MACHINE=alphaev6 ;;
986986+ EV67) UNAME_MACHINE=alphaev67 ;;
987987+ EV68*) UNAME_MACHINE=alphaev68 ;;
988988+ esac
989989+ objdump --private-headers /bin/sh | grep -q ld.so.1
990990+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
991991+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
992992+ ;;
993993+ arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
994994+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
995995+ ;;
996996+ arm*:Linux:*:*)
997997+ set_cc_for_build
998998+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
999999+ | grep -q __ARM_EABI__
10001000+ then
10011001+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10021002+ else
10031003+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
10041004+ | grep -q __ARM_PCS_VFP
10051005+ then
10061006+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
10071007+ else
10081008+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
10091009+ fi
10101010+ fi
10111011+ ;;
10121012+ avr32*:Linux:*:*)
10131013+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10141014+ ;;
10151015+ cris:Linux:*:*)
10161016+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
10171017+ ;;
10181018+ crisv32:Linux:*:*)
10191019+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
10201020+ ;;
10211021+ e2k:Linux:*:*)
10221022+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10231023+ ;;
10241024+ frv:Linux:*:*)
10251025+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10261026+ ;;
10271027+ hexagon:Linux:*:*)
10281028+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10291029+ ;;
10301030+ i*86:Linux:*:*)
10311031+ GUESS=$UNAME_MACHINE-pc-linux-$LIBC
10321032+ ;;
10331033+ ia64:Linux:*:*)
10341034+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10351035+ ;;
10361036+ k1om:Linux:*:*)
10371037+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10381038+ ;;
10391039+ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
10401040+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10411041+ ;;
10421042+ m32r*:Linux:*:*)
10431043+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10441044+ ;;
10451045+ m68*:Linux:*:*)
10461046+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10471047+ ;;
10481048+ mips:Linux:*:* | mips64:Linux:*:*)
10491049+ set_cc_for_build
10501050+ IS_GLIBC=0
10511051+ test x"${LIBC}" = xgnu && IS_GLIBC=1
10521052+ sed 's/^ //' << EOF > "$dummy.c"
10531053+ #undef CPU
10541054+ #undef mips
10551055+ #undef mipsel
10561056+ #undef mips64
10571057+ #undef mips64el
10581058+ #if ${IS_GLIBC} && defined(_ABI64)
10591059+ LIBCABI=gnuabi64
10601060+ #else
10611061+ #if ${IS_GLIBC} && defined(_ABIN32)
10621062+ LIBCABI=gnuabin32
10631063+ #else
10641064+ LIBCABI=${LIBC}
10651065+ #endif
10661066+ #endif
10671067+10681068+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
10691069+ CPU=mipsisa64r6
10701070+ #else
10711071+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
10721072+ CPU=mipsisa32r6
10731073+ #else
10741074+ #if defined(__mips64)
10751075+ CPU=mips64
10761076+ #else
10771077+ CPU=mips
10781078+ #endif
10791079+ #endif
10801080+ #endif
10811081+10821082+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
10831083+ MIPS_ENDIAN=el
10841084+ #else
10851085+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
10861086+ MIPS_ENDIAN=
10871087+ #else
10881088+ MIPS_ENDIAN=
10891089+ #endif
10901090+ #endif
10911091+EOF
10921092+ cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
10931093+ eval "$cc_set_vars"
10941094+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
10951095+ ;;
10961096+ mips64el:Linux:*:*)
10971097+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10981098+ ;;
10991099+ openrisc*:Linux:*:*)
11001100+ GUESS=or1k-unknown-linux-$LIBC
11011101+ ;;
11021102+ or32:Linux:*:* | or1k*:Linux:*:*)
11031103+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11041104+ ;;
11051105+ padre:Linux:*:*)
11061106+ GUESS=sparc-unknown-linux-$LIBC
11071107+ ;;
11081108+ parisc64:Linux:*:* | hppa64:Linux:*:*)
11091109+ GUESS=hppa64-unknown-linux-$LIBC
11101110+ ;;
11111111+ parisc:Linux:*:* | hppa:Linux:*:*)
11121112+ # Look for CPU level
11131113+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
11141114+ PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
11151115+ PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
11161116+ *) GUESS=hppa-unknown-linux-$LIBC ;;
11171117+ esac
11181118+ ;;
11191119+ ppc64:Linux:*:*)
11201120+ GUESS=powerpc64-unknown-linux-$LIBC
11211121+ ;;
11221122+ ppc:Linux:*:*)
11231123+ GUESS=powerpc-unknown-linux-$LIBC
11241124+ ;;
11251125+ ppc64le:Linux:*:*)
11261126+ GUESS=powerpc64le-unknown-linux-$LIBC
11271127+ ;;
11281128+ ppcle:Linux:*:*)
11291129+ GUESS=powerpcle-unknown-linux-$LIBC
11301130+ ;;
11311131+ riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
11321132+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11331133+ ;;
11341134+ s390:Linux:*:* | s390x:Linux:*:*)
11351135+ GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
11361136+ ;;
11371137+ sh64*:Linux:*:*)
11381138+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11391139+ ;;
11401140+ sh*:Linux:*:*)
11411141+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11421142+ ;;
11431143+ sparc:Linux:*:* | sparc64:Linux:*:*)
11441144+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11451145+ ;;
11461146+ tile*:Linux:*:*)
11471147+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11481148+ ;;
11491149+ vax:Linux:*:*)
11501150+ GUESS=$UNAME_MACHINE-dec-linux-$LIBC
11511151+ ;;
11521152+ x86_64:Linux:*:*)
11531153+ set_cc_for_build
11541154+ LIBCABI=$LIBC
11551155+ if test "$CC_FOR_BUILD" != no_compiler_found; then
11561156+ if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
11571157+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
11581158+ grep IS_X32 >/dev/null
11591159+ then
11601160+ LIBCABI=${LIBC}x32
11611161+ fi
11621162+ fi
11631163+ GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
11641164+ ;;
11651165+ xtensa*:Linux:*:*)
11661166+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11671167+ ;;
11681168+ i*86:DYNIX/ptx:4*:*)
11691169+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
11701170+ # earlier versions are messed up and put the nodename in both
11711171+ # sysname and nodename.
11721172+ GUESS=i386-sequent-sysv4
11731173+ ;;
11741174+ i*86:UNIX_SV:4.2MP:2.*)
11751175+ # Unixware is an offshoot of SVR4, but it has its own version
11761176+ # number series starting with 2...
11771177+ # I am not positive that other SVR4 systems won't match this,
11781178+ # I just have to hope. -- rms.
11791179+ # Use sysv4.2uw... so that sysv4* matches it.
11801180+ GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
11811181+ ;;
11821182+ i*86:OS/2:*:*)
11831183+ # If we were able to find `uname', then EMX Unix compatibility
11841184+ # is probably installed.
11851185+ GUESS=$UNAME_MACHINE-pc-os2-emx
11861186+ ;;
11871187+ i*86:XTS-300:*:STOP)
11881188+ GUESS=$UNAME_MACHINE-unknown-stop
11891189+ ;;
11901190+ i*86:atheos:*:*)
11911191+ GUESS=$UNAME_MACHINE-unknown-atheos
11921192+ ;;
11931193+ i*86:syllable:*:*)
11941194+ GUESS=$UNAME_MACHINE-pc-syllable
11951195+ ;;
11961196+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
11971197+ GUESS=i386-unknown-lynxos$UNAME_RELEASE
11981198+ ;;
11991199+ i*86:*DOS:*:*)
12001200+ GUESS=$UNAME_MACHINE-pc-msdosdjgpp
12011201+ ;;
12021202+ i*86:*:4.*:*)
12031203+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
12041204+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
12051205+ GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
12061206+ else
12071207+ GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
12081208+ fi
12091209+ ;;
12101210+ i*86:*:5:[678]*)
12111211+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
12121212+ case `/bin/uname -X | grep "^Machine"` in
12131213+ *486*) UNAME_MACHINE=i486 ;;
12141214+ *Pentium) UNAME_MACHINE=i586 ;;
12151215+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
12161216+ esac
12171217+ GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
12181218+ ;;
12191219+ i*86:*:3.2:*)
12201220+ if test -f /usr/options/cb.name; then
12211221+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
12221222+ GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
12231223+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
12241224+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
12251225+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
12261226+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
12271227+ && UNAME_MACHINE=i586
12281228+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
12291229+ && UNAME_MACHINE=i686
12301230+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
12311231+ && UNAME_MACHINE=i686
12321232+ GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
12331233+ else
12341234+ GUESS=$UNAME_MACHINE-pc-sysv32
12351235+ fi
12361236+ ;;
12371237+ pc:*:*:*)
12381238+ # Left here for compatibility:
12391239+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
12401240+ # the processor, so we play safe by assuming i586.
12411241+ # Note: whatever this is, it MUST be the same as what config.sub
12421242+ # prints for the "djgpp" host, or else GDB configure will decide that
12431243+ # this is a cross-build.
12441244+ GUESS=i586-pc-msdosdjgpp
12451245+ ;;
12461246+ Intel:Mach:3*:*)
12471247+ GUESS=i386-pc-mach3
12481248+ ;;
12491249+ paragon:*:*:*)
12501250+ GUESS=i860-intel-osf1
12511251+ ;;
12521252+ i860:*:4.*:*) # i860-SVR4
12531253+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
12541254+ GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
12551255+ else # Add other i860-SVR4 vendors below as they are discovered.
12561256+ GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
12571257+ fi
12581258+ ;;
12591259+ mini*:CTIX:SYS*5:*)
12601260+ # "miniframe"
12611261+ GUESS=m68010-convergent-sysv
12621262+ ;;
12631263+ mc68k:UNIX:SYSTEM5:3.51m)
12641264+ GUESS=m68k-convergent-sysv
12651265+ ;;
12661266+ M680?0:D-NIX:5.3:*)
12671267+ GUESS=m68k-diab-dnix
12681268+ ;;
12691269+ M68*:*:R3V[5678]*:*)
12701270+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
12711271+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
12721272+ OS_REL=''
12731273+ test -r /etc/.relid \
12741274+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
12751275+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
12761276+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
12771277+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
12781278+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
12791279+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
12801280+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
12811281+ && { echo i486-ncr-sysv4; exit; } ;;
12821282+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
12831283+ OS_REL='.3'
12841284+ test -r /etc/.relid \
12851285+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
12861286+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
12871287+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
12881288+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
12891289+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
12901290+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
12911291+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
12921292+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
12931293+ GUESS=m68k-unknown-lynxos$UNAME_RELEASE
12941294+ ;;
12951295+ mc68030:UNIX_System_V:4.*:*)
12961296+ GUESS=m68k-atari-sysv4
12971297+ ;;
12981298+ TSUNAMI:LynxOS:2.*:*)
12991299+ GUESS=sparc-unknown-lynxos$UNAME_RELEASE
13001300+ ;;
13011301+ rs6000:LynxOS:2.*:*)
13021302+ GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
13031303+ ;;
13041304+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
13051305+ GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
13061306+ ;;
13071307+ SM[BE]S:UNIX_SV:*:*)
13081308+ GUESS=mips-dde-sysv$UNAME_RELEASE
13091309+ ;;
13101310+ RM*:ReliantUNIX-*:*:*)
13111311+ GUESS=mips-sni-sysv4
13121312+ ;;
13131313+ RM*:SINIX-*:*:*)
13141314+ GUESS=mips-sni-sysv4
13151315+ ;;
13161316+ *:SINIX-*:*:*)
13171317+ if uname -p 2>/dev/null >/dev/null ; then
13181318+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
13191319+ GUESS=$UNAME_MACHINE-sni-sysv4
13201320+ else
13211321+ GUESS=ns32k-sni-sysv
13221322+ fi
13231323+ ;;
13241324+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
13251325+ # says <Richard.M.Bartel@ccMail.Census.GOV>
13261326+ GUESS=i586-unisys-sysv4
13271327+ ;;
13281328+ *:UNIX_System_V:4*:FTX*)
13291329+ # From Gerald Hewes <hewes@openmarket.com>.
13301330+ # How about differentiating between stratus architectures? -djm
13311331+ GUESS=hppa1.1-stratus-sysv4
13321332+ ;;
13331333+ *:*:*:FTX*)
13341334+ # From seanf@swdc.stratus.com.
13351335+ GUESS=i860-stratus-sysv4
13361336+ ;;
13371337+ i*86:VOS:*:*)
13381338+ # From Paul.Green@stratus.com.
13391339+ GUESS=$UNAME_MACHINE-stratus-vos
13401340+ ;;
13411341+ *:VOS:*:*)
13421342+ # From Paul.Green@stratus.com.
13431343+ GUESS=hppa1.1-stratus-vos
13441344+ ;;
13451345+ mc68*:A/UX:*:*)
13461346+ GUESS=m68k-apple-aux$UNAME_RELEASE
13471347+ ;;
13481348+ news*:NEWS-OS:6*:*)
13491349+ GUESS=mips-sony-newsos6
13501350+ ;;
13511351+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
13521352+ if test -d /usr/nec; then
13531353+ GUESS=mips-nec-sysv$UNAME_RELEASE
13541354+ else
13551355+ GUESS=mips-unknown-sysv$UNAME_RELEASE
13561356+ fi
13571357+ ;;
13581358+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
13591359+ GUESS=powerpc-be-beos
13601360+ ;;
13611361+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
13621362+ GUESS=powerpc-apple-beos
13631363+ ;;
13641364+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
13651365+ GUESS=i586-pc-beos
13661366+ ;;
13671367+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
13681368+ GUESS=i586-pc-haiku
13691369+ ;;
13701370+ x86_64:Haiku:*:*)
13711371+ GUESS=x86_64-unknown-haiku
13721372+ ;;
13731373+ SX-4:SUPER-UX:*:*)
13741374+ GUESS=sx4-nec-superux$UNAME_RELEASE
13751375+ ;;
13761376+ SX-5:SUPER-UX:*:*)
13771377+ GUESS=sx5-nec-superux$UNAME_RELEASE
13781378+ ;;
13791379+ SX-6:SUPER-UX:*:*)
13801380+ GUESS=sx6-nec-superux$UNAME_RELEASE
13811381+ ;;
13821382+ SX-7:SUPER-UX:*:*)
13831383+ GUESS=sx7-nec-superux$UNAME_RELEASE
13841384+ ;;
13851385+ SX-8:SUPER-UX:*:*)
13861386+ GUESS=sx8-nec-superux$UNAME_RELEASE
13871387+ ;;
13881388+ SX-8R:SUPER-UX:*:*)
13891389+ GUESS=sx8r-nec-superux$UNAME_RELEASE
13901390+ ;;
13911391+ SX-ACE:SUPER-UX:*:*)
13921392+ GUESS=sxace-nec-superux$UNAME_RELEASE
13931393+ ;;
13941394+ Power*:Rhapsody:*:*)
13951395+ GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
13961396+ ;;
13971397+ *:Rhapsody:*:*)
13981398+ GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
13991399+ ;;
14001400+ arm64:Darwin:*:*)
14011401+ GUESS=aarch64-apple-darwin$UNAME_RELEASE
14021402+ ;;
14031403+ *:Darwin:*:*)
14041404+ UNAME_PROCESSOR=`uname -p`
14051405+ case $UNAME_PROCESSOR in
14061406+ unknown) UNAME_PROCESSOR=powerpc ;;
14071407+ esac
14081408+ if command -v xcode-select > /dev/null 2> /dev/null && \
14091409+ ! xcode-select --print-path > /dev/null 2> /dev/null ; then
14101410+ # Avoid executing cc if there is no toolchain installed as
14111411+ # cc will be a stub that puts up a graphical alert
14121412+ # prompting the user to install developer tools.
14131413+ CC_FOR_BUILD=no_compiler_found
14141414+ else
14151415+ set_cc_for_build
14161416+ fi
14171417+ if test "$CC_FOR_BUILD" != no_compiler_found; then
14181418+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
14191419+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
14201420+ grep IS_64BIT_ARCH >/dev/null
14211421+ then
14221422+ case $UNAME_PROCESSOR in
14231423+ i386) UNAME_PROCESSOR=x86_64 ;;
14241424+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
14251425+ esac
14261426+ fi
14271427+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
14281428+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
14291429+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
14301430+ grep IS_PPC >/dev/null
14311431+ then
14321432+ UNAME_PROCESSOR=powerpc
14331433+ fi
14341434+ elif test "$UNAME_PROCESSOR" = i386 ; then
14351435+ # uname -m returns i386 or x86_64
14361436+ UNAME_PROCESSOR=$UNAME_MACHINE
14371437+ fi
14381438+ GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
14391439+ ;;
14401440+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
14411441+ UNAME_PROCESSOR=`uname -p`
14421442+ if test "$UNAME_PROCESSOR" = x86; then
14431443+ UNAME_PROCESSOR=i386
14441444+ UNAME_MACHINE=pc
14451445+ fi
14461446+ GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
14471447+ ;;
14481448+ *:QNX:*:4*)
14491449+ GUESS=i386-pc-qnx
14501450+ ;;
14511451+ NEO-*:NONSTOP_KERNEL:*:*)
14521452+ GUESS=neo-tandem-nsk$UNAME_RELEASE
14531453+ ;;
14541454+ NSE-*:NONSTOP_KERNEL:*:*)
14551455+ GUESS=nse-tandem-nsk$UNAME_RELEASE
14561456+ ;;
14571457+ NSR-*:NONSTOP_KERNEL:*:*)
14581458+ GUESS=nsr-tandem-nsk$UNAME_RELEASE
14591459+ ;;
14601460+ NSV-*:NONSTOP_KERNEL:*:*)
14611461+ GUESS=nsv-tandem-nsk$UNAME_RELEASE
14621462+ ;;
14631463+ NSX-*:NONSTOP_KERNEL:*:*)
14641464+ GUESS=nsx-tandem-nsk$UNAME_RELEASE
14651465+ ;;
14661466+ *:NonStop-UX:*:*)
14671467+ GUESS=mips-compaq-nonstopux
14681468+ ;;
14691469+ BS2000:POSIX*:*:*)
14701470+ GUESS=bs2000-siemens-sysv
14711471+ ;;
14721472+ DS/*:UNIX_System_V:*:*)
14731473+ GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
14741474+ ;;
14751475+ *:Plan9:*:*)
14761476+ # "uname -m" is not consistent, so use $cputype instead. 386
14771477+ # is converted to i386 for consistency with other x86
14781478+ # operating systems.
14791479+ if test "${cputype-}" = 386; then
14801480+ UNAME_MACHINE=i386
14811481+ elif test "x${cputype-}" != x; then
14821482+ UNAME_MACHINE=$cputype
14831483+ fi
14841484+ GUESS=$UNAME_MACHINE-unknown-plan9
14851485+ ;;
14861486+ *:TOPS-10:*:*)
14871487+ GUESS=pdp10-unknown-tops10
14881488+ ;;
14891489+ *:TENEX:*:*)
14901490+ GUESS=pdp10-unknown-tenex
14911491+ ;;
14921492+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
14931493+ GUESS=pdp10-dec-tops20
14941494+ ;;
14951495+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
14961496+ GUESS=pdp10-xkl-tops20
14971497+ ;;
14981498+ *:TOPS-20:*:*)
14991499+ GUESS=pdp10-unknown-tops20
15001500+ ;;
15011501+ *:ITS:*:*)
15021502+ GUESS=pdp10-unknown-its
15031503+ ;;
15041504+ SEI:*:*:SEIUX)
15051505+ GUESS=mips-sei-seiux$UNAME_RELEASE
15061506+ ;;
15071507+ *:DragonFly:*:*)
15081508+ DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
15091509+ GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
15101510+ ;;
15111511+ *:*VMS:*:*)
15121512+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
15131513+ case $UNAME_MACHINE in
15141514+ A*) GUESS=alpha-dec-vms ;;
15151515+ I*) GUESS=ia64-dec-vms ;;
15161516+ V*) GUESS=vax-dec-vms ;;
15171517+ esac ;;
15181518+ *:XENIX:*:SysV)
15191519+ GUESS=i386-pc-xenix
15201520+ ;;
15211521+ i*86:skyos:*:*)
15221522+ SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
15231523+ GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
15241524+ ;;
15251525+ i*86:rdos:*:*)
15261526+ GUESS=$UNAME_MACHINE-pc-rdos
15271527+ ;;
15281528+ i*86:Fiwix:*:*)
15291529+ GUESS=$UNAME_MACHINE-pc-fiwix
15301530+ ;;
15311531+ *:AROS:*:*)
15321532+ GUESS=$UNAME_MACHINE-unknown-aros
15331533+ ;;
15341534+ x86_64:VMkernel:*:*)
15351535+ GUESS=$UNAME_MACHINE-unknown-esx
15361536+ ;;
15371537+ amd64:Isilon\ OneFS:*:*)
15381538+ GUESS=x86_64-unknown-onefs
15391539+ ;;
15401540+ *:Unleashed:*:*)
15411541+ GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
15421542+ ;;
15431543+esac
15441544+15451545+# Do we have a guess based on uname results?
15461546+if test "x$GUESS" != x; then
15471547+ echo "$GUESS"
15481548+ exit
15491549+fi
15501550+15511551+# No uname command or uname output not recognized.
15521552+set_cc_for_build
15531553+cat > "$dummy.c" <<EOF
15541554+#ifdef _SEQUENT_
15551555+#include <sys/types.h>
15561556+#include <sys/utsname.h>
15571557+#endif
15581558+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
15591559+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
15601560+#include <signal.h>
15611561+#if defined(_SIZE_T_) || defined(SIGLOST)
15621562+#include <sys/utsname.h>
15631563+#endif
15641564+#endif
15651565+#endif
15661566+main ()
15671567+{
15681568+#if defined (sony)
15691569+#if defined (MIPSEB)
15701570+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
15711571+ I don't know.... */
15721572+ printf ("mips-sony-bsd\n"); exit (0);
15731573+#else
15741574+#include <sys/param.h>
15751575+ printf ("m68k-sony-newsos%s\n",
15761576+#ifdef NEWSOS4
15771577+ "4"
15781578+#else
15791579+ ""
15801580+#endif
15811581+ ); exit (0);
15821582+#endif
15831583+#endif
15841584+15851585+#if defined (NeXT)
15861586+#if !defined (__ARCHITECTURE__)
15871587+#define __ARCHITECTURE__ "m68k"
15881588+#endif
15891589+ int version;
15901590+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
15911591+ if (version < 4)
15921592+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
15931593+ else
15941594+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
15951595+ exit (0);
15961596+#endif
15971597+15981598+#if defined (MULTIMAX) || defined (n16)
15991599+#if defined (UMAXV)
16001600+ printf ("ns32k-encore-sysv\n"); exit (0);
16011601+#else
16021602+#if defined (CMU)
16031603+ printf ("ns32k-encore-mach\n"); exit (0);
16041604+#else
16051605+ printf ("ns32k-encore-bsd\n"); exit (0);
16061606+#endif
16071607+#endif
16081608+#endif
16091609+16101610+#if defined (__386BSD__)
16111611+ printf ("i386-pc-bsd\n"); exit (0);
16121612+#endif
16131613+16141614+#if defined (sequent)
16151615+#if defined (i386)
16161616+ printf ("i386-sequent-dynix\n"); exit (0);
16171617+#endif
16181618+#if defined (ns32000)
16191619+ printf ("ns32k-sequent-dynix\n"); exit (0);
16201620+#endif
16211621+#endif
16221622+16231623+#if defined (_SEQUENT_)
16241624+ struct utsname un;
16251625+16261626+ uname(&un);
16271627+ if (strncmp(un.version, "V2", 2) == 0) {
16281628+ printf ("i386-sequent-ptx2\n"); exit (0);
16291629+ }
16301630+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
16311631+ printf ("i386-sequent-ptx1\n"); exit (0);
16321632+ }
16331633+ printf ("i386-sequent-ptx\n"); exit (0);
16341634+#endif
16351635+16361636+#if defined (vax)
16371637+#if !defined (ultrix)
16381638+#include <sys/param.h>
16391639+#if defined (BSD)
16401640+#if BSD == 43
16411641+ printf ("vax-dec-bsd4.3\n"); exit (0);
16421642+#else
16431643+#if BSD == 199006
16441644+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
16451645+#else
16461646+ printf ("vax-dec-bsd\n"); exit (0);
16471647+#endif
16481648+#endif
16491649+#else
16501650+ printf ("vax-dec-bsd\n"); exit (0);
16511651+#endif
16521652+#else
16531653+#if defined(_SIZE_T_) || defined(SIGLOST)
16541654+ struct utsname un;
16551655+ uname (&un);
16561656+ printf ("vax-dec-ultrix%s\n", un.release); exit (0);
16571657+#else
16581658+ printf ("vax-dec-ultrix\n"); exit (0);
16591659+#endif
16601660+#endif
16611661+#endif
16621662+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
16631663+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
16641664+#if defined(_SIZE_T_) || defined(SIGLOST)
16651665+ struct utsname *un;
16661666+ uname (&un);
16671667+ printf ("mips-dec-ultrix%s\n", un.release); exit (0);
16681668+#else
16691669+ printf ("mips-dec-ultrix\n"); exit (0);
16701670+#endif
16711671+#endif
16721672+#endif
16731673+16741674+#if defined (alliant) && defined (i860)
16751675+ printf ("i860-alliant-bsd\n"); exit (0);
16761676+#endif
16771677+16781678+ exit (1);
16791679+}
16801680+EOF
16811681+16821682+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
16831683+ { echo "$SYSTEM_NAME"; exit; }
16841684+16851685+# Apollos put the system type in the environment.
16861686+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
16871687+16881688+echo "$0: unable to guess system type" >&2
16891689+16901690+case $UNAME_MACHINE:$UNAME_SYSTEM in
16911691+ mips:Linux | mips64:Linux)
16921692+ # If we got here on MIPS GNU/Linux, output extra information.
16931693+ cat >&2 <<EOF
16941694+16951695+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
16961696+the system type. Please install a C compiler and try again.
16971697+EOF
16981698+ ;;
16991699+esac
17001700+17011701+cat >&2 <<EOF
17021702+17031703+This script (version $timestamp), has failed to recognize the
17041704+operating system you are using. If your script is old, overwrite *all*
17051705+copies of config.guess and config.sub with the latest versions from:
17061706+17071707+ https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
17081708+and
17091709+ https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
17101710+EOF
17111711+17121712+our_year=`echo $timestamp | sed 's,-.*,,'`
17131713+thisyear=`date +%Y`
17141714+# shellcheck disable=SC2003
17151715+script_age=`expr "$thisyear" - "$our_year"`
17161716+if test "$script_age" -lt 3 ; then
17171717+ cat >&2 <<EOF
17181718+17191719+If $0 has already been updated, send the following data and any
17201720+information you think might be pertinent to config-patches@gnu.org to
17211721+provide the necessary information to handle your system.
17221722+17231723+config.guess timestamp = $timestamp
17241724+17251725+uname -m = `(uname -m) 2>/dev/null || echo unknown`
17261726+uname -r = `(uname -r) 2>/dev/null || echo unknown`
17271727+uname -s = `(uname -s) 2>/dev/null || echo unknown`
17281728+uname -v = `(uname -v) 2>/dev/null || echo unknown`
17291729+17301730+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
17311731+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
17321732+17331733+hostinfo = `(hostinfo) 2>/dev/null`
17341734+/bin/universe = `(/bin/universe) 2>/dev/null`
17351735+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
17361736+/bin/arch = `(/bin/arch) 2>/dev/null`
17371737+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
17381738+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
17391739+17401740+UNAME_MACHINE = "$UNAME_MACHINE"
17411741+UNAME_RELEASE = "$UNAME_RELEASE"
17421742+UNAME_SYSTEM = "$UNAME_SYSTEM"
17431743+UNAME_VERSION = "$UNAME_VERSION"
17441744+EOF
17451745+fi
17461746+17471747+exit 1
17481748+17491749+# Local variables:
17501750+# eval: (add-hook 'before-save-hook 'time-stamp)
17511751+# time-stamp-start: "timestamp='"
17521752+# time-stamp-format: "%:y-%02m-%02d"
17531753+# time-stamp-end: "'"
17541754+# End:
+85
usr.sbin/nsd/simdzone/config.h.in
···11+/* config.h.in. Generated from configure.ac by autoheader. */
22+33+/* Define to 1 if you have the declaration of `bswap16', and to 0 if you
44+ don't. */
55+#undef HAVE_DECL_BSWAP16
66+77+/* Define to 1 if you have the declaration of `bswap32', and to 0 if you
88+ don't. */
99+#undef HAVE_DECL_BSWAP32
1010+1111+/* Define to 1 if you have the declaration of `bswap64', and to 0 if you
1212+ don't. */
1313+#undef HAVE_DECL_BSWAP64
1414+1515+/* Define to 1 if you have the <endian.h> header file. */
1616+#undef HAVE_ENDIAN_H
1717+1818+/* Wether or not to compile support for AVX2 */
1919+#undef HAVE_HASWELL
2020+2121+/* Define to 1 if you have the <inttypes.h> header file. */
2222+#undef HAVE_INTTYPES_H
2323+2424+/* Define to 1 if you have the `realpath' function. */
2525+#undef HAVE_REALPATH
2626+2727+/* Define to 1 if you have the <stdint.h> header file. */
2828+#undef HAVE_STDINT_H
2929+3030+/* Define to 1 if you have the <stdio.h> header file. */
3131+#undef HAVE_STDIO_H
3232+3333+/* Define to 1 if you have the <stdlib.h> header file. */
3434+#undef HAVE_STDLIB_H
3535+3636+/* Define to 1 if you have the <strings.h> header file. */
3737+#undef HAVE_STRINGS_H
3838+3939+/* Define to 1 if you have the <string.h> header file. */
4040+#undef HAVE_STRING_H
4141+4242+/* Define to 1 if you have the <sys/endian.h> header file. */
4343+#undef HAVE_SYS_ENDIAN_H
4444+4545+/* Define to 1 if you have the <sys/stat.h> header file. */
4646+#undef HAVE_SYS_STAT_H
4747+4848+/* Define to 1 if you have the <sys/types.h> header file. */
4949+#undef HAVE_SYS_TYPES_H
5050+5151+/* Define to 1 if you have the <unistd.h> header file. */
5252+#undef HAVE_UNISTD_H
5353+5454+/* Wether or not to compile support for SSE4.2 */
5555+#undef HAVE_WESTMERE
5656+5757+/* Define to the address where bug reports for this package should be sent. */
5858+#undef PACKAGE_BUGREPORT
5959+6060+/* Define to the full name of this package. */
6161+#undef PACKAGE_NAME
6262+6363+/* Define to the full name and version of this package. */
6464+#undef PACKAGE_STRING
6565+6666+/* Define to the one symbol short name of this package. */
6767+#undef PACKAGE_TARNAME
6868+6969+/* Define to the home page for this package. */
7070+#undef PACKAGE_URL
7171+7272+/* Define to the version of this package. */
7373+#undef PACKAGE_VERSION
7474+7575+/* Define to 1 if all of the C90 standard headers exist (not just the ones
7676+ required in a freestanding environment). This macro is provided for
7777+ backward compatibility; new code need not use it. */
7878+#undef STDC_HEADERS
7979+8080+8181+/* Defines _XOPEN_SOURCE and _POSIX_C_SOURCE implicitly in features.h */
8282+#ifndef _DEFAULT_SOURCE
8383+# define _DEFAULT_SOURCE 1
8484+#endif
8585+
+1890
usr.sbin/nsd/simdzone/config.sub
···11+#! /bin/sh
22+# Configuration validation subroutine script.
33+# Copyright 1992-2022 Free Software Foundation, Inc.
44+55+# shellcheck disable=SC2006,SC2268 # see below for rationale
66+77+timestamp='2022-01-03'
88+99+# This file is free software; you can redistribute it and/or modify it
1010+# under the terms of the GNU General Public License as published by
1111+# the Free Software Foundation, either version 3 of the License, or
1212+# (at your option) any later version.
1313+#
1414+# This program is distributed in the hope that it will be useful, but
1515+# WITHOUT ANY WARRANTY; without even the implied warranty of
1616+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1717+# General Public License for more details.
1818+#
1919+# You should have received a copy of the GNU General Public License
2020+# along with this program; if not, see <https://www.gnu.org/licenses/>.
2121+#
2222+# As a special exception to the GNU General Public License, if you
2323+# distribute this file as part of a program that contains a
2424+# configuration script generated by Autoconf, you may include it under
2525+# the same distribution terms that you use for the rest of that
2626+# program. This Exception is an additional permission under section 7
2727+# of the GNU General Public License, version 3 ("GPLv3").
2828+2929+3030+# Please send patches to <config-patches@gnu.org>.
3131+#
3232+# Configuration subroutine to validate and canonicalize a configuration type.
3333+# Supply the specified configuration type as an argument.
3434+# If it is invalid, we print an error message on stderr and exit with code 1.
3535+# Otherwise, we print the canonical config type on stdout and succeed.
3636+3737+# You can get the latest version of this script from:
3838+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
3939+4040+# This file is supposed to be the same for all GNU packages
4141+# and recognize all the CPU types, system types and aliases
4242+# that are meaningful with *any* GNU software.
4343+# Each package is responsible for reporting which valid configurations
4444+# it does not support. The user should be able to distinguish
4545+# a failure to support a valid configuration from a meaningless
4646+# configuration.
4747+4848+# The goal of this file is to map all the various variations of a given
4949+# machine specification into a single specification in the form:
5050+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
5151+# or in some cases, the newer four-part form:
5252+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
5353+# It is wrong to echo any other type of specification.
5454+5555+# The "shellcheck disable" line above the timestamp inhibits complaints
5656+# about features and limitations of the classic Bourne shell that were
5757+# superseded or lifted in POSIX. However, this script identifies a wide
5858+# variety of pre-POSIX systems that do not have POSIX shells at all, and
5959+# even some reasonably current systems (Solaris 10 as case-in-point) still
6060+# have a pre-POSIX /bin/sh.
6161+6262+me=`echo "$0" | sed -e 's,.*/,,'`
6363+6464+usage="\
6565+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
6666+6767+Canonicalize a configuration name.
6868+6969+Options:
7070+ -h, --help print this help, then exit
7171+ -t, --time-stamp print date of last modification, then exit
7272+ -v, --version print version number, then exit
7373+7474+Report bugs and patches to <config-patches@gnu.org>."
7575+7676+version="\
7777+GNU config.sub ($timestamp)
7878+7979+Copyright 1992-2022 Free Software Foundation, Inc.
8080+8181+This is free software; see the source for copying conditions. There is NO
8282+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
8383+8484+help="
8585+Try \`$me --help' for more information."
8686+8787+# Parse command line
8888+while test $# -gt 0 ; do
8989+ case $1 in
9090+ --time-stamp | --time* | -t )
9191+ echo "$timestamp" ; exit ;;
9292+ --version | -v )
9393+ echo "$version" ; exit ;;
9494+ --help | --h* | -h )
9595+ echo "$usage"; exit ;;
9696+ -- ) # Stop option processing
9797+ shift; break ;;
9898+ - ) # Use stdin as input.
9999+ break ;;
100100+ -* )
101101+ echo "$me: invalid option $1$help" >&2
102102+ exit 1 ;;
103103+104104+ *local*)
105105+ # First pass through any local machine types.
106106+ echo "$1"
107107+ exit ;;
108108+109109+ * )
110110+ break ;;
111111+ esac
112112+done
113113+114114+case $# in
115115+ 0) echo "$me: missing argument$help" >&2
116116+ exit 1;;
117117+ 1) ;;
118118+ *) echo "$me: too many arguments$help" >&2
119119+ exit 1;;
120120+esac
121121+122122+# Split fields of configuration type
123123+# shellcheck disable=SC2162
124124+saved_IFS=$IFS
125125+IFS="-" read field1 field2 field3 field4 <<EOF
126126+$1
127127+EOF
128128+IFS=$saved_IFS
129129+130130+# Separate into logical components for further validation
131131+case $1 in
132132+ *-*-*-*-*)
133133+ echo Invalid configuration \`"$1"\': more than four components >&2
134134+ exit 1
135135+ ;;
136136+ *-*-*-*)
137137+ basic_machine=$field1-$field2
138138+ basic_os=$field3-$field4
139139+ ;;
140140+ *-*-*)
141141+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
142142+ # parts
143143+ maybe_os=$field2-$field3
144144+ case $maybe_os in
145145+ nto-qnx* | linux-* | uclinux-uclibc* \
146146+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
147147+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
148148+ | storm-chaos* | os2-emx* | rtmk-nova*)
149149+ basic_machine=$field1
150150+ basic_os=$maybe_os
151151+ ;;
152152+ android-linux)
153153+ basic_machine=$field1-unknown
154154+ basic_os=linux-android
155155+ ;;
156156+ *)
157157+ basic_machine=$field1-$field2
158158+ basic_os=$field3
159159+ ;;
160160+ esac
161161+ ;;
162162+ *-*)
163163+ # A lone config we happen to match not fitting any pattern
164164+ case $field1-$field2 in
165165+ decstation-3100)
166166+ basic_machine=mips-dec
167167+ basic_os=
168168+ ;;
169169+ *-*)
170170+ # Second component is usually, but not always the OS
171171+ case $field2 in
172172+ # Prevent following clause from handling this valid os
173173+ sun*os*)
174174+ basic_machine=$field1
175175+ basic_os=$field2
176176+ ;;
177177+ zephyr*)
178178+ basic_machine=$field1-unknown
179179+ basic_os=$field2
180180+ ;;
181181+ # Manufacturers
182182+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
183183+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
184184+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
185185+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
186186+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
187187+ | ultra | tti* | harris | dolphin | highlevel | gould \
188188+ | cbm | ns | masscomp | apple | axis | knuth | cray \
189189+ | microblaze* | sim | cisco \
190190+ | oki | wec | wrs | winbond)
191191+ basic_machine=$field1-$field2
192192+ basic_os=
193193+ ;;
194194+ *)
195195+ basic_machine=$field1
196196+ basic_os=$field2
197197+ ;;
198198+ esac
199199+ ;;
200200+ esac
201201+ ;;
202202+ *)
203203+ # Convert single-component short-hands not valid as part of
204204+ # multi-component configurations.
205205+ case $field1 in
206206+ 386bsd)
207207+ basic_machine=i386-pc
208208+ basic_os=bsd
209209+ ;;
210210+ a29khif)
211211+ basic_machine=a29k-amd
212212+ basic_os=udi
213213+ ;;
214214+ adobe68k)
215215+ basic_machine=m68010-adobe
216216+ basic_os=scout
217217+ ;;
218218+ alliant)
219219+ basic_machine=fx80-alliant
220220+ basic_os=
221221+ ;;
222222+ altos | altos3068)
223223+ basic_machine=m68k-altos
224224+ basic_os=
225225+ ;;
226226+ am29k)
227227+ basic_machine=a29k-none
228228+ basic_os=bsd
229229+ ;;
230230+ amdahl)
231231+ basic_machine=580-amdahl
232232+ basic_os=sysv
233233+ ;;
234234+ amiga)
235235+ basic_machine=m68k-unknown
236236+ basic_os=
237237+ ;;
238238+ amigaos | amigados)
239239+ basic_machine=m68k-unknown
240240+ basic_os=amigaos
241241+ ;;
242242+ amigaunix | amix)
243243+ basic_machine=m68k-unknown
244244+ basic_os=sysv4
245245+ ;;
246246+ apollo68)
247247+ basic_machine=m68k-apollo
248248+ basic_os=sysv
249249+ ;;
250250+ apollo68bsd)
251251+ basic_machine=m68k-apollo
252252+ basic_os=bsd
253253+ ;;
254254+ aros)
255255+ basic_machine=i386-pc
256256+ basic_os=aros
257257+ ;;
258258+ aux)
259259+ basic_machine=m68k-apple
260260+ basic_os=aux
261261+ ;;
262262+ balance)
263263+ basic_machine=ns32k-sequent
264264+ basic_os=dynix
265265+ ;;
266266+ blackfin)
267267+ basic_machine=bfin-unknown
268268+ basic_os=linux
269269+ ;;
270270+ cegcc)
271271+ basic_machine=arm-unknown
272272+ basic_os=cegcc
273273+ ;;
274274+ convex-c1)
275275+ basic_machine=c1-convex
276276+ basic_os=bsd
277277+ ;;
278278+ convex-c2)
279279+ basic_machine=c2-convex
280280+ basic_os=bsd
281281+ ;;
282282+ convex-c32)
283283+ basic_machine=c32-convex
284284+ basic_os=bsd
285285+ ;;
286286+ convex-c34)
287287+ basic_machine=c34-convex
288288+ basic_os=bsd
289289+ ;;
290290+ convex-c38)
291291+ basic_machine=c38-convex
292292+ basic_os=bsd
293293+ ;;
294294+ cray)
295295+ basic_machine=j90-cray
296296+ basic_os=unicos
297297+ ;;
298298+ crds | unos)
299299+ basic_machine=m68k-crds
300300+ basic_os=
301301+ ;;
302302+ da30)
303303+ basic_machine=m68k-da30
304304+ basic_os=
305305+ ;;
306306+ decstation | pmax | pmin | dec3100 | decstatn)
307307+ basic_machine=mips-dec
308308+ basic_os=
309309+ ;;
310310+ delta88)
311311+ basic_machine=m88k-motorola
312312+ basic_os=sysv3
313313+ ;;
314314+ dicos)
315315+ basic_machine=i686-pc
316316+ basic_os=dicos
317317+ ;;
318318+ djgpp)
319319+ basic_machine=i586-pc
320320+ basic_os=msdosdjgpp
321321+ ;;
322322+ ebmon29k)
323323+ basic_machine=a29k-amd
324324+ basic_os=ebmon
325325+ ;;
326326+ es1800 | OSE68k | ose68k | ose | OSE)
327327+ basic_machine=m68k-ericsson
328328+ basic_os=ose
329329+ ;;
330330+ gmicro)
331331+ basic_machine=tron-gmicro
332332+ basic_os=sysv
333333+ ;;
334334+ go32)
335335+ basic_machine=i386-pc
336336+ basic_os=go32
337337+ ;;
338338+ h8300hms)
339339+ basic_machine=h8300-hitachi
340340+ basic_os=hms
341341+ ;;
342342+ h8300xray)
343343+ basic_machine=h8300-hitachi
344344+ basic_os=xray
345345+ ;;
346346+ h8500hms)
347347+ basic_machine=h8500-hitachi
348348+ basic_os=hms
349349+ ;;
350350+ harris)
351351+ basic_machine=m88k-harris
352352+ basic_os=sysv3
353353+ ;;
354354+ hp300 | hp300hpux)
355355+ basic_machine=m68k-hp
356356+ basic_os=hpux
357357+ ;;
358358+ hp300bsd)
359359+ basic_machine=m68k-hp
360360+ basic_os=bsd
361361+ ;;
362362+ hppaosf)
363363+ basic_machine=hppa1.1-hp
364364+ basic_os=osf
365365+ ;;
366366+ hppro)
367367+ basic_machine=hppa1.1-hp
368368+ basic_os=proelf
369369+ ;;
370370+ i386mach)
371371+ basic_machine=i386-mach
372372+ basic_os=mach
373373+ ;;
374374+ isi68 | isi)
375375+ basic_machine=m68k-isi
376376+ basic_os=sysv
377377+ ;;
378378+ m68knommu)
379379+ basic_machine=m68k-unknown
380380+ basic_os=linux
381381+ ;;
382382+ magnum | m3230)
383383+ basic_machine=mips-mips
384384+ basic_os=sysv
385385+ ;;
386386+ merlin)
387387+ basic_machine=ns32k-utek
388388+ basic_os=sysv
389389+ ;;
390390+ mingw64)
391391+ basic_machine=x86_64-pc
392392+ basic_os=mingw64
393393+ ;;
394394+ mingw32)
395395+ basic_machine=i686-pc
396396+ basic_os=mingw32
397397+ ;;
398398+ mingw32ce)
399399+ basic_machine=arm-unknown
400400+ basic_os=mingw32ce
401401+ ;;
402402+ monitor)
403403+ basic_machine=m68k-rom68k
404404+ basic_os=coff
405405+ ;;
406406+ morphos)
407407+ basic_machine=powerpc-unknown
408408+ basic_os=morphos
409409+ ;;
410410+ moxiebox)
411411+ basic_machine=moxie-unknown
412412+ basic_os=moxiebox
413413+ ;;
414414+ msdos)
415415+ basic_machine=i386-pc
416416+ basic_os=msdos
417417+ ;;
418418+ msys)
419419+ basic_machine=i686-pc
420420+ basic_os=msys
421421+ ;;
422422+ mvs)
423423+ basic_machine=i370-ibm
424424+ basic_os=mvs
425425+ ;;
426426+ nacl)
427427+ basic_machine=le32-unknown
428428+ basic_os=nacl
429429+ ;;
430430+ ncr3000)
431431+ basic_machine=i486-ncr
432432+ basic_os=sysv4
433433+ ;;
434434+ netbsd386)
435435+ basic_machine=i386-pc
436436+ basic_os=netbsd
437437+ ;;
438438+ netwinder)
439439+ basic_machine=armv4l-rebel
440440+ basic_os=linux
441441+ ;;
442442+ news | news700 | news800 | news900)
443443+ basic_machine=m68k-sony
444444+ basic_os=newsos
445445+ ;;
446446+ news1000)
447447+ basic_machine=m68030-sony
448448+ basic_os=newsos
449449+ ;;
450450+ necv70)
451451+ basic_machine=v70-nec
452452+ basic_os=sysv
453453+ ;;
454454+ nh3000)
455455+ basic_machine=m68k-harris
456456+ basic_os=cxux
457457+ ;;
458458+ nh[45]000)
459459+ basic_machine=m88k-harris
460460+ basic_os=cxux
461461+ ;;
462462+ nindy960)
463463+ basic_machine=i960-intel
464464+ basic_os=nindy
465465+ ;;
466466+ mon960)
467467+ basic_machine=i960-intel
468468+ basic_os=mon960
469469+ ;;
470470+ nonstopux)
471471+ basic_machine=mips-compaq
472472+ basic_os=nonstopux
473473+ ;;
474474+ os400)
475475+ basic_machine=powerpc-ibm
476476+ basic_os=os400
477477+ ;;
478478+ OSE68000 | ose68000)
479479+ basic_machine=m68000-ericsson
480480+ basic_os=ose
481481+ ;;
482482+ os68k)
483483+ basic_machine=m68k-none
484484+ basic_os=os68k
485485+ ;;
486486+ paragon)
487487+ basic_machine=i860-intel
488488+ basic_os=osf
489489+ ;;
490490+ parisc)
491491+ basic_machine=hppa-unknown
492492+ basic_os=linux
493493+ ;;
494494+ psp)
495495+ basic_machine=mipsallegrexel-sony
496496+ basic_os=psp
497497+ ;;
498498+ pw32)
499499+ basic_machine=i586-unknown
500500+ basic_os=pw32
501501+ ;;
502502+ rdos | rdos64)
503503+ basic_machine=x86_64-pc
504504+ basic_os=rdos
505505+ ;;
506506+ rdos32)
507507+ basic_machine=i386-pc
508508+ basic_os=rdos
509509+ ;;
510510+ rom68k)
511511+ basic_machine=m68k-rom68k
512512+ basic_os=coff
513513+ ;;
514514+ sa29200)
515515+ basic_machine=a29k-amd
516516+ basic_os=udi
517517+ ;;
518518+ sei)
519519+ basic_machine=mips-sei
520520+ basic_os=seiux
521521+ ;;
522522+ sequent)
523523+ basic_machine=i386-sequent
524524+ basic_os=
525525+ ;;
526526+ sps7)
527527+ basic_machine=m68k-bull
528528+ basic_os=sysv2
529529+ ;;
530530+ st2000)
531531+ basic_machine=m68k-tandem
532532+ basic_os=
533533+ ;;
534534+ stratus)
535535+ basic_machine=i860-stratus
536536+ basic_os=sysv4
537537+ ;;
538538+ sun2)
539539+ basic_machine=m68000-sun
540540+ basic_os=
541541+ ;;
542542+ sun2os3)
543543+ basic_machine=m68000-sun
544544+ basic_os=sunos3
545545+ ;;
546546+ sun2os4)
547547+ basic_machine=m68000-sun
548548+ basic_os=sunos4
549549+ ;;
550550+ sun3)
551551+ basic_machine=m68k-sun
552552+ basic_os=
553553+ ;;
554554+ sun3os3)
555555+ basic_machine=m68k-sun
556556+ basic_os=sunos3
557557+ ;;
558558+ sun3os4)
559559+ basic_machine=m68k-sun
560560+ basic_os=sunos4
561561+ ;;
562562+ sun4)
563563+ basic_machine=sparc-sun
564564+ basic_os=
565565+ ;;
566566+ sun4os3)
567567+ basic_machine=sparc-sun
568568+ basic_os=sunos3
569569+ ;;
570570+ sun4os4)
571571+ basic_machine=sparc-sun
572572+ basic_os=sunos4
573573+ ;;
574574+ sun4sol2)
575575+ basic_machine=sparc-sun
576576+ basic_os=solaris2
577577+ ;;
578578+ sun386 | sun386i | roadrunner)
579579+ basic_machine=i386-sun
580580+ basic_os=
581581+ ;;
582582+ sv1)
583583+ basic_machine=sv1-cray
584584+ basic_os=unicos
585585+ ;;
586586+ symmetry)
587587+ basic_machine=i386-sequent
588588+ basic_os=dynix
589589+ ;;
590590+ t3e)
591591+ basic_machine=alphaev5-cray
592592+ basic_os=unicos
593593+ ;;
594594+ t90)
595595+ basic_machine=t90-cray
596596+ basic_os=unicos
597597+ ;;
598598+ toad1)
599599+ basic_machine=pdp10-xkl
600600+ basic_os=tops20
601601+ ;;
602602+ tpf)
603603+ basic_machine=s390x-ibm
604604+ basic_os=tpf
605605+ ;;
606606+ udi29k)
607607+ basic_machine=a29k-amd
608608+ basic_os=udi
609609+ ;;
610610+ ultra3)
611611+ basic_machine=a29k-nyu
612612+ basic_os=sym1
613613+ ;;
614614+ v810 | necv810)
615615+ basic_machine=v810-nec
616616+ basic_os=none
617617+ ;;
618618+ vaxv)
619619+ basic_machine=vax-dec
620620+ basic_os=sysv
621621+ ;;
622622+ vms)
623623+ basic_machine=vax-dec
624624+ basic_os=vms
625625+ ;;
626626+ vsta)
627627+ basic_machine=i386-pc
628628+ basic_os=vsta
629629+ ;;
630630+ vxworks960)
631631+ basic_machine=i960-wrs
632632+ basic_os=vxworks
633633+ ;;
634634+ vxworks68)
635635+ basic_machine=m68k-wrs
636636+ basic_os=vxworks
637637+ ;;
638638+ vxworks29k)
639639+ basic_machine=a29k-wrs
640640+ basic_os=vxworks
641641+ ;;
642642+ xbox)
643643+ basic_machine=i686-pc
644644+ basic_os=mingw32
645645+ ;;
646646+ ymp)
647647+ basic_machine=ymp-cray
648648+ basic_os=unicos
649649+ ;;
650650+ *)
651651+ basic_machine=$1
652652+ basic_os=
653653+ ;;
654654+ esac
655655+ ;;
656656+esac
657657+658658+# Decode 1-component or ad-hoc basic machines
659659+case $basic_machine in
660660+ # Here we handle the default manufacturer of certain CPU types. It is in
661661+ # some cases the only manufacturer, in others, it is the most popular.
662662+ w89k)
663663+ cpu=hppa1.1
664664+ vendor=winbond
665665+ ;;
666666+ op50n)
667667+ cpu=hppa1.1
668668+ vendor=oki
669669+ ;;
670670+ op60c)
671671+ cpu=hppa1.1
672672+ vendor=oki
673673+ ;;
674674+ ibm*)
675675+ cpu=i370
676676+ vendor=ibm
677677+ ;;
678678+ orion105)
679679+ cpu=clipper
680680+ vendor=highlevel
681681+ ;;
682682+ mac | mpw | mac-mpw)
683683+ cpu=m68k
684684+ vendor=apple
685685+ ;;
686686+ pmac | pmac-mpw)
687687+ cpu=powerpc
688688+ vendor=apple
689689+ ;;
690690+691691+ # Recognize the various machine names and aliases which stand
692692+ # for a CPU type and a company and sometimes even an OS.
693693+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
694694+ cpu=m68000
695695+ vendor=att
696696+ ;;
697697+ 3b*)
698698+ cpu=we32k
699699+ vendor=att
700700+ ;;
701701+ bluegene*)
702702+ cpu=powerpc
703703+ vendor=ibm
704704+ basic_os=cnk
705705+ ;;
706706+ decsystem10* | dec10*)
707707+ cpu=pdp10
708708+ vendor=dec
709709+ basic_os=tops10
710710+ ;;
711711+ decsystem20* | dec20*)
712712+ cpu=pdp10
713713+ vendor=dec
714714+ basic_os=tops20
715715+ ;;
716716+ delta | 3300 | motorola-3300 | motorola-delta \
717717+ | 3300-motorola | delta-motorola)
718718+ cpu=m68k
719719+ vendor=motorola
720720+ ;;
721721+ dpx2*)
722722+ cpu=m68k
723723+ vendor=bull
724724+ basic_os=sysv3
725725+ ;;
726726+ encore | umax | mmax)
727727+ cpu=ns32k
728728+ vendor=encore
729729+ ;;
730730+ elxsi)
731731+ cpu=elxsi
732732+ vendor=elxsi
733733+ basic_os=${basic_os:-bsd}
734734+ ;;
735735+ fx2800)
736736+ cpu=i860
737737+ vendor=alliant
738738+ ;;
739739+ genix)
740740+ cpu=ns32k
741741+ vendor=ns
742742+ ;;
743743+ h3050r* | hiux*)
744744+ cpu=hppa1.1
745745+ vendor=hitachi
746746+ basic_os=hiuxwe2
747747+ ;;
748748+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
749749+ cpu=hppa1.0
750750+ vendor=hp
751751+ ;;
752752+ hp9k2[0-9][0-9] | hp9k31[0-9])
753753+ cpu=m68000
754754+ vendor=hp
755755+ ;;
756756+ hp9k3[2-9][0-9])
757757+ cpu=m68k
758758+ vendor=hp
759759+ ;;
760760+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
761761+ cpu=hppa1.0
762762+ vendor=hp
763763+ ;;
764764+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
765765+ cpu=hppa1.1
766766+ vendor=hp
767767+ ;;
768768+ hp9k78[0-9] | hp78[0-9])
769769+ # FIXME: really hppa2.0-hp
770770+ cpu=hppa1.1
771771+ vendor=hp
772772+ ;;
773773+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
774774+ # FIXME: really hppa2.0-hp
775775+ cpu=hppa1.1
776776+ vendor=hp
777777+ ;;
778778+ hp9k8[0-9][13679] | hp8[0-9][13679])
779779+ cpu=hppa1.1
780780+ vendor=hp
781781+ ;;
782782+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
783783+ cpu=hppa1.0
784784+ vendor=hp
785785+ ;;
786786+ i*86v32)
787787+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
788788+ vendor=pc
789789+ basic_os=sysv32
790790+ ;;
791791+ i*86v4*)
792792+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
793793+ vendor=pc
794794+ basic_os=sysv4
795795+ ;;
796796+ i*86v)
797797+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
798798+ vendor=pc
799799+ basic_os=sysv
800800+ ;;
801801+ i*86sol2)
802802+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
803803+ vendor=pc
804804+ basic_os=solaris2
805805+ ;;
806806+ j90 | j90-cray)
807807+ cpu=j90
808808+ vendor=cray
809809+ basic_os=${basic_os:-unicos}
810810+ ;;
811811+ iris | iris4d)
812812+ cpu=mips
813813+ vendor=sgi
814814+ case $basic_os in
815815+ irix*)
816816+ ;;
817817+ *)
818818+ basic_os=irix4
819819+ ;;
820820+ esac
821821+ ;;
822822+ miniframe)
823823+ cpu=m68000
824824+ vendor=convergent
825825+ ;;
826826+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
827827+ cpu=m68k
828828+ vendor=atari
829829+ basic_os=mint
830830+ ;;
831831+ news-3600 | risc-news)
832832+ cpu=mips
833833+ vendor=sony
834834+ basic_os=newsos
835835+ ;;
836836+ next | m*-next)
837837+ cpu=m68k
838838+ vendor=next
839839+ case $basic_os in
840840+ openstep*)
841841+ ;;
842842+ nextstep*)
843843+ ;;
844844+ ns2*)
845845+ basic_os=nextstep2
846846+ ;;
847847+ *)
848848+ basic_os=nextstep3
849849+ ;;
850850+ esac
851851+ ;;
852852+ np1)
853853+ cpu=np1
854854+ vendor=gould
855855+ ;;
856856+ op50n-* | op60c-*)
857857+ cpu=hppa1.1
858858+ vendor=oki
859859+ basic_os=proelf
860860+ ;;
861861+ pa-hitachi)
862862+ cpu=hppa1.1
863863+ vendor=hitachi
864864+ basic_os=hiuxwe2
865865+ ;;
866866+ pbd)
867867+ cpu=sparc
868868+ vendor=tti
869869+ ;;
870870+ pbb)
871871+ cpu=m68k
872872+ vendor=tti
873873+ ;;
874874+ pc532)
875875+ cpu=ns32k
876876+ vendor=pc532
877877+ ;;
878878+ pn)
879879+ cpu=pn
880880+ vendor=gould
881881+ ;;
882882+ power)
883883+ cpu=power
884884+ vendor=ibm
885885+ ;;
886886+ ps2)
887887+ cpu=i386
888888+ vendor=ibm
889889+ ;;
890890+ rm[46]00)
891891+ cpu=mips
892892+ vendor=siemens
893893+ ;;
894894+ rtpc | rtpc-*)
895895+ cpu=romp
896896+ vendor=ibm
897897+ ;;
898898+ sde)
899899+ cpu=mipsisa32
900900+ vendor=sde
901901+ basic_os=${basic_os:-elf}
902902+ ;;
903903+ simso-wrs)
904904+ cpu=sparclite
905905+ vendor=wrs
906906+ basic_os=vxworks
907907+ ;;
908908+ tower | tower-32)
909909+ cpu=m68k
910910+ vendor=ncr
911911+ ;;
912912+ vpp*|vx|vx-*)
913913+ cpu=f301
914914+ vendor=fujitsu
915915+ ;;
916916+ w65)
917917+ cpu=w65
918918+ vendor=wdc
919919+ ;;
920920+ w89k-*)
921921+ cpu=hppa1.1
922922+ vendor=winbond
923923+ basic_os=proelf
924924+ ;;
925925+ none)
926926+ cpu=none
927927+ vendor=none
928928+ ;;
929929+ leon|leon[3-9])
930930+ cpu=sparc
931931+ vendor=$basic_machine
932932+ ;;
933933+ leon-*|leon[3-9]-*)
934934+ cpu=sparc
935935+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
936936+ ;;
937937+938938+ *-*)
939939+ # shellcheck disable=SC2162
940940+ saved_IFS=$IFS
941941+ IFS="-" read cpu vendor <<EOF
942942+$basic_machine
943943+EOF
944944+ IFS=$saved_IFS
945945+ ;;
946946+ # We use `pc' rather than `unknown'
947947+ # because (1) that's what they normally are, and
948948+ # (2) the word "unknown" tends to confuse beginning users.
949949+ i*86 | x86_64)
950950+ cpu=$basic_machine
951951+ vendor=pc
952952+ ;;
953953+ # These rules are duplicated from below for sake of the special case above;
954954+ # i.e. things that normalized to x86 arches should also default to "pc"
955955+ pc98)
956956+ cpu=i386
957957+ vendor=pc
958958+ ;;
959959+ x64 | amd64)
960960+ cpu=x86_64
961961+ vendor=pc
962962+ ;;
963963+ # Recognize the basic CPU types without company name.
964964+ *)
965965+ cpu=$basic_machine
966966+ vendor=unknown
967967+ ;;
968968+esac
969969+970970+unset -v basic_machine
971971+972972+# Decode basic machines in the full and proper CPU-Company form.
973973+case $cpu-$vendor in
974974+ # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
975975+ # some cases the only manufacturer, in others, it is the most popular.
976976+ craynv-unknown)
977977+ vendor=cray
978978+ basic_os=${basic_os:-unicosmp}
979979+ ;;
980980+ c90-unknown | c90-cray)
981981+ vendor=cray
982982+ basic_os=${Basic_os:-unicos}
983983+ ;;
984984+ fx80-unknown)
985985+ vendor=alliant
986986+ ;;
987987+ romp-unknown)
988988+ vendor=ibm
989989+ ;;
990990+ mmix-unknown)
991991+ vendor=knuth
992992+ ;;
993993+ microblaze-unknown | microblazeel-unknown)
994994+ vendor=xilinx
995995+ ;;
996996+ rs6000-unknown)
997997+ vendor=ibm
998998+ ;;
999999+ vax-unknown)
10001000+ vendor=dec
10011001+ ;;
10021002+ pdp11-unknown)
10031003+ vendor=dec
10041004+ ;;
10051005+ we32k-unknown)
10061006+ vendor=att
10071007+ ;;
10081008+ cydra-unknown)
10091009+ vendor=cydrome
10101010+ ;;
10111011+ i370-ibm*)
10121012+ vendor=ibm
10131013+ ;;
10141014+ orion-unknown)
10151015+ vendor=highlevel
10161016+ ;;
10171017+ xps-unknown | xps100-unknown)
10181018+ cpu=xps100
10191019+ vendor=honeywell
10201020+ ;;
10211021+10221022+ # Here we normalize CPU types with a missing or matching vendor
10231023+ armh-unknown | armh-alt)
10241024+ cpu=armv7l
10251025+ vendor=alt
10261026+ basic_os=${basic_os:-linux-gnueabihf}
10271027+ ;;
10281028+ dpx20-unknown | dpx20-bull)
10291029+ cpu=rs6000
10301030+ vendor=bull
10311031+ basic_os=${basic_os:-bosx}
10321032+ ;;
10331033+10341034+ # Here we normalize CPU types irrespective of the vendor
10351035+ amd64-*)
10361036+ cpu=x86_64
10371037+ ;;
10381038+ blackfin-*)
10391039+ cpu=bfin
10401040+ basic_os=linux
10411041+ ;;
10421042+ c54x-*)
10431043+ cpu=tic54x
10441044+ ;;
10451045+ c55x-*)
10461046+ cpu=tic55x
10471047+ ;;
10481048+ c6x-*)
10491049+ cpu=tic6x
10501050+ ;;
10511051+ e500v[12]-*)
10521052+ cpu=powerpc
10531053+ basic_os=${basic_os}"spe"
10541054+ ;;
10551055+ mips3*-*)
10561056+ cpu=mips64
10571057+ ;;
10581058+ ms1-*)
10591059+ cpu=mt
10601060+ ;;
10611061+ m68knommu-*)
10621062+ cpu=m68k
10631063+ basic_os=linux
10641064+ ;;
10651065+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
10661066+ cpu=s12z
10671067+ ;;
10681068+ openrisc-*)
10691069+ cpu=or32
10701070+ ;;
10711071+ parisc-*)
10721072+ cpu=hppa
10731073+ basic_os=linux
10741074+ ;;
10751075+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
10761076+ cpu=i586
10771077+ ;;
10781078+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
10791079+ cpu=i686
10801080+ ;;
10811081+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
10821082+ cpu=i686
10831083+ ;;
10841084+ pentium4-*)
10851085+ cpu=i786
10861086+ ;;
10871087+ pc98-*)
10881088+ cpu=i386
10891089+ ;;
10901090+ ppc-* | ppcbe-*)
10911091+ cpu=powerpc
10921092+ ;;
10931093+ ppcle-* | powerpclittle-*)
10941094+ cpu=powerpcle
10951095+ ;;
10961096+ ppc64-*)
10971097+ cpu=powerpc64
10981098+ ;;
10991099+ ppc64le-* | powerpc64little-*)
11001100+ cpu=powerpc64le
11011101+ ;;
11021102+ sb1-*)
11031103+ cpu=mipsisa64sb1
11041104+ ;;
11051105+ sb1el-*)
11061106+ cpu=mipsisa64sb1el
11071107+ ;;
11081108+ sh5e[lb]-*)
11091109+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
11101110+ ;;
11111111+ spur-*)
11121112+ cpu=spur
11131113+ ;;
11141114+ strongarm-* | thumb-*)
11151115+ cpu=arm
11161116+ ;;
11171117+ tx39-*)
11181118+ cpu=mipstx39
11191119+ ;;
11201120+ tx39el-*)
11211121+ cpu=mipstx39el
11221122+ ;;
11231123+ x64-*)
11241124+ cpu=x86_64
11251125+ ;;
11261126+ xscale-* | xscalee[bl]-*)
11271127+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
11281128+ ;;
11291129+ arm64-* | aarch64le-*)
11301130+ cpu=aarch64
11311131+ ;;
11321132+11331133+ # Recognize the canonical CPU Types that limit and/or modify the
11341134+ # company names they are paired with.
11351135+ cr16-*)
11361136+ basic_os=${basic_os:-elf}
11371137+ ;;
11381138+ crisv32-* | etraxfs*-*)
11391139+ cpu=crisv32
11401140+ vendor=axis
11411141+ ;;
11421142+ cris-* | etrax*-*)
11431143+ cpu=cris
11441144+ vendor=axis
11451145+ ;;
11461146+ crx-*)
11471147+ basic_os=${basic_os:-elf}
11481148+ ;;
11491149+ neo-tandem)
11501150+ cpu=neo
11511151+ vendor=tandem
11521152+ ;;
11531153+ nse-tandem)
11541154+ cpu=nse
11551155+ vendor=tandem
11561156+ ;;
11571157+ nsr-tandem)
11581158+ cpu=nsr
11591159+ vendor=tandem
11601160+ ;;
11611161+ nsv-tandem)
11621162+ cpu=nsv
11631163+ vendor=tandem
11641164+ ;;
11651165+ nsx-tandem)
11661166+ cpu=nsx
11671167+ vendor=tandem
11681168+ ;;
11691169+ mipsallegrexel-sony)
11701170+ cpu=mipsallegrexel
11711171+ vendor=sony
11721172+ ;;
11731173+ tile*-*)
11741174+ basic_os=${basic_os:-linux-gnu}
11751175+ ;;
11761176+11771177+ *)
11781178+ # Recognize the canonical CPU types that are allowed with any
11791179+ # company name.
11801180+ case $cpu in
11811181+ 1750a | 580 \
11821182+ | a29k \
11831183+ | aarch64 | aarch64_be \
11841184+ | abacus \
11851185+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
11861186+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
11871187+ | alphapca5[67] | alpha64pca5[67] \
11881188+ | am33_2.0 \
11891189+ | amdgcn \
11901190+ | arc | arceb | arc32 | arc64 \
11911191+ | arm | arm[lb]e | arme[lb] | armv* \
11921192+ | avr | avr32 \
11931193+ | asmjs \
11941194+ | ba \
11951195+ | be32 | be64 \
11961196+ | bfin | bpf | bs2000 \
11971197+ | c[123]* | c30 | [cjt]90 | c4x \
11981198+ | c8051 | clipper | craynv | csky | cydra \
11991199+ | d10v | d30v | dlx | dsp16xx \
12001200+ | e2k | elxsi | epiphany \
12011201+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
12021202+ | h8300 | h8500 \
12031203+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
12041204+ | hexagon \
12051205+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
12061206+ | ip2k | iq2000 \
12071207+ | k1om \
12081208+ | le32 | le64 \
12091209+ | lm32 \
12101210+ | loongarch32 | loongarch64 | loongarchx32 \
12111211+ | m32c | m32r | m32rle \
12121212+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
12131213+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
12141214+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
12151215+ | microblaze | microblazeel \
12161216+ | mips | mipsbe | mipseb | mipsel | mipsle \
12171217+ | mips16 \
12181218+ | mips64 | mips64eb | mips64el \
12191219+ | mips64octeon | mips64octeonel \
12201220+ | mips64orion | mips64orionel \
12211221+ | mips64r5900 | mips64r5900el \
12221222+ | mips64vr | mips64vrel \
12231223+ | mips64vr4100 | mips64vr4100el \
12241224+ | mips64vr4300 | mips64vr4300el \
12251225+ | mips64vr5000 | mips64vr5000el \
12261226+ | mips64vr5900 | mips64vr5900el \
12271227+ | mipsisa32 | mipsisa32el \
12281228+ | mipsisa32r2 | mipsisa32r2el \
12291229+ | mipsisa32r3 | mipsisa32r3el \
12301230+ | mipsisa32r5 | mipsisa32r5el \
12311231+ | mipsisa32r6 | mipsisa32r6el \
12321232+ | mipsisa64 | mipsisa64el \
12331233+ | mipsisa64r2 | mipsisa64r2el \
12341234+ | mipsisa64r3 | mipsisa64r3el \
12351235+ | mipsisa64r5 | mipsisa64r5el \
12361236+ | mipsisa64r6 | mipsisa64r6el \
12371237+ | mipsisa64sb1 | mipsisa64sb1el \
12381238+ | mipsisa64sr71k | mipsisa64sr71kel \
12391239+ | mipsr5900 | mipsr5900el \
12401240+ | mipstx39 | mipstx39el \
12411241+ | mmix \
12421242+ | mn10200 | mn10300 \
12431243+ | moxie \
12441244+ | mt \
12451245+ | msp430 \
12461246+ | nds32 | nds32le | nds32be \
12471247+ | nfp \
12481248+ | nios | nios2 | nios2eb | nios2el \
12491249+ | none | np1 | ns16k | ns32k | nvptx \
12501250+ | open8 \
12511251+ | or1k* \
12521252+ | or32 \
12531253+ | orion \
12541254+ | picochip \
12551255+ | pdp10 | pdp11 | pj | pjl | pn | power \
12561256+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
12571257+ | pru \
12581258+ | pyramid \
12591259+ | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
12601260+ | rl78 | romp | rs6000 | rx \
12611261+ | s390 | s390x \
12621262+ | score \
12631263+ | sh | shl \
12641264+ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
12651265+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
12661266+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
12671267+ | sparclite \
12681268+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
12691269+ | spu \
12701270+ | tahoe \
12711271+ | thumbv7* \
12721272+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
12731273+ | tron \
12741274+ | ubicom32 \
12751275+ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
12761276+ | vax \
12771277+ | visium \
12781278+ | w65 \
12791279+ | wasm32 | wasm64 \
12801280+ | we32k \
12811281+ | x86 | x86_64 | xc16x | xgate | xps100 \
12821282+ | xstormy16 | xtensa* \
12831283+ | ymp \
12841284+ | z8k | z80)
12851285+ ;;
12861286+12871287+ *)
12881288+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
12891289+ exit 1
12901290+ ;;
12911291+ esac
12921292+ ;;
12931293+esac
12941294+12951295+# Here we canonicalize certain aliases for manufacturers.
12961296+case $vendor in
12971297+ digital*)
12981298+ vendor=dec
12991299+ ;;
13001300+ commodore*)
13011301+ vendor=cbm
13021302+ ;;
13031303+ *)
13041304+ ;;
13051305+esac
13061306+13071307+# Decode manufacturer-specific aliases for certain operating systems.
13081308+13091309+if test x$basic_os != x
13101310+then
13111311+13121312+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
13131313+# set os.
13141314+case $basic_os in
13151315+ gnu/linux*)
13161316+ kernel=linux
13171317+ os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
13181318+ ;;
13191319+ os2-emx)
13201320+ kernel=os2
13211321+ os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
13221322+ ;;
13231323+ nto-qnx*)
13241324+ kernel=nto
13251325+ os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
13261326+ ;;
13271327+ *-*)
13281328+ # shellcheck disable=SC2162
13291329+ saved_IFS=$IFS
13301330+ IFS="-" read kernel os <<EOF
13311331+$basic_os
13321332+EOF
13331333+ IFS=$saved_IFS
13341334+ ;;
13351335+ # Default OS when just kernel was specified
13361336+ nto*)
13371337+ kernel=nto
13381338+ os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
13391339+ ;;
13401340+ linux*)
13411341+ kernel=linux
13421342+ os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
13431343+ ;;
13441344+ *)
13451345+ kernel=
13461346+ os=$basic_os
13471347+ ;;
13481348+esac
13491349+13501350+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
13511351+# etc.)
13521352+case $os in
13531353+ # First match some system type aliases that might get confused
13541354+ # with valid system types.
13551355+ # solaris* is a basic system type, with this one exception.
13561356+ auroraux)
13571357+ os=auroraux
13581358+ ;;
13591359+ bluegene*)
13601360+ os=cnk
13611361+ ;;
13621362+ solaris1 | solaris1.*)
13631363+ os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
13641364+ ;;
13651365+ solaris)
13661366+ os=solaris2
13671367+ ;;
13681368+ unixware*)
13691369+ os=sysv4.2uw
13701370+ ;;
13711371+ # es1800 is here to avoid being matched by es* (a different OS)
13721372+ es1800*)
13731373+ os=ose
13741374+ ;;
13751375+ # Some version numbers need modification
13761376+ chorusos*)
13771377+ os=chorusos
13781378+ ;;
13791379+ isc)
13801380+ os=isc2.2
13811381+ ;;
13821382+ sco6)
13831383+ os=sco5v6
13841384+ ;;
13851385+ sco5)
13861386+ os=sco3.2v5
13871387+ ;;
13881388+ sco4)
13891389+ os=sco3.2v4
13901390+ ;;
13911391+ sco3.2.[4-9]*)
13921392+ os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
13931393+ ;;
13941394+ sco*v* | scout)
13951395+ # Don't match below
13961396+ ;;
13971397+ sco*)
13981398+ os=sco3.2v2
13991399+ ;;
14001400+ psos*)
14011401+ os=psos
14021402+ ;;
14031403+ qnx*)
14041404+ os=qnx
14051405+ ;;
14061406+ hiux*)
14071407+ os=hiuxwe2
14081408+ ;;
14091409+ lynx*178)
14101410+ os=lynxos178
14111411+ ;;
14121412+ lynx*5)
14131413+ os=lynxos5
14141414+ ;;
14151415+ lynxos*)
14161416+ # don't get caught up in next wildcard
14171417+ ;;
14181418+ lynx*)
14191419+ os=lynxos
14201420+ ;;
14211421+ mac[0-9]*)
14221422+ os=`echo "$os" | sed -e 's|mac|macos|'`
14231423+ ;;
14241424+ opened*)
14251425+ os=openedition
14261426+ ;;
14271427+ os400*)
14281428+ os=os400
14291429+ ;;
14301430+ sunos5*)
14311431+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
14321432+ ;;
14331433+ sunos6*)
14341434+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
14351435+ ;;
14361436+ wince*)
14371437+ os=wince
14381438+ ;;
14391439+ utek*)
14401440+ os=bsd
14411441+ ;;
14421442+ dynix*)
14431443+ os=bsd
14441444+ ;;
14451445+ acis*)
14461446+ os=aos
14471447+ ;;
14481448+ atheos*)
14491449+ os=atheos
14501450+ ;;
14511451+ syllable*)
14521452+ os=syllable
14531453+ ;;
14541454+ 386bsd)
14551455+ os=bsd
14561456+ ;;
14571457+ ctix* | uts*)
14581458+ os=sysv
14591459+ ;;
14601460+ nova*)
14611461+ os=rtmk-nova
14621462+ ;;
14631463+ ns2)
14641464+ os=nextstep2
14651465+ ;;
14661466+ # Preserve the version number of sinix5.
14671467+ sinix5.*)
14681468+ os=`echo "$os" | sed -e 's|sinix|sysv|'`
14691469+ ;;
14701470+ sinix*)
14711471+ os=sysv4
14721472+ ;;
14731473+ tpf*)
14741474+ os=tpf
14751475+ ;;
14761476+ triton*)
14771477+ os=sysv3
14781478+ ;;
14791479+ oss*)
14801480+ os=sysv3
14811481+ ;;
14821482+ svr4*)
14831483+ os=sysv4
14841484+ ;;
14851485+ svr3)
14861486+ os=sysv3
14871487+ ;;
14881488+ sysvr4)
14891489+ os=sysv4
14901490+ ;;
14911491+ ose*)
14921492+ os=ose
14931493+ ;;
14941494+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
14951495+ os=mint
14961496+ ;;
14971497+ dicos*)
14981498+ os=dicos
14991499+ ;;
15001500+ pikeos*)
15011501+ # Until real need of OS specific support for
15021502+ # particular features comes up, bare metal
15031503+ # configurations are quite functional.
15041504+ case $cpu in
15051505+ arm*)
15061506+ os=eabi
15071507+ ;;
15081508+ *)
15091509+ os=elf
15101510+ ;;
15111511+ esac
15121512+ ;;
15131513+ *)
15141514+ # No normalization, but not necessarily accepted, that comes below.
15151515+ ;;
15161516+esac
15171517+15181518+else
15191519+15201520+# Here we handle the default operating systems that come with various machines.
15211521+# The value should be what the vendor currently ships out the door with their
15221522+# machine or put another way, the most popular os provided with the machine.
15231523+15241524+# Note that if you're going to try to match "-MANUFACTURER" here (say,
15251525+# "-sun"), then you have to tell the case statement up towards the top
15261526+# that MANUFACTURER isn't an operating system. Otherwise, code above
15271527+# will signal an error saying that MANUFACTURER isn't an operating
15281528+# system, and we'll never get to this point.
15291529+15301530+kernel=
15311531+case $cpu-$vendor in
15321532+ score-*)
15331533+ os=elf
15341534+ ;;
15351535+ spu-*)
15361536+ os=elf
15371537+ ;;
15381538+ *-acorn)
15391539+ os=riscix1.2
15401540+ ;;
15411541+ arm*-rebel)
15421542+ kernel=linux
15431543+ os=gnu
15441544+ ;;
15451545+ arm*-semi)
15461546+ os=aout
15471547+ ;;
15481548+ c4x-* | tic4x-*)
15491549+ os=coff
15501550+ ;;
15511551+ c8051-*)
15521552+ os=elf
15531553+ ;;
15541554+ clipper-intergraph)
15551555+ os=clix
15561556+ ;;
15571557+ hexagon-*)
15581558+ os=elf
15591559+ ;;
15601560+ tic54x-*)
15611561+ os=coff
15621562+ ;;
15631563+ tic55x-*)
15641564+ os=coff
15651565+ ;;
15661566+ tic6x-*)
15671567+ os=coff
15681568+ ;;
15691569+ # This must come before the *-dec entry.
15701570+ pdp10-*)
15711571+ os=tops20
15721572+ ;;
15731573+ pdp11-*)
15741574+ os=none
15751575+ ;;
15761576+ *-dec | vax-*)
15771577+ os=ultrix4.2
15781578+ ;;
15791579+ m68*-apollo)
15801580+ os=domain
15811581+ ;;
15821582+ i386-sun)
15831583+ os=sunos4.0.2
15841584+ ;;
15851585+ m68000-sun)
15861586+ os=sunos3
15871587+ ;;
15881588+ m68*-cisco)
15891589+ os=aout
15901590+ ;;
15911591+ mep-*)
15921592+ os=elf
15931593+ ;;
15941594+ mips*-cisco)
15951595+ os=elf
15961596+ ;;
15971597+ mips*-*)
15981598+ os=elf
15991599+ ;;
16001600+ or32-*)
16011601+ os=coff
16021602+ ;;
16031603+ *-tti) # must be before sparc entry or we get the wrong os.
16041604+ os=sysv3
16051605+ ;;
16061606+ sparc-* | *-sun)
16071607+ os=sunos4.1.1
16081608+ ;;
16091609+ pru-*)
16101610+ os=elf
16111611+ ;;
16121612+ *-be)
16131613+ os=beos
16141614+ ;;
16151615+ *-ibm)
16161616+ os=aix
16171617+ ;;
16181618+ *-knuth)
16191619+ os=mmixware
16201620+ ;;
16211621+ *-wec)
16221622+ os=proelf
16231623+ ;;
16241624+ *-winbond)
16251625+ os=proelf
16261626+ ;;
16271627+ *-oki)
16281628+ os=proelf
16291629+ ;;
16301630+ *-hp)
16311631+ os=hpux
16321632+ ;;
16331633+ *-hitachi)
16341634+ os=hiux
16351635+ ;;
16361636+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
16371637+ os=sysv
16381638+ ;;
16391639+ *-cbm)
16401640+ os=amigaos
16411641+ ;;
16421642+ *-dg)
16431643+ os=dgux
16441644+ ;;
16451645+ *-dolphin)
16461646+ os=sysv3
16471647+ ;;
16481648+ m68k-ccur)
16491649+ os=rtu
16501650+ ;;
16511651+ m88k-omron*)
16521652+ os=luna
16531653+ ;;
16541654+ *-next)
16551655+ os=nextstep
16561656+ ;;
16571657+ *-sequent)
16581658+ os=ptx
16591659+ ;;
16601660+ *-crds)
16611661+ os=unos
16621662+ ;;
16631663+ *-ns)
16641664+ os=genix
16651665+ ;;
16661666+ i370-*)
16671667+ os=mvs
16681668+ ;;
16691669+ *-gould)
16701670+ os=sysv
16711671+ ;;
16721672+ *-highlevel)
16731673+ os=bsd
16741674+ ;;
16751675+ *-encore)
16761676+ os=bsd
16771677+ ;;
16781678+ *-sgi)
16791679+ os=irix
16801680+ ;;
16811681+ *-siemens)
16821682+ os=sysv4
16831683+ ;;
16841684+ *-masscomp)
16851685+ os=rtu
16861686+ ;;
16871687+ f30[01]-fujitsu | f700-fujitsu)
16881688+ os=uxpv
16891689+ ;;
16901690+ *-rom68k)
16911691+ os=coff
16921692+ ;;
16931693+ *-*bug)
16941694+ os=coff
16951695+ ;;
16961696+ *-apple)
16971697+ os=macos
16981698+ ;;
16991699+ *-atari*)
17001700+ os=mint
17011701+ ;;
17021702+ *-wrs)
17031703+ os=vxworks
17041704+ ;;
17051705+ *)
17061706+ os=none
17071707+ ;;
17081708+esac
17091709+17101710+fi
17111711+17121712+# Now, validate our (potentially fixed-up) OS.
17131713+case $os in
17141714+ # Sometimes we do "kernel-libc", so those need to count as OSes.
17151715+ musl* | newlib* | relibc* | uclibc*)
17161716+ ;;
17171717+ # Likewise for "kernel-abi"
17181718+ eabi* | gnueabi*)
17191719+ ;;
17201720+ # VxWorks passes extra cpu info in the 4th filed.
17211721+ simlinux | simwindows | spe)
17221722+ ;;
17231723+ # Now accept the basic system types.
17241724+ # The portable systems comes first.
17251725+ # Each alternative MUST end in a * to match a version number.
17261726+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
17271727+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
17281728+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
17291729+ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
17301730+ | hiux* | abug | nacl* | netware* | windows* \
17311731+ | os9* | macos* | osx* | ios* \
17321732+ | mpw* | magic* | mmixware* | mon960* | lnews* \
17331733+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
17341734+ | aos* | aros* | cloudabi* | sortix* | twizzler* \
17351735+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
17361736+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
17371737+ | mirbsd* | netbsd* | dicos* | openedition* | ose* \
17381738+ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
17391739+ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
17401740+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
17411741+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
17421742+ | udi* | lites* | ieee* | go32* | aux* | hcos* \
17431743+ | chorusrdb* | cegcc* | glidix* | serenity* \
17441744+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
17451745+ | midipix* | mingw32* | mingw64* | mint* \
17461746+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
17471747+ | interix* | uwin* | mks* | rhapsody* | darwin* \
17481748+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
17491749+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
17501750+ | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
17511751+ | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
17521752+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
17531753+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
17541754+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
17551755+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
17561756+ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
17571757+ | fiwix* )
17581758+ ;;
17591759+ # This one is extra strict with allowed versions
17601760+ sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
17611761+ # Don't forget version if it is 3.2v4 or newer.
17621762+ ;;
17631763+ none)
17641764+ ;;
17651765+ *)
17661766+ echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
17671767+ exit 1
17681768+ ;;
17691769+esac
17701770+17711771+# As a final step for OS-related things, validate the OS-kernel combination
17721772+# (given a valid OS), if there is a kernel.
17731773+case $kernel-$os in
17741774+ linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
17751775+ | linux-musl* | linux-relibc* | linux-uclibc* )
17761776+ ;;
17771777+ uclinux-uclibc* )
17781778+ ;;
17791779+ -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
17801780+ # These are just libc implementations, not actual OSes, and thus
17811781+ # require a kernel.
17821782+ echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
17831783+ exit 1
17841784+ ;;
17851785+ kfreebsd*-gnu* | kopensolaris*-gnu*)
17861786+ ;;
17871787+ vxworks-simlinux | vxworks-simwindows | vxworks-spe)
17881788+ ;;
17891789+ nto-qnx*)
17901790+ ;;
17911791+ os2-emx)
17921792+ ;;
17931793+ *-eabi* | *-gnueabi*)
17941794+ ;;
17951795+ -*)
17961796+ # Blank kernel with real OS is always fine.
17971797+ ;;
17981798+ *-*)
17991799+ echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
18001800+ exit 1
18011801+ ;;
18021802+esac
18031803+18041804+# Here we handle the case where we know the os, and the CPU type, but not the
18051805+# manufacturer. We pick the logical manufacturer.
18061806+case $vendor in
18071807+ unknown)
18081808+ case $cpu-$os in
18091809+ *-riscix*)
18101810+ vendor=acorn
18111811+ ;;
18121812+ *-sunos*)
18131813+ vendor=sun
18141814+ ;;
18151815+ *-cnk* | *-aix*)
18161816+ vendor=ibm
18171817+ ;;
18181818+ *-beos*)
18191819+ vendor=be
18201820+ ;;
18211821+ *-hpux*)
18221822+ vendor=hp
18231823+ ;;
18241824+ *-mpeix*)
18251825+ vendor=hp
18261826+ ;;
18271827+ *-hiux*)
18281828+ vendor=hitachi
18291829+ ;;
18301830+ *-unos*)
18311831+ vendor=crds
18321832+ ;;
18331833+ *-dgux*)
18341834+ vendor=dg
18351835+ ;;
18361836+ *-luna*)
18371837+ vendor=omron
18381838+ ;;
18391839+ *-genix*)
18401840+ vendor=ns
18411841+ ;;
18421842+ *-clix*)
18431843+ vendor=intergraph
18441844+ ;;
18451845+ *-mvs* | *-opened*)
18461846+ vendor=ibm
18471847+ ;;
18481848+ *-os400*)
18491849+ vendor=ibm
18501850+ ;;
18511851+ s390-* | s390x-*)
18521852+ vendor=ibm
18531853+ ;;
18541854+ *-ptx*)
18551855+ vendor=sequent
18561856+ ;;
18571857+ *-tpf*)
18581858+ vendor=ibm
18591859+ ;;
18601860+ *-vxsim* | *-vxworks* | *-windiss*)
18611861+ vendor=wrs
18621862+ ;;
18631863+ *-aux*)
18641864+ vendor=apple
18651865+ ;;
18661866+ *-hms*)
18671867+ vendor=hitachi
18681868+ ;;
18691869+ *-mpw* | *-macos*)
18701870+ vendor=apple
18711871+ ;;
18721872+ *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
18731873+ vendor=atari
18741874+ ;;
18751875+ *-vos*)
18761876+ vendor=stratus
18771877+ ;;
18781878+ esac
18791879+ ;;
18801880+esac
18811881+18821882+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
18831883+exit
18841884+18851885+# Local variables:
18861886+# eval: (add-hook 'before-save-hook 'time-stamp)
18871887+# time-stamp-start: "timestamp='"
18881888+# time-stamp-format: "%:y-%02m-%02d"
18891889+# time-stamp-end: "'"
18901890+# End:
+5370
usr.sbin/nsd/simdzone/configure
···11+#! /bin/sh
22+# Guess values for system-dependent variables and create Makefiles.
33+# Generated by GNU Autoconf 2.71 for simdzone 0.2.0.
44+#
55+# Report bugs to <https://github.com/NLnetLabs/simdzone/issues>.
66+#
77+#
88+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
99+# Inc.
1010+#
1111+#
1212+# This configure script is free software; the Free Software Foundation
1313+# gives unlimited permission to copy, distribute and modify it.
1414+## -------------------- ##
1515+## M4sh Initialization. ##
1616+## -------------------- ##
1717+1818+# Be more Bourne compatible
1919+DUALCASE=1; export DUALCASE # for MKS sh
2020+as_nop=:
2121+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
2222+then :
2323+ emulate sh
2424+ NULLCMD=:
2525+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
2626+ # is contrary to our usage. Disable this feature.
2727+ alias -g '${1+"$@"}'='"$@"'
2828+ setopt NO_GLOB_SUBST
2929+else $as_nop
3030+ case `(set -o) 2>/dev/null` in #(
3131+ *posix*) :
3232+ set -o posix ;; #(
3333+ *) :
3434+ ;;
3535+esac
3636+fi
3737+3838+3939+4040+# Reset variables that may have inherited troublesome values from
4141+# the environment.
4242+4343+# IFS needs to be set, to space, tab, and newline, in precisely that order.
4444+# (If _AS_PATH_WALK were called with IFS unset, it would have the
4545+# side effect of setting IFS to empty, thus disabling word splitting.)
4646+# Quoting is to prevent editors from complaining about space-tab.
4747+as_nl='
4848+'
4949+export as_nl
5050+IFS=" "" $as_nl"
5151+5252+PS1='$ '
5353+PS2='> '
5454+PS4='+ '
5555+5656+# Ensure predictable behavior from utilities with locale-dependent output.
5757+LC_ALL=C
5858+export LC_ALL
5959+LANGUAGE=C
6060+export LANGUAGE
6161+6262+# We cannot yet rely on "unset" to work, but we need these variables
6363+# to be unset--not just set to an empty or harmless value--now, to
6464+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
6565+# also avoids known problems related to "unset" and subshell syntax
6666+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
6767+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
6868+do eval test \${$as_var+y} \
6969+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
7070+done
7171+7272+# Ensure that fds 0, 1, and 2 are open.
7373+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
7474+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
7575+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
7676+7777+# The user is always right.
7878+if ${PATH_SEPARATOR+false} :; then
7979+ PATH_SEPARATOR=:
8080+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8181+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8282+ PATH_SEPARATOR=';'
8383+ }
8484+fi
8585+8686+8787+# Find who we are. Look in the path if we contain no directory separator.
8888+as_myself=
8989+case $0 in #((
9090+ *[\\/]* ) as_myself=$0 ;;
9191+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9292+for as_dir in $PATH
9393+do
9494+ IFS=$as_save_IFS
9595+ case $as_dir in #(((
9696+ '') as_dir=./ ;;
9797+ */) ;;
9898+ *) as_dir=$as_dir/ ;;
9999+ esac
100100+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
101101+ done
102102+IFS=$as_save_IFS
103103+104104+ ;;
105105+esac
106106+# We did not find ourselves, most probably we were run as `sh COMMAND'
107107+# in which case we are not to be found in the path.
108108+if test "x$as_myself" = x; then
109109+ as_myself=$0
110110+fi
111111+if test ! -f "$as_myself"; then
112112+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113113+ exit 1
114114+fi
115115+116116+117117+# Use a proper internal environment variable to ensure we don't fall
118118+ # into an infinite loop, continuously re-executing ourselves.
119119+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
120120+ _as_can_reexec=no; export _as_can_reexec;
121121+ # We cannot yet assume a decent shell, so we have to provide a
122122+# neutralization value for shells without unset; and this also
123123+# works around shells that cannot unset nonexistent variables.
124124+# Preserve -v and -x to the replacement shell.
125125+BASH_ENV=/dev/null
126126+ENV=/dev/null
127127+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
128128+case $- in # ((((
129129+ *v*x* | *x*v* ) as_opts=-vx ;;
130130+ *v* ) as_opts=-v ;;
131131+ *x* ) as_opts=-x ;;
132132+ * ) as_opts= ;;
133133+esac
134134+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
135135+# Admittedly, this is quite paranoid, since all the known shells bail
136136+# out after a failed `exec'.
137137+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
138138+exit 255
139139+ fi
140140+ # We don't want this to propagate to other subprocesses.
141141+ { _as_can_reexec=; unset _as_can_reexec;}
142142+if test "x$CONFIG_SHELL" = x; then
143143+ as_bourne_compatible="as_nop=:
144144+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145145+then :
146146+ emulate sh
147147+ NULLCMD=:
148148+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149149+ # is contrary to our usage. Disable this feature.
150150+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
151151+ setopt NO_GLOB_SUBST
152152+else \$as_nop
153153+ case \`(set -o) 2>/dev/null\` in #(
154154+ *posix*) :
155155+ set -o posix ;; #(
156156+ *) :
157157+ ;;
158158+esac
159159+fi
160160+"
161161+ as_required="as_fn_return () { (exit \$1); }
162162+as_fn_success () { as_fn_return 0; }
163163+as_fn_failure () { as_fn_return 1; }
164164+as_fn_ret_success () { return 0; }
165165+as_fn_ret_failure () { return 1; }
166166+167167+exitcode=0
168168+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
169169+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170170+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171171+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
172172+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173173+then :
174174+175175+else \$as_nop
176176+ exitcode=1; echo positional parameters were not saved.
177177+fi
178178+test x\$exitcode = x0 || exit 1
179179+blah=\$(echo \$(echo blah))
180180+test x\"\$blah\" = xblah || exit 1
181181+test -x / || exit 1"
182182+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183183+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184184+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185185+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
186186+ if (eval "$as_required") 2>/dev/null
187187+then :
188188+ as_have_required=yes
189189+else $as_nop
190190+ as_have_required=no
191191+fi
192192+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
193193+then :
194194+195195+else $as_nop
196196+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
197197+as_found=false
198198+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
199199+do
200200+ IFS=$as_save_IFS
201201+ case $as_dir in #(((
202202+ '') as_dir=./ ;;
203203+ */) ;;
204204+ *) as_dir=$as_dir/ ;;
205205+ esac
206206+ as_found=:
207207+ case $as_dir in #(
208208+ /*)
209209+ for as_base in sh bash ksh sh5; do
210210+ # Try only shells that exist, to save several forks.
211211+ as_shell=$as_dir$as_base
212212+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
213213+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
214214+then :
215215+ CONFIG_SHELL=$as_shell as_have_required=yes
216216+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
217217+then :
218218+ break 2
219219+fi
220220+fi
221221+ done;;
222222+ esac
223223+ as_found=false
224224+done
225225+IFS=$as_save_IFS
226226+if $as_found
227227+then :
228228+229229+else $as_nop
230230+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
231231+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
232232+then :
233233+ CONFIG_SHELL=$SHELL as_have_required=yes
234234+fi
235235+fi
236236+237237+238238+ if test "x$CONFIG_SHELL" != x
239239+then :
240240+ export CONFIG_SHELL
241241+ # We cannot yet assume a decent shell, so we have to provide a
242242+# neutralization value for shells without unset; and this also
243243+# works around shells that cannot unset nonexistent variables.
244244+# Preserve -v and -x to the replacement shell.
245245+BASH_ENV=/dev/null
246246+ENV=/dev/null
247247+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
248248+case $- in # ((((
249249+ *v*x* | *x*v* ) as_opts=-vx ;;
250250+ *v* ) as_opts=-v ;;
251251+ *x* ) as_opts=-x ;;
252252+ * ) as_opts= ;;
253253+esac
254254+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
255255+# Admittedly, this is quite paranoid, since all the known shells bail
256256+# out after a failed `exec'.
257257+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
258258+exit 255
259259+fi
260260+261261+ if test x$as_have_required = xno
262262+then :
263263+ printf "%s\n" "$0: This script requires a shell more modern than all"
264264+ printf "%s\n" "$0: the shells that I found on your system."
265265+ if test ${ZSH_VERSION+y} ; then
266266+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267267+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
268268+ else
269269+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
270270+$0: https://github.com/NLnetLabs/simdzone/issues about your
271271+$0: system, including any error possibly output before this
272272+$0: message. Then install a modern shell, or manually run
273273+$0: the script under such a shell if you do have one."
274274+ fi
275275+ exit 1
276276+fi
277277+fi
278278+fi
279279+SHELL=${CONFIG_SHELL-/bin/sh}
280280+export SHELL
281281+# Unset more variables known to interfere with behavior of common tools.
282282+CLICOLOR_FORCE= GREP_OPTIONS=
283283+unset CLICOLOR_FORCE GREP_OPTIONS
284284+285285+## --------------------- ##
286286+## M4sh Shell Functions. ##
287287+## --------------------- ##
288288+# as_fn_unset VAR
289289+# ---------------
290290+# Portably unset VAR.
291291+as_fn_unset ()
292292+{
293293+ { eval $1=; unset $1;}
294294+}
295295+as_unset=as_fn_unset
296296+297297+298298+# as_fn_set_status STATUS
299299+# -----------------------
300300+# Set $? to STATUS, without forking.
301301+as_fn_set_status ()
302302+{
303303+ return $1
304304+} # as_fn_set_status
305305+306306+# as_fn_exit STATUS
307307+# -----------------
308308+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309309+as_fn_exit ()
310310+{
311311+ set +e
312312+ as_fn_set_status $1
313313+ exit $1
314314+} # as_fn_exit
315315+# as_fn_nop
316316+# ---------
317317+# Do nothing but, unlike ":", preserve the value of $?.
318318+as_fn_nop ()
319319+{
320320+ return $?
321321+}
322322+as_nop=as_fn_nop
323323+324324+# as_fn_mkdir_p
325325+# -------------
326326+# Create "$as_dir" as a directory, including parents if necessary.
327327+as_fn_mkdir_p ()
328328+{
329329+330330+ case $as_dir in #(
331331+ -*) as_dir=./$as_dir;;
332332+ esac
333333+ test -d "$as_dir" || eval $as_mkdir_p || {
334334+ as_dirs=
335335+ while :; do
336336+ case $as_dir in #(
337337+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
338338+ *) as_qdir=$as_dir;;
339339+ esac
340340+ as_dirs="'$as_qdir' $as_dirs"
341341+ as_dir=`$as_dirname -- "$as_dir" ||
342342+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
343343+ X"$as_dir" : 'X\(//\)[^/]' \| \
344344+ X"$as_dir" : 'X\(//\)$' \| \
345345+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
346346+printf "%s\n" X"$as_dir" |
347347+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
348348+ s//\1/
349349+ q
350350+ }
351351+ /^X\(\/\/\)[^/].*/{
352352+ s//\1/
353353+ q
354354+ }
355355+ /^X\(\/\/\)$/{
356356+ s//\1/
357357+ q
358358+ }
359359+ /^X\(\/\).*/{
360360+ s//\1/
361361+ q
362362+ }
363363+ s/.*/./; q'`
364364+ test -d "$as_dir" && break
365365+ done
366366+ test -z "$as_dirs" || eval "mkdir $as_dirs"
367367+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
368368+369369+370370+} # as_fn_mkdir_p
371371+372372+# as_fn_executable_p FILE
373373+# -----------------------
374374+# Test if FILE is an executable regular file.
375375+as_fn_executable_p ()
376376+{
377377+ test -f "$1" && test -x "$1"
378378+} # as_fn_executable_p
379379+# as_fn_append VAR VALUE
380380+# ----------------------
381381+# Append the text in VALUE to the end of the definition contained in VAR. Take
382382+# advantage of any shell optimizations that allow amortized linear growth over
383383+# repeated appends, instead of the typical quadratic growth present in naive
384384+# implementations.
385385+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
386386+then :
387387+ eval 'as_fn_append ()
388388+ {
389389+ eval $1+=\$2
390390+ }'
391391+else $as_nop
392392+ as_fn_append ()
393393+ {
394394+ eval $1=\$$1\$2
395395+ }
396396+fi # as_fn_append
397397+398398+# as_fn_arith ARG...
399399+# ------------------
400400+# Perform arithmetic evaluation on the ARGs, and store the result in the
401401+# global $as_val. Take advantage of shells that can avoid forks. The arguments
402402+# must be portable across $(()) and expr.
403403+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
404404+then :
405405+ eval 'as_fn_arith ()
406406+ {
407407+ as_val=$(( $* ))
408408+ }'
409409+else $as_nop
410410+ as_fn_arith ()
411411+ {
412412+ as_val=`expr "$@" || test $? -eq 1`
413413+ }
414414+fi # as_fn_arith
415415+416416+# as_fn_nop
417417+# ---------
418418+# Do nothing but, unlike ":", preserve the value of $?.
419419+as_fn_nop ()
420420+{
421421+ return $?
422422+}
423423+as_nop=as_fn_nop
424424+425425+# as_fn_error STATUS ERROR [LINENO LOG_FD]
426426+# ----------------------------------------
427427+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
428428+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
429429+# script with STATUS, using 1 if that was 0.
430430+as_fn_error ()
431431+{
432432+ as_status=$1; test $as_status -eq 0 && as_status=1
433433+ if test "$4"; then
434434+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
435435+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
436436+ fi
437437+ printf "%s\n" "$as_me: error: $2" >&2
438438+ as_fn_exit $as_status
439439+} # as_fn_error
440440+441441+if expr a : '\(a\)' >/dev/null 2>&1 &&
442442+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
443443+ as_expr=expr
444444+else
445445+ as_expr=false
446446+fi
447447+448448+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
449449+ as_basename=basename
450450+else
451451+ as_basename=false
452452+fi
453453+454454+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
455455+ as_dirname=dirname
456456+else
457457+ as_dirname=false
458458+fi
459459+460460+as_me=`$as_basename -- "$0" ||
461461+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
462462+ X"$0" : 'X\(//\)$' \| \
463463+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
464464+printf "%s\n" X/"$0" |
465465+ sed '/^.*\/\([^/][^/]*\)\/*$/{
466466+ s//\1/
467467+ q
468468+ }
469469+ /^X\/\(\/\/\)$/{
470470+ s//\1/
471471+ q
472472+ }
473473+ /^X\/\(\/\).*/{
474474+ s//\1/
475475+ q
476476+ }
477477+ s/.*/./; q'`
478478+479479+# Avoid depending upon Character Ranges.
480480+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
481481+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
482482+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
483483+as_cr_digits='0123456789'
484484+as_cr_alnum=$as_cr_Letters$as_cr_digits
485485+486486+487487+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
488488+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
489489+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
490490+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
491491+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
492492+ sed -n '
493493+ p
494494+ /[$]LINENO/=
495495+ ' <$as_myself |
496496+ sed '
497497+ s/[$]LINENO.*/&-/
498498+ t lineno
499499+ b
500500+ :lineno
501501+ N
502502+ :loop
503503+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
504504+ t loop
505505+ s/-\n.*//
506506+ ' >$as_me.lineno &&
507507+ chmod +x "$as_me.lineno" ||
508508+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
509509+510510+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
511511+ # already done that, so ensure we don't try to do so again and fall
512512+ # in an infinite loop. This has already happened in practice.
513513+ _as_can_reexec=no; export _as_can_reexec
514514+ # Don't try to exec as it changes $[0], causing all sort of problems
515515+ # (the dirname of $[0] is not the place where we might find the
516516+ # original and so on. Autoconf is especially sensitive to this).
517517+ . "./$as_me.lineno"
518518+ # Exit status is that of the last command.
519519+ exit
520520+}
521521+522522+523523+# Determine whether it's possible to make 'echo' print without a newline.
524524+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
525525+# for compatibility with existing Makefiles.
526526+ECHO_C= ECHO_N= ECHO_T=
527527+case `echo -n x` in #(((((
528528+-n*)
529529+ case `echo 'xy\c'` in
530530+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
531531+ xy) ECHO_C='\c';;
532532+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
533533+ ECHO_T=' ';;
534534+ esac;;
535535+*)
536536+ ECHO_N='-n';;
537537+esac
538538+539539+# For backward compatibility with old third-party macros, we provide
540540+# the shell variables $as_echo and $as_echo_n. New code should use
541541+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
542542+as_echo='printf %s\n'
543543+as_echo_n='printf %s'
544544+545545+546546+rm -f conf$$ conf$$.exe conf$$.file
547547+if test -d conf$$.dir; then
548548+ rm -f conf$$.dir/conf$$.file
549549+else
550550+ rm -f conf$$.dir
551551+ mkdir conf$$.dir 2>/dev/null
552552+fi
553553+if (echo >conf$$.file) 2>/dev/null; then
554554+ if ln -s conf$$.file conf$$ 2>/dev/null; then
555555+ as_ln_s='ln -s'
556556+ # ... but there are two gotchas:
557557+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
558558+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
559559+ # In both cases, we have to default to `cp -pR'.
560560+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
561561+ as_ln_s='cp -pR'
562562+ elif ln conf$$.file conf$$ 2>/dev/null; then
563563+ as_ln_s=ln
564564+ else
565565+ as_ln_s='cp -pR'
566566+ fi
567567+else
568568+ as_ln_s='cp -pR'
569569+fi
570570+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
571571+rmdir conf$$.dir 2>/dev/null
572572+573573+if mkdir -p . 2>/dev/null; then
574574+ as_mkdir_p='mkdir -p "$as_dir"'
575575+else
576576+ test -d ./-p && rmdir ./-p
577577+ as_mkdir_p=false
578578+fi
579579+580580+as_test_x='test -x'
581581+as_executable_p=as_fn_executable_p
582582+583583+# Sed expression to map a string onto a valid CPP name.
584584+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
585585+586586+# Sed expression to map a string onto a valid variable name.
587587+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
588588+589589+590590+test -n "$DJDIR" || exec 7<&0 </dev/null
591591+exec 6>&1
592592+593593+# Name of the host.
594594+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
595595+# so uname gets run too.
596596+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
597597+598598+#
599599+# Initializations.
600600+#
601601+ac_default_prefix=/usr/local
602602+ac_clean_files=
603603+ac_config_libobj_dir=.
604604+LIBOBJS=
605605+cross_compiling=no
606606+subdirs=
607607+MFLAGS=
608608+MAKEFLAGS=
609609+610610+# Identity of this package.
611611+PACKAGE_NAME='simdzone'
612612+PACKAGE_TARNAME='simdzone'
613613+PACKAGE_VERSION='0.2.0'
614614+PACKAGE_STRING='simdzone 0.2.0'
615615+PACKAGE_BUGREPORT='https://github.com/NLnetLabs/simdzone/issues'
616616+PACKAGE_URL=''
617617+618618+# Factoring default headers for most tests.
619619+ac_includes_default="\
620620+#include <stddef.h>
621621+#ifdef HAVE_STDIO_H
622622+# include <stdio.h>
623623+#endif
624624+#ifdef HAVE_STDLIB_H
625625+# include <stdlib.h>
626626+#endif
627627+#ifdef HAVE_STRING_H
628628+# include <string.h>
629629+#endif
630630+#ifdef HAVE_INTTYPES_H
631631+# include <inttypes.h>
632632+#endif
633633+#ifdef HAVE_STDINT_H
634634+# include <stdint.h>
635635+#endif
636636+#ifdef HAVE_STRINGS_H
637637+# include <strings.h>
638638+#endif
639639+#ifdef HAVE_SYS_TYPES_H
640640+# include <sys/types.h>
641641+#endif
642642+#ifdef HAVE_SYS_STAT_H
643643+# include <sys/stat.h>
644644+#endif
645645+#ifdef HAVE_UNISTD_H
646646+# include <unistd.h>
647647+#endif"
648648+649649+ac_header_c_list=
650650+ac_subst_vars='LTLIBOBJS
651651+LIBOBJS
652652+HAVE_HASWELL
653653+HAVE_WESTMERE
654654+HAVE_ENDIAN_H
655655+target_os
656656+target_vendor
657657+target_cpu
658658+target
659659+host_os
660660+host_vendor
661661+host_cpu
662662+host
663663+build_os
664664+build_vendor
665665+build_cpu
666666+build
667667+DEPFLAGS
668668+OBJEXT
669669+EXEEXT
670670+ac_ct_CC
671671+CPPFLAGS
672672+LDFLAGS
673673+CFLAGS
674674+CC
675675+target_alias
676676+host_alias
677677+build_alias
678678+LIBS
679679+ECHO_T
680680+ECHO_N
681681+ECHO_C
682682+DEFS
683683+mandir
684684+localedir
685685+libdir
686686+psdir
687687+pdfdir
688688+dvidir
689689+htmldir
690690+infodir
691691+docdir
692692+oldincludedir
693693+includedir
694694+runstatedir
695695+localstatedir
696696+sharedstatedir
697697+sysconfdir
698698+datadir
699699+datarootdir
700700+libexecdir
701701+sbindir
702702+bindir
703703+program_transform_name
704704+prefix
705705+exec_prefix
706706+PACKAGE_URL
707707+PACKAGE_BUGREPORT
708708+PACKAGE_STRING
709709+PACKAGE_VERSION
710710+PACKAGE_TARNAME
711711+PACKAGE_NAME
712712+PATH_SEPARATOR
713713+SHELL'
714714+ac_subst_files=''
715715+ac_user_opts='
716716+enable_option_checking
717717+enable_westmere
718718+enable_haswell
719719+'
720720+ ac_precious_vars='build_alias
721721+host_alias
722722+target_alias
723723+CC
724724+CFLAGS
725725+LDFLAGS
726726+LIBS
727727+CPPFLAGS'
728728+729729+730730+# Initialize some variables set by options.
731731+ac_init_help=
732732+ac_init_version=false
733733+ac_unrecognized_opts=
734734+ac_unrecognized_sep=
735735+# The variables have the same names as the options, with
736736+# dashes changed to underlines.
737737+cache_file=/dev/null
738738+exec_prefix=NONE
739739+no_create=
740740+no_recursion=
741741+prefix=NONE
742742+program_prefix=NONE
743743+program_suffix=NONE
744744+program_transform_name=s,x,x,
745745+silent=
746746+site=
747747+srcdir=
748748+verbose=
749749+x_includes=NONE
750750+x_libraries=NONE
751751+752752+# Installation directory options.
753753+# These are left unexpanded so users can "make install exec_prefix=/foo"
754754+# and all the variables that are supposed to be based on exec_prefix
755755+# by default will actually change.
756756+# Use braces instead of parens because sh, perl, etc. also accept them.
757757+# (The list follows the same order as the GNU Coding Standards.)
758758+bindir='${exec_prefix}/bin'
759759+sbindir='${exec_prefix}/sbin'
760760+libexecdir='${exec_prefix}/libexec'
761761+datarootdir='${prefix}/share'
762762+datadir='${datarootdir}'
763763+sysconfdir='${prefix}/etc'
764764+sharedstatedir='${prefix}/com'
765765+localstatedir='${prefix}/var'
766766+runstatedir='${localstatedir}/run'
767767+includedir='${prefix}/include'
768768+oldincludedir='/usr/include'
769769+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
770770+infodir='${datarootdir}/info'
771771+htmldir='${docdir}'
772772+dvidir='${docdir}'
773773+pdfdir='${docdir}'
774774+psdir='${docdir}'
775775+libdir='${exec_prefix}/lib'
776776+localedir='${datarootdir}/locale'
777777+mandir='${datarootdir}/man'
778778+779779+ac_prev=
780780+ac_dashdash=
781781+for ac_option
782782+do
783783+ # If the previous option needs an argument, assign it.
784784+ if test -n "$ac_prev"; then
785785+ eval $ac_prev=\$ac_option
786786+ ac_prev=
787787+ continue
788788+ fi
789789+790790+ case $ac_option in
791791+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
792792+ *=) ac_optarg= ;;
793793+ *) ac_optarg=yes ;;
794794+ esac
795795+796796+ case $ac_dashdash$ac_option in
797797+ --)
798798+ ac_dashdash=yes ;;
799799+800800+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
801801+ ac_prev=bindir ;;
802802+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
803803+ bindir=$ac_optarg ;;
804804+805805+ -build | --build | --buil | --bui | --bu)
806806+ ac_prev=build_alias ;;
807807+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
808808+ build_alias=$ac_optarg ;;
809809+810810+ -cache-file | --cache-file | --cache-fil | --cache-fi \
811811+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
812812+ ac_prev=cache_file ;;
813813+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
814814+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
815815+ cache_file=$ac_optarg ;;
816816+817817+ --config-cache | -C)
818818+ cache_file=config.cache ;;
819819+820820+ -datadir | --datadir | --datadi | --datad)
821821+ ac_prev=datadir ;;
822822+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
823823+ datadir=$ac_optarg ;;
824824+825825+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
826826+ | --dataroo | --dataro | --datar)
827827+ ac_prev=datarootdir ;;
828828+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
829829+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
830830+ datarootdir=$ac_optarg ;;
831831+832832+ -disable-* | --disable-*)
833833+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
834834+ # Reject names that are not valid shell variable names.
835835+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
836836+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
837837+ ac_useropt_orig=$ac_useropt
838838+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
839839+ case $ac_user_opts in
840840+ *"
841841+"enable_$ac_useropt"
842842+"*) ;;
843843+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
844844+ ac_unrecognized_sep=', ';;
845845+ esac
846846+ eval enable_$ac_useropt=no ;;
847847+848848+ -docdir | --docdir | --docdi | --doc | --do)
849849+ ac_prev=docdir ;;
850850+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
851851+ docdir=$ac_optarg ;;
852852+853853+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
854854+ ac_prev=dvidir ;;
855855+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
856856+ dvidir=$ac_optarg ;;
857857+858858+ -enable-* | --enable-*)
859859+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
860860+ # Reject names that are not valid shell variable names.
861861+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
862862+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
863863+ ac_useropt_orig=$ac_useropt
864864+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
865865+ case $ac_user_opts in
866866+ *"
867867+"enable_$ac_useropt"
868868+"*) ;;
869869+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
870870+ ac_unrecognized_sep=', ';;
871871+ esac
872872+ eval enable_$ac_useropt=\$ac_optarg ;;
873873+874874+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
875875+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
876876+ | --exec | --exe | --ex)
877877+ ac_prev=exec_prefix ;;
878878+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
879879+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
880880+ | --exec=* | --exe=* | --ex=*)
881881+ exec_prefix=$ac_optarg ;;
882882+883883+ -gas | --gas | --ga | --g)
884884+ # Obsolete; use --with-gas.
885885+ with_gas=yes ;;
886886+887887+ -help | --help | --hel | --he | -h)
888888+ ac_init_help=long ;;
889889+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
890890+ ac_init_help=recursive ;;
891891+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
892892+ ac_init_help=short ;;
893893+894894+ -host | --host | --hos | --ho)
895895+ ac_prev=host_alias ;;
896896+ -host=* | --host=* | --hos=* | --ho=*)
897897+ host_alias=$ac_optarg ;;
898898+899899+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
900900+ ac_prev=htmldir ;;
901901+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
902902+ | --ht=*)
903903+ htmldir=$ac_optarg ;;
904904+905905+ -includedir | --includedir | --includedi | --included | --include \
906906+ | --includ | --inclu | --incl | --inc)
907907+ ac_prev=includedir ;;
908908+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
909909+ | --includ=* | --inclu=* | --incl=* | --inc=*)
910910+ includedir=$ac_optarg ;;
911911+912912+ -infodir | --infodir | --infodi | --infod | --info | --inf)
913913+ ac_prev=infodir ;;
914914+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
915915+ infodir=$ac_optarg ;;
916916+917917+ -libdir | --libdir | --libdi | --libd)
918918+ ac_prev=libdir ;;
919919+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
920920+ libdir=$ac_optarg ;;
921921+922922+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
923923+ | --libexe | --libex | --libe)
924924+ ac_prev=libexecdir ;;
925925+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
926926+ | --libexe=* | --libex=* | --libe=*)
927927+ libexecdir=$ac_optarg ;;
928928+929929+ -localedir | --localedir | --localedi | --localed | --locale)
930930+ ac_prev=localedir ;;
931931+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
932932+ localedir=$ac_optarg ;;
933933+934934+ -localstatedir | --localstatedir | --localstatedi | --localstated \
935935+ | --localstate | --localstat | --localsta | --localst | --locals)
936936+ ac_prev=localstatedir ;;
937937+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
938938+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
939939+ localstatedir=$ac_optarg ;;
940940+941941+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
942942+ ac_prev=mandir ;;
943943+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
944944+ mandir=$ac_optarg ;;
945945+946946+ -nfp | --nfp | --nf)
947947+ # Obsolete; use --without-fp.
948948+ with_fp=no ;;
949949+950950+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
951951+ | --no-cr | --no-c | -n)
952952+ no_create=yes ;;
953953+954954+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
955955+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
956956+ no_recursion=yes ;;
957957+958958+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
959959+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
960960+ | --oldin | --oldi | --old | --ol | --o)
961961+ ac_prev=oldincludedir ;;
962962+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
963963+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
964964+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
965965+ oldincludedir=$ac_optarg ;;
966966+967967+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
968968+ ac_prev=prefix ;;
969969+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
970970+ prefix=$ac_optarg ;;
971971+972972+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
973973+ | --program-pre | --program-pr | --program-p)
974974+ ac_prev=program_prefix ;;
975975+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
976976+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
977977+ program_prefix=$ac_optarg ;;
978978+979979+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
980980+ | --program-suf | --program-su | --program-s)
981981+ ac_prev=program_suffix ;;
982982+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
983983+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
984984+ program_suffix=$ac_optarg ;;
985985+986986+ -program-transform-name | --program-transform-name \
987987+ | --program-transform-nam | --program-transform-na \
988988+ | --program-transform-n | --program-transform- \
989989+ | --program-transform | --program-transfor \
990990+ | --program-transfo | --program-transf \
991991+ | --program-trans | --program-tran \
992992+ | --progr-tra | --program-tr | --program-t)
993993+ ac_prev=program_transform_name ;;
994994+ -program-transform-name=* | --program-transform-name=* \
995995+ | --program-transform-nam=* | --program-transform-na=* \
996996+ | --program-transform-n=* | --program-transform-=* \
997997+ | --program-transform=* | --program-transfor=* \
998998+ | --program-transfo=* | --program-transf=* \
999999+ | --program-trans=* | --program-tran=* \
10001000+ | --progr-tra=* | --program-tr=* | --program-t=*)
10011001+ program_transform_name=$ac_optarg ;;
10021002+10031003+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
10041004+ ac_prev=pdfdir ;;
10051005+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
10061006+ pdfdir=$ac_optarg ;;
10071007+10081008+ -psdir | --psdir | --psdi | --psd | --ps)
10091009+ ac_prev=psdir ;;
10101010+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
10111011+ psdir=$ac_optarg ;;
10121012+10131013+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
10141014+ | -silent | --silent | --silen | --sile | --sil)
10151015+ silent=yes ;;
10161016+10171017+ -runstatedir | --runstatedir | --runstatedi | --runstated \
10181018+ | --runstate | --runstat | --runsta | --runst | --runs \
10191019+ | --run | --ru | --r)
10201020+ ac_prev=runstatedir ;;
10211021+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
10221022+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
10231023+ | --run=* | --ru=* | --r=*)
10241024+ runstatedir=$ac_optarg ;;
10251025+10261026+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
10271027+ ac_prev=sbindir ;;
10281028+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
10291029+ | --sbi=* | --sb=*)
10301030+ sbindir=$ac_optarg ;;
10311031+10321032+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
10331033+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
10341034+ | --sharedst | --shareds | --shared | --share | --shar \
10351035+ | --sha | --sh)
10361036+ ac_prev=sharedstatedir ;;
10371037+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
10381038+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
10391039+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
10401040+ | --sha=* | --sh=*)
10411041+ sharedstatedir=$ac_optarg ;;
10421042+10431043+ -site | --site | --sit)
10441044+ ac_prev=site ;;
10451045+ -site=* | --site=* | --sit=*)
10461046+ site=$ac_optarg ;;
10471047+10481048+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10491049+ ac_prev=srcdir ;;
10501050+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10511051+ srcdir=$ac_optarg ;;
10521052+10531053+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
10541054+ | --syscon | --sysco | --sysc | --sys | --sy)
10551055+ ac_prev=sysconfdir ;;
10561056+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
10571057+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
10581058+ sysconfdir=$ac_optarg ;;
10591059+10601060+ -target | --target | --targe | --targ | --tar | --ta | --t)
10611061+ ac_prev=target_alias ;;
10621062+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
10631063+ target_alias=$ac_optarg ;;
10641064+10651065+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
10661066+ verbose=yes ;;
10671067+10681068+ -version | --version | --versio | --versi | --vers | -V)
10691069+ ac_init_version=: ;;
10701070+10711071+ -with-* | --with-*)
10721072+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
10731073+ # Reject names that are not valid shell variable names.
10741074+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
10751075+ as_fn_error $? "invalid package name: \`$ac_useropt'"
10761076+ ac_useropt_orig=$ac_useropt
10771077+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
10781078+ case $ac_user_opts in
10791079+ *"
10801080+"with_$ac_useropt"
10811081+"*) ;;
10821082+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
10831083+ ac_unrecognized_sep=', ';;
10841084+ esac
10851085+ eval with_$ac_useropt=\$ac_optarg ;;
10861086+10871087+ -without-* | --without-*)
10881088+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
10891089+ # Reject names that are not valid shell variable names.
10901090+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
10911091+ as_fn_error $? "invalid package name: \`$ac_useropt'"
10921092+ ac_useropt_orig=$ac_useropt
10931093+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
10941094+ case $ac_user_opts in
10951095+ *"
10961096+"with_$ac_useropt"
10971097+"*) ;;
10981098+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
10991099+ ac_unrecognized_sep=', ';;
11001100+ esac
11011101+ eval with_$ac_useropt=no ;;
11021102+11031103+ --x)
11041104+ # Obsolete; use --with-x.
11051105+ with_x=yes ;;
11061106+11071107+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
11081108+ | --x-incl | --x-inc | --x-in | --x-i)
11091109+ ac_prev=x_includes ;;
11101110+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
11111111+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
11121112+ x_includes=$ac_optarg ;;
11131113+11141114+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
11151115+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
11161116+ ac_prev=x_libraries ;;
11171117+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
11181118+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
11191119+ x_libraries=$ac_optarg ;;
11201120+11211121+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
11221122+Try \`$0 --help' for more information"
11231123+ ;;
11241124+11251125+ *=*)
11261126+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
11271127+ # Reject names that are not valid shell variable names.
11281128+ case $ac_envvar in #(
11291129+ '' | [0-9]* | *[!_$as_cr_alnum]* )
11301130+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
11311131+ esac
11321132+ eval $ac_envvar=\$ac_optarg
11331133+ export $ac_envvar ;;
11341134+11351135+ *)
11361136+ # FIXME: should be removed in autoconf 3.0.
11371137+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
11381138+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
11391139+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
11401140+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
11411141+ ;;
11421142+11431143+ esac
11441144+done
11451145+11461146+if test -n "$ac_prev"; then
11471147+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
11481148+ as_fn_error $? "missing argument to $ac_option"
11491149+fi
11501150+11511151+if test -n "$ac_unrecognized_opts"; then
11521152+ case $enable_option_checking in
11531153+ no) ;;
11541154+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
11551155+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
11561156+ esac
11571157+fi
11581158+11591159+# Check all directory arguments for consistency.
11601160+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
11611161+ datadir sysconfdir sharedstatedir localstatedir includedir \
11621162+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
11631163+ libdir localedir mandir runstatedir
11641164+do
11651165+ eval ac_val=\$$ac_var
11661166+ # Remove trailing slashes.
11671167+ case $ac_val in
11681168+ */ )
11691169+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
11701170+ eval $ac_var=\$ac_val;;
11711171+ esac
11721172+ # Be sure to have absolute directory names.
11731173+ case $ac_val in
11741174+ [\\/$]* | ?:[\\/]* ) continue;;
11751175+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
11761176+ esac
11771177+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
11781178+done
11791179+11801180+# There might be people who depend on the old broken behavior: `$host'
11811181+# used to hold the argument of --host etc.
11821182+# FIXME: To remove some day.
11831183+build=$build_alias
11841184+host=$host_alias
11851185+target=$target_alias
11861186+11871187+# FIXME: To remove some day.
11881188+if test "x$host_alias" != x; then
11891189+ if test "x$build_alias" = x; then
11901190+ cross_compiling=maybe
11911191+ elif test "x$build_alias" != "x$host_alias"; then
11921192+ cross_compiling=yes
11931193+ fi
11941194+fi
11951195+11961196+ac_tool_prefix=
11971197+test -n "$host_alias" && ac_tool_prefix=$host_alias-
11981198+11991199+test "$silent" = yes && exec 6>/dev/null
12001200+12011201+12021202+ac_pwd=`pwd` && test -n "$ac_pwd" &&
12031203+ac_ls_di=`ls -di .` &&
12041204+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
12051205+ as_fn_error $? "working directory cannot be determined"
12061206+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
12071207+ as_fn_error $? "pwd does not report name of working directory"
12081208+12091209+12101210+# Find the source files, if location was not specified.
12111211+if test -z "$srcdir"; then
12121212+ ac_srcdir_defaulted=yes
12131213+ # Try the directory containing this script, then the parent directory.
12141214+ ac_confdir=`$as_dirname -- "$as_myself" ||
12151215+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12161216+ X"$as_myself" : 'X\(//\)[^/]' \| \
12171217+ X"$as_myself" : 'X\(//\)$' \| \
12181218+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
12191219+printf "%s\n" X"$as_myself" |
12201220+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12211221+ s//\1/
12221222+ q
12231223+ }
12241224+ /^X\(\/\/\)[^/].*/{
12251225+ s//\1/
12261226+ q
12271227+ }
12281228+ /^X\(\/\/\)$/{
12291229+ s//\1/
12301230+ q
12311231+ }
12321232+ /^X\(\/\).*/{
12331233+ s//\1/
12341234+ q
12351235+ }
12361236+ s/.*/./; q'`
12371237+ srcdir=$ac_confdir
12381238+ if test ! -r "$srcdir/$ac_unique_file"; then
12391239+ srcdir=..
12401240+ fi
12411241+else
12421242+ ac_srcdir_defaulted=no
12431243+fi
12441244+if test ! -r "$srcdir/$ac_unique_file"; then
12451245+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
12461246+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
12471247+fi
12481248+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
12491249+ac_abs_confdir=`(
12501250+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
12511251+ pwd)`
12521252+# When building in place, set srcdir=.
12531253+if test "$ac_abs_confdir" = "$ac_pwd"; then
12541254+ srcdir=.
12551255+fi
12561256+# Remove unnecessary trailing slashes from srcdir.
12571257+# Double slashes in file names in object file debugging info
12581258+# mess up M-x gdb in Emacs.
12591259+case $srcdir in
12601260+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
12611261+esac
12621262+for ac_var in $ac_precious_vars; do
12631263+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
12641264+ eval ac_env_${ac_var}_value=\$${ac_var}
12651265+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
12661266+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
12671267+done
12681268+12691269+#
12701270+# Report the --help message.
12711271+#
12721272+if test "$ac_init_help" = "long"; then
12731273+ # Omit some internal or obsolete options to make the list less imposing.
12741274+ # This message is too long to be a string in the A/UX 3.1 sh.
12751275+ cat <<_ACEOF
12761276+\`configure' configures simdzone 0.2.0 to adapt to many kinds of systems.
12771277+12781278+Usage: $0 [OPTION]... [VAR=VALUE]...
12791279+12801280+To assign environment variables (e.g., CC, CFLAGS...), specify them as
12811281+VAR=VALUE. See below for descriptions of some of the useful variables.
12821282+12831283+Defaults for the options are specified in brackets.
12841284+12851285+Configuration:
12861286+ -h, --help display this help and exit
12871287+ --help=short display options specific to this package
12881288+ --help=recursive display the short help of all the included packages
12891289+ -V, --version display version information and exit
12901290+ -q, --quiet, --silent do not print \`checking ...' messages
12911291+ --cache-file=FILE cache test results in FILE [disabled]
12921292+ -C, --config-cache alias for \`--cache-file=config.cache'
12931293+ -n, --no-create do not create output files
12941294+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
12951295+12961296+Installation directories:
12971297+ --prefix=PREFIX install architecture-independent files in PREFIX
12981298+ [$ac_default_prefix]
12991299+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
13001300+ [PREFIX]
13011301+13021302+By default, \`make install' will install all the files in
13031303+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
13041304+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
13051305+for instance \`--prefix=\$HOME'.
13061306+13071307+For better control, use the options below.
13081308+13091309+Fine tuning of the installation directories:
13101310+ --bindir=DIR user executables [EPREFIX/bin]
13111311+ --sbindir=DIR system admin executables [EPREFIX/sbin]
13121312+ --libexecdir=DIR program executables [EPREFIX/libexec]
13131313+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
13141314+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
13151315+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
13161316+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
13171317+ --libdir=DIR object code libraries [EPREFIX/lib]
13181318+ --includedir=DIR C header files [PREFIX/include]
13191319+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
13201320+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
13211321+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
13221322+ --infodir=DIR info documentation [DATAROOTDIR/info]
13231323+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
13241324+ --mandir=DIR man documentation [DATAROOTDIR/man]
13251325+ --docdir=DIR documentation root [DATAROOTDIR/doc/simdzone]
13261326+ --htmldir=DIR html documentation [DOCDIR]
13271327+ --dvidir=DIR dvi documentation [DOCDIR]
13281328+ --pdfdir=DIR pdf documentation [DOCDIR]
13291329+ --psdir=DIR ps documentation [DOCDIR]
13301330+_ACEOF
13311331+13321332+ cat <<\_ACEOF
13331333+13341334+System types:
13351335+ --build=BUILD configure for building on BUILD [guessed]
13361336+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
13371337+ --target=TARGET configure for building compilers for TARGET [HOST]
13381338+_ACEOF
13391339+fi
13401340+13411341+if test -n "$ac_init_help"; then
13421342+ case $ac_init_help in
13431343+ short | recursive ) echo "Configuration of simdzone 0.2.0:";;
13441344+ esac
13451345+ cat <<\_ACEOF
13461346+13471347+Optional Features:
13481348+ --disable-option-checking ignore unrecognized --enable/--with options
13491349+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
13501350+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
13511351+ --disable-westmere Disable Westmere (SSE4.2) kernel
13521352+ --disable-haswell Disable Haswell (AVX2) kernel
13531353+13541354+Some influential environment variables:
13551355+ CC C compiler command
13561356+ CFLAGS C compiler flags
13571357+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
13581358+ nonstandard directory <lib dir>
13591359+ LIBS libraries to pass to the linker, e.g. -l<library>
13601360+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
13611361+ you have headers in a nonstandard directory <include dir>
13621362+13631363+Use these variables to override the choices made by `configure' or to help
13641364+it to find libraries and programs with nonstandard names/locations.
13651365+13661366+Report bugs to <https://github.com/NLnetLabs/simdzone/issues>.
13671367+_ACEOF
13681368+ac_status=$?
13691369+fi
13701370+13711371+if test "$ac_init_help" = "recursive"; then
13721372+ # If there are subdirs, report their specific --help.
13731373+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
13741374+ test -d "$ac_dir" ||
13751375+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
13761376+ continue
13771377+ ac_builddir=.
13781378+13791379+case "$ac_dir" in
13801380+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13811381+*)
13821382+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
13831383+ # A ".." for each directory in $ac_dir_suffix.
13841384+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
13851385+ case $ac_top_builddir_sub in
13861386+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13871387+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13881388+ esac ;;
13891389+esac
13901390+ac_abs_top_builddir=$ac_pwd
13911391+ac_abs_builddir=$ac_pwd$ac_dir_suffix
13921392+# for backward compatibility:
13931393+ac_top_builddir=$ac_top_build_prefix
13941394+13951395+case $srcdir in
13961396+ .) # We are building in place.
13971397+ ac_srcdir=.
13981398+ ac_top_srcdir=$ac_top_builddir_sub
13991399+ ac_abs_top_srcdir=$ac_pwd ;;
14001400+ [\\/]* | ?:[\\/]* ) # Absolute name.
14011401+ ac_srcdir=$srcdir$ac_dir_suffix;
14021402+ ac_top_srcdir=$srcdir
14031403+ ac_abs_top_srcdir=$srcdir ;;
14041404+ *) # Relative name.
14051405+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14061406+ ac_top_srcdir=$ac_top_build_prefix$srcdir
14071407+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
14081408+esac
14091409+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
14101410+14111411+ cd "$ac_dir" || { ac_status=$?; continue; }
14121412+ # Check for configure.gnu first; this name is used for a wrapper for
14131413+ # Metaconfig's "Configure" on case-insensitive file systems.
14141414+ if test -f "$ac_srcdir/configure.gnu"; then
14151415+ echo &&
14161416+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
14171417+ elif test -f "$ac_srcdir/configure"; then
14181418+ echo &&
14191419+ $SHELL "$ac_srcdir/configure" --help=recursive
14201420+ else
14211421+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
14221422+ fi || ac_status=$?
14231423+ cd "$ac_pwd" || { ac_status=$?; break; }
14241424+ done
14251425+fi
14261426+14271427+test -n "$ac_init_help" && exit $ac_status
14281428+if $ac_init_version; then
14291429+ cat <<\_ACEOF
14301430+simdzone configure 0.2.0
14311431+generated by GNU Autoconf 2.71
14321432+14331433+Copyright (C) 2021 Free Software Foundation, Inc.
14341434+This configure script is free software; the Free Software Foundation
14351435+gives unlimited permission to copy, distribute and modify it.
14361436+_ACEOF
14371437+ exit
14381438+fi
14391439+14401440+## ------------------------ ##
14411441+## Autoconf initialization. ##
14421442+## ------------------------ ##
14431443+14441444+# ac_fn_c_try_compile LINENO
14451445+# --------------------------
14461446+# Try to compile conftest.$ac_ext, and return whether this succeeded.
14471447+ac_fn_c_try_compile ()
14481448+{
14491449+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14501450+ rm -f conftest.$ac_objext conftest.beam
14511451+ if { { ac_try="$ac_compile"
14521452+case "(($ac_try" in
14531453+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14541454+ *) ac_try_echo=$ac_try;;
14551455+esac
14561456+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
14571457+printf "%s\n" "$ac_try_echo"; } >&5
14581458+ (eval "$ac_compile") 2>conftest.err
14591459+ ac_status=$?
14601460+ if test -s conftest.err; then
14611461+ grep -v '^ *+' conftest.err >conftest.er1
14621462+ cat conftest.er1 >&5
14631463+ mv -f conftest.er1 conftest.err
14641464+ fi
14651465+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14661466+ test $ac_status = 0; } && {
14671467+ test -z "$ac_c_werror_flag" ||
14681468+ test ! -s conftest.err
14691469+ } && test -s conftest.$ac_objext
14701470+then :
14711471+ ac_retval=0
14721472+else $as_nop
14731473+ printf "%s\n" "$as_me: failed program was:" >&5
14741474+sed 's/^/| /' conftest.$ac_ext >&5
14751475+14761476+ ac_retval=1
14771477+fi
14781478+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
14791479+ as_fn_set_status $ac_retval
14801480+14811481+} # ac_fn_c_try_compile
14821482+14831483+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
14841484+# -------------------------------------------------------
14851485+# Tests whether HEADER exists and can be compiled using the include files in
14861486+# INCLUDES, setting the cache variable VAR accordingly.
14871487+ac_fn_c_check_header_compile ()
14881488+{
14891489+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14901490+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
14911491+printf %s "checking for $2... " >&6; }
14921492+if eval test \${$3+y}
14931493+then :
14941494+ printf %s "(cached) " >&6
14951495+else $as_nop
14961496+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14971497+/* end confdefs.h. */
14981498+$4
14991499+#include <$2>
15001500+_ACEOF
15011501+if ac_fn_c_try_compile "$LINENO"
15021502+then :
15031503+ eval "$3=yes"
15041504+else $as_nop
15051505+ eval "$3=no"
15061506+fi
15071507+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15081508+fi
15091509+eval ac_res=\$$3
15101510+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15111511+printf "%s\n" "$ac_res" >&6; }
15121512+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
15131513+15141514+} # ac_fn_c_check_header_compile
15151515+15161516+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
15171517+# ------------------------------------------------------------------
15181518+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
15191519+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
15201520+ac_fn_check_decl ()
15211521+{
15221522+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15231523+ as_decl_name=`echo $2|sed 's/ *(.*//'`
15241524+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
15251525+printf %s "checking whether $as_decl_name is declared... " >&6; }
15261526+if eval test \${$3+y}
15271527+then :
15281528+ printf %s "(cached) " >&6
15291529+else $as_nop
15301530+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
15311531+ eval ac_save_FLAGS=\$$6
15321532+ as_fn_append $6 " $5"
15331533+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15341534+/* end confdefs.h. */
15351535+$4
15361536+int
15371537+main (void)
15381538+{
15391539+#ifndef $as_decl_name
15401540+#ifdef __cplusplus
15411541+ (void) $as_decl_use;
15421542+#else
15431543+ (void) $as_decl_name;
15441544+#endif
15451545+#endif
15461546+15471547+ ;
15481548+ return 0;
15491549+}
15501550+_ACEOF
15511551+if ac_fn_c_try_compile "$LINENO"
15521552+then :
15531553+ eval "$3=yes"
15541554+else $as_nop
15551555+ eval "$3=no"
15561556+fi
15571557+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15581558+ eval $6=\$ac_save_FLAGS
15591559+15601560+fi
15611561+eval ac_res=\$$3
15621562+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15631563+printf "%s\n" "$ac_res" >&6; }
15641564+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
15651565+15661566+} # ac_fn_check_decl
15671567+15681568+# ac_fn_c_try_link LINENO
15691569+# -----------------------
15701570+# Try to link conftest.$ac_ext, and return whether this succeeded.
15711571+ac_fn_c_try_link ()
15721572+{
15731573+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15741574+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
15751575+ if { { ac_try="$ac_link"
15761576+case "(($ac_try" in
15771577+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15781578+ *) ac_try_echo=$ac_try;;
15791579+esac
15801580+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
15811581+printf "%s\n" "$ac_try_echo"; } >&5
15821582+ (eval "$ac_link") 2>conftest.err
15831583+ ac_status=$?
15841584+ if test -s conftest.err; then
15851585+ grep -v '^ *+' conftest.err >conftest.er1
15861586+ cat conftest.er1 >&5
15871587+ mv -f conftest.er1 conftest.err
15881588+ fi
15891589+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15901590+ test $ac_status = 0; } && {
15911591+ test -z "$ac_c_werror_flag" ||
15921592+ test ! -s conftest.err
15931593+ } && test -s conftest$ac_exeext && {
15941594+ test "$cross_compiling" = yes ||
15951595+ test -x conftest$ac_exeext
15961596+ }
15971597+then :
15981598+ ac_retval=0
15991599+else $as_nop
16001600+ printf "%s\n" "$as_me: failed program was:" >&5
16011601+sed 's/^/| /' conftest.$ac_ext >&5
16021602+16031603+ ac_retval=1
16041604+fi
16051605+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
16061606+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
16071607+ # interfere with the next link command; also delete a directory that is
16081608+ # left behind by Apple's compiler. We do this before executing the actions.
16091609+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
16101610+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
16111611+ as_fn_set_status $ac_retval
16121612+16131613+} # ac_fn_c_try_link
16141614+16151615+# ac_fn_c_check_func LINENO FUNC VAR
16161616+# ----------------------------------
16171617+# Tests whether FUNC exists, setting the cache variable VAR accordingly
16181618+ac_fn_c_check_func ()
16191619+{
16201620+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16211621+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
16221622+printf %s "checking for $2... " >&6; }
16231623+if eval test \${$3+y}
16241624+then :
16251625+ printf %s "(cached) " >&6
16261626+else $as_nop
16271627+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16281628+/* end confdefs.h. */
16291629+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
16301630+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
16311631+#define $2 innocuous_$2
16321632+16331633+/* System header to define __stub macros and hopefully few prototypes,
16341634+ which can conflict with char $2 (); below. */
16351635+16361636+#include <limits.h>
16371637+#undef $2
16381638+16391639+/* Override any GCC internal prototype to avoid an error.
16401640+ Use char because int might match the return type of a GCC
16411641+ builtin and then its argument prototype would still apply. */
16421642+#ifdef __cplusplus
16431643+extern "C"
16441644+#endif
16451645+char $2 ();
16461646+/* The GNU C library defines this for functions which it implements
16471647+ to always fail with ENOSYS. Some functions are actually named
16481648+ something starting with __ and the normal name is an alias. */
16491649+#if defined __stub_$2 || defined __stub___$2
16501650+choke me
16511651+#endif
16521652+16531653+int
16541654+main (void)
16551655+{
16561656+return $2 ();
16571657+ ;
16581658+ return 0;
16591659+}
16601660+_ACEOF
16611661+if ac_fn_c_try_link "$LINENO"
16621662+then :
16631663+ eval "$3=yes"
16641664+else $as_nop
16651665+ eval "$3=no"
16661666+fi
16671667+rm -f core conftest.err conftest.$ac_objext conftest.beam \
16681668+ conftest$ac_exeext conftest.$ac_ext
16691669+fi
16701670+eval ac_res=\$$3
16711671+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16721672+printf "%s\n" "$ac_res" >&6; }
16731673+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
16741674+16751675+} # ac_fn_c_check_func
16761676+ac_configure_args_raw=
16771677+for ac_arg
16781678+do
16791679+ case $ac_arg in
16801680+ *\'*)
16811681+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
16821682+ esac
16831683+ as_fn_append ac_configure_args_raw " '$ac_arg'"
16841684+done
16851685+16861686+case $ac_configure_args_raw in
16871687+ *$as_nl*)
16881688+ ac_safe_unquote= ;;
16891689+ *)
16901690+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
16911691+ ac_unsafe_a="$ac_unsafe_z#~"
16921692+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
16931693+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
16941694+esac
16951695+16961696+cat >config.log <<_ACEOF
16971697+This file contains any messages produced by compilers while
16981698+running configure, to aid debugging if configure makes a mistake.
16991699+17001700+It was created by simdzone $as_me 0.2.0, which was
17011701+generated by GNU Autoconf 2.71. Invocation command line was
17021702+17031703+ $ $0$ac_configure_args_raw
17041704+17051705+_ACEOF
17061706+exec 5>>config.log
17071707+{
17081708+cat <<_ASUNAME
17091709+## --------- ##
17101710+## Platform. ##
17111711+## --------- ##
17121712+17131713+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
17141714+uname -m = `(uname -m) 2>/dev/null || echo unknown`
17151715+uname -r = `(uname -r) 2>/dev/null || echo unknown`
17161716+uname -s = `(uname -s) 2>/dev/null || echo unknown`
17171717+uname -v = `(uname -v) 2>/dev/null || echo unknown`
17181718+17191719+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
17201720+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
17211721+17221722+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
17231723+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
17241724+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
17251725+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
17261726+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
17271727+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
17281728+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
17291729+17301730+_ASUNAME
17311731+17321732+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17331733+for as_dir in $PATH
17341734+do
17351735+ IFS=$as_save_IFS
17361736+ case $as_dir in #(((
17371737+ '') as_dir=./ ;;
17381738+ */) ;;
17391739+ *) as_dir=$as_dir/ ;;
17401740+ esac
17411741+ printf "%s\n" "PATH: $as_dir"
17421742+ done
17431743+IFS=$as_save_IFS
17441744+17451745+} >&5
17461746+17471747+cat >&5 <<_ACEOF
17481748+17491749+17501750+## ----------- ##
17511751+## Core tests. ##
17521752+## ----------- ##
17531753+17541754+_ACEOF
17551755+17561756+17571757+# Keep a trace of the command line.
17581758+# Strip out --no-create and --no-recursion so they do not pile up.
17591759+# Strip out --silent because we don't want to record it for future runs.
17601760+# Also quote any args containing shell meta-characters.
17611761+# Make two passes to allow for proper duplicate-argument suppression.
17621762+ac_configure_args=
17631763+ac_configure_args0=
17641764+ac_configure_args1=
17651765+ac_must_keep_next=false
17661766+for ac_pass in 1 2
17671767+do
17681768+ for ac_arg
17691769+ do
17701770+ case $ac_arg in
17711771+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
17721772+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17731773+ | -silent | --silent | --silen | --sile | --sil)
17741774+ continue ;;
17751775+ *\'*)
17761776+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
17771777+ esac
17781778+ case $ac_pass in
17791779+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
17801780+ 2)
17811781+ as_fn_append ac_configure_args1 " '$ac_arg'"
17821782+ if test $ac_must_keep_next = true; then
17831783+ ac_must_keep_next=false # Got value, back to normal.
17841784+ else
17851785+ case $ac_arg in
17861786+ *=* | --config-cache | -C | -disable-* | --disable-* \
17871787+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
17881788+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
17891789+ | -with-* | --with-* | -without-* | --without-* | --x)
17901790+ case "$ac_configure_args0 " in
17911791+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
17921792+ esac
17931793+ ;;
17941794+ -* ) ac_must_keep_next=true ;;
17951795+ esac
17961796+ fi
17971797+ as_fn_append ac_configure_args " '$ac_arg'"
17981798+ ;;
17991799+ esac
18001800+ done
18011801+done
18021802+{ ac_configure_args0=; unset ac_configure_args0;}
18031803+{ ac_configure_args1=; unset ac_configure_args1;}
18041804+18051805+# When interrupted or exit'd, cleanup temporary files, and complete
18061806+# config.log. We remove comments because anyway the quotes in there
18071807+# would cause problems or look ugly.
18081808+# WARNING: Use '\'' to represent an apostrophe within the trap.
18091809+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
18101810+trap 'exit_status=$?
18111811+ # Sanitize IFS.
18121812+ IFS=" "" $as_nl"
18131813+ # Save into config.log some information that might help in debugging.
18141814+ {
18151815+ echo
18161816+18171817+ printf "%s\n" "## ---------------- ##
18181818+## Cache variables. ##
18191819+## ---------------- ##"
18201820+ echo
18211821+ # The following way of writing the cache mishandles newlines in values,
18221822+(
18231823+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
18241824+ eval ac_val=\$$ac_var
18251825+ case $ac_val in #(
18261826+ *${as_nl}*)
18271827+ case $ac_var in #(
18281828+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18291829+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18301830+ esac
18311831+ case $ac_var in #(
18321832+ _ | IFS | as_nl) ;; #(
18331833+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18341834+ *) { eval $ac_var=; unset $ac_var;} ;;
18351835+ esac ;;
18361836+ esac
18371837+ done
18381838+ (set) 2>&1 |
18391839+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
18401840+ *${as_nl}ac_space=\ *)
18411841+ sed -n \
18421842+ "s/'\''/'\''\\\\'\'''\''/g;
18431843+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
18441844+ ;; #(
18451845+ *)
18461846+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18471847+ ;;
18481848+ esac |
18491849+ sort
18501850+)
18511851+ echo
18521852+18531853+ printf "%s\n" "## ----------------- ##
18541854+## Output variables. ##
18551855+## ----------------- ##"
18561856+ echo
18571857+ for ac_var in $ac_subst_vars
18581858+ do
18591859+ eval ac_val=\$$ac_var
18601860+ case $ac_val in
18611861+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
18621862+ esac
18631863+ printf "%s\n" "$ac_var='\''$ac_val'\''"
18641864+ done | sort
18651865+ echo
18661866+18671867+ if test -n "$ac_subst_files"; then
18681868+ printf "%s\n" "## ------------------- ##
18691869+## File substitutions. ##
18701870+## ------------------- ##"
18711871+ echo
18721872+ for ac_var in $ac_subst_files
18731873+ do
18741874+ eval ac_val=\$$ac_var
18751875+ case $ac_val in
18761876+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
18771877+ esac
18781878+ printf "%s\n" "$ac_var='\''$ac_val'\''"
18791879+ done | sort
18801880+ echo
18811881+ fi
18821882+18831883+ if test -s confdefs.h; then
18841884+ printf "%s\n" "## ----------- ##
18851885+## confdefs.h. ##
18861886+## ----------- ##"
18871887+ echo
18881888+ cat confdefs.h
18891889+ echo
18901890+ fi
18911891+ test "$ac_signal" != 0 &&
18921892+ printf "%s\n" "$as_me: caught signal $ac_signal"
18931893+ printf "%s\n" "$as_me: exit $exit_status"
18941894+ } >&5
18951895+ rm -f core *.core core.conftest.* &&
18961896+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
18971897+ exit $exit_status
18981898+' 0
18991899+for ac_signal in 1 2 13 15; do
19001900+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
19011901+done
19021902+ac_signal=0
19031903+19041904+# confdefs.h avoids OS command line length limits that DEFS can exceed.
19051905+rm -f -r conftest* confdefs.h
19061906+19071907+printf "%s\n" "/* confdefs.h */" > confdefs.h
19081908+19091909+# Predefined preprocessor variables.
19101910+19111911+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
19121912+19131913+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
19141914+19151915+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
19161916+19171917+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
19181918+19191919+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
19201920+19211921+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
19221922+19231923+19241924+# Let the site file select an alternate cache file if it wants to.
19251925+# Prefer an explicitly selected file to automatically selected ones.
19261926+if test -n "$CONFIG_SITE"; then
19271927+ ac_site_files="$CONFIG_SITE"
19281928+elif test "x$prefix" != xNONE; then
19291929+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
19301930+else
19311931+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
19321932+fi
19331933+19341934+for ac_site_file in $ac_site_files
19351935+do
19361936+ case $ac_site_file in #(
19371937+ */*) :
19381938+ ;; #(
19391939+ *) :
19401940+ ac_site_file=./$ac_site_file ;;
19411941+esac
19421942+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
19431943+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
19441944+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
19451945+ sed 's/^/| /' "$ac_site_file" >&5
19461946+ . "$ac_site_file" \
19471947+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19481948+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19491949+as_fn_error $? "failed to load site script $ac_site_file
19501950+See \`config.log' for more details" "$LINENO" 5; }
19511951+ fi
19521952+done
19531953+19541954+if test -r "$cache_file"; then
19551955+ # Some versions of bash will fail to source /dev/null (special files
19561956+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
19571957+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
19581958+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
19591959+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
19601960+ case $cache_file in
19611961+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
19621962+ *) . "./$cache_file";;
19631963+ esac
19641964+ fi
19651965+else
19661966+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
19671967+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
19681968+ >$cache_file
19691969+fi
19701970+19711971+# Test code for whether the C compiler supports C89 (global declarations)
19721972+ac_c_conftest_c89_globals='
19731973+/* Does the compiler advertise C89 conformance?
19741974+ Do not test the value of __STDC__, because some compilers set it to 0
19751975+ while being otherwise adequately conformant. */
19761976+#if !defined __STDC__
19771977+# error "Compiler does not advertise C89 conformance"
19781978+#endif
19791979+19801980+#include <stddef.h>
19811981+#include <stdarg.h>
19821982+struct stat;
19831983+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
19841984+struct buf { int x; };
19851985+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
19861986+static char *e (p, i)
19871987+ char **p;
19881988+ int i;
19891989+{
19901990+ return p[i];
19911991+}
19921992+static char *f (char * (*g) (char **, int), char **p, ...)
19931993+{
19941994+ char *s;
19951995+ va_list v;
19961996+ va_start (v,p);
19971997+ s = g (p, va_arg (v,int));
19981998+ va_end (v);
19991999+ return s;
20002000+}
20012001+20022002+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
20032003+ function prototypes and stuff, but not \xHH hex character constants.
20042004+ These do not provoke an error unfortunately, instead are silently treated
20052005+ as an "x". The following induces an error, until -std is added to get
20062006+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
20072007+ array size at least. It is necessary to write \x00 == 0 to get something
20082008+ that is true only with -std. */
20092009+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
20102010+20112011+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20122012+ inside strings and character constants. */
20132013+#define FOO(x) '\''x'\''
20142014+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
20152015+20162016+int test (int i, double x);
20172017+struct s1 {int (*f) (int a);};
20182018+struct s2 {int (*f) (double a);};
20192019+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
20202020+ int, int);'
20212021+20222022+# Test code for whether the C compiler supports C89 (body of main).
20232023+ac_c_conftest_c89_main='
20242024+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
20252025+'
20262026+20272027+# Test code for whether the C compiler supports C99 (global declarations)
20282028+ac_c_conftest_c99_globals='
20292029+// Does the compiler advertise C99 conformance?
20302030+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
20312031+# error "Compiler does not advertise C99 conformance"
20322032+#endif
20332033+20342034+#include <stdbool.h>
20352035+extern int puts (const char *);
20362036+extern int printf (const char *, ...);
20372037+extern int dprintf (int, const char *, ...);
20382038+extern void *malloc (size_t);
20392039+20402040+// Check varargs macros. These examples are taken from C99 6.10.3.5.
20412041+// dprintf is used instead of fprintf to avoid needing to declare
20422042+// FILE and stderr.
20432043+#define debug(...) dprintf (2, __VA_ARGS__)
20442044+#define showlist(...) puts (#__VA_ARGS__)
20452045+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
20462046+static void
20472047+test_varargs_macros (void)
20482048+{
20492049+ int x = 1234;
20502050+ int y = 5678;
20512051+ debug ("Flag");
20522052+ debug ("X = %d\n", x);
20532053+ showlist (The first, second, and third items.);
20542054+ report (x>y, "x is %d but y is %d", x, y);
20552055+}
20562056+20572057+// Check long long types.
20582058+#define BIG64 18446744073709551615ull
20592059+#define BIG32 4294967295ul
20602060+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
20612061+#if !BIG_OK
20622062+ #error "your preprocessor is broken"
20632063+#endif
20642064+#if BIG_OK
20652065+#else
20662066+ #error "your preprocessor is broken"
20672067+#endif
20682068+static long long int bignum = -9223372036854775807LL;
20692069+static unsigned long long int ubignum = BIG64;
20702070+20712071+struct incomplete_array
20722072+{
20732073+ int datasize;
20742074+ double data[];
20752075+};
20762076+20772077+struct named_init {
20782078+ int number;
20792079+ const wchar_t *name;
20802080+ double average;
20812081+};
20822082+20832083+typedef const char *ccp;
20842084+20852085+static inline int
20862086+test_restrict (ccp restrict text)
20872087+{
20882088+ // See if C++-style comments work.
20892089+ // Iterate through items via the restricted pointer.
20902090+ // Also check for declarations in for loops.
20912091+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
20922092+ continue;
20932093+ return 0;
20942094+}
20952095+20962096+// Check varargs and va_copy.
20972097+static bool
20982098+test_varargs (const char *format, ...)
20992099+{
21002100+ va_list args;
21012101+ va_start (args, format);
21022102+ va_list args_copy;
21032103+ va_copy (args_copy, args);
21042104+21052105+ const char *str = "";
21062106+ int number = 0;
21072107+ float fnumber = 0;
21082108+21092109+ while (*format)
21102110+ {
21112111+ switch (*format++)
21122112+ {
21132113+ case '\''s'\'': // string
21142114+ str = va_arg (args_copy, const char *);
21152115+ break;
21162116+ case '\''d'\'': // int
21172117+ number = va_arg (args_copy, int);
21182118+ break;
21192119+ case '\''f'\'': // float
21202120+ fnumber = va_arg (args_copy, double);
21212121+ break;
21222122+ default:
21232123+ break;
21242124+ }
21252125+ }
21262126+ va_end (args_copy);
21272127+ va_end (args);
21282128+21292129+ return *str && number && fnumber;
21302130+}
21312131+'
21322132+21332133+# Test code for whether the C compiler supports C99 (body of main).
21342134+ac_c_conftest_c99_main='
21352135+ // Check bool.
21362136+ _Bool success = false;
21372137+ success |= (argc != 0);
21382138+21392139+ // Check restrict.
21402140+ if (test_restrict ("String literal") == 0)
21412141+ success = true;
21422142+ char *restrict newvar = "Another string";
21432143+21442144+ // Check varargs.
21452145+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
21462146+ test_varargs_macros ();
21472147+21482148+ // Check flexible array members.
21492149+ struct incomplete_array *ia =
21502150+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
21512151+ ia->datasize = 10;
21522152+ for (int i = 0; i < ia->datasize; ++i)
21532153+ ia->data[i] = i * 1.234;
21542154+21552155+ // Check named initializers.
21562156+ struct named_init ni = {
21572157+ .number = 34,
21582158+ .name = L"Test wide string",
21592159+ .average = 543.34343,
21602160+ };
21612161+21622162+ ni.number = 58;
21632163+21642164+ int dynamic_array[ni.number];
21652165+ dynamic_array[0] = argv[0][0];
21662166+ dynamic_array[ni.number - 1] = 543;
21672167+21682168+ // work around unused variable warnings
21692169+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
21702170+ || dynamic_array[ni.number - 1] != 543);
21712171+'
21722172+21732173+# Test code for whether the C compiler supports C11 (global declarations)
21742174+ac_c_conftest_c11_globals='
21752175+// Does the compiler advertise C11 conformance?
21762176+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
21772177+# error "Compiler does not advertise C11 conformance"
21782178+#endif
21792179+21802180+// Check _Alignas.
21812181+char _Alignas (double) aligned_as_double;
21822182+char _Alignas (0) no_special_alignment;
21832183+extern char aligned_as_int;
21842184+char _Alignas (0) _Alignas (int) aligned_as_int;
21852185+21862186+// Check _Alignof.
21872187+enum
21882188+{
21892189+ int_alignment = _Alignof (int),
21902190+ int_array_alignment = _Alignof (int[100]),
21912191+ char_alignment = _Alignof (char)
21922192+};
21932193+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
21942194+21952195+// Check _Noreturn.
21962196+int _Noreturn does_not_return (void) { for (;;) continue; }
21972197+21982198+// Check _Static_assert.
21992199+struct test_static_assert
22002200+{
22012201+ int x;
22022202+ _Static_assert (sizeof (int) <= sizeof (long int),
22032203+ "_Static_assert does not work in struct");
22042204+ long int y;
22052205+};
22062206+22072207+// Check UTF-8 literals.
22082208+#define u8 syntax error!
22092209+char const utf8_literal[] = u8"happens to be ASCII" "another string";
22102210+22112211+// Check duplicate typedefs.
22122212+typedef long *long_ptr;
22132213+typedef long int *long_ptr;
22142214+typedef long_ptr long_ptr;
22152215+22162216+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
22172217+struct anonymous
22182218+{
22192219+ union {
22202220+ struct { int i; int j; };
22212221+ struct { int k; long int l; } w;
22222222+ };
22232223+ int m;
22242224+} v1;
22252225+'
22262226+22272227+# Test code for whether the C compiler supports C11 (body of main).
22282228+ac_c_conftest_c11_main='
22292229+ _Static_assert ((offsetof (struct anonymous, i)
22302230+ == offsetof (struct anonymous, w.k)),
22312231+ "Anonymous union alignment botch");
22322232+ v1.i = 2;
22332233+ v1.w.k = 5;
22342234+ ok |= v1.i != 5;
22352235+'
22362236+22372237+# Test code for whether the C compiler supports C11 (complete).
22382238+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
22392239+${ac_c_conftest_c99_globals}
22402240+${ac_c_conftest_c11_globals}
22412241+22422242+int
22432243+main (int argc, char **argv)
22442244+{
22452245+ int ok = 0;
22462246+ ${ac_c_conftest_c89_main}
22472247+ ${ac_c_conftest_c99_main}
22482248+ ${ac_c_conftest_c11_main}
22492249+ return ok;
22502250+}
22512251+"
22522252+22532253+# Test code for whether the C compiler supports C99 (complete).
22542254+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
22552255+${ac_c_conftest_c99_globals}
22562256+22572257+int
22582258+main (int argc, char **argv)
22592259+{
22602260+ int ok = 0;
22612261+ ${ac_c_conftest_c89_main}
22622262+ ${ac_c_conftest_c99_main}
22632263+ return ok;
22642264+}
22652265+"
22662266+22672267+# Test code for whether the C compiler supports C89 (complete).
22682268+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
22692269+22702270+int
22712271+main (int argc, char **argv)
22722272+{
22732273+ int ok = 0;
22742274+ ${ac_c_conftest_c89_main}
22752275+ return ok;
22762276+}
22772277+"
22782278+22792279+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
22802280+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
22812281+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
22822282+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
22832283+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
22842284+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
22852285+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
22862286+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
22872287+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
22882288+22892289+# Auxiliary files required by this configure script.
22902290+ac_aux_files="config.guess config.sub"
22912291+22922292+# Locations in which to look for auxiliary files.
22932293+ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
22942294+22952295+# Search for a directory containing all of the required auxiliary files,
22962296+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
22972297+# If we don't find one directory that contains all the files we need,
22982298+# we report the set of missing files from the *first* directory in
22992299+# $ac_aux_dir_candidates and give up.
23002300+ac_missing_aux_files=""
23012301+ac_first_candidate=:
23022302+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
23032303+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23042304+as_found=false
23052305+for as_dir in $ac_aux_dir_candidates
23062306+do
23072307+ IFS=$as_save_IFS
23082308+ case $as_dir in #(((
23092309+ '') as_dir=./ ;;
23102310+ */) ;;
23112311+ *) as_dir=$as_dir/ ;;
23122312+ esac
23132313+ as_found=:
23142314+23152315+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
23162316+ ac_aux_dir_found=yes
23172317+ ac_install_sh=
23182318+ for ac_aux in $ac_aux_files
23192319+ do
23202320+ # As a special case, if "install-sh" is required, that requirement
23212321+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
23222322+ # and $ac_install_sh is set appropriately for whichever one is found.
23232323+ if test x"$ac_aux" = x"install-sh"
23242324+ then
23252325+ if test -f "${as_dir}install-sh"; then
23262326+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
23272327+ ac_install_sh="${as_dir}install-sh -c"
23282328+ elif test -f "${as_dir}install.sh"; then
23292329+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
23302330+ ac_install_sh="${as_dir}install.sh -c"
23312331+ elif test -f "${as_dir}shtool"; then
23322332+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
23332333+ ac_install_sh="${as_dir}shtool install -c"
23342334+ else
23352335+ ac_aux_dir_found=no
23362336+ if $ac_first_candidate; then
23372337+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
23382338+ else
23392339+ break
23402340+ fi
23412341+ fi
23422342+ else
23432343+ if test -f "${as_dir}${ac_aux}"; then
23442344+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
23452345+ else
23462346+ ac_aux_dir_found=no
23472347+ if $ac_first_candidate; then
23482348+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
23492349+ else
23502350+ break
23512351+ fi
23522352+ fi
23532353+ fi
23542354+ done
23552355+ if test "$ac_aux_dir_found" = yes; then
23562356+ ac_aux_dir="$as_dir"
23572357+ break
23582358+ fi
23592359+ ac_first_candidate=false
23602360+23612361+ as_found=false
23622362+done
23632363+IFS=$as_save_IFS
23642364+if $as_found
23652365+then :
23662366+23672367+else $as_nop
23682368+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
23692369+fi
23702370+23712371+23722372+# These three variables are undocumented and unsupported,
23732373+# and are intended to be withdrawn in a future Autoconf release.
23742374+# They can cause serious problems if a builder's source tree is in a directory
23752375+# whose full name contains unusual characters.
23762376+if test -f "${ac_aux_dir}config.guess"; then
23772377+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
23782378+fi
23792379+if test -f "${ac_aux_dir}config.sub"; then
23802380+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
23812381+fi
23822382+if test -f "$ac_aux_dir/configure"; then
23832383+ ac_configure="$SHELL ${ac_aux_dir}configure"
23842384+fi
23852385+23862386+# Check that the precious variables saved in the cache have kept the same
23872387+# value.
23882388+ac_cache_corrupted=false
23892389+for ac_var in $ac_precious_vars; do
23902390+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
23912391+ eval ac_new_set=\$ac_env_${ac_var}_set
23922392+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
23932393+ eval ac_new_val=\$ac_env_${ac_var}_value
23942394+ case $ac_old_set,$ac_new_set in
23952395+ set,)
23962396+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
23972397+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
23982398+ ac_cache_corrupted=: ;;
23992399+ ,set)
24002400+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
24012401+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
24022402+ ac_cache_corrupted=: ;;
24032403+ ,);;
24042404+ *)
24052405+ if test "x$ac_old_val" != "x$ac_new_val"; then
24062406+ # differences in whitespace do not lead to failure.
24072407+ ac_old_val_w=`echo x $ac_old_val`
24082408+ ac_new_val_w=`echo x $ac_new_val`
24092409+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
24102410+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
24112411+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
24122412+ ac_cache_corrupted=:
24132413+ else
24142414+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
24152415+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
24162416+ eval $ac_var=\$ac_old_val
24172417+ fi
24182418+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
24192419+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
24202420+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
24212421+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
24222422+ fi;;
24232423+ esac
24242424+ # Pass precious variables to config.status.
24252425+ if test "$ac_new_set" = set; then
24262426+ case $ac_new_val in
24272427+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
24282428+ *) ac_arg=$ac_var=$ac_new_val ;;
24292429+ esac
24302430+ case " $ac_configure_args " in
24312431+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
24322432+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
24332433+ esac
24342434+ fi
24352435+done
24362436+if $ac_cache_corrupted; then
24372437+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24382438+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
24392439+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
24402440+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
24412441+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
24422442+ and start over" "$LINENO" 5
24432443+fi
24442444+## -------------------- ##
24452445+## Main body of script. ##
24462446+## -------------------- ##
24472447+24482448+ac_ext=c
24492449+ac_cpp='$CPP $CPPFLAGS'
24502450+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24512451+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24522452+ac_compiler_gnu=$ac_cv_c_compiler_gnu
24532453+24542454+24552455+24562456+ac_config_headers="$ac_config_headers config.h"
24572457+24582458+ac_config_files="$ac_config_files Makefile"
24592459+24602460+24612461+# ===========================================================================
24622462+# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
24632463+# ===========================================================================
24642464+#
24652465+# SYNOPSIS
24662466+#
24672467+# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
24682468+#
24692469+# DESCRIPTION
24702470+#
24712471+# Check whether the given FLAG works with the current language's compiler
24722472+# or gives an error. (Warnings, however, are ignored)
24732473+#
24742474+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
24752475+# success/failure.
24762476+#
24772477+# If EXTRA-FLAGS is defined, it is added to the current language's default
24782478+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
24792479+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
24802480+# force the compiler to issue an error when a bad flag is given.
24812481+#
24822482+# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
24832483+#
24842484+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
24852485+# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
24862486+#
24872487+# LICENSE
24882488+#
24892489+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
24902490+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
24912491+#
24922492+# Copying and distribution of this file, with or without modification, are
24932493+# permitted in any medium without royalty provided the copyright notice
24942494+# and this notice are preserved. This file is offered as-is, without any
24952495+# warranty.
24962496+24972497+#serial 6
24982498+24992499+25002500+25012501+25022502+25032503+25042504+25052505+25062506+25072507+25082508+25092509+ac_ext=c
25102510+ac_cpp='$CPP $CPPFLAGS'
25112511+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25122512+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25132513+ac_compiler_gnu=$ac_cv_c_compiler_gnu
25142514+if test -n "$ac_tool_prefix"; then
25152515+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
25162516+set dummy ${ac_tool_prefix}gcc; ac_word=$2
25172517+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25182518+printf %s "checking for $ac_word... " >&6; }
25192519+if test ${ac_cv_prog_CC+y}
25202520+then :
25212521+ printf %s "(cached) " >&6
25222522+else $as_nop
25232523+ if test -n "$CC"; then
25242524+ ac_cv_prog_CC="$CC" # Let the user override the test.
25252525+else
25262526+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25272527+for as_dir in $PATH
25282528+do
25292529+ IFS=$as_save_IFS
25302530+ case $as_dir in #(((
25312531+ '') as_dir=./ ;;
25322532+ */) ;;
25332533+ *) as_dir=$as_dir/ ;;
25342534+ esac
25352535+ for ac_exec_ext in '' $ac_executable_extensions; do
25362536+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
25372537+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
25382538+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
25392539+ break 2
25402540+ fi
25412541+done
25422542+ done
25432543+IFS=$as_save_IFS
25442544+25452545+fi
25462546+fi
25472547+CC=$ac_cv_prog_CC
25482548+if test -n "$CC"; then
25492549+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
25502550+printf "%s\n" "$CC" >&6; }
25512551+else
25522552+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25532553+printf "%s\n" "no" >&6; }
25542554+fi
25552555+25562556+25572557+fi
25582558+if test -z "$ac_cv_prog_CC"; then
25592559+ ac_ct_CC=$CC
25602560+ # Extract the first word of "gcc", so it can be a program name with args.
25612561+set dummy gcc; ac_word=$2
25622562+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25632563+printf %s "checking for $ac_word... " >&6; }
25642564+if test ${ac_cv_prog_ac_ct_CC+y}
25652565+then :
25662566+ printf %s "(cached) " >&6
25672567+else $as_nop
25682568+ if test -n "$ac_ct_CC"; then
25692569+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
25702570+else
25712571+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25722572+for as_dir in $PATH
25732573+do
25742574+ IFS=$as_save_IFS
25752575+ case $as_dir in #(((
25762576+ '') as_dir=./ ;;
25772577+ */) ;;
25782578+ *) as_dir=$as_dir/ ;;
25792579+ esac
25802580+ for ac_exec_ext in '' $ac_executable_extensions; do
25812581+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
25822582+ ac_cv_prog_ac_ct_CC="gcc"
25832583+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
25842584+ break 2
25852585+ fi
25862586+done
25872587+ done
25882588+IFS=$as_save_IFS
25892589+25902590+fi
25912591+fi
25922592+ac_ct_CC=$ac_cv_prog_ac_ct_CC
25932593+if test -n "$ac_ct_CC"; then
25942594+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
25952595+printf "%s\n" "$ac_ct_CC" >&6; }
25962596+else
25972597+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25982598+printf "%s\n" "no" >&6; }
25992599+fi
26002600+26012601+ if test "x$ac_ct_CC" = x; then
26022602+ CC=""
26032603+ else
26042604+ case $cross_compiling:$ac_tool_warned in
26052605+yes:)
26062606+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26072607+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26082608+ac_tool_warned=yes ;;
26092609+esac
26102610+ CC=$ac_ct_CC
26112611+ fi
26122612+else
26132613+ CC="$ac_cv_prog_CC"
26142614+fi
26152615+26162616+if test -z "$CC"; then
26172617+ if test -n "$ac_tool_prefix"; then
26182618+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
26192619+set dummy ${ac_tool_prefix}cc; ac_word=$2
26202620+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26212621+printf %s "checking for $ac_word... " >&6; }
26222622+if test ${ac_cv_prog_CC+y}
26232623+then :
26242624+ printf %s "(cached) " >&6
26252625+else $as_nop
26262626+ if test -n "$CC"; then
26272627+ ac_cv_prog_CC="$CC" # Let the user override the test.
26282628+else
26292629+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26302630+for as_dir in $PATH
26312631+do
26322632+ IFS=$as_save_IFS
26332633+ case $as_dir in #(((
26342634+ '') as_dir=./ ;;
26352635+ */) ;;
26362636+ *) as_dir=$as_dir/ ;;
26372637+ esac
26382638+ for ac_exec_ext in '' $ac_executable_extensions; do
26392639+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
26402640+ ac_cv_prog_CC="${ac_tool_prefix}cc"
26412641+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
26422642+ break 2
26432643+ fi
26442644+done
26452645+ done
26462646+IFS=$as_save_IFS
26472647+26482648+fi
26492649+fi
26502650+CC=$ac_cv_prog_CC
26512651+if test -n "$CC"; then
26522652+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
26532653+printf "%s\n" "$CC" >&6; }
26542654+else
26552655+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26562656+printf "%s\n" "no" >&6; }
26572657+fi
26582658+26592659+26602660+ fi
26612661+fi
26622662+if test -z "$CC"; then
26632663+ # Extract the first word of "cc", so it can be a program name with args.
26642664+set dummy cc; ac_word=$2
26652665+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26662666+printf %s "checking for $ac_word... " >&6; }
26672667+if test ${ac_cv_prog_CC+y}
26682668+then :
26692669+ printf %s "(cached) " >&6
26702670+else $as_nop
26712671+ if test -n "$CC"; then
26722672+ ac_cv_prog_CC="$CC" # Let the user override the test.
26732673+else
26742674+ ac_prog_rejected=no
26752675+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26762676+for as_dir in $PATH
26772677+do
26782678+ IFS=$as_save_IFS
26792679+ case $as_dir in #(((
26802680+ '') as_dir=./ ;;
26812681+ */) ;;
26822682+ *) as_dir=$as_dir/ ;;
26832683+ esac
26842684+ for ac_exec_ext in '' $ac_executable_extensions; do
26852685+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
26862686+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
26872687+ ac_prog_rejected=yes
26882688+ continue
26892689+ fi
26902690+ ac_cv_prog_CC="cc"
26912691+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
26922692+ break 2
26932693+ fi
26942694+done
26952695+ done
26962696+IFS=$as_save_IFS
26972697+26982698+if test $ac_prog_rejected = yes; then
26992699+ # We found a bogon in the path, so make sure we never use it.
27002700+ set dummy $ac_cv_prog_CC
27012701+ shift
27022702+ if test $# != 0; then
27032703+ # We chose a different compiler from the bogus one.
27042704+ # However, it has the same basename, so the bogon will be chosen
27052705+ # first if we set CC to just the basename; use the full file name.
27062706+ shift
27072707+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
27082708+ fi
27092709+fi
27102710+fi
27112711+fi
27122712+CC=$ac_cv_prog_CC
27132713+if test -n "$CC"; then
27142714+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
27152715+printf "%s\n" "$CC" >&6; }
27162716+else
27172717+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
27182718+printf "%s\n" "no" >&6; }
27192719+fi
27202720+27212721+27222722+fi
27232723+if test -z "$CC"; then
27242724+ if test -n "$ac_tool_prefix"; then
27252725+ for ac_prog in cl.exe
27262726+ do
27272727+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27282728+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27292729+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27302730+printf %s "checking for $ac_word... " >&6; }
27312731+if test ${ac_cv_prog_CC+y}
27322732+then :
27332733+ printf %s "(cached) " >&6
27342734+else $as_nop
27352735+ if test -n "$CC"; then
27362736+ ac_cv_prog_CC="$CC" # Let the user override the test.
27372737+else
27382738+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27392739+for as_dir in $PATH
27402740+do
27412741+ IFS=$as_save_IFS
27422742+ case $as_dir in #(((
27432743+ '') as_dir=./ ;;
27442744+ */) ;;
27452745+ *) as_dir=$as_dir/ ;;
27462746+ esac
27472747+ for ac_exec_ext in '' $ac_executable_extensions; do
27482748+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
27492749+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
27502750+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
27512751+ break 2
27522752+ fi
27532753+done
27542754+ done
27552755+IFS=$as_save_IFS
27562756+27572757+fi
27582758+fi
27592759+CC=$ac_cv_prog_CC
27602760+if test -n "$CC"; then
27612761+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
27622762+printf "%s\n" "$CC" >&6; }
27632763+else
27642764+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
27652765+printf "%s\n" "no" >&6; }
27662766+fi
27672767+27682768+27692769+ test -n "$CC" && break
27702770+ done
27712771+fi
27722772+if test -z "$CC"; then
27732773+ ac_ct_CC=$CC
27742774+ for ac_prog in cl.exe
27752775+do
27762776+ # Extract the first word of "$ac_prog", so it can be a program name with args.
27772777+set dummy $ac_prog; ac_word=$2
27782778+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27792779+printf %s "checking for $ac_word... " >&6; }
27802780+if test ${ac_cv_prog_ac_ct_CC+y}
27812781+then :
27822782+ printf %s "(cached) " >&6
27832783+else $as_nop
27842784+ if test -n "$ac_ct_CC"; then
27852785+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
27862786+else
27872787+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27882788+for as_dir in $PATH
27892789+do
27902790+ IFS=$as_save_IFS
27912791+ case $as_dir in #(((
27922792+ '') as_dir=./ ;;
27932793+ */) ;;
27942794+ *) as_dir=$as_dir/ ;;
27952795+ esac
27962796+ for ac_exec_ext in '' $ac_executable_extensions; do
27972797+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
27982798+ ac_cv_prog_ac_ct_CC="$ac_prog"
27992799+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
28002800+ break 2
28012801+ fi
28022802+done
28032803+ done
28042804+IFS=$as_save_IFS
28052805+28062806+fi
28072807+fi
28082808+ac_ct_CC=$ac_cv_prog_ac_ct_CC
28092809+if test -n "$ac_ct_CC"; then
28102810+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28112811+printf "%s\n" "$ac_ct_CC" >&6; }
28122812+else
28132813+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
28142814+printf "%s\n" "no" >&6; }
28152815+fi
28162816+28172817+28182818+ test -n "$ac_ct_CC" && break
28192819+done
28202820+28212821+ if test "x$ac_ct_CC" = x; then
28222822+ CC=""
28232823+ else
28242824+ case $cross_compiling:$ac_tool_warned in
28252825+yes:)
28262826+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28272827+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28282828+ac_tool_warned=yes ;;
28292829+esac
28302830+ CC=$ac_ct_CC
28312831+ fi
28322832+fi
28332833+28342834+fi
28352835+if test -z "$CC"; then
28362836+ if test -n "$ac_tool_prefix"; then
28372837+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
28382838+set dummy ${ac_tool_prefix}clang; ac_word=$2
28392839+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28402840+printf %s "checking for $ac_word... " >&6; }
28412841+if test ${ac_cv_prog_CC+y}
28422842+then :
28432843+ printf %s "(cached) " >&6
28442844+else $as_nop
28452845+ if test -n "$CC"; then
28462846+ ac_cv_prog_CC="$CC" # Let the user override the test.
28472847+else
28482848+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28492849+for as_dir in $PATH
28502850+do
28512851+ IFS=$as_save_IFS
28522852+ case $as_dir in #(((
28532853+ '') as_dir=./ ;;
28542854+ */) ;;
28552855+ *) as_dir=$as_dir/ ;;
28562856+ esac
28572857+ for ac_exec_ext in '' $ac_executable_extensions; do
28582858+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
28592859+ ac_cv_prog_CC="${ac_tool_prefix}clang"
28602860+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
28612861+ break 2
28622862+ fi
28632863+done
28642864+ done
28652865+IFS=$as_save_IFS
28662866+28672867+fi
28682868+fi
28692869+CC=$ac_cv_prog_CC
28702870+if test -n "$CC"; then
28712871+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28722872+printf "%s\n" "$CC" >&6; }
28732873+else
28742874+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
28752875+printf "%s\n" "no" >&6; }
28762876+fi
28772877+28782878+28792879+fi
28802880+if test -z "$ac_cv_prog_CC"; then
28812881+ ac_ct_CC=$CC
28822882+ # Extract the first word of "clang", so it can be a program name with args.
28832883+set dummy clang; ac_word=$2
28842884+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28852885+printf %s "checking for $ac_word... " >&6; }
28862886+if test ${ac_cv_prog_ac_ct_CC+y}
28872887+then :
28882888+ printf %s "(cached) " >&6
28892889+else $as_nop
28902890+ if test -n "$ac_ct_CC"; then
28912891+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28922892+else
28932893+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28942894+for as_dir in $PATH
28952895+do
28962896+ IFS=$as_save_IFS
28972897+ case $as_dir in #(((
28982898+ '') as_dir=./ ;;
28992899+ */) ;;
29002900+ *) as_dir=$as_dir/ ;;
29012901+ esac
29022902+ for ac_exec_ext in '' $ac_executable_extensions; do
29032903+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
29042904+ ac_cv_prog_ac_ct_CC="clang"
29052905+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
29062906+ break 2
29072907+ fi
29082908+done
29092909+ done
29102910+IFS=$as_save_IFS
29112911+29122912+fi
29132913+fi
29142914+ac_ct_CC=$ac_cv_prog_ac_ct_CC
29152915+if test -n "$ac_ct_CC"; then
29162916+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29172917+printf "%s\n" "$ac_ct_CC" >&6; }
29182918+else
29192919+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29202920+printf "%s\n" "no" >&6; }
29212921+fi
29222922+29232923+ if test "x$ac_ct_CC" = x; then
29242924+ CC=""
29252925+ else
29262926+ case $cross_compiling:$ac_tool_warned in
29272927+yes:)
29282928+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29292929+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29302930+ac_tool_warned=yes ;;
29312931+esac
29322932+ CC=$ac_ct_CC
29332933+ fi
29342934+else
29352935+ CC="$ac_cv_prog_CC"
29362936+fi
29372937+29382938+fi
29392939+29402940+29412941+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29422942+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
29432943+as_fn_error $? "no acceptable C compiler found in \$PATH
29442944+See \`config.log' for more details" "$LINENO" 5; }
29452945+29462946+# Provide some information about the compiler.
29472947+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29482948+set X $ac_compile
29492949+ac_compiler=$2
29502950+for ac_option in --version -v -V -qversion -version; do
29512951+ { { ac_try="$ac_compiler $ac_option >&5"
29522952+case "(($ac_try" in
29532953+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29542954+ *) ac_try_echo=$ac_try;;
29552955+esac
29562956+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29572957+printf "%s\n" "$ac_try_echo"; } >&5
29582958+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29592959+ ac_status=$?
29602960+ if test -s conftest.err; then
29612961+ sed '10a\
29622962+... rest of stderr output deleted ...
29632963+ 10q' conftest.err >conftest.er1
29642964+ cat conftest.er1 >&5
29652965+ fi
29662966+ rm -f conftest.er1 conftest.err
29672967+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29682968+ test $ac_status = 0; }
29692969+done
29702970+29712971+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29722972+/* end confdefs.h. */
29732973+29742974+int
29752975+main (void)
29762976+{
29772977+29782978+ ;
29792979+ return 0;
29802980+}
29812981+_ACEOF
29822982+ac_clean_files_save=$ac_clean_files
29832983+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29842984+# Try to create an executable without -o first, disregard a.out.
29852985+# It will help us diagnose broken compilers, and finding out an intuition
29862986+# of exeext.
29872987+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29882988+printf %s "checking whether the C compiler works... " >&6; }
29892989+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29902990+29912991+# The possible output files:
29922992+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29932993+29942994+ac_rmfiles=
29952995+for ac_file in $ac_files
29962996+do
29972997+ case $ac_file in
29982998+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29992999+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
30003000+ esac
30013001+done
30023002+rm -f $ac_rmfiles
30033003+30043004+if { { ac_try="$ac_link_default"
30053005+case "(($ac_try" in
30063006+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30073007+ *) ac_try_echo=$ac_try;;
30083008+esac
30093009+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30103010+printf "%s\n" "$ac_try_echo"; } >&5
30113011+ (eval "$ac_link_default") 2>&5
30123012+ ac_status=$?
30133013+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30143014+ test $ac_status = 0; }
30153015+then :
30163016+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
30173017+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
30183018+# in a Makefile. We should not override ac_cv_exeext if it was cached,
30193019+# so that the user can short-circuit this test for compilers unknown to
30203020+# Autoconf.
30213021+for ac_file in $ac_files ''
30223022+do
30233023+ test -f "$ac_file" || continue
30243024+ case $ac_file in
30253025+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
30263026+ ;;
30273027+ [ab].out )
30283028+ # We found the default executable, but exeext='' is most
30293029+ # certainly right.
30303030+ break;;
30313031+ *.* )
30323032+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
30333033+ then :; else
30343034+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30353035+ fi
30363036+ # We set ac_cv_exeext here because the later test for it is not
30373037+ # safe: cross compilers may not add the suffix if given an `-o'
30383038+ # argument, so we may need to know it at that point already.
30393039+ # Even if this section looks crufty: it has the advantage of
30403040+ # actually working.
30413041+ break;;
30423042+ * )
30433043+ break;;
30443044+ esac
30453045+done
30463046+test "$ac_cv_exeext" = no && ac_cv_exeext=
30473047+30483048+else $as_nop
30493049+ ac_file=''
30503050+fi
30513051+if test -z "$ac_file"
30523052+then :
30533053+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30543054+printf "%s\n" "no" >&6; }
30553055+printf "%s\n" "$as_me: failed program was:" >&5
30563056+sed 's/^/| /' conftest.$ac_ext >&5
30573057+30583058+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30593059+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
30603060+as_fn_error 77 "C compiler cannot create executables
30613061+See \`config.log' for more details" "$LINENO" 5; }
30623062+else $as_nop
30633063+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30643064+printf "%s\n" "yes" >&6; }
30653065+fi
30663066+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
30673067+printf %s "checking for C compiler default output file name... " >&6; }
30683068+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
30693069+printf "%s\n" "$ac_file" >&6; }
30703070+ac_exeext=$ac_cv_exeext
30713071+30723072+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
30733073+ac_clean_files=$ac_clean_files_save
30743074+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
30753075+printf %s "checking for suffix of executables... " >&6; }
30763076+if { { ac_try="$ac_link"
30773077+case "(($ac_try" in
30783078+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30793079+ *) ac_try_echo=$ac_try;;
30803080+esac
30813081+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30823082+printf "%s\n" "$ac_try_echo"; } >&5
30833083+ (eval "$ac_link") 2>&5
30843084+ ac_status=$?
30853085+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30863086+ test $ac_status = 0; }
30873087+then :
30883088+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
30893089+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
30903090+# work properly (i.e., refer to `conftest.exe'), while it won't with
30913091+# `rm'.
30923092+for ac_file in conftest.exe conftest conftest.*; do
30933093+ test -f "$ac_file" || continue
30943094+ case $ac_file in
30953095+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30963096+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30973097+ break;;
30983098+ * ) break;;
30993099+ esac
31003100+done
31013101+else $as_nop
31023102+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31033103+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
31043104+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
31053105+See \`config.log' for more details" "$LINENO" 5; }
31063106+fi
31073107+rm -f conftest conftest$ac_cv_exeext
31083108+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
31093109+printf "%s\n" "$ac_cv_exeext" >&6; }
31103110+31113111+rm -f conftest.$ac_ext
31123112+EXEEXT=$ac_cv_exeext
31133113+ac_exeext=$EXEEXT
31143114+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31153115+/* end confdefs.h. */
31163116+#include <stdio.h>
31173117+int
31183118+main (void)
31193119+{
31203120+FILE *f = fopen ("conftest.out", "w");
31213121+ return ferror (f) || fclose (f) != 0;
31223122+31233123+ ;
31243124+ return 0;
31253125+}
31263126+_ACEOF
31273127+ac_clean_files="$ac_clean_files conftest.out"
31283128+# Check that the compiler produces executables we can run. If not, either
31293129+# the compiler is broken, or we cross compile.
31303130+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
31313131+printf %s "checking whether we are cross compiling... " >&6; }
31323132+if test "$cross_compiling" != yes; then
31333133+ { { ac_try="$ac_link"
31343134+case "(($ac_try" in
31353135+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31363136+ *) ac_try_echo=$ac_try;;
31373137+esac
31383138+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31393139+printf "%s\n" "$ac_try_echo"; } >&5
31403140+ (eval "$ac_link") 2>&5
31413141+ ac_status=$?
31423142+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31433143+ test $ac_status = 0; }
31443144+ if { ac_try='./conftest$ac_cv_exeext'
31453145+ { { case "(($ac_try" in
31463146+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31473147+ *) ac_try_echo=$ac_try;;
31483148+esac
31493149+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31503150+printf "%s\n" "$ac_try_echo"; } >&5
31513151+ (eval "$ac_try") 2>&5
31523152+ ac_status=$?
31533153+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31543154+ test $ac_status = 0; }; }; then
31553155+ cross_compiling=no
31563156+ else
31573157+ if test "$cross_compiling" = maybe; then
31583158+ cross_compiling=yes
31593159+ else
31603160+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31613161+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
31623162+as_fn_error 77 "cannot run C compiled programs.
31633163+If you meant to cross compile, use \`--host'.
31643164+See \`config.log' for more details" "$LINENO" 5; }
31653165+ fi
31663166+ fi
31673167+fi
31683168+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
31693169+printf "%s\n" "$cross_compiling" >&6; }
31703170+31713171+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
31723172+ac_clean_files=$ac_clean_files_save
31733173+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
31743174+printf %s "checking for suffix of object files... " >&6; }
31753175+if test ${ac_cv_objext+y}
31763176+then :
31773177+ printf %s "(cached) " >&6
31783178+else $as_nop
31793179+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31803180+/* end confdefs.h. */
31813181+31823182+int
31833183+main (void)
31843184+{
31853185+31863186+ ;
31873187+ return 0;
31883188+}
31893189+_ACEOF
31903190+rm -f conftest.o conftest.obj
31913191+if { { ac_try="$ac_compile"
31923192+case "(($ac_try" in
31933193+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31943194+ *) ac_try_echo=$ac_try;;
31953195+esac
31963196+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31973197+printf "%s\n" "$ac_try_echo"; } >&5
31983198+ (eval "$ac_compile") 2>&5
31993199+ ac_status=$?
32003200+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32013201+ test $ac_status = 0; }
32023202+then :
32033203+ for ac_file in conftest.o conftest.obj conftest.*; do
32043204+ test -f "$ac_file" || continue;
32053205+ case $ac_file in
32063206+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32073207+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32083208+ break;;
32093209+ esac
32103210+done
32113211+else $as_nop
32123212+ printf "%s\n" "$as_me: failed program was:" >&5
32133213+sed 's/^/| /' conftest.$ac_ext >&5
32143214+32153215+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32163216+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
32173217+as_fn_error $? "cannot compute suffix of object files: cannot compile
32183218+See \`config.log' for more details" "$LINENO" 5; }
32193219+fi
32203220+rm -f conftest.$ac_cv_objext conftest.$ac_ext
32213221+fi
32223222+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32233223+printf "%s\n" "$ac_cv_objext" >&6; }
32243224+OBJEXT=$ac_cv_objext
32253225+ac_objext=$OBJEXT
32263226+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
32273227+printf %s "checking whether the compiler supports GNU C... " >&6; }
32283228+if test ${ac_cv_c_compiler_gnu+y}
32293229+then :
32303230+ printf %s "(cached) " >&6
32313231+else $as_nop
32323232+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32333233+/* end confdefs.h. */
32343234+32353235+int
32363236+main (void)
32373237+{
32383238+#ifndef __GNUC__
32393239+ choke me
32403240+#endif
32413241+32423242+ ;
32433243+ return 0;
32443244+}
32453245+_ACEOF
32463246+if ac_fn_c_try_compile "$LINENO"
32473247+then :
32483248+ ac_compiler_gnu=yes
32493249+else $as_nop
32503250+ ac_compiler_gnu=no
32513251+fi
32523252+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32533253+ac_cv_c_compiler_gnu=$ac_compiler_gnu
32543254+32553255+fi
32563256+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32573257+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
32583258+ac_compiler_gnu=$ac_cv_c_compiler_gnu
32593259+32603260+if test $ac_compiler_gnu = yes; then
32613261+ GCC=yes
32623262+else
32633263+ GCC=
32643264+fi
32653265+ac_test_CFLAGS=${CFLAGS+y}
32663266+ac_save_CFLAGS=$CFLAGS
32673267+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32683268+printf %s "checking whether $CC accepts -g... " >&6; }
32693269+if test ${ac_cv_prog_cc_g+y}
32703270+then :
32713271+ printf %s "(cached) " >&6
32723272+else $as_nop
32733273+ ac_save_c_werror_flag=$ac_c_werror_flag
32743274+ ac_c_werror_flag=yes
32753275+ ac_cv_prog_cc_g=no
32763276+ CFLAGS="-g"
32773277+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32783278+/* end confdefs.h. */
32793279+32803280+int
32813281+main (void)
32823282+{
32833283+32843284+ ;
32853285+ return 0;
32863286+}
32873287+_ACEOF
32883288+if ac_fn_c_try_compile "$LINENO"
32893289+then :
32903290+ ac_cv_prog_cc_g=yes
32913291+else $as_nop
32923292+ CFLAGS=""
32933293+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32943294+/* end confdefs.h. */
32953295+32963296+int
32973297+main (void)
32983298+{
32993299+33003300+ ;
33013301+ return 0;
33023302+}
33033303+_ACEOF
33043304+if ac_fn_c_try_compile "$LINENO"
33053305+then :
33063306+33073307+else $as_nop
33083308+ ac_c_werror_flag=$ac_save_c_werror_flag
33093309+ CFLAGS="-g"
33103310+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33113311+/* end confdefs.h. */
33123312+33133313+int
33143314+main (void)
33153315+{
33163316+33173317+ ;
33183318+ return 0;
33193319+}
33203320+_ACEOF
33213321+if ac_fn_c_try_compile "$LINENO"
33223322+then :
33233323+ ac_cv_prog_cc_g=yes
33243324+fi
33253325+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33263326+fi
33273327+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33283328+fi
33293329+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33303330+ ac_c_werror_flag=$ac_save_c_werror_flag
33313331+fi
33323332+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33333333+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
33343334+if test $ac_test_CFLAGS; then
33353335+ CFLAGS=$ac_save_CFLAGS
33363336+elif test $ac_cv_prog_cc_g = yes; then
33373337+ if test "$GCC" = yes; then
33383338+ CFLAGS="-g -O2"
33393339+ else
33403340+ CFLAGS="-g"
33413341+ fi
33423342+else
33433343+ if test "$GCC" = yes; then
33443344+ CFLAGS="-O2"
33453345+ else
33463346+ CFLAGS=
33473347+ fi
33483348+fi
33493349+ac_prog_cc_stdc=no
33503350+if test x$ac_prog_cc_stdc = xno
33513351+then :
33523352+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
33533353+printf %s "checking for $CC option to enable C11 features... " >&6; }
33543354+if test ${ac_cv_prog_cc_c11+y}
33553355+then :
33563356+ printf %s "(cached) " >&6
33573357+else $as_nop
33583358+ ac_cv_prog_cc_c11=no
33593359+ac_save_CC=$CC
33603360+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33613361+/* end confdefs.h. */
33623362+$ac_c_conftest_c11_program
33633363+_ACEOF
33643364+for ac_arg in '' -std=gnu11
33653365+do
33663366+ CC="$ac_save_CC $ac_arg"
33673367+ if ac_fn_c_try_compile "$LINENO"
33683368+then :
33693369+ ac_cv_prog_cc_c11=$ac_arg
33703370+fi
33713371+rm -f core conftest.err conftest.$ac_objext conftest.beam
33723372+ test "x$ac_cv_prog_cc_c11" != "xno" && break
33733373+done
33743374+rm -f conftest.$ac_ext
33753375+CC=$ac_save_CC
33763376+fi
33773377+33783378+if test "x$ac_cv_prog_cc_c11" = xno
33793379+then :
33803380+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33813381+printf "%s\n" "unsupported" >&6; }
33823382+else $as_nop
33833383+ if test "x$ac_cv_prog_cc_c11" = x
33843384+then :
33853385+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33863386+printf "%s\n" "none needed" >&6; }
33873387+else $as_nop
33883388+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
33893389+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
33903390+ CC="$CC $ac_cv_prog_cc_c11"
33913391+fi
33923392+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
33933393+ ac_prog_cc_stdc=c11
33943394+fi
33953395+fi
33963396+if test x$ac_prog_cc_stdc = xno
33973397+then :
33983398+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
33993399+printf %s "checking for $CC option to enable C99 features... " >&6; }
34003400+if test ${ac_cv_prog_cc_c99+y}
34013401+then :
34023402+ printf %s "(cached) " >&6
34033403+else $as_nop
34043404+ ac_cv_prog_cc_c99=no
34053405+ac_save_CC=$CC
34063406+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34073407+/* end confdefs.h. */
34083408+$ac_c_conftest_c99_program
34093409+_ACEOF
34103410+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
34113411+do
34123412+ CC="$ac_save_CC $ac_arg"
34133413+ if ac_fn_c_try_compile "$LINENO"
34143414+then :
34153415+ ac_cv_prog_cc_c99=$ac_arg
34163416+fi
34173417+rm -f core conftest.err conftest.$ac_objext conftest.beam
34183418+ test "x$ac_cv_prog_cc_c99" != "xno" && break
34193419+done
34203420+rm -f conftest.$ac_ext
34213421+CC=$ac_save_CC
34223422+fi
34233423+34243424+if test "x$ac_cv_prog_cc_c99" = xno
34253425+then :
34263426+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34273427+printf "%s\n" "unsupported" >&6; }
34283428+else $as_nop
34293429+ if test "x$ac_cv_prog_cc_c99" = x
34303430+then :
34313431+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34323432+printf "%s\n" "none needed" >&6; }
34333433+else $as_nop
34343434+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
34353435+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
34363436+ CC="$CC $ac_cv_prog_cc_c99"
34373437+fi
34383438+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
34393439+ ac_prog_cc_stdc=c99
34403440+fi
34413441+fi
34423442+if test x$ac_prog_cc_stdc = xno
34433443+then :
34443444+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
34453445+printf %s "checking for $CC option to enable C89 features... " >&6; }
34463446+if test ${ac_cv_prog_cc_c89+y}
34473447+then :
34483448+ printf %s "(cached) " >&6
34493449+else $as_nop
34503450+ ac_cv_prog_cc_c89=no
34513451+ac_save_CC=$CC
34523452+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34533453+/* end confdefs.h. */
34543454+$ac_c_conftest_c89_program
34553455+_ACEOF
34563456+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34573457+do
34583458+ CC="$ac_save_CC $ac_arg"
34593459+ if ac_fn_c_try_compile "$LINENO"
34603460+then :
34613461+ ac_cv_prog_cc_c89=$ac_arg
34623462+fi
34633463+rm -f core conftest.err conftest.$ac_objext conftest.beam
34643464+ test "x$ac_cv_prog_cc_c89" != "xno" && break
34653465+done
34663466+rm -f conftest.$ac_ext
34673467+CC=$ac_save_CC
34683468+fi
34693469+34703470+if test "x$ac_cv_prog_cc_c89" = xno
34713471+then :
34723472+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34733473+printf "%s\n" "unsupported" >&6; }
34743474+else $as_nop
34753475+ if test "x$ac_cv_prog_cc_c89" = x
34763476+then :
34773477+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34783478+printf "%s\n" "none needed" >&6; }
34793479+else $as_nop
34803480+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34813481+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
34823482+ CC="$CC $ac_cv_prog_cc_c89"
34833483+fi
34843484+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
34853485+ ac_prog_cc_stdc=c89
34863486+fi
34873487+fi
34883488+34893489+ac_ext=c
34903490+ac_cpp='$CPP $CPPFLAGS'
34913491+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34923492+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34933493+ac_compiler_gnu=$ac_cv_c_compiler_gnu
34943494+34953495+34963496+34973497+ac_header= ac_cache=
34983498+for ac_item in $ac_header_c_list
34993499+do
35003500+ if test $ac_cache; then
35013501+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
35023502+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
35033503+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
35043504+ fi
35053505+ ac_header= ac_cache=
35063506+ elif test $ac_header; then
35073507+ ac_cache=$ac_item
35083508+ else
35093509+ ac_header=$ac_item
35103510+ fi
35113511+done
35123512+35133513+35143514+35153515+35163516+35173517+35183518+35193519+35203520+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
35213521+then :
35223522+35233523+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
35243524+35253525+fi
35263526+ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default
35273527+"
35283528+if test "x$ac_cv_header_endian_h" = xyes
35293529+then :
35303530+ printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
35313531+35323532+fi
35333533+ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default
35343534+"
35353535+if test "x$ac_cv_header_sys_endian_h" = xyes
35363536+then :
35373537+ printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
35383538+35393539+fi
35403540+35413541+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
35423542+printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
35433543+if test ${ac_cv_c_undeclared_builtin_options+y}
35443544+then :
35453545+ printf %s "(cached) " >&6
35463546+else $as_nop
35473547+ ac_save_CFLAGS=$CFLAGS
35483548+ ac_cv_c_undeclared_builtin_options='cannot detect'
35493549+ for ac_arg in '' -fno-builtin; do
35503550+ CFLAGS="$ac_save_CFLAGS $ac_arg"
35513551+ # This test program should *not* compile successfully.
35523552+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35533553+/* end confdefs.h. */
35543554+35553555+int
35563556+main (void)
35573557+{
35583558+(void) strchr;
35593559+ ;
35603560+ return 0;
35613561+}
35623562+_ACEOF
35633563+if ac_fn_c_try_compile "$LINENO"
35643564+then :
35653565+35663566+else $as_nop
35673567+ # This test program should compile successfully.
35683568+ # No library function is consistently available on
35693569+ # freestanding implementations, so test against a dummy
35703570+ # declaration. Include always-available headers on the
35713571+ # off chance that they somehow elicit warnings.
35723572+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35733573+/* end confdefs.h. */
35743574+#include <float.h>
35753575+#include <limits.h>
35763576+#include <stdarg.h>
35773577+#include <stddef.h>
35783578+extern void ac_decl (int, char *);
35793579+35803580+int
35813581+main (void)
35823582+{
35833583+(void) ac_decl (0, (char *) 0);
35843584+ (void) ac_decl;
35853585+35863586+ ;
35873587+ return 0;
35883588+}
35893589+_ACEOF
35903590+if ac_fn_c_try_compile "$LINENO"
35913591+then :
35923592+ if test x"$ac_arg" = x
35933593+then :
35943594+ ac_cv_c_undeclared_builtin_options='none needed'
35953595+else $as_nop
35963596+ ac_cv_c_undeclared_builtin_options=$ac_arg
35973597+fi
35983598+ break
35993599+fi
36003600+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
36013601+fi
36023602+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
36033603+ done
36043604+ CFLAGS=$ac_save_CFLAGS
36053605+36063606+fi
36073607+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
36083608+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
36093609+ case $ac_cv_c_undeclared_builtin_options in #(
36103610+ 'cannot detect') :
36113611+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36123612+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
36133613+as_fn_error $? "cannot make $CC report undeclared builtins
36143614+See \`config.log' for more details" "$LINENO" 5; } ;; #(
36153615+ 'none needed') :
36163616+ ac_c_undeclared_builtin_options='' ;; #(
36173617+ *) :
36183618+ ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
36193619+esac
36203620+36213621+ac_fn_check_decl "$LINENO" "bswap16" "ac_cv_have_decl_bswap16" "
36223622+$ac_includes_default
36233623+#ifdef HAVE_ENDIAN_H
36243624+#include <endian.h>
36253625+#endif
36263626+#ifdef HAVE_SYS_ENDIAN_H
36273627+#include <sys/endian.h>
36283628+#endif
36293629+36303630+" "$ac_c_undeclared_builtin_options" "CFLAGS"
36313631+if test "x$ac_cv_have_decl_bswap16" = xyes
36323632+then :
36333633+ ac_have_decl=1
36343634+else $as_nop
36353635+ ac_have_decl=0
36363636+fi
36373637+printf "%s\n" "#define HAVE_DECL_BSWAP16 $ac_have_decl" >>confdefs.h
36383638+ac_fn_check_decl "$LINENO" "bswap32" "ac_cv_have_decl_bswap32" "
36393639+$ac_includes_default
36403640+#ifdef HAVE_ENDIAN_H
36413641+#include <endian.h>
36423642+#endif
36433643+#ifdef HAVE_SYS_ENDIAN_H
36443644+#include <sys/endian.h>
36453645+#endif
36463646+36473647+" "$ac_c_undeclared_builtin_options" "CFLAGS"
36483648+if test "x$ac_cv_have_decl_bswap32" = xyes
36493649+then :
36503650+ ac_have_decl=1
36513651+else $as_nop
36523652+ ac_have_decl=0
36533653+fi
36543654+printf "%s\n" "#define HAVE_DECL_BSWAP32 $ac_have_decl" >>confdefs.h
36553655+ac_fn_check_decl "$LINENO" "bswap64" "ac_cv_have_decl_bswap64" "
36563656+$ac_includes_default
36573657+#ifdef HAVE_ENDIAN_H
36583658+#include <endian.h>
36593659+#endif
36603660+#ifdef HAVE_SYS_ENDIAN_H
36613661+#include <sys/endian.h>
36623662+#endif
36633663+36643664+" "$ac_c_undeclared_builtin_options" "CFLAGS"
36653665+if test "x$ac_cv_have_decl_bswap64" = xyes
36663666+then :
36673667+ ac_have_decl=1
36683668+else $as_nop
36693669+ ac_have_decl=0
36703670+fi
36713671+printf "%s\n" "#define HAVE_DECL_BSWAP64 $ac_have_decl" >>confdefs.h
36723672+36733673+36743674+# Check whether --enable-westmere was given.
36753675+if test ${enable_westmere+y}
36763676+then :
36773677+ enableval=$enable_westmere;
36783678+fi
36793679+36803680+case "$enable_westmere" in
36813681+ no) enable_westmere=no ;;
36823682+ yes|*) enable_westmere=yes ;;
36833683+esac
36843684+36853685+# Check whether --enable-haswell was given.
36863686+if test ${enable_haswell+y}
36873687+then :
36883688+ enableval=$enable_haswell;
36893689+fi
36903690+36913691+case "$enable_haswell" in
36923692+ no) enable_haswell=no ;;
36933693+ yes|*) enable_haswell=yes ;;
36943694+esac
36953695+36963696+# GCC and Clang
36973697+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -MMD" >&5
36983698+printf %s "checking whether C compiler accepts -MMD... " >&6; }
36993699+if test ${ax_cv_check_cflags___MMD+y}
37003700+then :
37013701+ printf %s "(cached) " >&6
37023702+else $as_nop
37033703+37043704+ ax_check_save_flags=$CFLAGS
37053705+ CFLAGS="$CFLAGS -MMD"
37063706+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37073707+/* end confdefs.h. */
37083708+37093709+int
37103710+main (void)
37113711+{
37123712+37133713+ ;
37143714+ return 0;
37153715+}
37163716+_ACEOF
37173717+if ac_fn_c_try_compile "$LINENO"
37183718+then :
37193719+ ax_cv_check_cflags___MMD=yes
37203720+else $as_nop
37213721+ ax_cv_check_cflags___MMD=no
37223722+fi
37233723+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37243724+ CFLAGS=$ax_check_save_flags
37253725+fi
37263726+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___MMD" >&5
37273727+printf "%s\n" "$ax_cv_check_cflags___MMD" >&6; }
37283728+if test "x$ax_cv_check_cflags___MMD" = xyes
37293729+then :
37303730+ DEPFLAGS="-MMD -MP"
37313731+else $as_nop
37323732+ :
37333733+fi
37343734+37353735+# Oracle Developer Studio (no -MP)
37363736+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -xMMD" >&5
37373737+printf %s "checking whether C compiler accepts -xMMD... " >&6; }
37383738+if test ${ax_cv_check_cflags___xMMD+y}
37393739+then :
37403740+ printf %s "(cached) " >&6
37413741+else $as_nop
37423742+37433743+ ax_check_save_flags=$CFLAGS
37443744+ CFLAGS="$CFLAGS -xMMD"
37453745+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37463746+/* end confdefs.h. */
37473747+37483748+int
37493749+main (void)
37503750+{
37513751+37523752+ ;
37533753+ return 0;
37543754+}
37553755+_ACEOF
37563756+if ac_fn_c_try_compile "$LINENO"
37573757+then :
37583758+ ax_cv_check_cflags___xMMD=yes
37593759+else $as_nop
37603760+ ax_cv_check_cflags___xMMD=no
37613761+fi
37623762+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37633763+ CFLAGS=$ax_check_save_flags
37643764+fi
37653765+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___xMMD" >&5
37663766+printf "%s\n" "$ax_cv_check_cflags___xMMD" >&6; }
37673767+if test "x$ax_cv_check_cflags___xMMD" = xyes
37683768+then :
37693769+ DEPFLAGS="-xMMD"
37703770+else $as_nop
37713771+ :
37723772+fi
37733773+37743774+37753775+37763776+37773777+# Figure out the canonical target architecture.
37783778+37793779+37803780+37813781+ # Make sure we can run config.sub.
37823782+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
37833783+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
37843784+37853785+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
37863786+printf %s "checking build system type... " >&6; }
37873787+if test ${ac_cv_build+y}
37883788+then :
37893789+ printf %s "(cached) " >&6
37903790+else $as_nop
37913791+ ac_build_alias=$build_alias
37923792+test "x$ac_build_alias" = x &&
37933793+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
37943794+test "x$ac_build_alias" = x &&
37953795+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
37963796+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
37973797+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
37983798+37993799+fi
38003800+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
38013801+printf "%s\n" "$ac_cv_build" >&6; }
38023802+case $ac_cv_build in
38033803+*-*-*) ;;
38043804+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
38053805+esac
38063806+build=$ac_cv_build
38073807+ac_save_IFS=$IFS; IFS='-'
38083808+set x $ac_cv_build
38093809+shift
38103810+build_cpu=$1
38113811+build_vendor=$2
38123812+shift; shift
38133813+# Remember, the first character of IFS is used to create $*,
38143814+# except with old shells:
38153815+build_os=$*
38163816+IFS=$ac_save_IFS
38173817+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
38183818+38193819+38203820+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
38213821+printf %s "checking host system type... " >&6; }
38223822+if test ${ac_cv_host+y}
38233823+then :
38243824+ printf %s "(cached) " >&6
38253825+else $as_nop
38263826+ if test "x$host_alias" = x; then
38273827+ ac_cv_host=$ac_cv_build
38283828+else
38293829+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
38303830+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
38313831+fi
38323832+38333833+fi
38343834+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
38353835+printf "%s\n" "$ac_cv_host" >&6; }
38363836+case $ac_cv_host in
38373837+*-*-*) ;;
38383838+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
38393839+esac
38403840+host=$ac_cv_host
38413841+ac_save_IFS=$IFS; IFS='-'
38423842+set x $ac_cv_host
38433843+shift
38443844+host_cpu=$1
38453845+host_vendor=$2
38463846+shift; shift
38473847+# Remember, the first character of IFS is used to create $*,
38483848+# except with old shells:
38493849+host_os=$*
38503850+IFS=$ac_save_IFS
38513851+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
38523852+38533853+38543854+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
38553855+printf %s "checking target system type... " >&6; }
38563856+if test ${ac_cv_target+y}
38573857+then :
38583858+ printf %s "(cached) " >&6
38593859+else $as_nop
38603860+ if test "x$target_alias" = x; then
38613861+ ac_cv_target=$ac_cv_host
38623862+else
38633863+ ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` ||
38643864+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5
38653865+fi
38663866+38673867+fi
38683868+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
38693869+printf "%s\n" "$ac_cv_target" >&6; }
38703870+case $ac_cv_target in
38713871+*-*-*) ;;
38723872+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
38733873+esac
38743874+target=$ac_cv_target
38753875+ac_save_IFS=$IFS; IFS='-'
38763876+set x $ac_cv_target
38773877+shift
38783878+target_cpu=$1
38793879+target_vendor=$2
38803880+shift; shift
38813881+# Remember, the first character of IFS is used to create $*,
38823882+# except with old shells:
38833883+target_os=$*
38843884+IFS=$ac_save_IFS
38853885+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
38863886+38873887+38883888+# The aliases save the names the user supplied, while $host etc.
38893889+# will get canonicalized.
38903890+test -n "$target_alias" &&
38913891+ test "$program_prefix$program_suffix$program_transform_name" = \
38923892+ NONENONEs,x,x, &&
38933893+ program_prefix=${target_alias}-
38943894+38953895+# Multiple instruction sets may be supported by a specific architecture.
38963896+# e.g. x86_64 may (or may not) support any of SSE42, AVX2 and AVX-512. The
38973897+# best instruction set is automatically selected at runtime, but the compiler
38983898+# may or may not support generating code for an instruction set.
38993899+case "$target" in
39003900+ *amd64*) x86_64=yes ;;
39013901+ *x86_64*) x86_64=yes ;;
39023902+ *) x86_64=no ;;
39033903+esac
39043904+39053905+HAVE_WESTMERE=NO
39063906+HAVE_HASWELL=NO
39073907+39083908+if test $x86_64 = "yes"; then
39093909+ ac_fn_c_check_header_compile "$LINENO" "immintrin.h" "ac_cv_header_immintrin_h" "$ac_includes_default"
39103910+if test "x$ac_cv_header_immintrin_h" = xyes
39113911+then :
39123912+39133913+fi
39143914+39153915+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -march=westmere" >&5
39163916+printf %s "checking whether C compiler accepts -march=westmere... " >&6; }
39173917+if test ${ax_cv_check_cflags__Werror__march_westmere+y}
39183918+then :
39193919+ printf %s "(cached) " >&6
39203920+else $as_nop
39213921+39223922+ ax_check_save_flags=$CFLAGS
39233923+ CFLAGS="$CFLAGS -Werror -march=westmere"
39243924+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39253925+/* end confdefs.h. */
39263926+39273927+int
39283928+main (void)
39293929+{
39303930+39313931+ ;
39323932+ return 0;
39333933+}
39343934+_ACEOF
39353935+if ac_fn_c_try_compile "$LINENO"
39363936+then :
39373937+ ax_cv_check_cflags__Werror__march_westmere=yes
39383938+else $as_nop
39393939+ ax_cv_check_cflags__Werror__march_westmere=no
39403940+fi
39413941+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39423942+ CFLAGS=$ax_check_save_flags
39433943+fi
39443944+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__march_westmere" >&5
39453945+printf "%s\n" "$ax_cv_check_cflags__Werror__march_westmere" >&6; }
39463946+if test "x$ax_cv_check_cflags__Werror__march_westmere" = xyes
39473947+then :
39483948+ :
39493949+else $as_nop
39503950+ :
39513951+fi
39523952+39533953+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -march=haswell" >&5
39543954+printf %s "checking whether C compiler accepts -march=haswell... " >&6; }
39553955+if test ${ax_cv_check_cflags__Werror__march_haswell+y}
39563956+then :
39573957+ printf %s "(cached) " >&6
39583958+else $as_nop
39593959+39603960+ ax_check_save_flags=$CFLAGS
39613961+ CFLAGS="$CFLAGS -Werror -march=haswell"
39623962+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39633963+/* end confdefs.h. */
39643964+39653965+int
39663966+main (void)
39673967+{
39683968+39693969+ ;
39703970+ return 0;
39713971+}
39723972+_ACEOF
39733973+if ac_fn_c_try_compile "$LINENO"
39743974+then :
39753975+ ax_cv_check_cflags__Werror__march_haswell=yes
39763976+else $as_nop
39773977+ ax_cv_check_cflags__Werror__march_haswell=no
39783978+fi
39793979+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39803980+ CFLAGS=$ax_check_save_flags
39813981+fi
39823982+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__march_haswell" >&5
39833983+printf "%s\n" "$ax_cv_check_cflags__Werror__march_haswell" >&6; }
39843984+if test "x$ax_cv_check_cflags__Werror__march_haswell" = xyes
39853985+then :
39863986+ :
39873987+else $as_nop
39883988+ :
39893989+fi
39903990+39913991+39923992+ # Check if the arch instruction set support includes the simd instructions.
39933993+ if test $enable_westmere != "no" -a \
39943994+ $ax_cv_check_cflags__Werror__march_westmere = "yes" -a \
39953995+ $ac_cv_header_immintrin_h = "yes" ; then
39963996+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -march=westmere works" >&5
39973997+printf %s "checking whether -march=westmere works... " >&6; }
39983998+ BAKCFLAGS="$CFLAGS"
39993999+ CFLAGS="-march=westmere $CFLAGS"
40004000+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40014001+/* end confdefs.h. */
40024002+40034003+$ac_includes_default
40044004+40054005+#include <stdint.h>
40064006+#include <immintrin.h>
40074007+40084008+int main(int argc, char *argv[])
40094009+{
40104010+ (void)argv;
40114011+ uint64_t popcnt = _mm_popcnt_u64((uint64_t)argc);
40124012+ return popcnt == 11;
40134013+}
40144014+40154015+40164016+_ACEOF
40174017+if ac_fn_c_try_compile "$LINENO"
40184018+then :
40194019+40204020+40214021+printf "%s\n" "#define HAVE_WESTMERE 1" >>confdefs.h
40224022+40234023+ HAVE_WESTMERE=WESTMERE
40244024+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40254025+printf "%s\n" "yes" >&6; }
40264026+40274027+else $as_nop
40284028+40294029+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40304030+printf "%s\n" "no" >&6; }
40314031+40324032+fi
40334033+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40344034+ CFLAGS="$BAKCFLAGS"
40354035+ fi
40364036+40374037+ if test $enable_haswell != "no" -a \
40384038+ $ax_cv_check_cflags__Werror__march_haswell = "yes" -a \
40394039+ $ac_cv_header_immintrin_h = "yes" ; then
40404040+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -march=haswell works" >&5
40414041+printf %s "checking whether -march=haswell works... " >&6; }
40424042+ BAKCFLAGS="$CFLAGS"
40434043+ CFLAGS="-march=haswell $CFLAGS"
40444044+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40454045+/* end confdefs.h. */
40464046+40474047+$ac_includes_default
40484048+40494049+#include <stdint.h>
40504050+#include <immintrin.h>
40514051+40524052+int main(int argc, char *argv[])
40534053+{
40544054+ (void)argv;
40554055+ int argc32x8[8] = { argc, 0, 0, 0, 0, 0, 0, 0 };
40564056+ __m256i argc256 = _mm256_loadu_si256((__m256i *)argc32x8);
40574057+ return _mm256_testz_si256(argc256, _mm256_set1_epi8(11));
40584058+}
40594059+40604060+40614061+_ACEOF
40624062+if ac_fn_c_try_compile "$LINENO"
40634063+then :
40644064+40654065+40664066+printf "%s\n" "#define HAVE_HASWELL 1" >>confdefs.h
40674067+40684068+ HAVE_HASWELL=HASWELL
40694069+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40704070+printf "%s\n" "yes" >&6; }
40714071+40724072+else $as_nop
40734073+40744074+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40754075+printf "%s\n" "no" >&6; }
40764076+40774077+fi
40784078+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40794079+ CFLAGS="$BAKCFLAGS"
40804080+ fi
40814081+fi
40824082+40834083+40844084+ for ac_func in realpath
40854085+do :
40864086+ ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath"
40874087+if test "x$ac_cv_func_realpath" = xyes
40884088+then :
40894089+ printf "%s\n" "#define HAVE_REALPATH 1" >>confdefs.h
40904090+40914091+else $as_nop
40924092+ as_fn_error $? "realpath is not available" "$LINENO" 5
40934093+fi
40944094+40954095+done
40964096+40974097+40984098+40994099+41004100+41014101+41024102+41034103+cat >confcache <<\_ACEOF
41044104+# This file is a shell script that caches the results of configure
41054105+# tests run on this system so they can be shared between configure
41064106+# scripts and configure runs, see configure's option --config-cache.
41074107+# It is not useful on other systems. If it contains results you don't
41084108+# want to keep, you may remove or edit it.
41094109+#
41104110+# config.status only pays attention to the cache file if you give it
41114111+# the --recheck option to rerun configure.
41124112+#
41134113+# `ac_cv_env_foo' variables (set or unset) will be overridden when
41144114+# loading this file, other *unset* `ac_cv_foo' will be assigned the
41154115+# following values.
41164116+41174117+_ACEOF
41184118+41194119+# The following way of writing the cache mishandles newlines in values,
41204120+# but we know of no workaround that is simple, portable, and efficient.
41214121+# So, we kill variables containing newlines.
41224122+# Ultrix sh set writes to stderr and can't be redirected directly,
41234123+# and sets the high bit in the cache file unless we assign to the vars.
41244124+(
41254125+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
41264126+ eval ac_val=\$$ac_var
41274127+ case $ac_val in #(
41284128+ *${as_nl}*)
41294129+ case $ac_var in #(
41304130+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
41314131+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
41324132+ esac
41334133+ case $ac_var in #(
41344134+ _ | IFS | as_nl) ;; #(
41354135+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
41364136+ *) { eval $ac_var=; unset $ac_var;} ;;
41374137+ esac ;;
41384138+ esac
41394139+ done
41404140+41414141+ (set) 2>&1 |
41424142+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
41434143+ *${as_nl}ac_space=\ *)
41444144+ # `set' does not quote correctly, so add quotes: double-quote
41454145+ # substitution turns \\\\ into \\, and sed turns \\ into \.
41464146+ sed -n \
41474147+ "s/'/'\\\\''/g;
41484148+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
41494149+ ;; #(
41504150+ *)
41514151+ # `set' quotes correctly as required by POSIX, so do not add quotes.
41524152+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
41534153+ ;;
41544154+ esac |
41554155+ sort
41564156+) |
41574157+ sed '
41584158+ /^ac_cv_env_/b end
41594159+ t clear
41604160+ :clear
41614161+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
41624162+ t end
41634163+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
41644164+ :end' >>confcache
41654165+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
41664166+ if test -w "$cache_file"; then
41674167+ if test "x$cache_file" != "x/dev/null"; then
41684168+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
41694169+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
41704170+ if test ! -f "$cache_file" || test -h "$cache_file"; then
41714171+ cat confcache >"$cache_file"
41724172+ else
41734173+ case $cache_file in #(
41744174+ */* | ?:*)
41754175+ mv -f confcache "$cache_file"$$ &&
41764176+ mv -f "$cache_file"$$ "$cache_file" ;; #(
41774177+ *)
41784178+ mv -f confcache "$cache_file" ;;
41794179+ esac
41804180+ fi
41814181+ fi
41824182+ else
41834183+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
41844184+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
41854185+ fi
41864186+fi
41874187+rm -f confcache
41884188+41894189+test "x$prefix" = xNONE && prefix=$ac_default_prefix
41904190+# Let make expand exec_prefix.
41914191+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
41924192+41934193+DEFS=-DHAVE_CONFIG_H
41944194+41954195+ac_libobjs=
41964196+ac_ltlibobjs=
41974197+U=
41984198+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
41994199+ # 1. Remove the extension, and $U if already installed.
42004200+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
42014201+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
42024202+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
42034203+ # will be set to the directory where LIBOBJS objects are built.
42044204+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
42054205+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
42064206+done
42074207+LIBOBJS=$ac_libobjs
42084208+42094209+LTLIBOBJS=$ac_ltlibobjs
42104210+42114211+42124212+42134213+: "${CONFIG_STATUS=./config.status}"
42144214+ac_write_fail=0
42154215+ac_clean_files_save=$ac_clean_files
42164216+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
42174217+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
42184218+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
42194219+as_write_fail=0
42204220+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
42214221+#! $SHELL
42224222+# Generated by $as_me.
42234223+# Run this file to recreate the current configuration.
42244224+# Compiler output produced by configure, useful for debugging
42254225+# configure, is in config.log if it exists.
42264226+42274227+debug=false
42284228+ac_cs_recheck=false
42294229+ac_cs_silent=false
42304230+42314231+SHELL=\${CONFIG_SHELL-$SHELL}
42324232+export SHELL
42334233+_ASEOF
42344234+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
42354235+## -------------------- ##
42364236+## M4sh Initialization. ##
42374237+## -------------------- ##
42384238+42394239+# Be more Bourne compatible
42404240+DUALCASE=1; export DUALCASE # for MKS sh
42414241+as_nop=:
42424242+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
42434243+then :
42444244+ emulate sh
42454245+ NULLCMD=:
42464246+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
42474247+ # is contrary to our usage. Disable this feature.
42484248+ alias -g '${1+"$@"}'='"$@"'
42494249+ setopt NO_GLOB_SUBST
42504250+else $as_nop
42514251+ case `(set -o) 2>/dev/null` in #(
42524252+ *posix*) :
42534253+ set -o posix ;; #(
42544254+ *) :
42554255+ ;;
42564256+esac
42574257+fi
42584258+42594259+42604260+42614261+# Reset variables that may have inherited troublesome values from
42624262+# the environment.
42634263+42644264+# IFS needs to be set, to space, tab, and newline, in precisely that order.
42654265+# (If _AS_PATH_WALK were called with IFS unset, it would have the
42664266+# side effect of setting IFS to empty, thus disabling word splitting.)
42674267+# Quoting is to prevent editors from complaining about space-tab.
42684268+as_nl='
42694269+'
42704270+export as_nl
42714271+IFS=" "" $as_nl"
42724272+42734273+PS1='$ '
42744274+PS2='> '
42754275+PS4='+ '
42764276+42774277+# Ensure predictable behavior from utilities with locale-dependent output.
42784278+LC_ALL=C
42794279+export LC_ALL
42804280+LANGUAGE=C
42814281+export LANGUAGE
42824282+42834283+# We cannot yet rely on "unset" to work, but we need these variables
42844284+# to be unset--not just set to an empty or harmless value--now, to
42854285+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
42864286+# also avoids known problems related to "unset" and subshell syntax
42874287+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
42884288+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
42894289+do eval test \${$as_var+y} \
42904290+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
42914291+done
42924292+42934293+# Ensure that fds 0, 1, and 2 are open.
42944294+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
42954295+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
42964296+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
42974297+42984298+# The user is always right.
42994299+if ${PATH_SEPARATOR+false} :; then
43004300+ PATH_SEPARATOR=:
43014301+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
43024302+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
43034303+ PATH_SEPARATOR=';'
43044304+ }
43054305+fi
43064306+43074307+43084308+# Find who we are. Look in the path if we contain no directory separator.
43094309+as_myself=
43104310+case $0 in #((
43114311+ *[\\/]* ) as_myself=$0 ;;
43124312+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43134313+for as_dir in $PATH
43144314+do
43154315+ IFS=$as_save_IFS
43164316+ case $as_dir in #(((
43174317+ '') as_dir=./ ;;
43184318+ */) ;;
43194319+ *) as_dir=$as_dir/ ;;
43204320+ esac
43214321+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
43224322+ done
43234323+IFS=$as_save_IFS
43244324+43254325+ ;;
43264326+esac
43274327+# We did not find ourselves, most probably we were run as `sh COMMAND'
43284328+# in which case we are not to be found in the path.
43294329+if test "x$as_myself" = x; then
43304330+ as_myself=$0
43314331+fi
43324332+if test ! -f "$as_myself"; then
43334333+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
43344334+ exit 1
43354335+fi
43364336+43374337+43384338+43394339+# as_fn_error STATUS ERROR [LINENO LOG_FD]
43404340+# ----------------------------------------
43414341+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
43424342+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
43434343+# script with STATUS, using 1 if that was 0.
43444344+as_fn_error ()
43454345+{
43464346+ as_status=$1; test $as_status -eq 0 && as_status=1
43474347+ if test "$4"; then
43484348+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
43494349+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
43504350+ fi
43514351+ printf "%s\n" "$as_me: error: $2" >&2
43524352+ as_fn_exit $as_status
43534353+} # as_fn_error
43544354+43554355+43564356+43574357+# as_fn_set_status STATUS
43584358+# -----------------------
43594359+# Set $? to STATUS, without forking.
43604360+as_fn_set_status ()
43614361+{
43624362+ return $1
43634363+} # as_fn_set_status
43644364+43654365+# as_fn_exit STATUS
43664366+# -----------------
43674367+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
43684368+as_fn_exit ()
43694369+{
43704370+ set +e
43714371+ as_fn_set_status $1
43724372+ exit $1
43734373+} # as_fn_exit
43744374+43754375+# as_fn_unset VAR
43764376+# ---------------
43774377+# Portably unset VAR.
43784378+as_fn_unset ()
43794379+{
43804380+ { eval $1=; unset $1;}
43814381+}
43824382+as_unset=as_fn_unset
43834383+43844384+# as_fn_append VAR VALUE
43854385+# ----------------------
43864386+# Append the text in VALUE to the end of the definition contained in VAR. Take
43874387+# advantage of any shell optimizations that allow amortized linear growth over
43884388+# repeated appends, instead of the typical quadratic growth present in naive
43894389+# implementations.
43904390+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
43914391+then :
43924392+ eval 'as_fn_append ()
43934393+ {
43944394+ eval $1+=\$2
43954395+ }'
43964396+else $as_nop
43974397+ as_fn_append ()
43984398+ {
43994399+ eval $1=\$$1\$2
44004400+ }
44014401+fi # as_fn_append
44024402+44034403+# as_fn_arith ARG...
44044404+# ------------------
44054405+# Perform arithmetic evaluation on the ARGs, and store the result in the
44064406+# global $as_val. Take advantage of shells that can avoid forks. The arguments
44074407+# must be portable across $(()) and expr.
44084408+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
44094409+then :
44104410+ eval 'as_fn_arith ()
44114411+ {
44124412+ as_val=$(( $* ))
44134413+ }'
44144414+else $as_nop
44154415+ as_fn_arith ()
44164416+ {
44174417+ as_val=`expr "$@" || test $? -eq 1`
44184418+ }
44194419+fi # as_fn_arith
44204420+44214421+44224422+if expr a : '\(a\)' >/dev/null 2>&1 &&
44234423+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
44244424+ as_expr=expr
44254425+else
44264426+ as_expr=false
44274427+fi
44284428+44294429+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
44304430+ as_basename=basename
44314431+else
44324432+ as_basename=false
44334433+fi
44344434+44354435+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
44364436+ as_dirname=dirname
44374437+else
44384438+ as_dirname=false
44394439+fi
44404440+44414441+as_me=`$as_basename -- "$0" ||
44424442+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
44434443+ X"$0" : 'X\(//\)$' \| \
44444444+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
44454445+printf "%s\n" X/"$0" |
44464446+ sed '/^.*\/\([^/][^/]*\)\/*$/{
44474447+ s//\1/
44484448+ q
44494449+ }
44504450+ /^X\/\(\/\/\)$/{
44514451+ s//\1/
44524452+ q
44534453+ }
44544454+ /^X\/\(\/\).*/{
44554455+ s//\1/
44564456+ q
44574457+ }
44584458+ s/.*/./; q'`
44594459+44604460+# Avoid depending upon Character Ranges.
44614461+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
44624462+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
44634463+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
44644464+as_cr_digits='0123456789'
44654465+as_cr_alnum=$as_cr_Letters$as_cr_digits
44664466+44674467+44684468+# Determine whether it's possible to make 'echo' print without a newline.
44694469+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
44704470+# for compatibility with existing Makefiles.
44714471+ECHO_C= ECHO_N= ECHO_T=
44724472+case `echo -n x` in #(((((
44734473+-n*)
44744474+ case `echo 'xy\c'` in
44754475+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
44764476+ xy) ECHO_C='\c';;
44774477+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
44784478+ ECHO_T=' ';;
44794479+ esac;;
44804480+*)
44814481+ ECHO_N='-n';;
44824482+esac
44834483+44844484+# For backward compatibility with old third-party macros, we provide
44854485+# the shell variables $as_echo and $as_echo_n. New code should use
44864486+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
44874487+as_echo='printf %s\n'
44884488+as_echo_n='printf %s'
44894489+44904490+rm -f conf$$ conf$$.exe conf$$.file
44914491+if test -d conf$$.dir; then
44924492+ rm -f conf$$.dir/conf$$.file
44934493+else
44944494+ rm -f conf$$.dir
44954495+ mkdir conf$$.dir 2>/dev/null
44964496+fi
44974497+if (echo >conf$$.file) 2>/dev/null; then
44984498+ if ln -s conf$$.file conf$$ 2>/dev/null; then
44994499+ as_ln_s='ln -s'
45004500+ # ... but there are two gotchas:
45014501+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
45024502+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
45034503+ # In both cases, we have to default to `cp -pR'.
45044504+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
45054505+ as_ln_s='cp -pR'
45064506+ elif ln conf$$.file conf$$ 2>/dev/null; then
45074507+ as_ln_s=ln
45084508+ else
45094509+ as_ln_s='cp -pR'
45104510+ fi
45114511+else
45124512+ as_ln_s='cp -pR'
45134513+fi
45144514+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
45154515+rmdir conf$$.dir 2>/dev/null
45164516+45174517+45184518+# as_fn_mkdir_p
45194519+# -------------
45204520+# Create "$as_dir" as a directory, including parents if necessary.
45214521+as_fn_mkdir_p ()
45224522+{
45234523+45244524+ case $as_dir in #(
45254525+ -*) as_dir=./$as_dir;;
45264526+ esac
45274527+ test -d "$as_dir" || eval $as_mkdir_p || {
45284528+ as_dirs=
45294529+ while :; do
45304530+ case $as_dir in #(
45314531+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
45324532+ *) as_qdir=$as_dir;;
45334533+ esac
45344534+ as_dirs="'$as_qdir' $as_dirs"
45354535+ as_dir=`$as_dirname -- "$as_dir" ||
45364536+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45374537+ X"$as_dir" : 'X\(//\)[^/]' \| \
45384538+ X"$as_dir" : 'X\(//\)$' \| \
45394539+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
45404540+printf "%s\n" X"$as_dir" |
45414541+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
45424542+ s//\1/
45434543+ q
45444544+ }
45454545+ /^X\(\/\/\)[^/].*/{
45464546+ s//\1/
45474547+ q
45484548+ }
45494549+ /^X\(\/\/\)$/{
45504550+ s//\1/
45514551+ q
45524552+ }
45534553+ /^X\(\/\).*/{
45544554+ s//\1/
45554555+ q
45564556+ }
45574557+ s/.*/./; q'`
45584558+ test -d "$as_dir" && break
45594559+ done
45604560+ test -z "$as_dirs" || eval "mkdir $as_dirs"
45614561+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
45624562+45634563+45644564+} # as_fn_mkdir_p
45654565+if mkdir -p . 2>/dev/null; then
45664566+ as_mkdir_p='mkdir -p "$as_dir"'
45674567+else
45684568+ test -d ./-p && rmdir ./-p
45694569+ as_mkdir_p=false
45704570+fi
45714571+45724572+45734573+# as_fn_executable_p FILE
45744574+# -----------------------
45754575+# Test if FILE is an executable regular file.
45764576+as_fn_executable_p ()
45774577+{
45784578+ test -f "$1" && test -x "$1"
45794579+} # as_fn_executable_p
45804580+as_test_x='test -x'
45814581+as_executable_p=as_fn_executable_p
45824582+45834583+# Sed expression to map a string onto a valid CPP name.
45844584+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
45854585+45864586+# Sed expression to map a string onto a valid variable name.
45874587+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
45884588+45894589+45904590+exec 6>&1
45914591+## ----------------------------------- ##
45924592+## Main body of $CONFIG_STATUS script. ##
45934593+## ----------------------------------- ##
45944594+_ASEOF
45954595+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
45964596+45974597+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
45984598+# Save the log message, to keep $0 and so on meaningful, and to
45994599+# report actual input values of CONFIG_FILES etc. instead of their
46004600+# values after options handling.
46014601+ac_log="
46024602+This file was extended by simdzone $as_me 0.2.0, which was
46034603+generated by GNU Autoconf 2.71. Invocation command line was
46044604+46054605+ CONFIG_FILES = $CONFIG_FILES
46064606+ CONFIG_HEADERS = $CONFIG_HEADERS
46074607+ CONFIG_LINKS = $CONFIG_LINKS
46084608+ CONFIG_COMMANDS = $CONFIG_COMMANDS
46094609+ $ $0 $@
46104610+46114611+on `(hostname || uname -n) 2>/dev/null | sed 1q`
46124612+"
46134613+46144614+_ACEOF
46154615+46164616+case $ac_config_files in *"
46174617+"*) set x $ac_config_files; shift; ac_config_files=$*;;
46184618+esac
46194619+46204620+case $ac_config_headers in *"
46214621+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
46224622+esac
46234623+46244624+46254625+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
46264626+# Files that config.status was made for.
46274627+config_files="$ac_config_files"
46284628+config_headers="$ac_config_headers"
46294629+46304630+_ACEOF
46314631+46324632+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
46334633+ac_cs_usage="\
46344634+\`$as_me' instantiates files and other configuration actions
46354635+from templates according to the current configuration. Unless the files
46364636+and actions are specified as TAGs, all are instantiated by default.
46374637+46384638+Usage: $0 [OPTION]... [TAG]...
46394639+46404640+ -h, --help print this help, then exit
46414641+ -V, --version print version number and configuration settings, then exit
46424642+ --config print configuration, then exit
46434643+ -q, --quiet, --silent
46444644+ do not print progress messages
46454645+ -d, --debug don't remove temporary files
46464646+ --recheck update $as_me by reconfiguring in the same conditions
46474647+ --file=FILE[:TEMPLATE]
46484648+ instantiate the configuration file FILE
46494649+ --header=FILE[:TEMPLATE]
46504650+ instantiate the configuration header FILE
46514651+46524652+Configuration files:
46534653+$config_files
46544654+46554655+Configuration headers:
46564656+$config_headers
46574657+46584658+Report bugs to <https://github.com/NLnetLabs/simdzone/issues>."
46594659+46604660+_ACEOF
46614661+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
46624662+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
46634663+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
46644664+ac_cs_config='$ac_cs_config_escaped'
46654665+ac_cs_version="\\
46664666+simdzone config.status 0.2.0
46674667+configured by $0, generated by GNU Autoconf 2.71,
46684668+ with options \\"\$ac_cs_config\\"
46694669+46704670+Copyright (C) 2021 Free Software Foundation, Inc.
46714671+This config.status script is free software; the Free Software Foundation
46724672+gives unlimited permission to copy, distribute and modify it."
46734673+46744674+ac_pwd='$ac_pwd'
46754675+srcdir='$srcdir'
46764676+test -n "\$AWK" || AWK=awk
46774677+_ACEOF
46784678+46794679+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
46804680+# The default lists apply if the user does not specify any file.
46814681+ac_need_defaults=:
46824682+while test $# != 0
46834683+do
46844684+ case $1 in
46854685+ --*=?*)
46864686+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
46874687+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
46884688+ ac_shift=:
46894689+ ;;
46904690+ --*=)
46914691+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
46924692+ ac_optarg=
46934693+ ac_shift=:
46944694+ ;;
46954695+ *)
46964696+ ac_option=$1
46974697+ ac_optarg=$2
46984698+ ac_shift=shift
46994699+ ;;
47004700+ esac
47014701+47024702+ case $ac_option in
47034703+ # Handling of the options.
47044704+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
47054705+ ac_cs_recheck=: ;;
47064706+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
47074707+ printf "%s\n" "$ac_cs_version"; exit ;;
47084708+ --config | --confi | --conf | --con | --co | --c )
47094709+ printf "%s\n" "$ac_cs_config"; exit ;;
47104710+ --debug | --debu | --deb | --de | --d | -d )
47114711+ debug=: ;;
47124712+ --file | --fil | --fi | --f )
47134713+ $ac_shift
47144714+ case $ac_optarg in
47154715+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
47164716+ '') as_fn_error $? "missing file argument" ;;
47174717+ esac
47184718+ as_fn_append CONFIG_FILES " '$ac_optarg'"
47194719+ ac_need_defaults=false;;
47204720+ --header | --heade | --head | --hea )
47214721+ $ac_shift
47224722+ case $ac_optarg in
47234723+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
47244724+ esac
47254725+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
47264726+ ac_need_defaults=false;;
47274727+ --he | --h)
47284728+ # Conflict between --help and --header
47294729+ as_fn_error $? "ambiguous option: \`$1'
47304730+Try \`$0 --help' for more information.";;
47314731+ --help | --hel | -h )
47324732+ printf "%s\n" "$ac_cs_usage"; exit ;;
47334733+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
47344734+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
47354735+ ac_cs_silent=: ;;
47364736+47374737+ # This is an error.
47384738+ -*) as_fn_error $? "unrecognized option: \`$1'
47394739+Try \`$0 --help' for more information." ;;
47404740+47414741+ *) as_fn_append ac_config_targets " $1"
47424742+ ac_need_defaults=false ;;
47434743+47444744+ esac
47454745+ shift
47464746+done
47474747+47484748+ac_configure_extra_args=
47494749+47504750+if $ac_cs_silent; then
47514751+ exec 6>/dev/null
47524752+ ac_configure_extra_args="$ac_configure_extra_args --silent"
47534753+fi
47544754+47554755+_ACEOF
47564756+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47574757+if \$ac_cs_recheck; then
47584758+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
47594759+ shift
47604760+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
47614761+ CONFIG_SHELL='$SHELL'
47624762+ export CONFIG_SHELL
47634763+ exec "\$@"
47644764+fi
47654765+47664766+_ACEOF
47674767+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47684768+exec 5>>config.log
47694769+{
47704770+ echo
47714771+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
47724772+## Running $as_me. ##
47734773+_ASBOX
47744774+ printf "%s\n" "$ac_log"
47754775+} >&5
47764776+47774777+_ACEOF
47784778+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47794779+_ACEOF
47804780+47814781+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47824782+47834783+# Handling of arguments.
47844784+for ac_config_target in $ac_config_targets
47854785+do
47864786+ case $ac_config_target in
47874787+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
47884788+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
47894789+47904790+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
47914791+ esac
47924792+done
47934793+47944794+47954795+# If the user did not use the arguments to specify the items to instantiate,
47964796+# then the envvar interface is used. Set only those that are not.
47974797+# We use the long form for the default assignment because of an extremely
47984798+# bizarre bug on SunOS 4.1.3.
47994799+if $ac_need_defaults; then
48004800+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
48014801+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
48024802+fi
48034803+48044804+# Have a temporary directory for convenience. Make it in the build tree
48054805+# simply because there is no reason against having it here, and in addition,
48064806+# creating and moving files from /tmp can sometimes cause problems.
48074807+# Hook for its removal unless debugging.
48084808+# Note that there is a small window in which the directory will not be cleaned:
48094809+# after its creation but before its name has been assigned to `$tmp'.
48104810+$debug ||
48114811+{
48124812+ tmp= ac_tmp=
48134813+ trap 'exit_status=$?
48144814+ : "${ac_tmp:=$tmp}"
48154815+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
48164816+' 0
48174817+ trap 'as_fn_exit 1' 1 2 13 15
48184818+}
48194819+# Create a (secure) tmp directory for tmp files.
48204820+48214821+{
48224822+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
48234823+ test -d "$tmp"
48244824+} ||
48254825+{
48264826+ tmp=./conf$$-$RANDOM
48274827+ (umask 077 && mkdir "$tmp")
48284828+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
48294829+ac_tmp=$tmp
48304830+48314831+# Set up the scripts for CONFIG_FILES section.
48324832+# No need to generate them if there are no CONFIG_FILES.
48334833+# This happens for instance with `./config.status config.h'.
48344834+if test -n "$CONFIG_FILES"; then
48354835+48364836+48374837+ac_cr=`echo X | tr X '\015'`
48384838+# On cygwin, bash can eat \r inside `` if the user requested igncr.
48394839+# But we know of no other shell where ac_cr would be empty at this
48404840+# point, so we can use a bashism as a fallback.
48414841+if test "x$ac_cr" = x; then
48424842+ eval ac_cr=\$\'\\r\'
48434843+fi
48444844+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
48454845+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
48464846+ ac_cs_awk_cr='\\r'
48474847+else
48484848+ ac_cs_awk_cr=$ac_cr
48494849+fi
48504850+48514851+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
48524852+_ACEOF
48534853+48544854+48554855+{
48564856+ echo "cat >conf$$subs.awk <<_ACEOF" &&
48574857+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
48584858+ echo "_ACEOF"
48594859+} >conf$$subs.sh ||
48604860+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
48614861+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
48624862+ac_delim='%!_!# '
48634863+for ac_last_try in false false false false false :; do
48644864+ . ./conf$$subs.sh ||
48654865+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
48664866+48674867+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
48684868+ if test $ac_delim_n = $ac_delim_num; then
48694869+ break
48704870+ elif $ac_last_try; then
48714871+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
48724872+ else
48734873+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
48744874+ fi
48754875+done
48764876+rm -f conf$$subs.sh
48774877+48784878+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
48794879+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
48804880+_ACEOF
48814881+sed -n '
48824882+h
48834883+s/^/S["/; s/!.*/"]=/
48844884+p
48854885+g
48864886+s/^[^!]*!//
48874887+:repl
48884888+t repl
48894889+s/'"$ac_delim"'$//
48904890+t delim
48914891+:nl
48924892+h
48934893+s/\(.\{148\}\)..*/\1/
48944894+t more1
48954895+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
48964896+p
48974897+n
48984898+b repl
48994899+:more1
49004900+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49014901+p
49024902+g
49034903+s/.\{148\}//
49044904+t nl
49054905+:delim
49064906+h
49074907+s/\(.\{148\}\)..*/\1/
49084908+t more2
49094909+s/["\\]/\\&/g; s/^/"/; s/$/"/
49104910+p
49114911+b
49124912+:more2
49134913+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49144914+p
49154915+g
49164916+s/.\{148\}//
49174917+t delim
49184918+' <conf$$subs.awk | sed '
49194919+/^[^""]/{
49204920+ N
49214921+ s/\n//
49224922+}
49234923+' >>$CONFIG_STATUS || ac_write_fail=1
49244924+rm -f conf$$subs.awk
49254925+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49264926+_ACAWK
49274927+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49284928+ for (key in S) S_is_set[key] = 1
49294929+ FS = ""
49304930+49314931+}
49324932+{
49334933+ line = $ 0
49344934+ nfields = split(line, field, "@")
49354935+ substed = 0
49364936+ len = length(field[1])
49374937+ for (i = 2; i < nfields; i++) {
49384938+ key = field[i]
49394939+ keylen = length(key)
49404940+ if (S_is_set[key]) {
49414941+ value = S[key]
49424942+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49434943+ len += length(value) + length(field[++i])
49444944+ substed = 1
49454945+ } else
49464946+ len += 1 + keylen
49474947+ }
49484948+49494949+ print line
49504950+}
49514951+49524952+_ACAWK
49534953+_ACEOF
49544954+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49554955+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49564956+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49574957+else
49584958+ cat
49594959+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49604960+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49614961+_ACEOF
49624962+49634963+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49644964+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49654965+# trailing colons and then remove the whole line if VPATH becomes empty
49664966+# (actually we leave an empty line to preserve line numbers).
49674967+if test "x$srcdir" = x.; then
49684968+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
49694969+h
49704970+s///
49714971+s/^/:/
49724972+s/[ ]*$/:/
49734973+s/:\$(srcdir):/:/g
49744974+s/:\${srcdir}:/:/g
49754975+s/:@srcdir@:/:/g
49764976+s/^:*//
49774977+s/:*$//
49784978+x
49794979+s/\(=[ ]*\).*/\1/
49804980+G
49814981+s/\n//
49824982+s/^[^=]*=[ ]*$//
49834983+}'
49844984+fi
49854985+49864986+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49874987+fi # test -n "$CONFIG_FILES"
49884988+49894989+# Set up the scripts for CONFIG_HEADERS section.
49904990+# No need to generate them if there are no CONFIG_HEADERS.
49914991+# This happens for instance with `./config.status Makefile'.
49924992+if test -n "$CONFIG_HEADERS"; then
49934993+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49944994+BEGIN {
49954995+_ACEOF
49964996+49974997+# Transform confdefs.h into an awk script `defines.awk', embedded as
49984998+# here-document in config.status, that substitutes the proper values into
49994999+# config.h.in to produce config.h.
50005000+50015001+# Create a delimiter string that does not exist in confdefs.h, to ease
50025002+# handling of long lines.
50035003+ac_delim='%!_!# '
50045004+for ac_last_try in false false :; do
50055005+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
50065006+ if test -z "$ac_tt"; then
50075007+ break
50085008+ elif $ac_last_try; then
50095009+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
50105010+ else
50115011+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50125012+ fi
50135013+done
50145014+50155015+# For the awk script, D is an array of macro values keyed by name,
50165016+# likewise P contains macro parameters if any. Preserve backslash
50175017+# newline sequences.
50185018+50195019+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
50205020+sed -n '
50215021+s/.\{148\}/&'"$ac_delim"'/g
50225022+t rset
50235023+:rset
50245024+s/^[ ]*#[ ]*define[ ][ ]*/ /
50255025+t def
50265026+d
50275027+:def
50285028+s/\\$//
50295029+t bsnl
50305030+s/["\\]/\\&/g
50315031+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
50325032+D["\1"]=" \3"/p
50335033+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
50345034+d
50355035+:bsnl
50365036+s/["\\]/\\&/g
50375037+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
50385038+D["\1"]=" \3\\\\\\n"\\/p
50395039+t cont
50405040+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
50415041+t cont
50425042+d
50435043+:cont
50445044+n
50455045+s/.\{148\}/&'"$ac_delim"'/g
50465046+t clear
50475047+:clear
50485048+s/\\$//
50495049+t bsnlc
50505050+s/["\\]/\\&/g; s/^/"/; s/$/"/p
50515051+d
50525052+:bsnlc
50535053+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
50545054+b cont
50555055+' <confdefs.h | sed '
50565056+s/'"$ac_delim"'/"\\\
50575057+"/g' >>$CONFIG_STATUS || ac_write_fail=1
50585058+50595059+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50605060+ for (key in D) D_is_set[key] = 1
50615061+ FS = ""
50625062+}
50635063+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
50645064+ line = \$ 0
50655065+ split(line, arg, " ")
50665066+ if (arg[1] == "#") {
50675067+ defundef = arg[2]
50685068+ mac1 = arg[3]
50695069+ } else {
50705070+ defundef = substr(arg[1], 2)
50715071+ mac1 = arg[2]
50725072+ }
50735073+ split(mac1, mac2, "(") #)
50745074+ macro = mac2[1]
50755075+ prefix = substr(line, 1, index(line, defundef) - 1)
50765076+ if (D_is_set[macro]) {
50775077+ # Preserve the white space surrounding the "#".
50785078+ print prefix "define", macro P[macro] D[macro]
50795079+ next
50805080+ } else {
50815081+ # Replace #undef with comments. This is necessary, for example,
50825082+ # in the case of _POSIX_SOURCE, which is predefined and required
50835083+ # on some systems where configure will not decide to define it.
50845084+ if (defundef == "undef") {
50855085+ print "/*", prefix defundef, macro, "*/"
50865086+ next
50875087+ }
50885088+ }
50895089+}
50905090+{ print }
50915091+_ACAWK
50925092+_ACEOF
50935093+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50945094+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
50955095+fi # test -n "$CONFIG_HEADERS"
50965096+50975097+50985098+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
50995099+shift
51005100+for ac_tag
51015101+do
51025102+ case $ac_tag in
51035103+ :[FHLC]) ac_mode=$ac_tag; continue;;
51045104+ esac
51055105+ case $ac_mode$ac_tag in
51065106+ :[FHL]*:*);;
51075107+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
51085108+ :[FH]-) ac_tag=-:-;;
51095109+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
51105110+ esac
51115111+ ac_save_IFS=$IFS
51125112+ IFS=:
51135113+ set x $ac_tag
51145114+ IFS=$ac_save_IFS
51155115+ shift
51165116+ ac_file=$1
51175117+ shift
51185118+51195119+ case $ac_mode in
51205120+ :L) ac_source=$1;;
51215121+ :[FH])
51225122+ ac_file_inputs=
51235123+ for ac_f
51245124+ do
51255125+ case $ac_f in
51265126+ -) ac_f="$ac_tmp/stdin";;
51275127+ *) # Look for the file first in the build tree, then in the source tree
51285128+ # (if the path is not absolute). The absolute path cannot be DOS-style,
51295129+ # because $ac_f cannot contain `:'.
51305130+ test -f "$ac_f" ||
51315131+ case $ac_f in
51325132+ [\\/$]*) false;;
51335133+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
51345134+ esac ||
51355135+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
51365136+ esac
51375137+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
51385138+ as_fn_append ac_file_inputs " '$ac_f'"
51395139+ done
51405140+51415141+ # Let's still pretend it is `configure' which instantiates (i.e., don't
51425142+ # use $as_me), people would be surprised to read:
51435143+ # /* config.h. Generated by config.status. */
51445144+ configure_input='Generated from '`
51455145+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
51465146+ `' by configure.'
51475147+ if test x"$ac_file" != x-; then
51485148+ configure_input="$ac_file. $configure_input"
51495149+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
51505150+printf "%s\n" "$as_me: creating $ac_file" >&6;}
51515151+ fi
51525152+ # Neutralize special characters interpreted by sed in replacement strings.
51535153+ case $configure_input in #(
51545154+ *\&* | *\|* | *\\* )
51555155+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
51565156+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
51575157+ *) ac_sed_conf_input=$configure_input;;
51585158+ esac
51595159+51605160+ case $ac_tag in
51615161+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
51625162+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51635163+ esac
51645164+ ;;
51655165+ esac
51665166+51675167+ ac_dir=`$as_dirname -- "$ac_file" ||
51685168+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51695169+ X"$ac_file" : 'X\(//\)[^/]' \| \
51705170+ X"$ac_file" : 'X\(//\)$' \| \
51715171+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51725172+printf "%s\n" X"$ac_file" |
51735173+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51745174+ s//\1/
51755175+ q
51765176+ }
51775177+ /^X\(\/\/\)[^/].*/{
51785178+ s//\1/
51795179+ q
51805180+ }
51815181+ /^X\(\/\/\)$/{
51825182+ s//\1/
51835183+ q
51845184+ }
51855185+ /^X\(\/\).*/{
51865186+ s//\1/
51875187+ q
51885188+ }
51895189+ s/.*/./; q'`
51905190+ as_dir="$ac_dir"; as_fn_mkdir_p
51915191+ ac_builddir=.
51925192+51935193+case "$ac_dir" in
51945194+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
51955195+*)
51965196+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
51975197+ # A ".." for each directory in $ac_dir_suffix.
51985198+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51995199+ case $ac_top_builddir_sub in
52005200+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52015201+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52025202+ esac ;;
52035203+esac
52045204+ac_abs_top_builddir=$ac_pwd
52055205+ac_abs_builddir=$ac_pwd$ac_dir_suffix
52065206+# for backward compatibility:
52075207+ac_top_builddir=$ac_top_build_prefix
52085208+52095209+case $srcdir in
52105210+ .) # We are building in place.
52115211+ ac_srcdir=.
52125212+ ac_top_srcdir=$ac_top_builddir_sub
52135213+ ac_abs_top_srcdir=$ac_pwd ;;
52145214+ [\\/]* | ?:[\\/]* ) # Absolute name.
52155215+ ac_srcdir=$srcdir$ac_dir_suffix;
52165216+ ac_top_srcdir=$srcdir
52175217+ ac_abs_top_srcdir=$srcdir ;;
52185218+ *) # Relative name.
52195219+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52205220+ ac_top_srcdir=$ac_top_build_prefix$srcdir
52215221+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52225222+esac
52235223+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52245224+52255225+52265226+ case $ac_mode in
52275227+ :F)
52285228+ #
52295229+ # CONFIG_FILE
52305230+ #
52315231+52325232+_ACEOF
52335233+52345234+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52355235+# If the template does not know about datarootdir, expand it.
52365236+# FIXME: This hack should be removed a few years after 2.60.
52375237+ac_datarootdir_hack=; ac_datarootdir_seen=
52385238+ac_sed_dataroot='
52395239+/datarootdir/ {
52405240+ p
52415241+ q
52425242+}
52435243+/@datadir@/p
52445244+/@docdir@/p
52455245+/@infodir@/p
52465246+/@localedir@/p
52475247+/@mandir@/p'
52485248+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52495249+*datarootdir*) ac_datarootdir_seen=yes;;
52505250+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52515251+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52525252+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52535253+_ACEOF
52545254+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52555255+ ac_datarootdir_hack='
52565256+ s&@datadir@&$datadir&g
52575257+ s&@docdir@&$docdir&g
52585258+ s&@infodir@&$infodir&g
52595259+ s&@localedir@&$localedir&g
52605260+ s&@mandir@&$mandir&g
52615261+ s&\\\${datarootdir}&$datarootdir&g' ;;
52625262+esac
52635263+_ACEOF
52645264+52655265+# Neutralize VPATH when `$srcdir' = `.'.
52665266+# Shell code in configure.ac might set extrasub.
52675267+# FIXME: do we really want to maintain this feature?
52685268+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52695269+ac_sed_extra="$ac_vpsub
52705270+$extrasub
52715271+_ACEOF
52725272+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52735273+:t
52745274+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52755275+s|@configure_input@|$ac_sed_conf_input|;t t
52765276+s&@top_builddir@&$ac_top_builddir_sub&;t t
52775277+s&@top_build_prefix@&$ac_top_build_prefix&;t t
52785278+s&@srcdir@&$ac_srcdir&;t t
52795279+s&@abs_srcdir@&$ac_abs_srcdir&;t t
52805280+s&@top_srcdir@&$ac_top_srcdir&;t t
52815281+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52825282+s&@builddir@&$ac_builddir&;t t
52835283+s&@abs_builddir@&$ac_abs_builddir&;t t
52845284+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52855285+$ac_datarootdir_hack
52865286+"
52875287+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52885288+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52895289+52905290+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52915291+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52925292+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
52935293+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
52945294+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52955295+which seems to be undefined. Please make sure it is defined" >&5
52965296+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52975297+which seems to be undefined. Please make sure it is defined" >&2;}
52985298+52995299+ rm -f "$ac_tmp/stdin"
53005300+ case $ac_file in
53015301+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
53025302+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
53035303+ esac \
53045304+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53055305+ ;;
53065306+ :H)
53075307+ #
53085308+ # CONFIG_HEADER
53095309+ #
53105310+ if test x"$ac_file" != x-; then
53115311+ {
53125312+ printf "%s\n" "/* $configure_input */" >&1 \
53135313+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
53145314+ } >"$ac_tmp/config.h" \
53155315+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53165316+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
53175317+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
53185318+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
53195319+ else
53205320+ rm -f "$ac_file"
53215321+ mv "$ac_tmp/config.h" "$ac_file" \
53225322+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53235323+ fi
53245324+ else
53255325+ printf "%s\n" "/* $configure_input */" >&1 \
53265326+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
53275327+ || as_fn_error $? "could not create -" "$LINENO" 5
53285328+ fi
53295329+ ;;
53305330+53315331+53325332+ esac
53335333+53345334+done # for ac_tag
53355335+53365336+53375337+as_fn_exit 0
53385338+_ACEOF
53395339+ac_clean_files=$ac_clean_files_save
53405340+53415341+test $ac_write_fail = 0 ||
53425342+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
53435343+53445344+53455345+# configure is writing to config.log, and then calls config.status.
53465346+# config.status does its own redirection, appending to config.log.
53475347+# Unfortunately, on DOS this fails, as config.log is still kept open
53485348+# by configure, so config.status won't be able to write to it; its
53495349+# output is simply discarded. So we exec the FD to /dev/null,
53505350+# effectively closing config.log, so it can be properly (re)opened and
53515351+# appended to by config.status. When coming back to configure, we
53525352+# need to make the FD available again.
53535353+if test "$no_create" != yes; then
53545354+ ac_cs_success=:
53555355+ ac_config_status_args=
53565356+ test "$silent" = yes &&
53575357+ ac_config_status_args="$ac_config_status_args --quiet"
53585358+ exec 5>/dev/null
53595359+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
53605360+ exec 5>>config.log
53615361+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
53625362+ # would make configure fail if this is the last instruction.
53635363+ $ac_cs_success || as_fn_exit 1
53645364+fi
53655365+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
53665366+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
53675367+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
53685368+fi
53695369+53705370+
+146
usr.sbin/nsd/simdzone/configure.ac
···11+#
22+# configure.ac -- Autoconf script for simdzone
33+#
44+# Copyright (c) 2022-2023, NLnet Labs. All rights reserved.
55+#
66+# SPDX-License-Identifier: BSD-3-Clause
77+#
88+99+# This file is intended for inclusion by configure.ac in NSD. Support for any
1010+# platform not supported by NSD here is undesirable. Builds for standalone use
1111+# or development/testing are required to use CMake.
1212+1313+AC_INIT([simdzone],[0.2.0],[https://github.com/NLnetLabs/simdzone/issues])
1414+1515+AC_CONFIG_HEADERS([config.h])
1616+AC_CONFIG_FILES([Makefile])
1717+1818+m4_include(m4/ax_check_compile_flag.m4)
1919+m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_STDC])
2020+2121+AC_CHECK_HEADERS([endian.h sys/endian.h],,, [AC_INCLUDES_DEFAULT])
2222+AC_CHECK_DECLS([bswap16,bswap32,bswap64], [], [], [
2323+AC_INCLUDES_DEFAULT
2424+#ifdef HAVE_ENDIAN_H
2525+#include <endian.h>
2626+#endif
2727+#ifdef HAVE_SYS_ENDIAN_H
2828+#include <sys/endian.h>
2929+#endif
3030+])
3131+3232+AC_ARG_ENABLE(westmere, AS_HELP_STRING([--disable-westmere],[Disable Westmere (SSE4.2) kernel]))
3333+case "$enable_westmere" in
3434+ no) enable_westmere=no ;;
3535+ yes|*) enable_westmere=yes ;;
3636+esac
3737+3838+AC_ARG_ENABLE(haswell, AS_HELP_STRING([--disable-haswell],[Disable Haswell (AVX2) kernel]))
3939+case "$enable_haswell" in
4040+ no) enable_haswell=no ;;
4141+ yes|*) enable_haswell=yes ;;
4242+esac
4343+4444+# GCC and Clang
4545+AX_CHECK_COMPILE_FLAG([-MMD],DEPFLAGS="-MMD -MP")
4646+# Oracle Developer Studio (no -MP)
4747+AX_CHECK_COMPILE_FLAG([-xMMD],DEPFLAGS="-xMMD")
4848+4949+AC_SUBST([DEPFLAGS])
5050+5151+# Figure out the canonical target architecture.
5252+AC_CANONICAL_TARGET
5353+5454+# Multiple instruction sets may be supported by a specific architecture.
5555+# e.g. x86_64 may (or may not) support any of SSE42, AVX2 and AVX-512. The
5656+# best instruction set is automatically selected at runtime, but the compiler
5757+# may or may not support generating code for an instruction set.
5858+case "$target" in
5959+ *amd64*) x86_64=yes ;;
6060+ *x86_64*) x86_64=yes ;;
6161+ *) x86_64=no ;;
6262+esac
6363+6464+HAVE_WESTMERE=NO
6565+HAVE_HASWELL=NO
6666+6767+if test $x86_64 = "yes"; then
6868+ AC_CHECK_HEADER(immintrin.h,,,)
6969+ AX_CHECK_COMPILE_FLAG([-march=westmere],,,[-Werror])
7070+ AX_CHECK_COMPILE_FLAG([-march=haswell],,,[-Werror])
7171+7272+ # Check if the arch instruction set support includes the simd instructions.
7373+ if test $enable_westmere != "no" -a \
7474+ $ax_cv_check_cflags__Werror__march_westmere = "yes" -a \
7575+ $ac_cv_header_immintrin_h = "yes" ; then
7676+ AC_MSG_CHECKING(whether -march=westmere works)
7777+ BAKCFLAGS="$CFLAGS"
7878+ CFLAGS="-march=westmere $CFLAGS"
7979+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
8080+AC_INCLUDES_DEFAULT
8181+[
8282+#include <stdint.h>
8383+#include <immintrin.h>
8484+8585+int main(int argc, char *argv[])
8686+{
8787+ (void)argv;
8888+ uint64_t popcnt = _mm_popcnt_u64((uint64_t)argc);
8989+ return popcnt == 11;
9090+}
9191+]])
9292+],[
9393+ AC_DEFINE(HAVE_WESTMERE, 1, [Wether or not to compile support for SSE4.2])
9494+ HAVE_WESTMERE=WESTMERE
9595+ AC_MSG_RESULT(yes)
9696+],[
9797+ AC_MSG_RESULT(no)
9898+])
9999+ CFLAGS="$BAKCFLAGS"
100100+ fi
101101+102102+ if test $enable_haswell != "no" -a \
103103+ $ax_cv_check_cflags__Werror__march_haswell = "yes" -a \
104104+ $ac_cv_header_immintrin_h = "yes" ; then
105105+ AC_MSG_CHECKING(whether -march=haswell works)
106106+ BAKCFLAGS="$CFLAGS"
107107+ CFLAGS="-march=haswell $CFLAGS"
108108+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
109109+AC_INCLUDES_DEFAULT
110110+[
111111+#include <stdint.h>
112112+#include <immintrin.h>
113113+114114+int main(int argc, char *argv[])
115115+{
116116+ (void)argv;
117117+ int argc32x8[8] = { argc, 0, 0, 0, 0, 0, 0, 0 };
118118+ __m256i argc256 = _mm256_loadu_si256((__m256i *)argc32x8);
119119+ return _mm256_testz_si256(argc256, _mm256_set1_epi8(11));
120120+}
121121+]])
122122+],[
123123+ AC_DEFINE(HAVE_HASWELL, 1, [Wether or not to compile support for AVX2])
124124+ HAVE_HASWELL=HASWELL
125125+ AC_MSG_RESULT(yes)
126126+],[
127127+ AC_MSG_RESULT(no)
128128+])
129129+ CFLAGS="$BAKCFLAGS"
130130+ fi
131131+fi
132132+133133+AC_CHECK_FUNCS([realpath],,[AC_MSG_ERROR([realpath is not available])])
134134+135135+AC_SUBST([HAVE_ENDIAN_H])
136136+AC_SUBST([HAVE_WESTMERE])
137137+AC_SUBST([HAVE_HASWELL])
138138+139139+AH_BOTTOM([
140140+/* Defines _XOPEN_SOURCE and _POSIX_C_SOURCE implicitly in features.h */
141141+#ifndef _DEFAULT_SOURCE
142142+# define _DEFAULT_SOURCE 1
143143+#endif
144144+])
145145+146146+AC_OUTPUT
+658
usr.sbin/nsd/simdzone/include/zone.h
···11+/*
22+ * zone.h -- (DNS) presentation format parser
33+ *
44+ * Copyright (c) 2022-2024, NLnet Labs. All rights reserved.
55+ *
66+ * SPDX-License-Identifier: BSD-3-Clause
77+ *
88+ */
99+#ifndef ZONE_H
1010+#define ZONE_H
1111+1212+/**
1313+ * @file
1414+ * @brief simdzone main header
1515+ */
1616+1717+#include <stdarg.h>
1818+#include <stdint.h>
1919+#include <stdbool.h>
2020+#include <stdio.h>
2121+#include <stddef.h>
2222+2323+#include "zone/attributes.h"
2424+#include "zone/export.h"
2525+2626+#if defined (__cplusplus)
2727+extern "C" {
2828+#endif
2929+3030+/**
3131+ * @defgroup class_codes Class codes
3232+ *
3333+ * Supported CLASSes.
3434+ *
3535+ * See @iana{DNS CLASSes,dns-parameters,dns-parameters-2} for a list of
3636+ * classes registered by IANA.
3737+ *
3838+ * @{
3939+ */
4040+/** Internet @rfc{1035} */
4141+#define ZONE_CLASS_IN (1u)
4242+/** CSNET @rfc{1035} @obsolete */
4343+#define ZONE_CLASS_CS (2u)
4444+/** CHAOS @rfc{1035} */
4545+#define ZONE_CLASS_CH (3u)
4646+/** Hesiod @rfc{1035} */
4747+#define ZONE_CLASS_HS (4u)
4848+/** Any (QCLASS) @rfc{1035} */
4949+#define ZONE_CLASS_ANY (255u)
5050+/** @} */
5151+5252+/**
5353+ * @defgroup type_codes Type codes
5454+ *
5555+ * Supported resource record (RR) TYPEs.
5656+ *
5757+ * See @iana{RR TYPEs,dns-parameters,dns-parameters-4} for a list of
5858+ * types registered by IANA.
5959+ *
6060+ * @{
6161+ */
6262+/** Host address @rfc{1035} */
6363+#define ZONE_TYPE_A (1u)
6464+/** Authoritative name server @rfc{1035} */
6565+#define ZONE_TYPE_NS (2u)
6666+/** Mail destination @rfc{1035} @obsolete */
6767+#define ZONE_TYPE_MD (3u)
6868+/** Mail forwarder @rfc{1035} @obsolete */
6969+#define ZONE_TYPE_MF (4u)
7070+/** Canonical name for an alias @rfc{1035} */
7171+#define ZONE_TYPE_CNAME (5u)
7272+/** Marks the start of authority @rfc{1035} */
7373+#define ZONE_TYPE_SOA (6u)
7474+/** Mailbox domain name @rfc{1035} @experimental */
7575+#define ZONE_TYPE_MB (7u)
7676+/** Mail group member @rfc{1035} @experimental */
7777+#define ZONE_TYPE_MG (8u)
7878+/** Mail rename domain name @rfc{1035} @experimental */
7979+#define ZONE_TYPE_MR (9u)
8080+/** Anything @rfc{883} @obsolete */
8181+#define ZONE_TYPE_NULL (10u)
8282+/** Well known service description @rfc{1035} */
8383+#define ZONE_TYPE_WKS (11u)
8484+/** Domain name pointer @rfc{1035} */
8585+#define ZONE_TYPE_PTR (12u)
8686+/** Host information @rfc{1035} */
8787+#define ZONE_TYPE_HINFO (13u)
8888+/** Mailbox or mail list information @rfc{1035} */
8989+#define ZONE_TYPE_MINFO (14u)
9090+/** Mail exchange @rfc{1035} */
9191+#define ZONE_TYPE_MX (15u)
9292+/** Text strings @rfc{1035} */
9393+#define ZONE_TYPE_TXT (16u)
9494+/** Responsible person @rfc{1035} */
9595+#define ZONE_TYPE_RP (17u)
9696+/** AFS Data Base location @rfc{1183} @rfc{5864} */
9797+#define ZONE_TYPE_AFSDB (18u)
9898+/** X.25 PSDN address @rfc{1183} */
9999+#define ZONE_TYPE_X25 (19u)
100100+/** ISDN address @rfc{1183} */
101101+#define ZONE_TYPE_ISDN (20u)
102102+/** Route Through @rfc{1183} */
103103+#define ZONE_TYPE_RT (21u)
104104+/** NSAP address, NSAP style A record @rfc{1706} */
105105+#define ZONE_TYPE_NSAP (22u)
106106+/** Domain name pointer, NSAP style @rfc{1348} @rfc{1637} */
107107+#define ZONE_TYPE_NSAP_PTR (23u)
108108+/** Signature @rfc{2535} */
109109+#define ZONE_TYPE_SIG (24u)
110110+/** Public key @rfc{2535} @rfc{2930} */
111111+#define ZONE_TYPE_KEY (25u)
112112+/** X.400 mail mapping information @rfc{2163} */
113113+#define ZONE_TYPE_PX (26u)
114114+/** Geographical Position @rfc{1712} */
115115+#define ZONE_TYPE_GPOS (27u)
116116+/** IPv6 Address @rfc{3596} */
117117+#define ZONE_TYPE_AAAA (28u)
118118+/** Location Information @rfc{1876} */
119119+#define ZONE_TYPE_LOC (29u)
120120+/** Next domain @rfc{3755} @rfc{2535} @obsolete */
121121+#define ZONE_TYPE_NXT (30u)
122122+/** Server Selection @rfc{2782} */
123123+#define ZONE_TYPE_SRV (33u)
124124+/** Naming Authority Pointer @rfc{2915} @rfc{2168} @rfc{3403} */
125125+#define ZONE_TYPE_NAPTR (35u)
126126+/** Key Exchanger @rfc{2230} */
127127+#define ZONE_TYPE_KX (36u)
128128+/** CERT @rfc{4398}*/
129129+#define ZONE_TYPE_CERT (37u)
130130+/** IPv6 Address @rfc{3226} @rfc{2874} @rfc{6563} @obsolete */
131131+#define ZONE_TYPE_A6 (38u)
132132+/** DNAME @rfc{6672} */
133133+#define ZONE_TYPE_DNAME (39u)
134134+/** Address Prefix List @rfc{3123} */
135135+#define ZONE_TYPE_APL (42u)
136136+/** Delegation Signer @rfc{4034} @rfc{3658} */
137137+#define ZONE_TYPE_DS (43u)
138138+/** SSH Key Fingerprint @rfc{4255} */
139139+#define ZONE_TYPE_SSHFP (44u)
140140+/** IPsec public key @rfc{4025} */
141141+#define ZONE_TYPE_IPSECKEY (45u)
142142+/** Resource Record Signature @rfc{4034} @rfc{3755} */
143143+#define ZONE_TYPE_RRSIG (46u)
144144+/** Next Secure @rfc{4034} @rfc{3755} */
145145+#define ZONE_TYPE_NSEC (47u)
146146+/** DNS Public Key @rfc{4034} @rfc{3755} */
147147+#define ZONE_TYPE_DNSKEY (48u)
148148+/** DHCID @rfc{4701} */
149149+#define ZONE_TYPE_DHCID (49u)
150150+/** NSEC3 @rfc{5155} */
151151+#define ZONE_TYPE_NSEC3 (50u)
152152+/** NSEC3PARAM @rfc{5155} */
153153+#define ZONE_TYPE_NSEC3PARAM (51u)
154154+/** TLSA @rfc{6698} */
155155+#define ZONE_TYPE_TLSA (52u)
156156+/** S/MIME cert association @rfc{8162} */
157157+#define ZONE_TYPE_SMIMEA (53u)
158158+/** Host Identity Protocol @rfc{8005} */
159159+#define ZONE_TYPE_HIP (55u)
160160+/** NINFO */
161161+#define ZONE_TYPE_NINFO (56u)
162162+/** RKEY */
163163+#define ZONE_TYPE_RKEY (57u)
164164+/** Child DS @rfc{7344} */
165165+#define ZONE_TYPE_CDS (59u)
166166+/** DNSKEY(s) the Child wants reflected in DS @rfc{7344} */
167167+#define ZONE_TYPE_CDNSKEY (60u)
168168+/** OpenPGP Key @rfc{7929} */
169169+#define ZONE_TYPE_OPENPGPKEY (61u)
170170+/** Child-To-Parent Synchronization @rfc{7477} */
171171+#define ZONE_TYPE_CSYNC (62u)
172172+/** Zone message digest @rfc{8976} */
173173+#define ZONE_TYPE_ZONEMD (63u)
174174+/** Service binding @rfc{9460} */
175175+#define ZONE_TYPE_SVCB (64u)
176176+/** Service binding @rfc{9460} */
177177+#define ZONE_TYPE_HTTPS (65u)
178178+/** Sender Policy Framework @rfc{7208} */
179179+#define ZONE_TYPE_SPF (99u)
180180+/** Node Identifier @rfc{6742} */
181181+#define ZONE_TYPE_NID (104u)
182182+/** 32-bit Locator for ILNPv4-capable nodes @rfc{6742} */
183183+#define ZONE_TYPE_L32 (105u)
184184+/** 64-bit Locator for ILNPv6-capable nodes @rfc{6742} */
185185+#define ZONE_TYPE_L64 (106u)
186186+/** Name of an ILNP subnetwork @rfc{6742} */
187187+#define ZONE_TYPE_LP (107u)
188188+/** EUI-48 address @rfc{7043} */
189189+#define ZONE_TYPE_EUI48 (108u)
190190+/** EUI-64 address @rfc{7043} */
191191+#define ZONE_TYPE_EUI64 (109u)
192192+/** Uniform Resource Identifier @rfc{7553} */
193193+#define ZONE_TYPE_URI (256u)
194194+/** Certification Authority Restriction @rfc{6844} */
195195+#define ZONE_TYPE_CAA (257u)
196196+/** DNS Authoritative Source (DNS-AS) */
197197+#define ZONE_TYPE_AVC (258u)
198198+/** Resolver Information as Key/Value Pairs @rfc{9606} */
199199+#define ZONE_TYPE_RESINFO (261u)
200200+/** Public wallet address */
201201+#define ZONE_TYPE_WALLET (262u)
202202+/** BP Convergence Layer Adapter */
203203+#define ZONE_TYPE_CLA (263u)
204204+/** DNSSEC Trust Authorities */
205205+#define ZONE_TYPE_TA (32768u)
206206+/** DNSSEC Lookaside Validation @rfc{4431} @obsolete */
207207+#define ZONE_TYPE_DLV (32769u)
208208+/** @} */
209209+210210+/**
211211+ * @defgroup svc_params Service Parameter Keys
212212+ *
213213+ * Supported service parameters.
214214+ *
215215+ * See @iana{Service Parameter Keys (SvcParamKeys),dns-svcb,dns-svcparamkeys}
216216+ * for a list of service parameter keys registered by IANA.
217217+ *
218218+ * @{
219219+ */
220220+/** Parameters clients must not ignore @rfc{9460} */
221221+#define ZONE_SVC_PARAM_KEY_MANDATORY (0u)
222222+/** Application Layer Protocol Negotiation (ALPN) protocol identifiers @rfc{9460} */
223223+#define ZONE_SVC_PARAM_KEY_ALPN (1u)
224224+/** No support for default protocol (alpn must be specified) @rfc{9460} */
225225+#define ZONE_SVC_PARAM_KEY_NO_DEFAULT_ALPN (2u)
226226+/** TCP or UDP port for alternative endpoint @rfc{9460} */
227227+#define ZONE_SVC_PARAM_KEY_PORT (3u)
228228+/** IPv4 address hints @rfc{9460} */
229229+#define ZONE_SVC_PARAM_KEY_IPV4HINT (4u)
230230+/** Encrypted ClientHello (ECH) configuration @draft{ietf, tls-svcb-ech} */
231231+#define ZONE_SVC_PARAM_KEY_ECH (5u)
232232+/** IPv6 address hints @rfc{9460} */
233233+#define ZONE_SVC_PARAM_KEY_IPV6HINT (6u)
234234+/** URI template in relative form @rfc{9461} */
235235+#define ZONE_SVC_PARAM_KEY_DOHPATH (7u)
236236+/** Target is an Oblivious HTTP service @rfc{9540} */
237237+#define ZONE_SVC_PARAM_KEY_OHTTP (8u)
238238+/** Supported groups in TLS @draft{ietf, tls-key-share-prediction} */
239239+#define ZONE_SVC_PARAM_KEY_TLS_SUPPORTED_GROUPS (9u)
240240+/** Reserved ("invalid key") @rfc{9460} */
241241+#define ZONE_SVC_PARAM_KEY_INVALID_KEY (65535u)
242242+/** @} */
243243+244244+/**
245245+ * Number of bytes per block.
246246+ *
247247+ * Higher throughput is achieved by block-based operation. The size of a
248248+ * block is determined by the word size of the CPU. To avoid pipeline flushes
249249+ * as much as possible buffers are required to be padded by the number of
250250+ * bytes in a single block.
251251+ *
252252+ * @warning The input buffer to @zone_parse_string is required to be
253253+ * null-terminated and padded, which is somewhat counter intuitive. A
254254+ * future release may lift this requirement (@issue{174}).
255255+ */
256256+#define ZONE_BLOCK_SIZE (64)
257257+258258+/**
259259+ * Number of blocks per window.
260260+ *
261261+ * Master files can become quite large and are read in multiples of blocks.
262262+ * The input buffer is expanded as needed.
263263+ */
264264+#define ZONE_WINDOW_SIZE (256 * ZONE_BLOCK_SIZE) // 16KB
265265+266266+/** Maximum size of domain name. */
267267+#define ZONE_NAME_SIZE (255)
268268+269269+typedef struct zone_name_buffer zone_name_buffer_t;
270270+struct zone_name_buffer {
271271+ /** Length of domain name stored in buffer. */
272272+ size_t length;
273273+ /** Maximum number of octets in a domain name plus padding. */
274274+ uint8_t octets[ ZONE_NAME_SIZE + ZONE_BLOCK_SIZE ];
275275+};
276276+277277+/** Maximum size of RDATA section. */
278278+#define ZONE_RDATA_SIZE (65535)
279279+280280+typedef struct zone_rdata_buffer zone_rdata_buffer_t;
281281+struct zone_rdata_buffer {
282282+ /** Maximum number of octets in RDATA section plus padding. */
283283+ uint8_t octets[ ZONE_RDATA_SIZE + ZONE_BLOCK_SIZE ];
284284+};
285285+286286+/**
287287+ * @brief Tape capacity per-file.
288288+ *
289289+ * Tape capacity must be sufficiently large to hold every token from a single
290290+ * worst-case read (e.g. 64 consecutive line feeds). Not likely to occur in
291291+ * practice, therefore, to optimize throughput, allocate at least twice the
292292+ * size so consecutive index operations can be performed.
293293+ */
294294+#define ZONE_TAPE_SIZE ((100 * ZONE_BLOCK_SIZE) + ZONE_BLOCK_SIZE)
295295+296296+typedef struct zone_file zone_file_t;
297297+struct zone_file {
298298+ /** @private */
299299+ zone_file_t *includer;
300300+ /** @private */
301301+ zone_name_buffer_t origin, owner;
302302+ /** @private */
303303+ uint16_t last_type;
304304+ /** Last stated TTL. */
305305+ uint32_t last_ttl;
306306+ /** Last parsed TTL in $TTL entry. */
307307+ uint32_t dollar_ttl;
308308+ /** TTL passed to accept callback. */
309309+ uint32_t *ttl;
310310+ /** Default TTL passed to accept. */
311311+ /** Last stated TTL is used as default unless $TTL entry was found. */
312312+ uint32_t *default_ttl;
313313+ /** @private */
314314+ uint16_t last_class;
315315+ /** Number of lines spanned by RR. */
316316+ /** Non-terminating line feeds, i.e. escaped line feeds, line feeds in
317317+ quoted sections or within parentheses, are counted, but deferred for
318318+ consistency in error reports */
319319+ size_t span;
320320+ /** Starting line of RR. */
321321+ size_t line;
322322+ /** Filename in control directive. */
323323+ char *name;
324324+ /** Absolute path. */
325325+ char *path;
326326+ /** @private */
327327+ FILE *handle;
328328+ /** @private */
329329+ bool grouped;
330330+ /** @private */
331331+ bool start_of_line;
332332+ /** @private */
333333+ uint8_t end_of_file;
334334+ /** @private */
335335+ struct {
336336+ size_t index, length, size;
337337+ char *data;
338338+ } buffer;
339339+ /** @private */
340340+ /** scanner state is kept per-file */
341341+ struct {
342342+ uint64_t in_comment;
343343+ uint64_t in_quoted;
344344+ uint64_t is_escaped;
345345+ uint64_t follows_contiguous;
346346+ } state;
347347+ /** @private */
348348+ /** vector of tokens generated by the scanner guaranteed to be large
349349+ enough to hold every token for a single read + terminators */
350350+ struct { const char **head, **tail, *tape[ZONE_TAPE_SIZE + 2]; } fields;
351351+ struct { const char **head, **tail, *tape[ZONE_TAPE_SIZE + 1]; } delimiters;
352352+ struct { uint16_t *head, *tail, tape[ZONE_TAPE_SIZE + 1]; } newlines;
353353+};
354354+355355+typedef struct zone_parser zone_parser_t;
356356+struct zone_parser;
357357+358358+/**
359359+ * @brief Signature of callback function that is invoked for log messages.
360360+ *
361361+ * By default messages are printed to stdout (info) and stderr (warnings,
362362+ * errors). A custom log handler (callback) may be provided for better
363363+ * integration of reporting.
364364+ *
365365+ * @note file maybe NULL if initial file does not exist.
366366+ */
367367+typedef void(*zone_log_t)(
368368+ zone_parser_t *,
369369+ uint32_t, // priority
370370+ const char *, // file
371371+ size_t, // line
372372+ const char *, // message
373373+ void *); // user data
374374+375375+/**
376376+ * @brief Domain name and corresponding length in wire format.
377377+ */
378378+typedef struct zone_name zone_name_t;
379379+struct zone_name {
380380+ /** Length of domain name. */
381381+ uint8_t length;
382382+ /** Absolute, uncompressed, domain name in wire format. */
383383+ const uint8_t *octets;
384384+};
385385+386386+/**
387387+ * @brief Signature of callback function invoked for each RR.
388388+ *
389389+ * Header is in host order, RDATA section is in network order.
390390+ */
391391+typedef int32_t(*zone_accept_t)(
392392+ zone_parser_t *,
393393+ const zone_name_t *, // owner (length + octets)
394394+ uint16_t, // type
395395+ uint16_t, // class
396396+ uint32_t, // ttl
397397+ uint16_t, // rdlength
398398+ const uint8_t *, // rdata
399399+ void *); // user data
400400+401401+/**
402402+ * @brief Signature of callback function invoked on $INCLUDE.
403403+ *
404404+ * Signal file name in $INCLUDE directive to application. Useful for
405405+ * dependency tracking, etc.
406406+ */
407407+typedef int32_t(*zone_include_t)(
408408+ zone_parser_t *,
409409+ const char *, // name in $INCLUDE entry
410410+ const char *, // fully qualified path
411411+ void *); // user data
412412+413413+/**
414414+ * @brief Available configuration options.
415415+ */
416416+typedef struct {
417417+ /** Non-strict mode of operation. */
418418+ /** Authoritative servers may choose to be more lenient when operating as
419419+ a secondary as data may have been transferred over AXFR/IXFR that
420420+ would have triggered an error otherwise. */
421421+ bool secondary;
422422+ /** Disable $INCLUDE directive. */
423423+ /** Useful in setups where untrusted input may be offered. */
424424+ bool no_includes;
425425+ /** Maximum $INCLUDE depth. 0 for default. */
426426+ uint32_t include_limit;
427427+ /** Enable 1h2m3s notations for TTLS. */
428428+ bool pretty_ttls;
429429+ /** Origin in wire format. */
430430+ zone_name_t origin;
431431+ /** Default TTL to use. */
432432+ uint32_t default_ttl;
433433+ /** Default CLASS to use. */
434434+ uint16_t default_class;
435435+ struct {
436436+ /** Priorities NOT to write out. */
437437+ uint32_t mask;
438438+ /** Callback invoked to write out log messages. */
439439+ zone_log_t callback;
440440+ } log;
441441+ struct {
442442+ /** Callback invoked for each RR. */
443443+ zone_accept_t callback;
444444+ } accept;
445445+ struct {
446446+ /** Callback invoked for each $INCLUDE entry. */
447447+ zone_include_t callback;
448448+ } include;
449449+} zone_options_t;
450450+451451+/**
452452+ * @brief Scratch buffer space reserved for parser.
453453+ *
454454+ * @note Future versions may leverage multiple buffers to improve throughput
455455+ * as parsing and committing resource records are disjunct operations.
456456+ */
457457+typedef struct zone_buffers zone_buffers_t;
458458+struct zone_buffers {
459459+ /** Number of name and rdata buffers available. */
460460+ size_t size;
461461+ /** Vector of name buffers to use as scratch buffer. */
462462+ zone_name_buffer_t *owner;
463463+ /** Vector of rdata buffers to use as scratch buffer. */
464464+ zone_rdata_buffer_t *rdata;
465465+};
466466+467467+/**
468468+ * @brief Parser state.
469469+ * @warning Do not modify directly.
470470+ */
471471+struct zone_parser {
472472+ /** @private */
473473+ zone_options_t options;
474474+ /** @private */
475475+ void *user_data;
476476+ struct {
477477+ size_t size;
478478+ struct {
479479+ size_t active;
480480+ zone_name_buffer_t *blocks;
481481+ } owner;
482482+ struct {
483483+ size_t active;
484484+ zone_rdata_buffer_t *blocks;
485485+ } rdata;
486486+ } buffers;
487487+ /** @private */
488488+ zone_name_buffer_t *owner;
489489+ /** @private */
490490+ zone_rdata_buffer_t *rdata;
491491+ /** @private */
492492+ zone_file_t *file, first;
493493+};
494494+495495+/**
496496+ * @defgroup return_codes Return codes
497497+ *
498498+ * @{
499499+ */
500500+/** Success. */
501501+#define ZONE_SUCCESS (0)
502502+/** A syntax error occurred. */
503503+#define ZONE_SYNTAX_ERROR (-256) // (-1 << 8)
504504+/** A semantic error occurred. */
505505+#define ZONE_SEMANTIC_ERROR (-512) // (-2 << 8)
506506+/** Operation failed due to lack of memory. */
507507+#define ZONE_OUT_OF_MEMORY (-768) // (-3 << 8)
508508+/** Bad parameter value. */
509509+#define ZONE_BAD_PARAMETER (-1024) // (-4 << 8)
510510+/** Error reading zone file. */
511511+#define ZONE_READ_ERROR (-1280) // (-5 << 8)
512512+/** Control directive or support for record type is not implemented. */
513513+#define ZONE_NOT_IMPLEMENTED (-1536) // (-6 << 8)
514514+/** Specified file does not exist. */
515515+#define ZONE_NOT_A_FILE (-1792) // (-7 << 8)
516516+/** Access to specified file is not allowed. */
517517+#define ZONE_NOT_PERMITTED (-2048) // (-8 << 8)
518518+/** @} */
519519+520520+/**
521521+ * @brief Parse zone file
522522+ *
523523+ * Parse file containing resource records.
524524+ *
525525+ * @param[in] parser Zone parser
526526+ * @param[in] options Settings used for parsing.
527527+ * @param[in] buffers Scratch buffers used for parsing.
528528+ * @param[in] path Path of master file to parse.
529529+ * @param[in] user_data Pointer passed verbatim to callbacks.
530530+ *
531531+ * @returns @ref ZONE_SUCCESS on success or a negative number on error.
532532+ */
533533+ZONE_EXPORT int32_t
534534+zone_parse(
535535+ zone_parser_t *parser,
536536+ const zone_options_t *options,
537537+ zone_buffers_t *buffers,
538538+ const char *path,
539539+ void *user_data)
540540+zone_nonnull((1,2,3,4));
541541+542542+/**
543543+ * @brief Parse zone from string
544544+ *
545545+ * Parse string containing resource records in presentation format.
546546+ *
547547+ * @warning The input string must be null terminated and padded with at least
548548+ * @ref ZONE_BLOCK_SIZE bytes.
549549+ *
550550+ * @param[in] parser Zone parser
551551+ * @param[in] options Settings used for parsing.
552552+ * @param[in] buffers Scratch buffers used by parsing.
553553+ * @param[in] string Input string.
554554+ * @param[in] length Length of string (excluding null byte and padding).
555555+ * @param[in] user_data Pointer passed verbatim to callbacks.
556556+ *
557557+ * @returns @ref ZONE_SUCCESS on success or a negative number on error.
558558+ */
559559+ZONE_EXPORT int32_t
560560+zone_parse_string(
561561+ zone_parser_t *parser,
562562+ const zone_options_t *options,
563563+ zone_buffers_t *buffers,
564564+ const char *string,
565565+ size_t length,
566566+ void *user_data)
567567+zone_nonnull((1,2,3,4));
568568+569569+/**
570570+ * @defgroup log_priorities Log categories.
571571+ *
572572+ * @note No direct relation between log categories and error codes exists.
573573+ * Log categories communicate the importance of the log message, error
574574+ * codes communicate what went wrong to the caller.
575575+ * @{
576576+ */
577577+/** Error condition. */
578578+/** @hideinitializer */
579579+#define ZONE_ERROR (1u<<1)
580580+/** Warning condition. */
581581+/** @hideinitializer */
582582+#define ZONE_WARNING (1u<<2)
583583+/** Informational message. */
584584+/** @hideinitializer */
585585+#define ZONE_INFO (1u<<3)
586586+/** @} */
587587+588588+/**
589589+ * @brief Write message to active log handler.
590590+ *
591591+ * The zone parser operates on a per-record base and therefore cannot detect
592592+ * errors that span records. e.g. SOA records being specified more than once.
593593+ * The user may print a message using the active log handler, keeping the
594594+ * error message format consistent.
595595+ *
596596+ * @param[in] parser Zone parser
597597+ * @param[in] priority Log priority
598598+ * @param[in] format Format string compatible with printf
599599+ * @param[in] ... Variadic arguments corresponding to #format
600600+ */
601601+ZONE_EXPORT void zone_log(
602602+ zone_parser_t *parser,
603603+ uint32_t priority,
604604+ const char *format,
605605+ ...)
606606+zone_nonnull((1,3))
607607+zone_format_printf(3,4);
608608+609609+/**
610610+ * @brief Write error message to active log handler.
611611+ * @hideinitializer
612612+ *
613613+ * Shorthand to write out error message via @ref zone_log if error messages are
614614+ * not to be discarded.
615615+ *
616616+ * @param[in] parser Zone parser
617617+ * @param[in] format Format string
618618+ * @param[in] ... Variadic arguments corresponding to #format
619619+ */
620620+#define zone_error(parser, ...) \
621621+ (((parser)->options.log.mask & ZONE_ERROR) ? \
622622+ (void)0 : zone_log((parser), ZONE_ERROR, __VA_ARGS__))
623623+624624+/**
625625+ * @brief Write warning message to active log handler.
626626+ * @hideinitializer
627627+ *
628628+ * Shorthand to write out warning message via @ref zone_log if warning messages
629629+ * are not to be discarded.
630630+ *
631631+ * @param[in] parser Zone parser
632632+ * @param[in] format Format string compatible with printf.
633633+ * @param[in] ... Variadic arguments corresponding to @format.
634634+ */
635635+#define zone_warning(parser, ...) \
636636+ (((parser)->options.mask & ZONE_WARNING) ? \
637637+ (void)0 : zone_log((parser), ZONE_WARNING, __VA_ARGS__))
638638+639639+/**
640640+ * @brief Write informational message to active log handler.
641641+ * @hideinitializer
642642+ *
643643+ * Shorthand to write out informational message via @ref zone_log if
644644+ * informational messages are not be discarded.
645645+ *
646646+ * @param[in] parser Zone parser.
647647+ * @param[in] format Format string compatible with printf.
648648+ * @param[in] ... Variadic arguments corresponding to @format.
649649+ */
650650+#define zone_info(parser, ...) \
651651+ (((parser)->options.mask & ZONE_INFO) ? \
652652+ (void)0 : zone_log((parser), ZONE_INFO, __VA_ARGS__))
653653+654654+#if defined(__cplusplus)
655655+}
656656+#endif
657657+658658+#endif // ZONE_H
···11+# ===========================================================================
22+# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
33+# ===========================================================================
44+#
55+# SYNOPSIS
66+#
77+# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
88+#
99+# DESCRIPTION
1010+#
1111+# Check whether the given FLAG works with the current language's compiler
1212+# or gives an error. (Warnings, however, are ignored)
1313+#
1414+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
1515+# success/failure.
1616+#
1717+# If EXTRA-FLAGS is defined, it is added to the current language's default
1818+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
1919+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
2020+# force the compiler to issue an error when a bad flag is given.
2121+#
2222+# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
2323+#
2424+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
2525+# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
2626+#
2727+# LICENSE
2828+#
2929+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
3030+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
3131+#
3232+# Copying and distribution of this file, with or without modification, are
3333+# permitted in any medium without royalty provided the copyright notice
3434+# and this notice are preserved. This file is offered as-is, without any
3535+# warranty.
3636+3737+#serial 6
3838+3939+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
4040+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
4141+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
4242+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
4343+ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
4444+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
4545+ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
4646+ [AS_VAR_SET(CACHEVAR,[yes])],
4747+ [AS_VAR_SET(CACHEVAR,[no])])
4848+ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
4949+AS_VAR_IF(CACHEVAR,yes,
5050+ [m4_default([$2], :)],
5151+ [m4_default([$3], :)])
5252+AS_VAR_POPDEF([CACHEVAR])dnl
5353+])dnl AX_CHECK_COMPILE_FLAGS
+76
usr.sbin/nsd/simdzone/src/attributes.h
···11+/*
22+ * attributes.h -- internal compiler attribute abstractions
33+ *
44+ * Copyright (c) 2023-2024, NLnet Labs. All rights reserved.
55+ *
66+ * SPDX-License-Identifier: BSD-3-Clause
77+ *
88+ */
99+#include "zone/attributes.h"
1010+1111+#ifndef ATTRIBUTES_H
1212+#define ATTRIBUTES_H
1313+1414+#define nonnull(params) zone_nonnull(params)
1515+#define nonnull_all zone_nonnull_all
1616+1717+#if _MSC_VER
1818+# define really_inline __forceinline
1919+# define never_inline __declspec(noinline)
2020+# define warn_unused_result
2121+# define no_sanitize_undefined
2222+2323+# define likely(params) (params)
2424+# define unlikely(params) (params)
2525+2626+#else // _MSC_VER
2727+#if defined __has_builtin
2828+# define has_builtin(params) __has_builtin(params)
2929+#else
3030+# define has_builtin(params) (0)
3131+#endif
3232+3333+# if (zone_has_attribute(always_inline) || zone_has_gnuc(3, 1)) && ! defined __NO_INLINE__
3434+ // Compilation using GCC 4.2.1 without optimizations fails.
3535+ // sorry, unimplemented: inlining failed in call to ...
3636+ // GCC 4.1.2 and GCC 4.30 compile forward declared functions annotated
3737+ // with __attribute__((always_inline)) without problems. Test if
3838+ // __NO_INLINE__ is defined and define macro accordingly.
3939+# define really_inline inline __attribute__((always_inline))
4040+# else
4141+# define really_inline inline
4242+# endif
4343+4444+# if zone_has_attribute(noinline) || zone_has_gnuc(2, 96)
4545+# define never_inline __attribute__((noinline))
4646+# else
4747+# define never_inline
4848+# endif
4949+5050+# if zone_has_attribute(warn_unused_result)
5151+# define warn_unused_result __attribute__((warn_unused_result))
5252+# else
5353+# define warn_unused_result
5454+# endif
5555+5656+# if zone_has_attribute(no_sanitize)
5757+ // GCC 8.1 added the no_sanitize function attribute.
5858+# define no_sanitize_undefined __attribute__((no_sanitize("undefined")))
5959+# elif zone_has_attribute(no_sanitize_undefined)
6060+ // GCC 4.9.0 added the UndefinedBehaviorSanitizer (ubsan) and the
6161+ // no_sanitize_undefined function attribute.
6262+# define no_sanitize_undefined
6363+# else
6464+# define no_sanitize_undefined
6565+# endif
6666+6767+# if has_builtin(__builtin_expect)
6868+# define likely(params) __builtin_expect(!!(params), 1)
6969+# define unlikely(params) __builtin_expect(!!(params), 0)
7070+# else
7171+# define likely(params) (params)
7272+# define unlikely(params) (params)
7373+# endif
7474+#endif
7575+7676+#endif // ATTRIBUTES_H
···11+/*
22+ * config.h.in -- configuration header template
33+ *
44+ * Copyright (c) 2024, NLnet Labs. All rights reserved.
55+ *
66+ * SPDX-License-Identifier: BSD-3-Clause
77+ *
88+ */
99+#ifndef CONFIG_H
1010+#define CONFIG_H
1111+1212+/* Define to 1 if you have the declaration of `bswap16', and to 0 if you
1313+ don't. */
1414+#cmakedefine01 HAVE_DECL_BSWAP16
1515+1616+/* Define to 1 if you have the declaration of `bswap32', and to 0 if you
1717+ don't. */
1818+#cmakedefine01 HAVE_DECL_BSWAP32
1919+2020+/* Define to 1 if you have the declaration of `bswap64', and to 0 if you
2121+ don't. */
2222+#cmakedefine01 HAVE_DECL_BSWAP64
2323+2424+/* Define to 1 if you have the <endian.h> header file. */
2525+#cmakedefine HAVE_ENDIAN_H 1
2626+2727+/* Define to 1 if you have the `getopt' function. */
2828+#cmakedefine HAVE_GETOPT 1
2929+3030+/* Wether or not to compile support for AVX2 */
3131+#cmakedefine HAVE_HASWELL 1
3232+3333+/* Wether or not to compile support for SSE4.2 */
3434+#cmakedefine HAVE_WESTMERE 1
3535+3636+/* Defines _XOPEN_SOURCE and _POSIX_C_SOURCE implicitly in features.h */
3737+#ifndef _DEFAULT_SOURCE
3838+# define _DEFAULT_SOURCE 1
3939+#endif
4040+4141+#endif // CONFIG_H
···11+/*
22+ * ip4.h -- SSE 4.1 parser for time stamps
33+ * https://lemire.me/blog/2023/07/01/parsing-time-stamps-faster-with-simd-instructions/
44+ *
55+ * Copyright (c) 2023. Daniel Lemire
66+ *
77+ * SPDX-License-Identifier: BSD-3-Clause
88+ *
99+ */
1010+#ifndef SSE_TIME_H
1111+#define SSE_TIME_H
1212+1313+static const int mdays_minus_one[] = {30, 27, 30, 29, 30, 29, 30, 30, 29, 30, 29, 30};
1414+1515+static const int mdays_cumulative[] = {0, 31, 59, 90, 120, 151, 181,
1616+ 212, 243, 273, 304, 334, 365};
1717+1818+/*
1919+ The 32-bit timestamp spans from year 1970 to 2106.
2020+ Therefore, the only special case for leap years is 2100.
2121+ We use that to produce fast functions.
2222+*/
2323+static inline uint32_t is_leap_year(uint32_t year) {
2424+ return (year % 4 == 0) & (year != 2100);
2525+}
2626+2727+static inline uint32_t leap_days(uint32_t year) {
2828+ --year;
2929+ return (year/4 - 1970/4) - (year >= 2100);
3030+}
3131+3232+static bool sse_parse_time(const char *date_string, uint32_t *time_in_second) {
3333+ // We load the block of digits. We subtract 0x30 (the code point value of the
3434+ // character '0'), and all bytes values should be between 0 and 9,
3535+ // inclusively. We know that some character must be smaller that 9, for
3636+ // example, we cannot have more than 59 seconds and never 60 seconds, in the
3737+ // time stamp string. So one character must be between 0 and 5. Similarly, we
3838+ // start the hours at 00 and end at 23, so one character must be between 0
3939+ // and 2. We do a saturating subtraction of the maximum: the result of such a
4040+ // subtraction should be zero if the value is no larger. We then use a special
4141+ // instruction to multiply one byte by 10, and sum it up with the next byte,
4242+ // getting a 16-bit value. We then repeat the same approach as before,
4343+ // checking that the result is not too large.
4444+ //
4545+ // We compute the month the good old ways, as an integer in [0,11], we
4646+ // check for overflows later.
4747+ uint64_t mo = (uint64_t)((date_string[4]-0x30)*10 + (date_string[5]-0x30) - 1);
4848+ __m128i v = _mm_loadu_si128((const __m128i *)date_string);
4949+ // loaded YYYYMMDDHHmmSS.....
5050+ v = _mm_xor_si128(v, _mm_set1_epi8(0x30));
5151+ // W can use _mm_sub_epi8 or _mm_xor_si128 for the subtraction above.
5252+ // subtracting by 0x30 (or '0'), turns all values into a byte value between 0
5353+ // and 9 if the initial input was made of digits.
5454+ __m128i limit =
5555+ _mm_setr_epi8(9, 9, 9, 9, 1, 9, 3, 9, 2, 9, 5, 9, 5, 9, -1, -1);
5656+ // credit @aqrit
5757+ // overflows are still possible, if hours are in the range 24 to 29
5858+ // of if days are in the range 32 to 39
5959+ // or if months are in the range 12 to 19.
6060+ __m128i abide_by_limits = _mm_subs_epu8(v, limit); // must be all zero
6161+6262+#if defined __SUNPRO_C
6363+ __m128i byteflip = _mm_setr_epi64((__m64){0x0607040502030001ULL},
6464+ (__m64){0x0e0f0c0d0a0b0809ULL});
6565+#else
6666+ __m128i byteflip = _mm_setr_epi64((__m64)0x0607040502030001ULL,
6767+ (__m64)0x0e0f0c0d0a0b0809ULL);
6868+#endif
6969+7070+ __m128i little_endian = _mm_shuffle_epi8(v, byteflip);
7171+ __m128i limit16 = _mm_setr_epi16(0x0909, 0x0909, 0x0102, 0x0301, 0x0203,
7272+ 0x0509, 0x0509, -1);
7373+ __m128i abide_by_limits16 =
7474+ _mm_subs_epu16(little_endian, limit16); // must be all zero
7575+7676+ __m128i combined_limits =
7777+ _mm_or_si128(abide_by_limits16, abide_by_limits); // must be all zero
7878+7979+ if (!_mm_test_all_zeros(combined_limits, combined_limits)) {
8080+ return false;
8181+ }
8282+ // 0x000000SS0mmm0HHH`00DD00MM00YY00YY
8383+ //////////////////////////////////////////////////////
8484+ // pmaddubsw has a high latency (e.g., 5 cycles) and is
8585+ // likely a performance bottleneck.
8686+ /////////////////////////////////////////////////////
8787+ const __m128i weights = _mm_setr_epi8(
8888+ // Y Y Y Y m m d d H H M M S S - -
8989+ 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 0, 0);
9090+ v = _mm_maddubs_epi16(v, weights);
9191+9292+ uint64_t hi = (uint64_t)_mm_extract_epi64(v, 1);
9393+ uint64_t seconds = (hi * 0x0384000F00004000) >> 46;
9494+ uint64_t lo = (uint64_t)_mm_extract_epi64(v, 0);
9595+ uint64_t yr = (lo * 0x64000100000000) >> 48;
9696+9797+ // We compute the day (starting at zero). We implicitly
9898+ // check for overflows later.
9999+ uint64_t dy = (uint64_t)_mm_extract_epi8(v, 6) - 1;
100100+101101+ bool is_leap_yr = (bool)is_leap_year((uint32_t)yr);
102102+ if(yr < 1970 || mo > 11) { return false; } // unlikely branch
103103+ if (dy > (uint64_t)mdays_minus_one[mo]) { // unlikely branch
104104+ if (mo == 1 && is_leap_yr) {
105105+ if (dy != 29 - 1) {
106106+ return false;
107107+ }
108108+ } else {
109109+ return false;
110110+ }
111111+ }
112112+ uint64_t days = 365 * (yr - 1970) + (uint64_t)leap_days((uint32_t)yr);
113113+114114+ days += (uint64_t)mdays_cumulative[mo];
115115+ days += is_leap_yr & (mo > 1);
116116+117117+ days += dy;
118118+ uint64_t time_in_second64 = seconds + days * 60 * 60 * 24;
119119+ *time_in_second = (uint32_t)time_in_second64;
120120+ return true;
121121+}
122122+123123+nonnull_all
124124+static really_inline int32_t parse_time(
125125+ parser_t *parser,
126126+ const type_info_t *type,
127127+ const rdata_info_t *field,
128128+ rdata_t *rdata,
129129+ const token_t *token)
130130+{
131131+ uint32_t time;
132132+133133+ if (unlikely(token->length != 14))
134134+ return parse_int32(parser, type, field, rdata, token);
135135+ if (!sse_parse_time(token->data, &time))
136136+ SYNTAX_ERROR(parser, "Invalid %s in %s", NAME(field), NAME(type));
137137+138138+ time = htobe32(time);
139139+ memcpy(rdata->octets, &time, sizeof(time));
140140+ rdata->octets += sizeof(time);
141141+ return 0;
142142+}
143143+144144+#endif // TIME_H