Package list libvirt-glib / e6cfbc8
Update upstream source from tag 'upstream/3.0.0' Update to upstream version '3.0.0' with Debian dir 06425929b639a37b5ffff72e5c2ba1c631c14a99 Guido Günther 1 year, 4 months ago
308 changed file(s) with 11806 addition(s) and 9569 deletion(s). Raw diff Collapse all Expand all
0 2019-11-26 Daniel P. Berrangé <berrange@redhat.com>
1
2 Bump version & update NEWS for 3.0.0 release
3
4 2019-10-01 Fabiano Fidêncio <fidencio@redhat.com>
5
6 gconfig-domain-video: Add bochs video device
7 https://bugzilla.redhat.com/show_bug.cgi?id=1753670
8
9 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
10
11 2019-09-05 Fabiano Fidêncio <fidencio@redhat.com>
12
13 tests,test-gconfig: Check _domain_os_get_machine()
14 Let's add one more simple check for gvir_config_domain_os_get_machine().
15
16 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
17
18 gconfig: Add _domain_os_get_firmware()
19 Add a way to get the value of <os firmware="bios|efi"/> which has been
20 set to the domain XML.
21
22 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23
24 2019-08-19 Daniel P. Berrangé <berrange@redhat.com>
25
26 Set desired glib min/max API versions
27 Setting GLIB_VERSION_MAX_ALLOWED ensures we get warnings if
28 we use APIs that are newer than our declared minimum glib
29 version.
30
31 Setting GLIB_VERSION_MIN_REQUIRED ensures that we get
32 warnings if we use APIs deprecated in versions preceeding
33 this.
34
35 If the latter is omitted then we get warnings for all
36 deprecations in glib, which is undesirable if we want to
37 keep compat with older versions.
38
39 This avoids a build error with latest glib
40
41 ./../libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c: In function 'gvir_config_capabilities_cpu_model_init':
42 ../../libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c:44:13: error: G_ADD_PRIVATE [-Werror]
43 44 | model->priv = GVIR_CONFIG_CAPABILITIES_CPU_MODEL_GET_PRIVATE(model);
44 | ^~~~~~~~~~~~~~~
45
46 Caused by G_TYPE_INSTANCE_GET_PRIVATE being deprecated.
47
48 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
49
50 gobject: remove use of G_PARAM_PRIVATE
51 This enum field is a deprecated synonym for G_PARAM_STATIC_NAME
52 which is already set by G_PARAM_STATIC_STRINGS.
53
54 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
55
56 2019-05-27 Fabiano Fidêncio <fidencio@redhat.com>
57
58 gtk-doc.make: Remove the file
59 Now that we're using gtkdocisze as part of autogen.sh, there's no reason
60 to keep our own gtk-doc.make file.
61
62 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
63
64 autogen.sh: Simplify autogen.sh
65 Let's use an autogen.sh based on libosinfo's one, which is cleaner and
66 matches the current GNOME guidelines.
67
68 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
69
70 docs: explicitly link against libvirt-g{config,lib,object}
71 Let's explicitly link against the built libvirt-gconfig, libvirt-glib,
72 and libvirt-gobject libtool files for introspecting the gobjects.
73
74 In case it's *not* done we can run into some issues when where we try to
75 link against installed library, causing failures related to undefined
76 reference of the new symbols.
77
78 Reviewed-by: Andrea Bolognani <abologna@redhat.com>
79
80 2019-05-23 Fabiano Fidêncio <fidencio@redhat.com>
81
82 event-test: Change sha-bang line to use python3
83 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
84 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
85
86 event-test: Handle exceptions in a py3 compatible way
87 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
88 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
89
90 event-test: Use print() in a py3 compatible way
91 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
92 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
93
94 event-test: Ensure the right versions of LibvirtGLib and Gtk get loaded
95 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
96 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
97
98 event-test: Don't use ";" in the end of lines
99 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
100 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
101
102 event-test: LibvirtGLib.init() takes (at maximum) 1 argment
103 The previous behaviour with pygobject required 2 arguments to be passed
104 to LibvirtGLib.init().
105
106 As it's been changed, whenever we try to run event-test we'd get:
107 ```
108 Using uri:qemu:///system
109 Traceback (most recent call last):
110 File "event-test.py", line 62, in <module>
111 main()
112 File "event-test.py", line 51, in main
113 LibvirtGLib.init(0, "")
114 TypeError: LibvirtGLib.init() takes exactly 1 argument (2 given)
115 ```
116
117 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
118 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
119
120 2019-05-20 Fabiano Fidêncio <fidencio@redhat.com>
121
122 conn-test: Change sha-bang line to use python3
123 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
124 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
125
126 conn-test: Handle exceptions in a py3 compatible way
127 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
128 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
129
130 conn-test: Use print() in a py3 compatible way
131 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
132 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
133
134 conn-test: Ensure the right versions of LibvirtGObject and Gtk get loaded
135 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
136 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
137
138 conn-test: Don't use ";" in the end of lines
139 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
140 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
141
142 config-demo: Change sha-bang line to use python3
143 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
144 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
145
146 config-demo: Use octal when setting mode
147 Basically, just change 0744 to 0o744 in order to be compatible with
148 python3.
149
150 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
151 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
152
153 config-demo: Use print() in a py3 compatible way
154 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
155 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
156
157 config-demo: Ensure the right LibvirtGConfig version gets loaded
158 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
159 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
160
161 config-demo: Don't use ";" in the end of lines
162 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
163 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
164
165 gobject: Wrap virConnectGetDomainCapabilities()
166 In order to do so, 3 new APIs have been added:
167 - gvir_connection_get_domain_capabilities();
168 - gvir_connection_get_domain_capabilities_async();
169 - gvir_connection_get_domain_capabilities_finish();
170
171 The returned object is a GVirConfigDomainCapabilities, from which
172 consumers will be able to access a few other objects representing the
173 XML returned by virConnectGetDomainCapabilities().
174
175 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
176
177 tests: Add basic test for domain capabilities
178 This basic test only ensures that we can properly parse:
179 <domainCapabilities>
180 <os>
181 <enum name="firmeware">
182 <value>bios</value>
183 <value>efi</value>
184 </enum>
185 </os>
186 </domainCapabilities>
187
188 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
189
190 gconfig: Add _domain_capabilities_os_get_firmwares()
191 Add a way to access the <enum name="firmware"/> element's conent from
192 <os/>.
193
194 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
195
196 gconfig: Add _domain_capabilities_get_os()
197 Add a way to access the object which represents the <os/> element from
198 the <domainCapabilities/>.
199
200 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
201
202 gconfig: Add GVirConfigDomainCapabilitiesOs
203 GVirConfigDomainCapabilitiesOs object has been introduced in order to
204 represent the <os/> element under <domainCapabilities/>.
205
206 For now it's not used anywhere, but it's addition allows us to start
207 building the needed machinery for:
208 - Returning a representation os <os/> element;
209 - Having the most basic machinery to start adding functions to return
210 any child element we may need to query from <os/> element;
211
212 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
213
214 gconfig: Add GVirConfigDomainCapabilities
215 GVirConfigDomainCapabilities object has been introduced in order to
216 represent the output of virConnectGetDomainCapabilities().
217
218 For now it's not used anywhere, but its addition allows us to start
219 building the needed machinery for:
220 - Creating a wrapper around virConnectGetDomainCapabilities();
221 - Creating new objects that will be used to return each of the elements
222 present in the output of virConnectGetDomainCapabilities(),
223 accordingly to the consumers of this library's need;
224
225 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
226
227 gobject: Use the proper return type in _connection_get_capabilities_finish()
228 Instead of returning FALSE, return NULL.
229
230 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
231
232 gconfig: Add _domain_os_set_firmware()
233 Add a way to set <os firmware="bios|efi"/> to the domain XML.
234
235 Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
236
237 2019-02-20 Daniel P. Berrangé <berrange@redhat.com>
238
239 po: refresh translations from zanata
240
241 po: minimize uk ur vi wba yo zh_CN zh_HK zh_TW zu
242
243 po: minimize sq sr@latin sr sv ta te tg th tr tw
244
245 po: minimize or pa pl pt_BR pt ro ru si sk sl
246
247 po: minimize mn mr ms nb nds ne nl nn nso
248
249 po: minimize kw_GB kw@kkcor kw kw@uccor ky lt lv mai mk ml
250
251 po: minimize id ilo is it ja ka kk km kn ko
252
253 po: minimize fr gl gu he hi hr hu ia
254
255 po: minimize de el en_GB eo es et eu fa fi
256
257 po: minimize bn bo br brx bs ca cs cy da de_CH
258
259 po: minimize af am anp ar as ast bal be bg bn_IN
260
261 po: minimize & canonicalize translations stored in git
262 Similar to the libvirt-glib.pot, .po files contain line numbers and file
263 names identifying where in the source a translatable string comes from.
264 The source locations in the .po files are thrown away and replaced with
265 content from the libvirt-glib.pot whenever msgmerge is run, so this is not
266 precious information that needs to be stored in git.
267
268 When msgmerge processes a .po file, it will add in any msgids from the
269 libvirt-glib.pot that were not already present. Thus, if a particular msgid
270 currently has no translation, it can be considered redundant and again
271 does not need storing in git.
272
273 When msgmerge processes a .po file and can't find an exact existing
274 translation match, it will try todo fuzzy matching instead, marking such
275 entries with a "# fuzzy" comment to alert the translator to take a
276 look and either discard, edit or accept the match. Looking at the
277 existing fuzzy matches in .po files shows that the quality is awful,
278 with many having a completely different set of printf format specifiers
279 between the msgid and fuzzy msgstr entry. Fortunately when msgfmt
280 generates the .gmo, the fuzzy entries are all ignored anyway. The fuzzy
281 entries could be useful to translators if they were working on the .po
282 files directly from git, but Libvirt-Glib outsourced translation to the
283 Fedora Zanata system, so keeping fuzzy matches in git is not much help.
284
285 Finally, by default msgids are sorted based on source location. Thus, if
286 a bit of code with translatable text is moved from one file to another,
287 it may shift around in the .po file, despite the msgid not itself changing.
288 If the msgids were sorted alphabetically, the .po files would have
289 stable ordering when code is refactored.
290
291 This patch takes advantage of the above observations to canonicalize
292 and minimize the content stored for .po files in git. Instead of storing
293 the real .po files, we now store .mini.po files.
294
295 The .mini.po files are the same file format as .po files, but have no
296 source location comments, are sorted alphabetically, and all fuzzy
297 msgstrs and msgids with no translation are discarded. This cuts the size
298 of content in the po directory.
299
300 Users working from a libvirt-glib git checkout who need the full .po files
301 can run "make update-po", which merges the libvirt-glib.pot and .mini.po
302 file to create a .po file containing all the content previously stored
303 in git.
304
305 Conversely if a full .po file has been modified, for example, by
306 downloading new content from Zanata, the .mini.po files can be updated
307 by running "make update-mini-po". The resulting diffs of the .mini.po
308 file will clearly show the changed translations without any of the noise
309 that previously obscured content. Being able to see content changes
310 clearly actually identified a bug in the zanata python client where it
311 was adding bogus "fuzzy" annotations to many messages:
312
313 https://bugzilla.redhat.com/show_bug.cgi?id=1564497
314
315 Users working from libvirt-glib releases should not see any difference in
316 behaviour, since the tarballs only contain the full .po files, not the
317 .mini.po files.
318
319 As an added benefit, generating tarballs with "make dist", will no
320 longer cause creation of dirty files in git, since it won't touch the
321 .mini.po files, only the .po files which are no longer kept in git.
322
323 The languages are minimized in the following commit since it is a
324 large mechanical process.
325
326 po: add rules for integration with zanata
327 Add rules to handle pushing libvirt-glib.pot to zanata, and refreshing .po
328 files with new content from zanata.
329
330 po: remove language list from zanata configuration
331 The <locales> element in zanata.xml is no longer relevant as this info
332 is recorded server side.
333
334 po: provide custom make rules for po file management
335 Historically we have relied on intltool to install a standard
336 po/Makefile.in.in which has very limited scope for customization.
337 intltool is deprecated in favour of standard gettextize tools,
338 but these share the same disadvantages.
339
340 Writing make rules for po file management is no more difficult
341 than any other rules libvirt-glib has, so stop using intltool
342 and don't use gettextize ether.
343
344 2019-02-14 Christophe Fergeau <cfergeau@redhat.com>
345
346 events: Mark 'eventlock' as static
347 It's not used outside of the libvirt-glib-event.c file, so there is no
348 good reason for not having it static. As it was not listed in
349 libvirt-glib.sym, this will make no change to the publicly exported
350 symbols (ie this is not an ABI change).
351
352 Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
353
354 object: Fix gvir_connection_create_storage_pool() leak
355 We need to free the string returned by gvir_config_object_to_xml() after
356 using it.
357
358 Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
359
360 config: Fix gvir_config_xml_node_to_string() leak
361 If xmlNodeDump() fails, we would be leaking the xmlBuffer we created.
362 This commit ensures we don't return early before this buffer is freed.
363
364 Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
365
366 2019-02-12 Christophe Fergeau <cfergeau@redhat.com>
367
368 gconfig: Add gvir_config_storage_vol_target_set_features
369 Only one feature is supported at the moment, 'lazy refcount'
370
371 Reviewed-by: Cole Robinson <crobinso@redhat.com>
372
0373 2018-10-12 Daniel P. Berrangé <berrange@redhat.com>
1374
2375 Bump version to 2.0.0 for new release
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
0 # Makefile.in generated by automake 1.16.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2018 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
9090 subdir = .
9191 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
9292 am__aclocal_m4_deps = $(top_srcdir)/m4/glibtests.m4 \
93 $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \
94 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
95 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
96 $(top_srcdir)/m4/manywarnings.m4 \
93 $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/introspection.m4 \
94 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
95 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
96 $(top_srcdir)/m4/lt~obsolete.m4 \
97 $(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/pkg.m4 \
9798 $(top_srcdir)/m4/virt-compile-warnings.m4 \
98 $(top_srcdir)/m4/virt-gettext.m4 $(top_srcdir)/m4/warnings.m4 \
99 $(top_srcdir)/m4/virt-nls.m4 $(top_srcdir)/m4/warnings.m4 \
99100 $(top_srcdir)/configure.ac
100101 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
101102 $(ACLOCAL_M4)
172173 $(RECURSIVE_CLEAN_TARGETS) \
173174 $(am__extra_recursive_targets)
174175 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
175 cscope distdir dist dist-all distcheck
176 cscope distdir distdir-am dist dist-all distcheck
176177 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
177178 $(LISP)config.h.in
178179 # Read a list of newline-separated strings from the standard input,
253254 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
254255 distcleancheck_listfiles = find . -type f -print
255256 ACLOCAL = @ACLOCAL@
256 ALL_LINGUAS = @ALL_LINGUAS@
257257 AMTAR = @AMTAR@
258258 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
259259 AR = @AR@
284284 EGREP = @EGREP@
285285 EXEEXT = @EXEEXT@
286286 FGREP = @FGREP@
287 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
288287 GIO2_CFLAGS = @GIO2_CFLAGS@
289288 GIO2_LIBS = @GIO2_LIBS@
290289 GLIB2_CFLAGS = @GLIB2_CFLAGS@
291290 GLIB2_LIBS = @GLIB2_LIBS@
292291 GLIB2_REQUIRED = @GLIB2_REQUIRED@
292 GLIB2_VERSION_SYMBOL = @GLIB2_VERSION_SYMBOL@
293293 GLIB_MKENUMS = @GLIB_MKENUMS@
294 GMSGFMT = @GMSGFMT@
295294 GOBJECT2_CFLAGS = @GOBJECT2_CFLAGS@
296295 GOBJECT2_LIBS = @GOBJECT2_LIBS@
297296 GREP = @GREP@
309308 INSTALL_PROGRAM = @INSTALL_PROGRAM@
310309 INSTALL_SCRIPT = @INSTALL_SCRIPT@
311310 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
312 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
313 INTLTOOL_MERGE = @INTLTOOL_MERGE@
314 INTLTOOL_PERL = @INTLTOOL_PERL@
315 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
316 INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
317 INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
318 INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
319 INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
320311 INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
321312 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
322313 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
374365 SET_MAKE = @SET_MAKE@
375366 SHELL = @SHELL@
376367 STRIP = @STRIP@
377 USE_NLS = @USE_NLS@
378368 VAPIGEN = @VAPIGEN@
379369 VERSION = @VERSION@
380370 WARN_CFLAGS = @WARN_CFLAGS@
414404 install_sh = @install_sh@
415405 installed_test_metadir = @installed_test_metadir@
416406 installed_testdir = @installed_testdir@
417 intltool__v_merge_options_ = @intltool__v_merge_options_@
418 intltool__v_merge_options_0 = @intltool__v_merge_options_0@
419407 libdir = @libdir@
420408 libexecdir = @libexecdir@
421409 localedir = @localedir@
480468 echo ' $(SHELL) ./config.status'; \
481469 $(SHELL) ./config.status;; \
482470 *) \
483 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
484 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
471 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
472 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
485473 esac;
486474
487475 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
654642 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
655643 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
656644
657 distdir: $(DISTFILES)
645 distdir: $(BUILT_SOURCES)
646 $(MAKE) $(AM_MAKEFLAGS) distdir-am
647
648 distdir-am: $(DISTFILES)
658649 $(am__remove_distdir)
659650 test -d "$(distdir)" || mkdir "$(distdir)"
660651 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
00 libvirt-glib News
11 =================
2
3 3.0.0 - Nov 26, 2019
4 ====================
5
6 - Add support for bochs video device
7 - Add API to query firmware config
8 - Improve testing coverage
9 - Validate min/max glib API versions in use
10 - Remove deprecated G_PARAM_PRIVATE
11 - Fix docs build linking problems
12 - Convert python demos to be python 3 compatible & use
13 modern best practice for pyobject introspection bindings
14 - Add API to query domain capaibilities
15 - Refresh translations
16 - Simplify build process for handling translations
17 - Fix some memory leaks
18 - Add API for setting storage volume features
19
220
321 2.0.0 - Oct 12, 2018
422 ====================
0 # generated automatically by aclocal 1.15.1 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
0 # generated automatically by aclocal 1.16.1 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
33
44 # This file is free software; the Free Software Foundation
55 # gives unlimited permission to copy and/or distribute it,
1919 If you have problems, you may need to regenerate the build system entirely.
2020 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
2121
22 # -*- mode: autoconf -*-
23 #
24 # gtk-doc.m4 - configure macro to check for gtk-doc
25 # Copyright (C) 2003 James Henstridge
26 # 2007-2017 Stefan Sauer
27 #
28 # This program is free software: you can redistribute it and/or modify
29 # it under the terms of the GNU General Public License as published by
30 # the Free Software Foundation, either version 3 of the License, or
31 # (at your option) any later version.
32 #
33 # This program is distributed in the hope that it will be useful,
34 # but WITHOUT ANY WARRANTY; without even the implied warranty of
35 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 # GNU General Public License for more details.
37 #
38 # You should have received a copy of the GNU General Public License
39 # along with this program. If not, see <http://www.gnu.org/licenses/>.
40 #
41 # As a special exception, the above copyright owner gives unlimited
42 # permission to copy, distribute and modify the configure scripts that
43 # are the output of Autoconf when processing the Macro. You need not
44 # follow the terms of the GNU General Public License when using or
45 # distributing such scripts, even though portions of the text of the
46 # Macro appear in them. The GNU General Public License (GPL) does govern
47 # all other use of the material that constitutes the Autoconf Macro.
48
49 # serial 2
50
51 dnl Usage:
52 dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
53 AC_DEFUN([GTK_DOC_CHECK],
54 [
55 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
56 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
57 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
58
59 ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
60 AC_MSG_CHECKING([for gtk-doc])
61 PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
62 AC_MSG_RESULT($have_gtk_doc)
63
64 if test "$have_gtk_doc" = "no"; then
65 AC_MSG_WARN([
66 You will not be able to create source packages with 'make dist'
67 because $gtk_doc_requires is not found.])
68 fi
69
70 dnl check for tools we added during development
71 dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
72 dnl may not be writable by the user. Currently, automake requires that the
73 dnl test name must end in '.test'.
74 dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638
75 AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test])
76 AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check])
77 AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
78 AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
79
80 dnl for overriding the documentation installation directory
81 AC_ARG_WITH([html-dir],
82 AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
83 [with_html_dir='${datadir}/gtk-doc/html'])
84 HTML_DIR="$with_html_dir"
85 AC_SUBST([HTML_DIR])
86
87 dnl enable/disable documentation building
88 AC_ARG_ENABLE([gtk-doc],
89 AS_HELP_STRING([--enable-gtk-doc],
90 [use gtk-doc to build documentation [[default=no]]]),,
91 [enable_gtk_doc=no])
92
93 AC_MSG_CHECKING([whether to build gtk-doc documentation])
94 AC_MSG_RESULT($enable_gtk_doc)
95
96 if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
97 AC_MSG_ERROR([
98 You must have $gtk_doc_requires installed to build documentation for
99 $PACKAGE_NAME. Please install gtk-doc or disable building the
100 documentation by adding '--disable-gtk-doc' to '[$]0'.])
101 fi
102
103 dnl don't check for glib if we build glib
104 if test "x$PACKAGE_NAME" != "xglib"; then
105 dnl don't fail if someone does not have glib
106 PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:])
107 fi
108
109 dnl enable/disable output formats
110 AC_ARG_ENABLE([gtk-doc-html],
111 AS_HELP_STRING([--enable-gtk-doc-html],
112 [build documentation in html format [[default=yes]]]),,
113 [enable_gtk_doc_html=yes])
114 AC_ARG_ENABLE([gtk-doc-pdf],
115 AS_HELP_STRING([--enable-gtk-doc-pdf],
116 [build documentation in pdf format [[default=no]]]),,
117 [enable_gtk_doc_pdf=no])
118
119 if test -z "$GTKDOC_MKPDF"; then
120 enable_gtk_doc_pdf=no
121 fi
122
123 if test -z "$AM_DEFAULT_VERBOSITY"; then
124 AM_DEFAULT_VERBOSITY=1
125 fi
126 AC_SUBST([AM_DEFAULT_VERBOSITY])
127
128 AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes])
129 AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
130 AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
131 AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
132 AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
133 AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
134 ])
135
136 dnl -*- mode: autoconf -*-
137 dnl Copyright 2009 Johan Dahlin
138 dnl
139 dnl This file is free software; the author(s) gives unlimited
140 dnl permission to copy and/or distribute it, with or without
141 dnl modifications, as long as this notice is preserved.
142 dnl
143
144 # serial 1
145
146 m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
147 [
148 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
149 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
150 AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
151
152 dnl enable/disable introspection
153 m4_if([$2], [require],
154 [dnl
155 enable_introspection=yes
156 ],[dnl
157 AC_ARG_ENABLE(introspection,
158 AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
159 [Enable introspection for this build]),,
160 [enable_introspection=auto])
161 ])dnl
162
163 AC_MSG_CHECKING([for gobject-introspection])
164
165 dnl presence/version checking
166 AS_CASE([$enable_introspection],
167 [no], [dnl
168 found_introspection="no (disabled, use --enable-introspection to enable)"
169 ],dnl
170 [yes],[dnl
171 PKG_CHECK_EXISTS([gobject-introspection-1.0],,
172 AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
173 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
174 found_introspection=yes,
175 AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
176 ],dnl
177 [auto],[dnl
178 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
179 dnl Canonicalize enable_introspection
180 enable_introspection=$found_introspection
181 ],dnl
182 [dnl
183 AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
184 ])dnl
185
186 AC_MSG_RESULT([$found_introspection])
187
188 INTROSPECTION_SCANNER=
189 INTROSPECTION_COMPILER=
190 INTROSPECTION_GENERATE=
191 INTROSPECTION_GIRDIR=
192 INTROSPECTION_TYPELIBDIR=
193 if test "x$found_introspection" = "xyes"; then
194 INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
195 INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
196 INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
197 INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
198 INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
199 INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
200 INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
201 INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
202 fi
203 AC_SUBST(INTROSPECTION_SCANNER)
204 AC_SUBST(INTROSPECTION_COMPILER)
205 AC_SUBST(INTROSPECTION_GENERATE)
206 AC_SUBST(INTROSPECTION_GIRDIR)
207 AC_SUBST(INTROSPECTION_TYPELIBDIR)
208 AC_SUBST(INTROSPECTION_CFLAGS)
209 AC_SUBST(INTROSPECTION_LIBS)
210 AC_SUBST(INTROSPECTION_MAKEFILE)
211
212 AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
213 ])
214
215
216 dnl Usage:
217 dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
218
219 AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
220 [
221 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
222 ])
223
224 dnl Usage:
225 dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
226
227
228 AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
229 [
230 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
231 ])
232
233 # nls.m4 serial 5 (gettext-0.18)
234 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
235 dnl Foundation, Inc.
236 dnl This file is free software; the Free Software Foundation
237 dnl gives unlimited permission to copy and/or distribute it,
238 dnl with or without modifications, as long as this notice is preserved.
239 dnl
240 dnl This file can be used in projects which are not available under
241 dnl the GNU General Public License or the GNU Library General Public
242 dnl License but which still want to provide support for the GNU gettext
243 dnl functionality.
244 dnl Please note that the actual code of the GNU gettext library is covered
245 dnl by the GNU Library General Public License, and the rest of the GNU
246 dnl gettext package is covered by the GNU General Public License.
247 dnl They are *not* in the public domain.
248
249 dnl Authors:
250 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
251 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
252
253 AC_PREREQ([2.50])
254
255 AC_DEFUN([AM_NLS],
256 [
257 AC_MSG_CHECKING([whether NLS is requested])
258 dnl Default is enabled NLS
259 AC_ARG_ENABLE([nls],
260 [ --disable-nls do not use Native Language Support],
261 USE_NLS=$enableval, USE_NLS=yes)
262 AC_MSG_RESULT([$USE_NLS])
263 AC_SUBST([USE_NLS])
264 ])
265
266 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
267 # serial 11 (pkg-config-0.29.1)
268
269 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
270 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
271 dnl
272 dnl This program is free software; you can redistribute it and/or modify
273 dnl it under the terms of the GNU General Public License as published by
274 dnl the Free Software Foundation; either version 2 of the License, or
275 dnl (at your option) any later version.
276 dnl
277 dnl This program is distributed in the hope that it will be useful, but
278 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
279 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
280 dnl General Public License for more details.
281 dnl
282 dnl You should have received a copy of the GNU General Public License
283 dnl along with this program; if not, write to the Free Software
284 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
285 dnl 02111-1307, USA.
286 dnl
287 dnl As a special exception to the GNU General Public License, if you
288 dnl distribute this file as part of a program that contains a
289 dnl configuration script generated by Autoconf, you may include it under
290 dnl the same distribution terms that you use for the rest of that
291 dnl program.
292
293 dnl PKG_PREREQ(MIN-VERSION)
294 dnl -----------------------
295 dnl Since: 0.29
296 dnl
297 dnl Verify that the version of the pkg-config macros are at least
298 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
299 dnl installed version of pkg-config, this checks the developer's version
300 dnl of pkg.m4 when generating configure.
301 dnl
302 dnl To ensure that this macro is defined, also add:
303 dnl m4_ifndef([PKG_PREREQ],
304 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
305 dnl
306 dnl See the "Since" comment for each macro you use to see what version
307 dnl of the macros you require.
308 m4_defun([PKG_PREREQ],
309 [m4_define([PKG_MACROS_VERSION], [0.29.1])
310 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
311 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
312 ])dnl PKG_PREREQ
313
314 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
315 dnl ----------------------------------
316 dnl Since: 0.16
317 dnl
318 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
319 dnl first found in the path. Checks that the version of pkg-config found
320 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
321 dnl used since that's the first version where most current features of
322 dnl pkg-config existed.
323 AC_DEFUN([PKG_PROG_PKG_CONFIG],
324 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
325 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
326 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
327 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
328 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
329 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
330
331 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
332 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
333 fi
334 if test -n "$PKG_CONFIG"; then
335 _pkg_min_version=m4_default([$1], [0.9.0])
336 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
337 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
338 AC_MSG_RESULT([yes])
339 else
340 AC_MSG_RESULT([no])
341 PKG_CONFIG=""
342 fi
343 fi[]dnl
344 ])dnl PKG_PROG_PKG_CONFIG
345
346 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
347 dnl -------------------------------------------------------------------
348 dnl Since: 0.18
349 dnl
350 dnl Check to see whether a particular set of modules exists. Similar to
351 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
352 dnl
353 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
354 dnl only at the first occurence in configure.ac, so if the first place
355 dnl it's called might be skipped (such as if it is within an "if", you
356 dnl have to call PKG_CHECK_EXISTS manually
357 AC_DEFUN([PKG_CHECK_EXISTS],
358 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
359 if test -n "$PKG_CONFIG" && \
360 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
361 m4_default([$2], [:])
362 m4_ifvaln([$3], [else
363 $3])dnl
364 fi])
365
366 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
367 dnl ---------------------------------------------
368 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
369 dnl pkg_failed based on the result.
370 m4_define([_PKG_CONFIG],
371 [if test -n "$$1"; then
372 pkg_cv_[]$1="$$1"
373 elif test -n "$PKG_CONFIG"; then
374 PKG_CHECK_EXISTS([$3],
375 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
376 test "x$?" != "x0" && pkg_failed=yes ],
377 [pkg_failed=yes])
378 else
379 pkg_failed=untried
380 fi[]dnl
381 ])dnl _PKG_CONFIG
382
383 dnl _PKG_SHORT_ERRORS_SUPPORTED
384 dnl ---------------------------
385 dnl Internal check to see if pkg-config supports short errors.
386 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
387 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
388 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
389 _pkg_short_errors_supported=yes
390 else
391 _pkg_short_errors_supported=no
392 fi[]dnl
393 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
394
395
396 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
397 dnl [ACTION-IF-NOT-FOUND])
398 dnl --------------------------------------------------------------
399 dnl Since: 0.4.0
400 dnl
401 dnl Note that if there is a possibility the first call to
402 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
403 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
404 AC_DEFUN([PKG_CHECK_MODULES],
405 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
406 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
407 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
408
409 pkg_failed=no
410 AC_MSG_CHECKING([for $1])
411
412 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
413 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
414
415 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
416 and $1[]_LIBS to avoid the need to call pkg-config.
417 See the pkg-config man page for more details.])
418
419 if test $pkg_failed = yes; then
420 AC_MSG_RESULT([no])
421 _PKG_SHORT_ERRORS_SUPPORTED
422 if test $_pkg_short_errors_supported = yes; then
423 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
424 else
425 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
426 fi
427 # Put the nasty error message in config.log where it belongs
428 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
429
430 m4_default([$4], [AC_MSG_ERROR(
431 [Package requirements ($2) were not met:
432
433 $$1_PKG_ERRORS
434
435 Consider adjusting the PKG_CONFIG_PATH environment variable if you
436 installed software in a non-standard prefix.
437
438 _PKG_TEXT])[]dnl
439 ])
440 elif test $pkg_failed = untried; then
441 AC_MSG_RESULT([no])
442 m4_default([$4], [AC_MSG_FAILURE(
443 [The pkg-config script could not be found or is too old. Make sure it
444 is in your PATH or set the PKG_CONFIG environment variable to the full
445 path to pkg-config.
446
447 _PKG_TEXT
448
449 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
450 ])
451 else
452 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
453 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
454 AC_MSG_RESULT([yes])
455 $3
456 fi[]dnl
457 ])dnl PKG_CHECK_MODULES
458
459
460 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
461 dnl [ACTION-IF-NOT-FOUND])
462 dnl ---------------------------------------------------------------------
463 dnl Since: 0.29
464 dnl
465 dnl Checks for existence of MODULES and gathers its build flags with
466 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
467 dnl and VARIABLE-PREFIX_LIBS from --libs.
468 dnl
469 dnl Note that if there is a possibility the first call to
470 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
471 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
472 dnl configure.ac.
473 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
474 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
475 _save_PKG_CONFIG=$PKG_CONFIG
476 PKG_CONFIG="$PKG_CONFIG --static"
477 PKG_CHECK_MODULES($@)
478 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
479 ])dnl PKG_CHECK_MODULES_STATIC
480
481
482 dnl PKG_INSTALLDIR([DIRECTORY])
483 dnl -------------------------
484 dnl Since: 0.27
485 dnl
486 dnl Substitutes the variable pkgconfigdir as the location where a module
487 dnl should install pkg-config .pc files. By default the directory is
488 dnl $libdir/pkgconfig, but the default can be changed by passing
489 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
490 dnl parameter.
491 AC_DEFUN([PKG_INSTALLDIR],
492 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
493 m4_pushdef([pkg_description],
494 [pkg-config installation directory @<:@]pkg_default[@:>@])
495 AC_ARG_WITH([pkgconfigdir],
496 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
497 [with_pkgconfigdir=]pkg_default)
498 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
499 m4_popdef([pkg_default])
500 m4_popdef([pkg_description])
501 ])dnl PKG_INSTALLDIR
502
503
504 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
505 dnl --------------------------------
506 dnl Since: 0.27
507 dnl
508 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
509 dnl module should install arch-independent pkg-config .pc files. By
510 dnl default the directory is $datadir/pkgconfig, but the default can be
511 dnl changed by passing DIRECTORY. The user can override through the
512 dnl --with-noarch-pkgconfigdir parameter.
513 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
514 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
515 m4_pushdef([pkg_description],
516 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
517 AC_ARG_WITH([noarch-pkgconfigdir],
518 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
519 [with_noarch_pkgconfigdir=]pkg_default)
520 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
521 m4_popdef([pkg_default])
522 m4_popdef([pkg_description])
523 ])dnl PKG_NOARCH_INSTALLDIR
524
525
526 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
527 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
528 dnl -------------------------------------------
529 dnl Since: 0.28
530 dnl
531 dnl Retrieves the value of the pkg-config variable for the given module.
532 AC_DEFUN([PKG_CHECK_VAR],
533 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
534 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
535
536 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
537 AS_VAR_COPY([$1], [pkg_cv_][$1])
538
539 AS_VAR_IF([$1], [""], [$5], [$4])dnl
540 ])dnl PKG_CHECK_VAR
541
542 dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
543 dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
544 dnl [DESCRIPTION], [DEFAULT])
545 dnl ------------------------------------------
546 dnl
547 dnl Prepare a "--with-" configure option using the lowercase
548 dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
549 dnl PKG_CHECK_MODULES in a single macro.
550 AC_DEFUN([PKG_WITH_MODULES],
551 [
552 m4_pushdef([with_arg], m4_tolower([$1]))
553
554 m4_pushdef([description],
555 [m4_default([$5], [build with ]with_arg[ support])])
556
557 m4_pushdef([def_arg], [m4_default([$6], [auto])])
558 m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
559 m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
560
561 m4_case(def_arg,
562 [yes],[m4_pushdef([with_without], [--without-]with_arg)],
563 [m4_pushdef([with_without],[--with-]with_arg)])
564
565 AC_ARG_WITH(with_arg,
566 AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
567 [AS_TR_SH([with_]with_arg)=def_arg])
568
569 AS_CASE([$AS_TR_SH([with_]with_arg)],
570 [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
571 [auto],[PKG_CHECK_MODULES([$1],[$2],
572 [m4_n([def_action_if_found]) $3],
573 [m4_n([def_action_if_not_found]) $4])])
574
575 m4_popdef([with_arg])
576 m4_popdef([description])
577 m4_popdef([def_arg])
578
579 ])dnl PKG_WITH_MODULES
580
581 dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
582 dnl [DESCRIPTION], [DEFAULT])
583 dnl -----------------------------------------------
584 dnl
585 dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
586 dnl check._[VARIABLE-PREFIX] is exported as make variable.
587 AC_DEFUN([PKG_HAVE_WITH_MODULES],
588 [
589 PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
590
591 AM_CONDITIONAL([HAVE_][$1],
592 [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
593 ])dnl PKG_HAVE_WITH_MODULES
594
595 dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
596 dnl [DESCRIPTION], [DEFAULT])
597 dnl ------------------------------------------------------
598 dnl
599 dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
600 dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
601 dnl and preprocessor variable.
602 AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
603 [
604 PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
605
606 AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
607 [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
608 ])dnl PKG_HAVE_DEFINE_WITH_MODULES
609
610 # Copyright (C) 2002-2017 Free Software Foundation, Inc.
22 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
61123 #
61224 # This file is free software; the Free Software Foundation
61325 # gives unlimited permission to copy and/or distribute it,
61931 # generated from the m4 files accompanying Automake X.Y.
62032 # (This private macro should not be called outside this file.)
62133 AC_DEFUN([AM_AUTOMAKE_VERSION],
622 [am__api_version='1.15'
34 [am__api_version='1.16'
62335 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
62436 dnl require some minimum version. Point them to the right macro.
625 m4_if([$1], [1.15.1], [],
37 m4_if([$1], [1.16.1], [],
62638 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
62739 ])
62840
63850 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
63951 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
64052 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
641 [AM_AUTOMAKE_VERSION([1.15.1])dnl
53 [AM_AUTOMAKE_VERSION([1.16.1])dnl
64254 m4_ifndef([AC_AUTOCONF_VERSION],
64355 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
64456 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
64557
64658 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
64759
648 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
60 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
64961 #
65062 # This file is free software; the Free Software Foundation
65163 # gives unlimited permission to copy and/or distribute it,
697109
698110 # AM_CONDITIONAL -*- Autoconf -*-
699111
700 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
112 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
701113 #
702114 # This file is free software; the Free Software Foundation
703115 # gives unlimited permission to copy and/or distribute it,
728140 Usually this means the macro was only invoked conditionally.]])
729141 fi])])
730142
731 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
143 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
732144 #
733145 # This file is free software; the Free Software Foundation
734146 # gives unlimited permission to copy and/or distribute it,
919331
920332 # Generate code to set up dependency tracking. -*- Autoconf -*-
921333
922 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
923 #
924 # This file is free software; the Free Software Foundation
925 # gives unlimited permission to copy and/or distribute it,
926 # with or without modifications, as long as this notice is preserved.
927
334 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
335 #
336 # This file is free software; the Free Software Foundation
337 # gives unlimited permission to copy and/or distribute it,
338 # with or without modifications, as long as this notice is preserved.
928339
929340 # _AM_OUTPUT_DEPENDENCY_COMMANDS
930341 # ------------------------------
933344 # Older Autoconf quotes --file arguments for eval, but not when files
934345 # are listed without --file. Let's play safe and only enable the eval
935346 # if we detect the quoting.
936 case $CONFIG_FILES in
937 *\'*) eval set x "$CONFIG_FILES" ;;
938 *) set x $CONFIG_FILES ;;
939 esac
347 # TODO: see whether this extra hack can be removed once we start
348 # requiring Autoconf 2.70 or later.
349 AS_CASE([$CONFIG_FILES],
350 [*\'*], [eval set x "$CONFIG_FILES"],
351 [*], [set x $CONFIG_FILES])
940352 shift
941 for mf
353 # Used to flag and report bootstrapping failures.
354 am_rc=0
355 for am_mf
942356 do
943357 # Strip MF so we end up with the name of the file.
944 mf=`echo "$mf" | sed -e 's/:.*$//'`
945 # Check whether this is an Automake generated Makefile or not.
946 # We used to match only the files named 'Makefile.in', but
947 # some people rename them; so instead we look at the file content.
948 # Grep'ing the first line is not enough: some people post-process
949 # each Makefile.in and add a new line on top of each file to say so.
950 # Grep'ing the whole file is not good either: AIX grep has a line
358 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
359 # Check whether this is an Automake generated Makefile which includes
360 # dependency-tracking related rules and includes.
361 # Grep'ing the whole file directly is not great: AIX grep has a line
951362 # limit of 2048, but all sed's we know have understand at least 4000.
952 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
953 dirpart=`AS_DIRNAME("$mf")`
954 else
955 continue
956 fi
957 # Extract the definition of DEPDIR, am__include, and am__quote
958 # from the Makefile without running 'make'.
959 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
960 test -z "$DEPDIR" && continue
961 am__include=`sed -n 's/^am__include = //p' < "$mf"`
962 test -z "$am__include" && continue
963 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
964 # Find all dependency output files, they are included files with
965 # $(DEPDIR) in their names. We invoke sed twice because it is the
966 # simplest approach to changing $(DEPDIR) to its actual value in the
967 # expansion.
968 for file in `sed -n "
969 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
970 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
971 # Make sure the directory exists.
972 test -f "$dirpart/$file" && continue
973 fdir=`AS_DIRNAME(["$file"])`
974 AS_MKDIR_P([$dirpart/$fdir])
975 # echo "creating $dirpart/$file"
976 echo '# dummy' > "$dirpart/$file"
977 done
363 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
364 || continue
365 am_dirpart=`AS_DIRNAME(["$am_mf"])`
366 am_filepart=`AS_BASENAME(["$am_mf"])`
367 AM_RUN_LOG([cd "$am_dirpart" \
368 && sed -e '/# am--include-marker/d' "$am_filepart" \
369 | $MAKE -f - am--depfiles]) || am_rc=$?
978370 done
371 if test $am_rc -ne 0; then
372 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
373 for automatic dependency tracking. Try re-running configure with the
374 '--disable-dependency-tracking' option to at least be able to build
375 the package (albeit without support for automatic dependency tracking).])
376 fi
377 AS_UNSET([am_dirpart])
378 AS_UNSET([am_filepart])
379 AS_UNSET([am_mf])
380 AS_UNSET([am_rc])
381 rm -f conftest-deps.mk
979382 }
980383 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
981384
984387 # -----------------------------
985388 # This macro should only be invoked once -- use via AC_REQUIRE.
986389 #
987 # This code is only required when automatic dependency tracking
988 # is enabled. FIXME. This creates each '.P' file that we will
989 # need in order to bootstrap the dependency handling code.
390 # This code is only required when automatic dependency tracking is enabled.
391 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
392 # order to bootstrap the dependency handling code.
990393 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
991394 [AC_CONFIG_COMMANDS([depfiles],
992395 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
993 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
994 ])
396 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
995397
996398 # Do all the work for Automake. -*- Autoconf -*-
997399
998 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
400 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
999401 #
1000402 # This file is free software; the Free Software Foundation
1001403 # gives unlimited permission to copy and/or distribute it,
1082484 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1083485 # For better backward compatibility. To be removed once Automake 1.9.x
1084486 # dies out for good. For more background, see:
1085 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1086 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
487 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
488 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1087489 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1088490 # We need awk for the "check" target (and possibly the TAP driver). The
1089491 # system "awk" is bad on some platforms.
1150552 Aborting the configuration process, to ensure you take notice of the issue.
1151553
1152554 You can download and install GNU coreutils to get an 'rm' implementation
1153 that behaves properly: <http://www.gnu.org/software/coreutils/>.
555 that behaves properly: <https://www.gnu.org/software/coreutils/>.
1154556
1155557 If you want to complete the configuration process using your problematic
1156558 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1192594 done
1193595 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1194596
1195 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
597 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
1196598 #
1197599 # This file is free software; the Free Software Foundation
1198600 # gives unlimited permission to copy and/or distribute it,
1213615 fi
1214616 AC_SUBST([install_sh])])
1215617
1216 # Copyright (C) 2003-2017 Free Software Foundation, Inc.
618 # Copyright (C) 2003-2018 Free Software Foundation, Inc.
1217619 #
1218620 # This file is free software; the Free Software Foundation
1219621 # gives unlimited permission to copy and/or distribute it,
1234636
1235637 # Check to see how 'make' treats includes. -*- Autoconf -*-
1236638
1237 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
639 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
1238640 #
1239641 # This file is free software; the Free Software Foundation
1240642 # gives unlimited permission to copy and/or distribute it,
1242644
1243645 # AM_MAKE_INCLUDE()
1244646 # -----------------
1245 # Check to see how make treats includes.
647 # Check whether make has an 'include' directive that can support all
648 # the idioms we need for our automatic dependency tracking code.
1246649 AC_DEFUN([AM_MAKE_INCLUDE],
1247 [am_make=${MAKE-make}
1248 cat > confinc << 'END'
650 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
651 cat > confinc.mk << 'END'
1249652 am__doit:
1250 @echo this is the am__doit target
653 @echo this is the am__doit target >confinc.out
1251654 .PHONY: am__doit
1252655 END
1253 # If we don't find an include directive, just comment out the code.
1254 AC_MSG_CHECKING([for style of include used by $am_make])
1255656 am__include="#"
1256657 am__quote=
1257 _am_result=none
1258 # First try GNU make style include.
1259 echo "include confinc" > confmf
1260 # Ignore all kinds of additional output from 'make'.
1261 case `$am_make -s -f confmf 2> /dev/null` in #(
1262 *the\ am__doit\ target*)
1263 am__include=include
1264 am__quote=
1265 _am_result=GNU
1266 ;;
1267 esac
1268 # Now try BSD make style include.
1269 if test "$am__include" = "#"; then
1270 echo '.include "confinc"' > confmf
1271 case `$am_make -s -f confmf 2> /dev/null` in #(
1272 *the\ am__doit\ target*)
1273 am__include=.include
1274 am__quote="\""
1275 _am_result=BSD
1276 ;;
1277 esac
1278 fi
1279 AC_SUBST([am__include])
1280 AC_SUBST([am__quote])
1281 AC_MSG_RESULT([$_am_result])
1282 rm -f confinc confmf
1283 ])
658 # BSD make does it like this.
659 echo '.include "confinc.mk" # ignored' > confmf.BSD
660 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
661 echo 'include confinc.mk # ignored' > confmf.GNU
662 _am_result=no
663 for s in GNU BSD; do
664 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
665 AS_CASE([$?:`cat confinc.out 2>/dev/null`],
666 ['0:this is the am__doit target'],
667 [AS_CASE([$s],
668 [BSD], [am__include='.include' am__quote='"'],
669 [am__include='include' am__quote=''])])
670 if test "$am__include" != "#"; then
671 _am_result="yes ($s style)"
672 break
673 fi
674 done
675 rm -f confinc.* confmf.*
676 AC_MSG_RESULT([${_am_result}])
677 AC_SUBST([am__include])])
678 AC_SUBST([am__quote])])
1284679
1285680 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1286681
1287 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
682 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
1288683 #
1289684 # This file is free software; the Free Software Foundation
1290685 # gives unlimited permission to copy and/or distribute it,
1323718
1324719 # Helper functions for option handling. -*- Autoconf -*-
1325720
1326 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
721 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
1327722 #
1328723 # This file is free software; the Free Software Foundation
1329724 # gives unlimited permission to copy and/or distribute it,
1352747 AC_DEFUN([_AM_IF_OPTION],
1353748 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1354749
1355 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
750 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
1356751 #
1357752 # This file is free software; the Free Software Foundation
1358753 # gives unlimited permission to copy and/or distribute it,
1399794 # For backward compatibility.
1400795 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1401796
1402 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
797 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
1403798 #
1404799 # This file is free software; the Free Software Foundation
1405800 # gives unlimited permission to copy and/or distribute it,
1418813
1419814 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1420815
1421 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
816 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
1422817 #
1423818 # This file is free software; the Free Software Foundation
1424819 # gives unlimited permission to copy and/or distribute it,
1499894 rm -f conftest.file
1500895 ])
1501896
1502 # Copyright (C) 2009-2017 Free Software Foundation, Inc.
897 # Copyright (C) 2009-2018 Free Software Foundation, Inc.
1503898 #
1504899 # This file is free software; the Free Software Foundation
1505900 # gives unlimited permission to copy and/or distribute it,
1559954 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1560955 ])
1561956
1562 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
957 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
1563958 #
1564959 # This file is free software; the Free Software Foundation
1565960 # gives unlimited permission to copy and/or distribute it,
1587982 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1588983 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1589984
1590 # Copyright (C) 2006-2017 Free Software Foundation, Inc.
985 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
1591986 #
1592987 # This file is free software; the Free Software Foundation
1593988 # gives unlimited permission to copy and/or distribute it,
16061001
16071002 # Check how to create a tarball. -*- Autoconf -*-
16081003
1609 # Copyright (C) 2004-2017 Free Software Foundation, Inc.
1004 # Copyright (C) 2004-2018 Free Software Foundation, Inc.
16101005 #
16111006 # This file is free software; the Free Software Foundation
16121007 # gives unlimited permission to copy and/or distribute it,
17381133 ]) # _AM_PROG_TAR
17391134
17401135 m4_include([m4/glibtests.m4])
1741 m4_include([m4/intltool.m4])
1136 m4_include([m4/gtk-doc.m4])
1137 m4_include([m4/introspection.m4])
17421138 m4_include([m4/libtool.m4])
17431139 m4_include([m4/ltoptions.m4])
17441140 m4_include([m4/ltsugar.m4])
17451141 m4_include([m4/ltversion.m4])
17461142 m4_include([m4/lt~obsolete.m4])
17471143 m4_include([m4/manywarnings.m4])
1144 m4_include([m4/pkg.m4])
17481145 m4_include([m4/virt-compile-warnings.m4])
1749 m4_include([m4/virt-gettext.m4])
1146 m4_include([m4/virt-nls.m4])
17501147 m4_include([m4/warnings.m4])
0 #!/bin/sh
0 #! /bin/sh
11 # Wrapper for compilers which do not understand '-c -o'.
22
3 scriptversion=2016-01-11.22; # UTC
4
5 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
66 # Written by Tom Tromey <tromey@cygnus.com>.
77 #
88 # This program is free software; you can redistribute it and/or modify
1616 # GNU General Public License for more details.
1717 #
1818 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # along with this program. If not, see <https://www.gnu.org/licenses/>.
2020
2121 # As a special exception to the GNU General Public License, if you
2222 # distribute this file as part of a program that contains a
339339 # Local Variables:
340340 # mode: shell-script
341341 # sh-indentation: 2
342 # eval: (add-hook 'write-file-hooks 'time-stamp)
342 # eval: (add-hook 'before-save-hook 'time-stamp)
343343 # time-stamp-start: "scriptversion="
344344 # time-stamp-format: "%:y-%02m-%02d.%02H"
345345 # time-stamp-time-zone: "UTC0"
0 #!/bin/sh
0 #! /bin/sh
11 # Attempt to guess a canonical system name.
2 # Copyright 1992-2017 Free Software Foundation, Inc.
3
4 timestamp='2017-08-08'
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-08-29'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
1414 # General Public License for more details.
1515 #
1616 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
1818 #
1919 # As a special exception to the GNU General Public License, if you
2020 # distribute this file as part of a program that contains a
2626 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
2727 #
2828 # You can get the latest version of this script from:
29 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
29 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
3030 #
3131 # Please send patches to <config-patches@gnu.org>.
3232
3838
3939 Output the configuration name of the system \`$me' is run on.
4040
41 Operation modes:
41 Options:
4242 -h, --help print this help, then exit
4343 -t, --time-stamp print date of last modification, then exit
4444 -v, --version print version number, then exit
4949 GNU config.guess ($timestamp)
5050
5151 Originally written by Per Bothner.
52 Copyright 1992-2017 Free Software Foundation, Inc.
52 Copyright 1992-2018 Free Software Foundation, Inc.
5353
5454 This is free software; see the source for copying conditions. There is NO
5555 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
8383 exit 1
8484 fi
8585
86 trap 'exit 1' 1 2 15
87
8886 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
8987 # compiler to aid in system detection is discouraged as it requires
9088 # temporary files to be created and, as you can see below, it is a
9593
9694 # Portable tmp directory creation inspired by the Autoconf team.
9795
98 set_cc_for_build='
99 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
100 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
101 : ${TMPDIR=/tmp} ;
102 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
103 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
104 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
105 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
106 dummy=$tmp/dummy ;
107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > $dummy.c ;
110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
112 CC_FOR_BUILD="$c"; break ;
113 fi ;
114 done ;
115 if test x"$CC_FOR_BUILD" = x ; then
116 CC_FOR_BUILD=no_compiler_found ;
117 fi
118 ;;
119 ,,*) CC_FOR_BUILD=$CC ;;
120 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
121 esac ; set_cc_for_build= ;'
96 tmp=
97 # shellcheck disable=SC2172
98 trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
99 trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
100
101 set_cc_for_build() {
102 : "${TMPDIR=/tmp}"
103 # shellcheck disable=SC2039
104 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
105 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
106 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
107 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
108 dummy=$tmp/dummy
109 case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
110 ,,) echo "int x;" > "$dummy.c"
111 for driver in cc gcc c89 c99 ; do
112 if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
113 CC_FOR_BUILD="$driver"
114 break
115 fi
116 done
117 if test x"$CC_FOR_BUILD" = x ; then
118 CC_FOR_BUILD=no_compiler_found
119 fi
120 ;;
121 ,,*) CC_FOR_BUILD=$CC ;;
122 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
123 esac
124 }
122125
123126 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
124127 # (ghazi@noc.rutgers.edu 1994-08-24)
125 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
128 if test -f /.attbin/uname ; then
126129 PATH=$PATH:/.attbin ; export PATH
127130 fi
128131
131134 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
132135 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133136
134 case "${UNAME_SYSTEM}" in
137 case "$UNAME_SYSTEM" in
135138 Linux|GNU|GNU/*)
136139 # If the system lacks a compiler, then just pick glibc.
137140 # We could probably try harder.
138141 LIBC=gnu
139142
140 eval $set_cc_for_build
141 cat <<-EOF > $dummy.c
143 set_cc_for_build
144 cat <<-EOF > "$dummy.c"
142145 #include <features.h>
143146 #if defined(__UCLIBC__)
144147 LIBC=uclibc
148151 LIBC=gnu
149152 #endif
150153 EOF
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
154 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
155
156 # If ldd exists, use it to detect musl libc.
157 if command -v ldd >/dev/null && \
158 ldd --version 2>&1 | grep -q ^musl
159 then
160 LIBC=musl
161 fi
152162 ;;
153163 esac
154164
155165 # Note: order is significant - the case branches are not exclusive.
156166
157 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
167 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
158168 *:NetBSD:*:*)
159169 # NetBSD (nbsd) targets should (where applicable) match one or
160170 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
168178 # portion of the name. We always set it to "unknown".
169179 sysctl="sysctl -n hw.machine_arch"
170180 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
171 /sbin/$sysctl 2>/dev/null || \
172 /usr/sbin/$sysctl 2>/dev/null || \
181 "/sbin/$sysctl" 2>/dev/null || \
182 "/usr/sbin/$sysctl" 2>/dev/null || \
173183 echo unknown)`
174 case "${UNAME_MACHINE_ARCH}" in
184 case "$UNAME_MACHINE_ARCH" in
175185 armeb) machine=armeb-unknown ;;
176186 arm*) machine=arm-unknown ;;
177187 sh3el) machine=shl-unknown ;;
178188 sh3eb) machine=sh-unknown ;;
179189 sh5el) machine=sh5le-unknown ;;
180190 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
191 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
192 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
193 machine="${arch}${endian}"-unknown
184194 ;;
185 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
195 *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
186196 esac
187197 # The Operating System including object format, if it has switched
188198 # to ELF recently (or will in the future) and ABI.
189 case "${UNAME_MACHINE_ARCH}" in
199 case "$UNAME_MACHINE_ARCH" in
190200 earm*)
191201 os=netbsdelf
192202 ;;
193203 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
194 eval $set_cc_for_build
204 set_cc_for_build
195205 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
196206 | grep -q __ELF__
197207 then
207217 ;;
208218 esac
209219 # Determine ABI tags.
210 case "${UNAME_MACHINE_ARCH}" in
220 case "$UNAME_MACHINE_ARCH" in
211221 earm*)
212222 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
213 abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
223 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
214224 ;;
215225 esac
216226 # The OS release
218228 # thus, need a distinct triplet. However, they do not need
219229 # kernel version information, so it can be replaced with a
220230 # suitable tag, in the style of linux-gnu.
221 case "${UNAME_VERSION}" in
231 case "$UNAME_VERSION" in
222232 Debian*)
223233 release='-gnu'
224234 ;;
225235 *)
226 release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
236 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
227237 ;;
228238 esac
229239 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
230240 # contains redundant information, the shorter form:
231241 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
232 echo "${machine}-${os}${release}${abi}"
242 echo "$machine-${os}${release}${abi-}"
233243 exit ;;
234244 *:Bitrig:*:*)
235245 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
236 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
246 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
237247 exit ;;
238248 *:OpenBSD:*:*)
239249 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
240 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
250 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
241251 exit ;;
242252 *:LibertyBSD:*:*)
243253 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
244 echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
254 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
255 exit ;;
256 *:MidnightBSD:*:*)
257 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
245258 exit ;;
246259 *:ekkoBSD:*:*)
247 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
260 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
248261 exit ;;
249262 *:SolidBSD:*:*)
250 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
263 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
251264 exit ;;
252265 macppc:MirBSD:*:*)
253 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
266 echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
254267 exit ;;
255268 *:MirBSD:*:*)
256 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
269 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
257270 exit ;;
258271 *:Sortix:*:*)
259 echo ${UNAME_MACHINE}-unknown-sortix
272 echo "$UNAME_MACHINE"-unknown-sortix
260273 exit ;;
261274 *:Redox:*:*)
262 echo ${UNAME_MACHINE}-unknown-redox
263 exit ;;
275 echo "$UNAME_MACHINE"-unknown-redox
276 exit ;;
277 mips:OSF1:*.*)
278 echo mips-dec-osf1
279 exit ;;
264280 alpha:OSF1:*:*)
265281 case $UNAME_RELEASE in
266282 *4.0)
312328 # A Tn.n version is a released field test version.
313329 # A Xn.n version is an unreleased experimental baselevel.
314330 # 1.2 uses "1.2" for uname -r.
315 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
331 echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
316332 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
317333 exitcode=$?
318334 trap '' 0
319335 exit $exitcode ;;
320 Alpha\ *:Windows_NT*:*)
321 # How do we know it's Interix rather than the generic POSIX subsystem?
322 # Should we change UNAME_MACHINE based on the output of uname instead
323 # of the specific Alpha model?
324 echo alpha-pc-interix
325 exit ;;
326 21064:Windows_NT:50:3)
327 echo alpha-dec-winnt3.5
328 exit ;;
329336 Amiga*:UNIX_System_V:4.0:*)
330337 echo m68k-unknown-sysv4
331338 exit ;;
332339 *:[Aa]miga[Oo][Ss]:*:*)
333 echo ${UNAME_MACHINE}-unknown-amigaos
340 echo "$UNAME_MACHINE"-unknown-amigaos
334341 exit ;;
335342 *:[Mm]orph[Oo][Ss]:*:*)
336 echo ${UNAME_MACHINE}-unknown-morphos
343 echo "$UNAME_MACHINE"-unknown-morphos
337344 exit ;;
338345 *:OS/390:*:*)
339346 echo i370-ibm-openedition
345352 echo powerpc-ibm-os400
346353 exit ;;
347354 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
348 echo arm-acorn-riscix${UNAME_RELEASE}
355 echo arm-acorn-riscix"$UNAME_RELEASE"
349356 exit ;;
350357 arm*:riscos:*:*|arm*:RISCOS:*:*)
351358 echo arm-unknown-riscos
372379 sparc) echo sparc-icl-nx7; exit ;;
373380 esac ;;
374381 s390x:SunOS:*:*)
375 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
382 echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
376383 exit ;;
377384 sun4H:SunOS:5.*:*)
378 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
385 echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
379386 exit ;;
380387 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
381 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
388 echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
382389 exit ;;
383390 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
384 echo i386-pc-auroraux${UNAME_RELEASE}
391 echo i386-pc-auroraux"$UNAME_RELEASE"
385392 exit ;;
386393 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
387 eval $set_cc_for_build
388 SUN_ARCH=i386
389 # If there is a compiler, see if it is configured for 64-bit objects.
390 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
391 # This test works for both compilers.
392 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
393 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
394 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
395 grep IS_64BIT_ARCH >/dev/null
396 then
397 SUN_ARCH=x86_64
398 fi
399 fi
400 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
394 UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
395 case `isainfo -b` in
396 32)
397 echo i386-pc-solaris2"$UNAME_REL"
398 ;;
399 64)
400 echo x86_64-pc-solaris2"$UNAME_REL"
401 ;;
402 esac
401403 exit ;;
402404 sun4*:SunOS:6*:*)
403405 # According to config.sub, this is the proper way to canonicalize
404406 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
405407 # it's likely to be more like Solaris than SunOS4.
406 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
408 echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
407409 exit ;;
408410 sun4*:SunOS:*:*)
409411 case "`/usr/bin/arch -k`" in
412414 ;;
413415 esac
414416 # Japanese Language versions have a version number like `4.1.3-JL'.
415 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
417 echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
416418 exit ;;
417419 sun3*:SunOS:*:*)
418 echo m68k-sun-sunos${UNAME_RELEASE}
420 echo m68k-sun-sunos"$UNAME_RELEASE"
419421 exit ;;
420422 sun*:*:4.2BSD:*)
421423 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
422 test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
424 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
423425 case "`/bin/arch`" in
424426 sun3)
425 echo m68k-sun-sunos${UNAME_RELEASE}
427 echo m68k-sun-sunos"$UNAME_RELEASE"
426428 ;;
427429 sun4)
428 echo sparc-sun-sunos${UNAME_RELEASE}
430 echo sparc-sun-sunos"$UNAME_RELEASE"
429431 ;;
430432 esac
431433 exit ;;
432434 aushp:SunOS:*:*)
433 echo sparc-auspex-sunos${UNAME_RELEASE}
435 echo sparc-auspex-sunos"$UNAME_RELEASE"
434436 exit ;;
435437 # The situation for MiNT is a little confusing. The machine name
436438 # can be virtually everything (everything which is not
441443 # MiNT. But MiNT is downward compatible to TOS, so this should
442444 # be no problem.
443445 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
444 echo m68k-atari-mint${UNAME_RELEASE}
446 echo m68k-atari-mint"$UNAME_RELEASE"
445447 exit ;;
446448 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
447 echo m68k-atari-mint${UNAME_RELEASE}
449 echo m68k-atari-mint"$UNAME_RELEASE"
448450 exit ;;
449451 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
450 echo m68k-atari-mint${UNAME_RELEASE}
452 echo m68k-atari-mint"$UNAME_RELEASE"
451453 exit ;;
452454 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
453 echo m68k-milan-mint${UNAME_RELEASE}
455 echo m68k-milan-mint"$UNAME_RELEASE"
454456 exit ;;
455457 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
456 echo m68k-hades-mint${UNAME_RELEASE}
458 echo m68k-hades-mint"$UNAME_RELEASE"
457459 exit ;;
458460 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
459 echo m68k-unknown-mint${UNAME_RELEASE}
461 echo m68k-unknown-mint"$UNAME_RELEASE"
460462 exit ;;
461463 m68k:machten:*:*)
462 echo m68k-apple-machten${UNAME_RELEASE}
464 echo m68k-apple-machten"$UNAME_RELEASE"
463465 exit ;;
464466 powerpc:machten:*:*)
465 echo powerpc-apple-machten${UNAME_RELEASE}
467 echo powerpc-apple-machten"$UNAME_RELEASE"
466468 exit ;;
467469 RISC*:Mach:*:*)
468470 echo mips-dec-mach_bsd4.3
469471 exit ;;
470472 RISC*:ULTRIX:*:*)
471 echo mips-dec-ultrix${UNAME_RELEASE}
473 echo mips-dec-ultrix"$UNAME_RELEASE"
472474 exit ;;
473475 VAX*:ULTRIX*:*:*)
474 echo vax-dec-ultrix${UNAME_RELEASE}
476 echo vax-dec-ultrix"$UNAME_RELEASE"
475477 exit ;;
476478 2020:CLIX:*:* | 2430:CLIX:*:*)
477 echo clipper-intergraph-clix${UNAME_RELEASE}
479 echo clipper-intergraph-clix"$UNAME_RELEASE"
478480 exit ;;
479481 mips:*:*:UMIPS | mips:*:*:RISCos)
480 eval $set_cc_for_build
481 sed 's/^ //' << EOF >$dummy.c
482 set_cc_for_build
483 sed 's/^ //' << EOF > "$dummy.c"
482484 #ifdef __cplusplus
483485 #include <stdio.h> /* for printf() prototype */
484486 int main (int argc, char *argv[]) {
487489 #endif
488490 #if defined (host_mips) && defined (MIPSEB)
489491 #if defined (SYSTYPE_SYSV)
490 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
492 printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
491493 #endif
492494 #if defined (SYSTYPE_SVR4)
493 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
495 printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
494496 #endif
495497 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
496 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
498 printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
497499 #endif
498500 #endif
499501 exit (-1);
500502 }
501503 EOF
502 $CC_FOR_BUILD -o $dummy $dummy.c &&
503 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
504 SYSTEM_NAME=`$dummy $dummyarg` &&
504 $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
505 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
506 SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
505507 { echo "$SYSTEM_NAME"; exit; }
506 echo mips-mips-riscos${UNAME_RELEASE}
508 echo mips-mips-riscos"$UNAME_RELEASE"
507509 exit ;;
508510 Motorola:PowerMAX_OS:*:*)
509511 echo powerpc-motorola-powermax
529531 AViiON:dgux:*:*)
530532 # DG/UX returns AViiON for all architectures
531533 UNAME_PROCESSOR=`/usr/bin/uname -p`
532 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
534 if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
533535 then
534 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
535 [ ${TARGET_BINARY_INTERFACE}x = x ]
536 if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
537 [ "$TARGET_BINARY_INTERFACE"x = x ]
536538 then
537 echo m88k-dg-dgux${UNAME_RELEASE}
539 echo m88k-dg-dgux"$UNAME_RELEASE"
538540 else
539 echo m88k-dg-dguxbcs${UNAME_RELEASE}
541 echo m88k-dg-dguxbcs"$UNAME_RELEASE"
540542 fi
541543 else
542 echo i586-dg-dgux${UNAME_RELEASE}
544 echo i586-dg-dgux"$UNAME_RELEASE"
543545 fi
544546 exit ;;
545547 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
556558 echo m68k-tektronix-bsd
557559 exit ;;
558560 *:IRIX*:*:*)
559 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
561 echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
560562 exit ;;
561563 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
562564 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
568570 if [ -x /usr/bin/oslevel ] ; then
569571 IBM_REV=`/usr/bin/oslevel`
570572 else
571 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
572 fi
573 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
573 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
574 fi
575 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
574576 exit ;;
575577 *:AIX:2:3)
576578 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
577 eval $set_cc_for_build
578 sed 's/^ //' << EOF >$dummy.c
579 set_cc_for_build
580 sed 's/^ //' << EOF > "$dummy.c"
579581 #include <sys/systemcfg.h>
580582
581583 main()
586588 exit(0);
587589 }
588590 EOF
589 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
591 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
590592 then
591593 echo "$SYSTEM_NAME"
592594 else
600602 exit ;;
601603 *:AIX:*:[4567])
602604 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
603 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
605 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
604606 IBM_ARCH=rs6000
605607 else
606608 IBM_ARCH=powerpc
609611 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
610612 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
611613 else
612 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
613 fi
614 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
614 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
615 fi
616 echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
615617 exit ;;
616618 *:AIX:*:*)
617619 echo rs6000-ibm-aix
618620 exit ;;
619 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
621 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
620622 echo romp-ibm-bsd4.4
621623 exit ;;
622624 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
623 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
625 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
624626 exit ;; # report: romp-ibm BSD 4.3
625627 *:BOSX:*:*)
626628 echo rs6000-bull-bosx
635637 echo m68k-hp-bsd4.4
636638 exit ;;
637639 9000/[34678]??:HP-UX:*:*)
638 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
639 case "${UNAME_MACHINE}" in
640 9000/31? ) HP_ARCH=m68000 ;;
641 9000/[34]?? ) HP_ARCH=m68k ;;
640 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
641 case "$UNAME_MACHINE" in
642 9000/31?) HP_ARCH=m68000 ;;
643 9000/[34]??) HP_ARCH=m68k ;;
642644 9000/[678][0-9][0-9])
643645 if [ -x /usr/bin/getconf ]; then
644646 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
645647 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
646 case "${sc_cpu_version}" in
648 case "$sc_cpu_version" in
647649 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
648650 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
649651 532) # CPU_PA_RISC2_0
650 case "${sc_kernel_bits}" in
652 case "$sc_kernel_bits" in
651653 32) HP_ARCH=hppa2.0n ;;
652654 64) HP_ARCH=hppa2.0w ;;
653655 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
654656 esac ;;
655657 esac
656658 fi
657 if [ "${HP_ARCH}" = "" ]; then
658 eval $set_cc_for_build
659 sed 's/^ //' << EOF >$dummy.c
659 if [ "$HP_ARCH" = "" ]; then
660 set_cc_for_build
661 sed 's/^ //' << EOF > "$dummy.c"
660662
661663 #define _HPUX_SOURCE
662664 #include <stdlib.h>
689691 exit (0);
690692 }
691693 EOF
692 (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
694 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
693695 test -z "$HP_ARCH" && HP_ARCH=hppa
694696 fi ;;
695697 esac
696 if [ ${HP_ARCH} = hppa2.0w ]
698 if [ "$HP_ARCH" = hppa2.0w ]
697699 then
698 eval $set_cc_for_build
700 set_cc_for_build
699701
700702 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
701703 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
714716 HP_ARCH=hppa64
715717 fi
716718 fi
717 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
719 echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
718720 exit ;;
719721 ia64:HP-UX:*:*)
720 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
721 echo ia64-hp-hpux${HPUX_REV}
722 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
723 echo ia64-hp-hpux"$HPUX_REV"
722724 exit ;;
723725 3050*:HI-UX:*:*)
724 eval $set_cc_for_build
725 sed 's/^ //' << EOF >$dummy.c
726 set_cc_for_build
727 sed 's/^ //' << EOF > "$dummy.c"
726728 #include <unistd.h>
727729 int
728730 main ()
747749 exit (0);
748750 }
749751 EOF
750 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
752 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
751753 { echo "$SYSTEM_NAME"; exit; }
752754 echo unknown-hitachi-hiuxwe2
753755 exit ;;
754 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
756 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
755757 echo hppa1.1-hp-bsd
756758 exit ;;
757759 9000/8??:4.3bsd:*:*)
760762 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
761763 echo hppa1.0-hp-mpeix
762764 exit ;;
763 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
765 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
764766 echo hppa1.1-hp-osf
765767 exit ;;
766768 hp8??:OSF1:*:*)
768770 exit ;;
769771 i*86:OSF1:*:*)
770772 if [ -x /usr/sbin/sysversion ] ; then
771 echo ${UNAME_MACHINE}-unknown-osf1mk
773 echo "$UNAME_MACHINE"-unknown-osf1mk
772774 else
773 echo ${UNAME_MACHINE}-unknown-osf1
775 echo "$UNAME_MACHINE"-unknown-osf1
774776 fi
775777 exit ;;
776778 parisc*:Lites*:*:*)
795797 echo c4-convex-bsd
796798 exit ;;
797799 CRAY*Y-MP:*:*:*)
798 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
800 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
799801 exit ;;
800802 CRAY*[A-Z]90:*:*:*)
801 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
803 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
802804 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
803805 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
804806 -e 's/\.[^.]*$/.X/'
805807 exit ;;
806808 CRAY*TS:*:*:*)
807 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
809 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
808810 exit ;;
809811 CRAY*T3E:*:*:*)
810 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
812 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
811813 exit ;;
812814 CRAY*SV1:*:*:*)
813 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
815 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
814816 exit ;;
815817 *:UNICOS/mp:*:*)
816 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
818 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
817819 exit ;;
818820 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
819821 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
820822 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
821 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
823 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
822824 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
823825 exit ;;
824826 5000:UNIX_System_V:4.*:*)
825827 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
826 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
828 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
827829 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
828830 exit ;;
829831 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
830 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
832 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
831833 exit ;;
832834 sparc*:BSD/OS:*:*)
833 echo sparc-unknown-bsdi${UNAME_RELEASE}
835 echo sparc-unknown-bsdi"$UNAME_RELEASE"
834836 exit ;;
835837 *:BSD/OS:*:*)
836 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
838 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
839 exit ;;
840 arm:FreeBSD:*:*)
841 UNAME_PROCESSOR=`uname -p`
842 set_cc_for_build
843 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
844 | grep -q __ARM_PCS_VFP
845 then
846 echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
847 else
848 echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
849 fi
837850 exit ;;
838851 *:FreeBSD:*:*)
839852 UNAME_PROCESSOR=`/usr/bin/uname -p`
840 case ${UNAME_PROCESSOR} in
853 case "$UNAME_PROCESSOR" in
841854 amd64)
842855 UNAME_PROCESSOR=x86_64 ;;
843856 i386)
844857 UNAME_PROCESSOR=i586 ;;
845858 esac
846 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
859 echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
847860 exit ;;
848861 i*:CYGWIN*:*)
849 echo ${UNAME_MACHINE}-pc-cygwin
862 echo "$UNAME_MACHINE"-pc-cygwin
850863 exit ;;
851864 *:MINGW64*:*)
852 echo ${UNAME_MACHINE}-pc-mingw64
865 echo "$UNAME_MACHINE"-pc-mingw64
853866 exit ;;
854867 *:MINGW*:*)
855 echo ${UNAME_MACHINE}-pc-mingw32
868 echo "$UNAME_MACHINE"-pc-mingw32
856869 exit ;;
857870 *:MSYS*:*)
858 echo ${UNAME_MACHINE}-pc-msys
859 exit ;;
860 i*:windows32*:*)
861 # uname -m includes "-pc" on this system.
862 echo ${UNAME_MACHINE}-mingw32
871 echo "$UNAME_MACHINE"-pc-msys
863872 exit ;;
864873 i*:PW*:*)
865 echo ${UNAME_MACHINE}-pc-pw32
874 echo "$UNAME_MACHINE"-pc-pw32
866875 exit ;;
867876 *:Interix*:*)
868 case ${UNAME_MACHINE} in
877 case "$UNAME_MACHINE" in
869878 x86)
870 echo i586-pc-interix${UNAME_RELEASE}
879 echo i586-pc-interix"$UNAME_RELEASE"
871880 exit ;;
872881 authenticamd | genuineintel | EM64T)
873 echo x86_64-unknown-interix${UNAME_RELEASE}
882 echo x86_64-unknown-interix"$UNAME_RELEASE"
874883 exit ;;
875884 IA64)
876 echo ia64-unknown-interix${UNAME_RELEASE}
885 echo ia64-unknown-interix"$UNAME_RELEASE"
877886 exit ;;
878887 esac ;;
879 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
880 echo i${UNAME_MACHINE}-pc-mks
881 exit ;;
882 8664:Windows_NT:*)
883 echo x86_64-pc-mks
884 exit ;;
885 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
886 # How do we know it's Interix rather than the generic POSIX subsystem?
887 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
888 # UNAME_MACHINE based on the output of uname instead of i386?
889 echo i586-pc-interix
890 exit ;;
891888 i*:UWIN*:*)
892 echo ${UNAME_MACHINE}-pc-uwin
889 echo "$UNAME_MACHINE"-pc-uwin
893890 exit ;;
894891 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
895892 echo x86_64-unknown-cygwin
896893 exit ;;
897 p*:CYGWIN*:*)
898 echo powerpcle-unknown-cygwin
899 exit ;;
900894 prep*:SunOS:5.*:*)
901 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
895 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
902896 exit ;;
903897 *:GNU:*:*)
904898 # the GNU system
905 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
899 echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
906900 exit ;;
907901 *:GNU/*:*:*)
908902 # other systems with GNU libc and userland
909 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
910 exit ;;
911 i*86:Minix:*:*)
912 echo ${UNAME_MACHINE}-pc-minix
903 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
904 exit ;;
905 *:Minix:*:*)
906 echo "$UNAME_MACHINE"-unknown-minix
913907 exit ;;
914908 aarch64:Linux:*:*)
915 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
909 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
916910 exit ;;
917911 aarch64_be:Linux:*:*)
918912 UNAME_MACHINE=aarch64_be
919 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
913 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
920914 exit ;;
921915 alpha:Linux:*:*)
922916 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
930924 esac
931925 objdump --private-headers /bin/sh | grep -q ld.so.1
932926 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
933 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
927 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
934928 exit ;;
935929 arc:Linux:*:* | arceb:Linux:*:*)
936 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
930 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
937931 exit ;;
938932 arm*:Linux:*:*)
939 eval $set_cc_for_build
933 set_cc_for_build
940934 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
941935 | grep -q __ARM_EABI__
942936 then
943 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
937 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
944938 else
945939 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
946940 | grep -q __ARM_PCS_VFP
947941 then
948 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
942 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
949943 else
950 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
944 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
951945 fi
952946 fi
953947 exit ;;
954948 avr32*:Linux:*:*)
955 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
949 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
956950 exit ;;
957951 cris:Linux:*:*)
958 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
952 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
959953 exit ;;
960954 crisv32:Linux:*:*)
961 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
955 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
962956 exit ;;
963957 e2k:Linux:*:*)
964 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
958 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
965959 exit ;;
966960 frv:Linux:*:*)
967 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
961 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
968962 exit ;;
969963 hexagon:Linux:*:*)
970 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
964 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
971965 exit ;;
972966 i*86:Linux:*:*)
973 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
967 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
974968 exit ;;
975969 ia64:Linux:*:*)
976 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
970 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
977971 exit ;;
978972 k1om:Linux:*:*)
979 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
973 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
980974 exit ;;
981975 m32r*:Linux:*:*)
982 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
976 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
983977 exit ;;
984978 m68*:Linux:*:*)
985 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
979 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
986980 exit ;;
987981 mips:Linux:*:* | mips64:Linux:*:*)
988 eval $set_cc_for_build
989 sed 's/^ //' << EOF >$dummy.c
982 set_cc_for_build
983 sed 's/^ //' << EOF > "$dummy.c"
990984 #undef CPU
991985 #undef ${UNAME_MACHINE}
992986 #undef ${UNAME_MACHINE}el
1000994 #endif
1001995 #endif
1002996 EOF
1003 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
1004 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
997 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
998 test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
1005999 ;;
10061000 mips64el:Linux:*:*)
1007 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1001 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10081002 exit ;;
10091003 openrisc*:Linux:*:*)
1010 echo or1k-unknown-linux-${LIBC}
1004 echo or1k-unknown-linux-"$LIBC"
10111005 exit ;;
10121006 or32:Linux:*:* | or1k*:Linux:*:*)
1013 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1007 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10141008 exit ;;
10151009 padre:Linux:*:*)
1016 echo sparc-unknown-linux-${LIBC}
1010 echo sparc-unknown-linux-"$LIBC"
10171011 exit ;;
10181012 parisc64:Linux:*:* | hppa64:Linux:*:*)
1019 echo hppa64-unknown-linux-${LIBC}
1013 echo hppa64-unknown-linux-"$LIBC"
10201014 exit ;;
10211015 parisc:Linux:*:* | hppa:Linux:*:*)
10221016 # Look for CPU level
10231017 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1024 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
1025 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
1026 *) echo hppa-unknown-linux-${LIBC} ;;
1018 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1019 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1020 *) echo hppa-unknown-linux-"$LIBC" ;;
10271021 esac
10281022 exit ;;
10291023 ppc64:Linux:*:*)
1030 echo powerpc64-unknown-linux-${LIBC}
1024 echo powerpc64-unknown-linux-"$LIBC"
10311025 exit ;;
10321026 ppc:Linux:*:*)
1033 echo powerpc-unknown-linux-${LIBC}
1027 echo powerpc-unknown-linux-"$LIBC"
10341028 exit ;;
10351029 ppc64le:Linux:*:*)
1036 echo powerpc64le-unknown-linux-${LIBC}
1030 echo powerpc64le-unknown-linux-"$LIBC"
10371031 exit ;;
10381032 ppcle:Linux:*:*)
1039 echo powerpcle-unknown-linux-${LIBC}
1033 echo powerpcle-unknown-linux-"$LIBC"
10401034 exit ;;
10411035 riscv32:Linux:*:* | riscv64:Linux:*:*)
1042 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1036 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10431037 exit ;;
10441038 s390:Linux:*:* | s390x:Linux:*:*)
1045 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1039 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
10461040 exit ;;
10471041 sh64*:Linux:*:*)
1048 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1042 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10491043 exit ;;
10501044 sh*:Linux:*:*)
1051 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1045 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10521046 exit ;;
10531047 sparc:Linux:*:* | sparc64:Linux:*:*)
1054 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1048 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10551049 exit ;;
10561050 tile*:Linux:*:*)
1057 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1051 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10581052 exit ;;
10591053 vax:Linux:*:*)
1060 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1054 echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
10611055 exit ;;
10621056 x86_64:Linux:*:*)
1063 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
1057 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
10641058 exit ;;
10651059 xtensa*:Linux:*:*)
1066 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1060 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10671061 exit ;;
10681062 i*86:DYNIX/ptx:4*:*)
10691063 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
10771071 # I am not positive that other SVR4 systems won't match this,
10781072 # I just have to hope. -- rms.
10791073 # Use sysv4.2uw... so that sysv4* matches it.
1080 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1074 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
10811075 exit ;;
10821076 i*86:OS/2:*:*)
10831077 # If we were able to find `uname', then EMX Unix compatibility
10841078 # is probably installed.
1085 echo ${UNAME_MACHINE}-pc-os2-emx
1079 echo "$UNAME_MACHINE"-pc-os2-emx
10861080 exit ;;
10871081 i*86:XTS-300:*:STOP)
1088 echo ${UNAME_MACHINE}-unknown-stop
1082 echo "$UNAME_MACHINE"-unknown-stop
10891083 exit ;;
10901084 i*86:atheos:*:*)
1091 echo ${UNAME_MACHINE}-unknown-atheos
1085 echo "$UNAME_MACHINE"-unknown-atheos
10921086 exit ;;
10931087 i*86:syllable:*:*)
1094 echo ${UNAME_MACHINE}-pc-syllable
1088 echo "$UNAME_MACHINE"-pc-syllable
10951089 exit ;;
10961090 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1097 echo i386-unknown-lynxos${UNAME_RELEASE}
1091 echo i386-unknown-lynxos"$UNAME_RELEASE"
10981092 exit ;;
10991093 i*86:*DOS:*:*)
1100 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1101 exit ;;
1102 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1103 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1094 echo "$UNAME_MACHINE"-pc-msdosdjgpp
1095 exit ;;
1096 i*86:*:4.*:*)
1097 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
11041098 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1105 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1099 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
11061100 else
1107 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1101 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
11081102 fi
11091103 exit ;;
11101104 i*86:*:5:[678]*)
11141108 *Pentium) UNAME_MACHINE=i586 ;;
11151109 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
11161110 esac
1117 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1111 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
11181112 exit ;;
11191113 i*86:*:3.2:*)
11201114 if test -f /usr/options/cb.name; then
11211115 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1122 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1116 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
11231117 elif /bin/uname -X 2>/dev/null >/dev/null ; then
11241118 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
11251119 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
11291123 && UNAME_MACHINE=i686
11301124 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
11311125 && UNAME_MACHINE=i686
1132 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1126 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
11331127 else
1134 echo ${UNAME_MACHINE}-pc-sysv32
1128 echo "$UNAME_MACHINE"-pc-sysv32
11351129 fi
11361130 exit ;;
11371131 pc:*:*:*)
11511145 exit ;;
11521146 i860:*:4.*:*) # i860-SVR4
11531147 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1154 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1148 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
11551149 else # Add other i860-SVR4 vendors below as they are discovered.
1156 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1150 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
11571151 fi
11581152 exit ;;
11591153 mini*:CTIX:SYS*5:*)
11731167 test -r /etc/.relid \
11741168 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11751169 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1176 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1170 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
11771171 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1178 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1172 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11791173 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
11801174 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11811175 && { echo i486-ncr-sysv4; exit; } ;;
11841178 test -r /etc/.relid \
11851179 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11861180 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1187 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1181 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
11881182 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1189 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1183 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
11901184 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1191 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1185 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11921186 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1193 echo m68k-unknown-lynxos${UNAME_RELEASE}
1187 echo m68k-unknown-lynxos"$UNAME_RELEASE"
11941188 exit ;;
11951189 mc68030:UNIX_System_V:4.*:*)
11961190 echo m68k-atari-sysv4
11971191 exit ;;
11981192 TSUNAMI:LynxOS:2.*:*)
1199 echo sparc-unknown-lynxos${UNAME_RELEASE}
1193 echo sparc-unknown-lynxos"$UNAME_RELEASE"
12001194 exit ;;
12011195 rs6000:LynxOS:2.*:*)
1202 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1196 echo rs6000-unknown-lynxos"$UNAME_RELEASE"
12031197 exit ;;
12041198 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1205 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1199 echo powerpc-unknown-lynxos"$UNAME_RELEASE"
12061200 exit ;;
12071201 SM[BE]S:UNIX_SV:*:*)
1208 echo mips-dde-sysv${UNAME_RELEASE}
1202 echo mips-dde-sysv"$UNAME_RELEASE"
12091203 exit ;;
12101204 RM*:ReliantUNIX-*:*:*)
12111205 echo mips-sni-sysv4
12161210 *:SINIX-*:*:*)
12171211 if uname -p 2>/dev/null >/dev/null ; then
12181212 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1219 echo ${UNAME_MACHINE}-sni-sysv4
1213 echo "$UNAME_MACHINE"-sni-sysv4
12201214 else
12211215 echo ns32k-sni-sysv
12221216 fi
12361230 exit ;;
12371231 i*86:VOS:*:*)
12381232 # From Paul.Green@stratus.com.
1239 echo ${UNAME_MACHINE}-stratus-vos
1233 echo "$UNAME_MACHINE"-stratus-vos
12401234 exit ;;
12411235 *:VOS:*:*)
12421236 # From Paul.Green@stratus.com.
12431237 echo hppa1.1-stratus-vos
12441238 exit ;;
12451239 mc68*:A/UX:*:*)
1246 echo m68k-apple-aux${UNAME_RELEASE}
1240 echo m68k-apple-aux"$UNAME_RELEASE"
12471241 exit ;;
12481242 news*:NEWS-OS:6*:*)
12491243 echo mips-sony-newsos6
12501244 exit ;;
12511245 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
12521246 if [ -d /usr/nec ]; then
1253 echo mips-nec-sysv${UNAME_RELEASE}
1247 echo mips-nec-sysv"$UNAME_RELEASE"
12541248 else
1255 echo mips-unknown-sysv${UNAME_RELEASE}
1249 echo mips-unknown-sysv"$UNAME_RELEASE"
12561250 fi
12571251 exit ;;
12581252 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
12711265 echo x86_64-unknown-haiku
12721266 exit ;;
12731267 SX-4:SUPER-UX:*:*)
1274 echo sx4-nec-superux${UNAME_RELEASE}
1268 echo sx4-nec-superux"$UNAME_RELEASE"
12751269 exit ;;
12761270 SX-5:SUPER-UX:*:*)
1277 echo sx5-nec-superux${UNAME_RELEASE}
1271 echo sx5-nec-superux"$UNAME_RELEASE"
12781272 exit ;;
12791273 SX-6:SUPER-UX:*:*)
1280 echo sx6-nec-superux${UNAME_RELEASE}
1274 echo sx6-nec-superux"$UNAME_RELEASE"
12811275 exit ;;
12821276 SX-7:SUPER-UX:*:*)
1283 echo sx7-nec-superux${UNAME_RELEASE}
1277 echo sx7-nec-superux"$UNAME_RELEASE"
12841278 exit ;;
12851279 SX-8:SUPER-UX:*:*)
1286 echo sx8-nec-superux${UNAME_RELEASE}
1280 echo sx8-nec-superux"$UNAME_RELEASE"
12871281 exit ;;
12881282 SX-8R:SUPER-UX:*:*)
1289 echo sx8r-nec-superux${UNAME_RELEASE}
1283 echo sx8r-nec-superux"$UNAME_RELEASE"
12901284 exit ;;
12911285 SX-ACE:SUPER-UX:*:*)
1292 echo sxace-nec-superux${UNAME_RELEASE}
1286 echo sxace-nec-superux"$UNAME_RELEASE"
12931287 exit ;;
12941288 Power*:Rhapsody:*:*)
1295 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1289 echo powerpc-apple-rhapsody"$UNAME_RELEASE"
12961290 exit ;;
12971291 *:Rhapsody:*:*)
1298 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1292 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
12991293 exit ;;
13001294 *:Darwin:*:*)
13011295 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1302 eval $set_cc_for_build
1296 set_cc_for_build
13031297 if test "$UNAME_PROCESSOR" = unknown ; then
13041298 UNAME_PROCESSOR=powerpc
13051299 fi
1306 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1300 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
13071301 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
13081302 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
13091303 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
13311325 # that Apple uses in portable devices.
13321326 UNAME_PROCESSOR=x86_64
13331327 fi
1334 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1328 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
13351329 exit ;;
13361330 *:procnto*:*:* | *:QNX:[0123456789]*:*)
13371331 UNAME_PROCESSOR=`uname -p`
13391333 UNAME_PROCESSOR=i386
13401334 UNAME_MACHINE=pc
13411335 fi
1342 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1336 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
13431337 exit ;;
13441338 *:QNX:*:4*)
13451339 echo i386-pc-qnx
13461340 exit ;;
13471341 NEO-*:NONSTOP_KERNEL:*:*)
1348 echo neo-tandem-nsk${UNAME_RELEASE}
1342 echo neo-tandem-nsk"$UNAME_RELEASE"
13491343 exit ;;
13501344 NSE-*:NONSTOP_KERNEL:*:*)
1351 echo nse-tandem-nsk${UNAME_RELEASE}
1345 echo nse-tandem-nsk"$UNAME_RELEASE"
13521346 exit ;;
13531347 NSR-*:NONSTOP_KERNEL:*:*)
1354 echo nsr-tandem-nsk${UNAME_RELEASE}
1348 echo nsr-tandem-nsk"$UNAME_RELEASE"
1349 exit ;;
1350 NSV-*:NONSTOP_KERNEL:*:*)
1351 echo nsv-tandem-nsk"$UNAME_RELEASE"
13551352 exit ;;
13561353 NSX-*:NONSTOP_KERNEL:*:*)
1357 echo nsx-tandem-nsk${UNAME_RELEASE}
1354 echo nsx-tandem-nsk"$UNAME_RELEASE"
13581355 exit ;;
13591356 *:NonStop-UX:*:*)
13601357 echo mips-compaq-nonstopux
13631360 echo bs2000-siemens-sysv
13641361 exit ;;
13651362 DS/*:UNIX_System_V:*:*)
1366 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1363 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
13671364 exit ;;
13681365 *:Plan9:*:*)
13691366 # "uname -m" is not consistent, so use $cputype instead. 386
13701367 # is converted to i386 for consistency with other x86
13711368 # operating systems.
1369 # shellcheck disable=SC2154
13721370 if test "$cputype" = 386; then
13731371 UNAME_MACHINE=i386
13741372 else
13751373 UNAME_MACHINE="$cputype"
13761374 fi
1377 echo ${UNAME_MACHINE}-unknown-plan9
1375 echo "$UNAME_MACHINE"-unknown-plan9
13781376 exit ;;
13791377 *:TOPS-10:*:*)
13801378 echo pdp10-unknown-tops10
13951393 echo pdp10-unknown-its
13961394 exit ;;
13971395 SEI:*:*:SEIUX)
1398 echo mips-sei-seiux${UNAME_RELEASE}
1396 echo mips-sei-seiux"$UNAME_RELEASE"
13991397 exit ;;
14001398 *:DragonFly:*:*)
1401 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1399 echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
14021400 exit ;;
14031401 *:*VMS:*:*)
14041402 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1405 case "${UNAME_MACHINE}" in
1403 case "$UNAME_MACHINE" in
14061404 A*) echo alpha-dec-vms ; exit ;;
14071405 I*) echo ia64-dec-vms ; exit ;;
14081406 V*) echo vax-dec-vms ; exit ;;
14111409 echo i386-pc-xenix
14121410 exit ;;
14131411 i*86:skyos:*:*)
1414 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
1412 echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
14151413 exit ;;
14161414 i*86:rdos:*:*)
1417 echo ${UNAME_MACHINE}-pc-rdos
1415 echo "$UNAME_MACHINE"-pc-rdos
14181416 exit ;;
14191417 i*86:AROS:*:*)
1420 echo ${UNAME_MACHINE}-pc-aros
1418 echo "$UNAME_MACHINE"-pc-aros
14211419 exit ;;
14221420 x86_64:VMkernel:*:*)
1423 echo ${UNAME_MACHINE}-unknown-esx
1421 echo "$UNAME_MACHINE"-unknown-esx
14241422 exit ;;
14251423 amd64:Isilon\ OneFS:*:*)
14261424 echo x86_64-unknown-onefs
14271425 exit ;;
14281426 esac
14291427
1428 echo "$0: unable to guess system type" >&2
1429
1430 case "$UNAME_MACHINE:$UNAME_SYSTEM" in
1431 mips:Linux | mips64:Linux)
1432 # If we got here on MIPS GNU/Linux, output extra information.
1433 cat >&2 <<EOF
1434
1435 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1436 the system type. Please install a C compiler and try again.
1437 EOF
1438 ;;
1439 esac
1440
14301441 cat >&2 <<EOF
1431 $0: unable to guess system type
14321442
14331443 This script (version $timestamp), has failed to recognize the
14341444 operating system you are using. If your script is old, overwrite *all*
14351445 copies of config.guess and config.sub with the latest versions from:
14361446
1437 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1447 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
14381448 and
1439 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1449 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
14401450
14411451 If $0 has already been updated, send the following data and any
14421452 information you think might be pertinent to config-patches@gnu.org to
14591469 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
14601470 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
14611471
1462 UNAME_MACHINE = ${UNAME_MACHINE}
1463 UNAME_RELEASE = ${UNAME_RELEASE}
1464 UNAME_SYSTEM = ${UNAME_SYSTEM}
1465 UNAME_VERSION = ${UNAME_VERSION}
1472 UNAME_MACHINE = "$UNAME_MACHINE"
1473 UNAME_RELEASE = "$UNAME_RELEASE"
1474 UNAME_SYSTEM = "$UNAME_SYSTEM"
1475 UNAME_VERSION = "$UNAME_VERSION"
14661476 EOF
14671477
14681478 exit 1
14691479
14701480 # Local variables:
1471 # eval: (add-hook 'write-file-hooks 'time-stamp)
1481 # eval: (add-hook 'before-save-hook 'time-stamp)
14721482 # time-stamp-start: "timestamp='"
14731483 # time-stamp-format: "%:y-%02m-%02d"
14741484 # time-stamp-end: "'"
0 #!/bin/sh
0 #! /bin/sh
11 # Configuration validation subroutine script.
2 # Copyright 1992-2017 Free Software Foundation, Inc.
3
4 timestamp='2017-04-02'
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-08-29'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
1414 # General Public License for more details.
1515 #
1616 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
1818 #
1919 # As a special exception to the GNU General Public License, if you
2020 # distribute this file as part of a program that contains a
3232 # Otherwise, we print the canonical config type on stdout and succeed.
3333
3434 # You can get the latest version of this script from:
35 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
35 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
3636
3737 # This file is supposed to be the same for all GNU packages
3838 # and recognize all the CPU types, system types and aliases
5656
5757 Canonicalize a configuration name.
5858
59 Operation modes:
59 Options:
6060 -h, --help print this help, then exit
6161 -t, --time-stamp print date of last modification, then exit
6262 -v, --version print version number, then exit
6666 version="\
6767 GNU config.sub ($timestamp)
6868
69 Copyright 1992-2017 Free Software Foundation, Inc.
69 Copyright 1992-2018 Free Software Foundation, Inc.
7070
7171 This is free software; see the source for copying conditions. There is NO
7272 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
9393
9494 *local*)
9595 # First pass through any local machine types.
96 echo $1
96 echo "$1"
9797 exit ;;
9898
9999 * )
109109 exit 1;;
110110 esac
111111
112 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
113 # Here we must recognize all the valid KERNEL-OS combinations.
114 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
115 case $maybe_os in
116 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
117 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
118 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
119 kopensolaris*-gnu* | cloudabi*-eabi* | \
120 storm-chaos* | os2-emx* | rtmk-nova*)
121 os=-$maybe_os
122 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
123 ;;
124 android-linux)
125 os=-linux-android
126 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
127 ;;
128 *)
129 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
130 if [ $basic_machine != $1 ]
131 then os=`echo $1 | sed 's/.*-/-/'`
132 else os=; fi
133 ;;
112 # Split fields of configuration type
113 IFS="-" read -r field1 field2 field3 field4 <<EOF
114 $1
115 EOF
116
117 # Separate into logical components for further validation
118 case $1 in
119 *-*-*-*-*)
120 echo Invalid configuration \`"$1"\': more than four components >&2
121 exit 1
122 ;;
123 *-*-*-*)
124 basic_machine=$field1-$field2
125 os=$field3-$field4
126 ;;
127 *-*-*)
128 # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
129 # parts
130 maybe_os=$field2-$field3
131 case $maybe_os in
132 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
133 | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
134 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
135 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
136 | storm-chaos* | os2-emx* | rtmk-nova*)
137 basic_machine=$field1
138 os=$maybe_os
139 ;;
140 android-linux)
141 basic_machine=$field1-unknown
142 os=linux-android
143 ;;
144 *)
145 basic_machine=$field1-$field2
146 os=$field3
147 ;;
148 esac
149 ;;
150 *-*)
151 # A lone config we happen to match not fitting any patern
152 case $field1-$field2 in
153 decstation-3100)
154 basic_machine=mips-dec
155 os=
156 ;;
157 *-*)
158 # Second component is usually, but not always the OS
159 case $field2 in
160 # Prevent following clause from handling this valid os
161 sun*os*)
162 basic_machine=$field1
163 os=$field2
164 ;;
165 # Manufacturers
166 dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
167 | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
168 | unicom* | ibm* | next | hp | isi* | apollo | altos* \
169 | convergent* | ncr* | news | 32* | 3600* | 3100* \
170 | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
171 | ultra | tti* | harris | dolphin | highlevel | gould \
172 | cbm | ns | masscomp | apple | axis | knuth | cray \
173 | microblaze* | sim | cisco \
174 | oki | wec | wrs | winbond)
175 basic_machine=$field1-$field2
176 os=
177 ;;
178 *)
179 basic_machine=$field1
180 os=$field2
181 ;;
182 esac
183 ;;
184 esac
185 ;;
186 *)
187 # Convert single-component short-hands not valid as part of
188 # multi-component configurations.
189 case $field1 in
190 386bsd)
191 basic_machine=i386-pc
192 os=bsd
193 ;;
194 a29khif)
195 basic_machine=a29k-amd
196 os=udi
197 ;;
198 adobe68k)
199 basic_machine=m68010-adobe
200 os=scout
201 ;;
202 alliant)
203 basic_machine=fx80-alliant
204 os=
205 ;;
206 altos | altos3068)
207 basic_machine=m68k-altos
208 os=
209 ;;
210 am29k)
211 basic_machine=a29k-none
212 os=bsd
213 ;;
214 amdahl)
215 basic_machine=580-amdahl
216 os=sysv
217 ;;
218 amiga)
219 basic_machine=m68k-unknown
220 os=
221 ;;
222 amigaos | amigados)
223 basic_machine=m68k-unknown
224 os=amigaos
225 ;;
226 amigaunix | amix)
227 basic_machine=m68k-unknown
228 os=sysv4
229 ;;
230 apollo68)
231 basic_machine=m68k-apollo
232 os=sysv
233 ;;
234 apollo68bsd)
235 basic_machine=m68k-apollo
236 os=bsd
237 ;;
238 aros)
239 basic_machine=i386-pc
240 os=aros
241 ;;
242 aux)
243 basic_machine=m68k-apple
244 os=aux
245 ;;
246 balance)
247 basic_machine=ns32k-sequent
248 os=dynix
249 ;;
250 blackfin)
251 basic_machine=bfin-unknown
252 os=linux
253 ;;
254 cegcc)
255 basic_machine=arm-unknown
256 os=cegcc
257 ;;
258 convex-c1)
259 basic_machine=c1-convex
260 os=bsd
261 ;;
262 convex-c2)
263 basic_machine=c2-convex
264 os=bsd
265 ;;
266 convex-c32)
267 basic_machine=c32-convex
268 os=bsd
269 ;;
270 convex-c34)
271 basic_machine=c34-convex
272 os=bsd
273 ;;
274 convex-c38)
275 basic_machine=c38-convex
276 os=bsd
277 ;;
278 cray)
279 basic_machine=j90-cray
280 os=unicos
281 ;;
282 crds | unos)
283 basic_machine=m68k-crds
284 os=
285 ;;
286 da30)
287 basic_machine=m68k-da30
288 os=
289 ;;
290 decstation | pmax | pmin | dec3100 | decstatn)
291 basic_machine=mips-dec
292 os=
293 ;;
294 delta88)
295 basic_machine=m88k-motorola
296 os=sysv3
297 ;;
298 dicos)
299 basic_machine=i686-pc
300 os=dicos
301 ;;
302 djgpp)
303 basic_machine=i586-pc
304 os=msdosdjgpp
305 ;;
306 ebmon29k)
307 basic_machine=a29k-amd
308 os=ebmon
309 ;;
310 es1800 | OSE68k | ose68k | ose | OSE)
311 basic_machine=m68k-ericsson
312 os=ose
313 ;;
314 gmicro)
315 basic_machine=tron-gmicro
316 os=sysv
317 ;;
318 go32)
319 basic_machine=i386-pc
320 os=go32
321 ;;
322 h8300hms)
323 basic_machine=h8300-hitachi
324 os=hms
325 ;;
326 h8300xray)
327 basic_machine=h8300-hitachi
328 os=xray
329 ;;
330 h8500hms)
331 basic_machine=h8500-hitachi
332 os=hms
333 ;;
334 harris)
335 basic_machine=m88k-harris
336 os=sysv3
337 ;;
338 hp300)
339 basic_machine=m68k-hp
340 ;;
341 hp300bsd)
342 basic_machine=m68k-hp
343 os=bsd
344 ;;
345 hp300hpux)
346 basic_machine=m68k-hp
347 os=hpux
348 ;;
349 hppaosf)
350 basic_machine=hppa1.1-hp
351 os=osf
352 ;;
353 hppro)
354 basic_machine=hppa1.1-hp
355 os=proelf
356 ;;
357 i386mach)
358 basic_machine=i386-mach
359 os=mach
360 ;;
361 vsta)
362 basic_machine=i386-pc
363 os=vsta
364 ;;
365 isi68 | isi)
366 basic_machine=m68k-isi
367 os=sysv
368 ;;
369 m68knommu)
370 basic_machine=m68k-unknown
371 os=linux
372 ;;
373 magnum | m3230)
374 basic_machine=mips-mips
375 os=sysv
376 ;;
377 merlin)
378 basic_machine=ns32k-utek
379 os=sysv
380 ;;
381 mingw64)
382 basic_machine=x86_64-pc
383 os=mingw64
384 ;;
385 mingw32)
386 basic_machine=i686-pc
387 os=mingw32
388 ;;
389 mingw32ce)
390 basic_machine=arm-unknown
391 os=mingw32ce
392 ;;
393 monitor)
394 basic_machine=m68k-rom68k
395 os=coff
396 ;;
397 morphos)
398 basic_machine=powerpc-unknown
399 os=morphos
400 ;;
401 moxiebox)
402 basic_machine=moxie-unknown
403 os=moxiebox
404 ;;
405 msdos)
406 basic_machine=i386-pc
407 os=msdos
408 ;;
409 msys)
410 basic_machine=i686-pc
411 os=msys
412 ;;
413 mvs)
414 basic_machine=i370-ibm
415 os=mvs
416 ;;
417 nacl)
418 basic_machine=le32-unknown
419 os=nacl
420 ;;
421 ncr3000)
422 basic_machine=i486-ncr
423 os=sysv4
424 ;;
425 netbsd386)
426 basic_machine=i386-pc
427 os=netbsd
428 ;;
429 netwinder)
430 basic_machine=armv4l-rebel
431 os=linux
432 ;;
433 news | news700 | news800 | news900)
434 basic_machine=m68k-sony
435 os=newsos
436 ;;
437 news1000)
438 basic_machine=m68030-sony
439 os=newsos
440 ;;
441 necv70)
442 basic_machine=v70-nec
443 os=sysv
444 ;;
445 nh3000)
446 basic_machine=m68k-harris
447 os=cxux
448 ;;
449 nh[45]000)
450 basic_machine=m88k-harris
451 os=cxux
452 ;;
453 nindy960)
454 basic_machine=i960-intel
455 os=nindy
456 ;;
457 mon960)
458 basic_machine=i960-intel
459 os=mon960
460 ;;
461 nonstopux)
462 basic_machine=mips-compaq
463 os=nonstopux
464 ;;
465 os400)
466 basic_machine=powerpc-ibm
467 os=os400
468 ;;
469 OSE68000 | ose68000)
470 basic_machine=m68000-ericsson
471 os=ose
472