New upstream version 1.14.2
Sebastian Dröge
5 years ago
0 | === release 1.14.2 === | |
1 | ||
2 | 2018-07-20 01:08:03 +0100 Tim-Philipp Müller <tim@centricular.com> | |
3 | ||
4 | * ChangeLog: | |
5 | * NEWS: | |
6 | * RELEASE: | |
7 | * configure.ac: | |
8 | * gst-python.doap: | |
9 | * meson.build: | |
10 | Release 1.14.2 | |
11 | ||
0 | 12 | === release 1.14.1 === |
1 | 13 | |
2 | 14 | 2018-05-17 13:35:48 +0100 Tim-Philipp Müller <tim@centricular.com> |
86 | 86 | applications that set up connections with and stream to and from other |
87 | 87 | WebRTC peers, whilst leveraging all of the usual GStreamer features such |
88 | 88 | as hardware-accelerated encoding and decoding, OpenGL integration, |
89 | zero-copy and embedded platform support. And it's easy to build and | |
89 | zero-copy and embedded platform support. And it’s easy to build and | |
90 | 90 | integrate into your application too! |
91 | 91 | |
92 | 92 | WebRTC enables real-time communication of audio, video and data with web |
93 | 93 | browsers and native apps, and it is supported or about to be support by |
94 | 94 | recent versions of all major browsers and operating systems. |
95 | 95 | |
96 | GStreamer's new WebRTC implementation uses libnice for Interactive | |
96 | GStreamer’s new WebRTC implementation uses libnice for Interactive | |
97 | 97 | Connectivity Establishment (ICE) to figure out the best way to |
98 | 98 | communicate with other peers, punch holes into firewalls, and traverse |
99 | 99 | NATs. |
103 | 103 | functionality is missing it should be fairly obvious where it needs to |
104 | 104 | go. |
105 | 105 | |
106 | For more details, background and example code, check out Nirbheek's blog | |
107 | post _GStreamer has grown a WebRTC implementation_, as well as Matthew's | |
108 | _GStreamer WebRTC_ talk from last year's GStreamer Conference in Prague. | |
106 | For more details, background and example code, check out Nirbheek’s blog | |
107 | post _GStreamer has grown a WebRTC implementation_, as well as Matthew’s | |
108 | _GStreamer WebRTC_ talk from last year’s GStreamer Conference in Prague. | |
109 | 109 | |
110 | 110 | New Elements |
111 | 111 | |
116 | 116 | (SRT) video streaming protocol, which aims to be easy to use whilst |
117 | 117 | striking a new balance between reliability and latency for low |
118 | 118 | latency video streaming use cases. More details about SRT and the |
119 | implementation in GStreamer in Olivier's blog post _SRT in | |
119 | implementation in GStreamer in Olivier’s blog post _SRT in | |
120 | 120 | GStreamer_. |
121 | 121 | |
122 | 122 | - av1enc and av1dec elements providing experimental support for the |
137 | 137 | GStreamer-internal latency as well as latency added by external |
138 | 138 | components or circuits. |
139 | 139 | |
140 | - 'fakevideosink is basically a null sink for video data and very | |
140 | - ’fakevideosink is basically a null sink for video data and very | |
141 | 141 | similar to fakesink, only that it will answer allocation queries and |
142 | 142 | will advertise support for various video-specific things such |
143 | 143 | GstVideoMeta, GstVideoCropMeta and GstVideoOverlayCompositionMeta |
148 | 148 | multiple processes. Usually a GStreamer pipeline runs in a single |
149 | 149 | process and parallelism is achieved by distributing workloads using |
150 | 150 | multiple threads. This means that all elements in the pipeline have |
151 | access to all the other elements' memory space however, including | |
151 | access to all the other elements’ memory space however, including | |
152 | 152 | that of any libraries used. For security reasons one might therefore |
153 | 153 | want to put sensitive parts of a pipeline such as DRM and decryption |
154 | 154 | handling into a separate process to isolate it from the rest of the |
155 | 155 | pipeline. This can now be achieved with the new ipcpipeline plugin. |
156 | Check out George's blog post _ipcpipeline: Splitting a GStreamer | |
156 | Check out George’s blog post _ipcpipeline: Splitting a GStreamer | |
157 | 157 | pipeline into multiple processes_ or his lightning talk from last |
158 | year's GStreamer Conference in Prague for all the gory details. | |
158 | year’s GStreamer Conference in Prague for all the gory details. | |
159 | 159 | |
160 | 160 | - proxysink and proxysrc are new elements to pass data from one |
161 | 161 | pipeline to another within the same process, very similar to the |
162 | 162 | existing inter elements, but not limited to raw audio and video |
163 | 163 | data. These new proxy elements are very special in how they work |
164 | 164 | under the hood, which makes them extremely powerful, but also |
165 | dangerous if not used with care. The reason for this is that it's | |
166 | not just data that's passed from sink to src, but these elements | |
165 | dangerous if not used with care. The reason for this is that it’s | |
166 | not just data that’s passed from sink to src, but these elements | |
167 | 167 | basically establish a two-way wormhole that passes through queries |
168 | 168 | and events in both directions, which means caps negotiation and |
169 | 169 | allocation query driven zero-copy can work through this wormhole. |
172 | 172 | streaming thread. There is a queue element inside proxysrc to |
173 | 173 | decouple the source thread from the sink thread, but that queue is |
174 | 174 | not unlimited, so it is entirely possible that the proxysink |
175 | pipeline thread gets stuck in the proxysrc pipeline, e.g. when that | |
175 | pipeline thread gets stuck in the proxysrc pipeline, e.g. when that | |
176 | 176 | pipeline is paused or stops consuming data for some other reason. |
177 | 177 | This means that one should always shut down down the proxysrc |
178 | 178 | pipeline before shutting down the proxysink pipeline, for example. |
179 | 179 | Or at least take care when shutting down pipelines. Usually this is |
180 | 180 | not a problem though, especially not in live pipelines. For more |
181 | information see Nirbheek's blog post _Decoupling GStreamer | |
181 | information see Nirbheek’s blog post _Decoupling GStreamer | |
182 | 182 | Pipelines_, and also check out out the new ipcpipeline plugin for |
183 | 183 | sending data from one process to another process (see above). |
184 | 184 | |
203 | 203 | in the GStreamer WebRTC implementation. |
204 | 204 | |
205 | 205 | - GstReferenceTimestampMeta is a new meta that allows you to attach |
206 | additional reference timestamps to a buffer. These timestamps don't | |
206 | additional reference timestamps to a buffer. These timestamps don’t | |
207 | 207 | have to relate to the pipeline clock in any way. Examples of this |
208 | 208 | could be an NTP timestamp when the media was captured, a frame |
209 | 209 | counter on the capture side or the (local) UNIX timestamp when the |
210 | 210 | media was captured. The decklink elements make use of this. |
211 | 211 | |
212 | - GstVideoRegionOfInterestMeta: it's now possible to attach generic | |
212 | - GstVideoRegionOfInterestMeta: it’s now possible to attach generic | |
213 | 213 | free-form element-specific parameters to a region of interest meta, |
214 | 214 | for example to tell a downstream encoder to use certain codec |
215 | 215 | parameters for a certain region. |
246 | 246 | |
247 | 247 | - GstAudioStreamAlign is a new helper object for audio elements that |
248 | 248 | handles discontinuity detection and sample alignment. It will align |
249 | samples after the previous buffer's samples, but keep track of the | |
249 | samples after the previous buffer’s samples, but keep track of the | |
250 | 250 | divergence between buffer timestamps and sample position (jitter). |
251 | 251 | If it exceeds a configurable threshold the alignment will be reset. |
252 | 252 | This simply factors out code that was duplicated in a number of |
266 | 266 | installing and handling a "render-rectangle" property on elements |
267 | 267 | that implement this interface, so that this functionality can also |
268 | 268 | be used from the command line for testing and debugging purposes. |
269 | The property wasn't added to the interface itself as that would | |
269 | The property wasn’t added to the interface itself as that would | |
270 | 270 | require all implementors to provide it which would not be |
271 | 271 | backwards-compatible. |
272 | 272 | |
279 | 279 | element is based on this. |
280 | 280 | |
281 | 281 | - Full list of API new in 1.14: |
282 | - GStreamer core API new in 1.14 | |
283 | - GStreamer base library API new in 1.14 | |
284 | - gst-plugins-base libraries API new in 1.14 | |
285 | - gst-plugins-bad: no list, mostly GstWebRTC library and new | |
286 | non-stream audio decoder base class. | |
282 | - GStreamer core API new in 1.14 | |
283 | - GStreamer base library API new in 1.14 | |
284 | - gst-plugins-base libraries API new in 1.14 | |
285 | - gst-plugins-bad: no list, mostly GstWebRTC library and new | |
286 | non-stream audio decoder base class. | |
287 | 287 | |
288 | 288 | New RTP features and improvements |
289 | 289 | |
300 | 300 | packet loss using _retransmission (rtx)_. GStreamer has had |
301 | 301 | retransmission support for a long time, but Forward Error Correction |
302 | 302 | allows for different trade-offs: The advantage of Forward Error |
303 | Correction is that it doesn't add latency, whereas retransmission | |
303 | Correction is that it doesn’t add latency, whereas retransmission | |
304 | 304 | requires at least one more roundtrip to request and hopefully |
305 | 305 | receive lost packets; Forward Error Correction increases the |
306 | 306 | required bandwidth however, even in situations where there is no |
316 | 316 | |
317 | 317 | - a few new buffer flags for FEC support: |
318 | 318 | GST_BUFFER_FLAG_NON_DROPPABLE can be used to mark important buffers, |
319 | e.g. to flag RTP packets carrying keyframes or codec setup data for | |
319 | e.g. to flag RTP packets carrying keyframes or codec setup data for | |
320 | 320 | RTP Forward Error Correction purposes, or to prevent still video |
321 | 321 | frames from being dropped by elements due to QoS. There already is a |
322 | 322 | GST_BUFFER_FLAG_DROPPABLE. GST_RTP_BUFFER_FLAG_REDUNDANT is used to |
336 | 336 | - rtpjitterbuffer has a new fast start mode: in many scenarios the |
337 | 337 | jitter buffer will have to wait for the full configured latency |
338 | 338 | before it can start outputting packets. The reason for that is that |
339 | it often can't know what the sequence number of the first expected | |
340 | RTP packet is, so it can't know whether a packet earlier than the | |
339 | it often can’t know what the sequence number of the first expected | |
340 | RTP packet is, so it can’t know whether a packet earlier than the | |
341 | 341 | earliest packet received will still arrive in future. This behaviour |
342 | 342 | can now be bypassed by setting the "faststart-min-packets" property |
343 | 343 | to the number of consecutive packets needed to start, and the jitter |
366 | 366 | - tee now does allocation query aggregation, which is important for |
367 | 367 | zero-copy and efficient data handling, especially for video. Those |
368 | 368 | who want to drop allocation queries on purpose can use the identity |
369 | element's new "drop-allocation" property for that instead. | |
369 | element’s new "drop-allocation" property for that instead. | |
370 | 370 | |
371 | 371 | - audioconvert now has a "mix-matrix" property, which obsoletes the |
372 | audiomixmatrix element. There's also mix matrix support in the audio | |
372 | audiomixmatrix element. There’s also mix matrix support in the audio | |
373 | 373 | conversion and channel mixing API. |
374 | 374 | |
375 | 375 | - x264enc: new "insert-vui" property to disable VUI (Video Usability |
408 | 408 | |
409 | 409 | - rtspsrc now has support for RTSP protocol version 2.0 as well as |
410 | 410 | ONVIF audio backchannels (see below for more details). It also |
411 | sports a new "accept-certificate" signal for "manually" checking a | |
411 | sports a new "accept-certificate" signal for “manually” checking a | |
412 | 412 | TLS certificate for validity. It now also prints RTSP/SDP messages |
413 | 413 | to the gstreamer debug log instead of stdout. |
414 | 414 | |
417 | 417 | |
418 | 418 | - splitmuxsink has gained a "split-now" action signal and new |
419 | 419 | "alignment-threshold" and "use-robust-muxing" properties. If robust |
420 | muxing is enabled, it will check and set the muxer's reserved space | |
421 | properties if present. This is primarily for use with mp4mux's | |
420 | muxing is enabled, it will check and set the muxer’s reserved space | |
421 | properties if present. This is primarily for use with mp4mux’s | |
422 | 422 | robust muxing mode. |
423 | 423 | |
424 | 424 | - qtmux has a new _prefill recording mode_ which sets up a moov header |
442 | 442 | This allows for connection reuse, cookie sharing, etc. Applications |
443 | 443 | can also force a context to use. In other news, HTTP headers |
444 | 444 | received from the server are posted as element messages on the bus |
445 | now for easier diagnostics, and it's also possible now to use other | |
445 | now for easier diagnostics, and it’s also possible now to use other | |
446 | 446 | types of proxy servers such as SOCKS4 or SOCKS5 proxies, support for |
447 | 447 | which is implemented directly in gio. Before only HTTP proxies were |
448 | 448 | allowed. |
449 | 449 | |
450 | 450 | - qtmux, mp4mux and matroskamux will now refuse caps changes of input |
451 | streams at runtime. This isn't really supported with these | |
451 | streams at runtime. This isn’t really supported with these | |
452 | 452 | containers (or would have to be implemented differently with a |
453 | considerable effort) and doesn't produce valid and spec-compliant | |
454 | files that will play everywhere. So if you can't guarantee that the | |
455 | input caps won't change, use a container format that does support on | |
453 | considerable effort) and doesn’t produce valid and spec-compliant | |
454 | files that will play everywhere. So if you can’t guarantee that the | |
455 | input caps won’t change, use a container format that does support on | |
456 | 456 | the fly caps changes for a stream such as MPEG-TS or use |
457 | 457 | splitmuxsink which can start a new file when the caps change. What |
458 | 458 | would happen before is that e.g. rtph264depay or rtph265depay would |
459 | 459 | simply send new SPS/PPS inband even for AVC format, which would then |
460 | 460 | get muxed into the container as if nothing changed. Some decoders |
461 | will handle this just fine, but that's often more luck than by | |
462 | design. In any case, it's not right, so we disallow it now. | |
461 | will handle this just fine, but that’s often more luck than by | |
462 | design. In any case, it’s not right, so we disallow it now. | |
463 | 463 | |
464 | 464 | - matroskamux has Table of Content (TOC) support now (chapters etc.) |
465 | 465 | and matroskademux TOC support has been improved. matroskademux has |
474 | 474 | |
475 | 475 | - The avwait element has a new "end-timecode" property and posts |
476 | 476 | "avwait-status" element messages now whenever avwait starts or stops |
477 | passing through data (e.g. because target-timecode and end-timecode | |
477 | passing through data (e.g. because target-timecode and end-timecode | |
478 | 478 | respectively have been reached). |
479 | 479 | |
480 | - 'alsamidisrc' element has been broken for many many years and has | |
480 | - ‘alsamidisrc’ element has been broken for many many years and has | |
481 | 481 | now been repaired allowing live capture from your MIDI HW. |
482 | 482 | |
483 | 483 | - h265parse and h265parse will try harder to make upstream output the |
499 | 499 | |
500 | 500 | - The NVIDIA NVENC hardware-accelerated video encoders now support |
501 | 501 | dynamic bitrate and preset reconfiguration and support the I420 |
502 | 4:2:0 video format. It's also possible to configure the gop size via | |
502 | 4:2:0 video format. It’s also possible to configure the gop size via | |
503 | 503 | the new "gop-size" property. |
504 | 504 | |
505 | 505 | - The MPEG-TS muxer and demuxer (tsmux, tsdemux) now have support for |
514 | 514 | - The decklink plugin for Blackmagic capture and playback cards have |
515 | 515 | seen numerous improvements: |
516 | 516 | |
517 | - decklinkaudiosrc and decklinkvideosrc now put hardware reference | |
518 | timestamp on buffers in form of GstReferenceTimestampMetas. | |
519 | This can be useful to know on multi-channel cards which frames from | |
520 | different channels were captured at the same time. | |
521 | ||
522 | - decklinkvideosink has gained support for Decklink hardware keying | |
523 | with two new properties ("keyer-mode" and "keyer-level") to control | |
524 | the built-in hardware keyer of Decklink cards. | |
525 | ||
526 | - decklinkaudiosink has been re-implemented around GstBaseSink instead | |
527 | of the GstAudioBaseSink base class, since the Decklink APIs don't | |
528 | fit very well with the GstAudioBaseSink APIs, which used to cause | |
529 | various problems due to inaccuracies in the clock calculations. | |
530 | Problems were audio drop-outs and A/V sync going wrong after | |
531 | pausing/seeking. | |
532 | ||
533 | - support for more than 16 devices, without any artificial limit | |
534 | ||
535 | - work continued on the msdk plugin for Intel's Media SDK which | |
517 | - decklinkaudiosrc and decklinkvideosrc now put hardware reference | |
518 | timestamp on buffers in form of GstReferenceTimestampMetas. | |
519 | This can be useful to know on multi-channel cards which frames | |
520 | from different channels were captured at the same time. | |
521 | ||
522 | - decklinkvideosink has gained support for Decklink hardware | |
523 | keying with two new properties ("keyer-mode" and "keyer-level") | |
524 | to control the built-in hardware keyer of Decklink cards. | |
525 | ||
526 | - decklinkaudiosink has been re-implemented around GstBaseSink | |
527 | instead of the GstAudioBaseSink base class, since the Decklink | |
528 | APIs don’t fit very well with the GstAudioBaseSink APIs, which | |
529 | used to cause various problems due to inaccuracies in the clock | |
530 | calculations. Problems were audio drop-outs and A/V sync going | |
531 | wrong after pausing/seeking. | |
532 | ||
533 | - support for more than 16 devices, without any artificial limit | |
534 | ||
535 | - work continued on the msdk plugin for Intel’s Media SDK which | |
536 | 536 | enables hardware-accelerated video encoding and decoding on Intel |
537 | 537 | graphics hardware on Windows or Linux. Added the video memory, |
538 | 538 | buffer pool, and context/session sharing support which helps to |
551 | 551 | streams, meaning it can do fast-forward/fast-rewind of normal (non-I |
552 | 552 | frame only) streams even at high speeds without saturating network |
553 | 553 | bandwidth or exceeding decoder capabilities. It will keep statistics |
554 | and skip keyframes or fragments as needed. See Sebastian's blog post | |
554 | and skip keyframes or fragments as needed. See Sebastian’s blog post | |
555 | 555 | _DASH trick-mode playback in GStreamer_ for more details. It also |
556 | 556 | supports webvtt subtitle streams now and has seen improvements when |
557 | 557 | seeking in live streams. |
559 | 559 | - kmssink has seen lots of fixes and improvements in this cycle, |
560 | 560 | including: |
561 | 561 | |
562 | - Raspberry Pi (vc4) and Xilinx DRM driver support | |
563 | ||
564 | - new "render-rectangle" property that can be used from the command | |
565 | line as well as "display-width" and "display-height", and | |
566 | "can-scale" properties | |
567 | ||
568 | - GstVideoCropMeta support | |
562 | - Raspberry Pi (vc4) and Xilinx DRM driver support | |
563 | ||
564 | - new "render-rectangle" property that can be used from the | |
565 | command line as well as "display-width" and "display-height", | |
566 | and "can-scale" properties | |
567 | ||
568 | - GstVideoCropMeta support | |
569 | 569 | |
570 | 570 | Plugin and library moves |
571 | 571 | |
595 | 595 | It improves upon the existing GstCollectPads API in that it is a proper |
596 | 596 | base class which was also designed with live streaming in mind. |
597 | 597 | GstAggregator subclasses will operate in a mode with defined latency if |
598 | any of the inputs are live streams. This ensures that the pipeline won't | |
598 | any of the inputs are live streams. This ensures that the pipeline won’t | |
599 | 599 | stall if any of the inputs stop producing data, and that the configured |
600 | 600 | maximum latency is never exceeded. |
601 | 601 | |
603 | 603 | |
604 | 604 | GstAudioAggregator is a new base class for raw audio mixers and muxers |
605 | 605 | and is based on GstAggregator (see above). It provides defined-latency |
606 | mixing of raw audio inputs and ensures that the pipeline won't stall | |
606 | mixing of raw audio inputs and ensures that the pipeline won’t stall | |
607 | 607 | even if one of the input streams stops producing data. |
608 | 608 | |
609 | 609 | As part of the move to stabilise the API there were some last-minute API |
610 | 610 | changes and clean-ups, but those should mostly affect internal elements. |
611 | 611 | |
612 | 612 | It is used by the audiomixer element, which is a replacement for |
613 | 'adder', which did not handle live inputs very well and did not align | |
613 | ‘adder’, which did not handle live inputs very well and did not align | |
614 | 614 | input streams according to running time. audiomixer should behave much |
615 | 615 | better in that respect and generally behave as one would expected in |
616 | 616 | most scenarios. |
617 | 617 | |
618 | Similarly, audiointerleave replaces the 'interleave' element which did | |
618 | Similarly, audiointerleave replaces the ‘interleave’ element which did | |
619 | 619 | not handle live inputs or non-aligned inputs very robustly. |
620 | 620 | |
621 | 621 | GstAudioAggregator and its subclases have gained support for input |
624 | 624 | handled correctly. |
625 | 625 | |
626 | 626 | We hope to move the video equivalents (GstVideoAggregator and |
627 | compositor) to -base in the next cycle, i.e. for 1.16. | |
627 | compositor) to -base in the next cycle, i.e. for 1.16. | |
628 | 628 | |
629 | 629 | GStreamer OpenGL integration library and plugin moved from -bad to -base |
630 | 630 | |
645 | 645 | qmlglsink video sink element as well as a qmlglsrc element. qmlglsink |
646 | 646 | renders video into a QQuickItem, and qmlglsrc captures a window from a |
647 | 647 | QML view and feeds it as video into a pipeline for further processing. |
648 | Both elements leverage GStreamer's OpenGL integration. In addition to | |
648 | Both elements leverage GStreamer’s OpenGL integration. In addition to | |
649 | 649 | the move to -good the following features were added: |
650 | 650 | |
651 | 651 | - A proxy object is now used for thread-safe access to the QML widget |
653 | 653 | video widget at any time, so without this we might be left with a |
654 | 654 | dangling pointer. |
655 | 655 | |
656 | - EGL is now supported with the X11 backend, which works e.g. on | |
656 | - EGL is now supported with the X11 backend, which works e.g. on | |
657 | 657 | Freescale imx6 |
658 | 658 | |
659 | 659 | The GTK+ plugin has also moved from -bad to -good. It includes gtksink |
660 | 660 | and gtkglsink which both render video into a GtkWidget. gtksink uses |
661 | 661 | Cairo for rendering the video, which will work everywhere in all |
662 | 662 | scenarios but involves an extra memory copy, whereas gtkglsink fully |
663 | leverages GStreamer's OpenGL integration, but might not work properly in | |
664 | all scenarios, e.g. where the OpenGL driver does not properly support | |
663 | leverages GStreamer’s OpenGL integration, but might not work properly in | |
664 | all scenarios, e.g. where the OpenGL driver does not properly support | |
665 | 665 | multiple sharing contexts in different threads; on Linux Nouveau is |
666 | known to be broken in this respect, whilst NVIDIA's proprietary drivers | |
666 | known to be broken in this respect, whilst NVIDIA’s proprietary drivers | |
667 | 667 | and most other drivers generally work fine, and the experience with |
668 | Intel's driver seems to be mixed; some proprietary embedded Linux | |
669 | drivers don't work; macOS works. | |
668 | Intel’s driver seems to be mixed; some proprietary embedded Linux | |
669 | drivers don’t work; macOS works. | |
670 | 670 | |
671 | 671 | GstPhysMemoryAllocator interface moved from -bad to -base |
672 | 672 | |
675 | 675 | |
676 | 676 | Plugin removals |
677 | 677 | |
678 | - the sunaudio plugin was removed, since it couldn't ever have been | |
678 | - the sunaudio plugin was removed, since it couldn’t ever have been | |
679 | 679 | built or used with GStreamer 1.0, but no one even noticed in all |
680 | 680 | these years. |
681 | 681 | |
682 | 682 | - the schroedinger-based Dirac encoder/decoder plugin has been |
683 | 683 | removed, as there is no longer any upstream or anyone else |
684 | maintaining it. Seeing that it's quite a fringe codec it seemed best | |
684 | maintaining it. Seeing that it’s quite a fringe codec it seemed best | |
685 | 685 | to simply remove it. |
686 | 686 | |
687 | 687 | API removals |
695 | 695 | |
696 | 696 | - The video support library has gained support for a few new pixel |
697 | 697 | formats: |
698 | - NV16_10LE32: 10-bit variant of NV16, packed into 32bit words (plus 2 | |
699 | bits padding) | |
700 | - NV12_10LE32: 10-bit variant of NV12, packed into 32bit words (plus 2 | |
701 | bits padding) | |
702 | - GRAY10_LE32: 10-bit grayscale, packed in 32bit words (plus 2 bits | |
703 | padding) | |
704 | ||
698 | - NV16_10LE32: 10-bit variant of NV16, packed into 32bit words | |
699 | (plus 2 bits padding) | |
700 | - NV12_10LE32: 10-bit variant of NV12, packed into 32bit words | |
701 | (plus 2 bits padding) | |
702 | - GRAY10_LE32: 10-bit grayscale, packed in 32bit words (plus 2 | |
703 | bits padding) | |
705 | 704 | - decodebin, playbin and GstDiscoverer have seen stability |
706 | 705 | improvements in corner cases such as shutdown while still starting |
707 | 706 | up or shutdown in error cases (hat tip to the oss-fuzz project). |
708 | 707 | |
709 | 708 | - floating reference handling was inconsistent and has been cleaned up |
710 | 709 | across the board, including annotations. This solves various |
711 | long-standing memory leaks in language bindings, which e.g. often | |
710 | long-standing memory leaks in language bindings, which e.g. often | |
712 | 711 | caused elements and pads to be leaked. |
713 | 712 | |
714 | 713 | - major gobject-introspection annotation improvements for large parts |
715 | 714 | of the library API, including nullability of return types and |
716 | function parameters, correct types (e.g. strings vs. filenames), | |
715 | function parameters, correct types (e.g. strings vs. filenames), | |
717 | 716 | ownership transfer, array length parameters, etc. This allows to use |
718 | 717 | bigger parts of the GStreamer API to be safely used from dynamic |
719 | language bindings (e.g. Python, Javascript) and allows static | |
720 | bindings (e.g. C#, Rust, Vala) to autogenerate more API bindings | |
718 | language bindings (e.g. Python, Javascript) and allows static | |
719 | bindings (e.g. C#, Rust, Vala) to autogenerate more API bindings | |
721 | 720 | without manual intervention. |
722 | 721 | |
723 | 722 | OpenGL integration |
726 | 725 | gst-plugins-base and is now part of our stable API. |
727 | 726 | |
728 | 727 | - new MESA3D GBM BACKEND. On devices with working libdrm support, it |
729 | is possible to use Mesa3D's GBM library to set up an EGL context | |
728 | is possible to use Mesa3D’s GBM library to set up an EGL context | |
730 | 729 | directly on top of KMS. This makes it possible to use the GStreamer |
731 | 730 | OpenGL elements without a windowing system if a libdrm- and |
732 | 731 | Mesa3D-supported GPU is present. |
760 | 759 | log handler of course, this just provides this functionality as part |
761 | 760 | of GStreamer. |
762 | 761 | |
763 | - 'fakevideosink is a null sink for video data that advertises | |
762 | - ’fakevideosink is a null sink for video data that advertises | |
764 | 763 | video-specific metas and behaves like a video sink. See above for |
765 | 764 | more details. |
766 | 765 | |
816 | 815 | the best of our knowledge the first RTSP 2.0 implementation ever! |
817 | 816 | |
818 | 817 | - ONVIF audio backchannel support. This is an extension specified by |
819 | ONVIF that allows RTSP clients (e.g. a control room operator) to | |
820 | send audio back to the RTSP server (e.g. an IP camera). | |
818 | ONVIF that allows RTSP clients (e.g. a control room operator) to | |
819 | send audio back to the RTSP server (e.g. an IP camera). | |
821 | 820 | Theoretically this could have been done also by using the RECORD |
822 | 821 | method of the RTSP protocol, but ONVIF chose not to do that, so the |
823 | 822 | backchannel is set up alongside the other streams. Format |
835 | 834 | manually checking a TLS certificate for validity. |
836 | 835 | |
837 | 836 | - Fix keep-alive/timeout issue for certain clients using TCP |
838 | interleave as transport who don't do keep-alive via some other | |
837 | interleave as transport who don’t do keep-alive via some other | |
839 | 838 | method such as periodic RTSP OPTION requests. We now put netaddress |
840 | 839 | metas on the packets from the TCP interleaved stream, so can map |
841 | 840 | RTCP packets to the right stream in the server and can handle them |
852 | 851 | |
853 | 852 | GStreamer VAAPI |
854 | 853 | |
855 | - Improve DMABuf's usage, both upstream and dowstream, and | |
854 | - Improve DMABuf’s usage, both upstream and dowstream, and | |
856 | 855 | memory:DMABuf caps feature is also negotiated when the dmabuf-based |
857 | 856 | buffer cannot be mapped onto user-space. |
858 | 857 | |
864 | 863 | |
865 | 864 | - VA display cache was removed. |
866 | 865 | |
867 | - libva's log messages are now redirected into the GStreamer log | |
866 | - libva’s log messages are now redirected into the GStreamer log | |
868 | 867 | handler. |
869 | 868 | |
870 | 869 | - Decoders improved their upstream re-negotiation by avoiding to |
871 | 870 | re-instantiate the internal decoder if stream caps are compatible |
872 | 871 | with the previous one. |
873 | 872 | |
874 | - When downstream doesn't support GstVideoMeta and the decoded frames | |
875 | don't have standard strides, they are copied onto system | |
873 | - When downstream doesn’t support GstVideoMeta and the decoded frames | |
874 | don’t have standard strides, they are copied onto system | |
876 | 875 | memory-based buffers. |
877 | 876 | |
878 | 877 | - H.264 decoder has a low-latency property, for live streams which |
879 | doesn't conform the H.264 specification but still it is required to | |
878 | doesn’t conform the H.264 specification but still it is required to | |
880 | 879 | push the frames to downstream as soon as possible. |
881 | 880 | |
882 | 881 | - As part of the Google Summer of Code 2017 the H.264 decoder drops |
923 | 922 | - vaapisink was demoted to marginal rank on Wayland because COGL |
924 | 923 | cannot display YUV surfaces. |
925 | 924 | |
926 | More details in Víctor's blog post _GStreamer VA-API 1.14: what’s new?_. | |
925 | More details in Víctor’s blog post _GStreamer VA-API 1.14: what’s new?_. | |
927 | 926 | |
928 | 927 | |
929 | 928 | GStreamer Editing Services and NLE |
941 | 940 | |
942 | 941 | GStreamer validate |
943 | 942 | |
944 | - Handle running scenarios on live pipelines (in the "content sense", | |
943 | - Handle running scenarios on live pipelines (in the “content sense”, | |
945 | 944 | not the GStreamer one) |
946 | 945 | |
947 | 946 | - Implement RTSP support with a basic server based on gst-rtsp-server, |
968 | 967 | |
969 | 968 | - Update wrapped API to GStreamer 1.14 |
970 | 969 | |
971 | - Removed the need for "glue" code | |
970 | - Removed the need for “glue” code | |
972 | 971 | |
973 | 972 | - Provide a nuget |
974 | 973 | |
988 | 987 | |
989 | 988 | - some plugins and libraries have moved between modules, see the |
990 | 989 | _Plugin and_ _library moves_ section above, and their respective |
991 | dependencies have moved with them of course, e.g. the GStreamer | |
990 | dependencies have moved with them of course, e.g. the GStreamer | |
992 | 991 | OpenGL integration support library and plugin is now in |
993 | 992 | gst-plugins-base, and mpg123, LAME and twoLAME based audio decoder |
994 | 993 | and encoder plugins are now in gst-plugins-good. |
1032 | 1031 | |
1033 | 1032 | There is also a small structure size related ABI breakage introduced in |
1034 | 1033 | the gst-plugins-bad codecparsers library between version 1.13.90 and |
1035 | 1.13.91. This should "only" affect gstreamer-vaapi, so anyone who ships | |
1034 | 1.13.91. This should “only” affect gstreamer-vaapi, so anyone who ships | |
1036 | 1035 | the release candidates is advised to upgrade those two modules at the |
1037 | 1036 | same time. |
1038 | 1037 | |
1051 | 1050 | |
1052 | 1051 | - The GStreamer wasapi plugin was rewritten and should not only be |
1053 | 1052 | usable now, but in top shape and suitable for low-latency use cases. |
1054 | The Windows Audio Session API (WASAPI) is Microsoft's most modern | |
1053 | The Windows Audio Session API (WASAPI) is Microsoft’s most modern | |
1055 | 1054 | method for talking with audio devices, and now that the wasapi |
1056 | 1055 | plugin is up to scratch it is preferred over the directsound plugin. |
1057 | 1056 | The ranks of the wasapisink and wasapisrc elements have been updated |
1058 | 1057 | to reflect this. Further improvements include: |
1059 | 1058 | |
1060 | - support for more than 2 channels | |
1061 | ||
1062 | - a new "low-latency" property to enable low-latency operation (which | |
1063 | should always be safe to enable) | |
1064 | ||
1065 | - support for the AudioClient3 API which is only available on Windows | |
1066 | 10: in wasapisink this will be used automatically if available; in | |
1067 | wasapisrc it will have to be enabled explicitly via the | |
1068 | "use-audioclient3" property, as capturing audio with low latency and | |
1069 | without glitches seems to require setting the realtime priority of | |
1070 | the entire pipeline to "critical", which cannot be done from inside | |
1071 | the element, but has to be done in the application. | |
1072 | ||
1073 | - set realtime thread priority to avoid glitches | |
1074 | ||
1075 | - allow opening devices in exclusive mode, which provides much lower | |
1076 | latency compared to shared mode where WASAPI's engine period is | |
1077 | 10ms. This can be activated via the "exclusive" property. | |
1078 | ||
1079 | - Also see Nirbheek's blog post _Low Latency Audio on Windows with | |
1080 | GStreamer_. | |
1059 | - support for more than 2 channels | |
1060 | ||
1061 | - a new "low-latency" property to enable low-latency operation | |
1062 | (which should always be safe to enable) | |
1063 | ||
1064 | - support for the AudioClient3 API which is only available on | |
1065 | Windows 10: in wasapisink this will be used automatically if | |
1066 | available; in wasapisrc it will have to be enabled explicitly | |
1067 | via the "use-audioclient3" property, as capturing audio with low | |
1068 | latency and without glitches seems to require setting the | |
1069 | realtime priority of the entire pipeline to “critical”, which | |
1070 | cannot be done from inside the element, but has to be done in | |
1071 | the application. | |
1072 | ||
1073 | - set realtime thread priority to avoid glitches | |
1074 | ||
1075 | - allow opening devices in exclusive mode, which provides much | |
1076 | lower latency compared to shared mode where WASAPI’s engine | |
1077 | period is 10ms. This can be activated via the "exclusive" | |
1078 | property. | |
1079 | ||
1080 | - Also see Nirbheek’s blog post _Low Latency Audio on Windows with | |
1081 | GStreamer_. | |
1081 | 1082 | |
1082 | 1083 | - There are now GstDeviceProvider implementations for the wasapi and |
1083 | directsound plugins, so it's now possible to discover both audio | |
1084 | directsound plugins, so it’s now possible to discover both audio | |
1084 | 1085 | sources and audio sinks on Windows via the GstDeviceMonitor API |
1085 | 1086 | |
1086 | 1087 | - debug log timestamps are now higher granularity owing to |
1135 | 1136 | Selnes, Thiago Santos, Thibault Saunier, Thijs Vermeir, Tim Allen, |
1136 | 1137 | Tim-Philipp Müller, Ting-Wei Lan, Tomas Rataj, Tom Bailey, Tonu Jaansoo, |
1137 | 1138 | U. Artie Eoff, Umang Jain, Ursula Maplehurst, VaL Doroshchuk, Vasilis |
1138 | Liaskovitis, Víctor Manuel Jáquez Leal, vijay, Vincent Penquerc'h, | |
1139 | Liaskovitis, Víctor Manuel Jáquez Leal, vijay, Vincent Penquerc’h, | |
1139 | 1140 | Vineeth T M, Vivia Nikolaidou, Wang Xin-yu (王昕宇), Wei Feng, Wim |
1140 | 1141 | Taymans, Wonchul Lee, Xabier Rodriguez Calvar, Xavier Claessens, |
1141 | 1142 | XuGuangxin, Yasushi SHOJI, Yi A Wang, Youness Alaoui, |
1142 | 1143 | |
1143 | ... and many others who have contributed bug reports, translations, sent | |
1144 | … and many others who have contributed bug reports, translations, sent | |
1144 | 1145 | suggestions or helped testing. |
1145 | 1146 | |
1146 | 1147 | |
1186 | 1187 | - gst-play-1.0: fix leaving stdin in non-blocking mode after exit |
1187 | 1188 | - flvmux: wait for caps on all input pads before writing header even |
1188 | 1189 | if source is live |
1189 | - flvmux: don't wake up the muxer unless there is data, fixes busy | |
1190 | looping if there's no input data | |
1190 | - flvmux: don’t wake up the muxer unless there is data, fixes busy | |
1191 | looping if there’s no input data | |
1191 | 1192 | - flvmux: fix major leak of input buffers |
1192 | 1193 | - rtspsrc, rtsp-server: revert to RTSP RFC handling of |
1193 | 1194 | sendonly/recvonly attributes |
1211 | 1212 | - h265parse: Make caps writable before modifying them, fixes criticals |
1212 | 1213 | - fakevideosink: request an extra buffer if enable-last-sample is |
1213 | 1214 | enabled |
1214 | - wasapisrc: Don't provide a clock based on WASAPI's clock | |
1215 | - wasapisrc: Don’t provide a clock based on WASAPI’s clock | |
1215 | 1216 | - wasapi: Only use audioclient3 when low-latency, as it might |
1216 | 1217 | otherwise glitch with slow CPUs or VMs |
1217 | - wasapi: Don't derive device period from latency time, should make it | |
1218 | - wasapi: Don’t derive device period from latency time, should make it | |
1218 | 1219 | more robust against glitches |
1219 | 1220 | - audiolatency: Fix wave detection in buffers and avoid bogus pts |
1220 | 1221 | values while starting |
1221 | 1222 | - msdk: fix plugin load on implementations with only HW support |
1222 | 1223 | - msdk: dec: set framerate to the driver only if provided, not in 0/1 |
1223 | 1224 | case |
1224 | - msdk: Don't set extended coding options for JPEG encode | |
1225 | - msdk: Don’t set extended coding options for JPEG encode | |
1225 | 1226 | - rtponviftimestamp: fix state change function init/reset causing |
1226 | 1227 | races/crashes on shutdown |
1227 | 1228 | - decklink: fix initialization failure in windows binary |
1229 | 1230 | dependencies in meson build |
1230 | 1231 | - gl: fix cross-compilation error with viv-fb |
1231 | 1232 | - qmlglsink: make work with eglfs_kms |
1232 | - rtspclientsink: Don't deadlock in preroll on early close | |
1233 | - rtspclientsink: Don’t deadlock in preroll on early close | |
1233 | 1234 | - rtspclientsink: Fix client ports for the RTCP backchannel |
1234 | 1235 | - rtsp-server: Fix session timeout when streaming data to client over |
1235 | 1236 | TCP |
1245 | 1246 | build |
1246 | 1247 | - g-i: update constant values for bindings |
1247 | 1248 | - avoid duplicate symbols in plugins across modules in static builds |
1248 | - ... and many, many more! | |
1249 | - … and many, many more! | |
1249 | 1250 | |
1250 | 1251 | Cerbero build tool and packaging changes in 1.14.1 |
1251 | 1252 | |
1259 | 1260 | errors |
1260 | 1261 | - gnutls: fix assembly symbol names for windows x86 |
1261 | 1262 | - openssl: fix linking on android/armv7 |
1262 | - openssl: fix linker issue with Android NDK's r16 binutils | |
1263 | - openssl: fix linker issue with Android NDK’s r16 binutils | |
1263 | 1264 | - ffmpeg: disable asm for android x86 to fix issues when linking with |
1264 | 1265 | apps |
1265 | 1266 | - x264: disable asm for android x86 to fix issues when linking with |
1270 | 1271 | relocations |
1271 | 1272 | - Check built version while loading recipe and rebuild if needed |
1272 | 1273 | - Fix packaging of libgcc_s_sjlj which was missing in Windows packages |
1273 | - Make not-found in library search fatal so we don't accidentally ship | |
1274 | - Make not-found in library search fatal so we don’t accidentally ship | |
1274 | 1275 | broken packages |
1275 | 1276 | - ship the proxy plugin which was new in 1.14 |
1276 | 1277 | - Fix git commands accidentally pulling in locally built libraries and |
1299 | 1300 | |
1300 | 1301 | 1.14.2 |
1301 | 1302 | |
1302 | The second 1.14 bug-fix release (1.14.2) is scheduled to be released | |
1303 | around mid-June 2018. | |
1303 | The second 1.14 bug-fix release (1.14.2) was released on 20 July 2018. | |
1304 | 1304 | |
1305 | 1305 | This release only contains bugfixes and it should be safe to update from |
1306 | 1306 | 1.14.x. |
1307 | ||
1308 | Noteworthy bugfixes in 1.14.2 | |
1309 | ||
1310 | - asfdemux: Only send flush-stop event for flushing seeks | |
1311 | - glcolorbalance: Support OES textures for input/passthrough, avoids | |
1312 | possibly-unnecessary extra texture copy on Android in the default GL | |
1313 | path inside glimagesink. | |
1314 | - parsebin: Don’t try to continue autoplugging a parser if we got raw | |
1315 | caps | |
1316 | - audiobasesrc: Round down segsize to an integer number of samples | |
1317 | - scaletempo: Mark as Audio in classification | |
1318 | - souphttpsrc: thread-safety fixes | |
1319 | - v4l2bufferpool: Validate that capture buffers were queued, to detect | |
1320 | when buffer importation was refused by the driver. | |
1321 | - v4l2bufferpool: Only return eos for M2M devices not v4l2src when | |
1322 | buggy driver sends empty buffer | |
1323 | - v4l2allocator: Fix userptr importation | |
1324 | - v4l2src: Try to avoid TRY_FMT when camera is streaming, some drivers | |
1325 | don’t like it | |
1326 | - v4l2videoenc: Only renegotiate with upstream, fixes use in | |
1327 | GstRtspServer pipeline | |
1328 | - v4l2: many other fixes | |
1329 | - pitch: fix latency reporting, and various other things | |
1330 | - dvb: fix wrong (GPL) license headers in camconditionalaccess code | |
1331 | - webrtc: Fix transportsendbin to fix spurious shut-down failures in | |
1332 | webrtcbin if DTLS negotiation hasn’t completed yet. | |
1333 | - webrtc: Don’t deadlock on blocked pads on shutdown | |
1334 | - webrtcbin: copy sticky events on our ghostpads so users can use | |
1335 | gst_pad_get_current_caps() to determine what to do with newly-added | |
1336 | pads. | |
1337 | - webrtcbin: fix rtpstorage configuration on 32-bit systems | |
1338 | - webrtcbin: implement support for FEC and RTX | |
1339 | - gstplayer: Fix duration-changed CRITICAL warning if duration did not | |
1340 | actually change | |
1341 | - gstplayer: Avoid trying to join the player thread from itself | |
1342 | - codecparsers: mpeg2 parsing fixes for zero-sized packets | |
1343 | - wasapisink: fix a rounding error when calculating the buffer frame | |
1344 | count | |
1345 | - wasapisink: fix missing unlock in case IAudioClient_Start fails | |
1346 | - wasapi: fix potential crash with MinGW | |
1347 | - rtsp-server: fix race during udpsrc setup, avoiding pushing data on | |
1348 | unlinked udpsrc pad | |
1349 | - rtsp-server: fix waiting for multiple streams in rtspclientsink | |
1350 | - gst-editing-services: group: Fix handling clips that are added to a | |
1351 | layer | |
1352 | - gst-editing-services: python binding fixes | |
1353 | - gst-validate launcher: Allow retrieving coredumps from within | |
1354 | flatpak | |
1355 | - gst-validate launcher: Fix the –forever switch which was not | |
1356 | stopping on error | |
1357 | - vaapi: h264 encoder negotiation fixes | |
1358 | - vaapi: fix issues with native EGL display | |
1359 | - more GIR annotations fixes, especially for arrays | |
1360 | - gstreamer-sharp bindings were updated for g-i annotation fixes in | |
1361 | other modules | |
1362 | - fuzzing fixes | |
1363 | - memory leak fixes | |
1364 | - build fixes: | |
1365 | - build fixes for MSVC compiler | |
1366 | - meson: Fix detection of glib-mkenums under MSYS2 plus other | |
1367 | meson buil fixes | |
1368 | - Fix static build symbol redefinition errors (xvimage, gst-libav) | |
1369 | - qmlgl: build fixes for conflicting declaration of type GLsync | |
1370 | for non-android | |
1371 | - gl: build fixes for missing EGLuint64KHR typedef | |
1372 | - … and many more! | |
1373 | ||
1374 | Contributors to 1.14.2 | |
1375 | ||
1376 | Alessandro Decina, Antoine Jacoutot, Brendan Shanks, Carlos Rafael | |
1377 | Giani, Christoph Reiter, Edward Hervey, Göran Jönsson, Guillaume | |
1378 | Desmottes, Hyunjun Ko, Iñigo Huguet, Jan Schmidt, Johan Bjäreholt, | |
1379 | Louis-Francis Ratté-Boulianne, Lyon Wang, Marian Mihailescu, Mark | |
1380 | Nauwelaerts, Mathieu Duponchelle, Matthew Waters, Michael Tretter, | |
1381 | Nicolas Dufresne, Nirbheek Chauhan, Philipp Zabel, Roland Jon, Sebastian | |
1382 | Dröge, Seungha Yang, Sreerenj Balachandran, Suhas Nayak, Thibault | |
1383 | Saunier, Tim-Philipp Müller, Víctor Manuel Jáquez Leal, Vivia | |
1384 | Nikolaidou, wangzq, and many others. Thank you all. | |
1385 | ||
1386 | List of bugs fixed in 1.14.2 | |
1387 | ||
1388 | For a full list of bugfixes see Bugzilla. Note that this is not the full | |
1389 | list of changes. For the full list of changes please refer to the GIT | |
1390 | logs or ChangeLogs of the particular modules. | |
1307 | 1391 | |
1308 | 1392 | |
1309 | 1393 | Known Issues |
1312 | 1396 | GStreamer webrtc support) is currently not shipped as part of the |
1313 | 1397 | Windows binary packages due to a build system issue. |
1314 | 1398 | |
1315 | - The gst-libav module currently won't build against the | |
1316 | newly-released ffmpeg 4.0 (as in F28). Use the internal ffmpeg copy | |
1317 | instead, if you build using autotools. | |
1399 | - The gst-libav module in 1.14 will only build against older ffmpeg | |
1400 | 3.x versions and won’t build against the newly-released ffmpeg 4.0 | |
1401 | (as in RPM Fusion for Fedora 28) due to API changes. Use the | |
1402 | internal ffmpeg copy instead if you build using autotools. This is | |
1403 | fixed in git master / upcoming 1.16, but won’t be backported to the | |
1404 | 1.14 branch as it is rather intrusive and difficult to support both | |
1405 | old and new APIs at the same time. | |
1318 | 1406 | |
1319 | 1407 | |
1320 | 1408 | Schedule for 1.16 |
0 | This is GStreamer gst-python 1.14.1. | |
0 | This is GStreamer gst-python 1.14.2. | |
1 | 1 | |
2 | The GStreamer team is pleased to announce a new bug-fix release in the | |
2 | The GStreamer team is pleased to announce another bug-fix release in the | |
3 | 3 | stable 1.x API series of your favourite cross-platform multimedia framework! |
4 | 4 | |
5 | 5 | The 1.14 release series adds new features on top of the 1.12 series and is |
0 | 0 | #! /bin/sh |
1 | 1 | # Attempt to guess a canonical system name. |
2 | # Copyright 1992-2017 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2017-11-07' | |
2 | # Copyright 1992-2018 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2018-02-24' | |
5 | 5 | |
6 | 6 | # This file is free software; you can redistribute it and/or modify it |
7 | 7 | # under the terms of the GNU General Public License as published by |
49 | 49 | GNU config.guess ($timestamp) |
50 | 50 | |
51 | 51 | Originally written by Per Bothner. |
52 | Copyright 1992-2017 Free Software Foundation, Inc. | |
52 | Copyright 1992-2018 Free Software Foundation, Inc. | |
53 | 53 | |
54 | 54 | This is free software; see the source for copying conditions. There is NO |
55 | 55 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
106 | 106 | dummy=$tmp/dummy ; |
107 | 107 | tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; |
108 | 108 | case $CC_FOR_BUILD,$HOST_CC,$CC in |
109 | ,,) echo "int x;" > $dummy.c ; | |
109 | ,,) echo "int x;" > "$dummy.c" ; | |
110 | 110 | for c in cc gcc c89 c99 ; do |
111 | if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then | |
111 | if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then | |
112 | 112 | CC_FOR_BUILD="$c"; break ; |
113 | 113 | fi ; |
114 | 114 | done ; |
131 | 131 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
132 | 132 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
133 | 133 | |
134 | case "${UNAME_SYSTEM}" in | |
134 | case "$UNAME_SYSTEM" in | |
135 | 135 | Linux|GNU|GNU/*) |
136 | 136 | # If the system lacks a compiler, then just pick glibc. |
137 | 137 | # We could probably try harder. |
138 | 138 | LIBC=gnu |
139 | 139 | |
140 | eval $set_cc_for_build | |
141 | cat <<-EOF > $dummy.c | |
140 | eval "$set_cc_for_build" | |
141 | cat <<-EOF > "$dummy.c" | |
142 | 142 | #include <features.h> |
143 | 143 | #if defined(__UCLIBC__) |
144 | 144 | LIBC=uclibc |
148 | 148 | LIBC=gnu |
149 | 149 | #endif |
150 | 150 | EOF |
151 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` | |
151 | eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" | |
152 | ||
153 | # If ldd exists, use it to detect musl libc. | |
154 | if command -v ldd >/dev/null && \ | |
155 | ldd --version 2>&1 | grep -q ^musl | |
156 | then | |
157 | LIBC=musl | |
158 | fi | |
152 | 159 | ;; |
153 | 160 | esac |
154 | 161 | |
155 | 162 | # Note: order is significant - the case branches are not exclusive. |
156 | 163 | |
157 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |
164 | case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in | |
158 | 165 | *:NetBSD:*:*) |
159 | 166 | # NetBSD (nbsd) targets should (where applicable) match one or |
160 | 167 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, |
168 | 175 | # portion of the name. We always set it to "unknown". |
169 | 176 | sysctl="sysctl -n hw.machine_arch" |
170 | 177 | UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ |
171 | /sbin/$sysctl 2>/dev/null || \ | |
172 | /usr/sbin/$sysctl 2>/dev/null || \ | |
178 | "/sbin/$sysctl" 2>/dev/null || \ | |
179 | "/usr/sbin/$sysctl" 2>/dev/null || \ | |
173 | 180 | echo unknown)` |
174 | case "${UNAME_MACHINE_ARCH}" in | |
181 | case "$UNAME_MACHINE_ARCH" in | |
175 | 182 | armeb) machine=armeb-unknown ;; |
176 | 183 | arm*) machine=arm-unknown ;; |
177 | 184 | sh3el) machine=shl-unknown ;; |
178 | 185 | sh3eb) machine=sh-unknown ;; |
179 | 186 | sh5el) machine=sh5le-unknown ;; |
180 | 187 | earmv*) |
181 | arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` | |
182 | endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` | |
183 | machine=${arch}${endian}-unknown | |
188 | arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` | |
189 | endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` | |
190 | machine="${arch}${endian}"-unknown | |
184 | 191 | ;; |
185 | *) machine=${UNAME_MACHINE_ARCH}-unknown ;; | |
192 | *) machine="$UNAME_MACHINE_ARCH"-unknown ;; | |
186 | 193 | esac |
187 | 194 | # The Operating System including object format, if it has switched |
188 | 195 | # to ELF recently (or will in the future) and ABI. |
189 | case "${UNAME_MACHINE_ARCH}" in | |
196 | case "$UNAME_MACHINE_ARCH" in | |
190 | 197 | earm*) |
191 | 198 | os=netbsdelf |
192 | 199 | ;; |
193 | 200 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
194 | eval $set_cc_for_build | |
201 | eval "$set_cc_for_build" | |
195 | 202 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
196 | 203 | | grep -q __ELF__ |
197 | 204 | then |
207 | 214 | ;; |
208 | 215 | esac |
209 | 216 | # Determine ABI tags. |
210 | case "${UNAME_MACHINE_ARCH}" in | |
217 | case "$UNAME_MACHINE_ARCH" in | |
211 | 218 | earm*) |
212 | 219 | expr='s/^earmv[0-9]/-eabi/;s/eb$//' |
213 | abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` | |
220 | abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` | |
214 | 221 | ;; |
215 | 222 | esac |
216 | 223 | # The OS release |
218 | 225 | # thus, need a distinct triplet. However, they do not need |
219 | 226 | # kernel version information, so it can be replaced with a |
220 | 227 | # suitable tag, in the style of linux-gnu. |
221 | case "${UNAME_VERSION}" in | |
228 | case "$UNAME_VERSION" in | |
222 | 229 | Debian*) |
223 | 230 | release='-gnu' |
224 | 231 | ;; |
225 | 232 | *) |
226 | release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` | |
233 | release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` | |
227 | 234 | ;; |
228 | 235 | esac |
229 | 236 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
230 | 237 | # contains redundant information, the shorter form: |
231 | 238 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
232 | echo "${machine}-${os}${release}${abi}" | |
239 | echo "$machine-${os}${release}${abi}" | |
233 | 240 | exit ;; |
234 | 241 | *:Bitrig:*:*) |
235 | 242 | UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` |
236 | echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} | |
243 | echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" | |
237 | 244 | exit ;; |
238 | 245 | *:OpenBSD:*:*) |
239 | 246 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
240 | echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} | |
247 | echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" | |
241 | 248 | exit ;; |
242 | 249 | *:LibertyBSD:*:*) |
243 | 250 | UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` |
244 | echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} | |
251 | echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" | |
245 | 252 | exit ;; |
246 | 253 | *:MidnightBSD:*:*) |
247 | echo ${UNAME_MACHINE}-unknown-midnightbsd${UNAME_RELEASE} | |
254 | echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" | |
248 | 255 | exit ;; |
249 | 256 | *:ekkoBSD:*:*) |
250 | echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} | |
257 | echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" | |
251 | 258 | exit ;; |
252 | 259 | *:SolidBSD:*:*) |
253 | echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} | |
260 | echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" | |
254 | 261 | exit ;; |
255 | 262 | macppc:MirBSD:*:*) |
256 | echo powerpc-unknown-mirbsd${UNAME_RELEASE} | |
263 | echo powerpc-unknown-mirbsd"$UNAME_RELEASE" | |
257 | 264 | exit ;; |
258 | 265 | *:MirBSD:*:*) |
259 | echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} | |
266 | echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" | |
260 | 267 | exit ;; |
261 | 268 | *:Sortix:*:*) |
262 | echo ${UNAME_MACHINE}-unknown-sortix | |
269 | echo "$UNAME_MACHINE"-unknown-sortix | |
263 | 270 | exit ;; |
264 | 271 | *:Redox:*:*) |
265 | echo ${UNAME_MACHINE}-unknown-redox | |
266 | exit ;; | |
272 | echo "$UNAME_MACHINE"-unknown-redox | |
273 | exit ;; | |
274 | mips:OSF1:*.*) | |
275 | echo mips-dec-osf1 | |
276 | exit ;; | |
267 | 277 | alpha:OSF1:*:*) |
268 | 278 | case $UNAME_RELEASE in |
269 | 279 | *4.0) |
315 | 325 | # A Tn.n version is a released field test version. |
316 | 326 | # A Xn.n version is an unreleased experimental baselevel. |
317 | 327 | # 1.2 uses "1.2" for uname -r. |
318 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` | |
328 | echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" | |
319 | 329 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. |
320 | 330 | exitcode=$? |
321 | 331 | trap '' 0 |
324 | 334 | echo m68k-unknown-sysv4 |
325 | 335 | exit ;; |
326 | 336 | *:[Aa]miga[Oo][Ss]:*:*) |
327 | echo ${UNAME_MACHINE}-unknown-amigaos | |
337 | echo "$UNAME_MACHINE"-unknown-amigaos | |
328 | 338 | exit ;; |
329 | 339 | *:[Mm]orph[Oo][Ss]:*:*) |
330 | echo ${UNAME_MACHINE}-unknown-morphos | |
340 | echo "$UNAME_MACHINE"-unknown-morphos | |
331 | 341 | exit ;; |
332 | 342 | *:OS/390:*:*) |
333 | 343 | echo i370-ibm-openedition |
339 | 349 | echo powerpc-ibm-os400 |
340 | 350 | exit ;; |
341 | 351 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
342 | echo arm-acorn-riscix${UNAME_RELEASE} | |
352 | echo arm-acorn-riscix"$UNAME_RELEASE" | |
343 | 353 | exit ;; |
344 | 354 | arm*:riscos:*:*|arm*:RISCOS:*:*) |
345 | 355 | echo arm-unknown-riscos |
366 | 376 | sparc) echo sparc-icl-nx7; exit ;; |
367 | 377 | esac ;; |
368 | 378 | s390x:SunOS:*:*) |
369 | echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
379 | echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
370 | 380 | exit ;; |
371 | 381 | sun4H:SunOS:5.*:*) |
372 | echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
382 | echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
373 | 383 | exit ;; |
374 | 384 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
375 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
385 | echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
376 | 386 | exit ;; |
377 | 387 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
378 | echo i386-pc-auroraux${UNAME_RELEASE} | |
388 | echo i386-pc-auroraux"$UNAME_RELEASE" | |
379 | 389 | exit ;; |
380 | 390 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
381 | eval $set_cc_for_build | |
391 | eval "$set_cc_for_build" | |
382 | 392 | SUN_ARCH=i386 |
383 | 393 | # If there is a compiler, see if it is configured for 64-bit objects. |
384 | 394 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
391 | 401 | SUN_ARCH=x86_64 |
392 | 402 | fi |
393 | 403 | fi |
394 | echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
404 | echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
395 | 405 | exit ;; |
396 | 406 | sun4*:SunOS:6*:*) |
397 | 407 | # According to config.sub, this is the proper way to canonicalize |
398 | 408 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
399 | 409 | # it's likely to be more like Solaris than SunOS4. |
400 | echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
410 | echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
401 | 411 | exit ;; |
402 | 412 | sun4*:SunOS:*:*) |
403 | 413 | case "`/usr/bin/arch -k`" in |
406 | 416 | ;; |
407 | 417 | esac |
408 | 418 | # Japanese Language versions have a version number like `4.1.3-JL'. |
409 | echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` | |
419 | echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" | |
410 | 420 | exit ;; |
411 | 421 | sun3*:SunOS:*:*) |
412 | echo m68k-sun-sunos${UNAME_RELEASE} | |
422 | echo m68k-sun-sunos"$UNAME_RELEASE" | |
413 | 423 | exit ;; |
414 | 424 | sun*:*:4.2BSD:*) |
415 | 425 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
416 | test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 | |
426 | test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 | |
417 | 427 | case "`/bin/arch`" in |
418 | 428 | sun3) |
419 | echo m68k-sun-sunos${UNAME_RELEASE} | |
429 | echo m68k-sun-sunos"$UNAME_RELEASE" | |
420 | 430 | ;; |
421 | 431 | sun4) |
422 | echo sparc-sun-sunos${UNAME_RELEASE} | |
432 | echo sparc-sun-sunos"$UNAME_RELEASE" | |
423 | 433 | ;; |
424 | 434 | esac |
425 | 435 | exit ;; |
426 | 436 | aushp:SunOS:*:*) |
427 | echo sparc-auspex-sunos${UNAME_RELEASE} | |
437 | echo sparc-auspex-sunos"$UNAME_RELEASE" | |
428 | 438 | exit ;; |
429 | 439 | # The situation for MiNT is a little confusing. The machine name |
430 | 440 | # can be virtually everything (everything which is not |
435 | 445 | # MiNT. But MiNT is downward compatible to TOS, so this should |
436 | 446 | # be no problem. |
437 | 447 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
438 | echo m68k-atari-mint${UNAME_RELEASE} | |
448 | echo m68k-atari-mint"$UNAME_RELEASE" | |
439 | 449 | exit ;; |
440 | 450 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
441 | echo m68k-atari-mint${UNAME_RELEASE} | |
451 | echo m68k-atari-mint"$UNAME_RELEASE" | |
442 | 452 | exit ;; |
443 | 453 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
444 | echo m68k-atari-mint${UNAME_RELEASE} | |
454 | echo m68k-atari-mint"$UNAME_RELEASE" | |
445 | 455 | exit ;; |
446 | 456 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
447 | echo m68k-milan-mint${UNAME_RELEASE} | |
457 | echo m68k-milan-mint"$UNAME_RELEASE" | |
448 | 458 | exit ;; |
449 | 459 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
450 | echo m68k-hades-mint${UNAME_RELEASE} | |
460 | echo m68k-hades-mint"$UNAME_RELEASE" | |
451 | 461 | exit ;; |
452 | 462 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
453 | echo m68k-unknown-mint${UNAME_RELEASE} | |
463 | echo m68k-unknown-mint"$UNAME_RELEASE" | |
454 | 464 | exit ;; |
455 | 465 | m68k:machten:*:*) |
456 | echo m68k-apple-machten${UNAME_RELEASE} | |
466 | echo m68k-apple-machten"$UNAME_RELEASE" | |
457 | 467 | exit ;; |
458 | 468 | powerpc:machten:*:*) |
459 | echo powerpc-apple-machten${UNAME_RELEASE} | |
469 | echo powerpc-apple-machten"$UNAME_RELEASE" | |
460 | 470 | exit ;; |
461 | 471 | RISC*:Mach:*:*) |
462 | 472 | echo mips-dec-mach_bsd4.3 |
463 | 473 | exit ;; |
464 | 474 | RISC*:ULTRIX:*:*) |
465 | echo mips-dec-ultrix${UNAME_RELEASE} | |
475 | echo mips-dec-ultrix"$UNAME_RELEASE" | |
466 | 476 | exit ;; |
467 | 477 | VAX*:ULTRIX*:*:*) |
468 | echo vax-dec-ultrix${UNAME_RELEASE} | |
478 | echo vax-dec-ultrix"$UNAME_RELEASE" | |
469 | 479 | exit ;; |
470 | 480 | 2020:CLIX:*:* | 2430:CLIX:*:*) |
471 | echo clipper-intergraph-clix${UNAME_RELEASE} | |
481 | echo clipper-intergraph-clix"$UNAME_RELEASE" | |
472 | 482 | exit ;; |
473 | 483 | mips:*:*:UMIPS | mips:*:*:RISCos) |
474 | eval $set_cc_for_build | |
475 | sed 's/^ //' << EOF >$dummy.c | |
484 | eval "$set_cc_for_build" | |
485 | sed 's/^ //' << EOF > "$dummy.c" | |
476 | 486 | #ifdef __cplusplus |
477 | 487 | #include <stdio.h> /* for printf() prototype */ |
478 | 488 | int main (int argc, char *argv[]) { |
493 | 503 | exit (-1); |
494 | 504 | } |
495 | 505 | EOF |
496 | $CC_FOR_BUILD -o $dummy $dummy.c && | |
497 | dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && | |
498 | SYSTEM_NAME=`$dummy $dummyarg` && | |
506 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && | |
507 | dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && | |
508 | SYSTEM_NAME=`"$dummy" "$dummyarg"` && | |
499 | 509 | { echo "$SYSTEM_NAME"; exit; } |
500 | echo mips-mips-riscos${UNAME_RELEASE} | |
510 | echo mips-mips-riscos"$UNAME_RELEASE" | |
501 | 511 | exit ;; |
502 | 512 | Motorola:PowerMAX_OS:*:*) |
503 | 513 | echo powerpc-motorola-powermax |
523 | 533 | AViiON:dgux:*:*) |
524 | 534 | # DG/UX returns AViiON for all architectures |
525 | 535 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
526 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] | |
536 | if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] | |
527 | 537 | then |
528 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ | |
529 | [ ${TARGET_BINARY_INTERFACE}x = x ] | |
538 | if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ | |
539 | [ "$TARGET_BINARY_INTERFACE"x = x ] | |
530 | 540 | then |
531 | echo m88k-dg-dgux${UNAME_RELEASE} | |
541 | echo m88k-dg-dgux"$UNAME_RELEASE" | |
532 | 542 | else |
533 | echo m88k-dg-dguxbcs${UNAME_RELEASE} | |
543 | echo m88k-dg-dguxbcs"$UNAME_RELEASE" | |
534 | 544 | fi |
535 | 545 | else |
536 | echo i586-dg-dgux${UNAME_RELEASE} | |
546 | echo i586-dg-dgux"$UNAME_RELEASE" | |
537 | 547 | fi |
538 | 548 | exit ;; |
539 | 549 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
550 | 560 | echo m68k-tektronix-bsd |
551 | 561 | exit ;; |
552 | 562 | *:IRIX*:*:*) |
553 | echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` | |
563 | echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" | |
554 | 564 | exit ;; |
555 | 565 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
556 | 566 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
562 | 572 | if [ -x /usr/bin/oslevel ] ; then |
563 | 573 | IBM_REV=`/usr/bin/oslevel` |
564 | 574 | else |
565 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | |
566 | fi | |
567 | echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} | |
575 | IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
576 | fi | |
577 | echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" | |
568 | 578 | exit ;; |
569 | 579 | *:AIX:2:3) |
570 | 580 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
571 | eval $set_cc_for_build | |
572 | sed 's/^ //' << EOF >$dummy.c | |
581 | eval "$set_cc_for_build" | |
582 | sed 's/^ //' << EOF > "$dummy.c" | |
573 | 583 | #include <sys/systemcfg.h> |
574 | 584 | |
575 | 585 | main() |
580 | 590 | exit(0); |
581 | 591 | } |
582 | 592 | EOF |
583 | if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` | |
593 | if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` | |
584 | 594 | then |
585 | 595 | echo "$SYSTEM_NAME" |
586 | 596 | else |
594 | 604 | exit ;; |
595 | 605 | *:AIX:*:[4567]) |
596 | 606 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
597 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then | |
607 | if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then | |
598 | 608 | IBM_ARCH=rs6000 |
599 | 609 | else |
600 | 610 | IBM_ARCH=powerpc |
603 | 613 | IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | |
604 | 614 | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` |
605 | 615 | else |
606 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | |
607 | fi | |
608 | echo ${IBM_ARCH}-ibm-aix${IBM_REV} | |
616 | IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
617 | fi | |
618 | echo "$IBM_ARCH"-ibm-aix"$IBM_REV" | |
609 | 619 | exit ;; |
610 | 620 | *:AIX:*:*) |
611 | 621 | echo rs6000-ibm-aix |
614 | 624 | echo romp-ibm-bsd4.4 |
615 | 625 | exit ;; |
616 | 626 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
617 | echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to | |
627 | echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to | |
618 | 628 | exit ;; # report: romp-ibm BSD 4.3 |
619 | 629 | *:BOSX:*:*) |
620 | 630 | echo rs6000-bull-bosx |
629 | 639 | echo m68k-hp-bsd4.4 |
630 | 640 | exit ;; |
631 | 641 | 9000/[34678]??:HP-UX:*:*) |
632 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
633 | case "${UNAME_MACHINE}" in | |
642 | HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
643 | case "$UNAME_MACHINE" in | |
634 | 644 | 9000/31?) HP_ARCH=m68000 ;; |
635 | 645 | 9000/[34]??) HP_ARCH=m68k ;; |
636 | 646 | 9000/[678][0-9][0-9]) |
637 | 647 | if [ -x /usr/bin/getconf ]; then |
638 | 648 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
639 | 649 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
640 | case "${sc_cpu_version}" in | |
650 | case "$sc_cpu_version" in | |
641 | 651 | 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 |
642 | 652 | 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 |
643 | 653 | 532) # CPU_PA_RISC2_0 |
644 | case "${sc_kernel_bits}" in | |
654 | case "$sc_kernel_bits" in | |
645 | 655 | 32) HP_ARCH=hppa2.0n ;; |
646 | 656 | 64) HP_ARCH=hppa2.0w ;; |
647 | 657 | '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 |
648 | 658 | esac ;; |
649 | 659 | esac |
650 | 660 | fi |
651 | if [ "${HP_ARCH}" = "" ]; then | |
652 | eval $set_cc_for_build | |
653 | sed 's/^ //' << EOF >$dummy.c | |
661 | if [ "$HP_ARCH" = "" ]; then | |
662 | eval "$set_cc_for_build" | |
663 | sed 's/^ //' << EOF > "$dummy.c" | |
654 | 664 | |
655 | 665 | #define _HPUX_SOURCE |
656 | 666 | #include <stdlib.h> |
683 | 693 | exit (0); |
684 | 694 | } |
685 | 695 | EOF |
686 | (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` | |
696 | (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` | |
687 | 697 | test -z "$HP_ARCH" && HP_ARCH=hppa |
688 | 698 | fi ;; |
689 | 699 | esac |
690 | if [ ${HP_ARCH} = hppa2.0w ] | |
700 | if [ "$HP_ARCH" = hppa2.0w ] | |
691 | 701 | then |
692 | eval $set_cc_for_build | |
702 | eval "$set_cc_for_build" | |
693 | 703 | |
694 | 704 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
695 | 705 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
708 | 718 | HP_ARCH=hppa64 |
709 | 719 | fi |
710 | 720 | fi |
711 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} | |
721 | echo "$HP_ARCH"-hp-hpux"$HPUX_REV" | |
712 | 722 | exit ;; |
713 | 723 | ia64:HP-UX:*:*) |
714 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
715 | echo ia64-hp-hpux${HPUX_REV} | |
724 | HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
725 | echo ia64-hp-hpux"$HPUX_REV" | |
716 | 726 | exit ;; |
717 | 727 | 3050*:HI-UX:*:*) |
718 | eval $set_cc_for_build | |
719 | sed 's/^ //' << EOF >$dummy.c | |
728 | eval "$set_cc_for_build" | |
729 | sed 's/^ //' << EOF > "$dummy.c" | |
720 | 730 | #include <unistd.h> |
721 | 731 | int |
722 | 732 | main () |
741 | 751 | exit (0); |
742 | 752 | } |
743 | 753 | EOF |
744 | $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && | |
754 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && | |
745 | 755 | { echo "$SYSTEM_NAME"; exit; } |
746 | 756 | echo unknown-hitachi-hiuxwe2 |
747 | 757 | exit ;; |
762 | 772 | exit ;; |
763 | 773 | i*86:OSF1:*:*) |
764 | 774 | if [ -x /usr/sbin/sysversion ] ; then |
765 | echo ${UNAME_MACHINE}-unknown-osf1mk | |
775 | echo "$UNAME_MACHINE"-unknown-osf1mk | |
766 | 776 | else |
767 | echo ${UNAME_MACHINE}-unknown-osf1 | |
777 | echo "$UNAME_MACHINE"-unknown-osf1 | |
768 | 778 | fi |
769 | 779 | exit ;; |
770 | 780 | parisc*:Lites*:*:*) |
789 | 799 | echo c4-convex-bsd |
790 | 800 | exit ;; |
791 | 801 | CRAY*Y-MP:*:*:*) |
792 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
802 | echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
793 | 803 | exit ;; |
794 | 804 | CRAY*[A-Z]90:*:*:*) |
795 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | |
805 | echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | |
796 | 806 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
797 | 807 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
798 | 808 | -e 's/\.[^.]*$/.X/' |
799 | 809 | exit ;; |
800 | 810 | CRAY*TS:*:*:*) |
801 | echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
811 | echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
802 | 812 | exit ;; |
803 | 813 | CRAY*T3E:*:*:*) |
804 | echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
814 | echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
805 | 815 | exit ;; |
806 | 816 | CRAY*SV1:*:*:*) |
807 | echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
817 | echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
808 | 818 | exit ;; |
809 | 819 | *:UNICOS/mp:*:*) |
810 | echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
820 | echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
811 | 821 | exit ;; |
812 | 822 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
813 | 823 | FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
814 | 824 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
815 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | |
825 | FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` | |
816 | 826 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
817 | 827 | exit ;; |
818 | 828 | 5000:UNIX_System_V:4.*:*) |
819 | 829 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
820 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` | |
830 | FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` | |
821 | 831 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
822 | 832 | exit ;; |
823 | 833 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
824 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | |
834 | echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" | |
825 | 835 | exit ;; |
826 | 836 | sparc*:BSD/OS:*:*) |
827 | echo sparc-unknown-bsdi${UNAME_RELEASE} | |
837 | echo sparc-unknown-bsdi"$UNAME_RELEASE" | |
828 | 838 | exit ;; |
829 | 839 | *:BSD/OS:*:*) |
830 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} | |
840 | echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" | |
831 | 841 | exit ;; |
832 | 842 | *:FreeBSD:*:*) |
833 | 843 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
834 | case ${UNAME_PROCESSOR} in | |
844 | case "$UNAME_PROCESSOR" in | |
835 | 845 | amd64) |
836 | 846 | UNAME_PROCESSOR=x86_64 ;; |
837 | 847 | i386) |
838 | 848 | UNAME_PROCESSOR=i586 ;; |
839 | 849 | esac |
840 | echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | |
850 | echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
841 | 851 | exit ;; |
842 | 852 | i*:CYGWIN*:*) |
843 | echo ${UNAME_MACHINE}-pc-cygwin | |
853 | echo "$UNAME_MACHINE"-pc-cygwin | |
844 | 854 | exit ;; |
845 | 855 | *:MINGW64*:*) |
846 | echo ${UNAME_MACHINE}-pc-mingw64 | |
856 | echo "$UNAME_MACHINE"-pc-mingw64 | |
847 | 857 | exit ;; |
848 | 858 | *:MINGW*:*) |
849 | echo ${UNAME_MACHINE}-pc-mingw32 | |
859 | echo "$UNAME_MACHINE"-pc-mingw32 | |
850 | 860 | exit ;; |
851 | 861 | *:MSYS*:*) |
852 | echo ${UNAME_MACHINE}-pc-msys | |
862 | echo "$UNAME_MACHINE"-pc-msys | |
853 | 863 | exit ;; |
854 | 864 | i*:PW*:*) |
855 | echo ${UNAME_MACHINE}-pc-pw32 | |
865 | echo "$UNAME_MACHINE"-pc-pw32 | |
856 | 866 | exit ;; |
857 | 867 | *:Interix*:*) |
858 | case ${UNAME_MACHINE} in | |
868 | case "$UNAME_MACHINE" in | |
859 | 869 | x86) |
860 | echo i586-pc-interix${UNAME_RELEASE} | |
870 | echo i586-pc-interix"$UNAME_RELEASE" | |
861 | 871 | exit ;; |
862 | 872 | authenticamd | genuineintel | EM64T) |
863 | echo x86_64-unknown-interix${UNAME_RELEASE} | |
873 | echo x86_64-unknown-interix"$UNAME_RELEASE" | |
864 | 874 | exit ;; |
865 | 875 | IA64) |
866 | echo ia64-unknown-interix${UNAME_RELEASE} | |
876 | echo ia64-unknown-interix"$UNAME_RELEASE" | |
867 | 877 | exit ;; |
868 | 878 | esac ;; |
869 | 879 | i*:UWIN*:*) |
870 | echo ${UNAME_MACHINE}-pc-uwin | |
880 | echo "$UNAME_MACHINE"-pc-uwin | |
871 | 881 | exit ;; |
872 | 882 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
873 | 883 | echo x86_64-unknown-cygwin |
874 | 884 | exit ;; |
875 | 885 | prep*:SunOS:5.*:*) |
876 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
886 | echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
877 | 887 | exit ;; |
878 | 888 | *:GNU:*:*) |
879 | 889 | # the GNU system |
880 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | |
890 | echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" | |
881 | 891 | exit ;; |
882 | 892 | *:GNU/*:*:*) |
883 | 893 | # other systems with GNU libc and userland |
884 | echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} | |
894 | echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" | |
885 | 895 | exit ;; |
886 | 896 | i*86:Minix:*:*) |
887 | echo ${UNAME_MACHINE}-pc-minix | |
897 | echo "$UNAME_MACHINE"-pc-minix | |
888 | 898 | exit ;; |
889 | 899 | aarch64:Linux:*:*) |
890 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
900 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
891 | 901 | exit ;; |
892 | 902 | aarch64_be:Linux:*:*) |
893 | 903 | UNAME_MACHINE=aarch64_be |
894 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
904 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
895 | 905 | exit ;; |
896 | 906 | alpha:Linux:*:*) |
897 | 907 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
905 | 915 | esac |
906 | 916 | objdump --private-headers /bin/sh | grep -q ld.so.1 |
907 | 917 | if test "$?" = 0 ; then LIBC=gnulibc1 ; fi |
908 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
918 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
909 | 919 | exit ;; |
910 | 920 | arc:Linux:*:* | arceb:Linux:*:*) |
911 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
921 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
912 | 922 | exit ;; |
913 | 923 | arm*:Linux:*:*) |
914 | eval $set_cc_for_build | |
924 | eval "$set_cc_for_build" | |
915 | 925 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
916 | 926 | | grep -q __ARM_EABI__ |
917 | 927 | then |
918 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
928 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
919 | 929 | else |
920 | 930 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
921 | 931 | | grep -q __ARM_PCS_VFP |
922 | 932 | then |
923 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi | |
933 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi | |
924 | 934 | else |
925 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf | |
935 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf | |
926 | 936 | fi |
927 | 937 | fi |
928 | 938 | exit ;; |
929 | 939 | avr32*:Linux:*:*) |
930 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
940 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
931 | 941 | exit ;; |
932 | 942 | cris:Linux:*:*) |
933 | echo ${UNAME_MACHINE}-axis-linux-${LIBC} | |
943 | echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
934 | 944 | exit ;; |
935 | 945 | crisv32:Linux:*:*) |
936 | echo ${UNAME_MACHINE}-axis-linux-${LIBC} | |
946 | echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
937 | 947 | exit ;; |
938 | 948 | e2k:Linux:*:*) |
939 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
949 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
940 | 950 | exit ;; |
941 | 951 | frv:Linux:*:*) |
942 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
952 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
943 | 953 | exit ;; |
944 | 954 | hexagon:Linux:*:*) |
945 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
955 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
946 | 956 | exit ;; |
947 | 957 | i*86:Linux:*:*) |
948 | echo ${UNAME_MACHINE}-pc-linux-${LIBC} | |
958 | echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | |
949 | 959 | exit ;; |
950 | 960 | ia64:Linux:*:*) |
951 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
961 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
952 | 962 | exit ;; |
953 | 963 | k1om:Linux:*:*) |
954 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
964 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
955 | 965 | exit ;; |
956 | 966 | m32r*:Linux:*:*) |
957 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
967 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
958 | 968 | exit ;; |
959 | 969 | m68*:Linux:*:*) |
960 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
970 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
961 | 971 | exit ;; |
962 | 972 | mips:Linux:*:* | mips64:Linux:*:*) |
963 | eval $set_cc_for_build | |
964 | sed 's/^ //' << EOF >$dummy.c | |
973 | eval "$set_cc_for_build" | |
974 | sed 's/^ //' << EOF > "$dummy.c" | |
965 | 975 | #undef CPU |
966 | 976 | #undef ${UNAME_MACHINE} |
967 | 977 | #undef ${UNAME_MACHINE}el |
975 | 985 | #endif |
976 | 986 | #endif |
977 | 987 | EOF |
978 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` | |
979 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } | |
988 | eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" | |
989 | test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } | |
980 | 990 | ;; |
981 | 991 | mips64el:Linux:*:*) |
982 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
992 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
983 | 993 | exit ;; |
984 | 994 | openrisc*:Linux:*:*) |
985 | echo or1k-unknown-linux-${LIBC} | |
995 | echo or1k-unknown-linux-"$LIBC" | |
986 | 996 | exit ;; |
987 | 997 | or32:Linux:*:* | or1k*:Linux:*:*) |
988 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
998 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
989 | 999 | exit ;; |
990 | 1000 | padre:Linux:*:*) |
991 | echo sparc-unknown-linux-${LIBC} | |
1001 | echo sparc-unknown-linux-"$LIBC" | |
992 | 1002 | exit ;; |
993 | 1003 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
994 | echo hppa64-unknown-linux-${LIBC} | |
1004 | echo hppa64-unknown-linux-"$LIBC" | |
995 | 1005 | exit ;; |
996 | 1006 | parisc:Linux:*:* | hppa:Linux:*:*) |
997 | 1007 | # Look for CPU level |
998 | 1008 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
999 | PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; | |
1000 | PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; | |
1001 | *) echo hppa-unknown-linux-${LIBC} ;; | |
1009 | PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; | |
1010 | PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; | |
1011 | *) echo hppa-unknown-linux-"$LIBC" ;; | |
1002 | 1012 | esac |
1003 | 1013 | exit ;; |
1004 | 1014 | ppc64:Linux:*:*) |
1005 | echo powerpc64-unknown-linux-${LIBC} | |
1015 | echo powerpc64-unknown-linux-"$LIBC" | |
1006 | 1016 | exit ;; |
1007 | 1017 | ppc:Linux:*:*) |
1008 | echo powerpc-unknown-linux-${LIBC} | |
1018 | echo powerpc-unknown-linux-"$LIBC" | |
1009 | 1019 | exit ;; |
1010 | 1020 | ppc64le:Linux:*:*) |
1011 | echo powerpc64le-unknown-linux-${LIBC} | |
1021 | echo powerpc64le-unknown-linux-"$LIBC" | |
1012 | 1022 | exit ;; |
1013 | 1023 | ppcle:Linux:*:*) |
1014 | echo powerpcle-unknown-linux-${LIBC} | |
1024 | echo powerpcle-unknown-linux-"$LIBC" | |
1015 | 1025 | exit ;; |
1016 | 1026 | riscv32:Linux:*:* | riscv64:Linux:*:*) |
1017 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1027 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1018 | 1028 | exit ;; |
1019 | 1029 | s390:Linux:*:* | s390x:Linux:*:*) |
1020 | echo ${UNAME_MACHINE}-ibm-linux-${LIBC} | |
1030 | echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" | |
1021 | 1031 | exit ;; |
1022 | 1032 | sh64*:Linux:*:*) |
1023 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1033 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1024 | 1034 | exit ;; |
1025 | 1035 | sh*:Linux:*:*) |
1026 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1036 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1027 | 1037 | exit ;; |
1028 | 1038 | sparc:Linux:*:* | sparc64:Linux:*:*) |
1029 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1039 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1030 | 1040 | exit ;; |
1031 | 1041 | tile*:Linux:*:*) |
1032 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1042 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1033 | 1043 | exit ;; |
1034 | 1044 | vax:Linux:*:*) |
1035 | echo ${UNAME_MACHINE}-dec-linux-${LIBC} | |
1045 | echo "$UNAME_MACHINE"-dec-linux-"$LIBC" | |
1036 | 1046 | exit ;; |
1037 | 1047 | x86_64:Linux:*:*) |
1038 | echo ${UNAME_MACHINE}-pc-linux-${LIBC} | |
1048 | if objdump -f /bin/sh | grep -q elf32-x86-64; then | |
1049 | echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 | |
1050 | else | |
1051 | echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | |
1052 | fi | |
1039 | 1053 | exit ;; |
1040 | 1054 | xtensa*:Linux:*:*) |
1041 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1055 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1042 | 1056 | exit ;; |
1043 | 1057 | i*86:DYNIX/ptx:4*:*) |
1044 | 1058 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1052 | 1066 | # I am not positive that other SVR4 systems won't match this, |
1053 | 1067 | # I just have to hope. -- rms. |
1054 | 1068 | # Use sysv4.2uw... so that sysv4* matches it. |
1055 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} | |
1069 | echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" | |
1056 | 1070 | exit ;; |
1057 | 1071 | i*86:OS/2:*:*) |
1058 | 1072 | # If we were able to find `uname', then EMX Unix compatibility |
1059 | 1073 | # is probably installed. |
1060 | echo ${UNAME_MACHINE}-pc-os2-emx | |
1074 | echo "$UNAME_MACHINE"-pc-os2-emx | |
1061 | 1075 | exit ;; |
1062 | 1076 | i*86:XTS-300:*:STOP) |
1063 | echo ${UNAME_MACHINE}-unknown-stop | |
1077 | echo "$UNAME_MACHINE"-unknown-stop | |
1064 | 1078 | exit ;; |
1065 | 1079 | i*86:atheos:*:*) |
1066 | echo ${UNAME_MACHINE}-unknown-atheos | |
1080 | echo "$UNAME_MACHINE"-unknown-atheos | |
1067 | 1081 | exit ;; |
1068 | 1082 | i*86:syllable:*:*) |
1069 | echo ${UNAME_MACHINE}-pc-syllable | |
1083 | echo "$UNAME_MACHINE"-pc-syllable | |
1070 | 1084 | exit ;; |
1071 | 1085 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) |
1072 | echo i386-unknown-lynxos${UNAME_RELEASE} | |
1086 | echo i386-unknown-lynxos"$UNAME_RELEASE" | |
1073 | 1087 | exit ;; |
1074 | 1088 | i*86:*DOS:*:*) |
1075 | echo ${UNAME_MACHINE}-pc-msdosdjgpp | |
1089 | echo "$UNAME_MACHINE"-pc-msdosdjgpp | |
1076 | 1090 | exit ;; |
1077 | 1091 | i*86:*:4.*:*) |
1078 | UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` | |
1092 | UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` | |
1079 | 1093 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
1080 | echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} | |
1094 | echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" | |
1081 | 1095 | else |
1082 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} | |
1096 | echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" | |
1083 | 1097 | fi |
1084 | 1098 | exit ;; |
1085 | 1099 | i*86:*:5:[678]*) |
1089 | 1103 | *Pentium) UNAME_MACHINE=i586 ;; |
1090 | 1104 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
1091 | 1105 | esac |
1092 | echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} | |
1106 | echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" | |
1093 | 1107 | exit ;; |
1094 | 1108 | i*86:*:3.2:*) |
1095 | 1109 | if test -f /usr/options/cb.name; then |
1096 | 1110 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
1097 | echo ${UNAME_MACHINE}-pc-isc$UNAME_REL | |
1111 | echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" | |
1098 | 1112 | elif /bin/uname -X 2>/dev/null >/dev/null ; then |
1099 | 1113 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
1100 | 1114 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
1104 | 1118 | && UNAME_MACHINE=i686 |
1105 | 1119 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
1106 | 1120 | && UNAME_MACHINE=i686 |
1107 | echo ${UNAME_MACHINE}-pc-sco$UNAME_REL | |
1121 | echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" | |
1108 | 1122 | else |
1109 | echo ${UNAME_MACHINE}-pc-sysv32 | |
1123 | echo "$UNAME_MACHINE"-pc-sysv32 | |
1110 | 1124 | fi |
1111 | 1125 | exit ;; |
1112 | 1126 | pc:*:*:*) |
1126 | 1140 | exit ;; |
1127 | 1141 | i860:*:4.*:*) # i860-SVR4 |
1128 | 1142 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
1129 | echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 | |
1143 | echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 | |
1130 | 1144 | else # Add other i860-SVR4 vendors below as they are discovered. |
1131 | echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 | |
1145 | echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 | |
1132 | 1146 | fi |
1133 | 1147 | exit ;; |
1134 | 1148 | mini*:CTIX:SYS*5:*) |
1148 | 1162 | test -r /etc/.relid \ |
1149 | 1163 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1150 | 1164 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1151 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | |
1165 | && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } | |
1152 | 1166 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1153 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | |
1167 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; | |
1154 | 1168 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
1155 | 1169 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1156 | 1170 | && { echo i486-ncr-sysv4; exit; } ;; |
1159 | 1173 | test -r /etc/.relid \ |
1160 | 1174 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1161 | 1175 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1162 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | |
1176 | && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } | |
1163 | 1177 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1164 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } | |
1178 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } | |
1165 | 1179 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
1166 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | |
1180 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; | |
1167 | 1181 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
1168 | echo m68k-unknown-lynxos${UNAME_RELEASE} | |
1182 | echo m68k-unknown-lynxos"$UNAME_RELEASE" | |
1169 | 1183 | exit ;; |
1170 | 1184 | mc68030:UNIX_System_V:4.*:*) |
1171 | 1185 | echo m68k-atari-sysv4 |
1172 | 1186 | exit ;; |
1173 | 1187 | TSUNAMI:LynxOS:2.*:*) |
1174 | echo sparc-unknown-lynxos${UNAME_RELEASE} | |
1188 | echo sparc-unknown-lynxos"$UNAME_RELEASE" | |
1175 | 1189 | exit ;; |
1176 | 1190 | rs6000:LynxOS:2.*:*) |
1177 | echo rs6000-unknown-lynxos${UNAME_RELEASE} | |
1191 | echo rs6000-unknown-lynxos"$UNAME_RELEASE" | |
1178 | 1192 | exit ;; |
1179 | 1193 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) |
1180 | echo powerpc-unknown-lynxos${UNAME_RELEASE} | |
1194 | echo powerpc-unknown-lynxos"$UNAME_RELEASE" | |
1181 | 1195 | exit ;; |
1182 | 1196 | SM[BE]S:UNIX_SV:*:*) |
1183 | echo mips-dde-sysv${UNAME_RELEASE} | |
1197 | echo mips-dde-sysv"$UNAME_RELEASE" | |
1184 | 1198 | exit ;; |
1185 | 1199 | RM*:ReliantUNIX-*:*:*) |
1186 | 1200 | echo mips-sni-sysv4 |
1191 | 1205 | *:SINIX-*:*:*) |
1192 | 1206 | if uname -p 2>/dev/null >/dev/null ; then |
1193 | 1207 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1194 | echo ${UNAME_MACHINE}-sni-sysv4 | |
1208 | echo "$UNAME_MACHINE"-sni-sysv4 | |
1195 | 1209 | else |
1196 | 1210 | echo ns32k-sni-sysv |
1197 | 1211 | fi |
1211 | 1225 | exit ;; |
1212 | 1226 | i*86:VOS:*:*) |
1213 | 1227 | # From Paul.Green@stratus.com. |
1214 | echo ${UNAME_MACHINE}-stratus-vos | |
1228 | echo "$UNAME_MACHINE"-stratus-vos | |
1215 | 1229 | exit ;; |
1216 | 1230 | *:VOS:*:*) |
1217 | 1231 | # From Paul.Green@stratus.com. |
1218 | 1232 | echo hppa1.1-stratus-vos |
1219 | 1233 | exit ;; |
1220 | 1234 | mc68*:A/UX:*:*) |
1221 | echo m68k-apple-aux${UNAME_RELEASE} | |
1235 | echo m68k-apple-aux"$UNAME_RELEASE" | |
1222 | 1236 | exit ;; |
1223 | 1237 | news*:NEWS-OS:6*:*) |
1224 | 1238 | echo mips-sony-newsos6 |
1225 | 1239 | exit ;; |
1226 | 1240 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1227 | 1241 | if [ -d /usr/nec ]; then |
1228 | echo mips-nec-sysv${UNAME_RELEASE} | |
1242 | echo mips-nec-sysv"$UNAME_RELEASE" | |
1229 | 1243 | else |
1230 | echo mips-unknown-sysv${UNAME_RELEASE} | |
1244 | echo mips-unknown-sysv"$UNAME_RELEASE" | |
1231 | 1245 | fi |
1232 | 1246 | exit ;; |
1233 | 1247 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
1246 | 1260 | echo x86_64-unknown-haiku |
1247 | 1261 | exit ;; |
1248 | 1262 | SX-4:SUPER-UX:*:*) |
1249 | echo sx4-nec-superux${UNAME_RELEASE} | |
1263 | echo sx4-nec-superux"$UNAME_RELEASE" | |
1250 | 1264 | exit ;; |
1251 | 1265 | SX-5:SUPER-UX:*:*) |
1252 | echo sx5-nec-superux${UNAME_RELEASE} | |
1266 | echo sx5-nec-superux"$UNAME_RELEASE" | |
1253 | 1267 | exit ;; |
1254 | 1268 | SX-6:SUPER-UX:*:*) |
1255 | echo sx6-nec-superux${UNAME_RELEASE} | |
1269 | echo sx6-nec-superux"$UNAME_RELEASE" | |
1256 | 1270 | exit ;; |
1257 | 1271 | SX-7:SUPER-UX:*:*) |
1258 | echo sx7-nec-superux${UNAME_RELEASE} | |
1272 | echo sx7-nec-superux"$UNAME_RELEASE" | |
1259 | 1273 | exit ;; |
1260 | 1274 | SX-8:SUPER-UX:*:*) |
1261 | echo sx8-nec-superux${UNAME_RELEASE} | |
1275 | echo sx8-nec-superux"$UNAME_RELEASE" | |
1262 | 1276 | exit ;; |
1263 | 1277 | SX-8R:SUPER-UX:*:*) |
1264 | echo sx8r-nec-superux${UNAME_RELEASE} | |
1278 | echo sx8r-nec-superux"$UNAME_RELEASE" | |
1265 | 1279 | exit ;; |
1266 | 1280 | SX-ACE:SUPER-UX:*:*) |
1267 | echo sxace-nec-superux${UNAME_RELEASE} | |
1281 | echo sxace-nec-superux"$UNAME_RELEASE" | |
1268 | 1282 | exit ;; |
1269 | 1283 | Power*:Rhapsody:*:*) |
1270 | echo powerpc-apple-rhapsody${UNAME_RELEASE} | |
1284 | echo powerpc-apple-rhapsody"$UNAME_RELEASE" | |
1271 | 1285 | exit ;; |
1272 | 1286 | *:Rhapsody:*:*) |
1273 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | |
1287 | echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" | |
1274 | 1288 | exit ;; |
1275 | 1289 | *:Darwin:*:*) |
1276 | 1290 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
1277 | eval $set_cc_for_build | |
1291 | eval "$set_cc_for_build" | |
1278 | 1292 | if test "$UNAME_PROCESSOR" = unknown ; then |
1279 | 1293 | UNAME_PROCESSOR=powerpc |
1280 | 1294 | fi |
1281 | if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then | |
1295 | if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then | |
1282 | 1296 | if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
1283 | 1297 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
1284 | 1298 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
1306 | 1320 | # that Apple uses in portable devices. |
1307 | 1321 | UNAME_PROCESSOR=x86_64 |
1308 | 1322 | fi |
1309 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | |
1323 | echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" | |
1310 | 1324 | exit ;; |
1311 | 1325 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1312 | 1326 | UNAME_PROCESSOR=`uname -p` |
1314 | 1328 | UNAME_PROCESSOR=i386 |
1315 | 1329 | UNAME_MACHINE=pc |
1316 | 1330 | fi |
1317 | echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} | |
1331 | echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" | |
1318 | 1332 | exit ;; |
1319 | 1333 | *:QNX:*:4*) |
1320 | 1334 | echo i386-pc-qnx |
1321 | 1335 | exit ;; |
1322 | 1336 | NEO-*:NONSTOP_KERNEL:*:*) |
1323 | echo neo-tandem-nsk${UNAME_RELEASE} | |
1337 | echo neo-tandem-nsk"$UNAME_RELEASE" | |
1324 | 1338 | exit ;; |
1325 | 1339 | NSE-*:NONSTOP_KERNEL:*:*) |
1326 | echo nse-tandem-nsk${UNAME_RELEASE} | |
1340 | echo nse-tandem-nsk"$UNAME_RELEASE" | |
1327 | 1341 | exit ;; |
1328 | 1342 | NSR-*:NONSTOP_KERNEL:*:*) |
1329 | echo nsr-tandem-nsk${UNAME_RELEASE} | |
1343 | echo nsr-tandem-nsk"$UNAME_RELEASE" | |
1344 | exit ;; | |
1345 | NSV-*:NONSTOP_KERNEL:*:*) | |
1346 | echo nsv-tandem-nsk"$UNAME_RELEASE" | |
1330 | 1347 | exit ;; |
1331 | 1348 | NSX-*:NONSTOP_KERNEL:*:*) |
1332 | echo nsx-tandem-nsk${UNAME_RELEASE} | |
1349 | echo nsx-tandem-nsk"$UNAME_RELEASE" | |
1333 | 1350 | exit ;; |
1334 | 1351 | *:NonStop-UX:*:*) |
1335 | 1352 | echo mips-compaq-nonstopux |
1338 | 1355 | echo bs2000-siemens-sysv |
1339 | 1356 | exit ;; |
1340 | 1357 | DS/*:UNIX_System_V:*:*) |
1341 | echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} | |
1358 | echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" | |
1342 | 1359 | exit ;; |
1343 | 1360 | *:Plan9:*:*) |
1344 | 1361 | # "uname -m" is not consistent, so use $cputype instead. 386 |
1349 | 1366 | else |
1350 | 1367 | UNAME_MACHINE="$cputype" |
1351 | 1368 | fi |
1352 | echo ${UNAME_MACHINE}-unknown-plan9 | |
1369 | echo "$UNAME_MACHINE"-unknown-plan9 | |
1353 | 1370 | exit ;; |
1354 | 1371 | *:TOPS-10:*:*) |
1355 | 1372 | echo pdp10-unknown-tops10 |
1370 | 1387 | echo pdp10-unknown-its |
1371 | 1388 | exit ;; |
1372 | 1389 | SEI:*:*:SEIUX) |
1373 | echo mips-sei-seiux${UNAME_RELEASE} | |
1390 | echo mips-sei-seiux"$UNAME_RELEASE" | |
1374 | 1391 | exit ;; |
1375 | 1392 | *:DragonFly:*:*) |
1376 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | |
1393 | echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
1377 | 1394 | exit ;; |
1378 | 1395 | *:*VMS:*:*) |
1379 | 1396 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1380 | case "${UNAME_MACHINE}" in | |
1397 | case "$UNAME_MACHINE" in | |
1381 | 1398 | A*) echo alpha-dec-vms ; exit ;; |
1382 | 1399 | I*) echo ia64-dec-vms ; exit ;; |
1383 | 1400 | V*) echo vax-dec-vms ; exit ;; |
1386 | 1403 | echo i386-pc-xenix |
1387 | 1404 | exit ;; |
1388 | 1405 | i*86:skyos:*:*) |
1389 | echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` | |
1406 | echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" | |
1390 | 1407 | exit ;; |
1391 | 1408 | i*86:rdos:*:*) |
1392 | echo ${UNAME_MACHINE}-pc-rdos | |
1409 | echo "$UNAME_MACHINE"-pc-rdos | |
1393 | 1410 | exit ;; |
1394 | 1411 | i*86:AROS:*:*) |
1395 | echo ${UNAME_MACHINE}-pc-aros | |
1412 | echo "$UNAME_MACHINE"-pc-aros | |
1396 | 1413 | exit ;; |
1397 | 1414 | x86_64:VMkernel:*:*) |
1398 | echo ${UNAME_MACHINE}-unknown-esx | |
1415 | echo "$UNAME_MACHINE"-unknown-esx | |
1399 | 1416 | exit ;; |
1400 | 1417 | amd64:Isilon\ OneFS:*:*) |
1401 | 1418 | echo x86_64-unknown-onefs |
1404 | 1421 | |
1405 | 1422 | echo "$0: unable to guess system type" >&2 |
1406 | 1423 | |
1407 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}" in | |
1424 | case "$UNAME_MACHINE:$UNAME_SYSTEM" in | |
1408 | 1425 | mips:Linux | mips64:Linux) |
1409 | 1426 | # If we got here on MIPS GNU/Linux, output extra information. |
1410 | 1427 | cat >&2 <<EOF |
1446 | 1463 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` |
1447 | 1464 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` |
1448 | 1465 | |
1449 | UNAME_MACHINE = ${UNAME_MACHINE} | |
1450 | UNAME_RELEASE = ${UNAME_RELEASE} | |
1451 | UNAME_SYSTEM = ${UNAME_SYSTEM} | |
1452 | UNAME_VERSION = ${UNAME_VERSION} | |
1466 | UNAME_MACHINE = "$UNAME_MACHINE" | |
1467 | UNAME_RELEASE = "$UNAME_RELEASE" | |
1468 | UNAME_SYSTEM = "$UNAME_SYSTEM" | |
1469 | UNAME_VERSION = "$UNAME_VERSION" | |
1453 | 1470 | EOF |
1454 | 1471 | |
1455 | 1472 | exit 1 |
0 | 0 | #! /bin/sh |
1 | 1 | # Configuration validation subroutine script. |
2 | # Copyright 1992-2017 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2017-11-23' | |
2 | # Copyright 1992-2018 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2018-02-22' | |
5 | 5 | |
6 | 6 | # This file is free software; you can redistribute it and/or modify it |
7 | 7 | # under the terms of the GNU General Public License as published by |
66 | 66 | version="\ |
67 | 67 | GNU config.sub ($timestamp) |
68 | 68 | |
69 | Copyright 1992-2017 Free Software Foundation, Inc. | |
69 | Copyright 1992-2018 Free Software Foundation, Inc. | |
70 | 70 | |
71 | 71 | This is free software; see the source for copying conditions. There is NO |
72 | 72 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
93 | 93 | |
94 | 94 | *local*) |
95 | 95 | # First pass through any local machine types. |
96 | echo $1 | |
96 | echo "$1" | |
97 | 97 | exit ;; |
98 | 98 | |
99 | 99 | * ) |
111 | 111 | |
112 | 112 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). |
113 | 113 | # Here we must recognize all the valid KERNEL-OS combinations. |
114 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | |
114 | maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | |
115 | 115 | case $maybe_os in |
116 | 116 | nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ |
117 | 117 | linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ |
119 | 119 | kopensolaris*-gnu* | cloudabi*-eabi* | \ |
120 | 120 | storm-chaos* | os2-emx* | rtmk-nova*) |
121 | 121 | os=-$maybe_os |
122 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | |
122 | basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | |
123 | 123 | ;; |
124 | 124 | android-linux) |
125 | 125 | os=-linux-android |
126 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown | |
126 | basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown | |
127 | 127 | ;; |
128 | 128 | *) |
129 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` | |
130 | if [ $basic_machine != $1 ] | |
131 | then os=`echo $1 | sed 's/.*-/-/'` | |
129 | basic_machine=`echo "$1" | sed 's/-[^-]*$//'` | |
130 | if [ "$basic_machine" != "$1" ] | |
131 | then os=`echo "$1" | sed 's/.*-/-/'` | |
132 | 132 | else os=; fi |
133 | 133 | ;; |
134 | 134 | esac |
177 | 177 | ;; |
178 | 178 | -sco6) |
179 | 179 | os=-sco5v6 |
180 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
180 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
181 | 181 | ;; |
182 | 182 | -sco5) |
183 | 183 | os=-sco3.2v5 |
184 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
184 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
185 | 185 | ;; |
186 | 186 | -sco4) |
187 | 187 | os=-sco3.2v4 |
188 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
188 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
189 | 189 | ;; |
190 | 190 | -sco3.2.[4-9]*) |
191 | 191 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` |
192 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
192 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
193 | 193 | ;; |
194 | 194 | -sco3.2v[4-9]*) |
195 | 195 | # Don't forget version if it is 3.2v4 or newer. |
196 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
196 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
197 | 197 | ;; |
198 | 198 | -sco5v6*) |
199 | 199 | # Don't forget version if it is 3.2v4 or newer. |
200 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
200 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
201 | 201 | ;; |
202 | 202 | -sco*) |
203 | 203 | os=-sco3.2v2 |
204 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
204 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
205 | 205 | ;; |
206 | 206 | -udk*) |
207 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
207 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
208 | 208 | ;; |
209 | 209 | -isc) |
210 | 210 | os=-isc2.2 |
211 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
211 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
212 | 212 | ;; |
213 | 213 | -clix*) |
214 | 214 | basic_machine=clipper-intergraph |
215 | 215 | ;; |
216 | 216 | -isc*) |
217 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
217 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
218 | 218 | ;; |
219 | 219 | -lynx*178) |
220 | 220 | os=-lynxos178 |
226 | 226 | os=-lynxos |
227 | 227 | ;; |
228 | 228 | -ptx*) |
229 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | |
229 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` | |
230 | 230 | ;; |
231 | 231 | -psos*) |
232 | 232 | os=-psos |
295 | 295 | | nios | nios2 | nios2eb | nios2el \ |
296 | 296 | | ns16k | ns32k \ |
297 | 297 | | open8 | or1k | or1knd | or32 \ |
298 | | pdp10 | pdp11 | pj | pjl \ | |
298 | | pdp10 | pj | pjl \ | |
299 | 299 | | powerpc | powerpc64 | powerpc64le | powerpcle \ |
300 | 300 | | pru \ |
301 | 301 | | pyramid \ |
332 | 332 | basic_machine=$basic_machine-unknown |
333 | 333 | os=-none |
334 | 334 | ;; |
335 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) | |
335 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) | |
336 | 336 | ;; |
337 | 337 | ms1) |
338 | 338 | basic_machine=mt-unknown |
361 | 361 | ;; |
362 | 362 | # Object if more than one company name word. |
363 | 363 | *-*-*) |
364 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
364 | echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 | |
365 | 365 | exit 1 |
366 | 366 | ;; |
367 | 367 | # Recognize the basic CPU types with company name. |
456 | 456 | # Recognize the various machine names and aliases which stand |
457 | 457 | # for a CPU type and a company and sometimes even an OS. |
458 | 458 | 386bsd) |
459 | basic_machine=i386-unknown | |
459 | basic_machine=i386-pc | |
460 | 460 | os=-bsd |
461 | 461 | ;; |
462 | 462 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) |
490 | 490 | basic_machine=x86_64-pc |
491 | 491 | ;; |
492 | 492 | amd64-*) |
493 | basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
493 | basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
494 | 494 | ;; |
495 | 495 | amdahl) |
496 | 496 | basic_machine=580-amdahl |
535 | 535 | os=-linux |
536 | 536 | ;; |
537 | 537 | blackfin-*) |
538 | basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` | |
538 | basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
539 | 539 | os=-linux |
540 | 540 | ;; |
541 | 541 | bluegene*) |
543 | 543 | os=-cnk |
544 | 544 | ;; |
545 | 545 | c54x-*) |
546 | basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
546 | basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
547 | 547 | ;; |
548 | 548 | c55x-*) |
549 | basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
549 | basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
550 | 550 | ;; |
551 | 551 | c6x-*) |
552 | basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
552 | basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
553 | 553 | ;; |
554 | 554 | c90) |
555 | 555 | basic_machine=c90-cray |
647 | 647 | os=$os"spe" |
648 | 648 | ;; |
649 | 649 | e500v[12]-*) |
650 | basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` | |
650 | basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
651 | 651 | os=$os"spe" |
652 | 652 | ;; |
653 | 653 | ebmon29k) |
739 | 739 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) |
740 | 740 | basic_machine=hppa1.0-hp |
741 | 741 | ;; |
742 | hppa-next) | |
743 | os=-nextstep3 | |
744 | ;; | |
745 | 742 | hppaosf) |
746 | 743 | basic_machine=hppa1.1-hp |
747 | 744 | os=-osf |
754 | 751 | basic_machine=i370-ibm |
755 | 752 | ;; |
756 | 753 | i*86v32) |
757 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
754 | basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` | |
758 | 755 | os=-sysv32 |
759 | 756 | ;; |
760 | 757 | i*86v4*) |
761 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
758 | basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` | |
762 | 759 | os=-sysv4 |
763 | 760 | ;; |
764 | 761 | i*86v) |
765 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
762 | basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` | |
766 | 763 | os=-sysv |
767 | 764 | ;; |
768 | 765 | i*86sol2) |
769 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
766 | basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` | |
770 | 767 | os=-solaris2 |
771 | 768 | ;; |
772 | 769 | i386mach) |
773 | 770 | basic_machine=i386-mach |
774 | 771 | os=-mach |
775 | 772 | ;; |
776 | i386-vsta | vsta) | |
773 | vsta) | |
777 | 774 | basic_machine=i386-unknown |
778 | 775 | os=-vsta |
779 | 776 | ;; |
792 | 789 | os=-sysv |
793 | 790 | ;; |
794 | 791 | leon-*|leon[3-9]-*) |
795 | basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` | |
792 | basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` | |
796 | 793 | ;; |
797 | 794 | m68knommu) |
798 | 795 | basic_machine=m68k-unknown |
799 | 796 | os=-linux |
800 | 797 | ;; |
801 | 798 | m68knommu-*) |
802 | basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` | |
799 | basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
803 | 800 | os=-linux |
804 | ;; | |
805 | m88k-omron*) | |
806 | basic_machine=m88k-omron | |
807 | 801 | ;; |
808 | 802 | magnum | m3230) |
809 | 803 | basic_machine=mips-mips |
836 | 830 | os=-mint |
837 | 831 | ;; |
838 | 832 | mips3*-*) |
839 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` | |
833 | basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` | |
840 | 834 | ;; |
841 | 835 | mips3*) |
842 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown | |
836 | basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown | |
843 | 837 | ;; |
844 | 838 | monitor) |
845 | 839 | basic_machine=m68k-rom68k |
858 | 852 | os=-msdos |
859 | 853 | ;; |
860 | 854 | ms1-*) |
861 | basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` | |
855 | basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` | |
862 | 856 | ;; |
863 | 857 | msys) |
864 | 858 | basic_machine=i686-pc |
945 | 939 | nsr-tandem) |
946 | 940 | basic_machine=nsr-tandem |
947 | 941 | ;; |
942 | nsv-tandem) | |
943 | basic_machine=nsv-tandem | |
944 | ;; | |
948 | 945 | nsx-tandem) |
949 | 946 | basic_machine=nsx-tandem |
950 | 947 | ;; |
980 | 977 | os=-linux |
981 | 978 | ;; |
982 | 979 | parisc-*) |
983 | basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` | |
980 | basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
984 | 981 | os=-linux |
985 | 982 | ;; |
986 | 983 | pbd) |
996 | 993 | basic_machine=i386-pc |
997 | 994 | ;; |
998 | 995 | pc98-*) |
999 | basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` | |
996 | basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1000 | 997 | ;; |
1001 | 998 | pentium | p5 | k5 | k6 | nexgen | viac3) |
1002 | 999 | basic_machine=i586-pc |
1011 | 1008 | basic_machine=i786-pc |
1012 | 1009 | ;; |
1013 | 1010 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) |
1014 | basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1011 | basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1015 | 1012 | ;; |
1016 | 1013 | pentiumpro-* | p6-* | 6x86-* | athlon-*) |
1017 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1014 | basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1018 | 1015 | ;; |
1019 | 1016 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) |
1020 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1017 | basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1021 | 1018 | ;; |
1022 | 1019 | pentium4-*) |
1023 | basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1020 | basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1024 | 1021 | ;; |
1025 | 1022 | pn) |
1026 | 1023 | basic_machine=pn-gould |
1030 | 1027 | ppc | ppcbe) basic_machine=powerpc-unknown |
1031 | 1028 | ;; |
1032 | 1029 | ppc-* | ppcbe-*) |
1033 | basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1030 | basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1034 | 1031 | ;; |
1035 | 1032 | ppcle | powerpclittle) |
1036 | 1033 | basic_machine=powerpcle-unknown |
1037 | 1034 | ;; |
1038 | 1035 | ppcle-* | powerpclittle-*) |
1039 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1036 | basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1040 | 1037 | ;; |
1041 | 1038 | ppc64) basic_machine=powerpc64-unknown |
1042 | 1039 | ;; |
1043 | ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1040 | ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1044 | 1041 | ;; |
1045 | 1042 | ppc64le | powerpc64little) |
1046 | 1043 | basic_machine=powerpc64le-unknown |
1047 | 1044 | ;; |
1048 | 1045 | ppc64le-* | powerpc64little-*) |
1049 | basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1046 | basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1050 | 1047 | ;; |
1051 | 1048 | ps2) |
1052 | 1049 | basic_machine=i386-ibm |
1100 | 1097 | sequent) |
1101 | 1098 | basic_machine=i386-sequent |
1102 | 1099 | ;; |
1103 | sh) | |
1104 | basic_machine=sh-hitachi | |
1105 | os=-hms | |
1106 | ;; | |
1107 | 1100 | sh5el) |
1108 | 1101 | basic_machine=sh5le-unknown |
1109 | 1102 | ;; |
1110 | sh64) | |
1111 | basic_machine=sh64-unknown | |
1112 | ;; | |
1113 | sparclite-wrs | simso-wrs) | |
1103 | simso-wrs) | |
1114 | 1104 | basic_machine=sparclite-wrs |
1115 | 1105 | os=-vxworks |
1116 | 1106 | ;; |
1129 | 1119 | os=-sysv4 |
1130 | 1120 | ;; |
1131 | 1121 | strongarm-* | thumb-*) |
1132 | basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1122 | basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1133 | 1123 | ;; |
1134 | 1124 | sun2) |
1135 | 1125 | basic_machine=m68000-sun |
1243 | 1233 | basic_machine=a29k-wrs |
1244 | 1234 | os=-vxworks |
1245 | 1235 | ;; |
1246 | wasm32) | |
1247 | basic_machine=wasm32-unknown | |
1248 | ;; | |
1249 | 1236 | w65*) |
1250 | 1237 | basic_machine=w65-wdc |
1251 | 1238 | os=-none |
1265 | 1252 | basic_machine=xps100-honeywell |
1266 | 1253 | ;; |
1267 | 1254 | xscale-* | xscalee[bl]-*) |
1268 | basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` | |
1255 | basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` | |
1269 | 1256 | ;; |
1270 | 1257 | ymp) |
1271 | 1258 | basic_machine=ymp-cray |
1272 | 1259 | os=-unicos |
1273 | ;; | |
1274 | z8k-*-coff) | |
1275 | basic_machine=z8k-unknown | |
1276 | os=-sim | |
1277 | ;; | |
1278 | z80-*-coff) | |
1279 | basic_machine=z80-unknown | |
1280 | os=-sim | |
1281 | 1260 | ;; |
1282 | 1261 | none) |
1283 | 1262 | basic_machine=none-none |
1307 | 1286 | vax) |
1308 | 1287 | basic_machine=vax-dec |
1309 | 1288 | ;; |
1310 | pdp10) | |
1311 | # there are many clones, so DEC is not a safe bet | |
1312 | basic_machine=pdp10-unknown | |
1313 | ;; | |
1314 | 1289 | pdp11) |
1315 | 1290 | basic_machine=pdp11-dec |
1316 | 1291 | ;; |
1320 | 1295 | sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) |
1321 | 1296 | basic_machine=sh-unknown |
1322 | 1297 | ;; |
1323 | sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) | |
1324 | basic_machine=sparc-sun | |
1325 | ;; | |
1326 | 1298 | cydra) |
1327 | 1299 | basic_machine=cydra-cydrome |
1328 | 1300 | ;; |
1342 | 1314 | # Make sure to match an already-canonicalized machine name. |
1343 | 1315 | ;; |
1344 | 1316 | *) |
1345 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
1317 | echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 | |
1346 | 1318 | exit 1 |
1347 | 1319 | ;; |
1348 | 1320 | esac |
1350 | 1322 | # Here we canonicalize certain aliases for manufacturers. |
1351 | 1323 | case $basic_machine in |
1352 | 1324 | *-digital*) |
1353 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` | |
1325 | basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` | |
1354 | 1326 | ;; |
1355 | 1327 | *-commodore*) |
1356 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` | |
1328 | basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` | |
1357 | 1329 | ;; |
1358 | 1330 | *) |
1359 | 1331 | ;; |
1376 | 1348 | -solaris) |
1377 | 1349 | os=-solaris2 |
1378 | 1350 | ;; |
1379 | -svr4*) | |
1380 | os=-sysv4 | |
1381 | ;; | |
1382 | 1351 | -unixware*) |
1383 | 1352 | os=-sysv4.2uw |
1384 | 1353 | ;; |
1385 | 1354 | -gnu/linux*) |
1386 | 1355 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` |
1356 | ;; | |
1357 | # es1800 is here to avoid being matched by es* (a different OS) | |
1358 | -es1800*) | |
1359 | os=-ose | |
1387 | 1360 | ;; |
1388 | 1361 | # Now accept the basic system types. |
1389 | 1362 | # The portable systems comes first. |
1397 | 1370 | | -aos* | -aros* | -cloudabi* | -sortix* \ |
1398 | 1371 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ |
1399 | 1372 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ |
1400 | | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | |
1373 | | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ | |
1401 | 1374 | | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ |
1402 | 1375 | | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ |
1403 | 1376 | | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ |
1408 | 1381 | | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ |
1409 | 1382 | | -linux-newlib* | -linux-musl* | -linux-uclibc* \ |
1410 | 1383 | | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ |
1411 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | |
1384 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | |
1412 | 1385 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ |
1413 | 1386 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ |
1414 | 1387 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ |
1415 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | |
1388 | | -morphos* | -superux* | -rtmk* | -windiss* \ | |
1416 | 1389 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ |
1417 | 1390 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ |
1418 | | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) | |
1391 | | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ | |
1392 | | -midnightbsd*) | |
1419 | 1393 | # Remember, each alternative MUST END IN *, to match a version number. |
1420 | 1394 | ;; |
1421 | 1395 | -qnx*) |
1432 | 1406 | -nto*) |
1433 | 1407 | os=`echo $os | sed -e 's|nto|nto-qnx|'` |
1434 | 1408 | ;; |
1435 | -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | |
1436 | | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | |
1409 | -sim | -xray | -os68k* | -v88r* \ | |
1410 | | -windows* | -osx | -abug | -netware* | -os9* \ | |
1437 | 1411 | | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) |
1438 | 1412 | ;; |
1439 | 1413 | -mac*) |
1440 | os=`echo $os | sed -e 's|mac|macos|'` | |
1414 | os=`echo "$os" | sed -e 's|mac|macos|'` | |
1441 | 1415 | ;; |
1442 | 1416 | -linux-dietlibc) |
1443 | 1417 | os=-linux-dietlibc |
1446 | 1420 | os=`echo $os | sed -e 's|linux|linux-gnu|'` |
1447 | 1421 | ;; |
1448 | 1422 | -sunos5*) |
1449 | os=`echo $os | sed -e 's|sunos5|solaris2|'` | |
1423 | os=`echo "$os" | sed -e 's|sunos5|solaris2|'` | |
1450 | 1424 | ;; |
1451 | 1425 | -sunos6*) |
1452 | os=`echo $os | sed -e 's|sunos6|solaris3|'` | |
1426 | os=`echo "$os" | sed -e 's|sunos6|solaris3|'` | |
1453 | 1427 | ;; |
1454 | 1428 | -opened*) |
1455 | 1429 | os=-openedition |
1459 | 1433 | ;; |
1460 | 1434 | -wince*) |
1461 | 1435 | os=-wince |
1462 | ;; | |
1463 | -osfrose*) | |
1464 | os=-osfrose | |
1465 | ;; | |
1466 | -osf*) | |
1467 | os=-osf | |
1468 | 1436 | ;; |
1469 | 1437 | -utek*) |
1470 | 1438 | os=-bsd |
1512 | 1480 | -oss*) |
1513 | 1481 | os=-sysv3 |
1514 | 1482 | ;; |
1515 | -svr4) | |
1483 | -svr4*) | |
1516 | 1484 | os=-sysv4 |
1517 | 1485 | ;; |
1518 | 1486 | -svr3) |
1527 | 1495 | -ose*) |
1528 | 1496 | os=-ose |
1529 | 1497 | ;; |
1530 | -es1800*) | |
1531 | os=-ose | |
1532 | ;; | |
1533 | -xenix) | |
1534 | os=-xenix | |
1535 | ;; | |
1536 | 1498 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
1537 | 1499 | os=-mint |
1538 | ;; | |
1539 | -aros*) | |
1540 | os=-aros | |
1541 | 1500 | ;; |
1542 | 1501 | -zvmoe) |
1543 | 1502 | os=-zvmoe |
1567 | 1526 | *) |
1568 | 1527 | # Get rid of the `-' at the beginning of $os. |
1569 | 1528 | os=`echo $os | sed 's/[^-]*-//'` |
1570 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 | |
1529 | echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 | |
1571 | 1530 | exit 1 |
1572 | 1531 | ;; |
1573 | 1532 | esac |
1663 | 1622 | *-be) |
1664 | 1623 | os=-beos |
1665 | 1624 | ;; |
1666 | *-haiku) | |
1667 | os=-haiku | |
1668 | ;; | |
1669 | 1625 | *-ibm) |
1670 | 1626 | os=-aix |
1671 | 1627 | ;; |
1719 | 1675 | ;; |
1720 | 1676 | i370-*) |
1721 | 1677 | os=-mvs |
1722 | ;; | |
1723 | *-next) | |
1724 | os=-nextstep3 | |
1725 | 1678 | ;; |
1726 | 1679 | *-gould) |
1727 | 1680 | os=-sysv |
1832 | 1785 | vendor=stratus |
1833 | 1786 | ;; |
1834 | 1787 | esac |
1835 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | |
1788 | basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` | |
1836 | 1789 | ;; |
1837 | 1790 | esac |
1838 | 1791 | |
1839 | echo $basic_machine$os | |
1792 | echo "$basic_machine$os" | |
1840 | 1793 | exit |
1841 | 1794 | |
1842 | 1795 | # Local variables: |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.69 for GStreamer GObject Introspection overrides for Python 1.14.1. | |
2 | # Generated by GNU Autoconf 2.69 for GStreamer GObject Introspection overrides for Python 1.14.2. | |
3 | 3 | # |
4 | 4 | # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer>. |
5 | 5 | # |
590 | 590 | # Identity of this package. |
591 | 591 | PACKAGE_NAME='GStreamer GObject Introspection overrides for Python ' |
592 | 592 | PACKAGE_TARNAME='gst-python' |
593 | PACKAGE_VERSION='1.14.1' | |
594 | PACKAGE_STRING='GStreamer GObject Introspection overrides for Python 1.14.1' | |
593 | PACKAGE_VERSION='1.14.2' | |
594 | PACKAGE_STRING='GStreamer GObject Introspection overrides for Python 1.14.2' | |
595 | 595 | PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer' |
596 | 596 | PACKAGE_URL='' |
597 | 597 | |
1382 | 1382 | # Omit some internal or obsolete options to make the list less imposing. |
1383 | 1383 | # This message is too long to be a string in the A/UX 3.1 sh. |
1384 | 1384 | cat <<_ACEOF |
1385 | \`configure' configures GStreamer GObject Introspection overrides for Python 1.14.1 to adapt to many kinds of systems. | |
1385 | \`configure' configures GStreamer GObject Introspection overrides for Python 1.14.2 to adapt to many kinds of systems. | |
1386 | 1386 | |
1387 | 1387 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1388 | 1388 | |
1454 | 1454 | |
1455 | 1455 | if test -n "$ac_init_help"; then |
1456 | 1456 | case $ac_init_help in |
1457 | short | recursive ) echo "Configuration of GStreamer GObject Introspection overrides for Python 1.14.1:";; | |
1457 | short | recursive ) echo "Configuration of GStreamer GObject Introspection overrides for Python 1.14.2:";; | |
1458 | 1458 | esac |
1459 | 1459 | cat <<\_ACEOF |
1460 | 1460 | |
1583 | 1583 | test -n "$ac_init_help" && exit $ac_status |
1584 | 1584 | if $ac_init_version; then |
1585 | 1585 | cat <<\_ACEOF |
1586 | GStreamer GObject Introspection overrides for Python configure 1.14.1 | |
1586 | GStreamer GObject Introspection overrides for Python configure 1.14.2 | |
1587 | 1587 | generated by GNU Autoconf 2.69 |
1588 | 1588 | |
1589 | 1589 | Copyright (C) 2012 Free Software Foundation, Inc. |
1861 | 1861 | This file contains any messages produced by compilers while |
1862 | 1862 | running configure, to aid debugging if configure makes a mistake. |
1863 | 1863 | |
1864 | It was created by GStreamer GObject Introspection overrides for Python $as_me 1.14.1, which was | |
1864 | It was created by GStreamer GObject Introspection overrides for Python $as_me 1.14.2, which was | |
1865 | 1865 | generated by GNU Autoconf 2.69. Invocation command line was |
1866 | 1866 | |
1867 | 1867 | $ $0 $@ |
2839 | 2839 | |
2840 | 2840 | # Define the identity of the package. |
2841 | 2841 | PACKAGE='gst-python' |
2842 | VERSION='1.14.1' | |
2842 | VERSION='1.14.2' | |
2843 | 2843 | |
2844 | 2844 | |
2845 | 2845 | cat >>confdefs.h <<_ACEOF |
3050 | 3050 | |
3051 | 3051 | |
3052 | 3052 | |
3053 | PACKAGE_VERSION_MAJOR=$(echo 1.14.1 | cut -d'.' -f1) | |
3054 | PACKAGE_VERSION_MINOR=$(echo 1.14.1 | cut -d'.' -f2) | |
3055 | PACKAGE_VERSION_MICRO=$(echo 1.14.1 | cut -d'.' -f3) | |
3053 | PACKAGE_VERSION_MAJOR=$(echo 1.14.2 | cut -d'.' -f1) | |
3054 | PACKAGE_VERSION_MINOR=$(echo 1.14.2 | cut -d'.' -f2) | |
3055 | PACKAGE_VERSION_MICRO=$(echo 1.14.2 | cut -d'.' -f3) | |
3056 | 3056 | |
3057 | 3057 | |
3058 | 3058 | |
3063 | 3063 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5 |
3064 | 3064 | $as_echo_n "checking nano version... " >&6; } |
3065 | 3065 | |
3066 | NANO=$(echo 1.14.1 | cut -d'.' -f4) | |
3066 | NANO=$(echo 1.14.2 | cut -d'.' -f4) | |
3067 | 3067 | |
3068 | 3068 | if test x"$NANO" = x || test "x$NANO" = "x0" ; then |
3069 | 3069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5 |
3159 | 3159 | ACLOCAL_AMFLAGS="-I m4 -I common/m4" |
3160 | 3160 | |
3161 | 3161 | |
3162 | GST_REQ=1.14.1 | |
3162 | GST_REQ=1.14.2 | |
3163 | 3163 | |
3164 | 3164 | PYGOBJECT_REQ=3.8 |
3165 | 3165 | |
15244 | 15244 | # report actual input values of CONFIG_FILES etc. instead of their |
15245 | 15245 | # values after options handling. |
15246 | 15246 | ac_log=" |
15247 | This file was extended by GStreamer GObject Introspection overrides for Python $as_me 1.14.1, which was | |
15247 | This file was extended by GStreamer GObject Introspection overrides for Python $as_me 1.14.2, which was | |
15248 | 15248 | generated by GNU Autoconf 2.69. Invocation command line was |
15249 | 15249 | |
15250 | 15250 | CONFIG_FILES = $CONFIG_FILES |
15310 | 15310 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
15311 | 15311 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
15312 | 15312 | ac_cs_version="\\ |
15313 | GStreamer GObject Introspection overrides for Python config.status 1.14.1 | |
15313 | GStreamer GObject Introspection overrides for Python config.status 1.14.2 | |
15314 | 15314 | configured by $0, generated by GNU Autoconf 2.69, |
15315 | 15315 | with options \\"\$ac_cs_config\\" |
15316 | 15316 |
2 | 2 | dnl initialize autoconf |
3 | 3 | dnl when going to/from release please set the nano (fourth number) right ! |
4 | 4 | dnl releases only do Wall, cvs and prerelease does Werror too |
5 | AC_INIT(GStreamer GObject Introspection overrides for Python , 1.14.1, | |
5 | AC_INIT(GStreamer GObject Introspection overrides for Python , 1.14.2, | |
6 | 6 | http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer, |
7 | 7 | gst-python) |
8 | 8 | |
37 | 37 | |
38 | 38 | dnl required versions of other packages |
39 | 39 | dnl Note that they are runtime requirements |
40 | AC_SUBST(GST_REQ, 1.14.1) | |
40 | AC_SUBST(GST_REQ, 1.14.2) | |
41 | 41 | AC_SUBST(PYGOBJECT_REQ, 3.8) |
42 | 42 | |
43 | 43 | AC_DISABLE_STATIC |
31 | 31 | |
32 | 32 | <release> |
33 | 33 | <Version> |
34 | <revision>1.14.2</revision> | |
35 | <branch>1.14</branch> | |
36 | <name></name> | |
37 | <created>2018-07-20</created> | |
38 | <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-python/gst-python-1.14.2.tar.xz" /> | |
39 | </Version> | |
40 | </release> | |
41 | ||
42 | <release> | |
43 | <Version> | |
34 | 44 | <revision>1.14.1</revision> |
35 | 45 | <branch>1.14</branch> |
36 | 46 | <name></name> |
30 | 30 | |
31 | 31 | PROGRAM=libtool |
32 | 32 | PACKAGE=libtool |
33 | VERSION="2.4.6 Debian-2.4.6-2" | |
33 | VERSION="2.4.6 Debian-2.4.6-2.1" | |
34 | 34 | package_revision=2.4.6 |
35 | 35 | |
36 | 36 | |
63 | 63 | # libraries, which are installed to $pkgauxdir. |
64 | 64 | |
65 | 65 | # Set a version string for this script. |
66 | scriptversion=2015-01-20.17; # UTC | |
66 | scriptversion=2015-10-12.13; # UTC | |
67 | 67 | |
68 | 68 | # General shell script boiler plate, and helper functions. |
69 | 69 | # Written by Gary V. Vaughan, 2004 |
579 | 579 | { |
580 | 580 | $debug_cmd |
581 | 581 | |
582 | func_quote_for_eval "$2" | |
583 | eval "$1+=\\ \$func_quote_for_eval_result" | |
582 | func_quote_arg pretty "$2" | |
583 | eval "$1+=\\ \$func_quote_arg_result" | |
584 | 584 | }' |
585 | 585 | else |
586 | 586 | func_append_quoted () |
587 | 587 | { |
588 | 588 | $debug_cmd |
589 | 589 | |
590 | func_quote_for_eval "$2" | |
591 | eval "$1=\$$1\\ \$func_quote_for_eval_result" | |
590 | func_quote_arg pretty "$2" | |
591 | eval "$1=\$$1\\ \$func_quote_arg_result" | |
592 | 592 | } |
593 | 593 | fi |
594 | 594 | |
1090 | 1090 | } |
1091 | 1091 | |
1092 | 1092 | |
1093 | # func_quote_for_eval ARG... | |
1094 | # -------------------------- | |
1095 | # Aesthetically quote ARGs to be evaled later. | |
1096 | # This function returns two values: | |
1097 | # i) func_quote_for_eval_result | |
1098 | # double-quoted, suitable for a subsequent eval | |
1099 | # ii) func_quote_for_eval_unquoted_result | |
1093 | # func_quote_portable EVAL ARG | |
1094 | # ---------------------------- | |
1095 | # Internal function to portably implement func_quote_arg. Note that we still | |
1096 | # keep attention to performance here so we as much as possible try to avoid | |
1097 | # calling sed binary (so far O(N) complexity as long as func_append is O(1)). | |
1098 | func_quote_portable () | |
1099 | { | |
1100 | $debug_cmd | |
1101 | ||
1102 | func_quote_portable_result=$2 | |
1103 | ||
1104 | # one-time-loop (easy break) | |
1105 | while true | |
1106 | do | |
1107 | if $1; then | |
1108 | func_quote_portable_result=`$ECHO "$2" | $SED \ | |
1109 | -e "$sed_double_quote_subst" -e "$sed_double_backslash"` | |
1110 | break | |
1111 | fi | |
1112 | ||
1113 | # Quote for eval. | |
1114 | case $func_quote_portable_result in | |
1115 | *[\\\`\"\$]*) | |
1116 | case $func_quote_portable_result in | |
1117 | *[\[\*\?]*) | |
1118 | func_quote_portable_result=`$ECHO "$func_quote_portable_result" | $SED "$sed_quote_subst"` | |
1119 | break | |
1120 | ;; | |
1121 | esac | |
1122 | ||
1123 | func_quote_portable_old_IFS=$IFS | |
1124 | for _G_char in '\' '`' '"' '$' | |
1125 | do | |
1126 | # STATE($1) PREV($2) SEPARATOR($3) | |
1127 | set start "" "" | |
1128 | func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy | |
1129 | IFS=$_G_char | |
1130 | for _G_part in $func_quote_portable_result | |
1131 | do | |
1132 | case $1 in | |
1133 | quote) | |
1134 | func_append func_quote_portable_result "$3$2" | |
1135 | set quote "$_G_part" "\\$_G_char" | |
1136 | ;; | |
1137 | start) | |
1138 | set first "" "" | |
1139 | func_quote_portable_result= | |
1140 | ;; | |
1141 | first) | |
1142 | set quote "$_G_part" "" | |
1143 | ;; | |
1144 | esac | |
1145 | done | |
1146 | done | |
1147 | IFS=$func_quote_portable_old_IFS | |
1148 | ;; | |
1149 | *) ;; | |
1150 | esac | |
1151 | break | |
1152 | done | |
1153 | ||
1154 | func_quote_portable_unquoted_result=$func_quote_portable_result | |
1155 | case $func_quote_portable_result in | |
1156 | # double-quote args containing shell metacharacters to delay | |
1157 | # word splitting, command substitution and variable expansion | |
1158 | # for a subsequent eval. | |
1159 | # many bourne shells cannot handle close brackets correctly | |
1160 | # in scan sets, so we specify it separately. | |
1161 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
1162 | func_quote_portable_result=\"$func_quote_portable_result\" | |
1163 | ;; | |
1164 | esac | |
1165 | } | |
1166 | ||
1167 | ||
1168 | # func_quotefast_eval ARG | |
1169 | # ----------------------- | |
1170 | # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', | |
1171 | # but optimized for speed. Result is stored in $func_quotefast_eval. | |
1172 | if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then | |
1173 | func_quotefast_eval () | |
1174 | { | |
1175 | printf -v func_quotefast_eval_result %q "$1" | |
1176 | } | |
1177 | else | |
1178 | func_quotefast_eval () | |
1179 | { | |
1180 | func_quote_portable false "$1" | |
1181 | func_quotefast_eval_result=$func_quote_portable_result | |
1182 | } | |
1183 | fi | |
1184 | ||
1185 | ||
1186 | # func_quote_arg MODEs ARG | |
1187 | # ------------------------ | |
1188 | # Quote one ARG to be evaled later. MODEs argument may contain zero ore more | |
1189 | # specifiers listed below separated by ',' character. This function returns two | |
1190 | # values: | |
1191 | # i) func_quote_arg_result | |
1192 | # double-quoted (when needed), suitable for a subsequent eval | |
1193 | # ii) func_quote_arg_unquoted_result | |
1100 | 1194 | # has all characters that are still active within double |
1101 | # quotes backslashified. | |
1102 | func_quote_for_eval () | |
1195 | # quotes backslashified. Available only if 'unquoted' is specified. | |
1196 | # | |
1197 | # Available modes: | |
1198 | # ---------------- | |
1199 | # 'eval' (default) | |
1200 | # - escape shell special characters | |
1201 | # 'expand' | |
1202 | # - the same as 'eval'; but do not quote variable references | |
1203 | # 'pretty' | |
1204 | # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might | |
1205 | # later used in func_quote to get output like: 'echo "a b"' instead of | |
1206 | # 'echo a\ b'. This is slower than default on some shells. | |
1207 | # 'unquoted' | |
1208 | # - produce also $func_quote_arg_unquoted_result which does not contain | |
1209 | # wrapping double-quotes. | |
1210 | # | |
1211 | # Examples for 'func_quote_arg pretty,unquoted string': | |
1212 | # | |
1213 | # string | *_result | *_unquoted_result | |
1214 | # ------------+-----------------------+------------------- | |
1215 | # " | \" | \" | |
1216 | # a b | "a b" | a b | |
1217 | # "a b" | "\"a b\"" | \"a b\" | |
1218 | # * | "*" | * | |
1219 | # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" | |
1220 | # | |
1221 | # Examples for 'func_quote_arg pretty,unquoted,expand string': | |
1222 | # | |
1223 | # string | *_result | *_unquoted_result | |
1224 | # --------------+---------------------+-------------------- | |
1225 | # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" | |
1226 | func_quote_arg () | |
1227 | { | |
1228 | _G_quote_expand=false | |
1229 | case ,$1, in | |
1230 | *,expand,*) | |
1231 | _G_quote_expand=: | |
1232 | ;; | |
1233 | esac | |
1234 | ||
1235 | case ,$1, in | |
1236 | *,pretty,*|*,expand,*|*,unquoted,*) | |
1237 | func_quote_portable $_G_quote_expand "$2" | |
1238 | func_quote_arg_result=$func_quote_portable_result | |
1239 | func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result | |
1240 | ;; | |
1241 | *) | |
1242 | # Faster quote-for-eval for some shells. | |
1243 | func_quotefast_eval "$2" | |
1244 | func_quote_arg_result=$func_quotefast_eval_result | |
1245 | ;; | |
1246 | esac | |
1247 | } | |
1248 | ||
1249 | ||
1250 | # func_quote MODEs ARGs... | |
1251 | # ------------------------ | |
1252 | # Quote all ARGs to be evaled later and join them into single command. See | |
1253 | # func_quote_arg's description for more info. | |
1254 | func_quote () | |
1103 | 1255 | { |
1104 | 1256 | $debug_cmd |
1105 | ||
1106 | func_quote_for_eval_unquoted_result= | |
1107 | func_quote_for_eval_result= | |
1257 | _G_func_quote_mode=$1 ; shift | |
1258 | func_quote_result= | |
1108 | 1259 | while test 0 -lt $#; do |
1109 | case $1 in | |
1110 | *[\\\`\"\$]*) | |
1111 | _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; | |
1112 | *) | |
1113 | _G_unquoted_arg=$1 ;; | |
1114 | esac | |
1115 | if test -n "$func_quote_for_eval_unquoted_result"; then | |
1116 | func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" | |
1260 | func_quote_arg "$_G_func_quote_mode" "$1" | |
1261 | if test -n "$func_quote_result"; then | |
1262 | func_append func_quote_result " $func_quote_arg_result" | |
1117 | 1263 | else |
1118 | func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" | |
1119 | fi | |
1120 | ||
1121 | case $_G_unquoted_arg in | |
1122 | # Double-quote args containing shell metacharacters to delay | |
1123 | # word splitting, command substitution and variable expansion | |
1124 | # for a subsequent eval. | |
1125 | # Many Bourne shells cannot handle close brackets correctly | |
1126 | # in scan sets, so we specify it separately. | |
1127 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
1128 | _G_quoted_arg=\"$_G_unquoted_arg\" | |
1129 | ;; | |
1130 | *) | |
1131 | _G_quoted_arg=$_G_unquoted_arg | |
1132 | ;; | |
1133 | esac | |
1134 | ||
1135 | if test -n "$func_quote_for_eval_result"; then | |
1136 | func_append func_quote_for_eval_result " $_G_quoted_arg" | |
1137 | else | |
1138 | func_append func_quote_for_eval_result "$_G_quoted_arg" | |
1264 | func_append func_quote_result "$func_quote_arg_result" | |
1139 | 1265 | fi |
1140 | 1266 | shift |
1141 | 1267 | done |
1142 | } | |
1143 | ||
1144 | ||
1145 | # func_quote_for_expand ARG | |
1146 | # ------------------------- | |
1147 | # Aesthetically quote ARG to be evaled later; same as above, | |
1148 | # but do not quote variable references. | |
1149 | func_quote_for_expand () | |
1150 | { | |
1151 | $debug_cmd | |
1152 | ||
1153 | case $1 in | |
1154 | *[\\\`\"]*) | |
1155 | _G_arg=`$ECHO "$1" | $SED \ | |
1156 | -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; | |
1157 | *) | |
1158 | _G_arg=$1 ;; | |
1159 | esac | |
1160 | ||
1161 | case $_G_arg in | |
1162 | # Double-quote args containing shell metacharacters to delay | |
1163 | # word splitting and command substitution for a subsequent eval. | |
1164 | # Many Bourne shells cannot handle close brackets correctly | |
1165 | # in scan sets, so we specify it separately. | |
1166 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
1167 | _G_arg=\"$_G_arg\" | |
1168 | ;; | |
1169 | esac | |
1170 | ||
1171 | func_quote_for_expand_result=$_G_arg | |
1172 | 1268 | } |
1173 | 1269 | |
1174 | 1270 | |
1214 | 1310 | _G_cmd=$1 |
1215 | 1311 | _G_fail_exp=${2-':'} |
1216 | 1312 | |
1217 | func_quote_for_expand "$_G_cmd" | |
1218 | eval "func_notquiet $func_quote_for_expand_result" | |
1313 | func_quote_arg pretty,expand "$_G_cmd" | |
1314 | eval "func_notquiet $func_quote_arg_result" | |
1219 | 1315 | |
1220 | 1316 | $opt_dry_run || { |
1221 | 1317 | eval "$_G_cmd" |
1240 | 1336 | _G_fail_exp=${2-':'} |
1241 | 1337 | |
1242 | 1338 | $opt_quiet || { |
1243 | func_quote_for_expand "$_G_cmd" | |
1244 | eval "func_echo $func_quote_for_expand_result" | |
1339 | func_quote_arg expand,pretty "$_G_cmd" | |
1340 | eval "func_echo $func_quote_arg_result" | |
1245 | 1341 | } |
1246 | 1342 | |
1247 | 1343 | $opt_dry_run || { |
1369 | 1465 | #! /bin/sh |
1370 | 1466 | |
1371 | 1467 | # Set a version string for this script. |
1372 | scriptversion=2014-01-07.03; # UTC | |
1468 | scriptversion=2015-10-12.13; # UTC | |
1373 | 1469 | |
1374 | 1470 | # A portable, pluggable option parser for Bourne shell. |
1375 | 1471 | # Written by Gary V. Vaughan, 2010 |
1529 | 1625 | { |
1530 | 1626 | $debug_cmd |
1531 | 1627 | |
1628 | _G_rc_run_hooks=false | |
1629 | ||
1532 | 1630 | case " $hookable_fns " in |
1533 | 1631 | *" $1 "*) ;; |
1534 | 1632 | *) func_fatal_error "'$1' does not support hook funcions.n" ;; |
1537 | 1635 | eval _G_hook_fns=\$$1_hooks; shift |
1538 | 1636 | |
1539 | 1637 | for _G_hook in $_G_hook_fns; do |
1540 | eval $_G_hook '"$@"' | |
1541 | ||
1542 | # store returned options list back into positional | |
1543 | # parameters for next 'cmd' execution. | |
1544 | eval _G_hook_result=\$${_G_hook}_result | |
1545 | eval set dummy "$_G_hook_result"; shift | |
1638 | if eval $_G_hook '"$@"'; then | |
1639 | # store returned options list back into positional | |
1640 | # parameters for next 'cmd' execution. | |
1641 | eval _G_hook_result=\$${_G_hook}_result | |
1642 | eval set dummy "$_G_hook_result"; shift | |
1643 | _G_rc_run_hooks=: | |
1644 | fi | |
1546 | 1645 | done |
1547 | 1646 | |
1548 | func_quote_for_eval ${1+"$@"} | |
1549 | func_run_hooks_result=$func_quote_for_eval_result | |
1647 | $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result | |
1550 | 1648 | } |
1551 | 1649 | |
1552 | 1650 | |
1556 | 1654 | ## --------------- ## |
1557 | 1655 | |
1558 | 1656 | # In order to add your own option parsing hooks, you must accept the |
1559 | # full positional parameter list in your hook function, remove any | |
1560 | # options that you action, and then pass back the remaining unprocessed | |
1657 | # full positional parameter list in your hook function, you may remove/edit | |
1658 | # any options that you action, and then pass back the remaining unprocessed | |
1561 | 1659 | # options in '<hooked_function_name>_result', escaped suitably for |
1562 | # 'eval'. Like this: | |
1660 | # 'eval'. In this case you also must return $EXIT_SUCCESS to let the | |
1661 | # hook's caller know that it should pay attention to | |
1662 | # '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that | |
1663 | # arguments are left untouched by the hook and therefore caller will ignore the | |
1664 | # result variable. | |
1665 | # | |
1666 | # Like this: | |
1563 | 1667 | # |
1564 | 1668 | # my_options_prep () |
1565 | 1669 | # { |
1569 | 1673 | # usage_message=$usage_message' |
1570 | 1674 | # -s, --silent don'\''t print informational messages |
1571 | 1675 | # ' |
1572 | # | |
1573 | # func_quote_for_eval ${1+"$@"} | |
1574 | # my_options_prep_result=$func_quote_for_eval_result | |
1676 | # # No change in '$@' (ignored completely by this hook). There is | |
1677 | # # no need to do the equivalent (but slower) action: | |
1678 | # # func_quote eval ${1+"$@"} | |
1679 | # # my_options_prep_result=$func_quote_result | |
1680 | # false | |
1575 | 1681 | # } |
1576 | 1682 | # func_add_hook func_options_prep my_options_prep |
1577 | 1683 | # |
1580 | 1686 | # { |
1581 | 1687 | # $debug_cmd |
1582 | 1688 | # |
1689 | # args_changed=false | |
1690 | # | |
1583 | 1691 | # # Note that for efficiency, we parse as many options as we can |
1584 | 1692 | # # recognise in a loop before passing the remainder back to the |
1585 | 1693 | # # caller on the first unrecognised argument we encounter. |
1586 | 1694 | # while test $# -gt 0; do |
1587 | 1695 | # opt=$1; shift |
1588 | 1696 | # case $opt in |
1589 | # --silent|-s) opt_silent=: ;; | |
1697 | # --silent|-s) opt_silent=: | |
1698 | # args_changed=: | |
1699 | # ;; | |
1590 | 1700 | # # Separate non-argument short options: |
1591 | 1701 | # -s*) func_split_short_opt "$_G_opt" |
1592 | 1702 | # set dummy "$func_split_short_opt_name" \ |
1593 | 1703 | # "-$func_split_short_opt_arg" ${1+"$@"} |
1594 | 1704 | # shift |
1705 | # args_changed=: | |
1595 | 1706 | # ;; |
1596 | # *) set dummy "$_G_opt" "$*"; shift; break ;; | |
1707 | # *) # Make sure the first unrecognised option "$_G_opt" | |
1708 | # # is added back to "$@", we could need that later | |
1709 | # # if $args_changed is true. | |
1710 | # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | |
1597 | 1711 | # esac |
1598 | 1712 | # done |
1599 | 1713 | # |
1600 | # func_quote_for_eval ${1+"$@"} | |
1601 | # my_silent_option_result=$func_quote_for_eval_result | |
1714 | # if $args_changed; then | |
1715 | # func_quote eval ${1+"$@"} | |
1716 | # my_silent_option_result=$func_quote_result | |
1717 | # fi | |
1718 | # | |
1719 | # $args_changed | |
1602 | 1720 | # } |
1603 | 1721 | # func_add_hook func_parse_options my_silent_option |
1604 | 1722 | # |
1610 | 1728 | # $opt_silent && $opt_verbose && func_fatal_help "\ |
1611 | 1729 | # '--silent' and '--verbose' options are mutually exclusive." |
1612 | 1730 | # |
1613 | # func_quote_for_eval ${1+"$@"} | |
1614 | # my_option_validation_result=$func_quote_for_eval_result | |
1731 | # false | |
1615 | 1732 | # } |
1616 | 1733 | # func_add_hook func_validate_options my_option_validation |
1617 | 1734 | # |
1618 | # You'll alse need to manually amend $usage_message to reflect the extra | |
1735 | # You'll also need to manually amend $usage_message to reflect the extra | |
1619 | 1736 | # options you parse. It's preferable to append if you can, so that |
1620 | 1737 | # multiple option parsing hooks can be added safely. |
1738 | ||
1739 | ||
1740 | # func_options_finish [ARG]... | |
1741 | # ---------------------------- | |
1742 | # Finishing the option parse loop (call 'func_options' hooks ATM). | |
1743 | func_options_finish () | |
1744 | { | |
1745 | $debug_cmd | |
1746 | ||
1747 | _G_func_options_finish_exit=false | |
1748 | if func_run_hooks func_options ${1+"$@"}; then | |
1749 | func_options_finish_result=$func_run_hooks_result | |
1750 | _G_func_options_finish_exit=: | |
1751 | fi | |
1752 | ||
1753 | $_G_func_options_finish_exit | |
1754 | } | |
1621 | 1755 | |
1622 | 1756 | |
1623 | 1757 | # func_options [ARG]... |
1629 | 1763 | { |
1630 | 1764 | $debug_cmd |
1631 | 1765 | |
1632 | func_options_prep ${1+"$@"} | |
1633 | eval func_parse_options \ | |
1634 | ${func_options_prep_result+"$func_options_prep_result"} | |
1635 | eval func_validate_options \ | |
1636 | ${func_parse_options_result+"$func_parse_options_result"} | |
1637 | ||
1638 | eval func_run_hooks func_options \ | |
1639 | ${func_validate_options_result+"$func_validate_options_result"} | |
1640 | ||
1641 | # save modified positional parameters for caller | |
1642 | func_options_result=$func_run_hooks_result | |
1766 | _G_rc_options=false | |
1767 | ||
1768 | for my_func in options_prep parse_options validate_options options_finish | |
1769 | do | |
1770 | if eval func_$my_func '${1+"$@"}'; then | |
1771 | eval _G_res_var='$'"func_${my_func}_result" | |
1772 | eval set dummy "$_G_res_var" ; shift | |
1773 | _G_rc_options=: | |
1774 | fi | |
1775 | done | |
1776 | ||
1777 | # Save modified positional parameters for caller. As a top-level | |
1778 | # options-parser function we always need to set the 'func_options_result' | |
1779 | # variable (regardless the $_G_rc_options value). | |
1780 | if $_G_rc_options; then | |
1781 | func_options_result=$_G_res_var | |
1782 | else | |
1783 | func_quote eval ${1+"$@"} | |
1784 | func_options_result=$func_quote_result | |
1785 | fi | |
1786 | ||
1787 | $_G_rc_options | |
1643 | 1788 | } |
1644 | 1789 | |
1645 | 1790 | |
1648 | 1793 | # All initialisations required before starting the option parse loop. |
1649 | 1794 | # Note that when calling hook functions, we pass through the list of |
1650 | 1795 | # positional parameters. If a hook function modifies that list, and |
1651 | # needs to propogate that back to rest of this script, then the complete | |
1796 | # needs to propagate that back to rest of this script, then the complete | |
1652 | 1797 | # modified list must be put in 'func_run_hooks_result' before |
1653 | # returning. | |
1798 | # returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). | |
1654 | 1799 | func_hookable func_options_prep |
1655 | 1800 | func_options_prep () |
1656 | 1801 | { |
1660 | 1805 | opt_verbose=false |
1661 | 1806 | opt_warning_types= |
1662 | 1807 | |
1663 | func_run_hooks func_options_prep ${1+"$@"} | |
1664 | ||
1665 | # save modified positional parameters for caller | |
1666 | func_options_prep_result=$func_run_hooks_result | |
1808 | _G_rc_options_prep=false | |
1809 | if func_run_hooks func_options_prep ${1+"$@"}; then | |
1810 | _G_rc_options_prep=: | |
1811 | # save modified positional parameters for caller | |
1812 | func_options_prep_result=$func_run_hooks_result | |
1813 | fi | |
1814 | ||
1815 | $_G_rc_options_prep | |
1667 | 1816 | } |
1668 | 1817 | |
1669 | 1818 | |
1677 | 1826 | |
1678 | 1827 | func_parse_options_result= |
1679 | 1828 | |
1829 | _G_rc_parse_options=false | |
1680 | 1830 | # this just eases exit handling |
1681 | 1831 | while test $# -gt 0; do |
1682 | 1832 | # Defer to hook functions for initial option parsing, so they |
1683 | 1833 | # get priority in the event of reusing an option name. |
1684 | func_run_hooks func_parse_options ${1+"$@"} | |
1685 | ||
1686 | # Adjust func_parse_options positional parameters to match | |
1687 | eval set dummy "$func_run_hooks_result"; shift | |
1834 | if func_run_hooks func_parse_options ${1+"$@"}; then | |
1835 | eval set dummy "$func_run_hooks_result"; shift | |
1836 | _G_rc_parse_options=: | |
1837 | fi | |
1688 | 1838 | |
1689 | 1839 | # Break out of the loop if we already parsed every option. |
1690 | 1840 | test $# -gt 0 || break |
1691 | 1841 | |
1842 | _G_match_parse_options=: | |
1692 | 1843 | _G_opt=$1 |
1693 | 1844 | shift |
1694 | 1845 | case $_G_opt in |
1703 | 1854 | ;; |
1704 | 1855 | |
1705 | 1856 | --warnings|--warning|-W) |
1706 | test $# = 0 && func_missing_arg $_G_opt && break | |
1857 | if test $# = 0 && func_missing_arg $_G_opt; then | |
1858 | _G_rc_parse_options=: | |
1859 | break | |
1860 | fi | |
1707 | 1861 | case " $warning_categories $1" in |
1708 | 1862 | *" $1 "*) |
1709 | 1863 | # trailing space prevents matching last $1 above |
1756 | 1910 | shift |
1757 | 1911 | ;; |
1758 | 1912 | |
1759 | --) break ;; | |
1913 | --) _G_rc_parse_options=: ; break ;; | |
1760 | 1914 | -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; |
1761 | *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | |
1915 | *) set dummy "$_G_opt" ${1+"$@"}; shift | |
1916 | _G_match_parse_options=false | |
1917 | break | |
1918 | ;; | |
1762 | 1919 | esac |
1920 | ||
1921 | $_G_match_parse_options && _G_rc_parse_options=: | |
1763 | 1922 | done |
1764 | 1923 | |
1765 | # save modified positional parameters for caller | |
1766 | func_quote_for_eval ${1+"$@"} | |
1767 | func_parse_options_result=$func_quote_for_eval_result | |
1924 | ||
1925 | if $_G_rc_parse_options; then | |
1926 | # save modified positional parameters for caller | |
1927 | func_quote eval ${1+"$@"} | |
1928 | func_parse_options_result=$func_quote_result | |
1929 | fi | |
1930 | ||
1931 | $_G_rc_parse_options | |
1768 | 1932 | } |
1769 | 1933 | |
1770 | 1934 | |
1777 | 1941 | { |
1778 | 1942 | $debug_cmd |
1779 | 1943 | |
1944 | _G_rc_validate_options=false | |
1945 | ||
1780 | 1946 | # Display all warnings if -W was not given. |
1781 | 1947 | test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" |
1782 | 1948 | |
1783 | func_run_hooks func_validate_options ${1+"$@"} | |
1949 | if func_run_hooks func_validate_options ${1+"$@"}; then | |
1950 | # save modified positional parameters for caller | |
1951 | func_validate_options_result=$func_run_hooks_result | |
1952 | _G_rc_validate_options=: | |
1953 | fi | |
1784 | 1954 | |
1785 | 1955 | # Bail if the options were screwed! |
1786 | 1956 | $exit_cmd $EXIT_FAILURE |
1787 | 1957 | |
1788 | # save modified positional parameters for caller | |
1789 | func_validate_options_result=$func_run_hooks_result | |
1958 | $_G_rc_validate_options | |
1790 | 1959 | } |
1791 | 1960 | |
1792 | 1961 | |
2067 | 2236 | compiler: $LTCC |
2068 | 2237 | compiler flags: $LTCFLAGS |
2069 | 2238 | linker: $LD (gnu? $with_gnu_ld) |
2070 | version: $progname $scriptversion Debian-2.4.6-2 | |
2239 | version: $progname $scriptversion Debian-2.4.6-2.1 | |
2071 | 2240 | automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` |
2072 | 2241 | autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` |
2073 | 2242 | |
2269 | 2438 | nonopt= |
2270 | 2439 | preserve_args= |
2271 | 2440 | |
2441 | _G_rc_lt_options_prep=: | |
2442 | ||
2272 | 2443 | # Shorthand for --mode=foo, only valid as the first argument |
2273 | 2444 | case $1 in |
2274 | 2445 | clean|clea|cle|cl) |
2292 | 2463 | uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) |
2293 | 2464 | shift; set dummy --mode uninstall ${1+"$@"}; shift |
2294 | 2465 | ;; |
2466 | *) | |
2467 | _G_rc_lt_options_prep=false | |
2468 | ;; | |
2295 | 2469 | esac |
2296 | 2470 | |
2297 | # Pass back the list of options. | |
2298 | func_quote_for_eval ${1+"$@"} | |
2299 | libtool_options_prep_result=$func_quote_for_eval_result | |
2471 | if $_G_rc_lt_options_prep; then | |
2472 | # Pass back the list of options. | |
2473 | func_quote eval ${1+"$@"} | |
2474 | libtool_options_prep_result=$func_quote_result | |
2475 | fi | |
2476 | ||
2477 | $_G_rc_lt_options_prep | |
2300 | 2478 | } |
2301 | 2479 | func_add_hook func_options_prep libtool_options_prep |
2302 | 2480 | |
2308 | 2486 | { |
2309 | 2487 | $debug_cmd |
2310 | 2488 | |
2489 | _G_rc_lt_parse_options=false | |
2490 | ||
2311 | 2491 | # Perform our own loop to consume as many options as possible in |
2312 | 2492 | # each iteration. |
2313 | 2493 | while test $# -gt 0; do |
2494 | _G_match_lt_parse_options=: | |
2314 | 2495 | _G_opt=$1 |
2315 | 2496 | shift |
2316 | 2497 | case $_G_opt in |
2385 | 2566 | func_append preserve_args " $_G_opt" |
2386 | 2567 | ;; |
2387 | 2568 | |
2388 | # An option not handled by this hook function: | |
2389 | *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | |
2569 | # An option not handled by this hook function: | |
2570 | *) set dummy "$_G_opt" ${1+"$@"} ; shift | |
2571 | _G_match_lt_parse_options=false | |
2572 | break | |
2573 | ;; | |
2390 | 2574 | esac |
2575 | $_G_match_lt_parse_options && _G_rc_lt_parse_options=: | |
2391 | 2576 | done |
2392 | 2577 | |
2393 | ||
2394 | # save modified positional parameters for caller | |
2395 | func_quote_for_eval ${1+"$@"} | |
2396 | libtool_parse_options_result=$func_quote_for_eval_result | |
2578 | if $_G_rc_lt_parse_options; then | |
2579 | # save modified positional parameters for caller | |
2580 | func_quote eval ${1+"$@"} | |
2581 | libtool_parse_options_result=$func_quote_result | |
2582 | fi | |
2583 | ||
2584 | $_G_rc_lt_parse_options | |
2397 | 2585 | } |
2398 | 2586 | func_add_hook func_parse_options libtool_parse_options |
2399 | 2587 | |
2450 | 2638 | } |
2451 | 2639 | |
2452 | 2640 | # Pass back the unparsed argument list |
2453 | func_quote_for_eval ${1+"$@"} | |
2454 | libtool_validate_options_result=$func_quote_for_eval_result | |
2641 | func_quote eval ${1+"$@"} | |
2642 | libtool_validate_options_result=$func_quote_result | |
2455 | 2643 | } |
2456 | 2644 | func_add_hook func_validate_options libtool_validate_options |
2457 | 2645 | |
3417 | 3605 | esac |
3418 | 3606 | done |
3419 | 3607 | |
3420 | func_quote_for_eval "$libobj" | |
3421 | test "X$libobj" != "X$func_quote_for_eval_result" \ | |
3608 | func_quote_arg pretty "$libobj" | |
3609 | test "X$libobj" != "X$func_quote_arg_result" \ | |
3422 | 3610 | && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ |
3423 | 3611 | && func_warning "libobj name '$libobj' may not contain shell special characters." |
3424 | 3612 | func_dirname_and_basename "$obj" "/" "" |
3491 | 3679 | |
3492 | 3680 | func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 |
3493 | 3681 | srcfile=$func_to_tool_file_result |
3494 | func_quote_for_eval "$srcfile" | |
3495 | qsrcfile=$func_quote_for_eval_result | |
3682 | func_quote_arg pretty "$srcfile" | |
3683 | qsrcfile=$func_quote_arg_result | |
3496 | 3684 | |
3497 | 3685 | # Only build a PIC object if we are building libtool libraries. |
3498 | 3686 | if test yes = "$build_libtool_libs"; then |
4095 | 4283 | case $nonopt in *shtool*) :;; *) false;; esac |
4096 | 4284 | then |
4097 | 4285 | # Aesthetically quote it. |
4098 | func_quote_for_eval "$nonopt" | |
4099 | install_prog="$func_quote_for_eval_result " | |
4286 | func_quote_arg pretty "$nonopt" | |
4287 | install_prog="$func_quote_arg_result " | |
4100 | 4288 | arg=$1 |
4101 | 4289 | shift |
4102 | 4290 | else |
4106 | 4294 | |
4107 | 4295 | # The real first argument should be the name of the installation program. |
4108 | 4296 | # Aesthetically quote it. |
4109 | func_quote_for_eval "$arg" | |
4110 | func_append install_prog "$func_quote_for_eval_result" | |
4297 | func_quote_arg pretty "$arg" | |
4298 | func_append install_prog "$func_quote_arg_result" | |
4111 | 4299 | install_shared_prog=$install_prog |
4112 | 4300 | case " $install_prog " in |
4113 | 4301 | *[\\\ /]cp\ *) install_cp=: ;; |
4164 | 4352 | esac |
4165 | 4353 | |
4166 | 4354 | # Aesthetically quote the argument. |
4167 | func_quote_for_eval "$arg" | |
4168 | func_append install_prog " $func_quote_for_eval_result" | |
4355 | func_quote_arg pretty "$arg" | |
4356 | func_append install_prog " $func_quote_arg_result" | |
4169 | 4357 | if test -n "$arg2"; then |
4170 | func_quote_for_eval "$arg2" | |
4358 | func_quote_arg pretty "$arg2" | |
4171 | 4359 | fi |
4172 | func_append install_shared_prog " $func_quote_for_eval_result" | |
4360 | func_append install_shared_prog " $func_quote_arg_result" | |
4173 | 4361 | done |
4174 | 4362 | |
4175 | 4363 | test -z "$install_prog" && \ |
4180 | 4368 | |
4181 | 4369 | if test -n "$install_override_mode" && $no_mode; then |
4182 | 4370 | if $install_cp; then :; else |
4183 | func_quote_for_eval "$install_override_mode" | |
4184 | func_append install_shared_prog " -m $func_quote_for_eval_result" | |
4371 | func_quote_arg pretty "$install_override_mode" | |
4372 | func_append install_shared_prog " -m $func_quote_arg_result" | |
4185 | 4373 | fi |
4186 | 4374 | fi |
4187 | 4375 | |
4477 | 4665 | relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` |
4478 | 4666 | |
4479 | 4667 | $opt_quiet || { |
4480 | func_quote_for_expand "$relink_command" | |
4481 | eval "func_echo $func_quote_for_expand_result" | |
4668 | func_quote_arg expand,pretty "$relink_command" | |
4669 | eval "func_echo $func_quote_arg_result" | |
4482 | 4670 | } |
4483 | 4671 | if eval "$relink_command"; then : |
4484 | 4672 | else |
5257 | 5445 | if test \"\$libtool_execute_magic\" != \"$magic\"; then |
5258 | 5446 | file=\"\$0\"" |
5259 | 5447 | |
5260 | qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` | |
5448 | func_quote_arg pretty "$ECHO" | |
5449 | qECHO=$func_quote_arg_result | |
5261 | 5450 | $ECHO "\ |
5262 | 5451 | |
5263 | 5452 | # A function that is used when there is no print builtin or printf. |
5267 | 5456 | \$1 |
5268 | 5457 | _LTECHO_EOF' |
5269 | 5458 | } |
5270 | ECHO=\"$qECHO\" | |
5459 | ECHO=$qECHO | |
5271 | 5460 | fi |
5272 | 5461 | |
5273 | 5462 | # Very basic option parsing. These options are (a) specific to |
6610 | 6799 | while test "$#" -gt 0; do |
6611 | 6800 | arg=$1 |
6612 | 6801 | shift |
6613 | func_quote_for_eval "$arg" | |
6614 | qarg=$func_quote_for_eval_unquoted_result | |
6615 | func_append libtool_args " $func_quote_for_eval_result" | |
6802 | func_quote_arg pretty,unquoted "$arg" | |
6803 | qarg=$func_quote_arg_unquoted_result | |
6804 | func_append libtool_args " $func_quote_arg_result" | |
6616 | 6805 | |
6617 | 6806 | # If the previous option needs an argument, assign it. |
6618 | 6807 | if test -n "$prev"; then |
7210 | 7399 | save_ifs=$IFS; IFS=, |
7211 | 7400 | for flag in $args; do |
7212 | 7401 | IFS=$save_ifs |
7213 | func_quote_for_eval "$flag" | |
7214 | func_append arg " $func_quote_for_eval_result" | |
7215 | func_append compiler_flags " $func_quote_for_eval_result" | |
7402 | func_quote_arg pretty "$flag" | |
7403 | func_append arg " $func_quote_arg_result" | |
7404 | func_append compiler_flags " $func_quote_arg_result" | |
7216 | 7405 | done |
7217 | 7406 | IFS=$save_ifs |
7218 | 7407 | func_stripname ' ' '' "$arg" |
7226 | 7415 | save_ifs=$IFS; IFS=, |
7227 | 7416 | for flag in $args; do |
7228 | 7417 | IFS=$save_ifs |
7229 | func_quote_for_eval "$flag" | |
7230 | func_append arg " $wl$func_quote_for_eval_result" | |
7231 | func_append compiler_flags " $wl$func_quote_for_eval_result" | |
7232 | func_append linker_flags " $func_quote_for_eval_result" | |
7418 | func_quote_arg pretty "$flag" | |
7419 | func_append arg " $wl$func_quote_arg_result" | |
7420 | func_append compiler_flags " $wl$func_quote_arg_result" | |
7421 | func_append linker_flags " $func_quote_arg_result" | |
7233 | 7422 | done |
7234 | 7423 | IFS=$save_ifs |
7235 | 7424 | func_stripname ' ' '' "$arg" |
7253 | 7442 | |
7254 | 7443 | # -msg_* for osf cc |
7255 | 7444 | -msg_*) |
7256 | func_quote_for_eval "$arg" | |
7257 | arg=$func_quote_for_eval_result | |
7445 | func_quote_arg pretty "$arg" | |
7446 | arg=$func_quote_arg_result | |
7258 | 7447 | ;; |
7259 | 7448 | |
7260 | 7449 | # Flags to be passed through unchanged, with rationale: |
7278 | 7467 | -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ |
7279 | 7468 | -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ |
7280 | 7469 | -specs=*|-fsanitize=*) |
7281 | func_quote_for_eval "$arg" | |
7282 | arg=$func_quote_for_eval_result | |
7470 | func_quote_arg pretty "$arg" | |
7471 | arg=$func_quote_arg_result | |
7283 | 7472 | func_append compile_command " $arg" |
7284 | 7473 | func_append finalize_command " $arg" |
7285 | 7474 | func_append compiler_flags " $arg" |
7300 | 7489 | continue |
7301 | 7490 | else |
7302 | 7491 | # Otherwise treat like 'Some other compiler flag' below |
7303 | func_quote_for_eval "$arg" | |
7304 | arg=$func_quote_for_eval_result | |
7492 | func_quote_arg pretty "$arg" | |
7493 | arg=$func_quote_arg_result | |
7305 | 7494 | fi |
7306 | 7495 | ;; |
7307 | 7496 | |
7308 | 7497 | # Some other compiler flag. |
7309 | 7498 | -* | +*) |
7310 | func_quote_for_eval "$arg" | |
7311 | arg=$func_quote_for_eval_result | |
7499 | func_quote_arg pretty "$arg" | |
7500 | arg=$func_quote_arg_result | |
7312 | 7501 | ;; |
7313 | 7502 | |
7314 | 7503 | *.$objext) |
7428 | 7617 | *) |
7429 | 7618 | # Unknown arguments in both finalize_command and compile_command need |
7430 | 7619 | # to be aesthetically quoted because they are evaled later. |
7431 | func_quote_for_eval "$arg" | |
7432 | arg=$func_quote_for_eval_result | |
7620 | func_quote_arg pretty "$arg" | |
7621 | arg=$func_quote_arg_result | |
7433 | 7622 | ;; |
7434 | 7623 | esac # arg |
7435 | 7624 | |
9941 | 10130 | for cmd in $concat_cmds; do |
9942 | 10131 | IFS=$save_ifs |
9943 | 10132 | $opt_quiet || { |
9944 | func_quote_for_expand "$cmd" | |
9945 | eval "func_echo $func_quote_for_expand_result" | |
10133 | func_quote_arg expand,pretty "$cmd" | |
10134 | eval "func_echo $func_quote_arg_result" | |
9946 | 10135 | } |
9947 | 10136 | $opt_dry_run || eval "$cmd" || { |
9948 | 10137 | lt_exit=$? |
10035 | 10224 | eval cmd=\"$cmd\" |
10036 | 10225 | IFS=$save_ifs |
10037 | 10226 | $opt_quiet || { |
10038 | func_quote_for_expand "$cmd" | |
10039 | eval "func_echo $func_quote_for_expand_result" | |
10227 | func_quote_arg expand,pretty "$cmd" | |
10228 | eval "func_echo $func_quote_arg_result" | |
10040 | 10229 | } |
10041 | 10230 | $opt_dry_run || eval "$cmd" || { |
10042 | 10231 | lt_exit=$? |
10510 | 10699 | elif eval var_value=\$$var; test -z "$var_value"; then |
10511 | 10700 | relink_command="$var=; export $var; $relink_command" |
10512 | 10701 | else |
10513 | func_quote_for_eval "$var_value" | |
10514 | relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" | |
10702 | func_quote_arg pretty "$var_value" | |
10703 | relink_command="$var=$func_quote_arg_result; export $var; $relink_command" | |
10515 | 10704 | fi |
10516 | 10705 | done |
10517 | relink_command="(cd `pwd`; $relink_command)" | |
10518 | relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` | |
10706 | func_quote_arg pretty,unquoted "(cd `pwd`; $relink_command)" | |
10707 | relink_command=$func_quote_arg_unquoted_result | |
10519 | 10708 | fi |
10520 | 10709 | |
10521 | 10710 | # Only actually do things if not in dry run mode. |
10755 | 10944 | elif eval var_value=\$$var; test -z "$var_value"; then |
10756 | 10945 | relink_command="$var=; export $var; $relink_command" |
10757 | 10946 | else |
10758 | func_quote_for_eval "$var_value" | |
10759 | relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" | |
10947 | func_quote_arg pretty,unquoted "$var_value" | |
10948 | relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" | |
10760 | 10949 | fi |
10761 | 10950 | done |
10762 | 10951 | # Quote the link command for shipping. |
10763 | 10952 | relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" |
10764 | relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` | |
10953 | func_quote_arg pretty,unquoted "$relink_command" | |
10954 | relink_command=$func_quote_arg_unquoted_result | |
10765 | 10955 | if test yes = "$hardcode_automatic"; then |
10766 | 10956 | relink_command= |
10767 | 10957 | fi |