Fossil SCM

Sync with trunk.

florian 2024-09-06 10:47 UTC timeline-keyboard-navigation merge
Commit 00f7466addc2521ae42970338e4477531b22f4baa8881861ecb82cc4692c7a45
355 files changed +1 -1 +3 -3 +2 -2 +184 -109 +887 -615 +1542 -1470 +8 -9 +1 -1 +4 -6 +1 -1 +41 -18 +4392 -2459 +40 -7 +14 -9 +18 +1 -1 +24 -19 +10 +1 -2 +8 -8 +3 -3 +5 -4 +1 -1 +1 -1 +1 -1 +3 -3 +2 -2 +2 -2 +1 -1 +1 -1 +1 -1 +16 -2 +4 -4 +1 -1 +16 -5 +2 -2 +1 -1 +4 -4 +81 -68 +4 -4 +1 -1 +4 -4 +1 -1 +4 -4 +1 -1 +4 -4 +1 -1 +4 -4 +1 -1 +36 -11 +33 -2 +2 -2 +1 -1 +2 -6 +6 -6 +1 -1 +3 -3 +2 -2 +1 -1 +1 -1 +3 -3 +5 -5 +13 -12 +16 -16 +2 -2 +17 -3 +2 -18 +4 -4 +1 -9 +1 -9 +1 -9 +3 -3 +11 -11 +100 -100 +3 -24 +1 +149 -147 +313 -58 +2590 -1030 +97 -23 +393 -294 +2995 -351 +10057 -5648 +236 -38 +14 -14 +7 -7 +26 -25 +6 -6 +2 -2 +22 -21 +14 -14 +2 -2 +25 -23 +12 -8 +2 -2 +21 -20 +9 -4 +539 -36 +2 +2 -2 +67 -26 +10 -6 +2 -2 +30 -28 +14 +310 +3 +5 +29 +15 -15 +2 -2 +21 -18 +9 -9 +2 -2 +34 -32 +6 -6 +2 -2 +14 -13 +17 -26 +8 -8 +48 -44 +4 -2 +7 -7 +7 -5 +2 -1 +1 -1 +4 -3 +1 -1 +18 +17 -12 +6 -11 +18 -10 +4 -4 +3 -3 +2 -2 +1 -1 +282 -74 +170 -46 +260 -98 +144 -22 +15 -3 +5 -3 +49 -5 +31 -25 +73 -12 +73 -12 +1 +20 -14 +14 -14 +21 -19 +8 -6 +4 -4 +15 -11 +151 -2 +10 -10 +1 -1 +1 -1 +9 -9 +95 -107 +2 -2 +1 -1 +416 -73 +1 -1 +4 -4 -1 +59 -1 +22 -13 +2 -2 +231 -26 +40 -7 +9 -2 +14 -24 +18 -7 +4 -4 +51 -32 +9 -6 +2 -7 +26 -3 +15 -10 +8 -5 +2 -1 +20 -11 +2 -1 +11 -8 +1 -1 +176 -76 +1 -1 +196 -86 +5 +3 -3 +31 -5 +2 -2 +38 -6 +76 -21 +1 -1 +36 -5 +85 -29 +10 -3 +11 -2 +2 -6 +2 -1 +8 -2 +2 -1 +3 -2 +9 -7 +50 -16 +205 -27 +162 -40 +94 -1 +2 -1 +16 -16 +5 -7 +2 -2 +286 -91 +2 -2 +1 -1 +5 -2 +12 -12 +1 -1 +99 -44 +50 -25 +7 +83 -33 +96 -41 +2 -1 +2 -1 +6 -3 +230 -38 +230 -38 +2 -2 +2 -1 +56 -1 +4 -1 +57 -43 +18 -18 +51 +5 -4 +39 -21 +11 -1 +7 -7 +25 -11 +1 -1 +17 -17 +1 -2 +1 -1 +2 -3 +16 -15 +1 +47 -47 +1 -1 +10 -3 +7 -2 +6 -1 +2 -2 +4 -2 +5 +10 +7 -2 +88 -31 +3 -4 +19 -13 +16 -25 +5 -5 +5 -11 +10 -10 +45 -44 +4 -6 +2 -4 +2 -2 +76 -7 +16 -17 +42 -41 +2 -2 +39 -40 +104 +12 -15 +106 -166 +2 -2 +60 -55 +14 -14 +151 -145 +17 -18 +4 -6 +9 -14 +8 -9 +19 -23 +30 -18 +12 -18 +22 -18 +33 -29 -3 +22 -30 +12 -12 +17 -15 +2 -3 +172 -176 +1 -1 +3 -4 +1 -1 +4 -5 +2 -2 +18 -5 +29 -29 +20 -19 +10 -10 +26 -26 +8 -5 +14 -14 +8 -12 +3 -2 +25 -27 +10 -11 +7 -7 +3 -2 +16 -16 -1 +21 -21 +17 -22 +119 -152 +37 -37 +14 -12 +6 -6 +4 -4 -2 +6 -6 +32 -9 +26 -26 +2 -2 +3 -3 +6 -6 +9 -9 +47 -52 +46 -46 +5 -44 +40 -38 +119 -119 +22 -16 +1 -1 +2 -2 -6 +14 -14 +10 -20 +36 -21 +1 -2 +102 -95 +21 -28 +22 -24 -1 +2 -2 +15 -14 +8 -12 +11 -11
~ VERSION ~ auto.def ~ autosetup/README.autosetup ~ autosetup/autosetup ~ autosetup/autosetup-config.guess ~ autosetup/autosetup-config.sub ~ autosetup/autosetup-find-tclsh ~ autosetup/autosetup-test-tclsh ~ autosetup/cc-db.tcl ~ autosetup/cc-lib.tcl ~ autosetup/cc-shared.tcl ~ autosetup/cc.tcl ~ autosetup/jimsh0.c ~ autosetup/pkg-config.tcl ~ autosetup/system.tcl ~ autosetup/tmake.auto ~ autosetup/tmake.tcl ~ compat/zlib/CMakeLists.txt ~ compat/zlib/ChangeLog ~ compat/zlib/FAQ ~ compat/zlib/Makefile.in ~ compat/zlib/README ~ compat/zlib/configure ~ compat/zlib/contrib/delphi/ZLib.pas ~ compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs ~ compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs ~ compat/zlib/contrib/infback9/inftree9.c ~ compat/zlib/contrib/infback9/inftree9.h ~ compat/zlib/contrib/iostream3/zfstream.h ~ compat/zlib/contrib/minizip/Makefile ~ compat/zlib/contrib/minizip/configure.ac ~ compat/zlib/contrib/minizip/ioapi.h ~ compat/zlib/contrib/minizip/miniunz.c ~ compat/zlib/contrib/minizip/unzip.c ~ compat/zlib/contrib/minizip/unzip.h ~ compat/zlib/contrib/minizip/zip.c ~ compat/zlib/contrib/minizip/zip.h ~ compat/zlib/contrib/pascal/zlibpas.pas ~ compat/zlib/contrib/puff/puff.c ~ compat/zlib/contrib/vstudio/readme.txt ~ compat/zlib/contrib/vstudio/vc10/zlib.rc ~ compat/zlib/contrib/vstudio/vc10/zlibvc.def ~ compat/zlib/contrib/vstudio/vc11/zlib.rc ~ compat/zlib/contrib/vstudio/vc11/zlibvc.def ~ compat/zlib/contrib/vstudio/vc12/zlib.rc ~ compat/zlib/contrib/vstudio/vc12/zlibvc.def ~ compat/zlib/contrib/vstudio/vc14/zlib.rc ~ compat/zlib/contrib/vstudio/vc14/zlibvc.def ~ compat/zlib/contrib/vstudio/vc9/zlib.rc ~ compat/zlib/contrib/vstudio/vc9/zlibvc.def ~ compat/zlib/deflate.c ~ compat/zlib/deflate.h ~ compat/zlib/examples/gzlog.c ~ compat/zlib/examples/zran.c ~ compat/zlib/gzguts.h ~ compat/zlib/gzlib.c ~ compat/zlib/inflate.c ~ compat/zlib/inftrees.c ~ compat/zlib/inftrees.h ~ compat/zlib/old/visual-basic.txt ~ compat/zlib/os400/README400 ~ compat/zlib/os400/zlib.inc ~ compat/zlib/qnx/package.qpg ~ compat/zlib/test/example.c ~ compat/zlib/test/minigzip.c ~ compat/zlib/treebuild.xml ~ compat/zlib/trees.c ~ compat/zlib/win32/DLL_FAQ.txt ~ compat/zlib/win32/README-WIN32.txt ~ compat/zlib/zconf.h ~ compat/zlib/zconf.h.cmakein ~ compat/zlib/zconf.h.in ~ compat/zlib/zlib.3 ~ compat/zlib/zlib.3.pdf ~ compat/zlib/zlib.h ~ compat/zlib/zlib.map ~ compat/zlib/zutil.h ~ configure ~ extsrc/cson_amalgamation.c ~ extsrc/cson_amalgamation.h ~ extsrc/linenoise.c ~ extsrc/linenoise.h ~ extsrc/pikchr.c ~ extsrc/pikchr.wasm ~ extsrc/shell.c ~ extsrc/sqlite3.c ~ extsrc/sqlite3.h ~ skins/ardoise/css.txt ~ skins/ardoise/footer.txt ~ skins/ardoise/header.txt ~ skins/black_and_white/css.txt ~ skins/black_and_white/footer.txt ~ skins/black_and_white/header.txt ~ skins/blitz/css.txt ~ skins/blitz/footer.txt ~ skins/blitz/header.txt ~ skins/darkmode/css.txt ~ skins/darkmode/footer.txt ~ skins/darkmode/header.txt ~ skins/default/README.md ~ skins/default/css.txt ~ skins/default/details.txt ~ skins/default/footer.txt ~ skins/default/header.txt ~ skins/eagle/css.txt ~ skins/eagle/footer.txt ~ skins/eagle/header.txt ~ skins/etienne/README.md ~ skins/etienne/css.txt ~ skins/etienne/details.txt ~ skins/etienne/footer.txt ~ skins/etienne/header.txt ~ skins/khaki/css.txt ~ skins/khaki/footer.txt ~ skins/khaki/header.txt ~ skins/original/css.txt ~ skins/original/footer.txt ~ skins/original/header.txt ~ skins/plain_gray/css.txt ~ skins/plain_gray/footer.txt ~ skins/plain_gray/header.txt ~ skins/xekri/css.txt ~ skins/xekri/footer.txt ~ skins/xekri/header.txt ~ src/add.c ~ src/alerts.c ~ src/allrepo.c ~ src/attach.c ~ src/backlink.c ~ src/backoffice.c ~ src/bag.c ~ src/bisect.c ~ src/blob.c ~ src/branch.c ~ src/browse.c ~ src/builtin.c ~ src/bundle.c ~ src/cache.c ~ src/capabilities.c ~ src/captcha.c ~ src/cgi.c ~ src/chat.c ~ src/checkin.c ~ src/clone.c ~ src/configure.c ~ src/cookies.c ~ src/db.c ~ src/default.css ~ src/default.css ~ src/descendants.c ~ src/diff.c ~ src/diffcmd.c ~ src/dispatch.c ~ src/doc.c ~ src/etag.c ~ src/export.c ~ src/file.c ~ src/fileedit.c ~ src/finfo.c ~ src/forum.c ~ src/fossil.bootstrap.js ~ src/fossil.diff.js ~ src/fossil.dom.js ~ src/fossil.fetch.js ~ src/fossil.page.chat.js ~ src/fossil.page.pikchrshow.js ~ src/fossil.page.pikchrshowasm.js ~ src/fossil.page.wikiedit.js ~ src/glob.c ~ src/graph.c ~ src/hbmenu.js ~ src/http.c ~ src/http_ssl.c ~ src/http_transport.c ~ src/import.c ~ src/info.c ~ src/interwiki.c ~ src/json.c ~ src/json_artifact.c ~ src/json_branch.c ~ src/json_config.c ~ src/json_finfo.c ~ src/json_login.c ~ src/json_tag.c ~ src/json_timeline.c ~ src/json_user.c ~ src/json_wiki.c ~ src/loadctrl.c ~ src/login.c ~ src/lookslike.c ~ src/main.c ~ src/main.mk ~ src/manifest.c ~ src/markdown.c ~ src/markdown.md ~ src/markdown_html.c ~ src/merge.c ~ src/merge3.c ~ src/name.c ~ src/patch.c ~ src/path.c ~ src/pikchrshow.c ~ src/pqueue.c ~ src/printf.c ~ src/rebuild.c ~ src/regexp.c ~ src/report.c ~ src/rss.c ~ src/search.c ~ src/security_audit.c ~ src/setup.c ~ src/setupuser.c ~ src/sha1.c ~ src/sha1hard.c ~ src/shun.c ~ src/sitemap.c ~ src/skins.c ~ src/smtp.c ~ src/sqlcmd.c ~ src/stash.c ~ src/stat.c ~ src/statrep.c ~ src/style.c ~ src/style.chat.css ~ src/style.uvlist.css ~ src/sync.c ~ src/tag.c ~ src/tar.c ~ src/th_main.c ~ src/th_tcl.c ~ src/timeline.c ~ src/timeline.c ~ src/tkt.c ~ src/unicode.c ~ src/unversioned.c ~ src/update.c ~ src/url.c ~ src/user.c ~ src/util.c ~ src/vfile.c ~ src/wiki.c ~ src/wikiformat.c ~ src/winhttp.c ~ src/xfer.c ~ src/xfersetup.c ~ src/zip.c ~ test/amend.test ~ test/merge5.test ~ test/release-checklist.wiki ~ test/stash.test ~ test/tester.tcl ~ test/utf.test ~ tools/codecheck1.c ~ tools/makeheaders.c ~ tools/mkindex.c ~ tools/mkversion.c ~ tools/skintxt2config.c ~ tools/sqlcompattest.c ~ win/Makefile.mingw ~ win/Makefile.msc ~ win/buildmsvc.bat ~ www/aboutcgi.wiki ~ www/aboutdownload.wiki ~ www/adding_code.wiki ~ www/alerts.md ~ www/backoffice.md ~ www/backup.md ~ www/branching.wiki ~ www/build.wiki ~ www/caps/login-groups.md ~ www/caps/ref.html ~ www/cgi.wiki ~ www/changes.wiki ~ www/chat.md ~ www/checkin_names.wiki ~ www/childprojects.wiki ~ www/ckout-workflows.md ~ www/colordiff.md ~ www/concepts.wiki ~ www/containers.md ~ www/contribute.wiki ~ www/custom_ticket.wiki ~ www/customgraph.md ~ www/customskin.md ~ www/defcsp.md ~ www/delta-manifests.md ~ www/delta_encoder_algorithm.wiki ~ www/delta_format.wiki ~ www/embeddeddoc.wiki ~ www/encryptedrepos.wiki ~ www/event.wiki ~ www/faq.tcl ~ www/faq.wiki ~ www/fileedit-page.md ~ www/fileformat.wiki ~ www/forum.wiki ~ www/fossil-v-git.wiki ~ www/fossil_prompt.wiki ~ www/gitusers.md ~ www/globs.md ~ www/glossary.md ~ www/grep.md ~ www/hashes.md ~ www/hashpolicy.wiki ~ www/hints.wiki ~ www/image-format-vs-repo-size.md ~ www/index.wiki ~ www/inout.wiki ~ www/javascript.md ~ www/loadmgmt.md ~ www/makefile.wiki ~ www/mirrortogithub.md ~ www/mkindex.tcl ~ www/newrepo.wiki ~ www/password.wiki ~ www/patchcmd.md ~ www/permutedindex.html ~ www/pikchr.md ~ www/pop.wiki ~ www/private.wiki ~ www/qandc.wiki ~ www/quickstart.wiki ~ www/quotes.wiki ~ www/rebaseharm.md ~ www/reviews.wiki ~ www/scgi.wiki ~ www/selfcheck.wiki ~ www/selfhost.wiki ~ www/server/any/cgi.md ~ www/server/any/http-over-ssh.md ~ www/server/any/inetd.md ~ www/server/any/none.md ~ www/server/any/scgi.md ~ www/server/any/xinetd.md ~ www/server/debian/nginx.md ~ www/server/debian/service.md ~ www/server/index.html ~ www/server/macos/service.md ~ www/server/openbsd/fastcgi.md ~ www/server/openbsd/service.wiki ~ www/server/windows/iis.md ~ www/server/windows/service.md ~ www/server/windows/stunnel.md ~ www/serverext.wiki ~ www/ssl-server.md ~ www/ssl.wiki ~ www/stats.wiki ~ www/sync.wiki ~ www/tech_overview.wiki ~ www/th1.md ~ www/theory1.wiki ~ www/tickets.wiki ~ www/unvers.wiki ~ www/webui.wiki ~ www/whyusefossil.wiki
+1 -1
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1
-2.24
1
+2.25
22
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1 2.24
2
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1 2.25
2
+3 -3
--- auto.def
+++ auto.def
@@ -36,11 +36,11 @@
3636
}
3737
3838
# Update the minimum required SQLite version number here, and also
3939
# in src/main.c near the sqlite3_libversion_number() call. Take care
4040
# that both places agree!
41
-define MINIMUM_SQLITE_VERSION "3.43.0"
41
+define MINIMUM_SQLITE_VERSION "3.46.0"
4242
4343
# This is useful for people wanting Fossil to use an external SQLite library
4444
# to compare the one they have against the minimum required
4545
if {[opt-bool print-minimum-sqlite-version]} {
4646
puts [get-define MINIMUM_SQLITE_VERSION]
@@ -745,11 +745,12 @@
745745
define FOSSIL_HAVE_GETPASS 1
746746
msg-result "Found getpass() with unistd.h"
747747
}
748748
749749
# Check for getloadavg(), and if it doesn't exist, define FOSSIL_OMIT_LOAD_AVERAGE
750
-if {![cc-check-functions getloadavg]} {
750
+if {![cc-check-functions getloadavg] ||
751
+ ![cctest -link 1 -includes {unistd.h} -code "double a\[3\]; getloadavg(a,3);"]} {
751752
define FOSSIL_OMIT_LOAD_AVERAGE 1
752753
msg-result "Load average support unavailable"
753754
}
754755
755756
# Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
@@ -764,11 +765,10 @@
764765
if {[opt-bool static]} {
765766
msg-result "FuseFS support disabled due to -static"
766767
} elseif {[cc-check-function-in-lib fuse_mount fuse]} {
767768
define-append EXTRA_CFLAGS -DFOSSIL_HAVE_FUSEFS
768769
define FOSSIL_HAVE_FUSEFS 1
769
- define-append LIBS -lfuse
770770
msg-result "FuseFS support enabled"
771771
}
772772
}
773773
774774
########################################################################
775775
--- auto.def
+++ auto.def
@@ -36,11 +36,11 @@
36 }
37
38 # Update the minimum required SQLite version number here, and also
39 # in src/main.c near the sqlite3_libversion_number() call. Take care
40 # that both places agree!
41 define MINIMUM_SQLITE_VERSION "3.43.0"
42
43 # This is useful for people wanting Fossil to use an external SQLite library
44 # to compare the one they have against the minimum required
45 if {[opt-bool print-minimum-sqlite-version]} {
46 puts [get-define MINIMUM_SQLITE_VERSION]
@@ -745,11 +745,12 @@
745 define FOSSIL_HAVE_GETPASS 1
746 msg-result "Found getpass() with unistd.h"
747 }
748
749 # Check for getloadavg(), and if it doesn't exist, define FOSSIL_OMIT_LOAD_AVERAGE
750 if {![cc-check-functions getloadavg]} {
 
751 define FOSSIL_OMIT_LOAD_AVERAGE 1
752 msg-result "Load average support unavailable"
753 }
754
755 # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
@@ -764,11 +765,10 @@
764 if {[opt-bool static]} {
765 msg-result "FuseFS support disabled due to -static"
766 } elseif {[cc-check-function-in-lib fuse_mount fuse]} {
767 define-append EXTRA_CFLAGS -DFOSSIL_HAVE_FUSEFS
768 define FOSSIL_HAVE_FUSEFS 1
769 define-append LIBS -lfuse
770 msg-result "FuseFS support enabled"
771 }
772 }
773
774 ########################################################################
775
--- auto.def
+++ auto.def
@@ -36,11 +36,11 @@
36 }
37
38 # Update the minimum required SQLite version number here, and also
39 # in src/main.c near the sqlite3_libversion_number() call. Take care
40 # that both places agree!
41 define MINIMUM_SQLITE_VERSION "3.46.0"
42
43 # This is useful for people wanting Fossil to use an external SQLite library
44 # to compare the one they have against the minimum required
45 if {[opt-bool print-minimum-sqlite-version]} {
46 puts [get-define MINIMUM_SQLITE_VERSION]
@@ -745,11 +745,12 @@
745 define FOSSIL_HAVE_GETPASS 1
746 msg-result "Found getpass() with unistd.h"
747 }
748
749 # Check for getloadavg(), and if it doesn't exist, define FOSSIL_OMIT_LOAD_AVERAGE
750 if {![cc-check-functions getloadavg] ||
751 ![cctest -link 1 -includes {unistd.h} -code "double a\[3\]; getloadavg(a,3);"]} {
752 define FOSSIL_OMIT_LOAD_AVERAGE 1
753 msg-result "Load average support unavailable"
754 }
755
756 # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
@@ -764,11 +765,10 @@
765 if {[opt-bool static]} {
766 msg-result "FuseFS support disabled due to -static"
767 } elseif {[cc-check-function-in-lib fuse_mount fuse]} {
768 define-append EXTRA_CFLAGS -DFOSSIL_HAVE_FUSEFS
769 define FOSSIL_HAVE_FUSEFS 1
 
770 msg-result "FuseFS support enabled"
771 }
772 }
773
774 ########################################################################
775
--- autosetup/README.autosetup
+++ autosetup/README.autosetup
@@ -1,11 +1,11 @@
1
-README.autosetup created by autosetup v0.6.9
1
+README.autosetup created by autosetup v0.7.2
22
33
This is the autosetup directory for a local install of autosetup.
44
It contains autosetup, support files and loadable modules.
55
66
*.tcl files in this directory are optional modules which
77
can be loaded with the 'use' directive.
88
99
*.auto files in this directory are auto-loaded.
1010
11
-For more information, see http://msteveb.github.com/autosetup/
11
+For more information, see https://msteveb.github.io/autosetup/
1212
--- autosetup/README.autosetup
+++ autosetup/README.autosetup
@@ -1,11 +1,11 @@
1 README.autosetup created by autosetup v0.6.9
2
3 This is the autosetup directory for a local install of autosetup.
4 It contains autosetup, support files and loadable modules.
5
6 *.tcl files in this directory are optional modules which
7 can be loaded with the 'use' directive.
8
9 *.auto files in this directory are auto-loaded.
10
11 For more information, see http://msteveb.github.com/autosetup/
12
--- autosetup/README.autosetup
+++ autosetup/README.autosetup
@@ -1,11 +1,11 @@
1 README.autosetup created by autosetup v0.7.2
2
3 This is the autosetup directory for a local install of autosetup.
4 It contains autosetup, support files and loadable modules.
5
6 *.tcl files in this directory are optional modules which
7 can be loaded with the 'use' directive.
8
9 *.auto files in this directory are auto-loaded.
10
11 For more information, see https://msteveb.github.io/autosetup/
12
+184 -109
--- autosetup/autosetup
+++ autosetup/autosetup
@@ -4,11 +4,11 @@
44
# vim:se syntax=tcl:
55
# \
66
dir=`dirname "$0"`; exec "`$dir/autosetup-find-tclsh`" "$0" "$@"
77
88
# Note that the version has a trailing + on unreleased versions
9
-set autosetup(version) 0.6.9
9
+set autosetup(version) 0.7.2
1010
1111
# Can be set to 1 to debug early-init problems
1212
set autosetup(debug) [expr {"--debug" in $argv}]
1313
1414
##################################################################
@@ -91,17 +91,17 @@
9191
# We simply parse anything that looks like an option
9292
set autosetup(getopt) [getopt argv]
9393
9494
#"=Core Options:"
9595
options-add {
96
- help:=local => "display help and options. Optionally specify a module name, such as --help=system"
96
+ help:=all => "display help and options. Optional: module name, such as --help=system"
9797
licence license => "display the autosetup license"
98
- version => "display the version of autosetup"
98
+ version => "display the version of autosetup"
9999
ref:=text manual:=text
100100
reference:=text => "display the autosetup command reference. 'text', 'wiki', 'asciidoc' or 'markdown'"
101
- debug => "display debugging output as autosetup runs"
102
- install:=. => "install autosetup to the current or given directory"
101
+ debug => "display debugging output as autosetup runs"
102
+ install:=. => "install autosetup to the current or given directory"
103103
}
104104
if {$autosetup(installed)} {
105105
# hidden options so we can produce a nice error
106106
options-add {
107107
sysinstall:path
@@ -202,24 +202,21 @@
202202
}
203203
}
204204
205205
autosetup_add_dep $autosetup(autodef)
206206
207
- define CONFIGURE_OPTS ""
208
- foreach arg $autosetup(argv) {
209
- define-append CONFIGURE_OPTS [quote-if-needed $arg]
210
- }
211
- define AUTOREMAKE [file-normalize $autosetup(exe)]
212
- define-append AUTOREMAKE [get-define CONFIGURE_OPTS]
213
-
207
+ # Add $argv to CONFIGURE_OPTS
208
+ define-append-argv CONFIGURE_OPTS {*}$autosetup(argv)
209
+ # Set up AUTOREMAKE to reconfigure with the same args
210
+ define-append-argv AUTOREMAKE {*}$autosetup(exe) {*}$autosetup(argv)
214211
215212
# Log how we were invoked
216213
configlog "Invoked as: [getenv WRAPPER $::argv0] [quote-argv $autosetup(argv)]"
217214
configlog "Tclsh: [info nameofexecutable]"
218215
219
- # Note that auto.def is *not* loaded in the global scope
220
- source $autosetup(autodef)
216
+ # Load auto.def as module "auto.def"
217
+ autosetup_load_module auto.def source $autosetup(autodef)
221218
222219
# Could warn here if options {} was not specified
223220
224221
show-notices
225222
@@ -231,10 +228,12 @@
231228
}
232229
}
233230
234231
exit 0
235232
}
233
+
234
+# @section Option Handling
236235
237236
# @opt-bool ?-nodefault? option ...
238237
#
239238
# Check each of the named, boolean options and if any have been explicitly enabled
240239
# or disabled by the user, return 1 or 0 accordingly.
@@ -340,12 +339,12 @@
340339
}
341340
342341
if {![info exists result]} {
343342
# No user-specified value. Has options-defaults been set?
344343
foreach opt $names {
345
- if {[dict exists $::autosetup(options-defaults) $opt]} {
346
- set result [dict get $autosetup(options-defaults) $opt]
344
+ if {[dict exists $::autosetup(optdefault) $opt]} {
345
+ set result [dict get $autosetup(optdefault) $opt]
347346
}
348347
}
349348
}
350349
351350
if {[info exists result]} {
@@ -373,11 +372,11 @@
373372
}
374373
375374
# Parse the option definition in $opts and update
376375
# ::autosetup(setoptions) and ::autosetup(optionhelp) appropriately
377376
#
378
-proc options-add {opts {header ""}} {
377
+proc options-add {opts} {
379378
global autosetup
380379
381380
# First weed out comment lines
382381
set realopts {}
383382
foreach line [split $opts \n] {
@@ -389,12 +388,11 @@
389388
390389
for {set i 0} {$i < [llength $opts]} {incr i} {
391390
set opt [lindex $opts $i]
392391
if {[string match =* $opt]} {
393392
# This is a special heading
394
- lappend autosetup(optionhelp) $opt ""
395
- set header {}
393
+ lappend autosetup(optionhelp) [list $opt $autosetup(module)]
396394
continue
397395
}
398396
unset -nocomplain defaultvalue equal value
399397
400398
#puts "i=$i, opt=$opt"
@@ -451,12 +449,12 @@
451449
}
452450
} else {
453451
# String option.
454452
lappend autosetup(options) $name
455453
456
- if {$colon eq ":"} {
457
- # Was ":name=default" given?
454
+ if {$equal ne "="} {
455
+ # Was the option given as "name:value=default"?
458456
# If so, set $value to the display name and $defaultvalue to the default
459457
# (This is the preferred way to set a default value for a string option)
460458
if {[regexp {^([^=]+)=(.*)$} $value -> value defaultvalue]} {
461459
dict set autosetup(optdefault) $name $defaultvalue
462460
}
@@ -466,13 +464,13 @@
466464
if {[dict exists $autosetup(options-defaults) $name]} {
467465
# A default was specified with options-defaults, so use it
468466
set defaultvalue [dict get $autosetup(options-defaults) $name]
469467
dict set autosetup(optdefault) $name $defaultvalue
470468
} elseif {![info exists defaultvalue]} {
471
- # For backward compatibility, if ":name" was given, use name as both
472
- # the display text and the default value, but only if the user
473
- # specified the option without the value
469
+ # No default value was given by value=default or options-defaults
470
+ # so use the value as the default when the plain option with no
471
+ # value is given (.e.g. just --opt instead of --opt=value)
474472
set defaultvalue $value
475473
}
476474
477475
if {$equal eq "="} {
478476
# String option with optional value
@@ -507,39 +505,22 @@
507505
if {[lindex $opts $i+1] eq "=>"} {
508506
set desc [lindex $opts $i+2]
509507
if {[info exists defaultvalue]} {
510508
set desc [string map [list @default@ $defaultvalue] $desc]
511509
}
512
- #string match \n* $desc
513
- if {$header ne ""} {
514
- lappend autosetup(optionhelp) $header ""
515
- set header ""
516
- }
517510
# A multi-line description
518
- lappend autosetup(optionhelp) $opthelp $desc
511
+ lappend autosetup(optionhelp) [list $opthelp $autosetup(module) $desc]
519512
incr i 2
520513
}
521514
}
522515
}
523516
524517
# @module-options optionlist
525518
#
526
-# Like 'options', but used within a module.
519
+# Deprecated. Simply use 'options' from within a module.
527520
proc module-options {opts} {
528
- set header ""
529
- if {$::autosetup(showhelp) > 1 && [llength $opts]} {
530
- set header "Module Options:"
531
- }
532
- options-add $opts $header
533
-
534
- if {$::autosetup(showhelp)} {
535
- # Ensure that the module isn't executed on --help
536
- # We are running under eval or source, so use break
537
- # to prevent further execution
538
- #return -code break -level 2
539
- return -code break
540
- }
521
+ options $opts
541522
}
542523
543524
proc max {a b} {
544525
expr {$a > $b ? $a : $b}
545526
}
@@ -564,36 +545,53 @@
564545
if {$len} {
565546
puts ""
566547
}
567548
}
568549
569
-proc options-show {} {
550
+# Display options (from $autosetup(optionhelp)) for modules that match
551
+# glob pattern $what
552
+proc options-show {what} {
553
+ set local 0
570554
# Determine the max option width
571555
set max 0
572
- foreach {opt desc} $::autosetup(optionhelp) {
556
+ foreach help $::autosetup(optionhelp) {
557
+ lassign $help opt module desc
558
+ if {![string match $what $module]} {
559
+ continue
560
+ }
573561
if {[string match =* $opt] || [string match \n* $desc]} {
574562
continue
575563
}
576564
set max [max $max [string length $opt]]
577565
}
578
- set indent [string repeat " " [expr $max+4]]
566
+ set indent [string repeat " " [expr {$max+4}]]
579567
set cols [getenv COLUMNS 80]
580568
catch {
581569
lassign [exec stty size] rows cols
582570
}
583571
incr cols -1
584572
# Now output
585
- foreach {opt desc} $::autosetup(optionhelp) {
573
+ foreach help $::autosetup(optionhelp) {
574
+ lassign $help opt module desc
575
+ if {![string match $what $module]} {
576
+ continue
577
+ }
578
+ if {$local == 0 && $module eq "auto.def"} {
579
+ puts "Local Options:"
580
+ incr local
581
+ }
586582
if {[string match =* $opt]} {
583
+ # Output a special heading line"
587584
puts [string range $opt 1 end]
588585
continue
589586
}
590587
puts -nonewline " [format %-${max}s $opt]"
591588
if {[string match \n* $desc]} {
589
+ # Output a pre-formatted help description as-is
592590
puts $desc
593591
} else {
594
- options-wrap-desc [string trim $desc] $cols " " $indent [expr $max + 2]
592
+ options-wrap-desc [string trim $desc] $cols " " $indent [expr {$max+2}]
595593
}
596594
}
597595
}
598596
599597
# @options optionspec
@@ -608,16 +606,20 @@
608606
#
609607
# The default is 'name=0', meaning that the option is disabled by default.
610608
# If 'name=1' is used to make the option enabled by default, the description should reflect
611609
# that with text like "Disable support for ...".
612610
#
613
-# An argument option (one which takes a parameter) is of the form:
611
+# An argument option (one which takes a parameter) is of one of the following forms:
614612
#
615
-## name:[=]value => "Description of this option"
613
+## name:value => "Description of this option"
614
+## name:value=default => "Description of this option with a default value"
615
+## name:=value => "Description of this option with an optional value"
616616
#
617617
# If the 'name:value' form is used, the value must be provided with the option (as '--name=myvalue').
618
-# If the 'name:=value' form is used, the value is optional and the given value is used as the default
618
+# If the 'name:value=default' form is used, the option has the given default value even if not
619
+# specified by the user.
620
+# If the 'name:=value' form is used, the value is optional and the given value is used
619621
# if it is not provided.
620622
#
621623
# The description may contain '@default@', in which case it will be replaced with the default
622624
# value for the option (taking into account defaults specified with 'options-defaults'.
623625
#
@@ -627,23 +629,26 @@
627629
# For example, '--disable-lfs' is an alias for '--disable=largefile':
628630
#
629631
## lfs=1 largefile=1 => "Disable large file support"
630632
#
631633
proc options {optlist} {
632
- # Allow options as a list or args
633
- options-add $optlist "Local Options:"
634
+ global autosetup
634635
635
- if {$::autosetup(showhelp)} {
636
- options-show
637
- exit 0
636
+ options-add $optlist
637
+
638
+ if {$autosetup(showhelp)} {
639
+ # If --help, stop now to show help
640
+ return -code break
638641
}
639642
640
- # Check for invalid options
641
- if {[opt-bool option-checking]} {
642
- foreach o [dict keys $::autosetup(getopt)] {
643
- if {$o ni $::autosetup(options)} {
644
- user-error "Unknown option --$o"
643
+ if {$autosetup(module) eq "auto.def"} {
644
+ # Check for invalid options
645
+ if {[opt-bool option-checking]} {
646
+ foreach o [dict keys $::autosetup(getopt)] {
647
+ if {$o ni $::autosetup(options)} {
648
+ user-error "Unknown option --$o"
649
+ }
645650
}
646651
}
647652
}
648653
}
649654
@@ -677,10 +682,12 @@
677682
}
678683
}
679684
return $alias
680685
}
681686
687
+# @section Variable Definitions (defines)
688
+
682689
# @define name ?value=1?
683690
#
684691
# Defines the named variable to the given value.
685692
# These (name, value) pairs represent the results of the configuration check
686693
# and are available to be subsequently checked, modified and substituted.
@@ -687,10 +694,33 @@
687694
#
688695
proc define {name {value 1}} {
689696
set ::define($name) $value
690697
#dputs "$name <= $value"
691698
}
699
+
700
+# @define-push {name ...} script
701
+#
702
+# Save the values of the given defines, evaluation the script, then restore.
703
+# For example, to avoid updating AS_FLAGS and AS_CXXFLAGS:
704
+## define-push {AS_CFLAGS AS_CXXFLAGS} {
705
+## cc-check-flags -Wno-error
706
+## }
707
+proc define-push {names script} {
708
+ array set unset {}
709
+ foreach name $names {
710
+ if {[is-defined $name]} {
711
+ set save($name) [get-define $name]
712
+ } else {
713
+ set unset($name) 1
714
+ }
715
+ }
716
+ uplevel 1 $script
717
+ array set ::define [array get save]
718
+ foreach name [array names unset] {
719
+ unset -nocomplain ::define($name)
720
+ }
721
+}
692722
693723
# @undefine name
694724
#
695725
# Undefine the named variable.
696726
#
@@ -703,34 +733,48 @@
703733
#
704734
# Appends the given value(s) to the given "defined" variable.
705735
# If the variable is not defined or empty, it is set to '$value'.
706736
# Otherwise the value is appended, separated by a space.
707737
# Any extra values are similarly appended.
708
-# If any value is already contained in the variable (as a substring) it is omitted.
738
+#
739
+# Note that define-append is not designed to add values containing spaces.
740
+# If values may contain spaces, consider define-append-argv instead.
709741
#
710742
proc define-append {name args} {
711743
if {[get-define $name ""] ne ""} {
712
- # Avoid duplicates
713744
foreach arg $args {
714745
if {$arg eq ""} {
715746
continue
716747
}
717
- set found 0
718
- foreach str [split $::define($name) " "] {
719
- if {$str eq $arg} {
720
- incr found
721
- }
722
- }
723
- if {!$found} {
724
- append ::define($name) " " $arg
725
- }
748
+ append ::define($name) " " $arg
726749
}
727750
} else {
728751
set ::define($name) [join $args]
729752
}
730753
#dputs "$name += [join $args] => $::define($name)"
731754
}
755
+
756
+# @define-append-argv name value ...
757
+#
758
+# Similar to define-append except designed to construct shell command
759
+# lines, including correct handling of parameters with spaces.
760
+#
761
+# Each non-empty value is quoted if necessary and then appended to the given variable
762
+# if it does not already exist.
763
+#
764
+proc define-append-argv {name args} {
765
+ set seen {}
766
+ set new {}
767
+ foreach val [list {*}[get-define $name ""] {*}$args] {
768
+ if {$val ne {} && ![dict exists $seen $val]} {
769
+ lappend new [quote-if-needed $val]
770
+ dict set seen $val 1
771
+ }
772
+ }
773
+ set ::define($name) [join $new " "]
774
+ #dputs "$name += [join $args] => $::define($name)"
775
+}
732776
733777
# @get-define name ?default=0?
734778
#
735779
# Returns the current value of the "defined" variable, or '$default'
736780
# if not set.
@@ -773,10 +817,11 @@
773817
#
774818
proc all-defines {} {
775819
array get ::define
776820
}
777821
822
+# @section Environment/Helpers
778823
779824
# @get-env name default
780825
#
781826
# If '$name' was specified on the command line, return it.
782827
# Otherwise if '$name' was set in the environment, return it.
@@ -855,10 +900,12 @@
855900
lappend result $p
856901
}
857902
}
858903
return $result
859904
}
905
+
906
+# @section Paths, Searching
860907
861908
# @find-executable-path name
862909
#
863910
# Searches the path for an executable with the given name.
864911
# Note that the name may include some parameters, e.g. 'cc -mbig-endian',
@@ -924,10 +971,12 @@
924971
user-error "failed to find one of: [join $args]"
925972
}
926973
}
927974
return ""
928975
}
976
+
977
+# @section Logging, Messages and Errors
929978
930979
# @configlog msg
931980
#
932981
# Writes the given message to the configuration log, 'config.log'.
933982
#
@@ -1141,10 +1190,12 @@
11411190
# The name will be normalised (converted to a full path)
11421191
#
11431192
proc autosetup_add_dep {filename} {
11441193
lappend ::autosetup(deps) [file-normalize $filename]
11451194
}
1195
+
1196
+# @section Modules Support
11461197
11471198
##################################################################
11481199
#
11491200
# Library module support
11501201
#
@@ -1171,12 +1222,13 @@
11711222
foreach m $args {
11721223
if {[info exists libmodule($m)]} {
11731224
continue
11741225
}
11751226
set libmodule($m) 1
1227
+
11761228
if {[info exists modsource(${m}.tcl)]} {
1177
- automf_load eval $modsource(${m}.tcl)
1229
+ autosetup_load_module $m eval $modsource(${m}.tcl)
11781230
} else {
11791231
set locs [list ${m}.tcl ${m}/init.tcl]
11801232
set found 0
11811233
foreach dir $dirs {
11821234
foreach loc $locs {
@@ -1192,11 +1244,11 @@
11921244
}
11931245
if {$found} {
11941246
# For the convenience of the "use" source, point to the directory
11951247
# it is being loaded from
11961248
set ::usedir [file dirname $source]
1197
- automf_load source $source
1249
+ autosetup_load_module $m source $source
11981250
autosetup_add_dep $source
11991251
} else {
12001252
autosetup-error "use: No such module: $m"
12011253
}
12021254
}
@@ -1205,23 +1257,28 @@
12051257
12061258
proc autosetup_load_auto_modules {} {
12071259
global autosetup modsource
12081260
# First load any embedded auto modules
12091261
foreach mod [array names modsource *.auto] {
1210
- automf_load eval $modsource($mod)
1262
+ autosetup_load_module $mod eval $modsource($mod)
12111263
}
12121264
# Now any external auto modules
12131265
foreach file [glob -nocomplain $autosetup(libdir)/*.auto $autosetup(libdir)/*/*.auto] {
1214
- automf_load source $file
1266
+ autosetup_load_module [file tail $file] source $file
12151267
}
12161268
}
12171269
12181270
# Load module source in the global scope by executing the given command
1219
-proc automf_load {args} {
1271
+proc autosetup_load_module {module args} {
1272
+ global autosetup
1273
+ set prev $autosetup(module)
1274
+ set autosetup(module) $module
1275
+
12201276
if {[catch [list uplevel #0 $args] msg opts] ni {0 2 3}} {
12211277
autosetup-full-error [error-dump $msg $opts $::autosetup(debug)]
12221278
}
1279
+ set autosetup(module) $prev
12231280
}
12241281
12251282
# Initial settings
12261283
set autosetup(exe) $::argv0
12271284
set autosetup(istcl) 1
@@ -1229,10 +1286,11 @@
12291286
set autosetup(installed) 0
12301287
set autosetup(sysinstall) 0
12311288
set autosetup(msg-checking) 0
12321289
set autosetup(msg-quiet) 0
12331290
set autosetup(inittypes) {}
1291
+set autosetup(module) autosetup
12341292
12351293
# Embedded modules are inserted below here
12361294
set autosetup(installed) 1
12371295
set autosetup(sysinstall) 0
12381296
# ----- @module asciidoc-formatting.tcl -----
@@ -1432,28 +1490,28 @@
14321490
proc autosetup_help {what} {
14331491
use_pager
14341492
14351493
puts "Usage: [file tail $::autosetup(exe)] \[options\] \[settings\]\n"
14361494
puts "This is [autosetup_version], a build environment \"autoconfigurator\""
1437
- puts "See the documentation online at http://msteveb.github.com/autosetup/\n"
1438
-
1439
- if {$what eq "local"} {
1440
- if {[file exists $::autosetup(autodef)]} {
1441
- # This relies on auto.def having a call to 'options'
1442
- # which will display options and quit
1443
- source $::autosetup(autodef)
1444
- } else {
1445
- options-show
1446
- }
1447
- } else {
1448
- incr ::autosetup(showhelp)
1449
- if {[catch {use $what}]} {
1450
- user-error "Unknown module: $what"
1451
- } else {
1452
- options-show
1453
- }
1454
- }
1495
+ puts "See the documentation online at https://msteveb.github.io/autosetup/\n"
1496
+
1497
+ if {$what in {all local}} {
1498
+ # Need to load auto.def now
1499
+ if {[file exists $::autosetup(autodef)]} {
1500
+ # Load auto.def as module "auto.def"
1501
+ autosetup_load_module auto.def source $::autosetup(autodef)
1502
+ }
1503
+ if {$what eq "all"} {
1504
+ set what *
1505
+ } else {
1506
+ set what auto.def
1507
+ }
1508
+ } else {
1509
+ use $what
1510
+ puts "Options for module $what:"
1511
+ }
1512
+ options-show $what
14551513
exit 0
14561514
}
14571515
14581516
proc autosetup_show_license {} {
14591517
global modsource autosetup
@@ -1505,11 +1563,12 @@
15051563
title "[autosetup_version] -- Command Reference"
15061564
15071565
section {Introduction}
15081566
15091567
p {
1510
- See http://msteveb.github.com/autosetup/ for the online documentation for 'autosetup'
1568
+ See https://msteveb.github.io/autosetup/ for the online documentation for 'autosetup'.
1569
+ This documentation can also be accessed locally with `autosetup --ref`.
15111570
}
15121571
15131572
p {
15141573
'autosetup' provides a number of built-in commands which
15151574
are documented below. These may be used from 'auto.def' to test
@@ -1568,10 +1627,15 @@
15681627
set modulename [file rootname [file tail $file]]
15691628
set current _core_
15701629
set f [open $file]
15711630
while {![eof $f]} {
15721631
set line [gets $f]
1632
+
1633
+ if {[regexp {^#.*@section (.*)$} $line -> section]} {
1634
+ lappend doc($current) [list section $section]
1635
+ continue
1636
+ }
15731637
15741638
# Find embedded module names
15751639
if {[regexp {^#.*@module ([^ ]*)} $line -> modulename]} {
15761640
continue
15771641
}
@@ -1583,11 +1647,11 @@
15831647
15841648
# Synopsis or command?
15851649
if {$cmd eq "synopsis:"} {
15861650
set current $modulename
15871651
lappend doc($current) [list section "Module: $modulename"]
1588
- } else {
1652
+ } else {
15891653
lappend doc($current) [list subsection $cmd]
15901654
}
15911655
15921656
set lines {}
15931657
set type p
@@ -1863,10 +1927,11 @@
18631927
}
18641928
} else {
18651929
writefile configure \
18661930
{#!/bin/sh
18671931
dir="`dirname "$0"`/autosetup"
1932
+#@@INITCHECK@@#
18681933
WRAPPER="$0"; export WRAPPER; exec "`"$dir/autosetup-find-tclsh"`" "$dir/autosetup" "$@"
18691934
}
18701935
}
18711936
catch {exec chmod 755 configure}
18721937
}
@@ -1909,11 +1974,11 @@
19091974
*.tcl files in this directory are optional modules which
19101975
can be loaded with the 'use' directive.
19111976
19121977
*.auto files in this directory are auto-loaded.
19131978
1914
-For more information, see http://msteveb.github.com/autosetup/
1979
+For more information, see https://msteveb.github.io/autosetup/
19151980
}
19161981
dputs "install: autosetup/README.autosetup"
19171982
writefile $target $readme
19181983
}
19191984
}
@@ -2043,10 +2108,23 @@
20432108
return -code error "environment variable \"$name\" does not exist"
20442109
}
20452110
proc isatty? {channel} {
20462111
dict exists [fconfigure $channel] -xchar
20472112
}
2113
+ # Jim-compatible stacktrace using info frame
2114
+ proc stacktrace {} {
2115
+ set stacktrace {}
2116
+ # 2 to skip the current frame
2117
+ for {set i 2} {$i < [info frame]} {incr i} {
2118
+ set frame [info frame -$i]
2119
+ if {[dict exists $frame file]} {
2120
+ # We don't need proc, so use ""
2121
+ lappend stacktrace "" [dict get $frame file] [dict get $frame line]
2122
+ }
2123
+ }
2124
+ return $stacktrace
2125
+ }
20482126
} else {
20492127
if {$autosetup(iswin)} {
20502128
# On Windows, backslash convert all environment variables
20512129
# (Assume that Tcl does this for us)
20522130
proc getenv {name args} {
@@ -2096,20 +2174,15 @@
20962174
proc error-location {msg} {
20972175
if {$::autosetup(debug)} {
20982176
return -code error $msg
20992177
}
21002178
# Search back through the stack trace for the first error in a .def file
2101
- for {set i 1} {$i < [info level]} {incr i} {
2102
- if {$::autosetup(istcl)} {
2103
- array set info [info frame -$i]
2104
- } else {
2105
- lassign [info frame -$i] info(caller) info(file) info(line)
2106
- }
2107
- if {[string match *.def $info(file)]} {
2108
- return "[relative-path $info(file)]:$info(line): Error: $msg"
2109
- }
2110
- #puts "Skipping $info(file):$info(line)"
2179
+ foreach {p f l} [stacktrace] {
2180
+ if {[string match *.def $f]} {
2181
+ return "[relative-path $f]:$l: Error: $msg"
2182
+ }
2183
+ #puts "Skipping $f:$l"
21112184
}
21122185
return $msg
21132186
}
21142187
21152188
# If everything is working properly, the only errors which occur
@@ -2298,10 +2371,12 @@
22982371
set modsource(util.tcl) {
22992372
# Copyright (c) 2012 WorkWare Systems http://www.workware.net.au/
23002373
# All rights reserved
23012374
23022375
# Module which contains miscellaneous utility functions
2376
+
2377
+# @section Utilities
23032378
23042379
# @compare-versions version1 version2
23052380
#
23062381
# Versions are of the form 'a.b.c' (may be any number of numeric components)
23072382
#
23082383
--- autosetup/autosetup
+++ autosetup/autosetup
@@ -4,11 +4,11 @@
4 # vim:se syntax=tcl:
5 # \
6 dir=`dirname "$0"`; exec "`$dir/autosetup-find-tclsh`" "$0" "$@"
7
8 # Note that the version has a trailing + on unreleased versions
9 set autosetup(version) 0.6.9
10
11 # Can be set to 1 to debug early-init problems
12 set autosetup(debug) [expr {"--debug" in $argv}]
13
14 ##################################################################
@@ -91,17 +91,17 @@
91 # We simply parse anything that looks like an option
92 set autosetup(getopt) [getopt argv]
93
94 #"=Core Options:"
95 options-add {
96 help:=local => "display help and options. Optionally specify a module name, such as --help=system"
97 licence license => "display the autosetup license"
98 version => "display the version of autosetup"
99 ref:=text manual:=text
100 reference:=text => "display the autosetup command reference. 'text', 'wiki', 'asciidoc' or 'markdown'"
101 debug => "display debugging output as autosetup runs"
102 install:=. => "install autosetup to the current or given directory"
103 }
104 if {$autosetup(installed)} {
105 # hidden options so we can produce a nice error
106 options-add {
107 sysinstall:path
@@ -202,24 +202,21 @@
202 }
203 }
204
205 autosetup_add_dep $autosetup(autodef)
206
207 define CONFIGURE_OPTS ""
208 foreach arg $autosetup(argv) {
209 define-append CONFIGURE_OPTS [quote-if-needed $arg]
210 }
211 define AUTOREMAKE [file-normalize $autosetup(exe)]
212 define-append AUTOREMAKE [get-define CONFIGURE_OPTS]
213
214
215 # Log how we were invoked
216 configlog "Invoked as: [getenv WRAPPER $::argv0] [quote-argv $autosetup(argv)]"
217 configlog "Tclsh: [info nameofexecutable]"
218
219 # Note that auto.def is *not* loaded in the global scope
220 source $autosetup(autodef)
221
222 # Could warn here if options {} was not specified
223
224 show-notices
225
@@ -231,10 +228,12 @@
231 }
232 }
233
234 exit 0
235 }
 
 
236
237 # @opt-bool ?-nodefault? option ...
238 #
239 # Check each of the named, boolean options and if any have been explicitly enabled
240 # or disabled by the user, return 1 or 0 accordingly.
@@ -340,12 +339,12 @@
340 }
341
342 if {![info exists result]} {
343 # No user-specified value. Has options-defaults been set?
344 foreach opt $names {
345 if {[dict exists $::autosetup(options-defaults) $opt]} {
346 set result [dict get $autosetup(options-defaults) $opt]
347 }
348 }
349 }
350
351 if {[info exists result]} {
@@ -373,11 +372,11 @@
373 }
374
375 # Parse the option definition in $opts and update
376 # ::autosetup(setoptions) and ::autosetup(optionhelp) appropriately
377 #
378 proc options-add {opts {header ""}} {
379 global autosetup
380
381 # First weed out comment lines
382 set realopts {}
383 foreach line [split $opts \n] {
@@ -389,12 +388,11 @@
389
390 for {set i 0} {$i < [llength $opts]} {incr i} {
391 set opt [lindex $opts $i]
392 if {[string match =* $opt]} {
393 # This is a special heading
394 lappend autosetup(optionhelp) $opt ""
395 set header {}
396 continue
397 }
398 unset -nocomplain defaultvalue equal value
399
400 #puts "i=$i, opt=$opt"
@@ -451,12 +449,12 @@
451 }
452 } else {
453 # String option.
454 lappend autosetup(options) $name
455
456 if {$colon eq ":"} {
457 # Was ":name=default" given?
458 # If so, set $value to the display name and $defaultvalue to the default
459 # (This is the preferred way to set a default value for a string option)
460 if {[regexp {^([^=]+)=(.*)$} $value -> value defaultvalue]} {
461 dict set autosetup(optdefault) $name $defaultvalue
462 }
@@ -466,13 +464,13 @@
466 if {[dict exists $autosetup(options-defaults) $name]} {
467 # A default was specified with options-defaults, so use it
468 set defaultvalue [dict get $autosetup(options-defaults) $name]
469 dict set autosetup(optdefault) $name $defaultvalue
470 } elseif {![info exists defaultvalue]} {
471 # For backward compatibility, if ":name" was given, use name as both
472 # the display text and the default value, but only if the user
473 # specified the option without the value
474 set defaultvalue $value
475 }
476
477 if {$equal eq "="} {
478 # String option with optional value
@@ -507,39 +505,22 @@
507 if {[lindex $opts $i+1] eq "=>"} {
508 set desc [lindex $opts $i+2]
509 if {[info exists defaultvalue]} {
510 set desc [string map [list @default@ $defaultvalue] $desc]
511 }
512 #string match \n* $desc
513 if {$header ne ""} {
514 lappend autosetup(optionhelp) $header ""
515 set header ""
516 }
517 # A multi-line description
518 lappend autosetup(optionhelp) $opthelp $desc
519 incr i 2
520 }
521 }
522 }
523
524 # @module-options optionlist
525 #
526 # Like 'options', but used within a module.
527 proc module-options {opts} {
528 set header ""
529 if {$::autosetup(showhelp) > 1 && [llength $opts]} {
530 set header "Module Options:"
531 }
532 options-add $opts $header
533
534 if {$::autosetup(showhelp)} {
535 # Ensure that the module isn't executed on --help
536 # We are running under eval or source, so use break
537 # to prevent further execution
538 #return -code break -level 2
539 return -code break
540 }
541 }
542
543 proc max {a b} {
544 expr {$a > $b ? $a : $b}
545 }
@@ -564,36 +545,53 @@
564 if {$len} {
565 puts ""
566 }
567 }
568
569 proc options-show {} {
 
 
 
570 # Determine the max option width
571 set max 0
572 foreach {opt desc} $::autosetup(optionhelp) {
 
 
 
 
573 if {[string match =* $opt] || [string match \n* $desc]} {
574 continue
575 }
576 set max [max $max [string length $opt]]
577 }
578 set indent [string repeat " " [expr $max+4]]
579 set cols [getenv COLUMNS 80]
580 catch {
581 lassign [exec stty size] rows cols
582 }
583 incr cols -1
584 # Now output
585 foreach {opt desc} $::autosetup(optionhelp) {
 
 
 
 
 
 
 
 
586 if {[string match =* $opt]} {
 
587 puts [string range $opt 1 end]
588 continue
589 }
590 puts -nonewline " [format %-${max}s $opt]"
591 if {[string match \n* $desc]} {
 
592 puts $desc
593 } else {
594 options-wrap-desc [string trim $desc] $cols " " $indent [expr $max + 2]
595 }
596 }
597 }
598
599 # @options optionspec
@@ -608,16 +606,20 @@
608 #
609 # The default is 'name=0', meaning that the option is disabled by default.
610 # If 'name=1' is used to make the option enabled by default, the description should reflect
611 # that with text like "Disable support for ...".
612 #
613 # An argument option (one which takes a parameter) is of the form:
614 #
615 ## name:[=]value => "Description of this option"
 
 
616 #
617 # If the 'name:value' form is used, the value must be provided with the option (as '--name=myvalue').
618 # If the 'name:=value' form is used, the value is optional and the given value is used as the default
 
 
619 # if it is not provided.
620 #
621 # The description may contain '@default@', in which case it will be replaced with the default
622 # value for the option (taking into account defaults specified with 'options-defaults'.
623 #
@@ -627,23 +629,26 @@
627 # For example, '--disable-lfs' is an alias for '--disable=largefile':
628 #
629 ## lfs=1 largefile=1 => "Disable large file support"
630 #
631 proc options {optlist} {
632 # Allow options as a list or args
633 options-add $optlist "Local Options:"
634
635 if {$::autosetup(showhelp)} {
636 options-show
637 exit 0
 
 
638 }
639
640 # Check for invalid options
641 if {[opt-bool option-checking]} {
642 foreach o [dict keys $::autosetup(getopt)] {
643 if {$o ni $::autosetup(options)} {
644 user-error "Unknown option --$o"
 
 
645 }
646 }
647 }
648 }
649
@@ -677,10 +682,12 @@
677 }
678 }
679 return $alias
680 }
681
 
 
682 # @define name ?value=1?
683 #
684 # Defines the named variable to the given value.
685 # These (name, value) pairs represent the results of the configuration check
686 # and are available to be subsequently checked, modified and substituted.
@@ -687,10 +694,33 @@
687 #
688 proc define {name {value 1}} {
689 set ::define($name) $value
690 #dputs "$name <= $value"
691 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
692
693 # @undefine name
694 #
695 # Undefine the named variable.
696 #
@@ -703,34 +733,48 @@
703 #
704 # Appends the given value(s) to the given "defined" variable.
705 # If the variable is not defined or empty, it is set to '$value'.
706 # Otherwise the value is appended, separated by a space.
707 # Any extra values are similarly appended.
708 # If any value is already contained in the variable (as a substring) it is omitted.
 
 
709 #
710 proc define-append {name args} {
711 if {[get-define $name ""] ne ""} {
712 # Avoid duplicates
713 foreach arg $args {
714 if {$arg eq ""} {
715 continue
716 }
717 set found 0
718 foreach str [split $::define($name) " "] {
719 if {$str eq $arg} {
720 incr found
721 }
722 }
723 if {!$found} {
724 append ::define($name) " " $arg
725 }
726 }
727 } else {
728 set ::define($name) [join $args]
729 }
730 #dputs "$name += [join $args] => $::define($name)"
731 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
732
733 # @get-define name ?default=0?
734 #
735 # Returns the current value of the "defined" variable, or '$default'
736 # if not set.
@@ -773,10 +817,11 @@
773 #
774 proc all-defines {} {
775 array get ::define
776 }
777
 
778
779 # @get-env name default
780 #
781 # If '$name' was specified on the command line, return it.
782 # Otherwise if '$name' was set in the environment, return it.
@@ -855,10 +900,12 @@
855 lappend result $p
856 }
857 }
858 return $result
859 }
 
 
860
861 # @find-executable-path name
862 #
863 # Searches the path for an executable with the given name.
864 # Note that the name may include some parameters, e.g. 'cc -mbig-endian',
@@ -924,10 +971,12 @@
924 user-error "failed to find one of: [join $args]"
925 }
926 }
927 return ""
928 }
 
 
929
930 # @configlog msg
931 #
932 # Writes the given message to the configuration log, 'config.log'.
933 #
@@ -1141,10 +1190,12 @@
1141 # The name will be normalised (converted to a full path)
1142 #
1143 proc autosetup_add_dep {filename} {
1144 lappend ::autosetup(deps) [file-normalize $filename]
1145 }
 
 
1146
1147 ##################################################################
1148 #
1149 # Library module support
1150 #
@@ -1171,12 +1222,13 @@
1171 foreach m $args {
1172 if {[info exists libmodule($m)]} {
1173 continue
1174 }
1175 set libmodule($m) 1
 
1176 if {[info exists modsource(${m}.tcl)]} {
1177 automf_load eval $modsource(${m}.tcl)
1178 } else {
1179 set locs [list ${m}.tcl ${m}/init.tcl]
1180 set found 0
1181 foreach dir $dirs {
1182 foreach loc $locs {
@@ -1192,11 +1244,11 @@
1192 }
1193 if {$found} {
1194 # For the convenience of the "use" source, point to the directory
1195 # it is being loaded from
1196 set ::usedir [file dirname $source]
1197 automf_load source $source
1198 autosetup_add_dep $source
1199 } else {
1200 autosetup-error "use: No such module: $m"
1201 }
1202 }
@@ -1205,23 +1257,28 @@
1205
1206 proc autosetup_load_auto_modules {} {
1207 global autosetup modsource
1208 # First load any embedded auto modules
1209 foreach mod [array names modsource *.auto] {
1210 automf_load eval $modsource($mod)
1211 }
1212 # Now any external auto modules
1213 foreach file [glob -nocomplain $autosetup(libdir)/*.auto $autosetup(libdir)/*/*.auto] {
1214 automf_load source $file
1215 }
1216 }
1217
1218 # Load module source in the global scope by executing the given command
1219 proc automf_load {args} {
 
 
 
 
1220 if {[catch [list uplevel #0 $args] msg opts] ni {0 2 3}} {
1221 autosetup-full-error [error-dump $msg $opts $::autosetup(debug)]
1222 }
 
1223 }
1224
1225 # Initial settings
1226 set autosetup(exe) $::argv0
1227 set autosetup(istcl) 1
@@ -1229,10 +1286,11 @@
1229 set autosetup(installed) 0
1230 set autosetup(sysinstall) 0
1231 set autosetup(msg-checking) 0
1232 set autosetup(msg-quiet) 0
1233 set autosetup(inittypes) {}
 
1234
1235 # Embedded modules are inserted below here
1236 set autosetup(installed) 1
1237 set autosetup(sysinstall) 0
1238 # ----- @module asciidoc-formatting.tcl -----
@@ -1432,28 +1490,28 @@
1432 proc autosetup_help {what} {
1433 use_pager
1434
1435 puts "Usage: [file tail $::autosetup(exe)] \[options\] \[settings\]\n"
1436 puts "This is [autosetup_version], a build environment \"autoconfigurator\""
1437 puts "See the documentation online at http://msteveb.github.com/autosetup/\n"
1438
1439 if {$what eq "local"} {
1440 if {[file exists $::autosetup(autodef)]} {
1441 # This relies on auto.def having a call to 'options'
1442 # which will display options and quit
1443 source $::autosetup(autodef)
1444 } else {
1445 options-show
1446 }
1447 } else {
1448 incr ::autosetup(showhelp)
1449 if {[catch {use $what}]} {
1450 user-error "Unknown module: $what"
1451 } else {
1452 options-show
1453 }
1454 }
1455 exit 0
1456 }
1457
1458 proc autosetup_show_license {} {
1459 global modsource autosetup
@@ -1505,11 +1563,12 @@
1505 title "[autosetup_version] -- Command Reference"
1506
1507 section {Introduction}
1508
1509 p {
1510 See http://msteveb.github.com/autosetup/ for the online documentation for 'autosetup'
 
1511 }
1512
1513 p {
1514 'autosetup' provides a number of built-in commands which
1515 are documented below. These may be used from 'auto.def' to test
@@ -1568,10 +1627,15 @@
1568 set modulename [file rootname [file tail $file]]
1569 set current _core_
1570 set f [open $file]
1571 while {![eof $f]} {
1572 set line [gets $f]
 
 
 
 
 
1573
1574 # Find embedded module names
1575 if {[regexp {^#.*@module ([^ ]*)} $line -> modulename]} {
1576 continue
1577 }
@@ -1583,11 +1647,11 @@
1583
1584 # Synopsis or command?
1585 if {$cmd eq "synopsis:"} {
1586 set current $modulename
1587 lappend doc($current) [list section "Module: $modulename"]
1588 } else {
1589 lappend doc($current) [list subsection $cmd]
1590 }
1591
1592 set lines {}
1593 set type p
@@ -1863,10 +1927,11 @@
1863 }
1864 } else {
1865 writefile configure \
1866 {#!/bin/sh
1867 dir="`dirname "$0"`/autosetup"
 
1868 WRAPPER="$0"; export WRAPPER; exec "`"$dir/autosetup-find-tclsh"`" "$dir/autosetup" "$@"
1869 }
1870 }
1871 catch {exec chmod 755 configure}
1872 }
@@ -1909,11 +1974,11 @@
1909 *.tcl files in this directory are optional modules which
1910 can be loaded with the 'use' directive.
1911
1912 *.auto files in this directory are auto-loaded.
1913
1914 For more information, see http://msteveb.github.com/autosetup/
1915 }
1916 dputs "install: autosetup/README.autosetup"
1917 writefile $target $readme
1918 }
1919 }
@@ -2043,10 +2108,23 @@
2043 return -code error "environment variable \"$name\" does not exist"
2044 }
2045 proc isatty? {channel} {
2046 dict exists [fconfigure $channel] -xchar
2047 }
 
 
 
 
 
 
 
 
 
 
 
 
 
2048 } else {
2049 if {$autosetup(iswin)} {
2050 # On Windows, backslash convert all environment variables
2051 # (Assume that Tcl does this for us)
2052 proc getenv {name args} {
@@ -2096,20 +2174,15 @@
2096 proc error-location {msg} {
2097 if {$::autosetup(debug)} {
2098 return -code error $msg
2099 }
2100 # Search back through the stack trace for the first error in a .def file
2101 for {set i 1} {$i < [info level]} {incr i} {
2102 if {$::autosetup(istcl)} {
2103 array set info [info frame -$i]
2104 } else {
2105 lassign [info frame -$i] info(caller) info(file) info(line)
2106 }
2107 if {[string match *.def $info(file)]} {
2108 return "[relative-path $info(file)]:$info(line): Error: $msg"
2109 }
2110 #puts "Skipping $info(file):$info(line)"
2111 }
2112 return $msg
2113 }
2114
2115 # If everything is working properly, the only errors which occur
@@ -2298,10 +2371,12 @@
2298 set modsource(util.tcl) {
2299 # Copyright (c) 2012 WorkWare Systems http://www.workware.net.au/
2300 # All rights reserved
2301
2302 # Module which contains miscellaneous utility functions
 
 
2303
2304 # @compare-versions version1 version2
2305 #
2306 # Versions are of the form 'a.b.c' (may be any number of numeric components)
2307 #
2308
--- autosetup/autosetup
+++ autosetup/autosetup
@@ -4,11 +4,11 @@
4 # vim:se syntax=tcl:
5 # \
6 dir=`dirname "$0"`; exec "`$dir/autosetup-find-tclsh`" "$0" "$@"
7
8 # Note that the version has a trailing + on unreleased versions
9 set autosetup(version) 0.7.2
10
11 # Can be set to 1 to debug early-init problems
12 set autosetup(debug) [expr {"--debug" in $argv}]
13
14 ##################################################################
@@ -91,17 +91,17 @@
91 # We simply parse anything that looks like an option
92 set autosetup(getopt) [getopt argv]
93
94 #"=Core Options:"
95 options-add {
96 help:=all => "display help and options. Optional: module name, such as --help=system"
97 licence license => "display the autosetup license"
98 version => "display the version of autosetup"
99 ref:=text manual:=text
100 reference:=text => "display the autosetup command reference. 'text', 'wiki', 'asciidoc' or 'markdown'"
101 debug => "display debugging output as autosetup runs"
102 install:=. => "install autosetup to the current or given directory"
103 }
104 if {$autosetup(installed)} {
105 # hidden options so we can produce a nice error
106 options-add {
107 sysinstall:path
@@ -202,24 +202,21 @@
202 }
203 }
204
205 autosetup_add_dep $autosetup(autodef)
206
207 # Add $argv to CONFIGURE_OPTS
208 define-append-argv CONFIGURE_OPTS {*}$autosetup(argv)
209 # Set up AUTOREMAKE to reconfigure with the same args
210 define-append-argv AUTOREMAKE {*}$autosetup(exe) {*}$autosetup(argv)
 
 
 
211
212 # Log how we were invoked
213 configlog "Invoked as: [getenv WRAPPER $::argv0] [quote-argv $autosetup(argv)]"
214 configlog "Tclsh: [info nameofexecutable]"
215
216 # Load auto.def as module "auto.def"
217 autosetup_load_module auto.def source $autosetup(autodef)
218
219 # Could warn here if options {} was not specified
220
221 show-notices
222
@@ -231,10 +228,12 @@
228 }
229 }
230
231 exit 0
232 }
233
234 # @section Option Handling
235
236 # @opt-bool ?-nodefault? option ...
237 #
238 # Check each of the named, boolean options and if any have been explicitly enabled
239 # or disabled by the user, return 1 or 0 accordingly.
@@ -340,12 +339,12 @@
339 }
340
341 if {![info exists result]} {
342 # No user-specified value. Has options-defaults been set?
343 foreach opt $names {
344 if {[dict exists $::autosetup(optdefault) $opt]} {
345 set result [dict get $autosetup(optdefault) $opt]
346 }
347 }
348 }
349
350 if {[info exists result]} {
@@ -373,11 +372,11 @@
372 }
373
374 # Parse the option definition in $opts and update
375 # ::autosetup(setoptions) and ::autosetup(optionhelp) appropriately
376 #
377 proc options-add {opts} {
378 global autosetup
379
380 # First weed out comment lines
381 set realopts {}
382 foreach line [split $opts \n] {
@@ -389,12 +388,11 @@
388
389 for {set i 0} {$i < [llength $opts]} {incr i} {
390 set opt [lindex $opts $i]
391 if {[string match =* $opt]} {
392 # This is a special heading
393 lappend autosetup(optionhelp) [list $opt $autosetup(module)]
 
394 continue
395 }
396 unset -nocomplain defaultvalue equal value
397
398 #puts "i=$i, opt=$opt"
@@ -451,12 +449,12 @@
449 }
450 } else {
451 # String option.
452 lappend autosetup(options) $name
453
454 if {$equal ne "="} {
455 # Was the option given as "name:value=default"?
456 # If so, set $value to the display name and $defaultvalue to the default
457 # (This is the preferred way to set a default value for a string option)
458 if {[regexp {^([^=]+)=(.*)$} $value -> value defaultvalue]} {
459 dict set autosetup(optdefault) $name $defaultvalue
460 }
@@ -466,13 +464,13 @@
464 if {[dict exists $autosetup(options-defaults) $name]} {
465 # A default was specified with options-defaults, so use it
466 set defaultvalue [dict get $autosetup(options-defaults) $name]
467 dict set autosetup(optdefault) $name $defaultvalue
468 } elseif {![info exists defaultvalue]} {
469 # No default value was given by value=default or options-defaults
470 # so use the value as the default when the plain option with no
471 # value is given (.e.g. just --opt instead of --opt=value)
472 set defaultvalue $value
473 }
474
475 if {$equal eq "="} {
476 # String option with optional value
@@ -507,39 +505,22 @@
505 if {[lindex $opts $i+1] eq "=>"} {
506 set desc [lindex $opts $i+2]
507 if {[info exists defaultvalue]} {
508 set desc [string map [list @default@ $defaultvalue] $desc]
509 }
 
 
 
 
 
510 # A multi-line description
511 lappend autosetup(optionhelp) [list $opthelp $autosetup(module) $desc]
512 incr i 2
513 }
514 }
515 }
516
517 # @module-options optionlist
518 #
519 # Deprecated. Simply use 'options' from within a module.
520 proc module-options {opts} {
521 options $opts
 
 
 
 
 
 
 
 
 
 
 
 
522 }
523
524 proc max {a b} {
525 expr {$a > $b ? $a : $b}
526 }
@@ -564,36 +545,53 @@
545 if {$len} {
546 puts ""
547 }
548 }
549
550 # Display options (from $autosetup(optionhelp)) for modules that match
551 # glob pattern $what
552 proc options-show {what} {
553 set local 0
554 # Determine the max option width
555 set max 0
556 foreach help $::autosetup(optionhelp) {
557 lassign $help opt module desc
558 if {![string match $what $module]} {
559 continue
560 }
561 if {[string match =* $opt] || [string match \n* $desc]} {
562 continue
563 }
564 set max [max $max [string length $opt]]
565 }
566 set indent [string repeat " " [expr {$max+4}]]
567 set cols [getenv COLUMNS 80]
568 catch {
569 lassign [exec stty size] rows cols
570 }
571 incr cols -1
572 # Now output
573 foreach help $::autosetup(optionhelp) {
574 lassign $help opt module desc
575 if {![string match $what $module]} {
576 continue
577 }
578 if {$local == 0 && $module eq "auto.def"} {
579 puts "Local Options:"
580 incr local
581 }
582 if {[string match =* $opt]} {
583 # Output a special heading line"
584 puts [string range $opt 1 end]
585 continue
586 }
587 puts -nonewline " [format %-${max}s $opt]"
588 if {[string match \n* $desc]} {
589 # Output a pre-formatted help description as-is
590 puts $desc
591 } else {
592 options-wrap-desc [string trim $desc] $cols " " $indent [expr {$max+2}]
593 }
594 }
595 }
596
597 # @options optionspec
@@ -608,16 +606,20 @@
606 #
607 # The default is 'name=0', meaning that the option is disabled by default.
608 # If 'name=1' is used to make the option enabled by default, the description should reflect
609 # that with text like "Disable support for ...".
610 #
611 # An argument option (one which takes a parameter) is of one of the following forms:
612 #
613 ## name:value => "Description of this option"
614 ## name:value=default => "Description of this option with a default value"
615 ## name:=value => "Description of this option with an optional value"
616 #
617 # If the 'name:value' form is used, the value must be provided with the option (as '--name=myvalue').
618 # If the 'name:value=default' form is used, the option has the given default value even if not
619 # specified by the user.
620 # If the 'name:=value' form is used, the value is optional and the given value is used
621 # if it is not provided.
622 #
623 # The description may contain '@default@', in which case it will be replaced with the default
624 # value for the option (taking into account defaults specified with 'options-defaults'.
625 #
@@ -627,23 +629,26 @@
629 # For example, '--disable-lfs' is an alias for '--disable=largefile':
630 #
631 ## lfs=1 largefile=1 => "Disable large file support"
632 #
633 proc options {optlist} {
634 global autosetup
 
635
636 options-add $optlist
637
638 if {$autosetup(showhelp)} {
639 # If --help, stop now to show help
640 return -code break
641 }
642
643 if {$autosetup(module) eq "auto.def"} {
644 # Check for invalid options
645 if {[opt-bool option-checking]} {
646 foreach o [dict keys $::autosetup(getopt)] {
647 if {$o ni $::autosetup(options)} {
648 user-error "Unknown option --$o"
649 }
650 }
651 }
652 }
653 }
654
@@ -677,10 +682,12 @@
682 }
683 }
684 return $alias
685 }
686
687 # @section Variable Definitions (defines)
688
689 # @define name ?value=1?
690 #
691 # Defines the named variable to the given value.
692 # These (name, value) pairs represent the results of the configuration check
693 # and are available to be subsequently checked, modified and substituted.
@@ -687,10 +694,33 @@
694 #
695 proc define {name {value 1}} {
696 set ::define($name) $value
697 #dputs "$name <= $value"
698 }
699
700 # @define-push {name ...} script
701 #
702 # Save the values of the given defines, evaluation the script, then restore.
703 # For example, to avoid updating AS_FLAGS and AS_CXXFLAGS:
704 ## define-push {AS_CFLAGS AS_CXXFLAGS} {
705 ## cc-check-flags -Wno-error
706 ## }
707 proc define-push {names script} {
708 array set unset {}
709 foreach name $names {
710 if {[is-defined $name]} {
711 set save($name) [get-define $name]
712 } else {
713 set unset($name) 1
714 }
715 }
716 uplevel 1 $script
717 array set ::define [array get save]
718 foreach name [array names unset] {
719 unset -nocomplain ::define($name)
720 }
721 }
722
723 # @undefine name
724 #
725 # Undefine the named variable.
726 #
@@ -703,34 +733,48 @@
733 #
734 # Appends the given value(s) to the given "defined" variable.
735 # If the variable is not defined or empty, it is set to '$value'.
736 # Otherwise the value is appended, separated by a space.
737 # Any extra values are similarly appended.
738 #
739 # Note that define-append is not designed to add values containing spaces.
740 # If values may contain spaces, consider define-append-argv instead.
741 #
742 proc define-append {name args} {
743 if {[get-define $name ""] ne ""} {
 
744 foreach arg $args {
745 if {$arg eq ""} {
746 continue
747 }
748 append ::define($name) " " $arg
 
 
 
 
 
 
 
 
749 }
750 } else {
751 set ::define($name) [join $args]
752 }
753 #dputs "$name += [join $args] => $::define($name)"
754 }
755
756 # @define-append-argv name value ...
757 #
758 # Similar to define-append except designed to construct shell command
759 # lines, including correct handling of parameters with spaces.
760 #
761 # Each non-empty value is quoted if necessary and then appended to the given variable
762 # if it does not already exist.
763 #
764 proc define-append-argv {name args} {
765 set seen {}
766 set new {}
767 foreach val [list {*}[get-define $name ""] {*}$args] {
768 if {$val ne {} && ![dict exists $seen $val]} {
769 lappend new [quote-if-needed $val]
770 dict set seen $val 1
771 }
772 }
773 set ::define($name) [join $new " "]
774 #dputs "$name += [join $args] => $::define($name)"
775 }
776
777 # @get-define name ?default=0?
778 #
779 # Returns the current value of the "defined" variable, or '$default'
780 # if not set.
@@ -773,10 +817,11 @@
817 #
818 proc all-defines {} {
819 array get ::define
820 }
821
822 # @section Environment/Helpers
823
824 # @get-env name default
825 #
826 # If '$name' was specified on the command line, return it.
827 # Otherwise if '$name' was set in the environment, return it.
@@ -855,10 +900,12 @@
900 lappend result $p
901 }
902 }
903 return $result
904 }
905
906 # @section Paths, Searching
907
908 # @find-executable-path name
909 #
910 # Searches the path for an executable with the given name.
911 # Note that the name may include some parameters, e.g. 'cc -mbig-endian',
@@ -924,10 +971,12 @@
971 user-error "failed to find one of: [join $args]"
972 }
973 }
974 return ""
975 }
976
977 # @section Logging, Messages and Errors
978
979 # @configlog msg
980 #
981 # Writes the given message to the configuration log, 'config.log'.
982 #
@@ -1141,10 +1190,12 @@
1190 # The name will be normalised (converted to a full path)
1191 #
1192 proc autosetup_add_dep {filename} {
1193 lappend ::autosetup(deps) [file-normalize $filename]
1194 }
1195
1196 # @section Modules Support
1197
1198 ##################################################################
1199 #
1200 # Library module support
1201 #
@@ -1171,12 +1222,13 @@
1222 foreach m $args {
1223 if {[info exists libmodule($m)]} {
1224 continue
1225 }
1226 set libmodule($m) 1
1227
1228 if {[info exists modsource(${m}.tcl)]} {
1229 autosetup_load_module $m eval $modsource(${m}.tcl)
1230 } else {
1231 set locs [list ${m}.tcl ${m}/init.tcl]
1232 set found 0
1233 foreach dir $dirs {
1234 foreach loc $locs {
@@ -1192,11 +1244,11 @@
1244 }
1245 if {$found} {
1246 # For the convenience of the "use" source, point to the directory
1247 # it is being loaded from
1248 set ::usedir [file dirname $source]
1249 autosetup_load_module $m source $source
1250 autosetup_add_dep $source
1251 } else {
1252 autosetup-error "use: No such module: $m"
1253 }
1254 }
@@ -1205,23 +1257,28 @@
1257
1258 proc autosetup_load_auto_modules {} {
1259 global autosetup modsource
1260 # First load any embedded auto modules
1261 foreach mod [array names modsource *.auto] {
1262 autosetup_load_module $mod eval $modsource($mod)
1263 }
1264 # Now any external auto modules
1265 foreach file [glob -nocomplain $autosetup(libdir)/*.auto $autosetup(libdir)/*/*.auto] {
1266 autosetup_load_module [file tail $file] source $file
1267 }
1268 }
1269
1270 # Load module source in the global scope by executing the given command
1271 proc autosetup_load_module {module args} {
1272 global autosetup
1273 set prev $autosetup(module)
1274 set autosetup(module) $module
1275
1276 if {[catch [list uplevel #0 $args] msg opts] ni {0 2 3}} {
1277 autosetup-full-error [error-dump $msg $opts $::autosetup(debug)]
1278 }
1279 set autosetup(module) $prev
1280 }
1281
1282 # Initial settings
1283 set autosetup(exe) $::argv0
1284 set autosetup(istcl) 1
@@ -1229,10 +1286,11 @@
1286 set autosetup(installed) 0
1287 set autosetup(sysinstall) 0
1288 set autosetup(msg-checking) 0
1289 set autosetup(msg-quiet) 0
1290 set autosetup(inittypes) {}
1291 set autosetup(module) autosetup
1292
1293 # Embedded modules are inserted below here
1294 set autosetup(installed) 1
1295 set autosetup(sysinstall) 0
1296 # ----- @module asciidoc-formatting.tcl -----
@@ -1432,28 +1490,28 @@
1490 proc autosetup_help {what} {
1491 use_pager
1492
1493 puts "Usage: [file tail $::autosetup(exe)] \[options\] \[settings\]\n"
1494 puts "This is [autosetup_version], a build environment \"autoconfigurator\""
1495 puts "See the documentation online at https://msteveb.github.io/autosetup/\n"
1496
1497 if {$what in {all local}} {
1498 # Need to load auto.def now
1499 if {[file exists $::autosetup(autodef)]} {
1500 # Load auto.def as module "auto.def"
1501 autosetup_load_module auto.def source $::autosetup(autodef)
1502 }
1503 if {$what eq "all"} {
1504 set what *
1505 } else {
1506 set what auto.def
1507 }
1508 } else {
1509 use $what
1510 puts "Options for module $what:"
1511 }
1512 options-show $what
1513 exit 0
1514 }
1515
1516 proc autosetup_show_license {} {
1517 global modsource autosetup
@@ -1505,11 +1563,12 @@
1563 title "[autosetup_version] -- Command Reference"
1564
1565 section {Introduction}
1566
1567 p {
1568 See https://msteveb.github.io/autosetup/ for the online documentation for 'autosetup'.
1569 This documentation can also be accessed locally with `autosetup --ref`.
1570 }
1571
1572 p {
1573 'autosetup' provides a number of built-in commands which
1574 are documented below. These may be used from 'auto.def' to test
@@ -1568,10 +1627,15 @@
1627 set modulename [file rootname [file tail $file]]
1628 set current _core_
1629 set f [open $file]
1630 while {![eof $f]} {
1631 set line [gets $f]
1632
1633 if {[regexp {^#.*@section (.*)$} $line -> section]} {
1634 lappend doc($current) [list section $section]
1635 continue
1636 }
1637
1638 # Find embedded module names
1639 if {[regexp {^#.*@module ([^ ]*)} $line -> modulename]} {
1640 continue
1641 }
@@ -1583,11 +1647,11 @@
1647
1648 # Synopsis or command?
1649 if {$cmd eq "synopsis:"} {
1650 set current $modulename
1651 lappend doc($current) [list section "Module: $modulename"]
1652 } else {
1653 lappend doc($current) [list subsection $cmd]
1654 }
1655
1656 set lines {}
1657 set type p
@@ -1863,10 +1927,11 @@
1927 }
1928 } else {
1929 writefile configure \
1930 {#!/bin/sh
1931 dir="`dirname "$0"`/autosetup"
1932 #@@INITCHECK@@#
1933 WRAPPER="$0"; export WRAPPER; exec "`"$dir/autosetup-find-tclsh"`" "$dir/autosetup" "$@"
1934 }
1935 }
1936 catch {exec chmod 755 configure}
1937 }
@@ -1909,11 +1974,11 @@
1974 *.tcl files in this directory are optional modules which
1975 can be loaded with the 'use' directive.
1976
1977 *.auto files in this directory are auto-loaded.
1978
1979 For more information, see https://msteveb.github.io/autosetup/
1980 }
1981 dputs "install: autosetup/README.autosetup"
1982 writefile $target $readme
1983 }
1984 }
@@ -2043,10 +2108,23 @@
2108 return -code error "environment variable \"$name\" does not exist"
2109 }
2110 proc isatty? {channel} {
2111 dict exists [fconfigure $channel] -xchar
2112 }
2113 # Jim-compatible stacktrace using info frame
2114 proc stacktrace {} {
2115 set stacktrace {}
2116 # 2 to skip the current frame
2117 for {set i 2} {$i < [info frame]} {incr i} {
2118 set frame [info frame -$i]
2119 if {[dict exists $frame file]} {
2120 # We don't need proc, so use ""
2121 lappend stacktrace "" [dict get $frame file] [dict get $frame line]
2122 }
2123 }
2124 return $stacktrace
2125 }
2126 } else {
2127 if {$autosetup(iswin)} {
2128 # On Windows, backslash convert all environment variables
2129 # (Assume that Tcl does this for us)
2130 proc getenv {name args} {
@@ -2096,20 +2174,15 @@
2174 proc error-location {msg} {
2175 if {$::autosetup(debug)} {
2176 return -code error $msg
2177 }
2178 # Search back through the stack trace for the first error in a .def file
2179 foreach {p f l} [stacktrace] {
2180 if {[string match *.def $f]} {
2181 return "[relative-path $f]:$l: Error: $msg"
2182 }
2183 #puts "Skipping $f:$l"
 
 
 
 
 
2184 }
2185 return $msg
2186 }
2187
2188 # If everything is working properly, the only errors which occur
@@ -2298,10 +2371,12 @@
2371 set modsource(util.tcl) {
2372 # Copyright (c) 2012 WorkWare Systems http://www.workware.net.au/
2373 # All rights reserved
2374
2375 # Module which contains miscellaneous utility functions
2376
2377 # @section Utilities
2378
2379 # @compare-versions version1 version2
2380 #
2381 # Versions are of the form 'a.b.c' (may be any number of numeric components)
2382 #
2383
--- autosetup/autosetup-config.guess
+++ autosetup/autosetup-config.guess
@@ -1,10 +1,12 @@
11
#! /bin/sh
22
# Attempt to guess a canonical system name.
3
-# Copyright 1992-2018 Free Software Foundation, Inc.
3
+# Copyright 1992-2021 Free Software Foundation, Inc.
44
5
-timestamp='2018-03-08'
5
+# shellcheck disable=SC2006,SC2268 # see below for rationale
6
+
7
+timestamp='2021-06-03'
68
79
# This file is free software; you can redistribute it and/or modify it
810
# under the terms of the GNU General Public License as published by
911
# the Free Software Foundation; either version 3 of the License, or
1012
# (at your option) any later version.
@@ -25,14 +27,22 @@
2527
# of the GNU General Public License, version 3 ("GPLv3").
2628
#
2729
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
2830
#
2931
# You can get the latest version of this script from:
30
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
32
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
3133
#
3234
# Please send patches to <[email protected]>.
3335
36
+
37
+# The "shellcheck disable" line above the timestamp inhibits complaints
38
+# about features and limitations of the classic Bourne shell that were
39
+# superseded or lifted in POSIX. However, this script identifies a wide
40
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
41
+# even some reasonably current systems (Solaris 10 as case-in-point) still
42
+# have a pre-POSIX /bin/sh.
43
+
3444
3545
me=`echo "$0" | sed -e 's,.*/,,'`
3646
3747
usage="\
3848
Usage: $0 [OPTION]
@@ -48,11 +58,11 @@
4858
4959
version="\
5060
GNU config.guess ($timestamp)
5161
5262
Originally written by Per Bothner.
53
-Copyright 1992-2018 Free Software Foundation, Inc.
63
+Copyright 1992-2021 Free Software Foundation, Inc.
5464
5565
This is free software; see the source for copying conditions. There is NO
5666
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
5767
5868
help="
@@ -82,11 +92,12 @@
8292
if test $# != 0; then
8393
echo "$me: too many arguments$help" >&2
8494
exit 1
8595
fi
8696
87
-trap 'exit 1' 1 2 15
97
+# Just in case it came from the environment.
98
+GUESS=
8899
89100
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
90101
# compiler to aid in system detection is discouraged as it requires
91102
# temporary files to be created and, as you can see below, it is a
92103
# headache to deal with in a portable fashion.
@@ -94,77 +105,94 @@
94105
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
95106
# use `HOST_CC' if defined, but it is deprecated.
96107
97108
# Portable tmp directory creation inspired by the Autoconf team.
98109
99
-set_cc_for_build='
100
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
101
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
102
-: ${TMPDIR=/tmp} ;
103
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
104
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
105
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
106
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
107
-dummy=$tmp/dummy ;
108
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
109
-case $CC_FOR_BUILD,$HOST_CC,$CC in
110
- ,,) echo "int x;" > "$dummy.c" ;
111
- for c in cc gcc c89 c99 ; do
112
- if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
113
- CC_FOR_BUILD="$c"; break ;
114
- fi ;
115
- done ;
116
- if test x"$CC_FOR_BUILD" = x ; then
117
- CC_FOR_BUILD=no_compiler_found ;
118
- fi
119
- ;;
120
- ,,*) CC_FOR_BUILD=$CC ;;
121
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
122
-esac ; set_cc_for_build= ;'
110
+tmp=
111
+# shellcheck disable=SC2172
112
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
113
+
114
+set_cc_for_build() {
115
+ # prevent multiple calls if $tmp is already set
116
+ test "$tmp" && return 0
117
+ : "${TMPDIR=/tmp}"
118
+ # shellcheck disable=SC2039,SC3028
119
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
120
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
121
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
122
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
123
+ dummy=$tmp/dummy
124
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
125
+ ,,) echo "int x;" > "$dummy.c"
126
+ for driver in cc gcc c89 c99 ; do
127
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
128
+ CC_FOR_BUILD=$driver
129
+ break
130
+ fi
131
+ done
132
+ if test x"$CC_FOR_BUILD" = x ; then
133
+ CC_FOR_BUILD=no_compiler_found
134
+ fi
135
+ ;;
136
+ ,,*) CC_FOR_BUILD=$CC ;;
137
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
138
+ esac
139
+}
123140
124141
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
125142
# ([email protected] 1994-08-24)
126
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
143
+if test -f /.attbin/uname ; then
127144
PATH=$PATH:/.attbin ; export PATH
128145
fi
129146
130147
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
131148
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
132
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
149
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
133150
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
134151
135
-case "$UNAME_SYSTEM" in
152
+case $UNAME_SYSTEM in
136153
Linux|GNU|GNU/*)
137
- # If the system lacks a compiler, then just pick glibc.
138
- # We could probably try harder.
139
- LIBC=gnu
154
+ LIBC=unknown
140155
141
- eval "$set_cc_for_build"
156
+ set_cc_for_build
142157
cat <<-EOF > "$dummy.c"
143158
#include <features.h>
144159
#if defined(__UCLIBC__)
145160
LIBC=uclibc
146161
#elif defined(__dietlibc__)
147162
LIBC=dietlibc
148
- #else
163
+ #elif defined(__GLIBC__)
149164
LIBC=gnu
165
+ #else
166
+ #include <stdarg.h>
167
+ /* First heuristic to detect musl libc. */
168
+ #ifdef __DEFINED_va_list
169
+ LIBC=musl
170
+ #endif
150171
#endif
151172
EOF
152
- eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
173
+ cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
174
+ eval "$cc_set_libc"
175
+
176
+ # Second heuristic to detect musl libc.
177
+ if [ "$LIBC" = unknown ] &&
178
+ command -v ldd >/dev/null &&
179
+ ldd --version 2>&1 | grep -q ^musl; then
180
+ LIBC=musl
181
+ fi
153182
154
- # If ldd exists, use it to detect musl libc.
155
- if command -v ldd >/dev/null && \
156
- ldd --version 2>&1 | grep -q ^musl
157
- then
158
- LIBC=musl
183
+ # If the system lacks a compiler, then just pick glibc.
184
+ # We could probably try harder.
185
+ if [ "$LIBC" = unknown ]; then
186
+ LIBC=gnu
159187
fi
160188
;;
161189
esac
162190
163191
# Note: order is significant - the case branches are not exclusive.
164192
165
-case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
193
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
166194
*:NetBSD:*:*)
167195
# NetBSD (nbsd) targets should (where applicable) match one or
168196
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
169197
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
170198
# switched to ELF, *-*-netbsd* would select the old
@@ -172,36 +200,36 @@
172200
# compatibility and a consistent mechanism for selecting the
173201
# object file format.
174202
#
175203
# Note: NetBSD doesn't particularly care about the vendor
176204
# portion of the name. We always set it to "unknown".
177
- sysctl="sysctl -n hw.machine_arch"
178205
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
179
- "/sbin/$sysctl" 2>/dev/null || \
180
- "/usr/sbin/$sysctl" 2>/dev/null || \
206
+ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
207
+ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
181208
echo unknown)`
182
- case "$UNAME_MACHINE_ARCH" in
209
+ case $UNAME_MACHINE_ARCH in
210
+ aarch64eb) machine=aarch64_be-unknown ;;
183211
armeb) machine=armeb-unknown ;;
184212
arm*) machine=arm-unknown ;;
185213
sh3el) machine=shl-unknown ;;
186214
sh3eb) machine=sh-unknown ;;
187215
sh5el) machine=sh5le-unknown ;;
188216
earmv*)
189217
arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
190218
endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
191
- machine="${arch}${endian}"-unknown
219
+ machine=${arch}${endian}-unknown
192220
;;
193
- *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
221
+ *) machine=$UNAME_MACHINE_ARCH-unknown ;;
194222
esac
195223
# The Operating System including object format, if it has switched
196224
# to ELF recently (or will in the future) and ABI.
197
- case "$UNAME_MACHINE_ARCH" in
225
+ case $UNAME_MACHINE_ARCH in
198226
earm*)
199227
os=netbsdelf
200228
;;
201229
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
202
- eval "$set_cc_for_build"
230
+ set_cc_for_build
203231
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
204232
| grep -q __ELF__
205233
then
206234
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
207235
# Return netbsd for either. FIX?
@@ -213,11 +241,11 @@
213241
*)
214242
os=netbsd
215243
;;
216244
esac
217245
# Determine ABI tags.
218
- case "$UNAME_MACHINE_ARCH" in
246
+ case $UNAME_MACHINE_ARCH in
219247
earm*)
220248
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
221249
abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
222250
;;
223251
esac
@@ -224,11 +252,11 @@
224252
# The OS release
225253
# Debian GNU/NetBSD machines have a different userland, and
226254
# thus, need a distinct triplet. However, they do not need
227255
# kernel version information, so it can be replaced with a
228256
# suitable tag, in the style of linux-gnu.
229
- case "$UNAME_VERSION" in
257
+ case $UNAME_VERSION in
230258
Debian*)
231259
release='-gnu'
232260
;;
233261
*)
234262
release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
@@ -235,49 +263,61 @@
235263
;;
236264
esac
237265
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
238266
# contains redundant information, the shorter form:
239267
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
240
- echo "$machine-${os}${release}${abi}"
241
- exit ;;
268
+ GUESS=$machine-${os}${release}${abi-}
269
+ ;;
242270
*:Bitrig:*:*)
243271
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
244
- echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
245
- exit ;;
272
+ GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
273
+ ;;
246274
*:OpenBSD:*:*)
247275
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
248
- echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
249
- exit ;;
276
+ GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
277
+ ;;
278
+ *:SecBSD:*:*)
279
+ UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
280
+ GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
281
+ ;;
250282
*:LibertyBSD:*:*)
251283
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
252
- echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
253
- exit ;;
284
+ GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
285
+ ;;
254286
*:MidnightBSD:*:*)
255
- echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
256
- exit ;;
287
+ GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
288
+ ;;
257289
*:ekkoBSD:*:*)
258
- echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
259
- exit ;;
290
+ GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
291
+ ;;
260292
*:SolidBSD:*:*)
261
- echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
262
- exit ;;
293
+ GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
294
+ ;;
295
+ *:OS108:*:*)
296
+ GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
297
+ ;;
263298
macppc:MirBSD:*:*)
264
- echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
265
- exit ;;
299
+ GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
300
+ ;;
266301
*:MirBSD:*:*)
267
- echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
268
- exit ;;
302
+ GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
303
+ ;;
269304
*:Sortix:*:*)
270
- echo "$UNAME_MACHINE"-unknown-sortix
271
- exit ;;
305
+ GUESS=$UNAME_MACHINE-unknown-sortix
306
+ ;;
307
+ *:Twizzler:*:*)
308
+ GUESS=$UNAME_MACHINE-unknown-twizzler
309
+ ;;
272310
*:Redox:*:*)
273
- echo "$UNAME_MACHINE"-unknown-redox
274
- exit ;;
311
+ GUESS=$UNAME_MACHINE-unknown-redox
312
+ ;;
275313
mips:OSF1:*.*)
276
- echo mips-dec-osf1
277
- exit ;;
314
+ GUESS=mips-dec-osf1
315
+ ;;
278316
alpha:OSF1:*:*)
317
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
318
+ trap '' 0
279319
case $UNAME_RELEASE in
280320
*4.0)
281321
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
282322
;;
283323
*5.*)
@@ -287,11 +327,11 @@
287327
# According to Compaq, /usr/sbin/psrinfo has been available on
288328
# OSF/1 and Tru64 systems produced since 1995. I hope that
289329
# covers most systems running today. This code pipes the CPU
290330
# types through head -n 1, so we only detect the type of CPU 0.
291331
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
292
- case "$ALPHA_CPU_TYPE" in
332
+ case $ALPHA_CPU_TYPE in
293333
"EV4 (21064)")
294334
UNAME_MACHINE=alpha ;;
295335
"EV4.5 (21064)")
296336
UNAME_MACHINE=alpha ;;
297337
"LCA4 (21066/21068)")
@@ -324,167 +364,171 @@
324364
# A Pn.n version is a patched version.
325365
# A Vn.n version is a released version.
326366
# A Tn.n version is a released field test version.
327367
# A Xn.n version is an unreleased experimental baselevel.
328368
# 1.2 uses "1.2" for uname -r.
329
- echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
330
- # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
331
- exitcode=$?
332
- trap '' 0
333
- exit $exitcode ;;
369
+ OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
370
+ GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
371
+ ;;
334372
Amiga*:UNIX_System_V:4.0:*)
335
- echo m68k-unknown-sysv4
336
- exit ;;
373
+ GUESS=m68k-unknown-sysv4
374
+ ;;
337375
*:[Aa]miga[Oo][Ss]:*:*)
338
- echo "$UNAME_MACHINE"-unknown-amigaos
339
- exit ;;
376
+ GUESS=$UNAME_MACHINE-unknown-amigaos
377
+ ;;
340378
*:[Mm]orph[Oo][Ss]:*:*)
341
- echo "$UNAME_MACHINE"-unknown-morphos
342
- exit ;;
379
+ GUESS=$UNAME_MACHINE-unknown-morphos
380
+ ;;
343381
*:OS/390:*:*)
344
- echo i370-ibm-openedition
345
- exit ;;
382
+ GUESS=i370-ibm-openedition
383
+ ;;
346384
*:z/VM:*:*)
347
- echo s390-ibm-zvmoe
348
- exit ;;
385
+ GUESS=s390-ibm-zvmoe
386
+ ;;
349387
*:OS400:*:*)
350
- echo powerpc-ibm-os400
351
- exit ;;
388
+ GUESS=powerpc-ibm-os400
389
+ ;;
352390
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
353
- echo arm-acorn-riscix"$UNAME_RELEASE"
354
- exit ;;
391
+ GUESS=arm-acorn-riscix$UNAME_RELEASE
392
+ ;;
355393
arm*:riscos:*:*|arm*:RISCOS:*:*)
356
- echo arm-unknown-riscos
357
- exit ;;
394
+ GUESS=arm-unknown-riscos
395
+ ;;
358396
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
359
- echo hppa1.1-hitachi-hiuxmpp
360
- exit ;;
397
+ GUESS=hppa1.1-hitachi-hiuxmpp
398
+ ;;
361399
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
362400
# [email protected] (Earle F. Ake) contributed MIS and NILE.
363
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
364
- echo pyramid-pyramid-sysv3
365
- else
366
- echo pyramid-pyramid-bsd
367
- fi
368
- exit ;;
401
+ case `(/bin/universe) 2>/dev/null` in
402
+ att) GUESS=pyramid-pyramid-sysv3 ;;
403
+ *) GUESS=pyramid-pyramid-bsd ;;
404
+ esac
405
+ ;;
369406
NILE*:*:*:dcosx)
370
- echo pyramid-pyramid-svr4
371
- exit ;;
407
+ GUESS=pyramid-pyramid-svr4
408
+ ;;
372409
DRS?6000:unix:4.0:6*)
373
- echo sparc-icl-nx6
374
- exit ;;
410
+ GUESS=sparc-icl-nx6
411
+ ;;
375412
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
376413
case `/usr/bin/uname -p` in
377
- sparc) echo sparc-icl-nx7; exit ;;
378
- esac ;;
414
+ sparc) GUESS=sparc-icl-nx7 ;;
415
+ esac
416
+ ;;
379417
s390x:SunOS:*:*)
380
- echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
381
- exit ;;
418
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
419
+ GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
420
+ ;;
382421
sun4H:SunOS:5.*:*)
383
- echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
384
- exit ;;
422
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
423
+ GUESS=sparc-hal-solaris2$SUN_REL
424
+ ;;
385425
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
386
- echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
387
- exit ;;
426
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
427
+ GUESS=sparc-sun-solaris2$SUN_REL
428
+ ;;
388429
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
389
- echo i386-pc-auroraux"$UNAME_RELEASE"
390
- exit ;;
430
+ GUESS=i386-pc-auroraux$UNAME_RELEASE
431
+ ;;
391432
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
392
- eval "$set_cc_for_build"
433
+ set_cc_for_build
393434
SUN_ARCH=i386
394435
# If there is a compiler, see if it is configured for 64-bit objects.
395436
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
396437
# This test works for both compilers.
397
- if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
438
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
398439
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
399440
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
400441
grep IS_64BIT_ARCH >/dev/null
401442
then
402443
SUN_ARCH=x86_64
403444
fi
404445
fi
405
- echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
406
- exit ;;
446
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
447
+ GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
448
+ ;;
407449
sun4*:SunOS:6*:*)
408450
# According to config.sub, this is the proper way to canonicalize
409451
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
410452
# it's likely to be more like Solaris than SunOS4.
411
- echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
412
- exit ;;
453
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
454
+ GUESS=sparc-sun-solaris3$SUN_REL
455
+ ;;
413456
sun4*:SunOS:*:*)
414
- case "`/usr/bin/arch -k`" in
457
+ case `/usr/bin/arch -k` in
415458
Series*|S4*)
416459
UNAME_RELEASE=`uname -v`
417460
;;
418461
esac
419462
# Japanese Language versions have a version number like `4.1.3-JL'.
420
- echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
421
- exit ;;
463
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
464
+ GUESS=sparc-sun-sunos$SUN_REL
465
+ ;;
422466
sun3*:SunOS:*:*)
423
- echo m68k-sun-sunos"$UNAME_RELEASE"
424
- exit ;;
467
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
468
+ ;;
425469
sun*:*:4.2BSD:*)
426470
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
427471
test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
428
- case "`/bin/arch`" in
472
+ case `/bin/arch` in
429473
sun3)
430
- echo m68k-sun-sunos"$UNAME_RELEASE"
474
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
431475
;;
432476
sun4)
433
- echo sparc-sun-sunos"$UNAME_RELEASE"
477
+ GUESS=sparc-sun-sunos$UNAME_RELEASE
434478
;;
435479
esac
436
- exit ;;
480
+ ;;
437481
aushp:SunOS:*:*)
438
- echo sparc-auspex-sunos"$UNAME_RELEASE"
439
- exit ;;
482
+ GUESS=sparc-auspex-sunos$UNAME_RELEASE
483
+ ;;
440484
# The situation for MiNT is a little confusing. The machine name
441485
# can be virtually everything (everything which is not
442486
# "atarist" or "atariste" at least should have a processor
443487
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
444488
# to the lowercase version "mint" (or "freemint"). Finally
445489
# the system name "TOS" denotes a system which is actually not
446490
# MiNT. But MiNT is downward compatible to TOS, so this should
447491
# be no problem.
448492
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
449
- echo m68k-atari-mint"$UNAME_RELEASE"
450
- exit ;;
493
+ GUESS=m68k-atari-mint$UNAME_RELEASE
494
+ ;;
451495
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
452
- echo m68k-atari-mint"$UNAME_RELEASE"
453
- exit ;;
496
+ GUESS=m68k-atari-mint$UNAME_RELEASE
497
+ ;;
454498
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
455
- echo m68k-atari-mint"$UNAME_RELEASE"
456
- exit ;;
499
+ GUESS=m68k-atari-mint$UNAME_RELEASE
500
+ ;;
457501
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
458
- echo m68k-milan-mint"$UNAME_RELEASE"
459
- exit ;;
502
+ GUESS=m68k-milan-mint$UNAME_RELEASE
503
+ ;;
460504
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
461
- echo m68k-hades-mint"$UNAME_RELEASE"
462
- exit ;;
505
+ GUESS=m68k-hades-mint$UNAME_RELEASE
506
+ ;;
463507
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
464
- echo m68k-unknown-mint"$UNAME_RELEASE"
465
- exit ;;
508
+ GUESS=m68k-unknown-mint$UNAME_RELEASE
509
+ ;;
466510
m68k:machten:*:*)
467
- echo m68k-apple-machten"$UNAME_RELEASE"
468
- exit ;;
511
+ GUESS=m68k-apple-machten$UNAME_RELEASE
512
+ ;;
469513
powerpc:machten:*:*)
470
- echo powerpc-apple-machten"$UNAME_RELEASE"
471
- exit ;;
514
+ GUESS=powerpc-apple-machten$UNAME_RELEASE
515
+ ;;
472516
RISC*:Mach:*:*)
473
- echo mips-dec-mach_bsd4.3
474
- exit ;;
517
+ GUESS=mips-dec-mach_bsd4.3
518
+ ;;
475519
RISC*:ULTRIX:*:*)
476
- echo mips-dec-ultrix"$UNAME_RELEASE"
477
- exit ;;
520
+ GUESS=mips-dec-ultrix$UNAME_RELEASE
521
+ ;;
478522
VAX*:ULTRIX*:*:*)
479
- echo vax-dec-ultrix"$UNAME_RELEASE"
480
- exit ;;
523
+ GUESS=vax-dec-ultrix$UNAME_RELEASE
524
+ ;;
481525
2020:CLIX:*:* | 2430:CLIX:*:*)
482
- echo clipper-intergraph-clix"$UNAME_RELEASE"
483
- exit ;;
526
+ GUESS=clipper-intergraph-clix$UNAME_RELEASE
527
+ ;;
484528
mips:*:*:UMIPS | mips:*:*:RISCos)
485
- eval "$set_cc_for_build"
529
+ set_cc_for_build
486530
sed 's/^ //' << EOF > "$dummy.c"
487531
#ifdef __cplusplus
488532
#include <stdio.h> /* for printf() prototype */
489533
int main (int argc, char *argv[]) {
490534
#else
@@ -506,82 +550,83 @@
506550
EOF
507551
$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
508552
dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
509553
SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
510554
{ echo "$SYSTEM_NAME"; exit; }
511
- echo mips-mips-riscos"$UNAME_RELEASE"
512
- exit ;;
555
+ GUESS=mips-mips-riscos$UNAME_RELEASE
556
+ ;;
513557
Motorola:PowerMAX_OS:*:*)
514
- echo powerpc-motorola-powermax
515
- exit ;;
558
+ GUESS=powerpc-motorola-powermax
559
+ ;;
516560
Motorola:*:4.3:PL8-*)
517
- echo powerpc-harris-powermax
518
- exit ;;
561
+ GUESS=powerpc-harris-powermax
562
+ ;;
519563
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
520
- echo powerpc-harris-powermax
521
- exit ;;
564
+ GUESS=powerpc-harris-powermax
565
+ ;;
522566
Night_Hawk:Power_UNIX:*:*)
523
- echo powerpc-harris-powerunix
524
- exit ;;
567
+ GUESS=powerpc-harris-powerunix
568
+ ;;
525569
m88k:CX/UX:7*:*)
526
- echo m88k-harris-cxux7
527
- exit ;;
570
+ GUESS=m88k-harris-cxux7
571
+ ;;
528572
m88k:*:4*:R4*)
529
- echo m88k-motorola-sysv4
530
- exit ;;
573
+ GUESS=m88k-motorola-sysv4
574
+ ;;
531575
m88k:*:3*:R3*)
532
- echo m88k-motorola-sysv3
533
- exit ;;
576
+ GUESS=m88k-motorola-sysv3
577
+ ;;
534578
AViiON:dgux:*:*)
535579
# DG/UX returns AViiON for all architectures
536580
UNAME_PROCESSOR=`/usr/bin/uname -p`
537
- if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
538
- then
539
- if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
540
- [ "$TARGET_BINARY_INTERFACE"x = x ]
541
- then
542
- echo m88k-dg-dgux"$UNAME_RELEASE"
543
- else
544
- echo m88k-dg-dguxbcs"$UNAME_RELEASE"
545
- fi
546
- else
547
- echo i586-dg-dgux"$UNAME_RELEASE"
548
- fi
549
- exit ;;
550
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
551
- echo m88k-dolphin-sysv3
552
- exit ;;
581
+ if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
582
+ then
583
+ if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
584
+ test "$TARGET_BINARY_INTERFACE"x = x
585
+ then
586
+ GUESS=m88k-dg-dgux$UNAME_RELEASE
587
+ else
588
+ GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
589
+ fi
590
+ else
591
+ GUESS=i586-dg-dgux$UNAME_RELEASE
592
+ fi
593
+ ;;
594
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
595
+ GUESS=m88k-dolphin-sysv3
596
+ ;;
553597
M88*:*:R3*:*)
554598
# Delta 88k system running SVR3
555
- echo m88k-motorola-sysv3
556
- exit ;;
599
+ GUESS=m88k-motorola-sysv3
600
+ ;;
557601
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
558
- echo m88k-tektronix-sysv3
559
- exit ;;
602
+ GUESS=m88k-tektronix-sysv3
603
+ ;;
560604
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
561
- echo m68k-tektronix-bsd
562
- exit ;;
605
+ GUESS=m68k-tektronix-bsd
606
+ ;;
563607
*:IRIX*:*:*)
564
- echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
565
- exit ;;
608
+ IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
609
+ GUESS=mips-sgi-irix$IRIX_REL
610
+ ;;
566611
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
567
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
568
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
612
+ GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
613
+ ;; # Note that: echo "'`uname -s`'" gives 'AIX '
569614
i*86:AIX:*:*)
570
- echo i386-ibm-aix
571
- exit ;;
615
+ GUESS=i386-ibm-aix
616
+ ;;
572617
ia64:AIX:*:*)
573
- if [ -x /usr/bin/oslevel ] ; then
618
+ if test -x /usr/bin/oslevel ; then
574619
IBM_REV=`/usr/bin/oslevel`
575620
else
576
- IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
621
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
577622
fi
578
- echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
579
- exit ;;
623
+ GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
624
+ ;;
580625
*:AIX:2:3)
581626
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
582
- eval "$set_cc_for_build"
627
+ set_cc_for_build
583628
sed 's/^ //' << EOF > "$dummy.c"
584629
#include <sys/systemcfg.h>
585630
586631
main()
587632
{
@@ -591,78 +636,78 @@
591636
exit(0);
592637
}
593638
EOF
594639
if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
595640
then
596
- echo "$SYSTEM_NAME"
641
+ GUESS=$SYSTEM_NAME
597642
else
598
- echo rs6000-ibm-aix3.2.5
643
+ GUESS=rs6000-ibm-aix3.2.5
599644
fi
600645
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
601
- echo rs6000-ibm-aix3.2.4
646
+ GUESS=rs6000-ibm-aix3.2.4
602647
else
603
- echo rs6000-ibm-aix3.2
648
+ GUESS=rs6000-ibm-aix3.2
604649
fi
605
- exit ;;
650
+ ;;
606651
*:AIX:*:[4567])
607652
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
608653
if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
609654
IBM_ARCH=rs6000
610655
else
611656
IBM_ARCH=powerpc
612657
fi
613
- if [ -x /usr/bin/lslpp ] ; then
614
- IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
658
+ if test -x /usr/bin/lslpp ; then
659
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
615660
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
616661
else
617
- IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
662
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
618663
fi
619
- echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
620
- exit ;;
664
+ GUESS=$IBM_ARCH-ibm-aix$IBM_REV
665
+ ;;
621666
*:AIX:*:*)
622
- echo rs6000-ibm-aix
623
- exit ;;
667
+ GUESS=rs6000-ibm-aix
668
+ ;;
624669
ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
625
- echo romp-ibm-bsd4.4
626
- exit ;;
670
+ GUESS=romp-ibm-bsd4.4
671
+ ;;
627672
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
628
- echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
629
- exit ;; # report: romp-ibm BSD 4.3
673
+ GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
674
+ ;; # report: romp-ibm BSD 4.3
630675
*:BOSX:*:*)
631
- echo rs6000-bull-bosx
632
- exit ;;
676
+ GUESS=rs6000-bull-bosx
677
+ ;;
633678
DPX/2?00:B.O.S.:*:*)
634
- echo m68k-bull-sysv3
635
- exit ;;
679
+ GUESS=m68k-bull-sysv3
680
+ ;;
636681
9000/[34]??:4.3bsd:1.*:*)
637
- echo m68k-hp-bsd
638
- exit ;;
682
+ GUESS=m68k-hp-bsd
683
+ ;;
639684
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
640
- echo m68k-hp-bsd4.4
641
- exit ;;
685
+ GUESS=m68k-hp-bsd4.4
686
+ ;;
642687
9000/[34678]??:HP-UX:*:*)
643
- HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
644
- case "$UNAME_MACHINE" in
688
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
689
+ case $UNAME_MACHINE in
645690
9000/31?) HP_ARCH=m68000 ;;
646691
9000/[34]??) HP_ARCH=m68k ;;
647692
9000/[678][0-9][0-9])
648
- if [ -x /usr/bin/getconf ]; then
693
+ if test -x /usr/bin/getconf; then
649694
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
650695
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
651
- case "$sc_cpu_version" in
696
+ case $sc_cpu_version in
652697
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
653698
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
654699
532) # CPU_PA_RISC2_0
655
- case "$sc_kernel_bits" in
700
+ case $sc_kernel_bits in
656701
32) HP_ARCH=hppa2.0n ;;
657702
64) HP_ARCH=hppa2.0w ;;
658703
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
659704
esac ;;
660705
esac
661706
fi
662
- if [ "$HP_ARCH" = "" ]; then
663
- eval "$set_cc_for_build"
707
+ if test "$HP_ARCH" = ""; then
708
+ set_cc_for_build
664709
sed 's/^ //' << EOF > "$dummy.c"
665710
666711
#define _HPUX_SOURCE
667712
#include <stdlib.h>
668713
#include <unistd.h>
@@ -696,13 +741,13 @@
696741
EOF
697742
(CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
698743
test -z "$HP_ARCH" && HP_ARCH=hppa
699744
fi ;;
700745
esac
701
- if [ "$HP_ARCH" = hppa2.0w ]
746
+ if test "$HP_ARCH" = hppa2.0w
702747
then
703
- eval "$set_cc_for_build"
748
+ set_cc_for_build
704749
705750
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
706751
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
707752
# generating 64-bit code. GNU and HP use different nomenclature:
708753
#
@@ -717,18 +762,18 @@
717762
HP_ARCH=hppa2.0w
718763
else
719764
HP_ARCH=hppa64
720765
fi
721766
fi
722
- echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
723
- exit ;;
767
+ GUESS=$HP_ARCH-hp-hpux$HPUX_REV
768
+ ;;
724769
ia64:HP-UX:*:*)
725
- HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
726
- echo ia64-hp-hpux"$HPUX_REV"
727
- exit ;;
770
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
771
+ GUESS=ia64-hp-hpux$HPUX_REV
772
+ ;;
728773
3050*:HI-UX:*:*)
729
- eval "$set_cc_for_build"
774
+ set_cc_for_build
730775
sed 's/^ //' << EOF > "$dummy.c"
731776
#include <unistd.h>
732777
int
733778
main ()
734779
{
@@ -752,162 +797,186 @@
752797
exit (0);
753798
}
754799
EOF
755800
$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
756801
{ echo "$SYSTEM_NAME"; exit; }
757
- echo unknown-hitachi-hiuxwe2
758
- exit ;;
802
+ GUESS=unknown-hitachi-hiuxwe2
803
+ ;;
759804
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
760
- echo hppa1.1-hp-bsd
761
- exit ;;
805
+ GUESS=hppa1.1-hp-bsd
806
+ ;;
762807
9000/8??:4.3bsd:*:*)
763
- echo hppa1.0-hp-bsd
764
- exit ;;
808
+ GUESS=hppa1.0-hp-bsd
809
+ ;;
765810
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
766
- echo hppa1.0-hp-mpeix
767
- exit ;;
811
+ GUESS=hppa1.0-hp-mpeix
812
+ ;;
768813
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
769
- echo hppa1.1-hp-osf
770
- exit ;;
814
+ GUESS=hppa1.1-hp-osf
815
+ ;;
771816
hp8??:OSF1:*:*)
772
- echo hppa1.0-hp-osf
773
- exit ;;
817
+ GUESS=hppa1.0-hp-osf
818
+ ;;
774819
i*86:OSF1:*:*)
775
- if [ -x /usr/sbin/sysversion ] ; then
776
- echo "$UNAME_MACHINE"-unknown-osf1mk
820
+ if test -x /usr/sbin/sysversion ; then
821
+ GUESS=$UNAME_MACHINE-unknown-osf1mk
777822
else
778
- echo "$UNAME_MACHINE"-unknown-osf1
823
+ GUESS=$UNAME_MACHINE-unknown-osf1
779824
fi
780
- exit ;;
825
+ ;;
781826
parisc*:Lites*:*:*)
782
- echo hppa1.1-hp-lites
783
- exit ;;
827
+ GUESS=hppa1.1-hp-lites
828
+ ;;
784829
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
785
- echo c1-convex-bsd
786
- exit ;;
830
+ GUESS=c1-convex-bsd
831
+ ;;
787832
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
788833
if getsysinfo -f scalar_acc
789834
then echo c32-convex-bsd
790835
else echo c2-convex-bsd
791836
fi
792837
exit ;;
793838
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
794
- echo c34-convex-bsd
795
- exit ;;
839
+ GUESS=c34-convex-bsd
840
+ ;;
796841
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
797
- echo c38-convex-bsd
798
- exit ;;
842
+ GUESS=c38-convex-bsd
843
+ ;;
799844
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
800
- echo c4-convex-bsd
801
- exit ;;
845
+ GUESS=c4-convex-bsd
846
+ ;;
802847
CRAY*Y-MP:*:*:*)
803
- echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
804
- exit ;;
848
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
849
+ GUESS=ymp-cray-unicos$CRAY_REL
850
+ ;;
805851
CRAY*[A-Z]90:*:*:*)
806852
echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
807853
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
808854
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
809855
-e 's/\.[^.]*$/.X/'
810856
exit ;;
811857
CRAY*TS:*:*:*)
812
- echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
813
- exit ;;
858
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
859
+ GUESS=t90-cray-unicos$CRAY_REL
860
+ ;;
814861
CRAY*T3E:*:*:*)
815
- echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
816
- exit ;;
862
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
863
+ GUESS=alphaev5-cray-unicosmk$CRAY_REL
864
+ ;;
817865
CRAY*SV1:*:*:*)
818
- echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
819
- exit ;;
866
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
867
+ GUESS=sv1-cray-unicos$CRAY_REL
868
+ ;;
820869
*:UNICOS/mp:*:*)
821
- echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
822
- exit ;;
870
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
871
+ GUESS=craynv-cray-unicosmp$CRAY_REL
872
+ ;;
823873
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
824874
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
825875
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
826876
FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
827
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
828
- exit ;;
877
+ GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
878
+ ;;
829879
5000:UNIX_System_V:4.*:*)
830880
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
831881
FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
832
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
833
- exit ;;
882
+ GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
883
+ ;;
834884
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
835
- echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
836
- exit ;;
885
+ GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
886
+ ;;
837887
sparc*:BSD/OS:*:*)
838
- echo sparc-unknown-bsdi"$UNAME_RELEASE"
839
- exit ;;
888
+ GUESS=sparc-unknown-bsdi$UNAME_RELEASE
889
+ ;;
840890
*:BSD/OS:*:*)
841
- echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
842
- exit ;;
891
+ GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
892
+ ;;
893
+ arm:FreeBSD:*:*)
894
+ UNAME_PROCESSOR=`uname -p`
895
+ set_cc_for_build
896
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
897
+ | grep -q __ARM_PCS_VFP
898
+ then
899
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
900
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
901
+ else
902
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
903
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
904
+ fi
905
+ ;;
843906
*:FreeBSD:*:*)
844907
UNAME_PROCESSOR=`/usr/bin/uname -p`
845
- case "$UNAME_PROCESSOR" in
908
+ case $UNAME_PROCESSOR in
846909
amd64)
847910
UNAME_PROCESSOR=x86_64 ;;
848911
i386)
849912
UNAME_PROCESSOR=i586 ;;
850913
esac
851
- echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
852
- exit ;;
914
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
915
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
916
+ ;;
853917
i*:CYGWIN*:*)
854
- echo "$UNAME_MACHINE"-pc-cygwin
855
- exit ;;
918
+ GUESS=$UNAME_MACHINE-pc-cygwin
919
+ ;;
856920
*:MINGW64*:*)
857
- echo "$UNAME_MACHINE"-pc-mingw64
858
- exit ;;
921
+ GUESS=$UNAME_MACHINE-pc-mingw64
922
+ ;;
859923
*:MINGW*:*)
860
- echo "$UNAME_MACHINE"-pc-mingw32
861
- exit ;;
924
+ GUESS=$UNAME_MACHINE-pc-mingw32
925
+ ;;
862926
*:MSYS*:*)
863
- echo "$UNAME_MACHINE"-pc-msys
864
- exit ;;
927
+ GUESS=$UNAME_MACHINE-pc-msys
928
+ ;;
865929
i*:PW*:*)
866
- echo "$UNAME_MACHINE"-pc-pw32
867
- exit ;;
930
+ GUESS=$UNAME_MACHINE-pc-pw32
931
+ ;;
868932
*:Interix*:*)
869
- case "$UNAME_MACHINE" in
933
+ case $UNAME_MACHINE in
870934
x86)
871
- echo i586-pc-interix"$UNAME_RELEASE"
872
- exit ;;
935
+ GUESS=i586-pc-interix$UNAME_RELEASE
936
+ ;;
873937
authenticamd | genuineintel | EM64T)
874
- echo x86_64-unknown-interix"$UNAME_RELEASE"
875
- exit ;;
938
+ GUESS=x86_64-unknown-interix$UNAME_RELEASE
939
+ ;;
876940
IA64)
877
- echo ia64-unknown-interix"$UNAME_RELEASE"
878
- exit ;;
941
+ GUESS=ia64-unknown-interix$UNAME_RELEASE
942
+ ;;
879943
esac ;;
880944
i*:UWIN*:*)
881
- echo "$UNAME_MACHINE"-pc-uwin
882
- exit ;;
945
+ GUESS=$UNAME_MACHINE-pc-uwin
946
+ ;;
883947
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
884
- echo x86_64-unknown-cygwin
885
- exit ;;
948
+ GUESS=x86_64-pc-cygwin
949
+ ;;
886950
prep*:SunOS:5.*:*)
887
- echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
888
- exit ;;
951
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
952
+ GUESS=powerpcle-unknown-solaris2$SUN_REL
953
+ ;;
889954
*:GNU:*:*)
890955
# the GNU system
891
- echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
892
- exit ;;
956
+ GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
957
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
958
+ GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
959
+ ;;
893960
*:GNU/*:*:*)
894961
# other systems with GNU libc and userland
895
- echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
896
- exit ;;
897
- i*86:Minix:*:*)
898
- echo "$UNAME_MACHINE"-pc-minix
899
- exit ;;
962
+ GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
963
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
964
+ GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
965
+ ;;
966
+ *:Minix:*:*)
967
+ GUESS=$UNAME_MACHINE-unknown-minix
968
+ ;;
900969
aarch64:Linux:*:*)
901
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
902
- exit ;;
970
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
971
+ ;;
903972
aarch64_be:Linux:*:*)
904973
UNAME_MACHINE=aarch64_be
905
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
906
- exit ;;
974
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
975
+ ;;
907976
alpha:Linux:*:*)
908
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
977
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
909978
EV5) UNAME_MACHINE=alphaev5 ;;
910979
EV56) UNAME_MACHINE=alphaev56 ;;
911980
PCA56) UNAME_MACHINE=alphapca56 ;;
912981
PCA57) UNAME_MACHINE=alphapca56 ;;
913982
EV6) UNAME_MACHINE=alphaev6 ;;
@@ -914,246 +983,288 @@
914983
EV67) UNAME_MACHINE=alphaev67 ;;
915984
EV68*) UNAME_MACHINE=alphaev68 ;;
916985
esac
917986
objdump --private-headers /bin/sh | grep -q ld.so.1
918987
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
919
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
920
- exit ;;
921
- arc:Linux:*:* | arceb:Linux:*:*)
922
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
923
- exit ;;
988
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
989
+ ;;
990
+ arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
991
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
992
+ ;;
924993
arm*:Linux:*:*)
925
- eval "$set_cc_for_build"
994
+ set_cc_for_build
926995
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
927996
| grep -q __ARM_EABI__
928997
then
929
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
998
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
930999
else
9311000
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
9321001
| grep -q __ARM_PCS_VFP
9331002
then
934
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
1003
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
9351004
else
936
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
1005
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
9371006
fi
9381007
fi
939
- exit ;;
1008
+ ;;
9401009
avr32*:Linux:*:*)
941
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
942
- exit ;;
1010
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1011
+ ;;
9431012
cris:Linux:*:*)
944
- echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
945
- exit ;;
1013
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
1014
+ ;;
9461015
crisv32:Linux:*:*)
947
- echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
948
- exit ;;
1016
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
1017
+ ;;
9491018
e2k:Linux:*:*)
950
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
951
- exit ;;
1019
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1020
+ ;;
9521021
frv:Linux:*:*)
953
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
954
- exit ;;
1022
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1023
+ ;;
9551024
hexagon:Linux:*:*)
956
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
957
- exit ;;
1025
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1026
+ ;;
9581027
i*86:Linux:*:*)
959
- echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
960
- exit ;;
1028
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBC
1029
+ ;;
9611030
ia64:Linux:*:*)
962
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
963
- exit ;;
1031
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1032
+ ;;
9641033
k1om:Linux:*:*)
965
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
966
- exit ;;
1034
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1035
+ ;;
1036
+ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
1037
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1038
+ ;;
9671039
m32r*:Linux:*:*)
968
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
969
- exit ;;
1040
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1041
+ ;;
9701042
m68*:Linux:*:*)
971
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
972
- exit ;;
1043
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1044
+ ;;
9731045
mips:Linux:*:* | mips64:Linux:*:*)
974
- eval "$set_cc_for_build"
1046
+ set_cc_for_build
1047
+ IS_GLIBC=0
1048
+ test x"${LIBC}" = xgnu && IS_GLIBC=1
9751049
sed 's/^ //' << EOF > "$dummy.c"
9761050
#undef CPU
977
- #undef ${UNAME_MACHINE}
978
- #undef ${UNAME_MACHINE}el
1051
+ #undef mips
1052
+ #undef mipsel
1053
+ #undef mips64
1054
+ #undef mips64el
1055
+ #if ${IS_GLIBC} && defined(_ABI64)
1056
+ LIBCABI=gnuabi64
1057
+ #else
1058
+ #if ${IS_GLIBC} && defined(_ABIN32)
1059
+ LIBCABI=gnuabin32
1060
+ #else
1061
+ LIBCABI=${LIBC}
1062
+ #endif
1063
+ #endif
1064
+
1065
+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1066
+ CPU=mipsisa64r6
1067
+ #else
1068
+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1069
+ CPU=mipsisa32r6
1070
+ #else
1071
+ #if defined(__mips64)
1072
+ CPU=mips64
1073
+ #else
1074
+ CPU=mips
1075
+ #endif
1076
+ #endif
1077
+ #endif
1078
+
9791079
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
980
- CPU=${UNAME_MACHINE}el
1080
+ MIPS_ENDIAN=el
9811081
#else
9821082
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
983
- CPU=${UNAME_MACHINE}
1083
+ MIPS_ENDIAN=
9841084
#else
985
- CPU=
1085
+ MIPS_ENDIAN=
9861086
#endif
9871087
#endif
9881088
EOF
989
- eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
990
- test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
1089
+ cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
1090
+ eval "$cc_set_vars"
1091
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
9911092
;;
9921093
mips64el:Linux:*:*)
993
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
994
- exit ;;
1094
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1095
+ ;;
9951096
openrisc*:Linux:*:*)
996
- echo or1k-unknown-linux-"$LIBC"
997
- exit ;;
1097
+ GUESS=or1k-unknown-linux-$LIBC
1098
+ ;;
9981099
or32:Linux:*:* | or1k*:Linux:*:*)
999
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1000
- exit ;;
1100
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1101
+ ;;
10011102
padre:Linux:*:*)
1002
- echo sparc-unknown-linux-"$LIBC"
1003
- exit ;;
1103
+ GUESS=sparc-unknown-linux-$LIBC
1104
+ ;;
10041105
parisc64:Linux:*:* | hppa64:Linux:*:*)
1005
- echo hppa64-unknown-linux-"$LIBC"
1006
- exit ;;
1106
+ GUESS=hppa64-unknown-linux-$LIBC
1107
+ ;;
10071108
parisc:Linux:*:* | hppa:Linux:*:*)
10081109
# Look for CPU level
10091110
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1010
- PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1011
- PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1012
- *) echo hppa-unknown-linux-"$LIBC" ;;
1111
+ PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
1112
+ PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
1113
+ *) GUESS=hppa-unknown-linux-$LIBC ;;
10131114
esac
1014
- exit ;;
1115
+ ;;
10151116
ppc64:Linux:*:*)
1016
- echo powerpc64-unknown-linux-"$LIBC"
1017
- exit ;;
1117
+ GUESS=powerpc64-unknown-linux-$LIBC
1118
+ ;;
10181119
ppc:Linux:*:*)
1019
- echo powerpc-unknown-linux-"$LIBC"
1020
- exit ;;
1120
+ GUESS=powerpc-unknown-linux-$LIBC
1121
+ ;;
10211122
ppc64le:Linux:*:*)
1022
- echo powerpc64le-unknown-linux-"$LIBC"
1023
- exit ;;
1123
+ GUESS=powerpc64le-unknown-linux-$LIBC
1124
+ ;;
10241125
ppcle:Linux:*:*)
1025
- echo powerpcle-unknown-linux-"$LIBC"
1026
- exit ;;
1027
- riscv32:Linux:*:* | riscv64:Linux:*:*)
1028
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1029
- exit ;;
1126
+ GUESS=powerpcle-unknown-linux-$LIBC
1127
+ ;;
1128
+ riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
1129
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1130
+ ;;
10301131
s390:Linux:*:* | s390x:Linux:*:*)
1031
- echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
1032
- exit ;;
1132
+ GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
1133
+ ;;
10331134
sh64*:Linux:*:*)
1034
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1035
- exit ;;
1135
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1136
+ ;;
10361137
sh*:Linux:*:*)
1037
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1038
- exit ;;
1138
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1139
+ ;;
10391140
sparc:Linux:*:* | sparc64:Linux:*:*)
1040
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1041
- exit ;;
1141
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1142
+ ;;
10421143
tile*:Linux:*:*)
1043
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1044
- exit ;;
1144
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1145
+ ;;
10451146
vax:Linux:*:*)
1046
- echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
1047
- exit ;;
1147
+ GUESS=$UNAME_MACHINE-dec-linux-$LIBC
1148
+ ;;
10481149
x86_64:Linux:*:*)
1049
- echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
1050
- exit ;;
1150
+ set_cc_for_build
1151
+ LIBCABI=$LIBC
1152
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
1153
+ if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
1154
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1155
+ grep IS_X32 >/dev/null
1156
+ then
1157
+ LIBCABI=${LIBC}x32
1158
+ fi
1159
+ fi
1160
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
1161
+ ;;
10511162
xtensa*:Linux:*:*)
1052
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1053
- exit ;;
1163
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1164
+ ;;
10541165
i*86:DYNIX/ptx:4*:*)
10551166
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
10561167
# earlier versions are messed up and put the nodename in both
10571168
# sysname and nodename.
1058
- echo i386-sequent-sysv4
1059
- exit ;;
1169
+ GUESS=i386-sequent-sysv4
1170
+ ;;
10601171
i*86:UNIX_SV:4.2MP:2.*)
10611172
# Unixware is an offshoot of SVR4, but it has its own version
10621173
# number series starting with 2...
10631174
# I am not positive that other SVR4 systems won't match this,
10641175
# I just have to hope. -- rms.
10651176
# Use sysv4.2uw... so that sysv4* matches it.
1066
- echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
1067
- exit ;;
1177
+ GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
1178
+ ;;
10681179
i*86:OS/2:*:*)
10691180
# If we were able to find `uname', then EMX Unix compatibility
10701181
# is probably installed.
1071
- echo "$UNAME_MACHINE"-pc-os2-emx
1072
- exit ;;
1182
+ GUESS=$UNAME_MACHINE-pc-os2-emx
1183
+ ;;
10731184
i*86:XTS-300:*:STOP)
1074
- echo "$UNAME_MACHINE"-unknown-stop
1075
- exit ;;
1185
+ GUESS=$UNAME_MACHINE-unknown-stop
1186
+ ;;
10761187
i*86:atheos:*:*)
1077
- echo "$UNAME_MACHINE"-unknown-atheos
1078
- exit ;;
1188
+ GUESS=$UNAME_MACHINE-unknown-atheos
1189
+ ;;
10791190
i*86:syllable:*:*)
1080
- echo "$UNAME_MACHINE"-pc-syllable
1081
- exit ;;
1191
+ GUESS=$UNAME_MACHINE-pc-syllable
1192
+ ;;
10821193
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1083
- echo i386-unknown-lynxos"$UNAME_RELEASE"
1084
- exit ;;
1194
+ GUESS=i386-unknown-lynxos$UNAME_RELEASE
1195
+ ;;
10851196
i*86:*DOS:*:*)
1086
- echo "$UNAME_MACHINE"-pc-msdosdjgpp
1087
- exit ;;
1197
+ GUESS=$UNAME_MACHINE-pc-msdosdjgpp
1198
+ ;;
10881199
i*86:*:4.*:*)
10891200
UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
10901201
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1091
- echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
1202
+ GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
10921203
else
1093
- echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
1204
+ GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
10941205
fi
1095
- exit ;;
1206
+ ;;
10961207
i*86:*:5:[678]*)
10971208
# UnixWare 7.x, OpenUNIX and OpenServer 6.
10981209
case `/bin/uname -X | grep "^Machine"` in
10991210
*486*) UNAME_MACHINE=i486 ;;
11001211
*Pentium) UNAME_MACHINE=i586 ;;
11011212
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
11021213
esac
1103
- echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
1104
- exit ;;
1214
+ GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1215
+ ;;
11051216
i*86:*:3.2:*)
11061217
if test -f /usr/options/cb.name; then
11071218
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1108
- echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
1219
+ GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
11091220
elif /bin/uname -X 2>/dev/null >/dev/null ; then
11101221
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
11111222
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
11121223
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
11131224
&& UNAME_MACHINE=i586
11141225
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
11151226
&& UNAME_MACHINE=i686
11161227
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
11171228
&& UNAME_MACHINE=i686
1118
- echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
1229
+ GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
11191230
else
1120
- echo "$UNAME_MACHINE"-pc-sysv32
1231
+ GUESS=$UNAME_MACHINE-pc-sysv32
11211232
fi
1122
- exit ;;
1233
+ ;;
11231234
pc:*:*:*)
11241235
# Left here for compatibility:
11251236
# uname -m prints for DJGPP always 'pc', but it prints nothing about
11261237
# the processor, so we play safe by assuming i586.
11271238
# Note: whatever this is, it MUST be the same as what config.sub
11281239
# prints for the "djgpp" host, or else GDB configure will decide that
11291240
# this is a cross-build.
1130
- echo i586-pc-msdosdjgpp
1131
- exit ;;
1241
+ GUESS=i586-pc-msdosdjgpp
1242
+ ;;
11321243
Intel:Mach:3*:*)
1133
- echo i386-pc-mach3
1134
- exit ;;
1244
+ GUESS=i386-pc-mach3
1245
+ ;;
11351246
paragon:*:*:*)
1136
- echo i860-intel-osf1
1137
- exit ;;
1247
+ GUESS=i860-intel-osf1
1248
+ ;;
11381249
i860:*:4.*:*) # i860-SVR4
11391250
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1140
- echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
1251
+ GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
11411252
else # Add other i860-SVR4 vendors below as they are discovered.
1142
- echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
1253
+ GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
11431254
fi
1144
- exit ;;
1255
+ ;;
11451256
mini*:CTIX:SYS*5:*)
11461257
# "miniframe"
1147
- echo m68010-convergent-sysv
1148
- exit ;;
1258
+ GUESS=m68010-convergent-sysv
1259
+ ;;
11491260
mc68k:UNIX:SYSTEM5:3.51m)
1150
- echo m68k-convergent-sysv
1151
- exit ;;
1261
+ GUESS=m68k-convergent-sysv
1262
+ ;;
11521263
M680?0:D-NIX:5.3:*)
1153
- echo m68k-diab-dnix
1154
- exit ;;
1264
+ GUESS=m68k-diab-dnix
1265
+ ;;
11551266
M68*:*:R3V[5678]*:*)
11561267
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
11571268
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
11581269
OS_REL=''
11591270
test -r /etc/.relid \
@@ -1174,253 +1285,405 @@
11741285
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
11751286
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
11761287
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
11771288
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11781289
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1179
- echo m68k-unknown-lynxos"$UNAME_RELEASE"
1180
- exit ;;
1290
+ GUESS=m68k-unknown-lynxos$UNAME_RELEASE
1291
+ ;;
11811292
mc68030:UNIX_System_V:4.*:*)
1182
- echo m68k-atari-sysv4
1183
- exit ;;
1293
+ GUESS=m68k-atari-sysv4
1294
+ ;;
11841295
TSUNAMI:LynxOS:2.*:*)
1185
- echo sparc-unknown-lynxos"$UNAME_RELEASE"
1186
- exit ;;
1296
+ GUESS=sparc-unknown-lynxos$UNAME_RELEASE
1297
+ ;;
11871298
rs6000:LynxOS:2.*:*)
1188
- echo rs6000-unknown-lynxos"$UNAME_RELEASE"
1189
- exit ;;
1299
+ GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
1300
+ ;;
11901301
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1191
- echo powerpc-unknown-lynxos"$UNAME_RELEASE"
1192
- exit ;;
1302
+ GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
1303
+ ;;
11931304
SM[BE]S:UNIX_SV:*:*)
1194
- echo mips-dde-sysv"$UNAME_RELEASE"
1195
- exit ;;
1305
+ GUESS=mips-dde-sysv$UNAME_RELEASE
1306
+ ;;
11961307
RM*:ReliantUNIX-*:*:*)
1197
- echo mips-sni-sysv4
1198
- exit ;;
1308
+ GUESS=mips-sni-sysv4
1309
+ ;;
11991310
RM*:SINIX-*:*:*)
1200
- echo mips-sni-sysv4
1201
- exit ;;
1311
+ GUESS=mips-sni-sysv4
1312
+ ;;
12021313
*:SINIX-*:*:*)
12031314
if uname -p 2>/dev/null >/dev/null ; then
12041315
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1205
- echo "$UNAME_MACHINE"-sni-sysv4
1316
+ GUESS=$UNAME_MACHINE-sni-sysv4
12061317
else
1207
- echo ns32k-sni-sysv
1318
+ GUESS=ns32k-sni-sysv
12081319
fi
1209
- exit ;;
1320
+ ;;
12101321
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
12111322
# says <[email protected]>
1212
- echo i586-unisys-sysv4
1213
- exit ;;
1323
+ GUESS=i586-unisys-sysv4
1324
+ ;;
12141325
*:UNIX_System_V:4*:FTX*)
12151326
# From Gerald Hewes <[email protected]>.
12161327
# How about differentiating between stratus architectures? -djm
1217
- echo hppa1.1-stratus-sysv4
1218
- exit ;;
1328
+ GUESS=hppa1.1-stratus-sysv4
1329
+ ;;
12191330
*:*:*:FTX*)
12201331
# From [email protected].
1221
- echo i860-stratus-sysv4
1222
- exit ;;
1332
+ GUESS=i860-stratus-sysv4
1333
+ ;;
12231334
i*86:VOS:*:*)
12241335
# From [email protected].
1225
- echo "$UNAME_MACHINE"-stratus-vos
1226
- exit ;;
1336
+ GUESS=$UNAME_MACHINE-stratus-vos
1337
+ ;;
12271338
*:VOS:*:*)
12281339
# From [email protected].
1229
- echo hppa1.1-stratus-vos
1230
- exit ;;
1340
+ GUESS=hppa1.1-stratus-vos
1341
+ ;;
12311342
mc68*:A/UX:*:*)
1232
- echo m68k-apple-aux"$UNAME_RELEASE"
1233
- exit ;;
1343
+ GUESS=m68k-apple-aux$UNAME_RELEASE
1344
+ ;;
12341345
news*:NEWS-OS:6*:*)
1235
- echo mips-sony-newsos6
1236
- exit ;;
1346
+ GUESS=mips-sony-newsos6
1347
+ ;;
12371348
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1238
- if [ -d /usr/nec ]; then
1239
- echo mips-nec-sysv"$UNAME_RELEASE"
1349
+ if test -d /usr/nec; then
1350
+ GUESS=mips-nec-sysv$UNAME_RELEASE
12401351
else
1241
- echo mips-unknown-sysv"$UNAME_RELEASE"
1352
+ GUESS=mips-unknown-sysv$UNAME_RELEASE
12421353
fi
1243
- exit ;;
1354
+ ;;
12441355
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1245
- echo powerpc-be-beos
1246
- exit ;;
1356
+ GUESS=powerpc-be-beos
1357
+ ;;
12471358
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1248
- echo powerpc-apple-beos
1249
- exit ;;
1359
+ GUESS=powerpc-apple-beos
1360
+ ;;
12501361
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1251
- echo i586-pc-beos
1252
- exit ;;
1362
+ GUESS=i586-pc-beos
1363
+ ;;
12531364
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1254
- echo i586-pc-haiku
1255
- exit ;;
1365
+ GUESS=i586-pc-haiku
1366
+ ;;
12561367
x86_64:Haiku:*:*)
1257
- echo x86_64-unknown-haiku
1258
- exit ;;
1368
+ GUESS=x86_64-unknown-haiku
1369
+ ;;
12591370
SX-4:SUPER-UX:*:*)
1260
- echo sx4-nec-superux"$UNAME_RELEASE"
1261
- exit ;;
1371
+ GUESS=sx4-nec-superux$UNAME_RELEASE
1372
+ ;;
12621373
SX-5:SUPER-UX:*:*)
1263
- echo sx5-nec-superux"$UNAME_RELEASE"
1264
- exit ;;
1374
+ GUESS=sx5-nec-superux$UNAME_RELEASE
1375
+ ;;
12651376
SX-6:SUPER-UX:*:*)
1266
- echo sx6-nec-superux"$UNAME_RELEASE"
1267
- exit ;;
1377
+ GUESS=sx6-nec-superux$UNAME_RELEASE
1378
+ ;;
12681379
SX-7:SUPER-UX:*:*)
1269
- echo sx7-nec-superux"$UNAME_RELEASE"
1270
- exit ;;
1380
+ GUESS=sx7-nec-superux$UNAME_RELEASE
1381
+ ;;
12711382
SX-8:SUPER-UX:*:*)
1272
- echo sx8-nec-superux"$UNAME_RELEASE"
1273
- exit ;;
1383
+ GUESS=sx8-nec-superux$UNAME_RELEASE
1384
+ ;;
12741385
SX-8R:SUPER-UX:*:*)
1275
- echo sx8r-nec-superux"$UNAME_RELEASE"
1276
- exit ;;
1386
+ GUESS=sx8r-nec-superux$UNAME_RELEASE
1387
+ ;;
12771388
SX-ACE:SUPER-UX:*:*)
1278
- echo sxace-nec-superux"$UNAME_RELEASE"
1279
- exit ;;
1389
+ GUESS=sxace-nec-superux$UNAME_RELEASE
1390
+ ;;
12801391
Power*:Rhapsody:*:*)
1281
- echo powerpc-apple-rhapsody"$UNAME_RELEASE"
1282
- exit ;;
1392
+ GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
1393
+ ;;
12831394
*:Rhapsody:*:*)
1284
- echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
1285
- exit ;;
1395
+ GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
1396
+ ;;
1397
+ arm64:Darwin:*:*)
1398
+ GUESS=aarch64-apple-darwin$UNAME_RELEASE
1399
+ ;;
12861400
*:Darwin:*:*)
1287
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1288
- eval "$set_cc_for_build"
1289
- if test "$UNAME_PROCESSOR" = unknown ; then
1290
- UNAME_PROCESSOR=powerpc
1291
- fi
1292
- if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1293
- if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1294
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1295
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1296
- grep IS_64BIT_ARCH >/dev/null
1297
- then
1298
- case $UNAME_PROCESSOR in
1299
- i386) UNAME_PROCESSOR=x86_64 ;;
1300
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
1301
- esac
1302
- fi
1303
- # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1304
- if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1305
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1306
- grep IS_PPC >/dev/null
1307
- then
1308
- UNAME_PROCESSOR=powerpc
1309
- fi
1401
+ UNAME_PROCESSOR=`uname -p`
1402
+ case $UNAME_PROCESSOR in
1403
+ unknown) UNAME_PROCESSOR=powerpc ;;
1404
+ esac
1405
+ if command -v xcode-select > /dev/null 2> /dev/null && \
1406
+ ! xcode-select --print-path > /dev/null 2> /dev/null ; then
1407
+ # Avoid executing cc if there is no toolchain installed as
1408
+ # cc will be a stub that puts up a graphical alert
1409
+ # prompting the user to install developer tools.
1410
+ CC_FOR_BUILD=no_compiler_found
1411
+ else
1412
+ set_cc_for_build
1413
+ fi
1414
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
1415
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1416
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1417
+ grep IS_64BIT_ARCH >/dev/null
1418
+ then
1419
+ case $UNAME_PROCESSOR in
1420
+ i386) UNAME_PROCESSOR=x86_64 ;;
1421
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
1422
+ esac
1423
+ fi
1424
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1425
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1426
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1427
+ grep IS_PPC >/dev/null
1428
+ then
1429
+ UNAME_PROCESSOR=powerpc
13101430
fi
13111431
elif test "$UNAME_PROCESSOR" = i386 ; then
1312
- # Avoid executing cc on OS X 10.9, as it ships with a stub
1313
- # that puts up a graphical alert prompting to install
1314
- # developer tools. Any system running Mac OS X 10.7 or
1315
- # later (Darwin 11 and later) is required to have a 64-bit
1316
- # processor. This is not true of the ARM version of Darwin
1317
- # that Apple uses in portable devices.
1318
- UNAME_PROCESSOR=x86_64
1432
+ # uname -m returns i386 or x86_64
1433
+ UNAME_PROCESSOR=$UNAME_MACHINE
13191434
fi
1320
- echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
1321
- exit ;;
1435
+ GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
1436
+ ;;
13221437
*:procnto*:*:* | *:QNX:[0123456789]*:*)
13231438
UNAME_PROCESSOR=`uname -p`
13241439
if test "$UNAME_PROCESSOR" = x86; then
13251440
UNAME_PROCESSOR=i386
13261441
UNAME_MACHINE=pc
13271442
fi
1328
- echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
1329
- exit ;;
1443
+ GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
1444
+ ;;
13301445
*:QNX:*:4*)
1331
- echo i386-pc-qnx
1332
- exit ;;
1446
+ GUESS=i386-pc-qnx
1447
+ ;;
13331448
NEO-*:NONSTOP_KERNEL:*:*)
1334
- echo neo-tandem-nsk"$UNAME_RELEASE"
1335
- exit ;;
1449
+ GUESS=neo-tandem-nsk$UNAME_RELEASE
1450
+ ;;
13361451
NSE-*:NONSTOP_KERNEL:*:*)
1337
- echo nse-tandem-nsk"$UNAME_RELEASE"
1338
- exit ;;
1452
+ GUESS=nse-tandem-nsk$UNAME_RELEASE
1453
+ ;;
13391454
NSR-*:NONSTOP_KERNEL:*:*)
1340
- echo nsr-tandem-nsk"$UNAME_RELEASE"
1341
- exit ;;
1455
+ GUESS=nsr-tandem-nsk$UNAME_RELEASE
1456
+ ;;
13421457
NSV-*:NONSTOP_KERNEL:*:*)
1343
- echo nsv-tandem-nsk"$UNAME_RELEASE"
1344
- exit ;;
1458
+ GUESS=nsv-tandem-nsk$UNAME_RELEASE
1459
+ ;;
13451460
NSX-*:NONSTOP_KERNEL:*:*)
1346
- echo nsx-tandem-nsk"$UNAME_RELEASE"
1347
- exit ;;
1461
+ GUESS=nsx-tandem-nsk$UNAME_RELEASE
1462
+ ;;
13481463
*:NonStop-UX:*:*)
1349
- echo mips-compaq-nonstopux
1350
- exit ;;
1464
+ GUESS=mips-compaq-nonstopux
1465
+ ;;
13511466
BS2000:POSIX*:*:*)
1352
- echo bs2000-siemens-sysv
1353
- exit ;;
1467
+ GUESS=bs2000-siemens-sysv
1468
+ ;;
13541469
DS/*:UNIX_System_V:*:*)
1355
- echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
1356
- exit ;;
1470
+ GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
1471
+ ;;
13571472
*:Plan9:*:*)
13581473
# "uname -m" is not consistent, so use $cputype instead. 386
13591474
# is converted to i386 for consistency with other x86
13601475
# operating systems.
1361
- if test "$cputype" = 386; then
1476
+ if test "${cputype-}" = 386; then
13621477
UNAME_MACHINE=i386
1363
- else
1364
- UNAME_MACHINE="$cputype"
1478
+ elif test "x${cputype-}" != x; then
1479
+ UNAME_MACHINE=$cputype
13651480
fi
1366
- echo "$UNAME_MACHINE"-unknown-plan9
1367
- exit ;;
1481
+ GUESS=$UNAME_MACHINE-unknown-plan9
1482
+ ;;
13681483
*:TOPS-10:*:*)
1369
- echo pdp10-unknown-tops10
1370
- exit ;;
1484
+ GUESS=pdp10-unknown-tops10
1485
+ ;;
13711486
*:TENEX:*:*)
1372
- echo pdp10-unknown-tenex
1373
- exit ;;
1487
+ GUESS=pdp10-unknown-tenex
1488
+ ;;
13741489
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1375
- echo pdp10-dec-tops20
1376
- exit ;;
1490
+ GUESS=pdp10-dec-tops20
1491
+ ;;
13771492
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1378
- echo pdp10-xkl-tops20
1379
- exit ;;
1493
+ GUESS=pdp10-xkl-tops20
1494
+ ;;
13801495
*:TOPS-20:*:*)
1381
- echo pdp10-unknown-tops20
1382
- exit ;;
1496
+ GUESS=pdp10-unknown-tops20
1497
+ ;;
13831498
*:ITS:*:*)
1384
- echo pdp10-unknown-its
1385
- exit ;;
1499
+ GUESS=pdp10-unknown-its
1500
+ ;;
13861501
SEI:*:*:SEIUX)
1387
- echo mips-sei-seiux"$UNAME_RELEASE"
1388
- exit ;;
1502
+ GUESS=mips-sei-seiux$UNAME_RELEASE
1503
+ ;;
13891504
*:DragonFly:*:*)
1390
- echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
1391
- exit ;;
1505
+ DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
1506
+ GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
1507
+ ;;
13921508
*:*VMS:*:*)
13931509
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1394
- case "$UNAME_MACHINE" in
1395
- A*) echo alpha-dec-vms ; exit ;;
1396
- I*) echo ia64-dec-vms ; exit ;;
1397
- V*) echo vax-dec-vms ; exit ;;
1510
+ case $UNAME_MACHINE in
1511
+ A*) GUESS=alpha-dec-vms ;;
1512
+ I*) GUESS=ia64-dec-vms ;;
1513
+ V*) GUESS=vax-dec-vms ;;
13981514
esac ;;
13991515
*:XENIX:*:SysV)
1400
- echo i386-pc-xenix
1401
- exit ;;
1516
+ GUESS=i386-pc-xenix
1517
+ ;;
14021518
i*86:skyos:*:*)
1403
- echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
1404
- exit ;;
1519
+ SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
1520
+ GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
1521
+ ;;
14051522
i*86:rdos:*:*)
1406
- echo "$UNAME_MACHINE"-pc-rdos
1407
- exit ;;
1408
- i*86:AROS:*:*)
1409
- echo "$UNAME_MACHINE"-pc-aros
1410
- exit ;;
1523
+ GUESS=$UNAME_MACHINE-pc-rdos
1524
+ ;;
1525
+ *:AROS:*:*)
1526
+ GUESS=$UNAME_MACHINE-unknown-aros
1527
+ ;;
14111528
x86_64:VMkernel:*:*)
1412
- echo "$UNAME_MACHINE"-unknown-esx
1413
- exit ;;
1529
+ GUESS=$UNAME_MACHINE-unknown-esx
1530
+ ;;
14141531
amd64:Isilon\ OneFS:*:*)
1415
- echo x86_64-unknown-onefs
1416
- exit ;;
1532
+ GUESS=x86_64-unknown-onefs
1533
+ ;;
1534
+ *:Unleashed:*:*)
1535
+ GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
1536
+ ;;
14171537
esac
14181538
1539
+# Do we have a guess based on uname results?
1540
+if test "x$GUESS" != x; then
1541
+ echo "$GUESS"
1542
+ exit
1543
+fi
1544
+
1545
+# No uname command or uname output not recognized.
1546
+set_cc_for_build
1547
+cat > "$dummy.c" <<EOF
1548
+#ifdef _SEQUENT_
1549
+#include <sys/types.h>
1550
+#include <sys/utsname.h>
1551
+#endif
1552
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1553
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1554
+#include <signal.h>
1555
+#if defined(_SIZE_T_) || defined(SIGLOST)
1556
+#include <sys/utsname.h>
1557
+#endif
1558
+#endif
1559
+#endif
1560
+main ()
1561
+{
1562
+#if defined (sony)
1563
+#if defined (MIPSEB)
1564
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1565
+ I don't know.... */
1566
+ printf ("mips-sony-bsd\n"); exit (0);
1567
+#else
1568
+#include <sys/param.h>
1569
+ printf ("m68k-sony-newsos%s\n",
1570
+#ifdef NEWSOS4
1571
+ "4"
1572
+#else
1573
+ ""
1574
+#endif
1575
+ ); exit (0);
1576
+#endif
1577
+#endif
1578
+
1579
+#if defined (NeXT)
1580
+#if !defined (__ARCHITECTURE__)
1581
+#define __ARCHITECTURE__ "m68k"
1582
+#endif
1583
+ int version;
1584
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1585
+ if (version < 4)
1586
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1587
+ else
1588
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1589
+ exit (0);
1590
+#endif
1591
+
1592
+#if defined (MULTIMAX) || defined (n16)
1593
+#if defined (UMAXV)
1594
+ printf ("ns32k-encore-sysv\n"); exit (0);
1595
+#else
1596
+#if defined (CMU)
1597
+ printf ("ns32k-encore-mach\n"); exit (0);
1598
+#else
1599
+ printf ("ns32k-encore-bsd\n"); exit (0);
1600
+#endif
1601
+#endif
1602
+#endif
1603
+
1604
+#if defined (__386BSD__)
1605
+ printf ("i386-pc-bsd\n"); exit (0);
1606
+#endif
1607
+
1608
+#if defined (sequent)
1609
+#if defined (i386)
1610
+ printf ("i386-sequent-dynix\n"); exit (0);
1611
+#endif
1612
+#if defined (ns32000)
1613
+ printf ("ns32k-sequent-dynix\n"); exit (0);
1614
+#endif
1615
+#endif
1616
+
1617
+#if defined (_SEQUENT_)
1618
+ struct utsname un;
1619
+
1620
+ uname(&un);
1621
+ if (strncmp(un.version, "V2", 2) == 0) {
1622
+ printf ("i386-sequent-ptx2\n"); exit (0);
1623
+ }
1624
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1625
+ printf ("i386-sequent-ptx1\n"); exit (0);
1626
+ }
1627
+ printf ("i386-sequent-ptx\n"); exit (0);
1628
+#endif
1629
+
1630
+#if defined (vax)
1631
+#if !defined (ultrix)
1632
+#include <sys/param.h>
1633
+#if defined (BSD)
1634
+#if BSD == 43
1635
+ printf ("vax-dec-bsd4.3\n"); exit (0);
1636
+#else
1637
+#if BSD == 199006
1638
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
1639
+#else
1640
+ printf ("vax-dec-bsd\n"); exit (0);
1641
+#endif
1642
+#endif
1643
+#else
1644
+ printf ("vax-dec-bsd\n"); exit (0);
1645
+#endif
1646
+#else
1647
+#if defined(_SIZE_T_) || defined(SIGLOST)
1648
+ struct utsname un;
1649
+ uname (&un);
1650
+ printf ("vax-dec-ultrix%s\n", un.release); exit (0);
1651
+#else
1652
+ printf ("vax-dec-ultrix\n"); exit (0);
1653
+#endif
1654
+#endif
1655
+#endif
1656
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1657
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1658
+#if defined(_SIZE_T_) || defined(SIGLOST)
1659
+ struct utsname *un;
1660
+ uname (&un);
1661
+ printf ("mips-dec-ultrix%s\n", un.release); exit (0);
1662
+#else
1663
+ printf ("mips-dec-ultrix\n"); exit (0);
1664
+#endif
1665
+#endif
1666
+#endif
1667
+
1668
+#if defined (alliant) && defined (i860)
1669
+ printf ("i860-alliant-bsd\n"); exit (0);
1670
+#endif
1671
+
1672
+ exit (1);
1673
+}
1674
+EOF
1675
+
1676
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
1677
+ { echo "$SYSTEM_NAME"; exit; }
1678
+
1679
+# Apollos put the system type in the environment.
1680
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
1681
+
14191682
echo "$0: unable to guess system type" >&2
14201683
1421
-case "$UNAME_MACHINE:$UNAME_SYSTEM" in
1684
+case $UNAME_MACHINE:$UNAME_SYSTEM in
14221685
mips:Linux | mips64:Linux)
14231686
# If we got here on MIPS GNU/Linux, output extra information.
14241687
cat >&2 <<EOF
14251688
14261689
NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
@@ -1433,13 +1696,21 @@
14331696
14341697
This script (version $timestamp), has failed to recognize the
14351698
operating system you are using. If your script is old, overwrite *all*
14361699
copies of config.guess and config.sub with the latest versions from:
14371700
1438
- https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1701
+ https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
14391702
and
1440
- https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1703
+ https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
1704
+EOF
1705
+
1706
+our_year=`echo $timestamp | sed 's,-.*,,'`
1707
+thisyear=`date +%Y`
1708
+# shellcheck disable=SC2003
1709
+script_age=`expr "$thisyear" - "$our_year"`
1710
+if test "$script_age" -lt 3 ; then
1711
+ cat >&2 <<EOF
14411712
14421713
If $0 has already been updated, send the following data and any
14431714
information you think might be pertinent to [email protected] to
14441715
provide the necessary information to handle your system.
14451716
@@ -1463,14 +1734,15 @@
14631734
UNAME_MACHINE = "$UNAME_MACHINE"
14641735
UNAME_RELEASE = "$UNAME_RELEASE"
14651736
UNAME_SYSTEM = "$UNAME_SYSTEM"
14661737
UNAME_VERSION = "$UNAME_VERSION"
14671738
EOF
1739
+fi
14681740
14691741
exit 1
14701742
14711743
# Local variables:
14721744
# eval: (add-hook 'before-save-hook 'time-stamp)
14731745
# time-stamp-start: "timestamp='"
14741746
# time-stamp-format: "%:y-%02m-%02d"
14751747
# time-stamp-end: "'"
14761748
# End:
14771749
--- autosetup/autosetup-config.guess
+++ autosetup/autosetup-config.guess
@@ -1,10 +1,12 @@
1 #! /bin/sh
2 # Attempt to guess a canonical system name.
3 # Copyright 1992-2018 Free Software Foundation, Inc.
4
5 timestamp='2018-03-08'
 
 
6
7 # This file is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
@@ -25,14 +27,22 @@
25 # of the GNU General Public License, version 3 ("GPLv3").
26 #
27 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
28 #
29 # You can get the latest version of this script from:
30 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
31 #
32 # Please send patches to <[email protected]>.
33
 
 
 
 
 
 
 
 
34
35 me=`echo "$0" | sed -e 's,.*/,,'`
36
37 usage="\
38 Usage: $0 [OPTION]
@@ -48,11 +58,11 @@
48
49 version="\
50 GNU config.guess ($timestamp)
51
52 Originally written by Per Bothner.
53 Copyright 1992-2018 Free Software Foundation, Inc.
54
55 This is free software; see the source for copying conditions. There is NO
56 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
57
58 help="
@@ -82,11 +92,12 @@
82 if test $# != 0; then
83 echo "$me: too many arguments$help" >&2
84 exit 1
85 fi
86
87 trap 'exit 1' 1 2 15
 
88
89 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
90 # compiler to aid in system detection is discouraged as it requires
91 # temporary files to be created and, as you can see below, it is a
92 # headache to deal with in a portable fashion.
@@ -94,77 +105,94 @@
94 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
95 # use `HOST_CC' if defined, but it is deprecated.
96
97 # Portable tmp directory creation inspired by the Autoconf team.
98
99 set_cc_for_build='
100 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
101 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
102 : ${TMPDIR=/tmp} ;
103 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
104 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
105 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
106 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
107 dummy=$tmp/dummy ;
108 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
109 case $CC_FOR_BUILD,$HOST_CC,$CC in
110 ,,) echo "int x;" > "$dummy.c" ;
111 for c in cc gcc c89 c99 ; do
112 if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
113 CC_FOR_BUILD="$c"; break ;
114 fi ;
115 done ;
116 if test x"$CC_FOR_BUILD" = x ; then
117 CC_FOR_BUILD=no_compiler_found ;
118 fi
119 ;;
120 ,,*) CC_FOR_BUILD=$CC ;;
121 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
122 esac ; set_cc_for_build= ;'
 
 
 
 
 
 
123
124 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
125 # ([email protected] 1994-08-24)
126 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
127 PATH=$PATH:/.attbin ; export PATH
128 fi
129
130 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
131 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
132 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
133 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
134
135 case "$UNAME_SYSTEM" in
136 Linux|GNU|GNU/*)
137 # If the system lacks a compiler, then just pick glibc.
138 # We could probably try harder.
139 LIBC=gnu
140
141 eval "$set_cc_for_build"
142 cat <<-EOF > "$dummy.c"
143 #include <features.h>
144 #if defined(__UCLIBC__)
145 LIBC=uclibc
146 #elif defined(__dietlibc__)
147 LIBC=dietlibc
148 #else
149 LIBC=gnu
 
 
 
 
 
 
150 #endif
151 EOF
152 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
 
 
 
 
 
 
 
 
153
154 # If ldd exists, use it to detect musl libc.
155 if command -v ldd >/dev/null && \
156 ldd --version 2>&1 | grep -q ^musl
157 then
158 LIBC=musl
159 fi
160 ;;
161 esac
162
163 # Note: order is significant - the case branches are not exclusive.
164
165 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
166 *:NetBSD:*:*)
167 # NetBSD (nbsd) targets should (where applicable) match one or
168 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
169 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
170 # switched to ELF, *-*-netbsd* would select the old
@@ -172,36 +200,36 @@
172 # compatibility and a consistent mechanism for selecting the
173 # object file format.
174 #
175 # Note: NetBSD doesn't particularly care about the vendor
176 # portion of the name. We always set it to "unknown".
177 sysctl="sysctl -n hw.machine_arch"
178 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
179 "/sbin/$sysctl" 2>/dev/null || \
180 "/usr/sbin/$sysctl" 2>/dev/null || \
181 echo unknown)`
182 case "$UNAME_MACHINE_ARCH" in
 
183 armeb) machine=armeb-unknown ;;
184 arm*) machine=arm-unknown ;;
185 sh3el) machine=shl-unknown ;;
186 sh3eb) machine=sh-unknown ;;
187 sh5el) machine=sh5le-unknown ;;
188 earmv*)
189 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
190 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
191 machine="${arch}${endian}"-unknown
192 ;;
193 *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
194 esac
195 # The Operating System including object format, if it has switched
196 # to ELF recently (or will in the future) and ABI.
197 case "$UNAME_MACHINE_ARCH" in
198 earm*)
199 os=netbsdelf
200 ;;
201 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
202 eval "$set_cc_for_build"
203 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
204 | grep -q __ELF__
205 then
206 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
207 # Return netbsd for either. FIX?
@@ -213,11 +241,11 @@
213 *)
214 os=netbsd
215 ;;
216 esac
217 # Determine ABI tags.
218 case "$UNAME_MACHINE_ARCH" in
219 earm*)
220 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
221 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
222 ;;
223 esac
@@ -224,11 +252,11 @@
224 # The OS release
225 # Debian GNU/NetBSD machines have a different userland, and
226 # thus, need a distinct triplet. However, they do not need
227 # kernel version information, so it can be replaced with a
228 # suitable tag, in the style of linux-gnu.
229 case "$UNAME_VERSION" in
230 Debian*)
231 release='-gnu'
232 ;;
233 *)
234 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
@@ -235,49 +263,61 @@
235 ;;
236 esac
237 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
238 # contains redundant information, the shorter form:
239 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
240 echo "$machine-${os}${release}${abi}"
241 exit ;;
242 *:Bitrig:*:*)
243 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
244 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
245 exit ;;
246 *:OpenBSD:*:*)
247 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
248 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
249 exit ;;
 
 
 
 
250 *:LibertyBSD:*:*)
251 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
252 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
253 exit ;;
254 *:MidnightBSD:*:*)
255 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
256 exit ;;
257 *:ekkoBSD:*:*)
258 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
259 exit ;;
260 *:SolidBSD:*:*)
261 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
262 exit ;;
 
 
 
263 macppc:MirBSD:*:*)
264 echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
265 exit ;;
266 *:MirBSD:*:*)
267 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
268 exit ;;
269 *:Sortix:*:*)
270 echo "$UNAME_MACHINE"-unknown-sortix
271 exit ;;
 
 
 
272 *:Redox:*:*)
273 echo "$UNAME_MACHINE"-unknown-redox
274 exit ;;
275 mips:OSF1:*.*)
276 echo mips-dec-osf1
277 exit ;;
278 alpha:OSF1:*:*)
 
 
279 case $UNAME_RELEASE in
280 *4.0)
281 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
282 ;;
283 *5.*)
@@ -287,11 +327,11 @@
287 # According to Compaq, /usr/sbin/psrinfo has been available on
288 # OSF/1 and Tru64 systems produced since 1995. I hope that
289 # covers most systems running today. This code pipes the CPU
290 # types through head -n 1, so we only detect the type of CPU 0.
291 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
292 case "$ALPHA_CPU_TYPE" in
293 "EV4 (21064)")
294 UNAME_MACHINE=alpha ;;
295 "EV4.5 (21064)")
296 UNAME_MACHINE=alpha ;;
297 "LCA4 (21066/21068)")
@@ -324,167 +364,171 @@
324 # A Pn.n version is a patched version.
325 # A Vn.n version is a released version.
326 # A Tn.n version is a released field test version.
327 # A Xn.n version is an unreleased experimental baselevel.
328 # 1.2 uses "1.2" for uname -r.
329 echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
330 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
331 exitcode=$?
332 trap '' 0
333 exit $exitcode ;;
334 Amiga*:UNIX_System_V:4.0:*)
335 echo m68k-unknown-sysv4
336 exit ;;
337 *:[Aa]miga[Oo][Ss]:*:*)
338 echo "$UNAME_MACHINE"-unknown-amigaos
339 exit ;;
340 *:[Mm]orph[Oo][Ss]:*:*)
341 echo "$UNAME_MACHINE"-unknown-morphos
342 exit ;;
343 *:OS/390:*:*)
344 echo i370-ibm-openedition
345 exit ;;
346 *:z/VM:*:*)
347 echo s390-ibm-zvmoe
348 exit ;;
349 *:OS400:*:*)
350 echo powerpc-ibm-os400
351 exit ;;
352 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
353 echo arm-acorn-riscix"$UNAME_RELEASE"
354 exit ;;
355 arm*:riscos:*:*|arm*:RISCOS:*:*)
356 echo arm-unknown-riscos
357 exit ;;
358 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
359 echo hppa1.1-hitachi-hiuxmpp
360 exit ;;
361 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
362 # [email protected] (Earle F. Ake) contributed MIS and NILE.
363 if test "`(/bin/universe) 2>/dev/null`" = att ; then
364 echo pyramid-pyramid-sysv3
365 else
366 echo pyramid-pyramid-bsd
367 fi
368 exit ;;
369 NILE*:*:*:dcosx)
370 echo pyramid-pyramid-svr4
371 exit ;;
372 DRS?6000:unix:4.0:6*)
373 echo sparc-icl-nx6
374 exit ;;
375 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
376 case `/usr/bin/uname -p` in
377 sparc) echo sparc-icl-nx7; exit ;;
378 esac ;;
 
379 s390x:SunOS:*:*)
380 echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
381 exit ;;
 
382 sun4H:SunOS:5.*:*)
383 echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
384 exit ;;
 
385 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
386 echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
387 exit ;;
 
388 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
389 echo i386-pc-auroraux"$UNAME_RELEASE"
390 exit ;;
391 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
392 eval "$set_cc_for_build"
393 SUN_ARCH=i386
394 # If there is a compiler, see if it is configured for 64-bit objects.
395 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
396 # This test works for both compilers.
397 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
398 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
399 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
400 grep IS_64BIT_ARCH >/dev/null
401 then
402 SUN_ARCH=x86_64
403 fi
404 fi
405 echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
406 exit ;;
 
407 sun4*:SunOS:6*:*)
408 # According to config.sub, this is the proper way to canonicalize
409 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
410 # it's likely to be more like Solaris than SunOS4.
411 echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
412 exit ;;
 
413 sun4*:SunOS:*:*)
414 case "`/usr/bin/arch -k`" in
415 Series*|S4*)
416 UNAME_RELEASE=`uname -v`
417 ;;
418 esac
419 # Japanese Language versions have a version number like `4.1.3-JL'.
420 echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
421 exit ;;
 
422 sun3*:SunOS:*:*)
423 echo m68k-sun-sunos"$UNAME_RELEASE"
424 exit ;;
425 sun*:*:4.2BSD:*)
426 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
427 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
428 case "`/bin/arch`" in
429 sun3)
430 echo m68k-sun-sunos"$UNAME_RELEASE"
431 ;;
432 sun4)
433 echo sparc-sun-sunos"$UNAME_RELEASE"
434 ;;
435 esac
436 exit ;;
437 aushp:SunOS:*:*)
438 echo sparc-auspex-sunos"$UNAME_RELEASE"
439 exit ;;
440 # The situation for MiNT is a little confusing. The machine name
441 # can be virtually everything (everything which is not
442 # "atarist" or "atariste" at least should have a processor
443 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
444 # to the lowercase version "mint" (or "freemint"). Finally
445 # the system name "TOS" denotes a system which is actually not
446 # MiNT. But MiNT is downward compatible to TOS, so this should
447 # be no problem.
448 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
449 echo m68k-atari-mint"$UNAME_RELEASE"
450 exit ;;
451 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
452 echo m68k-atari-mint"$UNAME_RELEASE"
453 exit ;;
454 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
455 echo m68k-atari-mint"$UNAME_RELEASE"
456 exit ;;
457 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
458 echo m68k-milan-mint"$UNAME_RELEASE"
459 exit ;;
460 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
461 echo m68k-hades-mint"$UNAME_RELEASE"
462 exit ;;
463 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
464 echo m68k-unknown-mint"$UNAME_RELEASE"
465 exit ;;
466 m68k:machten:*:*)
467 echo m68k-apple-machten"$UNAME_RELEASE"
468 exit ;;
469 powerpc:machten:*:*)
470 echo powerpc-apple-machten"$UNAME_RELEASE"
471 exit ;;
472 RISC*:Mach:*:*)
473 echo mips-dec-mach_bsd4.3
474 exit ;;
475 RISC*:ULTRIX:*:*)
476 echo mips-dec-ultrix"$UNAME_RELEASE"
477 exit ;;
478 VAX*:ULTRIX*:*:*)
479 echo vax-dec-ultrix"$UNAME_RELEASE"
480 exit ;;
481 2020:CLIX:*:* | 2430:CLIX:*:*)
482 echo clipper-intergraph-clix"$UNAME_RELEASE"
483 exit ;;
484 mips:*:*:UMIPS | mips:*:*:RISCos)
485 eval "$set_cc_for_build"
486 sed 's/^ //' << EOF > "$dummy.c"
487 #ifdef __cplusplus
488 #include <stdio.h> /* for printf() prototype */
489 int main (int argc, char *argv[]) {
490 #else
@@ -506,82 +550,83 @@
506 EOF
507 $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
508 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
509 SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
510 { echo "$SYSTEM_NAME"; exit; }
511 echo mips-mips-riscos"$UNAME_RELEASE"
512 exit ;;
513 Motorola:PowerMAX_OS:*:*)
514 echo powerpc-motorola-powermax
515 exit ;;
516 Motorola:*:4.3:PL8-*)
517 echo powerpc-harris-powermax
518 exit ;;
519 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
520 echo powerpc-harris-powermax
521 exit ;;
522 Night_Hawk:Power_UNIX:*:*)
523 echo powerpc-harris-powerunix
524 exit ;;
525 m88k:CX/UX:7*:*)
526 echo m88k-harris-cxux7
527 exit ;;
528 m88k:*:4*:R4*)
529 echo m88k-motorola-sysv4
530 exit ;;
531 m88k:*:3*:R3*)
532 echo m88k-motorola-sysv3
533 exit ;;
534 AViiON:dgux:*:*)
535 # DG/UX returns AViiON for all architectures
536 UNAME_PROCESSOR=`/usr/bin/uname -p`
537 if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
538 then
539 if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
540 [ "$TARGET_BINARY_INTERFACE"x = x ]
541 then
542 echo m88k-dg-dgux"$UNAME_RELEASE"
543 else
544 echo m88k-dg-dguxbcs"$UNAME_RELEASE"
545 fi
546 else
547 echo i586-dg-dgux"$UNAME_RELEASE"
548 fi
549 exit ;;
550 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
551 echo m88k-dolphin-sysv3
552 exit ;;
553 M88*:*:R3*:*)
554 # Delta 88k system running SVR3
555 echo m88k-motorola-sysv3
556 exit ;;
557 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
558 echo m88k-tektronix-sysv3
559 exit ;;
560 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
561 echo m68k-tektronix-bsd
562 exit ;;
563 *:IRIX*:*:*)
564 echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
565 exit ;;
 
566 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
567 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
568 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
569 i*86:AIX:*:*)
570 echo i386-ibm-aix
571 exit ;;
572 ia64:AIX:*:*)
573 if [ -x /usr/bin/oslevel ] ; then
574 IBM_REV=`/usr/bin/oslevel`
575 else
576 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
577 fi
578 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
579 exit ;;
580 *:AIX:2:3)
581 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
582 eval "$set_cc_for_build"
583 sed 's/^ //' << EOF > "$dummy.c"
584 #include <sys/systemcfg.h>
585
586 main()
587 {
@@ -591,78 +636,78 @@
591 exit(0);
592 }
593 EOF
594 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
595 then
596 echo "$SYSTEM_NAME"
597 else
598 echo rs6000-ibm-aix3.2.5
599 fi
600 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
601 echo rs6000-ibm-aix3.2.4
602 else
603 echo rs6000-ibm-aix3.2
604 fi
605 exit ;;
606 *:AIX:*:[4567])
607 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
608 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
609 IBM_ARCH=rs6000
610 else
611 IBM_ARCH=powerpc
612 fi
613 if [ -x /usr/bin/lslpp ] ; then
614 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
615 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
616 else
617 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
618 fi
619 echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
620 exit ;;
621 *:AIX:*:*)
622 echo rs6000-ibm-aix
623 exit ;;
624 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
625 echo romp-ibm-bsd4.4
626 exit ;;
627 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
628 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
629 exit ;; # report: romp-ibm BSD 4.3
630 *:BOSX:*:*)
631 echo rs6000-bull-bosx
632 exit ;;
633 DPX/2?00:B.O.S.:*:*)
634 echo m68k-bull-sysv3
635 exit ;;
636 9000/[34]??:4.3bsd:1.*:*)
637 echo m68k-hp-bsd
638 exit ;;
639 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
640 echo m68k-hp-bsd4.4
641 exit ;;
642 9000/[34678]??:HP-UX:*:*)
643 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
644 case "$UNAME_MACHINE" in
645 9000/31?) HP_ARCH=m68000 ;;
646 9000/[34]??) HP_ARCH=m68k ;;
647 9000/[678][0-9][0-9])
648 if [ -x /usr/bin/getconf ]; then
649 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
650 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
651 case "$sc_cpu_version" in
652 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
653 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
654 532) # CPU_PA_RISC2_0
655 case "$sc_kernel_bits" in
656 32) HP_ARCH=hppa2.0n ;;
657 64) HP_ARCH=hppa2.0w ;;
658 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
659 esac ;;
660 esac
661 fi
662 if [ "$HP_ARCH" = "" ]; then
663 eval "$set_cc_for_build"
664 sed 's/^ //' << EOF > "$dummy.c"
665
666 #define _HPUX_SOURCE
667 #include <stdlib.h>
668 #include <unistd.h>
@@ -696,13 +741,13 @@
696 EOF
697 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
698 test -z "$HP_ARCH" && HP_ARCH=hppa
699 fi ;;
700 esac
701 if [ "$HP_ARCH" = hppa2.0w ]
702 then
703 eval "$set_cc_for_build"
704
705 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
706 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
707 # generating 64-bit code. GNU and HP use different nomenclature:
708 #
@@ -717,18 +762,18 @@
717 HP_ARCH=hppa2.0w
718 else
719 HP_ARCH=hppa64
720 fi
721 fi
722 echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
723 exit ;;
724 ia64:HP-UX:*:*)
725 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
726 echo ia64-hp-hpux"$HPUX_REV"
727 exit ;;
728 3050*:HI-UX:*:*)
729 eval "$set_cc_for_build"
730 sed 's/^ //' << EOF > "$dummy.c"
731 #include <unistd.h>
732 int
733 main ()
734 {
@@ -752,162 +797,186 @@
752 exit (0);
753 }
754 EOF
755 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
756 { echo "$SYSTEM_NAME"; exit; }
757 echo unknown-hitachi-hiuxwe2
758 exit ;;
759 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
760 echo hppa1.1-hp-bsd
761 exit ;;
762 9000/8??:4.3bsd:*:*)
763 echo hppa1.0-hp-bsd
764 exit ;;
765 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
766 echo hppa1.0-hp-mpeix
767 exit ;;
768 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
769 echo hppa1.1-hp-osf
770 exit ;;
771 hp8??:OSF1:*:*)
772 echo hppa1.0-hp-osf
773 exit ;;
774 i*86:OSF1:*:*)
775 if [ -x /usr/sbin/sysversion ] ; then
776 echo "$UNAME_MACHINE"-unknown-osf1mk
777 else
778 echo "$UNAME_MACHINE"-unknown-osf1
779 fi
780 exit ;;
781 parisc*:Lites*:*:*)
782 echo hppa1.1-hp-lites
783 exit ;;
784 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
785 echo c1-convex-bsd
786 exit ;;
787 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
788 if getsysinfo -f scalar_acc
789 then echo c32-convex-bsd
790 else echo c2-convex-bsd
791 fi
792 exit ;;
793 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
794 echo c34-convex-bsd
795 exit ;;
796 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
797 echo c38-convex-bsd
798 exit ;;
799 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
800 echo c4-convex-bsd
801 exit ;;
802 CRAY*Y-MP:*:*:*)
803 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
804 exit ;;
 
805 CRAY*[A-Z]90:*:*:*)
806 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
807 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
808 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
809 -e 's/\.[^.]*$/.X/'
810 exit ;;
811 CRAY*TS:*:*:*)
812 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
813 exit ;;
 
814 CRAY*T3E:*:*:*)
815 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
816 exit ;;
 
817 CRAY*SV1:*:*:*)
818 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
819 exit ;;
 
820 *:UNICOS/mp:*:*)
821 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
822 exit ;;
 
823 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
824 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
825 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
826 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
827 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
828 exit ;;
829 5000:UNIX_System_V:4.*:*)
830 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
831 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
832 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
833 exit ;;
834 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
835 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
836 exit ;;
837 sparc*:BSD/OS:*:*)
838 echo sparc-unknown-bsdi"$UNAME_RELEASE"
839 exit ;;
840 *:BSD/OS:*:*)
841 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
842 exit ;;
 
 
 
 
 
 
 
 
 
 
 
 
 
843 *:FreeBSD:*:*)
844 UNAME_PROCESSOR=`/usr/bin/uname -p`
845 case "$UNAME_PROCESSOR" in
846 amd64)
847 UNAME_PROCESSOR=x86_64 ;;
848 i386)
849 UNAME_PROCESSOR=i586 ;;
850 esac
851 echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
852 exit ;;
 
853 i*:CYGWIN*:*)
854 echo "$UNAME_MACHINE"-pc-cygwin
855 exit ;;
856 *:MINGW64*:*)
857 echo "$UNAME_MACHINE"-pc-mingw64
858 exit ;;
859 *:MINGW*:*)
860 echo "$UNAME_MACHINE"-pc-mingw32
861 exit ;;
862 *:MSYS*:*)
863 echo "$UNAME_MACHINE"-pc-msys
864 exit ;;
865 i*:PW*:*)
866 echo "$UNAME_MACHINE"-pc-pw32
867 exit ;;
868 *:Interix*:*)
869 case "$UNAME_MACHINE" in
870 x86)
871 echo i586-pc-interix"$UNAME_RELEASE"
872 exit ;;
873 authenticamd | genuineintel | EM64T)
874 echo x86_64-unknown-interix"$UNAME_RELEASE"
875 exit ;;
876 IA64)
877 echo ia64-unknown-interix"$UNAME_RELEASE"
878 exit ;;
879 esac ;;
880 i*:UWIN*:*)
881 echo "$UNAME_MACHINE"-pc-uwin
882 exit ;;
883 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
884 echo x86_64-unknown-cygwin
885 exit ;;
886 prep*:SunOS:5.*:*)
887 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
888 exit ;;
 
889 *:GNU:*:*)
890 # the GNU system
891 echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
892 exit ;;
 
 
893 *:GNU/*:*:*)
894 # other systems with GNU libc and userland
895 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
896 exit ;;
897 i*86:Minix:*:*)
898 echo "$UNAME_MACHINE"-pc-minix
899 exit ;;
 
 
900 aarch64:Linux:*:*)
901 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
902 exit ;;
903 aarch64_be:Linux:*:*)
904 UNAME_MACHINE=aarch64_be
905 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
906 exit ;;
907 alpha:Linux:*:*)
908 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
909 EV5) UNAME_MACHINE=alphaev5 ;;
910 EV56) UNAME_MACHINE=alphaev56 ;;
911 PCA56) UNAME_MACHINE=alphapca56 ;;
912 PCA57) UNAME_MACHINE=alphapca56 ;;
913 EV6) UNAME_MACHINE=alphaev6 ;;
@@ -914,246 +983,288 @@
914 EV67) UNAME_MACHINE=alphaev67 ;;
915 EV68*) UNAME_MACHINE=alphaev68 ;;
916 esac
917 objdump --private-headers /bin/sh | grep -q ld.so.1
918 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
919 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
920 exit ;;
921 arc:Linux:*:* | arceb:Linux:*:*)
922 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
923 exit ;;
924 arm*:Linux:*:*)
925 eval "$set_cc_for_build"
926 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
927 | grep -q __ARM_EABI__
928 then
929 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
930 else
931 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
932 | grep -q __ARM_PCS_VFP
933 then
934 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
935 else
936 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
937 fi
938 fi
939 exit ;;
940 avr32*:Linux:*:*)
941 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
942 exit ;;
943 cris:Linux:*:*)
944 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
945 exit ;;
946 crisv32:Linux:*:*)
947 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
948 exit ;;
949 e2k:Linux:*:*)
950 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
951 exit ;;
952 frv:Linux:*:*)
953 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
954 exit ;;
955 hexagon:Linux:*:*)
956 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
957 exit ;;
958 i*86:Linux:*:*)
959 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
960 exit ;;
961 ia64:Linux:*:*)
962 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
963 exit ;;
964 k1om:Linux:*:*)
965 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
966 exit ;;
 
 
 
967 m32r*:Linux:*:*)
968 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
969 exit ;;
970 m68*:Linux:*:*)
971 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
972 exit ;;
973 mips:Linux:*:* | mips64:Linux:*:*)
974 eval "$set_cc_for_build"
 
 
975 sed 's/^ //' << EOF > "$dummy.c"
976 #undef CPU
977 #undef ${UNAME_MACHINE}
978 #undef ${UNAME_MACHINE}el
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
979 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
980 CPU=${UNAME_MACHINE}el
981 #else
982 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
983 CPU=${UNAME_MACHINE}
984 #else
985 CPU=
986 #endif
987 #endif
988 EOF
989 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
990 test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
 
991 ;;
992 mips64el:Linux:*:*)
993 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
994 exit ;;
995 openrisc*:Linux:*:*)
996 echo or1k-unknown-linux-"$LIBC"
997 exit ;;
998 or32:Linux:*:* | or1k*:Linux:*:*)
999 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1000 exit ;;
1001 padre:Linux:*:*)
1002 echo sparc-unknown-linux-"$LIBC"
1003 exit ;;
1004 parisc64:Linux:*:* | hppa64:Linux:*:*)
1005 echo hppa64-unknown-linux-"$LIBC"
1006 exit ;;
1007 parisc:Linux:*:* | hppa:Linux:*:*)
1008 # Look for CPU level
1009 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1010 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1011 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1012 *) echo hppa-unknown-linux-"$LIBC" ;;
1013 esac
1014 exit ;;
1015 ppc64:Linux:*:*)
1016 echo powerpc64-unknown-linux-"$LIBC"
1017 exit ;;
1018 ppc:Linux:*:*)
1019 echo powerpc-unknown-linux-"$LIBC"
1020 exit ;;
1021 ppc64le:Linux:*:*)
1022 echo powerpc64le-unknown-linux-"$LIBC"
1023 exit ;;
1024 ppcle:Linux:*:*)
1025 echo powerpcle-unknown-linux-"$LIBC"
1026 exit ;;
1027 riscv32:Linux:*:* | riscv64:Linux:*:*)
1028 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1029 exit ;;
1030 s390:Linux:*:* | s390x:Linux:*:*)
1031 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
1032 exit ;;
1033 sh64*:Linux:*:*)
1034 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1035 exit ;;
1036 sh*:Linux:*:*)
1037 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1038 exit ;;
1039 sparc:Linux:*:* | sparc64:Linux:*:*)
1040 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1041 exit ;;
1042 tile*:Linux:*:*)
1043 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1044 exit ;;
1045 vax:Linux:*:*)
1046 echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
1047 exit ;;
1048 x86_64:Linux:*:*)
1049 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
1050 exit ;;
 
 
 
 
 
 
 
 
 
 
1051 xtensa*:Linux:*:*)
1052 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1053 exit ;;
1054 i*86:DYNIX/ptx:4*:*)
1055 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1056 # earlier versions are messed up and put the nodename in both
1057 # sysname and nodename.
1058 echo i386-sequent-sysv4
1059 exit ;;
1060 i*86:UNIX_SV:4.2MP:2.*)
1061 # Unixware is an offshoot of SVR4, but it has its own version
1062 # number series starting with 2...
1063 # I am not positive that other SVR4 systems won't match this,
1064 # I just have to hope. -- rms.
1065 # Use sysv4.2uw... so that sysv4* matches it.
1066 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
1067 exit ;;
1068 i*86:OS/2:*:*)
1069 # If we were able to find `uname', then EMX Unix compatibility
1070 # is probably installed.
1071 echo "$UNAME_MACHINE"-pc-os2-emx
1072 exit ;;
1073 i*86:XTS-300:*:STOP)
1074 echo "$UNAME_MACHINE"-unknown-stop
1075 exit ;;
1076 i*86:atheos:*:*)
1077 echo "$UNAME_MACHINE"-unknown-atheos
1078 exit ;;
1079 i*86:syllable:*:*)
1080 echo "$UNAME_MACHINE"-pc-syllable
1081 exit ;;
1082 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1083 echo i386-unknown-lynxos"$UNAME_RELEASE"
1084 exit ;;
1085 i*86:*DOS:*:*)
1086 echo "$UNAME_MACHINE"-pc-msdosdjgpp
1087 exit ;;
1088 i*86:*:4.*:*)
1089 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
1090 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1091 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
1092 else
1093 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
1094 fi
1095 exit ;;
1096 i*86:*:5:[678]*)
1097 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1098 case `/bin/uname -X | grep "^Machine"` in
1099 *486*) UNAME_MACHINE=i486 ;;
1100 *Pentium) UNAME_MACHINE=i586 ;;
1101 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1102 esac
1103 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
1104 exit ;;
1105 i*86:*:3.2:*)
1106 if test -f /usr/options/cb.name; then
1107 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1108 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
1109 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1110 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1111 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1112 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1113 && UNAME_MACHINE=i586
1114 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1115 && UNAME_MACHINE=i686
1116 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1117 && UNAME_MACHINE=i686
1118 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
1119 else
1120 echo "$UNAME_MACHINE"-pc-sysv32
1121 fi
1122 exit ;;
1123 pc:*:*:*)
1124 # Left here for compatibility:
1125 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1126 # the processor, so we play safe by assuming i586.
1127 # Note: whatever this is, it MUST be the same as what config.sub
1128 # prints for the "djgpp" host, or else GDB configure will decide that
1129 # this is a cross-build.
1130 echo i586-pc-msdosdjgpp
1131 exit ;;
1132 Intel:Mach:3*:*)
1133 echo i386-pc-mach3
1134 exit ;;
1135 paragon:*:*:*)
1136 echo i860-intel-osf1
1137 exit ;;
1138 i860:*:4.*:*) # i860-SVR4
1139 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1140 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
1141 else # Add other i860-SVR4 vendors below as they are discovered.
1142 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
1143 fi
1144 exit ;;
1145 mini*:CTIX:SYS*5:*)
1146 # "miniframe"
1147 echo m68010-convergent-sysv
1148 exit ;;
1149 mc68k:UNIX:SYSTEM5:3.51m)
1150 echo m68k-convergent-sysv
1151 exit ;;
1152 M680?0:D-NIX:5.3:*)
1153 echo m68k-diab-dnix
1154 exit ;;
1155 M68*:*:R3V[5678]*:*)
1156 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1157 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1158 OS_REL=''
1159 test -r /etc/.relid \
@@ -1174,253 +1285,405 @@
1174 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1175 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
1176 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1177 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1178 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1179 echo m68k-unknown-lynxos"$UNAME_RELEASE"
1180 exit ;;
1181 mc68030:UNIX_System_V:4.*:*)
1182 echo m68k-atari-sysv4
1183 exit ;;
1184 TSUNAMI:LynxOS:2.*:*)
1185 echo sparc-unknown-lynxos"$UNAME_RELEASE"
1186 exit ;;
1187 rs6000:LynxOS:2.*:*)
1188 echo rs6000-unknown-lynxos"$UNAME_RELEASE"
1189 exit ;;
1190 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1191 echo powerpc-unknown-lynxos"$UNAME_RELEASE"
1192 exit ;;
1193 SM[BE]S:UNIX_SV:*:*)
1194 echo mips-dde-sysv"$UNAME_RELEASE"
1195 exit ;;
1196 RM*:ReliantUNIX-*:*:*)
1197 echo mips-sni-sysv4
1198 exit ;;
1199 RM*:SINIX-*:*:*)
1200 echo mips-sni-sysv4
1201 exit ;;
1202 *:SINIX-*:*:*)
1203 if uname -p 2>/dev/null >/dev/null ; then
1204 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1205 echo "$UNAME_MACHINE"-sni-sysv4
1206 else
1207 echo ns32k-sni-sysv
1208 fi
1209 exit ;;
1210 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1211 # says <[email protected]>
1212 echo i586-unisys-sysv4
1213 exit ;;
1214 *:UNIX_System_V:4*:FTX*)
1215 # From Gerald Hewes <[email protected]>.
1216 # How about differentiating between stratus architectures? -djm
1217 echo hppa1.1-stratus-sysv4
1218 exit ;;
1219 *:*:*:FTX*)
1220 # From [email protected].
1221 echo i860-stratus-sysv4
1222 exit ;;
1223 i*86:VOS:*:*)
1224 # From [email protected].
1225 echo "$UNAME_MACHINE"-stratus-vos
1226 exit ;;
1227 *:VOS:*:*)
1228 # From [email protected].
1229 echo hppa1.1-stratus-vos
1230 exit ;;
1231 mc68*:A/UX:*:*)
1232 echo m68k-apple-aux"$UNAME_RELEASE"
1233 exit ;;
1234 news*:NEWS-OS:6*:*)
1235 echo mips-sony-newsos6
1236 exit ;;
1237 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1238 if [ -d /usr/nec ]; then
1239 echo mips-nec-sysv"$UNAME_RELEASE"
1240 else
1241 echo mips-unknown-sysv"$UNAME_RELEASE"
1242 fi
1243 exit ;;
1244 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1245 echo powerpc-be-beos
1246 exit ;;
1247 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1248 echo powerpc-apple-beos
1249 exit ;;
1250 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1251 echo i586-pc-beos
1252 exit ;;
1253 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1254 echo i586-pc-haiku
1255 exit ;;
1256 x86_64:Haiku:*:*)
1257 echo x86_64-unknown-haiku
1258 exit ;;
1259 SX-4:SUPER-UX:*:*)
1260 echo sx4-nec-superux"$UNAME_RELEASE"
1261 exit ;;
1262 SX-5:SUPER-UX:*:*)
1263 echo sx5-nec-superux"$UNAME_RELEASE"
1264 exit ;;
1265 SX-6:SUPER-UX:*:*)
1266 echo sx6-nec-superux"$UNAME_RELEASE"
1267 exit ;;
1268 SX-7:SUPER-UX:*:*)
1269 echo sx7-nec-superux"$UNAME_RELEASE"
1270 exit ;;
1271 SX-8:SUPER-UX:*:*)
1272 echo sx8-nec-superux"$UNAME_RELEASE"
1273 exit ;;
1274 SX-8R:SUPER-UX:*:*)
1275 echo sx8r-nec-superux"$UNAME_RELEASE"
1276 exit ;;
1277 SX-ACE:SUPER-UX:*:*)
1278 echo sxace-nec-superux"$UNAME_RELEASE"
1279 exit ;;
1280 Power*:Rhapsody:*:*)
1281 echo powerpc-apple-rhapsody"$UNAME_RELEASE"
1282 exit ;;
1283 *:Rhapsody:*:*)
1284 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
1285 exit ;;
 
 
 
1286 *:Darwin:*:*)
1287 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1288 eval "$set_cc_for_build"
1289 if test "$UNAME_PROCESSOR" = unknown ; then
1290 UNAME_PROCESSOR=powerpc
1291 fi
1292 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1293 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1294 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1295 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1296 grep IS_64BIT_ARCH >/dev/null
1297 then
1298 case $UNAME_PROCESSOR in
1299 i386) UNAME_PROCESSOR=x86_64 ;;
1300 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1301 esac
1302 fi
1303 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1304 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1305 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1306 grep IS_PPC >/dev/null
1307 then
1308 UNAME_PROCESSOR=powerpc
1309 fi
 
 
 
 
 
 
1310 fi
1311 elif test "$UNAME_PROCESSOR" = i386 ; then
1312 # Avoid executing cc on OS X 10.9, as it ships with a stub
1313 # that puts up a graphical alert prompting to install
1314 # developer tools. Any system running Mac OS X 10.7 or
1315 # later (Darwin 11 and later) is required to have a 64-bit
1316 # processor. This is not true of the ARM version of Darwin
1317 # that Apple uses in portable devices.
1318 UNAME_PROCESSOR=x86_64
1319 fi
1320 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
1321 exit ;;
1322 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1323 UNAME_PROCESSOR=`uname -p`
1324 if test "$UNAME_PROCESSOR" = x86; then
1325 UNAME_PROCESSOR=i386
1326 UNAME_MACHINE=pc
1327 fi
1328 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
1329 exit ;;
1330 *:QNX:*:4*)
1331 echo i386-pc-qnx
1332 exit ;;
1333 NEO-*:NONSTOP_KERNEL:*:*)
1334 echo neo-tandem-nsk"$UNAME_RELEASE"
1335 exit ;;
1336 NSE-*:NONSTOP_KERNEL:*:*)
1337 echo nse-tandem-nsk"$UNAME_RELEASE"
1338 exit ;;
1339 NSR-*:NONSTOP_KERNEL:*:*)
1340 echo nsr-tandem-nsk"$UNAME_RELEASE"
1341 exit ;;
1342 NSV-*:NONSTOP_KERNEL:*:*)
1343 echo nsv-tandem-nsk"$UNAME_RELEASE"
1344 exit ;;
1345 NSX-*:NONSTOP_KERNEL:*:*)
1346 echo nsx-tandem-nsk"$UNAME_RELEASE"
1347 exit ;;
1348 *:NonStop-UX:*:*)
1349 echo mips-compaq-nonstopux
1350 exit ;;
1351 BS2000:POSIX*:*:*)
1352 echo bs2000-siemens-sysv
1353 exit ;;
1354 DS/*:UNIX_System_V:*:*)
1355 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
1356 exit ;;
1357 *:Plan9:*:*)
1358 # "uname -m" is not consistent, so use $cputype instead. 386
1359 # is converted to i386 for consistency with other x86
1360 # operating systems.
1361 if test "$cputype" = 386; then
1362 UNAME_MACHINE=i386
1363 else
1364 UNAME_MACHINE="$cputype"
1365 fi
1366 echo "$UNAME_MACHINE"-unknown-plan9
1367 exit ;;
1368 *:TOPS-10:*:*)
1369 echo pdp10-unknown-tops10
1370 exit ;;
1371 *:TENEX:*:*)
1372 echo pdp10-unknown-tenex
1373 exit ;;
1374 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1375 echo pdp10-dec-tops20
1376 exit ;;
1377 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1378 echo pdp10-xkl-tops20
1379 exit ;;
1380 *:TOPS-20:*:*)
1381 echo pdp10-unknown-tops20
1382 exit ;;
1383 *:ITS:*:*)
1384 echo pdp10-unknown-its
1385 exit ;;
1386 SEI:*:*:SEIUX)
1387 echo mips-sei-seiux"$UNAME_RELEASE"
1388 exit ;;
1389 *:DragonFly:*:*)
1390 echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
1391 exit ;;
 
1392 *:*VMS:*:*)
1393 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1394 case "$UNAME_MACHINE" in
1395 A*) echo alpha-dec-vms ; exit ;;
1396 I*) echo ia64-dec-vms ; exit ;;
1397 V*) echo vax-dec-vms ; exit ;;
1398 esac ;;
1399 *:XENIX:*:SysV)
1400 echo i386-pc-xenix
1401 exit ;;
1402 i*86:skyos:*:*)
1403 echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
1404 exit ;;
 
1405 i*86:rdos:*:*)
1406 echo "$UNAME_MACHINE"-pc-rdos
1407 exit ;;
1408 i*86:AROS:*:*)
1409 echo "$UNAME_MACHINE"-pc-aros
1410 exit ;;
1411 x86_64:VMkernel:*:*)
1412 echo "$UNAME_MACHINE"-unknown-esx
1413 exit ;;
1414 amd64:Isilon\ OneFS:*:*)
1415 echo x86_64-unknown-onefs
1416 exit ;;
 
 
 
1417 esac
1418
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1419 echo "$0: unable to guess system type" >&2
1420
1421 case "$UNAME_MACHINE:$UNAME_SYSTEM" in
1422 mips:Linux | mips64:Linux)
1423 # If we got here on MIPS GNU/Linux, output extra information.
1424 cat >&2 <<EOF
1425
1426 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
@@ -1433,13 +1696,21 @@
1433
1434 This script (version $timestamp), has failed to recognize the
1435 operating system you are using. If your script is old, overwrite *all*
1436 copies of config.guess and config.sub with the latest versions from:
1437
1438 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1439 and
1440 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
 
 
 
 
 
 
 
1441
1442 If $0 has already been updated, send the following data and any
1443 information you think might be pertinent to [email protected] to
1444 provide the necessary information to handle your system.
1445
@@ -1463,14 +1734,15 @@
1463 UNAME_MACHINE = "$UNAME_MACHINE"
1464 UNAME_RELEASE = "$UNAME_RELEASE"
1465 UNAME_SYSTEM = "$UNAME_SYSTEM"
1466 UNAME_VERSION = "$UNAME_VERSION"
1467 EOF
 
1468
1469 exit 1
1470
1471 # Local variables:
1472 # eval: (add-hook 'before-save-hook 'time-stamp)
1473 # time-stamp-start: "timestamp='"
1474 # time-stamp-format: "%:y-%02m-%02d"
1475 # time-stamp-end: "'"
1476 # End:
1477
--- autosetup/autosetup-config.guess
+++ autosetup/autosetup-config.guess
@@ -1,10 +1,12 @@
1 #! /bin/sh
2 # Attempt to guess a canonical system name.
3 # Copyright 1992-2021 Free Software Foundation, Inc.
4
5 # shellcheck disable=SC2006,SC2268 # see below for rationale
6
7 timestamp='2021-06-03'
8
9 # This file is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
@@ -25,14 +27,22 @@
27 # of the GNU General Public License, version 3 ("GPLv3").
28 #
29 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
30 #
31 # You can get the latest version of this script from:
32 # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
33 #
34 # Please send patches to <[email protected]>.
35
36
37 # The "shellcheck disable" line above the timestamp inhibits complaints
38 # about features and limitations of the classic Bourne shell that were
39 # superseded or lifted in POSIX. However, this script identifies a wide
40 # variety of pre-POSIX systems that do not have POSIX shells at all, and
41 # even some reasonably current systems (Solaris 10 as case-in-point) still
42 # have a pre-POSIX /bin/sh.
43
44
45 me=`echo "$0" | sed -e 's,.*/,,'`
46
47 usage="\
48 Usage: $0 [OPTION]
@@ -48,11 +58,11 @@
58
59 version="\
60 GNU config.guess ($timestamp)
61
62 Originally written by Per Bothner.
63 Copyright 1992-2021 Free Software Foundation, Inc.
64
65 This is free software; see the source for copying conditions. There is NO
66 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
67
68 help="
@@ -82,11 +92,12 @@
92 if test $# != 0; then
93 echo "$me: too many arguments$help" >&2
94 exit 1
95 fi
96
97 # Just in case it came from the environment.
98 GUESS=
99
100 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
101 # compiler to aid in system detection is discouraged as it requires
102 # temporary files to be created and, as you can see below, it is a
103 # headache to deal with in a portable fashion.
@@ -94,77 +105,94 @@
105 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
106 # use `HOST_CC' if defined, but it is deprecated.
107
108 # Portable tmp directory creation inspired by the Autoconf team.
109
110 tmp=
111 # shellcheck disable=SC2172
112 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
113
114 set_cc_for_build() {
115 # prevent multiple calls if $tmp is already set
116 test "$tmp" && return 0
117 : "${TMPDIR=/tmp}"
118 # shellcheck disable=SC2039,SC3028
119 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
120 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
121 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
122 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
123 dummy=$tmp/dummy
124 case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
125 ,,) echo "int x;" > "$dummy.c"
126 for driver in cc gcc c89 c99 ; do
127 if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
128 CC_FOR_BUILD=$driver
129 break
130 fi
131 done
132 if test x"$CC_FOR_BUILD" = x ; then
133 CC_FOR_BUILD=no_compiler_found
134 fi
135 ;;
136 ,,*) CC_FOR_BUILD=$CC ;;
137 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
138 esac
139 }
140
141 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
142 # ([email protected] 1994-08-24)
143 if test -f /.attbin/uname ; then
144 PATH=$PATH:/.attbin ; export PATH
145 fi
146
147 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
148 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
149 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
150 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
151
152 case $UNAME_SYSTEM in
153 Linux|GNU|GNU/*)
154 LIBC=unknown
 
 
155
156 set_cc_for_build
157 cat <<-EOF > "$dummy.c"
158 #include <features.h>
159 #if defined(__UCLIBC__)
160 LIBC=uclibc
161 #elif defined(__dietlibc__)
162 LIBC=dietlibc
163 #elif defined(__GLIBC__)
164 LIBC=gnu
165 #else
166 #include <stdarg.h>
167 /* First heuristic to detect musl libc. */
168 #ifdef __DEFINED_va_list
169 LIBC=musl
170 #endif
171 #endif
172 EOF
173 cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
174 eval "$cc_set_libc"
175
176 # Second heuristic to detect musl libc.
177 if [ "$LIBC" = unknown ] &&
178 command -v ldd >/dev/null &&
179 ldd --version 2>&1 | grep -q ^musl; then
180 LIBC=musl
181 fi
182
183 # If the system lacks a compiler, then just pick glibc.
184 # We could probably try harder.
185 if [ "$LIBC" = unknown ]; then
186 LIBC=gnu
 
187 fi
188 ;;
189 esac
190
191 # Note: order is significant - the case branches are not exclusive.
192
193 case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
194 *:NetBSD:*:*)
195 # NetBSD (nbsd) targets should (where applicable) match one or
196 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
197 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
198 # switched to ELF, *-*-netbsd* would select the old
@@ -172,36 +200,36 @@
200 # compatibility and a consistent mechanism for selecting the
201 # object file format.
202 #
203 # Note: NetBSD doesn't particularly care about the vendor
204 # portion of the name. We always set it to "unknown".
 
205 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
206 /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
207 /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
208 echo unknown)`
209 case $UNAME_MACHINE_ARCH in
210 aarch64eb) machine=aarch64_be-unknown ;;
211 armeb) machine=armeb-unknown ;;
212 arm*) machine=arm-unknown ;;
213 sh3el) machine=shl-unknown ;;
214 sh3eb) machine=sh-unknown ;;
215 sh5el) machine=sh5le-unknown ;;
216 earmv*)
217 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
218 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
219 machine=${arch}${endian}-unknown
220 ;;
221 *) machine=$UNAME_MACHINE_ARCH-unknown ;;
222 esac
223 # The Operating System including object format, if it has switched
224 # to ELF recently (or will in the future) and ABI.
225 case $UNAME_MACHINE_ARCH in
226 earm*)
227 os=netbsdelf
228 ;;
229 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
230 set_cc_for_build
231 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
232 | grep -q __ELF__
233 then
234 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
235 # Return netbsd for either. FIX?
@@ -213,11 +241,11 @@
241 *)
242 os=netbsd
243 ;;
244 esac
245 # Determine ABI tags.
246 case $UNAME_MACHINE_ARCH in
247 earm*)
248 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
249 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
250 ;;
251 esac
@@ -224,11 +252,11 @@
252 # The OS release
253 # Debian GNU/NetBSD machines have a different userland, and
254 # thus, need a distinct triplet. However, they do not need
255 # kernel version information, so it can be replaced with a
256 # suitable tag, in the style of linux-gnu.
257 case $UNAME_VERSION in
258 Debian*)
259 release='-gnu'
260 ;;
261 *)
262 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
@@ -235,49 +263,61 @@
263 ;;
264 esac
265 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
266 # contains redundant information, the shorter form:
267 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
268 GUESS=$machine-${os}${release}${abi-}
269 ;;
270 *:Bitrig:*:*)
271 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
272 GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
273 ;;
274 *:OpenBSD:*:*)
275 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
276 GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
277 ;;
278 *:SecBSD:*:*)
279 UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
280 GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
281 ;;
282 *:LibertyBSD:*:*)
283 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
284 GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
285 ;;
286 *:MidnightBSD:*:*)
287 GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
288 ;;
289 *:ekkoBSD:*:*)
290 GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
291 ;;
292 *:SolidBSD:*:*)
293 GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
294 ;;
295 *:OS108:*:*)
296 GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
297 ;;
298 macppc:MirBSD:*:*)
299 GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
300 ;;
301 *:MirBSD:*:*)
302 GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
303 ;;
304 *:Sortix:*:*)
305 GUESS=$UNAME_MACHINE-unknown-sortix
306 ;;
307 *:Twizzler:*:*)
308 GUESS=$UNAME_MACHINE-unknown-twizzler
309 ;;
310 *:Redox:*:*)
311 GUESS=$UNAME_MACHINE-unknown-redox
312 ;;
313 mips:OSF1:*.*)
314 GUESS=mips-dec-osf1
315 ;;
316 alpha:OSF1:*:*)
317 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
318 trap '' 0
319 case $UNAME_RELEASE in
320 *4.0)
321 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
322 ;;
323 *5.*)
@@ -287,11 +327,11 @@
327 # According to Compaq, /usr/sbin/psrinfo has been available on
328 # OSF/1 and Tru64 systems produced since 1995. I hope that
329 # covers most systems running today. This code pipes the CPU
330 # types through head -n 1, so we only detect the type of CPU 0.
331 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
332 case $ALPHA_CPU_TYPE in
333 "EV4 (21064)")
334 UNAME_MACHINE=alpha ;;
335 "EV4.5 (21064)")
336 UNAME_MACHINE=alpha ;;
337 "LCA4 (21066/21068)")
@@ -324,167 +364,171 @@
364 # A Pn.n version is a patched version.
365 # A Vn.n version is a released version.
366 # A Tn.n version is a released field test version.
367 # A Xn.n version is an unreleased experimental baselevel.
368 # 1.2 uses "1.2" for uname -r.
369 OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
370 GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
371 ;;
 
 
372 Amiga*:UNIX_System_V:4.0:*)
373 GUESS=m68k-unknown-sysv4
374 ;;
375 *:[Aa]miga[Oo][Ss]:*:*)
376 GUESS=$UNAME_MACHINE-unknown-amigaos
377 ;;
378 *:[Mm]orph[Oo][Ss]:*:*)
379 GUESS=$UNAME_MACHINE-unknown-morphos
380 ;;
381 *:OS/390:*:*)
382 GUESS=i370-ibm-openedition
383 ;;
384 *:z/VM:*:*)
385 GUESS=s390-ibm-zvmoe
386 ;;
387 *:OS400:*:*)
388 GUESS=powerpc-ibm-os400
389 ;;
390 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
391 GUESS=arm-acorn-riscix$UNAME_RELEASE
392 ;;
393 arm*:riscos:*:*|arm*:RISCOS:*:*)
394 GUESS=arm-unknown-riscos
395 ;;
396 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
397 GUESS=hppa1.1-hitachi-hiuxmpp
398 ;;
399 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
400 # [email protected] (Earle F. Ake) contributed MIS and NILE.
401 case `(/bin/universe) 2>/dev/null` in
402 att) GUESS=pyramid-pyramid-sysv3 ;;
403 *) GUESS=pyramid-pyramid-bsd ;;
404 esac
405 ;;
 
406 NILE*:*:*:dcosx)
407 GUESS=pyramid-pyramid-svr4
408 ;;
409 DRS?6000:unix:4.0:6*)
410 GUESS=sparc-icl-nx6
411 ;;
412 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
413 case `/usr/bin/uname -p` in
414 sparc) GUESS=sparc-icl-nx7 ;;
415 esac
416 ;;
417 s390x:SunOS:*:*)
418 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
419 GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
420 ;;
421 sun4H:SunOS:5.*:*)
422 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
423 GUESS=sparc-hal-solaris2$SUN_REL
424 ;;
425 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
426 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
427 GUESS=sparc-sun-solaris2$SUN_REL
428 ;;
429 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
430 GUESS=i386-pc-auroraux$UNAME_RELEASE
431 ;;
432 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
433 set_cc_for_build
434 SUN_ARCH=i386
435 # If there is a compiler, see if it is configured for 64-bit objects.
436 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
437 # This test works for both compilers.
438 if test "$CC_FOR_BUILD" != no_compiler_found; then
439 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
440 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
441 grep IS_64BIT_ARCH >/dev/null
442 then
443 SUN_ARCH=x86_64
444 fi
445 fi
446 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
447 GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
448 ;;
449 sun4*:SunOS:6*:*)
450 # According to config.sub, this is the proper way to canonicalize
451 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
452 # it's likely to be more like Solaris than SunOS4.
453 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
454 GUESS=sparc-sun-solaris3$SUN_REL
455 ;;
456 sun4*:SunOS:*:*)
457 case `/usr/bin/arch -k` in
458 Series*|S4*)
459 UNAME_RELEASE=`uname -v`
460 ;;
461 esac
462 # Japanese Language versions have a version number like `4.1.3-JL'.
463 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
464 GUESS=sparc-sun-sunos$SUN_REL
465 ;;
466 sun3*:SunOS:*:*)
467 GUESS=m68k-sun-sunos$UNAME_RELEASE
468 ;;
469 sun*:*:4.2BSD:*)
470 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
471 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
472 case `/bin/arch` in
473 sun3)
474 GUESS=m68k-sun-sunos$UNAME_RELEASE
475 ;;
476 sun4)
477 GUESS=sparc-sun-sunos$UNAME_RELEASE
478 ;;
479 esac
480 ;;
481 aushp:SunOS:*:*)
482 GUESS=sparc-auspex-sunos$UNAME_RELEASE
483 ;;
484 # The situation for MiNT is a little confusing. The machine name
485 # can be virtually everything (everything which is not
486 # "atarist" or "atariste" at least should have a processor
487 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
488 # to the lowercase version "mint" (or "freemint"). Finally
489 # the system name "TOS" denotes a system which is actually not
490 # MiNT. But MiNT is downward compatible to TOS, so this should
491 # be no problem.
492 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
493 GUESS=m68k-atari-mint$UNAME_RELEASE
494 ;;
495 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
496 GUESS=m68k-atari-mint$UNAME_RELEASE
497 ;;
498 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
499 GUESS=m68k-atari-mint$UNAME_RELEASE
500 ;;
501 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
502 GUESS=m68k-milan-mint$UNAME_RELEASE
503 ;;
504 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
505 GUESS=m68k-hades-mint$UNAME_RELEASE
506 ;;
507 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
508 GUESS=m68k-unknown-mint$UNAME_RELEASE
509 ;;
510 m68k:machten:*:*)
511 GUESS=m68k-apple-machten$UNAME_RELEASE
512 ;;
513 powerpc:machten:*:*)
514 GUESS=powerpc-apple-machten$UNAME_RELEASE
515 ;;
516 RISC*:Mach:*:*)
517 GUESS=mips-dec-mach_bsd4.3
518 ;;
519 RISC*:ULTRIX:*:*)
520 GUESS=mips-dec-ultrix$UNAME_RELEASE
521 ;;
522 VAX*:ULTRIX*:*:*)
523 GUESS=vax-dec-ultrix$UNAME_RELEASE
524 ;;
525 2020:CLIX:*:* | 2430:CLIX:*:*)
526 GUESS=clipper-intergraph-clix$UNAME_RELEASE
527 ;;
528 mips:*:*:UMIPS | mips:*:*:RISCos)
529 set_cc_for_build
530 sed 's/^ //' << EOF > "$dummy.c"
531 #ifdef __cplusplus
532 #include <stdio.h> /* for printf() prototype */
533 int main (int argc, char *argv[]) {
534 #else
@@ -506,82 +550,83 @@
550 EOF
551 $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
552 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
553 SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
554 { echo "$SYSTEM_NAME"; exit; }
555 GUESS=mips-mips-riscos$UNAME_RELEASE
556 ;;
557 Motorola:PowerMAX_OS:*:*)
558 GUESS=powerpc-motorola-powermax
559 ;;
560 Motorola:*:4.3:PL8-*)
561 GUESS=powerpc-harris-powermax
562 ;;
563 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
564 GUESS=powerpc-harris-powermax
565 ;;
566 Night_Hawk:Power_UNIX:*:*)
567 GUESS=powerpc-harris-powerunix
568 ;;
569 m88k:CX/UX:7*:*)
570 GUESS=m88k-harris-cxux7
571 ;;
572 m88k:*:4*:R4*)
573 GUESS=m88k-motorola-sysv4
574 ;;
575 m88k:*:3*:R3*)
576 GUESS=m88k-motorola-sysv3
577 ;;
578 AViiON:dgux:*:*)
579 # DG/UX returns AViiON for all architectures
580 UNAME_PROCESSOR=`/usr/bin/uname -p`
581 if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
582 then
583 if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
584 test "$TARGET_BINARY_INTERFACE"x = x
585 then
586 GUESS=m88k-dg-dgux$UNAME_RELEASE
587 else
588 GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
589 fi
590 else
591 GUESS=i586-dg-dgux$UNAME_RELEASE
592 fi
593 ;;
594 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
595 GUESS=m88k-dolphin-sysv3
596 ;;
597 M88*:*:R3*:*)
598 # Delta 88k system running SVR3
599 GUESS=m88k-motorola-sysv3
600 ;;
601 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
602 GUESS=m88k-tektronix-sysv3
603 ;;
604 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
605 GUESS=m68k-tektronix-bsd
606 ;;
607 *:IRIX*:*:*)
608 IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
609 GUESS=mips-sgi-irix$IRIX_REL
610 ;;
611 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
612 GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
613 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
614 i*86:AIX:*:*)
615 GUESS=i386-ibm-aix
616 ;;
617 ia64:AIX:*:*)
618 if test -x /usr/bin/oslevel ; then
619 IBM_REV=`/usr/bin/oslevel`
620 else
621 IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
622 fi
623 GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
624 ;;
625 *:AIX:2:3)
626 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
627 set_cc_for_build
628 sed 's/^ //' << EOF > "$dummy.c"
629 #include <sys/systemcfg.h>
630
631 main()
632 {
@@ -591,78 +636,78 @@
636 exit(0);
637 }
638 EOF
639 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
640 then
641 GUESS=$SYSTEM_NAME
642 else
643 GUESS=rs6000-ibm-aix3.2.5
644 fi
645 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
646 GUESS=rs6000-ibm-aix3.2.4
647 else
648 GUESS=rs6000-ibm-aix3.2
649 fi
650 ;;
651 *:AIX:*:[4567])
652 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
653 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
654 IBM_ARCH=rs6000
655 else
656 IBM_ARCH=powerpc
657 fi
658 if test -x /usr/bin/lslpp ; then
659 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
660 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
661 else
662 IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
663 fi
664 GUESS=$IBM_ARCH-ibm-aix$IBM_REV
665 ;;
666 *:AIX:*:*)
667 GUESS=rs6000-ibm-aix
668 ;;
669 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
670 GUESS=romp-ibm-bsd4.4
671 ;;
672 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
673 GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
674 ;; # report: romp-ibm BSD 4.3
675 *:BOSX:*:*)
676 GUESS=rs6000-bull-bosx
677 ;;
678 DPX/2?00:B.O.S.:*:*)
679 GUESS=m68k-bull-sysv3
680 ;;
681 9000/[34]??:4.3bsd:1.*:*)
682 GUESS=m68k-hp-bsd
683 ;;
684 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
685 GUESS=m68k-hp-bsd4.4
686 ;;
687 9000/[34678]??:HP-UX:*:*)
688 HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
689 case $UNAME_MACHINE in
690 9000/31?) HP_ARCH=m68000 ;;
691 9000/[34]??) HP_ARCH=m68k ;;
692 9000/[678][0-9][0-9])
693 if test -x /usr/bin/getconf; then
694 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
695 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
696 case $sc_cpu_version in
697 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
698 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
699 532) # CPU_PA_RISC2_0
700 case $sc_kernel_bits in
701 32) HP_ARCH=hppa2.0n ;;
702 64) HP_ARCH=hppa2.0w ;;
703 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
704 esac ;;
705 esac
706 fi
707 if test "$HP_ARCH" = ""; then
708 set_cc_for_build
709 sed 's/^ //' << EOF > "$dummy.c"
710
711 #define _HPUX_SOURCE
712 #include <stdlib.h>
713 #include <unistd.h>
@@ -696,13 +741,13 @@
741 EOF
742 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
743 test -z "$HP_ARCH" && HP_ARCH=hppa
744 fi ;;
745 esac
746 if test "$HP_ARCH" = hppa2.0w
747 then
748 set_cc_for_build
749
750 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
751 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
752 # generating 64-bit code. GNU and HP use different nomenclature:
753 #
@@ -717,18 +762,18 @@
762 HP_ARCH=hppa2.0w
763 else
764 HP_ARCH=hppa64
765 fi
766 fi
767 GUESS=$HP_ARCH-hp-hpux$HPUX_REV
768 ;;
769 ia64:HP-UX:*:*)
770 HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
771 GUESS=ia64-hp-hpux$HPUX_REV
772 ;;
773 3050*:HI-UX:*:*)
774 set_cc_for_build
775 sed 's/^ //' << EOF > "$dummy.c"
776 #include <unistd.h>
777 int
778 main ()
779 {
@@ -752,162 +797,186 @@
797 exit (0);
798 }
799 EOF
800 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
801 { echo "$SYSTEM_NAME"; exit; }
802 GUESS=unknown-hitachi-hiuxwe2
803 ;;
804 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
805 GUESS=hppa1.1-hp-bsd
806 ;;
807 9000/8??:4.3bsd:*:*)
808 GUESS=hppa1.0-hp-bsd
809 ;;
810 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
811 GUESS=hppa1.0-hp-mpeix
812 ;;
813 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
814 GUESS=hppa1.1-hp-osf
815 ;;
816 hp8??:OSF1:*:*)
817 GUESS=hppa1.0-hp-osf
818 ;;
819 i*86:OSF1:*:*)
820 if test -x /usr/sbin/sysversion ; then
821 GUESS=$UNAME_MACHINE-unknown-osf1mk
822 else
823 GUESS=$UNAME_MACHINE-unknown-osf1
824 fi
825 ;;
826 parisc*:Lites*:*:*)
827 GUESS=hppa1.1-hp-lites
828 ;;
829 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
830 GUESS=c1-convex-bsd
831 ;;
832 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
833 if getsysinfo -f scalar_acc
834 then echo c32-convex-bsd
835 else echo c2-convex-bsd
836 fi
837 exit ;;
838 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
839 GUESS=c34-convex-bsd
840 ;;
841 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
842 GUESS=c38-convex-bsd
843 ;;
844 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
845 GUESS=c4-convex-bsd
846 ;;
847 CRAY*Y-MP:*:*:*)
848 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
849 GUESS=ymp-cray-unicos$CRAY_REL
850 ;;
851 CRAY*[A-Z]90:*:*:*)
852 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
853 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
854 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
855 -e 's/\.[^.]*$/.X/'
856 exit ;;
857 CRAY*TS:*:*:*)
858 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
859 GUESS=t90-cray-unicos$CRAY_REL
860 ;;
861 CRAY*T3E:*:*:*)
862 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
863 GUESS=alphaev5-cray-unicosmk$CRAY_REL
864 ;;
865 CRAY*SV1:*:*:*)
866 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
867 GUESS=sv1-cray-unicos$CRAY_REL
868 ;;
869 *:UNICOS/mp:*:*)
870 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
871 GUESS=craynv-cray-unicosmp$CRAY_REL
872 ;;
873 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
874 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
875 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
876 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
877 GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
878 ;;
879 5000:UNIX_System_V:4.*:*)
880 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
881 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
882 GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
883 ;;
884 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
885 GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
886 ;;
887 sparc*:BSD/OS:*:*)
888 GUESS=sparc-unknown-bsdi$UNAME_RELEASE
889 ;;
890 *:BSD/OS:*:*)
891 GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
892 ;;
893 arm:FreeBSD:*:*)
894 UNAME_PROCESSOR=`uname -p`
895 set_cc_for_build
896 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
897 | grep -q __ARM_PCS_VFP
898 then
899 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
900 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
901 else
902 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
903 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
904 fi
905 ;;
906 *:FreeBSD:*:*)
907 UNAME_PROCESSOR=`/usr/bin/uname -p`
908 case $UNAME_PROCESSOR in
909 amd64)
910 UNAME_PROCESSOR=x86_64 ;;
911 i386)
912 UNAME_PROCESSOR=i586 ;;
913 esac
914 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
915 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
916 ;;
917 i*:CYGWIN*:*)
918 GUESS=$UNAME_MACHINE-pc-cygwin
919 ;;
920 *:MINGW64*:*)
921 GUESS=$UNAME_MACHINE-pc-mingw64
922 ;;
923 *:MINGW*:*)
924 GUESS=$UNAME_MACHINE-pc-mingw32
925 ;;
926 *:MSYS*:*)
927 GUESS=$UNAME_MACHINE-pc-msys
928 ;;
929 i*:PW*:*)
930 GUESS=$UNAME_MACHINE-pc-pw32
931 ;;
932 *:Interix*:*)
933 case $UNAME_MACHINE in
934 x86)
935 GUESS=i586-pc-interix$UNAME_RELEASE
936 ;;
937 authenticamd | genuineintel | EM64T)
938 GUESS=x86_64-unknown-interix$UNAME_RELEASE
939 ;;
940 IA64)
941 GUESS=ia64-unknown-interix$UNAME_RELEASE
942 ;;
943 esac ;;
944 i*:UWIN*:*)
945 GUESS=$UNAME_MACHINE-pc-uwin
946 ;;
947 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
948 GUESS=x86_64-pc-cygwin
949 ;;
950 prep*:SunOS:5.*:*)
951 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
952 GUESS=powerpcle-unknown-solaris2$SUN_REL
953 ;;
954 *:GNU:*:*)
955 # the GNU system
956 GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
957 GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
958 GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
959 ;;
960 *:GNU/*:*:*)
961 # other systems with GNU libc and userland
962 GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
963 GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
964 GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
965 ;;
966 *:Minix:*:*)
967 GUESS=$UNAME_MACHINE-unknown-minix
968 ;;
969 aarch64:Linux:*:*)
970 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
971 ;;
972 aarch64_be:Linux:*:*)
973 UNAME_MACHINE=aarch64_be
974 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
975 ;;
976 alpha:Linux:*:*)
977 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
978 EV5) UNAME_MACHINE=alphaev5 ;;
979 EV56) UNAME_MACHINE=alphaev56 ;;
980 PCA56) UNAME_MACHINE=alphapca56 ;;
981 PCA57) UNAME_MACHINE=alphapca56 ;;
982 EV6) UNAME_MACHINE=alphaev6 ;;
@@ -914,246 +983,288 @@
983 EV67) UNAME_MACHINE=alphaev67 ;;
984 EV68*) UNAME_MACHINE=alphaev68 ;;
985 esac
986 objdump --private-headers /bin/sh | grep -q ld.so.1
987 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
988 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
989 ;;
990 arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
991 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
992 ;;
993 arm*:Linux:*:*)
994 set_cc_for_build
995 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
996 | grep -q __ARM_EABI__
997 then
998 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
999 else
1000 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
1001 | grep -q __ARM_PCS_VFP
1002 then
1003 GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
1004 else
1005 GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
1006 fi
1007 fi
1008 ;;
1009 avr32*:Linux:*:*)
1010 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1011 ;;
1012 cris:Linux:*:*)
1013 GUESS=$UNAME_MACHINE-axis-linux-$LIBC
1014 ;;
1015 crisv32:Linux:*:*)
1016 GUESS=$UNAME_MACHINE-axis-linux-$LIBC
1017 ;;
1018 e2k:Linux:*:*)
1019 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1020 ;;
1021 frv:Linux:*:*)
1022 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1023 ;;
1024 hexagon:Linux:*:*)
1025 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1026 ;;
1027 i*86:Linux:*:*)
1028 GUESS=$UNAME_MACHINE-pc-linux-$LIBC
1029 ;;
1030 ia64:Linux:*:*)
1031 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1032 ;;
1033 k1om:Linux:*:*)
1034 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1035 ;;
1036 loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
1037 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1038 ;;
1039 m32r*:Linux:*:*)
1040 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1041 ;;
1042 m68*:Linux:*:*)
1043 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1044 ;;
1045 mips:Linux:*:* | mips64:Linux:*:*)
1046 set_cc_for_build
1047 IS_GLIBC=0
1048 test x"${LIBC}" = xgnu && IS_GLIBC=1
1049 sed 's/^ //' << EOF > "$dummy.c"
1050 #undef CPU
1051 #undef mips
1052 #undef mipsel
1053 #undef mips64
1054 #undef mips64el
1055 #if ${IS_GLIBC} && defined(_ABI64)
1056 LIBCABI=gnuabi64
1057 #else
1058 #if ${IS_GLIBC} && defined(_ABIN32)
1059 LIBCABI=gnuabin32
1060 #else
1061 LIBCABI=${LIBC}
1062 #endif
1063 #endif
1064
1065 #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1066 CPU=mipsisa64r6
1067 #else
1068 #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1069 CPU=mipsisa32r6
1070 #else
1071 #if defined(__mips64)
1072 CPU=mips64
1073 #else
1074 CPU=mips
1075 #endif
1076 #endif
1077 #endif
1078
1079 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
1080 MIPS_ENDIAN=el
1081 #else
1082 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
1083 MIPS_ENDIAN=
1084 #else
1085 MIPS_ENDIAN=
1086 #endif
1087 #endif
1088 EOF
1089 cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
1090 eval "$cc_set_vars"
1091 test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
1092 ;;
1093 mips64el:Linux:*:*)
1094 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1095 ;;
1096 openrisc*:Linux:*:*)
1097 GUESS=or1k-unknown-linux-$LIBC
1098 ;;
1099 or32:Linux:*:* | or1k*:Linux:*:*)
1100 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1101 ;;
1102 padre:Linux:*:*)
1103 GUESS=sparc-unknown-linux-$LIBC
1104 ;;
1105 parisc64:Linux:*:* | hppa64:Linux:*:*)
1106 GUESS=hppa64-unknown-linux-$LIBC
1107 ;;
1108 parisc:Linux:*:* | hppa:Linux:*:*)
1109 # Look for CPU level
1110 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1111 PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
1112 PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
1113 *) GUESS=hppa-unknown-linux-$LIBC ;;
1114 esac
1115 ;;
1116 ppc64:Linux:*:*)
1117 GUESS=powerpc64-unknown-linux-$LIBC
1118 ;;
1119 ppc:Linux:*:*)
1120 GUESS=powerpc-unknown-linux-$LIBC
1121 ;;
1122 ppc64le:Linux:*:*)
1123 GUESS=powerpc64le-unknown-linux-$LIBC
1124 ;;
1125 ppcle:Linux:*:*)
1126 GUESS=powerpcle-unknown-linux-$LIBC
1127 ;;
1128 riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
1129 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1130 ;;
1131 s390:Linux:*:* | s390x:Linux:*:*)
1132 GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
1133 ;;
1134 sh64*:Linux:*:*)
1135 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1136 ;;
1137 sh*:Linux:*:*)
1138 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1139 ;;
1140 sparc:Linux:*:* | sparc64:Linux:*:*)
1141 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1142 ;;
1143 tile*:Linux:*:*)
1144 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1145 ;;
1146 vax:Linux:*:*)
1147 GUESS=$UNAME_MACHINE-dec-linux-$LIBC
1148 ;;
1149 x86_64:Linux:*:*)
1150 set_cc_for_build
1151 LIBCABI=$LIBC
1152 if test "$CC_FOR_BUILD" != no_compiler_found; then
1153 if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
1154 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1155 grep IS_X32 >/dev/null
1156 then
1157 LIBCABI=${LIBC}x32
1158 fi
1159 fi
1160 GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
1161 ;;
1162 xtensa*:Linux:*:*)
1163 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1164 ;;
1165 i*86:DYNIX/ptx:4*:*)
1166 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1167 # earlier versions are messed up and put the nodename in both
1168 # sysname and nodename.
1169 GUESS=i386-sequent-sysv4
1170 ;;
1171 i*86:UNIX_SV:4.2MP:2.*)
1172 # Unixware is an offshoot of SVR4, but it has its own version
1173 # number series starting with 2...
1174 # I am not positive that other SVR4 systems won't match this,
1175 # I just have to hope. -- rms.
1176 # Use sysv4.2uw... so that sysv4* matches it.
1177 GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
1178 ;;
1179 i*86:OS/2:*:*)
1180 # If we were able to find `uname', then EMX Unix compatibility
1181 # is probably installed.
1182 GUESS=$UNAME_MACHINE-pc-os2-emx
1183 ;;
1184 i*86:XTS-300:*:STOP)
1185 GUESS=$UNAME_MACHINE-unknown-stop
1186 ;;
1187 i*86:atheos:*:*)
1188 GUESS=$UNAME_MACHINE-unknown-atheos
1189 ;;
1190 i*86:syllable:*:*)
1191 GUESS=$UNAME_MACHINE-pc-syllable
1192 ;;
1193 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1194 GUESS=i386-unknown-lynxos$UNAME_RELEASE
1195 ;;
1196 i*86:*DOS:*:*)
1197 GUESS=$UNAME_MACHINE-pc-msdosdjgpp
1198 ;;
1199 i*86:*:4.*:*)
1200 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
1201 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1202 GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
1203 else
1204 GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
1205 fi
1206 ;;
1207 i*86:*:5:[678]*)
1208 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1209 case `/bin/uname -X | grep "^Machine"` in
1210 *486*) UNAME_MACHINE=i486 ;;
1211 *Pentium) UNAME_MACHINE=i586 ;;
1212 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1213 esac
1214 GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1215 ;;
1216 i*86:*:3.2:*)
1217 if test -f /usr/options/cb.name; then
1218 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1219 GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
1220 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1221 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1222 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1223 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1224 && UNAME_MACHINE=i586
1225 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1226 && UNAME_MACHINE=i686
1227 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1228 && UNAME_MACHINE=i686
1229 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
1230 else
1231 GUESS=$UNAME_MACHINE-pc-sysv32
1232 fi
1233 ;;
1234 pc:*:*:*)
1235 # Left here for compatibility:
1236 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1237 # the processor, so we play safe by assuming i586.
1238 # Note: whatever this is, it MUST be the same as what config.sub
1239 # prints for the "djgpp" host, or else GDB configure will decide that
1240 # this is a cross-build.
1241 GUESS=i586-pc-msdosdjgpp
1242 ;;
1243 Intel:Mach:3*:*)
1244 GUESS=i386-pc-mach3
1245 ;;
1246 paragon:*:*:*)
1247 GUESS=i860-intel-osf1
1248 ;;
1249 i860:*:4.*:*) # i860-SVR4
1250 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1251 GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
1252 else # Add other i860-SVR4 vendors below as they are discovered.
1253 GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
1254 fi
1255 ;;
1256 mini*:CTIX:SYS*5:*)
1257 # "miniframe"
1258 GUESS=m68010-convergent-sysv
1259 ;;
1260 mc68k:UNIX:SYSTEM5:3.51m)
1261 GUESS=m68k-convergent-sysv
1262 ;;
1263 M680?0:D-NIX:5.3:*)
1264 GUESS=m68k-diab-dnix
1265 ;;
1266 M68*:*:R3V[5678]*:*)
1267 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1268 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1269 OS_REL=''
1270 test -r /etc/.relid \
@@ -1174,253 +1285,405 @@
1285 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1286 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
1287 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1288 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1289 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1290 GUESS=m68k-unknown-lynxos$UNAME_RELEASE
1291 ;;
1292 mc68030:UNIX_System_V:4.*:*)
1293 GUESS=m68k-atari-sysv4
1294 ;;
1295 TSUNAMI:LynxOS:2.*:*)
1296 GUESS=sparc-unknown-lynxos$UNAME_RELEASE
1297 ;;
1298 rs6000:LynxOS:2.*:*)
1299 GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
1300 ;;
1301 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1302 GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
1303 ;;
1304 SM[BE]S:UNIX_SV:*:*)
1305 GUESS=mips-dde-sysv$UNAME_RELEASE
1306 ;;
1307 RM*:ReliantUNIX-*:*:*)
1308 GUESS=mips-sni-sysv4
1309 ;;
1310 RM*:SINIX-*:*:*)
1311 GUESS=mips-sni-sysv4
1312 ;;
1313 *:SINIX-*:*:*)
1314 if uname -p 2>/dev/null >/dev/null ; then
1315 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1316 GUESS=$UNAME_MACHINE-sni-sysv4
1317 else
1318 GUESS=ns32k-sni-sysv
1319 fi
1320 ;;
1321 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1322 # says <[email protected]>
1323 GUESS=i586-unisys-sysv4
1324 ;;
1325 *:UNIX_System_V:4*:FTX*)
1326 # From Gerald Hewes <[email protected]>.
1327 # How about differentiating between stratus architectures? -djm
1328 GUESS=hppa1.1-stratus-sysv4
1329 ;;
1330 *:*:*:FTX*)
1331 # From [email protected].
1332 GUESS=i860-stratus-sysv4
1333 ;;
1334 i*86:VOS:*:*)
1335 # From [email protected].
1336 GUESS=$UNAME_MACHINE-stratus-vos
1337 ;;
1338 *:VOS:*:*)
1339 # From [email protected].
1340 GUESS=hppa1.1-stratus-vos
1341 ;;
1342 mc68*:A/UX:*:*)
1343 GUESS=m68k-apple-aux$UNAME_RELEASE
1344 ;;
1345 news*:NEWS-OS:6*:*)
1346 GUESS=mips-sony-newsos6
1347 ;;
1348 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1349 if test -d /usr/nec; then
1350 GUESS=mips-nec-sysv$UNAME_RELEASE
1351 else
1352 GUESS=mips-unknown-sysv$UNAME_RELEASE
1353 fi
1354 ;;
1355 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1356 GUESS=powerpc-be-beos
1357 ;;
1358 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1359 GUESS=powerpc-apple-beos
1360 ;;
1361 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1362 GUESS=i586-pc-beos
1363 ;;
1364 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1365 GUESS=i586-pc-haiku
1366 ;;
1367 x86_64:Haiku:*:*)
1368 GUESS=x86_64-unknown-haiku
1369 ;;
1370 SX-4:SUPER-UX:*:*)
1371 GUESS=sx4-nec-superux$UNAME_RELEASE
1372 ;;
1373 SX-5:SUPER-UX:*:*)
1374 GUESS=sx5-nec-superux$UNAME_RELEASE
1375 ;;
1376 SX-6:SUPER-UX:*:*)
1377 GUESS=sx6-nec-superux$UNAME_RELEASE
1378 ;;
1379 SX-7:SUPER-UX:*:*)
1380 GUESS=sx7-nec-superux$UNAME_RELEASE
1381 ;;
1382 SX-8:SUPER-UX:*:*)
1383 GUESS=sx8-nec-superux$UNAME_RELEASE
1384 ;;
1385 SX-8R:SUPER-UX:*:*)
1386 GUESS=sx8r-nec-superux$UNAME_RELEASE
1387 ;;
1388 SX-ACE:SUPER-UX:*:*)
1389 GUESS=sxace-nec-superux$UNAME_RELEASE
1390 ;;
1391 Power*:Rhapsody:*:*)
1392 GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
1393 ;;
1394 *:Rhapsody:*:*)
1395 GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
1396 ;;
1397 arm64:Darwin:*:*)
1398 GUESS=aarch64-apple-darwin$UNAME_RELEASE
1399 ;;
1400 *:Darwin:*:*)
1401 UNAME_PROCESSOR=`uname -p`
1402 case $UNAME_PROCESSOR in
1403 unknown) UNAME_PROCESSOR=powerpc ;;
1404 esac
1405 if command -v xcode-select > /dev/null 2> /dev/null && \
1406 ! xcode-select --print-path > /dev/null 2> /dev/null ; then
1407 # Avoid executing cc if there is no toolchain installed as
1408 # cc will be a stub that puts up a graphical alert
1409 # prompting the user to install developer tools.
1410 CC_FOR_BUILD=no_compiler_found
1411 else
1412 set_cc_for_build
1413 fi
1414 if test "$CC_FOR_BUILD" != no_compiler_found; then
1415 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1416 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1417 grep IS_64BIT_ARCH >/dev/null
1418 then
1419 case $UNAME_PROCESSOR in
1420 i386) UNAME_PROCESSOR=x86_64 ;;
1421 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1422 esac
1423 fi
1424 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1425 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1426 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1427 grep IS_PPC >/dev/null
1428 then
1429 UNAME_PROCESSOR=powerpc
1430 fi
1431 elif test "$UNAME_PROCESSOR" = i386 ; then
1432 # uname -m returns i386 or x86_64
1433 UNAME_PROCESSOR=$UNAME_MACHINE
 
 
 
 
 
1434 fi
1435 GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
1436 ;;
1437 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1438 UNAME_PROCESSOR=`uname -p`
1439 if test "$UNAME_PROCESSOR" = x86; then
1440 UNAME_PROCESSOR=i386
1441 UNAME_MACHINE=pc
1442 fi
1443 GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
1444 ;;
1445 *:QNX:*:4*)
1446 GUESS=i386-pc-qnx
1447 ;;
1448 NEO-*:NONSTOP_KERNEL:*:*)
1449 GUESS=neo-tandem-nsk$UNAME_RELEASE
1450 ;;
1451 NSE-*:NONSTOP_KERNEL:*:*)
1452 GUESS=nse-tandem-nsk$UNAME_RELEASE
1453 ;;
1454 NSR-*:NONSTOP_KERNEL:*:*)
1455 GUESS=nsr-tandem-nsk$UNAME_RELEASE
1456 ;;
1457 NSV-*:NONSTOP_KERNEL:*:*)
1458 GUESS=nsv-tandem-nsk$UNAME_RELEASE
1459 ;;
1460 NSX-*:NONSTOP_KERNEL:*:*)
1461 GUESS=nsx-tandem-nsk$UNAME_RELEASE
1462 ;;
1463 *:NonStop-UX:*:*)
1464 GUESS=mips-compaq-nonstopux
1465 ;;
1466 BS2000:POSIX*:*:*)
1467 GUESS=bs2000-siemens-sysv
1468 ;;
1469 DS/*:UNIX_System_V:*:*)
1470 GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
1471 ;;
1472 *:Plan9:*:*)
1473 # "uname -m" is not consistent, so use $cputype instead. 386
1474 # is converted to i386 for consistency with other x86
1475 # operating systems.
1476 if test "${cputype-}" = 386; then
1477 UNAME_MACHINE=i386
1478 elif test "x${cputype-}" != x; then
1479 UNAME_MACHINE=$cputype
1480 fi
1481 GUESS=$UNAME_MACHINE-unknown-plan9
1482 ;;
1483 *:TOPS-10:*:*)
1484 GUESS=pdp10-unknown-tops10
1485 ;;
1486 *:TENEX:*:*)
1487 GUESS=pdp10-unknown-tenex
1488 ;;
1489 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1490 GUESS=pdp10-dec-tops20
1491 ;;
1492 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1493 GUESS=pdp10-xkl-tops20
1494 ;;
1495 *:TOPS-20:*:*)
1496 GUESS=pdp10-unknown-tops20
1497 ;;
1498 *:ITS:*:*)
1499 GUESS=pdp10-unknown-its
1500 ;;
1501 SEI:*:*:SEIUX)
1502 GUESS=mips-sei-seiux$UNAME_RELEASE
1503 ;;
1504 *:DragonFly:*:*)
1505 DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
1506 GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
1507 ;;
1508 *:*VMS:*:*)
1509 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1510 case $UNAME_MACHINE in
1511 A*) GUESS=alpha-dec-vms ;;
1512 I*) GUESS=ia64-dec-vms ;;
1513 V*) GUESS=vax-dec-vms ;;
1514 esac ;;
1515 *:XENIX:*:SysV)
1516 GUESS=i386-pc-xenix
1517 ;;
1518 i*86:skyos:*:*)
1519 SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
1520 GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
1521 ;;
1522 i*86:rdos:*:*)
1523 GUESS=$UNAME_MACHINE-pc-rdos
1524 ;;
1525 *:AROS:*:*)
1526 GUESS=$UNAME_MACHINE-unknown-aros
1527 ;;
1528 x86_64:VMkernel:*:*)
1529 GUESS=$UNAME_MACHINE-unknown-esx
1530 ;;
1531 amd64:Isilon\ OneFS:*:*)
1532 GUESS=x86_64-unknown-onefs
1533 ;;
1534 *:Unleashed:*:*)
1535 GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
1536 ;;
1537 esac
1538
1539 # Do we have a guess based on uname results?
1540 if test "x$GUESS" != x; then
1541 echo "$GUESS"
1542 exit
1543 fi
1544
1545 # No uname command or uname output not recognized.
1546 set_cc_for_build
1547 cat > "$dummy.c" <<EOF
1548 #ifdef _SEQUENT_
1549 #include <sys/types.h>
1550 #include <sys/utsname.h>
1551 #endif
1552 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1553 #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1554 #include <signal.h>
1555 #if defined(_SIZE_T_) || defined(SIGLOST)
1556 #include <sys/utsname.h>
1557 #endif
1558 #endif
1559 #endif
1560 main ()
1561 {
1562 #if defined (sony)
1563 #if defined (MIPSEB)
1564 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1565 I don't know.... */
1566 printf ("mips-sony-bsd\n"); exit (0);
1567 #else
1568 #include <sys/param.h>
1569 printf ("m68k-sony-newsos%s\n",
1570 #ifdef NEWSOS4
1571 "4"
1572 #else
1573 ""
1574 #endif
1575 ); exit (0);
1576 #endif
1577 #endif
1578
1579 #if defined (NeXT)
1580 #if !defined (__ARCHITECTURE__)
1581 #define __ARCHITECTURE__ "m68k"
1582 #endif
1583 int version;
1584 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1585 if (version < 4)
1586 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1587 else
1588 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1589 exit (0);
1590 #endif
1591
1592 #if defined (MULTIMAX) || defined (n16)
1593 #if defined (UMAXV)
1594 printf ("ns32k-encore-sysv\n"); exit (0);
1595 #else
1596 #if defined (CMU)
1597 printf ("ns32k-encore-mach\n"); exit (0);
1598 #else
1599 printf ("ns32k-encore-bsd\n"); exit (0);
1600 #endif
1601 #endif
1602 #endif
1603
1604 #if defined (__386BSD__)
1605 printf ("i386-pc-bsd\n"); exit (0);
1606 #endif
1607
1608 #if defined (sequent)
1609 #if defined (i386)
1610 printf ("i386-sequent-dynix\n"); exit (0);
1611 #endif
1612 #if defined (ns32000)
1613 printf ("ns32k-sequent-dynix\n"); exit (0);
1614 #endif
1615 #endif
1616
1617 #if defined (_SEQUENT_)
1618 struct utsname un;
1619
1620 uname(&un);
1621 if (strncmp(un.version, "V2", 2) == 0) {
1622 printf ("i386-sequent-ptx2\n"); exit (0);
1623 }
1624 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1625 printf ("i386-sequent-ptx1\n"); exit (0);
1626 }
1627 printf ("i386-sequent-ptx\n"); exit (0);
1628 #endif
1629
1630 #if defined (vax)
1631 #if !defined (ultrix)
1632 #include <sys/param.h>
1633 #if defined (BSD)
1634 #if BSD == 43
1635 printf ("vax-dec-bsd4.3\n"); exit (0);
1636 #else
1637 #if BSD == 199006
1638 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1639 #else
1640 printf ("vax-dec-bsd\n"); exit (0);
1641 #endif
1642 #endif
1643 #else
1644 printf ("vax-dec-bsd\n"); exit (0);
1645 #endif
1646 #else
1647 #if defined(_SIZE_T_) || defined(SIGLOST)
1648 struct utsname un;
1649 uname (&un);
1650 printf ("vax-dec-ultrix%s\n", un.release); exit (0);
1651 #else
1652 printf ("vax-dec-ultrix\n"); exit (0);
1653 #endif
1654 #endif
1655 #endif
1656 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1657 #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1658 #if defined(_SIZE_T_) || defined(SIGLOST)
1659 struct utsname *un;
1660 uname (&un);
1661 printf ("mips-dec-ultrix%s\n", un.release); exit (0);
1662 #else
1663 printf ("mips-dec-ultrix\n"); exit (0);
1664 #endif
1665 #endif
1666 #endif
1667
1668 #if defined (alliant) && defined (i860)
1669 printf ("i860-alliant-bsd\n"); exit (0);
1670 #endif
1671
1672 exit (1);
1673 }
1674 EOF
1675
1676 $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
1677 { echo "$SYSTEM_NAME"; exit; }
1678
1679 # Apollos put the system type in the environment.
1680 test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
1681
1682 echo "$0: unable to guess system type" >&2
1683
1684 case $UNAME_MACHINE:$UNAME_SYSTEM in
1685 mips:Linux | mips64:Linux)
1686 # If we got here on MIPS GNU/Linux, output extra information.
1687 cat >&2 <<EOF
1688
1689 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
@@ -1433,13 +1696,21 @@
1696
1697 This script (version $timestamp), has failed to recognize the
1698 operating system you are using. If your script is old, overwrite *all*
1699 copies of config.guess and config.sub with the latest versions from:
1700
1701 https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
1702 and
1703 https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
1704 EOF
1705
1706 our_year=`echo $timestamp | sed 's,-.*,,'`
1707 thisyear=`date +%Y`
1708 # shellcheck disable=SC2003
1709 script_age=`expr "$thisyear" - "$our_year"`
1710 if test "$script_age" -lt 3 ; then
1711 cat >&2 <<EOF
1712
1713 If $0 has already been updated, send the following data and any
1714 information you think might be pertinent to [email protected] to
1715 provide the necessary information to handle your system.
1716
@@ -1463,14 +1734,15 @@
1734 UNAME_MACHINE = "$UNAME_MACHINE"
1735 UNAME_RELEASE = "$UNAME_RELEASE"
1736 UNAME_SYSTEM = "$UNAME_SYSTEM"
1737 UNAME_VERSION = "$UNAME_VERSION"
1738 EOF
1739 fi
1740
1741 exit 1
1742
1743 # Local variables:
1744 # eval: (add-hook 'before-save-hook 'time-stamp)
1745 # time-stamp-start: "timestamp='"
1746 # time-stamp-format: "%:y-%02m-%02d"
1747 # time-stamp-end: "'"
1748 # End:
1749
--- autosetup/autosetup-config.sub
+++ autosetup/autosetup-config.sub
@@ -1,10 +1,12 @@
11
#! /bin/sh
22
# Configuration validation subroutine script.
3
-# Copyright 1992-2018 Free Software Foundation, Inc.
3
+# Copyright 1992-2021 Free Software Foundation, Inc.
4
+
5
+# shellcheck disable=SC2006,SC2268 # see below for rationale
46
5
-timestamp='2018-03-08'
7
+timestamp='2021-07-03'
68
79
# This file is free software; you can redistribute it and/or modify it
810
# under the terms of the GNU General Public License as published by
911
# the Free Software Foundation; either version 3 of the License, or
1012
# (at your option) any later version.
@@ -31,11 +33,11 @@
3133
# Supply the specified configuration type as an argument.
3234
# If it is invalid, we print an error message on stderr and exit with code 1.
3335
# Otherwise, we print the canonical config type on stdout and succeed.
3436
3537
# You can get the latest version of this script from:
36
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
38
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
3739
3840
# This file is supposed to be the same for all GNU packages
3941
# and recognize all the CPU types, system types and aliases
4042
# that are meaningful with *any* GNU software.
4143
# Each package is responsible for reporting which valid configurations
@@ -47,10 +49,17 @@
4749
# machine specification into a single specification in the form:
4850
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
4951
# or in some cases, the newer four-part form:
5052
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
5153
# It is wrong to echo any other type of specification.
54
+
55
+# The "shellcheck disable" line above the timestamp inhibits complaints
56
+# about features and limitations of the classic Bourne shell that were
57
+# superseded or lifted in POSIX. However, this script identifies a wide
58
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
59
+# even some reasonably current systems (Solaris 10 as case-in-point) still
60
+# have a pre-POSIX /bin/sh.
5261
5362
me=`echo "$0" | sed -e 's,.*/,,'`
5463
5564
usage="\
5665
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
@@ -65,11 +74,11 @@
6574
Report bugs and patches to <[email protected]>."
6675
6776
version="\
6877
GNU config.sub ($timestamp)
6978
70
-Copyright 1992-2018 Free Software Foundation, Inc.
79
+Copyright 1992-2021 Free Software Foundation, Inc.
7180
7281
This is free software; see the source for copying conditions. There is NO
7382
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
7483
7584
help="
@@ -87,11 +96,11 @@
8796
-- ) # Stop option processing
8897
shift; break ;;
8998
- ) # Use stdin as input.
9099
break ;;
91100
-* )
92
- echo "$me: invalid option $1$help"
101
+ echo "$me: invalid option $1$help" >&2
93102
exit 1 ;;
94103
95104
*local*)
96105
# First pass through any local machine types.
97106
echo "$1"
@@ -108,1431 +117,1391 @@
108117
1) ;;
109118
*) echo "$me: too many arguments$help" >&2
110119
exit 1;;
111120
esac
112121
113
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
114
-# Here we must recognize all the valid KERNEL-OS combinations.
115
-maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
116
-case $maybe_os in
117
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
118
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119
- knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
120
- kopensolaris*-gnu* | cloudabi*-eabi* | \
121
- storm-chaos* | os2-emx* | rtmk-nova*)
122
- os=-$maybe_os
123
- basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
124
- ;;
125
- android-linux)
126
- os=-linux-android
127
- basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
128
- ;;
129
- *)
130
- basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
131
- if [ "$basic_machine" != "$1" ]
132
- then os=`echo "$1" | sed 's/.*-/-/'`
133
- else os=; fi
134
- ;;
135
-esac
136
-
137
-### Let's recognize common machines as not being operating systems so
138
-### that things like config.sub decstation-3100 work. We also
139
-### recognize some manufacturers as not being operating systems, so we
140
-### can provide default operating systems below.
141
-case $os in
142
- -sun*os*)
143
- # Prevent following clause from handling this invalid input.
144
- ;;
145
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
146
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
147
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
148
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151
- -apple | -axis | -knuth | -cray | -microblaze*)
152
- os=
153
- basic_machine=$1
154
- ;;
155
- -bluegene*)
156
- os=-cnk
157
- ;;
158
- -sim | -cisco | -oki | -wec | -winbond)
159
- os=
160
- basic_machine=$1
161
- ;;
162
- -scout)
163
- ;;
164
- -wrs)
165
- os=-vxworks
166
- basic_machine=$1
167
- ;;
168
- -chorusos*)
169
- os=-chorusos
170
- basic_machine=$1
171
- ;;
172
- -chorusrdb)
173
- os=-chorusrdb
174
- basic_machine=$1
175
- ;;
176
- -hiux*)
177
- os=-hiuxwe2
178
- ;;
179
- -sco6)
180
- os=-sco5v6
181
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
182
- ;;
183
- -sco5)
184
- os=-sco3.2v5
185
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
186
- ;;
187
- -sco4)
188
- os=-sco3.2v4
189
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
190
- ;;
191
- -sco3.2.[4-9]*)
192
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
193
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
194
- ;;
195
- -sco3.2v[4-9]*)
196
- # Don't forget version if it is 3.2v4 or newer.
197
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
198
- ;;
199
- -sco5v6*)
200
- # Don't forget version if it is 3.2v4 or newer.
201
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
202
- ;;
203
- -sco*)
204
- os=-sco3.2v2
205
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
206
- ;;
207
- -udk*)
208
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
209
- ;;
210
- -isc)
211
- os=-isc2.2
212
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
213
- ;;
214
- -clix*)
215
- basic_machine=clipper-intergraph
216
- ;;
217
- -isc*)
218
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
219
- ;;
220
- -lynx*178)
221
- os=-lynxos178
222
- ;;
223
- -lynx*5)
224
- os=-lynxos5
225
- ;;
226
- -lynx*)
227
- os=-lynxos
228
- ;;
229
- -ptx*)
230
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
231
- ;;
232
- -psos*)
233
- os=-psos
234
- ;;
235
- -mint | -mint[0-9]*)
236
- basic_machine=m68k-atari
237
- os=-mint
238
- ;;
239
-esac
240
-
241
-# Decode aliases for certain CPU-COMPANY combinations.
122
+# Split fields of configuration type
123
+# shellcheck disable=SC2162
124
+IFS="-" read field1 field2 field3 field4 <<EOF
125
+$1
126
+EOF
127
+
128
+# Separate into logical components for further validation
129
+case $1 in
130
+ *-*-*-*-*)
131
+ echo Invalid configuration \`"$1"\': more than four components >&2
132
+ exit 1
133
+ ;;
134
+ *-*-*-*)
135
+ basic_machine=$field1-$field2
136
+ basic_os=$field3-$field4
137
+ ;;
138
+ *-*-*)
139
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
140
+ # parts
141
+ maybe_os=$field2-$field3
142
+ case $maybe_os in
143
+ nto-qnx* | linux-* | uclinux-uclibc* \
144
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
145
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
146
+ | storm-chaos* | os2-emx* | rtmk-nova*)
147
+ basic_machine=$field1
148
+ basic_os=$maybe_os
149
+ ;;
150
+ android-linux)
151
+ basic_machine=$field1-unknown
152
+ basic_os=linux-android
153
+ ;;
154
+ *)
155
+ basic_machine=$field1-$field2
156
+ basic_os=$field3
157
+ ;;
158
+ esac
159
+ ;;
160
+ *-*)
161
+ # A lone config we happen to match not fitting any pattern
162
+ case $field1-$field2 in
163
+ decstation-3100)
164
+ basic_machine=mips-dec
165
+ basic_os=
166
+ ;;
167
+ *-*)
168
+ # Second component is usually, but not always the OS
169
+ case $field2 in
170
+ # Prevent following clause from handling this valid os
171
+ sun*os*)
172
+ basic_machine=$field1
173
+ basic_os=$field2
174
+ ;;
175
+ # Manufacturers
176
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
177
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
178
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
179
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
180
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
181
+ | ultra | tti* | harris | dolphin | highlevel | gould \
182
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
183
+ | microblaze* | sim | cisco \
184
+ | oki | wec | wrs | winbond)
185
+ basic_machine=$field1-$field2
186
+ basic_os=
187
+ ;;
188
+ *)
189
+ basic_machine=$field1
190
+ basic_os=$field2
191
+ ;;
192
+ esac
193
+ ;;
194
+ esac
195
+ ;;
196
+ *)
197
+ # Convert single-component short-hands not valid as part of
198
+ # multi-component configurations.
199
+ case $field1 in
200
+ 386bsd)
201
+ basic_machine=i386-pc
202
+ basic_os=bsd
203
+ ;;
204
+ a29khif)
205
+ basic_machine=a29k-amd
206
+ basic_os=udi
207
+ ;;
208
+ adobe68k)
209
+ basic_machine=m68010-adobe
210
+ basic_os=scout
211
+ ;;
212
+ alliant)
213
+ basic_machine=fx80-alliant
214
+ basic_os=
215
+ ;;
216
+ altos | altos3068)
217
+ basic_machine=m68k-altos
218
+ basic_os=
219
+ ;;
220
+ am29k)
221
+ basic_machine=a29k-none
222
+ basic_os=bsd
223
+ ;;
224
+ amdahl)
225
+ basic_machine=580-amdahl
226
+ basic_os=sysv
227
+ ;;
228
+ amiga)
229
+ basic_machine=m68k-unknown
230
+ basic_os=
231
+ ;;
232
+ amigaos | amigados)
233
+ basic_machine=m68k-unknown
234
+ basic_os=amigaos
235
+ ;;
236
+ amigaunix | amix)
237
+ basic_machine=m68k-unknown
238
+ basic_os=sysv4
239
+ ;;
240
+ apollo68)
241
+ basic_machine=m68k-apollo
242
+ basic_os=sysv
243
+ ;;
244
+ apollo68bsd)
245
+ basic_machine=m68k-apollo
246
+ basic_os=bsd
247
+ ;;
248
+ aros)
249
+ basic_machine=i386-pc
250
+ basic_os=aros
251
+ ;;
252
+ aux)
253
+ basic_machine=m68k-apple
254
+ basic_os=aux
255
+ ;;
256
+ balance)
257
+ basic_machine=ns32k-sequent
258
+ basic_os=dynix
259
+ ;;
260
+ blackfin)
261
+ basic_machine=bfin-unknown
262
+ basic_os=linux
263
+ ;;
264
+ cegcc)
265
+ basic_machine=arm-unknown
266
+ basic_os=cegcc
267
+ ;;
268
+ convex-c1)
269
+ basic_machine=c1-convex
270
+ basic_os=bsd
271
+ ;;
272
+ convex-c2)
273
+ basic_machine=c2-convex
274
+ basic_os=bsd
275
+ ;;
276
+ convex-c32)
277
+ basic_machine=c32-convex
278
+ basic_os=bsd
279
+ ;;
280
+ convex-c34)
281
+ basic_machine=c34-convex
282
+ basic_os=bsd
283
+ ;;
284
+ convex-c38)
285
+ basic_machine=c38-convex
286
+ basic_os=bsd
287
+ ;;
288
+ cray)
289
+ basic_machine=j90-cray
290
+ basic_os=unicos
291
+ ;;
292
+ crds | unos)
293
+ basic_machine=m68k-crds
294
+ basic_os=
295
+ ;;
296
+ da30)
297
+ basic_machine=m68k-da30
298
+ basic_os=
299
+ ;;
300
+ decstation | pmax | pmin | dec3100 | decstatn)
301
+ basic_machine=mips-dec
302
+ basic_os=
303
+ ;;
304
+ delta88)
305
+ basic_machine=m88k-motorola
306
+ basic_os=sysv3
307
+ ;;
308
+ dicos)
309
+ basic_machine=i686-pc
310
+ basic_os=dicos
311
+ ;;
312
+ djgpp)
313
+ basic_machine=i586-pc
314
+ basic_os=msdosdjgpp
315
+ ;;
316
+ ebmon29k)
317
+ basic_machine=a29k-amd
318
+ basic_os=ebmon
319
+ ;;
320
+ es1800 | OSE68k | ose68k | ose | OSE)
321
+ basic_machine=m68k-ericsson
322
+ basic_os=ose
323
+ ;;
324
+ gmicro)
325
+ basic_machine=tron-gmicro
326
+ basic_os=sysv
327
+ ;;
328
+ go32)
329
+ basic_machine=i386-pc
330
+ basic_os=go32
331
+ ;;
332
+ h8300hms)
333
+ basic_machine=h8300-hitachi
334
+ basic_os=hms
335
+ ;;
336
+ h8300xray)
337
+ basic_machine=h8300-hitachi
338
+ basic_os=xray
339
+ ;;
340
+ h8500hms)
341
+ basic_machine=h8500-hitachi
342
+ basic_os=hms
343
+ ;;
344
+ harris)
345
+ basic_machine=m88k-harris
346
+ basic_os=sysv3
347
+ ;;
348
+ hp300 | hp300hpux)
349
+ basic_machine=m68k-hp
350
+ basic_os=hpux
351
+ ;;
352
+ hp300bsd)
353
+ basic_machine=m68k-hp
354
+ basic_os=bsd
355
+ ;;
356
+ hppaosf)
357
+ basic_machine=hppa1.1-hp
358
+ basic_os=osf
359
+ ;;
360
+ hppro)
361
+ basic_machine=hppa1.1-hp
362
+ basic_os=proelf
363
+ ;;
364
+ i386mach)
365
+ basic_machine=i386-mach
366
+ basic_os=mach
367
+ ;;
368
+ isi68 | isi)
369
+ basic_machine=m68k-isi
370
+ basic_os=sysv
371
+ ;;
372
+ m68knommu)
373
+ basic_machine=m68k-unknown
374
+ basic_os=linux
375
+ ;;
376
+ magnum | m3230)
377
+ basic_machine=mips-mips
378
+ basic_os=sysv
379
+ ;;
380
+ merlin)
381
+ basic_machine=ns32k-utek
382
+ basic_os=sysv
383
+ ;;
384
+ mingw64)
385
+ basic_machine=x86_64-pc
386
+ basic_os=mingw64
387
+ ;;
388
+ mingw32)
389
+ basic_machine=i686-pc
390
+ basic_os=mingw32
391
+ ;;
392
+ mingw32ce)
393
+ basic_machine=arm-unknown
394
+ basic_os=mingw32ce
395
+ ;;
396
+ monitor)
397
+ basic_machine=m68k-rom68k
398
+ basic_os=coff
399
+ ;;
400
+ morphos)
401
+ basic_machine=powerpc-unknown
402
+ basic_os=morphos
403
+ ;;
404
+ moxiebox)
405
+ basic_machine=moxie-unknown
406
+ basic_os=moxiebox
407
+ ;;
408
+ msdos)
409
+ basic_machine=i386-pc
410
+ basic_os=msdos
411
+ ;;
412
+ msys)
413
+ basic_machine=i686-pc
414
+ basic_os=msys
415
+ ;;
416
+ mvs)
417
+ basic_machine=i370-ibm
418
+ basic_os=mvs
419
+ ;;
420
+ nacl)
421
+ basic_machine=le32-unknown
422
+ basic_os=nacl
423
+ ;;
424
+ ncr3000)
425
+ basic_machine=i486-ncr
426
+ basic_os=sysv4
427
+ ;;
428
+ netbsd386)
429
+ basic_machine=i386-pc
430
+ basic_os=netbsd
431
+ ;;
432
+ netwinder)
433
+ basic_machine=armv4l-rebel
434
+ basic_os=linux
435
+ ;;
436
+ news | news700 | news800 | news900)
437
+ basic_machine=m68k-sony
438
+ basic_os=newsos
439
+ ;;
440
+ news1000)
441
+ basic_machine=m68030-sony
442
+ basic_os=newsos
443
+ ;;
444
+ necv70)
445
+ basic_machine=v70-nec
446
+ basic_os=sysv
447
+ ;;
448
+ nh3000)
449
+ basic_machine=m68k-harris
450
+ basic_os=cxux
451
+ ;;
452
+ nh[45]000)
453
+ basic_machine=m88k-harris
454
+ basic_os=cxux
455
+ ;;
456
+ nindy960)
457
+ basic_machine=i960-intel
458
+ basic_os=nindy
459
+ ;;
460
+ mon960)
461
+ basic_machine=i960-intel
462
+ basic_os=mon960
463
+ ;;
464
+ nonstopux)
465
+ basic_machine=mips-compaq
466
+ basic_os=nonstopux
467
+ ;;
468
+ os400)
469
+ basic_machine=powerpc-ibm
470
+ basic_os=os400
471
+ ;;
472
+ OSE68000 | ose68000)
473
+ basic_machine=m68000-ericsson
474
+ basic_os=ose
475
+ ;;
476
+ os68k)
477
+ basic_machine=m68k-none
478
+ basic_os=os68k
479
+ ;;
480
+ paragon)
481
+ basic_machine=i860-intel
482
+ basic_os=osf
483
+ ;;
484
+ parisc)
485
+ basic_machine=hppa-unknown
486
+ basic_os=linux
487
+ ;;
488
+ psp)
489
+ basic_machine=mipsallegrexel-sony
490
+ basic_os=psp
491
+ ;;
492
+ pw32)
493
+ basic_machine=i586-unknown
494
+ basic_os=pw32
495
+ ;;
496
+ rdos | rdos64)
497
+ basic_machine=x86_64-pc
498
+ basic_os=rdos
499
+ ;;
500
+ rdos32)
501
+ basic_machine=i386-pc
502
+ basic_os=rdos
503
+ ;;
504
+ rom68k)
505
+ basic_machine=m68k-rom68k
506
+ basic_os=coff
507
+ ;;
508
+ sa29200)
509
+ basic_machine=a29k-amd
510
+ basic_os=udi
511
+ ;;
512
+ sei)
513
+ basic_machine=mips-sei
514
+ basic_os=seiux
515
+ ;;
516
+ sequent)
517
+ basic_machine=i386-sequent
518
+ basic_os=
519
+ ;;
520
+ sps7)
521
+ basic_machine=m68k-bull
522
+ basic_os=sysv2
523
+ ;;
524
+ st2000)
525
+ basic_machine=m68k-tandem
526
+ basic_os=
527
+ ;;
528
+ stratus)
529
+ basic_machine=i860-stratus
530
+ basic_os=sysv4
531
+ ;;
532
+ sun2)
533
+ basic_machine=m68000-sun
534
+ basic_os=
535
+ ;;
536
+ sun2os3)
537
+ basic_machine=m68000-sun
538
+ basic_os=sunos3
539
+ ;;
540
+ sun2os4)
541
+ basic_machine=m68000-sun
542
+ basic_os=sunos4
543
+ ;;
544
+ sun3)
545
+ basic_machine=m68k-sun
546
+ basic_os=
547
+ ;;
548
+ sun3os3)
549
+ basic_machine=m68k-sun
550
+ basic_os=sunos3
551
+ ;;
552
+ sun3os4)
553
+ basic_machine=m68k-sun
554
+ basic_os=sunos4
555
+ ;;
556
+ sun4)
557
+ basic_machine=sparc-sun
558
+ basic_os=
559
+ ;;
560
+ sun4os3)
561
+ basic_machine=sparc-sun
562
+ basic_os=sunos3
563
+ ;;
564
+ sun4os4)
565
+ basic_machine=sparc-sun
566
+ basic_os=sunos4
567
+ ;;
568
+ sun4sol2)
569
+ basic_machine=sparc-sun
570
+ basic_os=solaris2
571
+ ;;
572
+ sun386 | sun386i | roadrunner)
573
+ basic_machine=i386-sun
574
+ basic_os=
575
+ ;;
576
+ sv1)
577
+ basic_machine=sv1-cray
578
+ basic_os=unicos
579
+ ;;
580
+ symmetry)
581
+ basic_machine=i386-sequent
582
+ basic_os=dynix
583
+ ;;
584
+ t3e)
585
+ basic_machine=alphaev5-cray
586
+ basic_os=unicos
587
+ ;;
588
+ t90)
589
+ basic_machine=t90-cray
590
+ basic_os=unicos
591
+ ;;
592
+ toad1)
593
+ basic_machine=pdp10-xkl
594
+ basic_os=tops20
595
+ ;;
596
+ tpf)
597
+ basic_machine=s390x-ibm
598
+ basic_os=tpf
599
+ ;;
600
+ udi29k)
601
+ basic_machine=a29k-amd
602
+ basic_os=udi
603
+ ;;
604
+ ultra3)
605
+ basic_machine=a29k-nyu
606
+ basic_os=sym1
607
+ ;;
608
+ v810 | necv810)
609
+ basic_machine=v810-nec
610
+ basic_os=none
611
+ ;;
612
+ vaxv)
613
+ basic_machine=vax-dec
614
+ basic_os=sysv
615
+ ;;
616
+ vms)
617
+ basic_machine=vax-dec
618
+ basic_os=vms
619
+ ;;
620
+ vsta)
621
+ basic_machine=i386-pc
622
+ basic_os=vsta
623
+ ;;
624
+ vxworks960)
625
+ basic_machine=i960-wrs
626
+ basic_os=vxworks
627
+ ;;
628
+ vxworks68)
629
+ basic_machine=m68k-wrs
630
+ basic_os=vxworks
631
+ ;;
632
+ vxworks29k)
633
+ basic_machine=a29k-wrs
634
+ basic_os=vxworks
635
+ ;;
636
+ xbox)
637
+ basic_machine=i686-pc
638
+ basic_os=mingw32
639
+ ;;
640
+ ymp)
641
+ basic_machine=ymp-cray
642
+ basic_os=unicos
643
+ ;;
644
+ *)
645
+ basic_machine=$1
646
+ basic_os=
647
+ ;;
648
+ esac
649
+ ;;
650
+esac
651
+
652
+# Decode 1-component or ad-hoc basic machines
242653
case $basic_machine in
243
- # Recognize the basic CPU types without company name.
244
- # Some are omitted here because they have special meanings below.
245
- 1750a | 580 \
246
- | a29k \
247
- | aarch64 | aarch64_be \
248
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
249
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
250
- | am33_2.0 \
251
- | arc | arceb \
252
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
253
- | avr | avr32 \
254
- | ba \
255
- | be32 | be64 \
256
- | bfin \
257
- | c4x | c8051 | clipper \
258
- | d10v | d30v | dlx | dsp16xx \
259
- | e2k | epiphany \
260
- | fido | fr30 | frv | ft32 \
261
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
262
- | hexagon \
263
- | i370 | i860 | i960 | ia16 | ia64 \
264
- | ip2k | iq2000 \
265
- | k1om \
266
- | le32 | le64 \
267
- | lm32 \
268
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
269
- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
270
- | mips | mipsbe | mipseb | mipsel | mipsle \
271
- | mips16 \
272
- | mips64 | mips64el \
273
- | mips64octeon | mips64octeonel \
274
- | mips64orion | mips64orionel \
275
- | mips64r5900 | mips64r5900el \
276
- | mips64vr | mips64vrel \
277
- | mips64vr4100 | mips64vr4100el \
278
- | mips64vr4300 | mips64vr4300el \
279
- | mips64vr5000 | mips64vr5000el \
280
- | mips64vr5900 | mips64vr5900el \
281
- | mipsisa32 | mipsisa32el \
282
- | mipsisa32r2 | mipsisa32r2el \
283
- | mipsisa32r6 | mipsisa32r6el \
284
- | mipsisa64 | mipsisa64el \
285
- | mipsisa64r2 | mipsisa64r2el \
286
- | mipsisa64r6 | mipsisa64r6el \
287
- | mipsisa64sb1 | mipsisa64sb1el \
288
- | mipsisa64sr71k | mipsisa64sr71kel \
289
- | mipsr5900 | mipsr5900el \
290
- | mipstx39 | mipstx39el \
291
- | mn10200 | mn10300 \
292
- | moxie \
293
- | mt \
294
- | msp430 \
295
- | nds32 | nds32le | nds32be \
296
- | nios | nios2 | nios2eb | nios2el \
297
- | ns16k | ns32k \
298
- | open8 | or1k | or1knd | or32 \
299
- | pdp10 | pj | pjl \
300
- | powerpc | powerpc64 | powerpc64le | powerpcle \
301
- | pru \
302
- | pyramid \
303
- | riscv32 | riscv64 \
304
- | rl78 | rx \
305
- | score \
306
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
307
- | sh64 | sh64le \
308
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
309
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
310
- | spu \
311
- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
312
- | ubicom32 \
313
- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
314
- | visium \
315
- | wasm32 \
316
- | x86 | xc16x | xstormy16 | xtensa \
317
- | z8k | z80)
318
- basic_machine=$basic_machine-unknown
319
- ;;
320
- c54x)
321
- basic_machine=tic54x-unknown
322
- ;;
323
- c55x)
324
- basic_machine=tic55x-unknown
325
- ;;
326
- c6x)
327
- basic_machine=tic6x-unknown
654
+ # Here we handle the default manufacturer of certain CPU types. It is in
655
+ # some cases the only manufacturer, in others, it is the most popular.
656
+ w89k)
657
+ cpu=hppa1.1
658
+ vendor=winbond
659
+ ;;
660
+ op50n)
661
+ cpu=hppa1.1
662
+ vendor=oki
663
+ ;;
664
+ op60c)
665
+ cpu=hppa1.1
666
+ vendor=oki
667
+ ;;
668
+ ibm*)
669
+ cpu=i370
670
+ vendor=ibm
671
+ ;;
672
+ orion105)
673
+ cpu=clipper
674
+ vendor=highlevel
675
+ ;;
676
+ mac | mpw | mac-mpw)
677
+ cpu=m68k
678
+ vendor=apple
679
+ ;;
680
+ pmac | pmac-mpw)
681
+ cpu=powerpc
682
+ vendor=apple
683
+ ;;
684
+
685
+ # Recognize the various machine names and aliases which stand
686
+ # for a CPU type and a company and sometimes even an OS.
687
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
688
+ cpu=m68000
689
+ vendor=att
690
+ ;;
691
+ 3b*)
692
+ cpu=we32k
693
+ vendor=att
694
+ ;;
695
+ bluegene*)
696
+ cpu=powerpc
697
+ vendor=ibm
698
+ basic_os=cnk
699
+ ;;
700
+ decsystem10* | dec10*)
701
+ cpu=pdp10
702
+ vendor=dec
703
+ basic_os=tops10
704
+ ;;
705
+ decsystem20* | dec20*)
706
+ cpu=pdp10
707
+ vendor=dec
708
+ basic_os=tops20
709
+ ;;
710
+ delta | 3300 | motorola-3300 | motorola-delta \
711
+ | 3300-motorola | delta-motorola)
712
+ cpu=m68k
713
+ vendor=motorola
714
+ ;;
715
+ dpx2*)
716
+ cpu=m68k
717
+ vendor=bull
718
+ basic_os=sysv3
719
+ ;;
720
+ encore | umax | mmax)
721
+ cpu=ns32k
722
+ vendor=encore
723
+ ;;
724
+ elxsi)
725
+ cpu=elxsi
726
+ vendor=elxsi
727
+ basic_os=${basic_os:-bsd}
728
+ ;;
729
+ fx2800)
730
+ cpu=i860
731
+ vendor=alliant
732
+ ;;
733
+ genix)
734
+ cpu=ns32k
735
+ vendor=ns
736
+ ;;
737
+ h3050r* | hiux*)
738
+ cpu=hppa1.1
739
+ vendor=hitachi
740
+ basic_os=hiuxwe2
741
+ ;;
742
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
743
+ cpu=hppa1.0
744
+ vendor=hp
745
+ ;;
746
+ hp9k2[0-9][0-9] | hp9k31[0-9])
747
+ cpu=m68000
748
+ vendor=hp
749
+ ;;
750
+ hp9k3[2-9][0-9])
751
+ cpu=m68k
752
+ vendor=hp
753
+ ;;
754
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
755
+ cpu=hppa1.0
756
+ vendor=hp
757
+ ;;
758
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
759
+ cpu=hppa1.1
760
+ vendor=hp
761
+ ;;
762
+ hp9k78[0-9] | hp78[0-9])
763
+ # FIXME: really hppa2.0-hp
764
+ cpu=hppa1.1
765
+ vendor=hp
766
+ ;;
767
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
768
+ # FIXME: really hppa2.0-hp
769
+ cpu=hppa1.1
770
+ vendor=hp
771
+ ;;
772
+ hp9k8[0-9][13679] | hp8[0-9][13679])
773
+ cpu=hppa1.1
774
+ vendor=hp
775
+ ;;
776
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
777
+ cpu=hppa1.0
778
+ vendor=hp
779
+ ;;
780
+ i*86v32)
781
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
782
+ vendor=pc
783
+ basic_os=sysv32
784
+ ;;
785
+ i*86v4*)
786
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
787
+ vendor=pc
788
+ basic_os=sysv4
789
+ ;;
790
+ i*86v)
791
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
792
+ vendor=pc
793
+ basic_os=sysv
794
+ ;;
795
+ i*86sol2)
796
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
797
+ vendor=pc
798
+ basic_os=solaris2
799
+ ;;
800
+ j90 | j90-cray)
801
+ cpu=j90
802
+ vendor=cray
803
+ basic_os=${basic_os:-unicos}
804
+ ;;
805
+ iris | iris4d)
806
+ cpu=mips
807
+ vendor=sgi
808
+ case $basic_os in
809
+ irix*)
810
+ ;;
811
+ *)
812
+ basic_os=irix4
813
+ ;;
814
+ esac
815
+ ;;
816
+ miniframe)
817
+ cpu=m68000
818
+ vendor=convergent
819
+ ;;
820
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
821
+ cpu=m68k
822
+ vendor=atari
823
+ basic_os=mint
824
+ ;;
825
+ news-3600 | risc-news)
826
+ cpu=mips
827
+ vendor=sony
828
+ basic_os=newsos
829
+ ;;
830
+ next | m*-next)
831
+ cpu=m68k
832
+ vendor=next
833
+ case $basic_os in
834
+ openstep*)
835
+ ;;
836
+ nextstep*)
837
+ ;;
838
+ ns2*)
839
+ basic_os=nextstep2
840
+ ;;
841
+ *)
842
+ basic_os=nextstep3
843
+ ;;
844
+ esac
845
+ ;;
846
+ np1)
847
+ cpu=np1
848
+ vendor=gould
849
+ ;;
850
+ op50n-* | op60c-*)
851
+ cpu=hppa1.1
852
+ vendor=oki
853
+ basic_os=proelf
854
+ ;;
855
+ pa-hitachi)
856
+ cpu=hppa1.1
857
+ vendor=hitachi
858
+ basic_os=hiuxwe2
859
+ ;;
860
+ pbd)
861
+ cpu=sparc
862
+ vendor=tti
863
+ ;;
864
+ pbb)
865
+ cpu=m68k
866
+ vendor=tti
867
+ ;;
868
+ pc532)
869
+ cpu=ns32k
870
+ vendor=pc532
871
+ ;;
872
+ pn)
873
+ cpu=pn
874
+ vendor=gould
875
+ ;;
876
+ power)
877
+ cpu=power
878
+ vendor=ibm
879
+ ;;
880
+ ps2)
881
+ cpu=i386
882
+ vendor=ibm
883
+ ;;
884
+ rm[46]00)
885
+ cpu=mips
886
+ vendor=siemens
887
+ ;;
888
+ rtpc | rtpc-*)
889
+ cpu=romp
890
+ vendor=ibm
891
+ ;;
892
+ sde)
893
+ cpu=mipsisa32
894
+ vendor=sde
895
+ basic_os=${basic_os:-elf}
896
+ ;;
897
+ simso-wrs)
898
+ cpu=sparclite
899
+ vendor=wrs
900
+ basic_os=vxworks
901
+ ;;
902
+ tower | tower-32)
903
+ cpu=m68k
904
+ vendor=ncr
905
+ ;;
906
+ vpp*|vx|vx-*)
907
+ cpu=f301
908
+ vendor=fujitsu
909
+ ;;
910
+ w65)
911
+ cpu=w65
912
+ vendor=wdc
913
+ ;;
914
+ w89k-*)
915
+ cpu=hppa1.1
916
+ vendor=winbond
917
+ basic_os=proelf
918
+ ;;
919
+ none)
920
+ cpu=none
921
+ vendor=none
328922
;;
329923
leon|leon[3-9])
330
- basic_machine=sparc-$basic_machine
331
- ;;
332
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
333
- basic_machine=$basic_machine-unknown
334
- os=-none
335
- ;;
336
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
337
- ;;
338
- ms1)
339
- basic_machine=mt-unknown
340
- ;;
341
-
342
- strongarm | thumb | xscale)
343
- basic_machine=arm-unknown
344
- ;;
345
- xgate)
346
- basic_machine=$basic_machine-unknown
347
- os=-none
348
- ;;
349
- xscaleeb)
350
- basic_machine=armeb-unknown
351
- ;;
352
-
353
- xscaleel)
354
- basic_machine=armel-unknown
355
- ;;
356
-
924
+ cpu=sparc
925
+ vendor=$basic_machine
926
+ ;;
927
+ leon-*|leon[3-9]-*)
928
+ cpu=sparc
929
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
930
+ ;;
931
+
932
+ *-*)
933
+ # shellcheck disable=SC2162
934
+ IFS="-" read cpu vendor <<EOF
935
+$basic_machine
936
+EOF
937
+ ;;
357938
# We use `pc' rather than `unknown'
358939
# because (1) that's what they normally are, and
359940
# (2) the word "unknown" tends to confuse beginning users.
360941
i*86 | x86_64)
361
- basic_machine=$basic_machine-pc
362
- ;;
363
- # Object if more than one company name word.
364
- *-*-*)
365
- echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
366
- exit 1
367
- ;;
368
- # Recognize the basic CPU types with company name.
369
- 580-* \
370
- | a29k-* \
371
- | aarch64-* | aarch64_be-* \
372
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
373
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
374
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
375
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
376
- | avr-* | avr32-* \
377
- | ba-* \
378
- | be32-* | be64-* \
379
- | bfin-* | bs2000-* \
380
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
381
- | c8051-* | clipper-* | craynv-* | cydra-* \
382
- | d10v-* | d30v-* | dlx-* \
383
- | e2k-* | elxsi-* \
384
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
385
- | h8300-* | h8500-* \
386
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
387
- | hexagon-* \
388
- | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
389
- | ip2k-* | iq2000-* \
390
- | k1om-* \
391
- | le32-* | le64-* \
392
- | lm32-* \
393
- | m32c-* | m32r-* | m32rle-* \
394
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
395
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
396
- | microblaze-* | microblazeel-* \
397
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
398
- | mips16-* \
399
- | mips64-* | mips64el-* \
400
- | mips64octeon-* | mips64octeonel-* \
401
- | mips64orion-* | mips64orionel-* \
402
- | mips64r5900-* | mips64r5900el-* \
403
- | mips64vr-* | mips64vrel-* \
404
- | mips64vr4100-* | mips64vr4100el-* \
405
- | mips64vr4300-* | mips64vr4300el-* \
406
- | mips64vr5000-* | mips64vr5000el-* \
407
- | mips64vr5900-* | mips64vr5900el-* \
408
- | mipsisa32-* | mipsisa32el-* \
409
- | mipsisa32r2-* | mipsisa32r2el-* \
410
- | mipsisa32r6-* | mipsisa32r6el-* \
411
- | mipsisa64-* | mipsisa64el-* \
412
- | mipsisa64r2-* | mipsisa64r2el-* \
413
- | mipsisa64r6-* | mipsisa64r6el-* \
414
- | mipsisa64sb1-* | mipsisa64sb1el-* \
415
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
416
- | mipsr5900-* | mipsr5900el-* \
417
- | mipstx39-* | mipstx39el-* \
418
- | mmix-* \
419
- | mt-* \
420
- | msp430-* \
421
- | nds32-* | nds32le-* | nds32be-* \
422
- | nios-* | nios2-* | nios2eb-* | nios2el-* \
423
- | none-* | np1-* | ns16k-* | ns32k-* \
424
- | open8-* \
425
- | or1k*-* \
426
- | orion-* \
427
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
428
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
429
- | pru-* \
430
- | pyramid-* \
431
- | riscv32-* | riscv64-* \
432
- | rl78-* | romp-* | rs6000-* | rx-* \
433
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
434
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
435
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
436
- | sparclite-* \
437
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
438
- | tahoe-* \
439
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
440
- | tile*-* \
441
- | tron-* \
442
- | ubicom32-* \
443
- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
444
- | vax-* \
445
- | visium-* \
446
- | wasm32-* \
447
- | we32k-* \
448
- | x86-* | x86_64-* | xc16x-* | xps100-* \
449
- | xstormy16-* | xtensa*-* \
450
- | ymp-* \
451
- | z8k-* | z80-*)
452
- ;;
453
- # Recognize the basic CPU types without company name, with glob match.
454
- xtensa*)
455
- basic_machine=$basic_machine-unknown
456
- ;;
457
- # Recognize the various machine names and aliases which stand
458
- # for a CPU type and a company and sometimes even an OS.
459
- 386bsd)
460
- basic_machine=i386-pc
461
- os=-bsd
462
- ;;
463
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
464
- basic_machine=m68000-att
465
- ;;
466
- 3b*)
467
- basic_machine=we32k-att
468
- ;;
469
- a29khif)
470
- basic_machine=a29k-amd
471
- os=-udi
472
- ;;
473
- abacus)
474
- basic_machine=abacus-unknown
475
- ;;
476
- adobe68k)
477
- basic_machine=m68010-adobe
478
- os=-scout
479
- ;;
480
- alliant | fx80)
481
- basic_machine=fx80-alliant
482
- ;;
483
- altos | altos3068)
484
- basic_machine=m68k-altos
485
- ;;
486
- am29k)
487
- basic_machine=a29k-none
488
- os=-bsd
489
- ;;
490
- amd64)
491
- basic_machine=x86_64-pc
492
- ;;
942
+ cpu=$basic_machine
943
+ vendor=pc
944
+ ;;
945
+ # These rules are duplicated from below for sake of the special case above;
946
+ # i.e. things that normalized to x86 arches should also default to "pc"
947
+ pc98)
948
+ cpu=i386
949
+ vendor=pc
950
+ ;;
951
+ x64 | amd64)
952
+ cpu=x86_64
953
+ vendor=pc
954
+ ;;
955
+ # Recognize the basic CPU types without company name.
956
+ *)
957
+ cpu=$basic_machine
958
+ vendor=unknown
959
+ ;;
960
+esac
961
+
962
+unset -v basic_machine
963
+
964
+# Decode basic machines in the full and proper CPU-Company form.
965
+case $cpu-$vendor in
966
+ # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
967
+ # some cases the only manufacturer, in others, it is the most popular.
968
+ craynv-unknown)
969
+ vendor=cray
970
+ basic_os=${basic_os:-unicosmp}
971
+ ;;
972
+ c90-unknown | c90-cray)
973
+ vendor=cray
974
+ basic_os=${Basic_os:-unicos}
975
+ ;;
976
+ fx80-unknown)
977
+ vendor=alliant
978
+ ;;
979
+ romp-unknown)
980
+ vendor=ibm
981
+ ;;
982
+ mmix-unknown)
983
+ vendor=knuth
984
+ ;;
985
+ microblaze-unknown | microblazeel-unknown)
986
+ vendor=xilinx
987
+ ;;
988
+ rs6000-unknown)
989
+ vendor=ibm
990
+ ;;
991
+ vax-unknown)
992
+ vendor=dec
993
+ ;;
994
+ pdp11-unknown)
995
+ vendor=dec
996
+ ;;
997
+ we32k-unknown)
998
+ vendor=att
999
+ ;;
1000
+ cydra-unknown)
1001
+ vendor=cydrome
1002
+ ;;
1003
+ i370-ibm*)
1004
+ vendor=ibm
1005
+ ;;
1006
+ orion-unknown)
1007
+ vendor=highlevel
1008
+ ;;
1009
+ xps-unknown | xps100-unknown)
1010
+ cpu=xps100
1011
+ vendor=honeywell
1012
+ ;;
1013
+
1014
+ # Here we normalize CPU types with a missing or matching vendor
1015
+ dpx20-unknown | dpx20-bull)
1016
+ cpu=rs6000
1017
+ vendor=bull
1018
+ basic_os=${basic_os:-bosx}
1019
+ ;;
1020
+
1021
+ # Here we normalize CPU types irrespective of the vendor
4931022
amd64-*)
494
- basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
495
- ;;
496
- amdahl)
497
- basic_machine=580-amdahl
498
- os=-sysv
499
- ;;
500
- amiga | amiga-*)
501
- basic_machine=m68k-unknown
502
- ;;
503
- amigaos | amigados)
504
- basic_machine=m68k-unknown
505
- os=-amigaos
506
- ;;
507
- amigaunix | amix)
508
- basic_machine=m68k-unknown
509
- os=-sysv4
510
- ;;
511
- apollo68)
512
- basic_machine=m68k-apollo
513
- os=-sysv
514
- ;;
515
- apollo68bsd)
516
- basic_machine=m68k-apollo
517
- os=-bsd
518
- ;;
519
- aros)
520
- basic_machine=i386-pc
521
- os=-aros
522
- ;;
523
- asmjs)
524
- basic_machine=asmjs-unknown
525
- ;;
526
- aux)
527
- basic_machine=m68k-apple
528
- os=-aux
529
- ;;
530
- balance)
531
- basic_machine=ns32k-sequent
532
- os=-dynix
533
- ;;
534
- blackfin)
535
- basic_machine=bfin-unknown
536
- os=-linux
1023
+ cpu=x86_64
5371024
;;
5381025
blackfin-*)
539
- basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
540
- os=-linux
541
- ;;
542
- bluegene*)
543
- basic_machine=powerpc-ibm
544
- os=-cnk
1026
+ cpu=bfin
1027
+ basic_os=linux
5451028
;;
5461029
c54x-*)
547
- basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1030
+ cpu=tic54x
5481031
;;
5491032
c55x-*)
550
- basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1033
+ cpu=tic55x
5511034
;;
5521035
c6x-*)
553
- basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
554
- ;;
555
- c90)
556
- basic_machine=c90-cray
557
- os=-unicos
558
- ;;
559
- cegcc)
560
- basic_machine=arm-unknown
561
- os=-cegcc
562
- ;;
563
- convex-c1)
564
- basic_machine=c1-convex
565
- os=-bsd
566
- ;;
567
- convex-c2)
568
- basic_machine=c2-convex
569
- os=-bsd
570
- ;;
571
- convex-c32)
572
- basic_machine=c32-convex
573
- os=-bsd
574
- ;;
575
- convex-c34)
576
- basic_machine=c34-convex
577
- os=-bsd
578
- ;;
579
- convex-c38)
580
- basic_machine=c38-convex
581
- os=-bsd
582
- ;;
583
- cray | j90)
584
- basic_machine=j90-cray
585
- os=-unicos
586
- ;;
587
- craynv)
588
- basic_machine=craynv-cray
589
- os=-unicosmp
590
- ;;
591
- cr16 | cr16-*)
592
- basic_machine=cr16-unknown
593
- os=-elf
594
- ;;
595
- crds | unos)
596
- basic_machine=m68k-crds
597
- ;;
598
- crisv32 | crisv32-* | etraxfs*)
599
- basic_machine=crisv32-axis
600
- ;;
601
- cris | cris-* | etrax*)
602
- basic_machine=cris-axis
603
- ;;
604
- crx)
605
- basic_machine=crx-unknown
606
- os=-elf
607
- ;;
608
- da30 | da30-*)
609
- basic_machine=m68k-da30
610
- ;;
611
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
612
- basic_machine=mips-dec
613
- ;;
614
- decsystem10* | dec10*)
615
- basic_machine=pdp10-dec
616
- os=-tops10
617
- ;;
618
- decsystem20* | dec20*)
619
- basic_machine=pdp10-dec
620
- os=-tops20
621
- ;;
622
- delta | 3300 | motorola-3300 | motorola-delta \
623
- | 3300-motorola | delta-motorola)
624
- basic_machine=m68k-motorola
625
- ;;
626
- delta88)
627
- basic_machine=m88k-motorola
628
- os=-sysv3
629
- ;;
630
- dicos)
631
- basic_machine=i686-pc
632
- os=-dicos
633
- ;;
634
- djgpp)
635
- basic_machine=i586-pc
636
- os=-msdosdjgpp
637
- ;;
638
- dpx20 | dpx20-*)
639
- basic_machine=rs6000-bull
640
- os=-bosx
641
- ;;
642
- dpx2*)
643
- basic_machine=m68k-bull
644
- os=-sysv3
645
- ;;
646
- e500v[12])
647
- basic_machine=powerpc-unknown
648
- os=$os"spe"
1036
+ cpu=tic6x
6491037
;;
6501038
e500v[12]-*)
651
- basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
652
- os=$os"spe"
653
- ;;
654
- ebmon29k)
655
- basic_machine=a29k-amd
656
- os=-ebmon
657
- ;;
658
- elxsi)
659
- basic_machine=elxsi-elxsi
660
- os=-bsd
661
- ;;
662
- encore | umax | mmax)
663
- basic_machine=ns32k-encore
664
- ;;
665
- es1800 | OSE68k | ose68k | ose | OSE)
666
- basic_machine=m68k-ericsson
667
- os=-ose
668
- ;;
669
- fx2800)
670
- basic_machine=i860-alliant
671
- ;;
672
- genix)
673
- basic_machine=ns32k-ns
674
- ;;
675
- gmicro)
676
- basic_machine=tron-gmicro
677
- os=-sysv
678
- ;;
679
- go32)
680
- basic_machine=i386-pc
681
- os=-go32
682
- ;;
683
- h3050r* | hiux*)
684
- basic_machine=hppa1.1-hitachi
685
- os=-hiuxwe2
686
- ;;
687
- h8300hms)
688
- basic_machine=h8300-hitachi
689
- os=-hms
690
- ;;
691
- h8300xray)
692
- basic_machine=h8300-hitachi
693
- os=-xray
694
- ;;
695
- h8500hms)
696
- basic_machine=h8500-hitachi
697
- os=-hms
698
- ;;
699
- harris)
700
- basic_machine=m88k-harris
701
- os=-sysv3
702
- ;;
703
- hp300-*)
704
- basic_machine=m68k-hp
705
- ;;
706
- hp300bsd)
707
- basic_machine=m68k-hp
708
- os=-bsd
709
- ;;
710
- hp300hpux)
711
- basic_machine=m68k-hp
712
- os=-hpux
713
- ;;
714
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
715
- basic_machine=hppa1.0-hp
716
- ;;
717
- hp9k2[0-9][0-9] | hp9k31[0-9])
718
- basic_machine=m68000-hp
719
- ;;
720
- hp9k3[2-9][0-9])
721
- basic_machine=m68k-hp
722
- ;;
723
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
724
- basic_machine=hppa1.0-hp
725
- ;;
726
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
727
- basic_machine=hppa1.1-hp
728
- ;;
729
- hp9k78[0-9] | hp78[0-9])
730
- # FIXME: really hppa2.0-hp
731
- basic_machine=hppa1.1-hp
732
- ;;
733
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
734
- # FIXME: really hppa2.0-hp
735
- basic_machine=hppa1.1-hp
736
- ;;
737
- hp9k8[0-9][13679] | hp8[0-9][13679])
738
- basic_machine=hppa1.1-hp
739
- ;;
740
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
741
- basic_machine=hppa1.0-hp
742
- ;;
743
- hppaosf)
744
- basic_machine=hppa1.1-hp
745
- os=-osf
746
- ;;
747
- hppro)
748
- basic_machine=hppa1.1-hp
749
- os=-proelf
750
- ;;
751
- i370-ibm* | ibm*)
752
- basic_machine=i370-ibm
753
- ;;
754
- i*86v32)
755
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
756
- os=-sysv32
757
- ;;
758
- i*86v4*)
759
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
760
- os=-sysv4
761
- ;;
762
- i*86v)
763
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
764
- os=-sysv
765
- ;;
766
- i*86sol2)
767
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
768
- os=-solaris2
769
- ;;
770
- i386mach)
771
- basic_machine=i386-mach
772
- os=-mach
773
- ;;
774
- vsta)
775
- basic_machine=i386-unknown
776
- os=-vsta
777
- ;;
778
- iris | iris4d)
779
- basic_machine=mips-sgi
780
- case $os in
781
- -irix*)
782
- ;;
783
- *)
784
- os=-irix4
785
- ;;
786
- esac
787
- ;;
788
- isi68 | isi)
789
- basic_machine=m68k-isi
790
- os=-sysv
791
- ;;
792
- leon-*|leon[3-9]-*)
793
- basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
794
- ;;
795
- m68knommu)
796
- basic_machine=m68k-unknown
797
- os=-linux
1039
+ cpu=powerpc
1040
+ basic_os=${basic_os}"spe"
1041
+ ;;
1042
+ mips3*-*)
1043
+ cpu=mips64
1044
+ ;;
1045
+ ms1-*)
1046
+ cpu=mt
7981047
;;
7991048
m68knommu-*)
800
- basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
801
- os=-linux
802
- ;;
803
- magnum | m3230)
804
- basic_machine=mips-mips
805
- os=-sysv
806
- ;;
807
- merlin)
808
- basic_machine=ns32k-utek
809
- os=-sysv
810
- ;;
811
- microblaze*)
812
- basic_machine=microblaze-xilinx
813
- ;;
814
- mingw64)
815
- basic_machine=x86_64-pc
816
- os=-mingw64
817
- ;;
818
- mingw32)
819
- basic_machine=i686-pc
820
- os=-mingw32
821
- ;;
822
- mingw32ce)
823
- basic_machine=arm-unknown
824
- os=-mingw32ce
825
- ;;
826
- miniframe)
827
- basic_machine=m68000-convergent
828
- ;;
829
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
830
- basic_machine=m68k-atari
831
- os=-mint
832
- ;;
833
- mips3*-*)
834
- basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
835
- ;;
836
- mips3*)
837
- basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
838
- ;;
839
- monitor)
840
- basic_machine=m68k-rom68k
841
- os=-coff
842
- ;;
843
- morphos)
844
- basic_machine=powerpc-unknown
845
- os=-morphos
846
- ;;
847
- moxiebox)
848
- basic_machine=moxie-unknown
849
- os=-moxiebox
850
- ;;
851
- msdos)
852
- basic_machine=i386-pc
853
- os=-msdos
854
- ;;
855
- ms1-*)
856
- basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
857
- ;;
858
- msys)
859
- basic_machine=i686-pc
860
- os=-msys
861
- ;;
862
- mvs)
863
- basic_machine=i370-ibm
864
- os=-mvs
865
- ;;
866
- nacl)
867
- basic_machine=le32-unknown
868
- os=-nacl
869
- ;;
870
- ncr3000)
871
- basic_machine=i486-ncr
872
- os=-sysv4
873
- ;;
874
- netbsd386)
875
- basic_machine=i386-unknown
876
- os=-netbsd
877
- ;;
878
- netwinder)
879
- basic_machine=armv4l-rebel
880
- os=-linux
881
- ;;
882
- news | news700 | news800 | news900)
883
- basic_machine=m68k-sony
884
- os=-newsos
885
- ;;
886
- news1000)
887
- basic_machine=m68030-sony
888
- os=-newsos
889
- ;;
890
- news-3600 | risc-news)
891
- basic_machine=mips-sony
892
- os=-newsos
893
- ;;
894
- necv70)
895
- basic_machine=v70-nec
896
- os=-sysv
897
- ;;
898
- next | m*-next)
899
- basic_machine=m68k-next
900
- case $os in
901
- -nextstep* )
902
- ;;
903
- -ns2*)
904
- os=-nextstep2
905
- ;;
906
- *)
907
- os=-nextstep3
908
- ;;
909
- esac
910
- ;;
911
- nh3000)
912
- basic_machine=m68k-harris
913
- os=-cxux
914
- ;;
915
- nh[45]000)
916
- basic_machine=m88k-harris
917
- os=-cxux
918
- ;;
919
- nindy960)
920
- basic_machine=i960-intel
921
- os=-nindy
922
- ;;
923
- mon960)
924
- basic_machine=i960-intel
925
- os=-mon960
926
- ;;
927
- nonstopux)
928
- basic_machine=mips-compaq
929
- os=-nonstopux
930
- ;;
931
- np1)
932
- basic_machine=np1-gould
1049
+ cpu=m68k
1050
+ basic_os=linux
1051
+ ;;
1052
+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
1053
+ cpu=s12z
1054
+ ;;
1055
+ openrisc-*)
1056
+ cpu=or32
1057
+ ;;
1058
+ parisc-*)
1059
+ cpu=hppa
1060
+ basic_os=linux
1061
+ ;;
1062
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1063
+ cpu=i586
1064
+ ;;
1065
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
1066
+ cpu=i686
1067
+ ;;
1068
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1069
+ cpu=i686
1070
+ ;;
1071
+ pentium4-*)
1072
+ cpu=i786
1073
+ ;;
1074
+ pc98-*)
1075
+ cpu=i386
1076
+ ;;
1077
+ ppc-* | ppcbe-*)
1078
+ cpu=powerpc
1079
+ ;;
1080
+ ppcle-* | powerpclittle-*)
1081
+ cpu=powerpcle
1082
+ ;;
1083
+ ppc64-*)
1084
+ cpu=powerpc64
1085
+ ;;
1086
+ ppc64le-* | powerpc64little-*)
1087
+ cpu=powerpc64le
1088
+ ;;
1089
+ sb1-*)
1090
+ cpu=mipsisa64sb1
1091
+ ;;
1092
+ sb1el-*)
1093
+ cpu=mipsisa64sb1el
1094
+ ;;
1095
+ sh5e[lb]-*)
1096
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
1097
+ ;;
1098
+ spur-*)
1099
+ cpu=spur
1100
+ ;;
1101
+ strongarm-* | thumb-*)
1102
+ cpu=arm
1103
+ ;;
1104
+ tx39-*)
1105
+ cpu=mipstx39
1106
+ ;;
1107
+ tx39el-*)
1108
+ cpu=mipstx39el
1109
+ ;;
1110
+ x64-*)
1111
+ cpu=x86_64
1112
+ ;;
1113
+ xscale-* | xscalee[bl]-*)
1114
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
1115
+ ;;
1116
+ arm64-*)
1117
+ cpu=aarch64
1118
+ ;;
1119
+
1120
+ # Recognize the canonical CPU Types that limit and/or modify the
1121
+ # company names they are paired with.
1122
+ cr16-*)
1123
+ basic_os=${basic_os:-elf}
1124
+ ;;
1125
+ crisv32-* | etraxfs*-*)
1126
+ cpu=crisv32
1127
+ vendor=axis
1128
+ ;;
1129
+ cris-* | etrax*-*)
1130
+ cpu=cris
1131
+ vendor=axis
1132
+ ;;
1133
+ crx-*)
1134
+ basic_os=${basic_os:-elf}
9331135
;;
9341136
neo-tandem)
935
- basic_machine=neo-tandem
1137
+ cpu=neo
1138
+ vendor=tandem
9361139
;;
9371140
nse-tandem)
938
- basic_machine=nse-tandem
1141
+ cpu=nse
1142
+ vendor=tandem
9391143
;;
9401144
nsr-tandem)
941
- basic_machine=nsr-tandem
1145
+ cpu=nsr
1146
+ vendor=tandem
9421147
;;
9431148
nsv-tandem)
944
- basic_machine=nsv-tandem
1149
+ cpu=nsv
1150
+ vendor=tandem
9451151
;;
9461152
nsx-tandem)
947
- basic_machine=nsx-tandem
948
- ;;
949
- op50n-* | op60c-*)
950
- basic_machine=hppa1.1-oki
951
- os=-proelf
952
- ;;
953
- openrisc | openrisc-*)
954
- basic_machine=or32-unknown
955
- ;;
956
- os400)
957
- basic_machine=powerpc-ibm
958
- os=-os400
959
- ;;
960
- OSE68000 | ose68000)
961
- basic_machine=m68000-ericsson
962
- os=-ose
963
- ;;
964
- os68k)
965
- basic_machine=m68k-none
966
- os=-os68k
967
- ;;
968
- pa-hitachi)
969
- basic_machine=hppa1.1-hitachi
970
- os=-hiuxwe2
971
- ;;
972
- paragon)
973
- basic_machine=i860-intel
974
- os=-osf
975
- ;;
976
- parisc)
977
- basic_machine=hppa-unknown
978
- os=-linux
979
- ;;
980
- parisc-*)
981
- basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
982
- os=-linux
983
- ;;
984
- pbd)
985
- basic_machine=sparc-tti
986
- ;;
987
- pbb)
988
- basic_machine=m68k-tti
989
- ;;
990
- pc532 | pc532-*)
991
- basic_machine=ns32k-pc532
992
- ;;
993
- pc98)
994
- basic_machine=i386-pc
995
- ;;
996
- pc98-*)
997
- basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
998
- ;;
999
- pentium | p5 | k5 | k6 | nexgen | viac3)
1000
- basic_machine=i586-pc
1001
- ;;
1002
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
1003
- basic_machine=i686-pc
1004
- ;;
1005
- pentiumii | pentium2 | pentiumiii | pentium3)
1006
- basic_machine=i686-pc
1007
- ;;
1008
- pentium4)
1009
- basic_machine=i786-pc
1010
- ;;
1011
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1012
- basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1013
- ;;
1014
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
1015
- basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1016
- ;;
1017
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1018
- basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1019
- ;;
1020
- pentium4-*)
1021
- basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1022
- ;;
1023
- pn)
1024
- basic_machine=pn-gould
1025
- ;;
1026
- power) basic_machine=power-ibm
1027
- ;;
1028
- ppc | ppcbe) basic_machine=powerpc-unknown
1029
- ;;
1030
- ppc-* | ppcbe-*)
1031
- basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1032
- ;;
1033
- ppcle | powerpclittle)
1034
- basic_machine=powerpcle-unknown
1035
- ;;
1036
- ppcle-* | powerpclittle-*)
1037
- basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1038
- ;;
1039
- ppc64) basic_machine=powerpc64-unknown
1040
- ;;
1041
- ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1042
- ;;
1043
- ppc64le | powerpc64little)
1044
- basic_machine=powerpc64le-unknown
1045
- ;;
1046
- ppc64le-* | powerpc64little-*)
1047
- basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1048
- ;;
1049
- ps2)
1050
- basic_machine=i386-ibm
1051
- ;;
1052
- pw32)
1053
- basic_machine=i586-unknown
1054
- os=-pw32
1055
- ;;
1056
- rdos | rdos64)
1057
- basic_machine=x86_64-pc
1058
- os=-rdos
1059
- ;;
1060
- rdos32)
1061
- basic_machine=i386-pc
1062
- os=-rdos
1063
- ;;
1064
- rom68k)
1065
- basic_machine=m68k-rom68k
1066
- os=-coff
1067
- ;;
1068
- rm[46]00)
1069
- basic_machine=mips-siemens
1070
- ;;
1071
- rtpc | rtpc-*)
1072
- basic_machine=romp-ibm
1073
- ;;
1074
- s390 | s390-*)
1075
- basic_machine=s390-ibm
1076
- ;;
1077
- s390x | s390x-*)
1078
- basic_machine=s390x-ibm
1079
- ;;
1080
- sa29200)
1081
- basic_machine=a29k-amd
1082
- os=-udi
1083
- ;;
1084
- sb1)
1085
- basic_machine=mipsisa64sb1-unknown
1086
- ;;
1087
- sb1el)
1088
- basic_machine=mipsisa64sb1el-unknown
1089
- ;;
1090
- sde)
1091
- basic_machine=mipsisa32-sde
1092
- os=-elf
1093
- ;;
1094
- sei)
1095
- basic_machine=mips-sei
1096
- os=-seiux
1097
- ;;
1098
- sequent)
1099
- basic_machine=i386-sequent
1100
- ;;
1101
- sh5el)
1102
- basic_machine=sh5le-unknown
1103
- ;;
1104
- simso-wrs)
1105
- basic_machine=sparclite-wrs
1106
- os=-vxworks
1107
- ;;
1108
- sps7)
1109
- basic_machine=m68k-bull
1110
- os=-sysv2
1111
- ;;
1112
- spur)
1113
- basic_machine=spur-unknown
1114
- ;;
1115
- st2000)
1116
- basic_machine=m68k-tandem
1117
- ;;
1118
- stratus)
1119
- basic_machine=i860-stratus
1120
- os=-sysv4
1121
- ;;
1122
- strongarm-* | thumb-*)
1123
- basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1124
- ;;
1125
- sun2)
1126
- basic_machine=m68000-sun
1127
- ;;
1128
- sun2os3)
1129
- basic_machine=m68000-sun
1130
- os=-sunos3
1131
- ;;
1132
- sun2os4)
1133
- basic_machine=m68000-sun
1134
- os=-sunos4
1135
- ;;
1136
- sun3os3)
1137
- basic_machine=m68k-sun
1138
- os=-sunos3
1139
- ;;
1140
- sun3os4)
1141
- basic_machine=m68k-sun
1142
- os=-sunos4
1143
- ;;
1144
- sun4os3)
1145
- basic_machine=sparc-sun
1146
- os=-sunos3
1147
- ;;
1148
- sun4os4)
1149
- basic_machine=sparc-sun
1150
- os=-sunos4
1151
- ;;
1152
- sun4sol2)
1153
- basic_machine=sparc-sun
1154
- os=-solaris2
1155
- ;;
1156
- sun3 | sun3-*)
1157
- basic_machine=m68k-sun
1158
- ;;
1159
- sun4)
1160
- basic_machine=sparc-sun
1161
- ;;
1162
- sun386 | sun386i | roadrunner)
1163
- basic_machine=i386-sun
1164
- ;;
1165
- sv1)
1166
- basic_machine=sv1-cray
1167
- os=-unicos
1168
- ;;
1169
- symmetry)
1170
- basic_machine=i386-sequent
1171
- os=-dynix
1172
- ;;
1173
- t3e)
1174
- basic_machine=alphaev5-cray
1175
- os=-unicos
1176
- ;;
1177
- t90)
1178
- basic_machine=t90-cray
1179
- os=-unicos
1180
- ;;
1181
- tile*)
1182
- basic_machine=$basic_machine-unknown
1183
- os=-linux-gnu
1184
- ;;
1185
- tx39)
1186
- basic_machine=mipstx39-unknown
1187
- ;;
1188
- tx39el)
1189
- basic_machine=mipstx39el-unknown
1190
- ;;
1191
- toad1)
1192
- basic_machine=pdp10-xkl
1193
- os=-tops20
1194
- ;;
1195
- tower | tower-32)
1196
- basic_machine=m68k-ncr
1197
- ;;
1198
- tpf)
1199
- basic_machine=s390x-ibm
1200
- os=-tpf
1201
- ;;
1202
- udi29k)
1203
- basic_machine=a29k-amd
1204
- os=-udi
1205
- ;;
1206
- ultra3)
1207
- basic_machine=a29k-nyu
1208
- os=-sym1
1209
- ;;
1210
- v810 | necv810)
1211
- basic_machine=v810-nec
1212
- os=-none
1213
- ;;
1214
- vaxv)
1215
- basic_machine=vax-dec
1216
- os=-sysv
1217
- ;;
1218
- vms)
1219
- basic_machine=vax-dec
1220
- os=-vms
1221
- ;;
1222
- vpp*|vx|vx-*)
1223
- basic_machine=f301-fujitsu
1224
- ;;
1225
- vxworks960)
1226
- basic_machine=i960-wrs
1227
- os=-vxworks
1228
- ;;
1229
- vxworks68)
1230
- basic_machine=m68k-wrs
1231
- os=-vxworks
1232
- ;;
1233
- vxworks29k)
1234
- basic_machine=a29k-wrs
1235
- os=-vxworks
1236
- ;;
1237
- w65*)
1238
- basic_machine=w65-wdc
1239
- os=-none
1240
- ;;
1241
- w89k-*)
1242
- basic_machine=hppa1.1-winbond
1243
- os=-proelf
1244
- ;;
1245
- x64)
1246
- basic_machine=x86_64-pc
1247
- ;;
1248
- xbox)
1249
- basic_machine=i686-pc
1250
- os=-mingw32
1251
- ;;
1252
- xps | xps100)
1253
- basic_machine=xps100-honeywell
1254
- ;;
1255
- xscale-* | xscalee[bl]-*)
1256
- basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
1257
- ;;
1258
- ymp)
1259
- basic_machine=ymp-cray
1260
- os=-unicos
1261
- ;;
1262
- none)
1263
- basic_machine=none-none
1264
- os=-none
1265
- ;;
1266
-
1267
-# Here we handle the default manufacturer of certain CPU types. It is in
1268
-# some cases the only manufacturer, in others, it is the most popular.
1269
- w89k)
1270
- basic_machine=hppa1.1-winbond
1271
- ;;
1272
- op50n)
1273
- basic_machine=hppa1.1-oki
1274
- ;;
1275
- op60c)
1276
- basic_machine=hppa1.1-oki
1277
- ;;
1278
- romp)
1279
- basic_machine=romp-ibm
1280
- ;;
1281
- mmix)
1282
- basic_machine=mmix-knuth
1283
- ;;
1284
- rs6000)
1285
- basic_machine=rs6000-ibm
1286
- ;;
1287
- vax)
1288
- basic_machine=vax-dec
1289
- ;;
1290
- pdp11)
1291
- basic_machine=pdp11-dec
1292
- ;;
1293
- we32k)
1294
- basic_machine=we32k-att
1295
- ;;
1296
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1297
- basic_machine=sh-unknown
1298
- ;;
1299
- cydra)
1300
- basic_machine=cydra-cydrome
1301
- ;;
1302
- orion)
1303
- basic_machine=orion-highlevel
1304
- ;;
1305
- orion105)
1306
- basic_machine=clipper-highlevel
1307
- ;;
1308
- mac | mpw | mac-mpw)
1309
- basic_machine=m68k-apple
1310
- ;;
1311
- pmac | pmac-mpw)
1312
- basic_machine=powerpc-apple
1313
- ;;
1314
- *-unknown)
1315
- # Make sure to match an already-canonicalized machine name.
1316
- ;;
1317
- *)
1318
- echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
1319
- exit 1
1153
+ cpu=nsx
1154
+ vendor=tandem
1155
+ ;;
1156
+ mipsallegrexel-sony)
1157
+ cpu=mipsallegrexel
1158
+ vendor=sony
1159
+ ;;
1160
+ tile*-*)
1161
+ basic_os=${basic_os:-linux-gnu}
1162
+ ;;
1163
+
1164
+ *)
1165
+ # Recognize the canonical CPU types that are allowed with any
1166
+ # company name.
1167
+ case $cpu in
1168
+ 1750a | 580 \
1169
+ | a29k \
1170
+ | aarch64 | aarch64_be \
1171
+ | abacus \
1172
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
1173
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
1174
+ | alphapca5[67] | alpha64pca5[67] \
1175
+ | am33_2.0 \
1176
+ | amdgcn \
1177
+ | arc | arceb | arc32 | arc64 \
1178
+ | arm | arm[lb]e | arme[lb] | armv* \
1179
+ | avr | avr32 \
1180
+ | asmjs \
1181
+ | ba \
1182
+ | be32 | be64 \
1183
+ | bfin | bpf | bs2000 \
1184
+ | c[123]* | c30 | [cjt]90 | c4x \
1185
+ | c8051 | clipper | craynv | csky | cydra \
1186
+ | d10v | d30v | dlx | dsp16xx \
1187
+ | e2k | elxsi | epiphany \
1188
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
1189
+ | h8300 | h8500 \
1190
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
1191
+ | hexagon \
1192
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
1193
+ | ip2k | iq2000 \
1194
+ | k1om \
1195
+ | le32 | le64 \
1196
+ | lm32 \
1197
+ | loongarch32 | loongarch64 | loongarchx32 \
1198
+ | m32c | m32r | m32rle \
1199
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
1200
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
1201
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
1202
+ | microblaze | microblazeel \
1203
+ | mips | mipsbe | mipseb | mipsel | mipsle \
1204
+ | mips16 \
1205
+ | mips64 | mips64eb | mips64el \
1206
+ | mips64octeon | mips64octeonel \
1207
+ | mips64orion | mips64orionel \
1208
+ | mips64r5900 | mips64r5900el \
1209
+ | mips64vr | mips64vrel \
1210
+ | mips64vr4100 | mips64vr4100el \
1211
+ | mips64vr4300 | mips64vr4300el \
1212
+ | mips64vr5000 | mips64vr5000el \
1213
+ | mips64vr5900 | mips64vr5900el \
1214
+ | mipsisa32 | mipsisa32el \
1215
+ | mipsisa32r2 | mipsisa32r2el \
1216
+ | mipsisa32r3 | mipsisa32r3el \
1217
+ | mipsisa32r5 | mipsisa32r5el \
1218
+ | mipsisa32r6 | mipsisa32r6el \
1219
+ | mipsisa64 | mipsisa64el \
1220
+ | mipsisa64r2 | mipsisa64r2el \
1221
+ | mipsisa64r3 | mipsisa64r3el \
1222
+ | mipsisa64r5 | mipsisa64r5el \
1223
+ | mipsisa64r6 | mipsisa64r6el \
1224
+ | mipsisa64sb1 | mipsisa64sb1el \
1225
+ | mipsisa64sr71k | mipsisa64sr71kel \
1226
+ | mipsr5900 | mipsr5900el \
1227
+ | mipstx39 | mipstx39el \
1228
+ | mmix \
1229
+ | mn10200 | mn10300 \
1230
+ | moxie \
1231
+ | mt \
1232
+ | msp430 \
1233
+ | nds32 | nds32le | nds32be \
1234
+ | nfp \
1235
+ | nios | nios2 | nios2eb | nios2el \
1236
+ | none | np1 | ns16k | ns32k | nvptx \
1237
+ | open8 \
1238
+ | or1k* \
1239
+ | or32 \
1240
+ | orion \
1241
+ | picochip \
1242
+ | pdp10 | pdp11 | pj | pjl | pn | power \
1243
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
1244
+ | pru \
1245
+ | pyramid \
1246
+ | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
1247
+ | rl78 | romp | rs6000 | rx \
1248
+ | s390 | s390x \
1249
+ | score \
1250
+ | sh | shl \
1251
+ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
1252
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
1253
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
1254
+ | sparclite \
1255
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
1256
+ | spu \
1257
+ | tahoe \
1258
+ | thumbv7* \
1259
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
1260
+ | tron \
1261
+ | ubicom32 \
1262
+ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
1263
+ | vax \
1264
+ | visium \
1265
+ | w65 \
1266
+ | wasm32 | wasm64 \
1267
+ | we32k \
1268
+ | x86 | x86_64 | xc16x | xgate | xps100 \
1269
+ | xstormy16 | xtensa* \
1270
+ | ymp \
1271
+ | z8k | z80)
1272
+ ;;
1273
+
1274
+ *)
1275
+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
1276
+ exit 1
1277
+ ;;
1278
+ esac
13201279
;;
13211280
esac
13221281
13231282
# Here we canonicalize certain aliases for manufacturers.
1324
-case $basic_machine in
1325
- *-digital*)
1326
- basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
1283
+case $vendor in
1284
+ digital*)
1285
+ vendor=dec
13271286
;;
1328
- *-commodore*)
1329
- basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
1287
+ commodore*)
1288
+ vendor=cbm
13301289
;;
13311290
*)
13321291
;;
13331292
esac
13341293
13351294
# Decode manufacturer-specific aliases for certain operating systems.
13361295
1337
-if [ x"$os" != x"" ]
1296
+if test x$basic_os != x
13381297
then
1298
+
1299
+# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
1300
+# set os.
1301
+case $basic_os in
1302
+ gnu/linux*)
1303
+ kernel=linux
1304
+ os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
1305
+ ;;
1306
+ os2-emx)
1307
+ kernel=os2
1308
+ os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
1309
+ ;;
1310
+ nto-qnx*)
1311
+ kernel=nto
1312
+ os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
1313
+ ;;
1314
+ *-*)
1315
+ # shellcheck disable=SC2162
1316
+ IFS="-" read kernel os <<EOF
1317
+$basic_os
1318
+EOF
1319
+ ;;
1320
+ # Default OS when just kernel was specified
1321
+ nto*)
1322
+ kernel=nto
1323
+ os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
1324
+ ;;
1325
+ linux*)
1326
+ kernel=linux
1327
+ os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
1328
+ ;;
1329
+ *)
1330
+ kernel=
1331
+ os=$basic_os
1332
+ ;;
1333
+esac
1334
+
1335
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
1336
+# etc.)
13391337
case $os in
13401338
# First match some system type aliases that might get confused
13411339
# with valid system types.
1342
- # -solaris* is a basic system type, with this one exception.
1343
- -auroraux)
1344
- os=-auroraux
1345
- ;;
1346
- -solaris1 | -solaris1.*)
1347
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
1348
- ;;
1349
- -solaris)
1350
- os=-solaris2
1351
- ;;
1352
- -unixware*)
1353
- os=-sysv4.2uw
1354
- ;;
1355
- -gnu/linux*)
1356
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1340
+ # solaris* is a basic system type, with this one exception.
1341
+ auroraux)
1342
+ os=auroraux
1343
+ ;;
1344
+ bluegene*)
1345
+ os=cnk
1346
+ ;;
1347
+ solaris1 | solaris1.*)
1348
+ os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
1349
+ ;;
1350
+ solaris)
1351
+ os=solaris2
1352
+ ;;
1353
+ unixware*)
1354
+ os=sysv4.2uw
13571355
;;
13581356
# es1800 is here to avoid being matched by es* (a different OS)
1359
- -es1800*)
1360
- os=-ose
1361
- ;;
1362
- # Now accept the basic system types.
1363
- # The portable systems comes first.
1364
- # Each alternative MUST end in a * to match a version number.
1365
- # -sysv* is not here because it comes later, after sysvr4.
1366
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1367
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1368
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1369
- | -sym* | -kopensolaris* | -plan9* \
1370
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1371
- | -aos* | -aros* | -cloudabi* | -sortix* \
1372
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1373
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1374
- | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
1375
- | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
1376
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1377
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1378
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1379
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \
1380
- | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
1381
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1382
- | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1383
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1384
- | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1385
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
1386
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1387
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1388
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1389
- | -morphos* | -superux* | -rtmk* | -windiss* \
1390
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1391
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
1392
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
1393
- | -midnightbsd*)
1394
- # Remember, each alternative MUST END IN *, to match a version number.
1395
- ;;
1396
- -qnx*)
1397
- case $basic_machine in
1398
- x86-* | i*86-*)
1399
- ;;
1400
- *)
1401
- os=-nto$os
1402
- ;;
1403
- esac
1404
- ;;
1405
- -nto-qnx*)
1406
- ;;
1407
- -nto*)
1408
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
1409
- ;;
1410
- -sim | -xray | -os68k* | -v88r* \
1411
- | -windows* | -osx | -abug | -netware* | -os9* \
1412
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1413
- ;;
1414
- -mac*)
1357
+ es1800*)
1358
+ os=ose
1359
+ ;;
1360
+ # Some version numbers need modification
1361
+ chorusos*)
1362
+ os=chorusos
1363
+ ;;
1364
+ isc)
1365
+ os=isc2.2
1366
+ ;;
1367
+ sco6)
1368
+ os=sco5v6
1369
+ ;;
1370
+ sco5)
1371
+ os=sco3.2v5
1372
+ ;;
1373
+ sco4)
1374
+ os=sco3.2v4
1375
+ ;;
1376
+ sco3.2.[4-9]*)
1377
+ os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
1378
+ ;;
1379
+ sco*v* | scout)
1380
+ # Don't match below
1381
+ ;;
1382
+ sco*)
1383
+ os=sco3.2v2
1384
+ ;;
1385
+ psos*)
1386
+ os=psos
1387
+ ;;
1388
+ qnx*)
1389
+ os=qnx
1390
+ ;;
1391
+ hiux*)
1392
+ os=hiuxwe2
1393
+ ;;
1394
+ lynx*178)
1395
+ os=lynxos178
1396
+ ;;
1397
+ lynx*5)
1398
+ os=lynxos5
1399
+ ;;
1400
+ lynxos*)
1401
+ # don't get caught up in next wildcard
1402
+ ;;
1403
+ lynx*)
1404
+ os=lynxos
1405
+ ;;
1406
+ mac[0-9]*)
14151407
os=`echo "$os" | sed -e 's|mac|macos|'`
14161408
;;
1417
- -linux-dietlibc)
1418
- os=-linux-dietlibc
1409
+ opened*)
1410
+ os=openedition
14191411
;;
1420
- -linux*)
1421
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
1412
+ os400*)
1413
+ os=os400
14221414
;;
1423
- -sunos5*)
1415
+ sunos5*)
14241416
</