Package list teckit / 230de30
Update upstream source from tag 'upstream/2.5.9+ds1' Update to upstream version '2.5.9+ds1' with Debian dir d95950754293ecb440752f6fac1e69b62fb31aa1 Norbert Preining 2 years ago
39 changed file(s) with 1382 addition(s) and 809 deletion(s). Raw diff Collapse all Expand all
0 (Not here. See the Subversion logs.)
0 See the commit history from git.
0 # Makefile.in generated by automake 1.15 from Makefile.am.
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
635635 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
636636 || chmod -R a+r "$(distdir)"
637637 dist-gzip: distdir
638 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
638 tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
639639 $(am__post_remove_distdir)
640640
641641 dist-bzip2: distdir
661661 @echo WARNING: "Support for shar distribution archives is" \
662662 "deprecated." >&2
663663 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
664 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
664 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
665665 $(am__post_remove_distdir)
666666
667667 dist-zip: distdir
679679 distcheck: dist
680680 case '$(DIST_ARCHIVES)' in \
681681 *.tar.gz*) \
682 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
682 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
683683 *.tar.bz2*) \
684684 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
685685 *.tar.lz*) \
689689 *.tar.Z*) \
690690 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
691691 *.shar.gz*) \
692 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
692 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
693693 *.zip*) \
694694 unzip $(distdir).zip ;;\
695695 esac
0 2019-03-18
1 Version 2.5.9
2 Updated Unicode character names and normalization data to 12.0.0
3 Various improvements for testing, compiling, and documentation.
4
05 2018-06-18
16 Version 2.5.8
27 Updated Unicode character names and normalization data to 11.0.0
66 See the Documentation folder for information on the TECkit mapping language
77 and conversion tool usage notes.
88
9 The TECkit libraries have been updated to support the Unicode 11.0.0 character
9 The TECkit libraries have been updated to support the Unicode 12.0.0 character
1010 repertoire.
1111
1212 Starting with TECkit version 2.5.7 there are several changes with the Windows
312312 long fileSize = ftell(mapFile);
313313 fseek(mapFile, 0, SEEK_SET);
314314
315 unsigned char* buf = (unsigned char*)malloc(fileSize);
315 unsigned char* buf = static_cast<unsigned char*>(malloc(fileSize));
316316 if (buf == 0) {
317317 fprintf(stderr, "unable to read mapping file for %s (file %s)\n", mappingName.c_str(), mapFileName.c_str());
318318 exit(1);
356356 size_t len = fread(buf, 1, sizeof(buf), ctlFile);
357357 done = len < sizeof(buf);
358358 if (!XML_Parse(parser, buf, len, done)) {
359 fprintf(stderr, "XML parse error: %s at line %lu\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned long)XML_GetCurrentLineNumber(parser));
359 fprintf(stderr, "XML parse error: %s at line %lu\n", XML_ErrorString(XML_GetErrorCode(parser)), static_cast<unsigned long>(XML_GetCurrentLineNumber(parser)));
360360 status = 1;
361361 }
362362 } while (!status && !done);
453453 while (1) {
454454 UInt32 sourceUsed, destUsed, destUsed2;
455455 status = TECkit_ConvertBuffer(converter,
456 (Byte*)marker.data(),
456 reinterpret_cast<const Byte*>(marker.data()),
457457 marker.size() * 2,
458458 &sourceUsed,
459 (Byte*)cnvMarker.data(),
459 const_cast<Byte*>(reinterpret_cast<const Byte*>(cnvMarker.data())),
460460 cnvMarker.size(),
461461 &destUsed,
462462 true);
465465 continue;
466466 }
467467 status = TECkit_Flush(converter,
468 (Byte*)cnvMarker.data() + destUsed,
468 const_cast<Byte*>(reinterpret_cast<const Byte*>(cnvMarker.data()) + destUsed),
469469 cnvMarker.size() - destUsed,
470470 &destUsed2);
471471 if (status == kStatus_OutputBufferFull) {
490490 UInt32 sourceUsed, destUsed, destUsed2;
491491
492492 status = TECkit_ConvertBuffer(converter,
493 (Byte*)&inChar,
493 reinterpret_cast<const Byte*>(&inChar),
494494 2,
495495 &sourceUsed,
496496 &buf[0],
587587 map<string,string>::const_iterator i;
588588 switch (dataType) {
589589 case BODY_TEXT:
590 write_converted((Byte*)reader.text.data(), reader.text.length(), converterStack.back(), outFile);
590 write_converted(reinterpret_cast<const Byte*>(reader.text.data()), reader.text.length(), converterStack.back(), outFile);
591591 break;
592592
593593 case SFM:
597597 else
598598 converterStack.assign(1, converters[i->second]);
599599 reader.text.insert(reader.text.begin(), reader.escapeChar);
600 write_converted((Byte*)reader.text.data(), reader.text.length(), sfmConverter, outFile);
600 write_converted(reinterpret_cast<const Byte*>(reader.text.data()), reader.text.length(), sfmConverter, outFile);
601601 break;
602602
603603 case INLINE_MARKER:
607607 else
608608 converterStack.assign(1, converters[i->second]);
609609 reader.text.insert(reader.text.begin(), reader.escapeChar);
610 write_converted((Byte*)reader.text.data(), reader.text.length(), inlineConverter, outFile);
610 write_converted(reinterpret_cast<const Byte*>(reader.text.data()), reader.text.length(), inlineConverter, outFile);
611611 break;
612612
613613 case INLINE_START:
618618 converterStack.push_back(converters[i->second]);
619619 reader.text.insert(reader.text.begin(), reader.inlineEscapeChar);
620620 reader.text.insert(reader.text.end(), reader.startInline);
621 write_converted((Byte*)reader.text.data(), reader.text.length(), inlineConverter, outFile);
621 write_converted(reinterpret_cast<const Byte*>(reader.text.data()), reader.text.length(), inlineConverter, outFile);
622622 break;
623623
624624 case INLINE_END:
625625 reader.text.insert(reader.text.end(), reader.endInline);
626 write_converted((Byte*)reader.text.data(), reader.text.length(), inlineConverter, outFile);
626 write_converted(reinterpret_cast<const Byte*>(reader.text.data()), reader.text.length(), inlineConverter, outFile);
627627 converterStack.pop_back();
628628 break;
629629 }
680680 static string cnvMarker;
681681 switch (dataType) {
682682 case BODY_TEXT:
683 write_converted((Byte*)reader.text.data(), reader.text.length() * 2, converterStack.back(), outFile);
683 write_converted(reinterpret_cast<const Byte*>(reader.text.data()), reader.text.length() * 2, converterStack.back(), outFile);
684684 break;
685685
686686 case SFM:
691691 else
692692 converterStack.assign(1, converters[i->second]);
693693 reader.text.insert(reader.text.begin(), reader.escapeChar);
694 write_converted((Byte*)reader.text.data(), reader.text.length() * 2, sfmConverter, outFile);
694 write_converted(reinterpret_cast<const Byte*>(reader.text.data()), reader.text.length() * 2, sfmConverter, outFile);
695695 break;
696696
697697 case INLINE_MARKER:
702702 else
703703 converterStack.assign(1, converters[i->second]);
704704 reader.text.insert(reader.text.begin(), reader.inlineEscapeChar);
705 write_converted((Byte*)reader.text.data(), reader.text.length() * 2, inlineConverter, outFile);
705 write_converted(reinterpret_cast<const Byte*>(reader.text.data()), reader.text.length() * 2, inlineConverter, outFile);
706706 break;
707707
708708 case INLINE_START:
714714 converterStack.push_back(converters[i->second]);
715715 reader.text.insert(reader.text.begin(), reader.inlineEscapeChar);
716716 reader.text.insert(reader.text.end(), reader.startInline);
717 write_converted((Byte*)reader.text.data(), reader.text.length() * 2, inlineConverter, outFile);
717 write_converted(reinterpret_cast<const Byte*>(reader.text.data()), reader.text.length() * 2, inlineConverter, outFile);
718718 break;
719719
720720 case INLINE_END:
721721 reader.text.insert(reader.text.end(), reader.endInline);
722 write_converted((Byte*)reader.text.data(), reader.text.length() * 2, inlineConverter, outFile);
722 write_converted(reinterpret_cast<const Byte*>(reader.text.data()), reader.text.length() * 2, inlineConverter, outFile);
723723 converterStack.pop_back();
724724 break;
725725 }
88 #define INLINE_START 2
99 #define INLINE_END 3
1010 #define INLINE_MARKER 4
11 #define UNI_REPLACEMENT_CHAR (uint32_t)0x0000FFFD
12 #define UNI_MAX_BMP (uint32_t)0x0000FFFF
13 #define UNI_MAX_UTF16 (uint32_t)0x0010FFFF
11 #define UNI_REPLACEMENT_CHAR uint32_t(0x0000FFFD)
12 #define UNI_MAX_BMP uint32_t(0x0000FFFF)
13 #define UNI_MAX_UTF16 uint32_t(0x0010FFFF)
1414
1515 template<class C>
1616 class sfReader
0 #ifndef __ushort_chartraits_h__
1 #define __ushort_chartraits_h__
0 #pragma once
21
32 #include <iostream>
43 #include <string>
5150 {
5251 const char_type* __p = __s;
5352 while (*__p) ++__p;
54 return (__p - __s);
53 return static_cast<size_t>(__p - __s);
5554 }
5655
5756 static const char_type*
6463
6564 static char_type*
6665 move(char_type* __s1, const char_type* __s2, size_t __n)
67 { return (char_type*) memmove(__s1, __s2, __n * sizeof(char_type)); }
66 { return static_cast<char_type*>(memmove(__s1, __s2, __n * sizeof(char_type))); }
6867
6968 static char_type*
7069 copy(char_type* __s1, const char_type* __s2, size_t __n)
71 { return (char_type*) memcpy(__s1, __s2, __n * sizeof(char_type)); }
70 { return static_cast<char_type*>(memcpy(__s1, __s2, __n * sizeof(char_type))); }
7271
7372 static char_type*
7473 assign(char_type* __s, size_t __n, char_type __a)
9089 { return __c1 == __c2; }
9190
9291 static int_type
93 eof() { return static_cast<int_type>(-1); }
92 eof() { return int_type(-1); }
9493
9594 static int_type
9695 not_eof(const int_type& __c)
9796 { return eq_int_type(__c, eof()) ? int_type(0) : __c; }
9897 };
9998 }
100
101 #endif
0 # generated automatically by aclocal 1.15 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
0 # generated automatically by aclocal 1.15.1 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
33
44 # This file is free software; the Free Software Foundation
55 # gives unlimited permission to copy and/or distribute it,
1919 If you have problems, you may need to regenerate the build system entirely.
2020 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
2121
22 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
22 # Copyright (C) 2002-2017 Free Software Foundation, Inc.
2323 #
2424 # This file is free software; the Free Software Foundation
2525 # gives unlimited permission to copy and/or distribute it,
3434 [am__api_version='1.15'
3535 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3636 dnl require some minimum version. Point them to the right macro.
37 m4_if([$1], [1.15], [],
37 m4_if([$1], [1.15.1], [],
3838 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3939 ])
4040
5050 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5151 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5252 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.15])dnl
53 [AM_AUTOMAKE_VERSION([1.15.1])dnl
5454 m4_ifndef([AC_AUTOCONF_VERSION],
5555 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5656 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
5757
5858 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
5959
60 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
60 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
6161 #
6262 # This file is free software; the Free Software Foundation
6363 # gives unlimited permission to copy and/or distribute it,
109109
110110 # AM_CONDITIONAL -*- Autoconf -*-
111111
112 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
112 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
113113 #
114114 # This file is free software; the Free Software Foundation
115115 # gives unlimited permission to copy and/or distribute it,
140140 Usually this means the macro was only invoked conditionally.]])
141141 fi])])
142142
143 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
143 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
144144 #
145145 # This file is free software; the Free Software Foundation
146146 # gives unlimited permission to copy and/or distribute it,
331331
332332 # Generate code to set up dependency tracking. -*- Autoconf -*-
333333
334 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
334 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
335335 #
336336 # This file is free software; the Free Software Foundation
337337 # gives unlimited permission to copy and/or distribute it,
407407
408408 # Do all the work for Automake. -*- Autoconf -*-
409409
410 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
410 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
411411 #
412412 # This file is free software; the Free Software Foundation
413413 # gives unlimited permission to copy and/or distribute it,
604604 done
605605 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
606606
607 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
607 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
608608 #
609609 # This file is free software; the Free Software Foundation
610610 # gives unlimited permission to copy and/or distribute it,
625625 fi
626626 AC_SUBST([install_sh])])
627627
628 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
628 # Copyright (C) 2003-2017 Free Software Foundation, Inc.
629629 #
630630 # This file is free software; the Free Software Foundation
631631 # gives unlimited permission to copy and/or distribute it,
647647 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
648648 # From Jim Meyering
649649
650 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
650 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
651651 #
652652 # This file is free software; the Free Software Foundation
653653 # gives unlimited permission to copy and/or distribute it,
682682
683683 # Check to see how 'make' treats includes. -*- Autoconf -*-
684684
685 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
685 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
686686 #
687687 # This file is free software; the Free Software Foundation
688688 # gives unlimited permission to copy and/or distribute it,
732732
733733 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
734734
735 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
735 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
736736 #
737737 # This file is free software; the Free Software Foundation
738738 # gives unlimited permission to copy and/or distribute it,
773773 # Obsolete and "removed" macros, that must however still report explicit
774774 # error messages when used, to smooth transition.
775775 #
776 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
776 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
777777 #
778778 # This file is free software; the Free Software Foundation
779779 # gives unlimited permission to copy and/or distribute it,
800800
801801 # Helper functions for option handling. -*- Autoconf -*-
802802
803 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
803 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
804804 #
805805 # This file is free software; the Free Software Foundation
806806 # gives unlimited permission to copy and/or distribute it,
829829 AC_DEFUN([_AM_IF_OPTION],
830830 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
831831
832 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
832 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
833833 #
834834 # This file is free software; the Free Software Foundation
835835 # gives unlimited permission to copy and/or distribute it,
876876 # For backward compatibility.
877877 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
878878
879 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
879 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
880880 #
881881 # This file is free software; the Free Software Foundation
882882 # gives unlimited permission to copy and/or distribute it,
895895
896896 # Check to make sure that the build environment is sane. -*- Autoconf -*-
897897
898 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
898 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
899899 #
900900 # This file is free software; the Free Software Foundation
901901 # gives unlimited permission to copy and/or distribute it,
976976 rm -f conftest.file
977977 ])
978978
979 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
979 # Copyright (C) 2009-2017 Free Software Foundation, Inc.
980980 #
981981 # This file is free software; the Free Software Foundation
982982 # gives unlimited permission to copy and/or distribute it,
10361036 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10371037 ])
10381038
1039 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1039 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
10401040 #
10411041 # This file is free software; the Free Software Foundation
10421042 # gives unlimited permission to copy and/or distribute it,
10641064 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10651065 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10661066
1067 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
1067 # Copyright (C) 2006-2017 Free Software Foundation, Inc.
10681068 #
10691069 # This file is free software; the Free Software Foundation
10701070 # gives unlimited permission to copy and/or distribute it,
10831083
10841084 # Check how to create a tarball. -*- Autoconf -*-
10851085
1086 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
1086 # Copyright (C) 2004-2017 Free Software Foundation, Inc.
10871087 #
10881088 # This file is free software; the Free Software Foundation
10891089 # gives unlimited permission to copy and/or distribute it,
0 # Makefile.in generated by automake 1.15 from Makefile.am.
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
00 #! /bin/sh
11 # Attempt to guess a canonical system name.
2 # Copyright 1992-2015 Free Software Foundation, Inc.
3
4 timestamp='2015-08-20'
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-24'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
1414 # General Public License for more details.
1515 #
1616 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
1818 #
1919 # As a special exception to the GNU General Public License, if you
2020 # distribute this file as part of a program that contains a
2626 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
2727 #
2828 # You can get the latest version of this script from:
29 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
29 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
3030 #
3131 # Please send patches to <config-patches@gnu.org>.
3232
3838
3939 Output the configuration name of the system \`$me' is run on.
4040
41 Operation modes:
41 Options:
4242 -h, --help print this help, then exit
4343 -t, --time-stamp print date of last modification, then exit
4444 -v, --version print version number, then exit
4949 GNU config.guess ($timestamp)
5050
5151 Originally written by Per Bothner.
52 Copyright 1992-2015 Free Software Foundation, Inc.
52 Copyright 1992-2018 Free Software Foundation, Inc.
5353
5454 This is free software; see the source for copying conditions. There is NO
5555 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
106106 dummy=$tmp/dummy ;
107107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > $dummy.c ;
109 ,,) echo "int x;" > "$dummy.c" ;
110110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
111 if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
112112 CC_FOR_BUILD="$c"; break ;
113113 fi ;
114114 done ;
131131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
132132 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133133
134 case "${UNAME_SYSTEM}" in
134 case "$UNAME_SYSTEM" in
135135 Linux|GNU|GNU/*)
136136 # If the system lacks a compiler, then just pick glibc.
137137 # We could probably try harder.
138138 LIBC=gnu
139139
140 eval $set_cc_for_build
141 cat <<-EOF > $dummy.c
140 eval "$set_cc_for_build"
141 cat <<-EOF > "$dummy.c"
142142 #include <features.h>
143143 #if defined(__UCLIBC__)
144144 LIBC=uclibc
148148 LIBC=gnu
149149 #endif
150150 EOF
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
151 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
152
153 # If ldd exists, use it to detect musl libc.
154 if command -v ldd >/dev/null && \
155 ldd --version 2>&1 | grep -q ^musl
156 then
157 LIBC=musl
158 fi
152159 ;;
153160 esac
154161
155162 # Note: order is significant - the case branches are not exclusive.
156163
157 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
164 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
158165 *:NetBSD:*:*)
159166 # NetBSD (nbsd) targets should (where applicable) match one or
160167 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
168175 # portion of the name. We always set it to "unknown".
169176 sysctl="sysctl -n hw.machine_arch"
170177 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
171 /sbin/$sysctl 2>/dev/null || \
172 /usr/sbin/$sysctl 2>/dev/null || \
178 "/sbin/$sysctl" 2>/dev/null || \
179 "/usr/sbin/$sysctl" 2>/dev/null || \
173180 echo unknown)`
174 case "${UNAME_MACHINE_ARCH}" in
181 case "$UNAME_MACHINE_ARCH" in
175182 armeb) machine=armeb-unknown ;;
176183 arm*) machine=arm-unknown ;;
177184 sh3el) machine=shl-unknown ;;
178185 sh3eb) machine=sh-unknown ;;
179186 sh5el) machine=sh5le-unknown ;;
180187 earmv*)
181 arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
182 endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
183 machine=${arch}${endian}-unknown
188 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
189 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
190 machine="${arch}${endian}"-unknown
184191 ;;
185 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
192 *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
186193 esac
187194 # The Operating System including object format, if it has switched
188 # to ELF recently, or will in the future.
189 case "${UNAME_MACHINE_ARCH}" in
190 arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
191 eval $set_cc_for_build
195 # to ELF recently (or will in the future) and ABI.
196 case "$UNAME_MACHINE_ARCH" in
197 earm*)
198 os=netbsdelf
199 ;;
200 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
201 eval "$set_cc_for_build"
192202 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
193203 | grep -q __ELF__
194204 then
204214 ;;
205215 esac
206216 # Determine ABI tags.
207 case "${UNAME_MACHINE_ARCH}" in
217 case "$UNAME_MACHINE_ARCH" in
208218 earm*)
209219 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
210 abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
220 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
211221 ;;
212222 esac
213223 # The OS release
215225 # thus, need a distinct triplet. However, they do not need
216226 # kernel version information, so it can be replaced with a
217227 # suitable tag, in the style of linux-gnu.
218 case "${UNAME_VERSION}" in
228 case "$UNAME_VERSION" in
219229 Debian*)
220230 release='-gnu'
221231 ;;
222232 *)
223 release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
233 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
224234 ;;
225235 esac
226236 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
227237 # contains redundant information, the shorter form:
228238 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
229 echo "${machine}-${os}${release}${abi}"
239 echo "$machine-${os}${release}${abi}"
230240 exit ;;
231241 *:Bitrig:*:*)
232242 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
233 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
243 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
234244 exit ;;
235245 *:OpenBSD:*:*)
236246 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
237 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
247 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
248 exit ;;
249 *:LibertyBSD:*:*)
250 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
251 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
252 exit ;;
253 *:MidnightBSD:*:*)
254 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
238255 exit ;;
239256 *:ekkoBSD:*:*)
240 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
257 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
241258 exit ;;
242259 *:SolidBSD:*:*)
243 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
260 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
244261 exit ;;
245262 macppc:MirBSD:*:*)
246 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
263 echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
247264 exit ;;
248265 *:MirBSD:*:*)
249 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
266 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
250267 exit ;;
251268 *:Sortix:*:*)
252 echo ${UNAME_MACHINE}-unknown-sortix
253 exit ;;
269 echo "$UNAME_MACHINE"-unknown-sortix
270 exit ;;
271 *:Redox:*:*)
272 echo "$UNAME_MACHINE"-unknown-redox
273 exit ;;
274 mips:OSF1:*.*)
275 echo mips-dec-osf1
276 exit ;;
254277 alpha:OSF1:*:*)
255278 case $UNAME_RELEASE in
256279 *4.0)
267290 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
268291 case "$ALPHA_CPU_TYPE" in
269292 "EV4 (21064)")
270 UNAME_MACHINE="alpha" ;;
293 UNAME_MACHINE=alpha ;;
271294 "EV4.5 (21064)")
272 UNAME_MACHINE="alpha" ;;
295 UNAME_MACHINE=alpha ;;
273296 "LCA4 (21066/21068)")
274 UNAME_MACHINE="alpha" ;;
297 UNAME_MACHINE=alpha ;;
275298 "EV5 (21164)")
276 UNAME_MACHINE="alphaev5" ;;
299 UNAME_MACHINE=alphaev5 ;;
277300 "EV5.6 (21164A)")
278 UNAME_MACHINE="alphaev56" ;;
301 UNAME_MACHINE=alphaev56 ;;
279302 "EV5.6 (21164PC)")
280 UNAME_MACHINE="alphapca56" ;;
303 UNAME_MACHINE=alphapca56 ;;
281304 "EV5.7 (21164PC)")
282 UNAME_MACHINE="alphapca57" ;;
305 UNAME_MACHINE=alphapca57 ;;
283306 "EV6 (21264)")
284 UNAME_MACHINE="alphaev6" ;;
307 UNAME_MACHINE=alphaev6 ;;
285308 "EV6.7 (21264A)")
286 UNAME_MACHINE="alphaev67" ;;
309 UNAME_MACHINE=alphaev67 ;;
287310 "EV6.8CB (21264C)")
288 UNAME_MACHINE="alphaev68" ;;
311 UNAME_MACHINE=alphaev68 ;;
289312 "EV6.8AL (21264B)")
290 UNAME_MACHINE="alphaev68" ;;
313 UNAME_MACHINE=alphaev68 ;;
291314 "EV6.8CX (21264D)")
292 UNAME_MACHINE="alphaev68" ;;
315 UNAME_MACHINE=alphaev68 ;;
293316 "EV6.9A (21264/EV69A)")
294 UNAME_MACHINE="alphaev69" ;;
317 UNAME_MACHINE=alphaev69 ;;
295318 "EV7 (21364)")
296 UNAME_MACHINE="alphaev7" ;;
319 UNAME_MACHINE=alphaev7 ;;
297320 "EV7.9 (21364A)")
298 UNAME_MACHINE="alphaev79" ;;
321 UNAME_MACHINE=alphaev79 ;;
299322 esac
300323 # A Pn.n version is a patched version.
301324 # A Vn.n version is a released version.
302325 # A Tn.n version is a released field test version.
303326 # A Xn.n version is an unreleased experimental baselevel.
304327 # 1.2 uses "1.2" for uname -r.
305 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
328 echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
306329 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
307330 exitcode=$?
308331 trap '' 0
309332 exit $exitcode ;;
310 Alpha\ *:Windows_NT*:*)
311 # How do we know it's Interix rather than the generic POSIX subsystem?
312 # Should we change UNAME_MACHINE based on the output of uname instead
313 # of the specific Alpha model?
314 echo alpha-pc-interix
315 exit ;;
316 21064:Windows_NT:50:3)
317 echo alpha-dec-winnt3.5
318 exit ;;
319333 Amiga*:UNIX_System_V:4.0:*)
320334 echo m68k-unknown-sysv4
321335 exit ;;
322336 *:[Aa]miga[Oo][Ss]:*:*)
323 echo ${UNAME_MACHINE}-unknown-amigaos
337 echo "$UNAME_MACHINE"-unknown-amigaos
324338 exit ;;
325339 *:[Mm]orph[Oo][Ss]:*:*)
326 echo ${UNAME_MACHINE}-unknown-morphos
340 echo "$UNAME_MACHINE"-unknown-morphos
327341 exit ;;
328342 *:OS/390:*:*)
329343 echo i370-ibm-openedition
335349 echo powerpc-ibm-os400
336350 exit ;;
337351 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
338 echo arm-acorn-riscix${UNAME_RELEASE}
352 echo arm-acorn-riscix"$UNAME_RELEASE"
339353 exit ;;
340354 arm*:riscos:*:*|arm*:RISCOS:*:*)
341355 echo arm-unknown-riscos
362376 sparc) echo sparc-icl-nx7; exit ;;
363377 esac ;;
364378 s390x:SunOS:*:*)
365 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
379 echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
366380 exit ;;
367381 sun4H:SunOS:5.*:*)
368 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
382 echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
369383 exit ;;
370384 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
371 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
385 echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
372386 exit ;;
373387 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
374 echo i386-pc-auroraux${UNAME_RELEASE}
388 echo i386-pc-auroraux"$UNAME_RELEASE"
375389 exit ;;
376390 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
377 eval $set_cc_for_build
378 SUN_ARCH="i386"
391 eval "$set_cc_for_build"
392 SUN_ARCH=i386
379393 # If there is a compiler, see if it is configured for 64-bit objects.
380394 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
381395 # This test works for both compilers.
382 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
396 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
383397 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
384 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
398 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
385399 grep IS_64BIT_ARCH >/dev/null
386400 then
387 SUN_ARCH="x86_64"
401 SUN_ARCH=x86_64
388402 fi
389403 fi
390 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
404 echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
391405 exit ;;
392406 sun4*:SunOS:6*:*)
393407 # According to config.sub, this is the proper way to canonicalize
394408 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
395409 # it's likely to be more like Solaris than SunOS4.
396 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
410 echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
397411 exit ;;
398412 sun4*:SunOS:*:*)
399413 case "`/usr/bin/arch -k`" in
402416 ;;
403417 esac
404418 # Japanese Language versions have a version number like `4.1.3-JL'.
405 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
419 echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
406420 exit ;;
407421 sun3*:SunOS:*:*)
408 echo m68k-sun-sunos${UNAME_RELEASE}
422 echo m68k-sun-sunos"$UNAME_RELEASE"
409423 exit ;;
410424 sun*:*:4.2BSD:*)
411425 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
412 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
426 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
413427 case "`/bin/arch`" in
414428 sun3)
415 echo m68k-sun-sunos${UNAME_RELEASE}
429 echo m68k-sun-sunos"$UNAME_RELEASE"
416430 ;;
417431 sun4)
418 echo sparc-sun-sunos${UNAME_RELEASE}
432 echo sparc-sun-sunos"$UNAME_RELEASE"
419433 ;;
420434 esac
421435 exit ;;
422436 aushp:SunOS:*:*)
423 echo sparc-auspex-sunos${UNAME_RELEASE}
437 echo sparc-auspex-sunos"$UNAME_RELEASE"
424438 exit ;;
425439 # The situation for MiNT is a little confusing. The machine name
426440 # can be virtually everything (everything which is not
431445 # MiNT. But MiNT is downward compatible to TOS, so this should
432446 # be no problem.
433447 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
434 echo m68k-atari-mint${UNAME_RELEASE}
448 echo m68k-atari-mint"$UNAME_RELEASE"
435449 exit ;;
436450 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
437 echo m68k-atari-mint${UNAME_RELEASE}
451 echo m68k-atari-mint"$UNAME_RELEASE"
438452 exit ;;
439453 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
440 echo m68k-atari-mint${UNAME_RELEASE}
454 echo m68k-atari-mint"$UNAME_RELEASE"
441455 exit ;;
442456 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
443 echo m68k-milan-mint${UNAME_RELEASE}
457 echo m68k-milan-mint"$UNAME_RELEASE"
444458 exit ;;
445459 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
446 echo m68k-hades-mint${UNAME_RELEASE}
460 echo m68k-hades-mint"$UNAME_RELEASE"
447461 exit ;;
448462 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
449 echo m68k-unknown-mint${UNAME_RELEASE}
463 echo m68k-unknown-mint"$UNAME_RELEASE"
450464 exit ;;
451465 m68k:machten:*:*)
452 echo m68k-apple-machten${UNAME_RELEASE}
466 echo m68k-apple-machten"$UNAME_RELEASE"
453467 exit ;;
454468 powerpc:machten:*:*)
455 echo powerpc-apple-machten${UNAME_RELEASE}
469 echo powerpc-apple-machten"$UNAME_RELEASE"
456470 exit ;;
457471 RISC*:Mach:*:*)
458472 echo mips-dec-mach_bsd4.3
459473 exit ;;
460474 RISC*:ULTRIX:*:*)
461 echo mips-dec-ultrix${UNAME_RELEASE}
475 echo mips-dec-ultrix"$UNAME_RELEASE"
462476 exit ;;
463477 VAX*:ULTRIX*:*:*)
464 echo vax-dec-ultrix${UNAME_RELEASE}
478 echo vax-dec-ultrix"$UNAME_RELEASE"
465479 exit ;;
466480 2020:CLIX:*:* | 2430:CLIX:*:*)
467 echo clipper-intergraph-clix${UNAME_RELEASE}
481 echo clipper-intergraph-clix"$UNAME_RELEASE"
468482 exit ;;
469483 mips:*:*:UMIPS | mips:*:*:RISCos)
470 eval $set_cc_for_build
471 sed 's/^ //' << EOF >$dummy.c
484 eval "$set_cc_for_build"
485 sed 's/^ //' << EOF > "$dummy.c"
472486 #ifdef __cplusplus
473487 #include <stdio.h> /* for printf() prototype */
474488 int main (int argc, char *argv[]) {
477491 #endif
478492 #if defined (host_mips) && defined (MIPSEB)
479493 #if defined (SYSTYPE_SYSV)
480 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
494 printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
481495 #endif
482496 #if defined (SYSTYPE_SVR4)
483 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
497 printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
484498 #endif
485499 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
486 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
500 printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
487501 #endif
488502 #endif
489503 exit (-1);
490504 }
491505 EOF
492 $CC_FOR_BUILD -o $dummy $dummy.c &&
493 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
494 SYSTEM_NAME=`$dummy $dummyarg` &&
506 $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
507 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
508 SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
495509 { echo "$SYSTEM_NAME"; exit; }
496 echo mips-mips-riscos${UNAME_RELEASE}
510 echo mips-mips-riscos"$UNAME_RELEASE"
497511 exit ;;
498512 Motorola:PowerMAX_OS:*:*)
499513 echo powerpc-motorola-powermax
519533 AViiON:dgux:*:*)
520534 # DG/UX returns AViiON for all architectures
521535 UNAME_PROCESSOR=`/usr/bin/uname -p`
522 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
536 if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
523537 then
524 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
525 [ ${TARGET_BINARY_INTERFACE}x = x ]
538 if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
539 [ "$TARGET_BINARY_INTERFACE"x = x ]
526540 then
527 echo m88k-dg-dgux${UNAME_RELEASE}
541 echo m88k-dg-dgux"$UNAME_RELEASE"
528542 else
529 echo m88k-dg-dguxbcs${UNAME_RELEASE}
543 echo m88k-dg-dguxbcs"$UNAME_RELEASE"
530544 fi
531545 else
532 echo i586-dg-dgux${UNAME_RELEASE}
546 echo i586-dg-dgux"$UNAME_RELEASE"
533547 fi
534548 exit ;;
535549 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
546560 echo m68k-tektronix-bsd
547561 exit ;;
548562 *:IRIX*:*:*)
549 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
563 echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
550564 exit ;;
551565 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
552566 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
558572 if [ -x /usr/bin/oslevel ] ; then
559573 IBM_REV=`/usr/bin/oslevel`
560574 else
561 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
562 fi
563 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
575 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
576 fi
577 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
564578 exit ;;
565579 *:AIX:2:3)
566580 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
567 eval $set_cc_for_build
568 sed 's/^ //' << EOF >$dummy.c
581 eval "$set_cc_for_build"
582 sed 's/^ //' << EOF > "$dummy.c"
569583 #include <sys/systemcfg.h>
570584
571585 main()
576590 exit(0);
577591 }
578592 EOF
579 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
593 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
580594 then
581595 echo "$SYSTEM_NAME"
582596 else
590604 exit ;;
591605 *:AIX:*:[4567])
592606 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
593 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
607 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
594608 IBM_ARCH=rs6000
595609 else
596610 IBM_ARCH=powerpc
599613 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
600614 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
601615 else
602 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
603 fi
604 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
616 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
617 fi
618 echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
605619 exit ;;
606620 *:AIX:*:*)
607621 echo rs6000-ibm-aix
608622 exit ;;
609 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
623 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
610624 echo romp-ibm-bsd4.4
611625 exit ;;
612626 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
613 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
627 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
614628 exit ;; # report: romp-ibm BSD 4.3
615629 *:BOSX:*:*)
616630 echo rs6000-bull-bosx
625639 echo m68k-hp-bsd4.4
626640 exit ;;
627641 9000/[34678]??:HP-UX:*:*)
628 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
629 case "${UNAME_MACHINE}" in
630 9000/31? ) HP_ARCH=m68000 ;;
631 9000/[34]?? ) HP_ARCH=m68k ;;
642 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
643 case "$UNAME_MACHINE" in
644 9000/31?) HP_ARCH=m68000 ;;
645 9000/[34]??) HP_ARCH=m68k ;;
632646 9000/[678][0-9][0-9])
633647 if [ -x /usr/bin/getconf ]; then
634648 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
635649 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
636 case "${sc_cpu_version}" in
637 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
638 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
650 case "$sc_cpu_version" in
651 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
652 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
639653 532) # CPU_PA_RISC2_0
640 case "${sc_kernel_bits}" in
641 32) HP_ARCH="hppa2.0n" ;;
642 64) HP_ARCH="hppa2.0w" ;;
643 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
654 case "$sc_kernel_bits" in
655 32) HP_ARCH=hppa2.0n ;;
656 64) HP_ARCH=hppa2.0w ;;
657 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
644658 esac ;;
645659 esac
646660 fi
647 if [ "${HP_ARCH}" = "" ]; then
648 eval $set_cc_for_build
649 sed 's/^ //' << EOF >$dummy.c
661 if [ "$HP_ARCH" = "" ]; then
662 eval "$set_cc_for_build"
663 sed 's/^ //' << EOF > "$dummy.c"
650664
651665 #define _HPUX_SOURCE
652666 #include <stdlib.h>
679693 exit (0);
680694 }
681695 EOF
682 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
696 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
683697 test -z "$HP_ARCH" && HP_ARCH=hppa
684698 fi ;;
685699 esac
686 if [ ${HP_ARCH} = "hppa2.0w" ]
700 if [ "$HP_ARCH" = hppa2.0w ]
687701 then
688 eval $set_cc_for_build
702 eval "$set_cc_for_build"
689703
690704 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
691705 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
696710 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
697711 # => hppa64-hp-hpux11.23
698712
699 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
713 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
700714 grep -q __LP64__
701715 then
702 HP_ARCH="hppa2.0w"
716 HP_ARCH=hppa2.0w
703717 else
704 HP_ARCH="hppa64"
718 HP_ARCH=hppa64
705719 fi
706720 fi
707 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
721 echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
708722 exit ;;
709723 ia64:HP-UX:*:*)
710 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
711 echo ia64-hp-hpux${HPUX_REV}
724 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
725 echo ia64-hp-hpux"$HPUX_REV"
712726 exit ;;
713727 3050*:HI-UX:*:*)
714 eval $set_cc_for_build
715 sed 's/^ //' << EOF >$dummy.c
728 eval "$set_cc_for_build"
729 sed 's/^ //' << EOF > "$dummy.c"
716730 #include <unistd.h>
717731 int
718732 main ()
737751 exit (0);
738752 }
739753 EOF
740 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
754 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
741755 { echo "$SYSTEM_NAME"; exit; }
742756 echo unknown-hitachi-hiuxwe2
743757 exit ;;
744 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
758 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
745759 echo hppa1.1-hp-bsd
746760 exit ;;
747761 9000/8??:4.3bsd:*:*)
750764 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
751765 echo hppa1.0-hp-mpeix
752766 exit ;;
753 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
767 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
754768 echo hppa1.1-hp-osf
755769 exit ;;
756770 hp8??:OSF1:*:*)
758772 exit ;;
759773 i*86:OSF1:*:*)
760774 if [ -x /usr/sbin/sysversion ] ; then
761 echo ${UNAME_MACHINE}-unknown-osf1mk
775 echo "$UNAME_MACHINE"-unknown-osf1mk
762776 else
763 echo ${UNAME_MACHINE}-unknown-osf1
777 echo "$UNAME_MACHINE"-unknown-osf1
764778 fi
765779 exit ;;
766780 parisc*:Lites*:*:*)
785799 echo c4-convex-bsd
786800 exit ;;
787801 CRAY*Y-MP:*:*:*)
788 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
802 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
789803 exit ;;
790804 CRAY*[A-Z]90:*:*:*)
791 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
805 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
792806 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
793807 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
794808 -e 's/\.[^.]*$/.X/'
795809 exit ;;
796810 CRAY*TS:*:*:*)
797 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
811 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
798812 exit ;;
799813 CRAY*T3E:*:*:*)
800 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
814 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
801815 exit ;;
802816 CRAY*SV1:*:*:*)
803 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
817 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
804818 exit ;;
805819 *:UNICOS/mp:*:*)
806 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
820 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
807821 exit ;;
808822 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
809 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
810 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
811 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
823 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
824 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
825 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
812826 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
813827 exit ;;
814828 5000:UNIX_System_V:4.*:*)
815 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
816 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
829 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
830 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
817831 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
818832 exit ;;
819833 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
820 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
834 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
821835 exit ;;
822836 sparc*:BSD/OS:*:*)
823 echo sparc-unknown-bsdi${UNAME_RELEASE}
837 echo sparc-unknown-bsdi"$UNAME_RELEASE"
824838 exit ;;
825839 *:BSD/OS:*:*)
826 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
840 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
827841 exit ;;
828842 *:FreeBSD:*:*)
829843 UNAME_PROCESSOR=`/usr/bin/uname -p`
830 case ${UNAME_PROCESSOR} in
844 case "$UNAME_PROCESSOR" in
831845 amd64)
832 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
833 *)
834 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
846 UNAME_PROCESSOR=x86_64 ;;
847 i386)
848 UNAME_PROCESSOR=i586 ;;
835849 esac
850 echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
836851 exit ;;
837852 i*:CYGWIN*:*)
838 echo ${UNAME_MACHINE}-pc-cygwin
853 echo "$UNAME_MACHINE"-pc-cygwin
839854 exit ;;
840855 *:MINGW64*:*)
841 echo ${UNAME_MACHINE}-pc-mingw64
856 echo "$UNAME_MACHINE"-pc-mingw64
842857 exit ;;
843858 *:MINGW*:*)
844 echo ${UNAME_MACHINE}-pc-mingw32
859 echo "$UNAME_MACHINE"-pc-mingw32
845860 exit ;;
846861 *:MSYS*:*)
847 echo ${UNAME_MACHINE}-pc-msys
848 exit ;;
849 i*:windows32*:*)
850 # uname -m includes "-pc" on this system.
851 echo ${UNAME_MACHINE}-mingw32
862 echo "$UNAME_MACHINE"-pc-msys
852863 exit ;;
853864 i*:PW*:*)
854 echo ${UNAME_MACHINE}-pc-pw32
865 echo "$UNAME_MACHINE"-pc-pw32
855866 exit ;;
856867 *:Interix*:*)
857 case ${UNAME_MACHINE} in
868 case "$UNAME_MACHINE" in
858869 x86)
859 echo i586-pc-interix${UNAME_RELEASE}
870 echo i586-pc-interix"$UNAME_RELEASE"
860871 exit ;;
861872 authenticamd | genuineintel | EM64T)
862 echo x86_64-unknown-interix${UNAME_RELEASE}
873 echo x86_64-unknown-interix"$UNAME_RELEASE"
863874 exit ;;
864875 IA64)
865 echo ia64-unknown-interix${UNAME_RELEASE}
876 echo ia64-unknown-interix"$UNAME_RELEASE"
866877 exit ;;
867878 esac ;;
868 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
869 echo i${UNAME_MACHINE}-pc-mks
870 exit ;;
871 8664:Windows_NT:*)
872 echo x86_64-pc-mks
873 exit ;;
874 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
875 # How do we know it's Interix rather than the generic POSIX subsystem?
876 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
877 # UNAME_MACHINE based on the output of uname instead of i386?
878 echo i586-pc-interix
879 exit ;;
880879 i*:UWIN*:*)
881 echo ${UNAME_MACHINE}-pc-uwin
880 echo "$UNAME_MACHINE"-pc-uwin
882881 exit ;;
883882 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
884883 echo x86_64-unknown-cygwin
885884 exit ;;
886 p*:CYGWIN*:*)
887 echo powerpcle-unknown-cygwin
888 exit ;;
889885 prep*:SunOS:5.*:*)
890 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
886 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
891887 exit ;;
892888 *:GNU:*:*)
893889 # the GNU system
894 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
890 echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
895891 exit ;;
896892 *:GNU/*:*:*)
897893 # other systems with GNU libc and userland
898 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
894 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
899895 exit ;;
900896 i*86:Minix:*:*)
901 echo ${UNAME_MACHINE}-pc-minix
897 echo "$UNAME_MACHINE"-pc-minix
902898 exit ;;
903899 aarch64:Linux:*:*)
904 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
900 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
905901 exit ;;
906902 aarch64_be:Linux:*:*)
907903 UNAME_MACHINE=aarch64_be
908 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
904 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
909905 exit ;;
910906 alpha:Linux:*:*)
911907 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
918914 EV68*) UNAME_MACHINE=alphaev68 ;;
919915 esac
920916 objdump --private-headers /bin/sh | grep -q ld.so.1
921 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
922 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
917 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
918 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
923919 exit ;;
924920 arc:Linux:*:* | arceb:Linux:*:*)
925 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
921 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
926922 exit ;;
927923 arm*:Linux:*:*)
928 eval $set_cc_for_build
924 eval "$set_cc_for_build"
929925 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
930926 | grep -q __ARM_EABI__
931927 then
932 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
928 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
933929 else
934930 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
935931 | grep -q __ARM_PCS_VFP
936932 then
937 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
933 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
938934 else
939 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
935 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
940936 fi
941937 fi
942938 exit ;;
943939 avr32*:Linux:*:*)
944 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
940 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
945941 exit ;;
946942 cris:Linux:*:*)
947 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
943 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
948944 exit ;;
949945 crisv32:Linux:*:*)
950 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
946 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
951947 exit ;;
952948 e2k:Linux:*:*)
953 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
949 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
954950 exit ;;
955951 frv:Linux:*:*)
956 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
952 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
957953 exit ;;
958954 hexagon:Linux:*:*)
959 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
955 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
960956 exit ;;
961957 i*86:Linux:*:*)
962 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
958 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
963959 exit ;;
964960 ia64:Linux:*:*)
965 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
961 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
962 exit ;;
963 k1om:Linux:*:*)
964 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
966965 exit ;;
967966 m32r*:Linux:*:*)
968 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
967 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
969968 exit ;;
970969 m68*:Linux:*:*)
971 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
970 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
972971 exit ;;
973972 mips:Linux:*:* | mips64:Linux:*:*)
974 eval $set_cc_for_build
975 sed 's/^ //' << EOF >$dummy.c
973 eval "$set_cc_for_build"
974 sed 's/^ //' << EOF > "$dummy.c"
976975 #undef CPU
977976 #undef ${UNAME_MACHINE}
978977 #undef ${UNAME_MACHINE}el
986985 #endif
987986 #endif
988987 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; }
988 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
989 test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
991990 ;;
991 mips64el:Linux:*:*)
992 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
993 exit ;;
992994 openrisc*:Linux:*:*)
993 echo or1k-unknown-linux-${LIBC}
995 echo or1k-unknown-linux-"$LIBC"
994996 exit ;;
995997 or32:Linux:*:* | or1k*:Linux:*:*)
996 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
998 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
997999 exit ;;
9981000 padre:Linux:*:*)
999 echo sparc-unknown-linux-${LIBC}
1001 echo sparc-unknown-linux-"$LIBC"
10001002 exit ;;
10011003 parisc64:Linux:*:* | hppa64:Linux:*:*)
1002 echo hppa64-unknown-linux-${LIBC}
1004 echo hppa64-unknown-linux-"$LIBC"
10031005 exit ;;
10041006 parisc:Linux:*:* | hppa:Linux:*:*)
10051007 # Look for CPU level
10061008 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1007 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
1008 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
1009 *) echo hppa-unknown-linux-${LIBC} ;;
1009 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1010 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1011 *) echo hppa-unknown-linux-"$LIBC" ;;
10101012 esac
10111013 exit ;;
10121014 ppc64:Linux:*:*)
1013 echo powerpc64-unknown-linux-${LIBC}
1015 echo powerpc64-unknown-linux-"$LIBC"
10141016 exit ;;
10151017 ppc:Linux:*:*)
1016 echo powerpc-unknown-linux-${LIBC}
1018 echo powerpc-unknown-linux-"$LIBC"
10171019 exit ;;
10181020 ppc64le:Linux:*:*)
1019 echo powerpc64le-unknown-linux-${LIBC}
1021 echo powerpc64le-unknown-linux-"$LIBC"
10201022 exit ;;
10211023 ppcle:Linux:*:*)
1022 echo powerpcle-unknown-linux-${LIBC}
1024 echo powerpcle-unknown-linux-"$LIBC"
1025 exit ;;
1026 riscv32:Linux:*:* | riscv64:Linux:*:*)
1027 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10231028 exit ;;
10241029 s390:Linux:*:* | s390x:Linux:*:*)
1025 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1030 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
10261031 exit ;;
10271032 sh64*:Linux:*:*)
1028 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1033 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10291034 exit ;;
10301035 sh*:Linux:*:*)
1031 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1036 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10321037 exit ;;
10331038 sparc:Linux:*:* | sparc64:Linux:*:*)
1034 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1039 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10351040 exit ;;
10361041 tile*:Linux:*:*)
1037 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1042 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10381043 exit ;;
10391044 vax:Linux:*:*)
1040 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1045 echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
10411046 exit ;;
10421047 x86_64:Linux:*:*)
1043 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
1048 if objdump -f /bin/sh | grep -q elf32-x86-64; then
1049 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
1050 else
1051 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
1052 fi
10441053 exit ;;
10451054 xtensa*:Linux:*:*)
1046 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1055 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10471056 exit ;;
10481057 i*86:DYNIX/ptx:4*:*)
10491058 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
10571066 # I am not positive that other SVR4 systems won't match this,
10581067 # I just have to hope. -- rms.
10591068 # Use sysv4.2uw... so that sysv4* matches it.
1060 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1069 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
10611070 exit ;;
10621071 i*86:OS/2:*:*)
10631072 # If we were able to find `uname', then EMX Unix compatibility
10641073 # is probably installed.
1065 echo ${UNAME_MACHINE}-pc-os2-emx
1074 echo "$UNAME_MACHINE"-pc-os2-emx
10661075 exit ;;
10671076 i*86:XTS-300:*:STOP)
1068 echo ${UNAME_MACHINE}-unknown-stop
1077 echo "$UNAME_MACHINE"-unknown-stop
10691078 exit ;;
10701079 i*86:atheos:*:*)
1071 echo ${UNAME_MACHINE}-unknown-atheos
1080 echo "$UNAME_MACHINE"-unknown-atheos
10721081 exit ;;
10731082 i*86:syllable:*:*)
1074 echo ${UNAME_MACHINE}-pc-syllable
1083 echo "$UNAME_MACHINE"-pc-syllable
10751084 exit ;;
10761085 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1077 echo i386-unknown-lynxos${UNAME_RELEASE}
1086 echo i386-unknown-lynxos"$UNAME_RELEASE"
10781087 exit ;;
10791088 i*86:*DOS:*:*)
1080 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1081 exit ;;
1082 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1083 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1089 echo "$UNAME_MACHINE"-pc-msdosdjgpp
1090 exit ;;
1091 i*86:*:4.*:*)
1092 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
10841093 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1085 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1094 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
10861095 else
1087 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1096 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
10881097 fi
10891098 exit ;;
10901099 i*86:*:5:[678]*)
10941103 *Pentium) UNAME_MACHINE=i586 ;;
10951104 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
10961105 esac
1097 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1106 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
10981107 exit ;;
10991108 i*86:*:3.2:*)
11001109 if test -f /usr/options/cb.name; then
11011110 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1102 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1111 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
11031112 elif /bin/uname -X 2>/dev/null >/dev/null ; then
11041113 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
11051114 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
11091118 && UNAME_MACHINE=i686
11101119 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
11111120 && UNAME_MACHINE=i686
1112 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1121 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
11131122 else
1114 echo ${UNAME_MACHINE}-pc-sysv32
1123 echo "$UNAME_MACHINE"-pc-sysv32
11151124 fi
11161125 exit ;;
11171126 pc:*:*:*)
11191128 # uname -m prints for DJGPP always 'pc', but it prints nothing about
11201129 # the processor, so we play safe by assuming i586.
11211130 # Note: whatever this is, it MUST be the same as what config.sub
1122 # prints for the "djgpp" host, or else GDB configury will decide that
1131 # prints for the "djgpp" host, or else GDB configure will decide that
11231132 # this is a cross-build.
11241133 echo i586-pc-msdosdjgpp
11251134 exit ;;
11311140 exit ;;
11321141 i860:*:4.*:*) # i860-SVR4
11331142 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1134 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1143 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
11351144 else # Add other i860-SVR4 vendors below as they are discovered.
1136 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1145 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
11371146 fi
11381147 exit ;;
11391148 mini*:CTIX:SYS*5:*)
11531162 test -r /etc/.relid \
11541163 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11551164 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1156 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1165 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
11571166 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1158 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1167 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11591168 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
11601169 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11611170 && { echo i486-ncr-sysv4; exit; } ;;
11641173 test -r /etc/.relid \
11651174 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11661175 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1167 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1176 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
11681177 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1169 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1178 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
11701179 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1171 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1180 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11721181 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1173 echo m68k-unknown-lynxos${UNAME_RELEASE}
1182 echo m68k-unknown-lynxos"$UNAME_RELEASE"
11741183 exit ;;
11751184 mc68030:UNIX_System_V:4.*:*)
11761185 echo m68k-atari-sysv4
11771186 exit ;;
11781187 TSUNAMI:LynxOS:2.*:*)
1179 echo sparc-unknown-lynxos${UNAME_RELEASE}
1188 echo sparc-unknown-lynxos"$UNAME_RELEASE"
11801189 exit ;;
11811190 rs6000:LynxOS:2.*:*)
1182 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1191 echo rs6000-unknown-lynxos"$UNAME_RELEASE"
11831192 exit ;;
11841193 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1185 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1194 echo powerpc-unknown-lynxos"$UNAME_RELEASE"
11861195 exit ;;
11871196 SM[BE]S:UNIX_SV:*:*)
1188 echo mips-dde-sysv${UNAME_RELEASE}
1197 echo mips-dde-sysv"$UNAME_RELEASE"
11891198 exit ;;
11901199 RM*:ReliantUNIX-*:*:*)
11911200 echo mips-sni-sysv4
11961205 *:SINIX-*:*:*)
11971206 if uname -p 2>/dev/null >/dev/null ; then
11981207 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1199 echo ${UNAME_MACHINE}-sni-sysv4
1208 echo "$UNAME_MACHINE"-sni-sysv4
12001209 else
12011210 echo ns32k-sni-sysv
12021211 fi
12161225 exit ;;
12171226 i*86:VOS:*:*)
12181227 # From Paul.Green@stratus.com.
1219 echo ${UNAME_MACHINE}-stratus-vos
1228 echo "$UNAME_MACHINE"-stratus-vos
12201229 exit ;;
12211230 *:VOS:*:*)
12221231 # From Paul.Green@stratus.com.
12231232 echo hppa1.1-stratus-vos
12241233 exit ;;
12251234 mc68*:A/UX:*:*)
1226 echo m68k-apple-aux${UNAME_RELEASE}
1235 echo m68k-apple-aux"$UNAME_RELEASE"
12271236 exit ;;
12281237 news*:NEWS-OS:6*:*)
12291238 echo mips-sony-newsos6
12301239 exit ;;
12311240 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
12321241 if [ -d /usr/nec ]; then
1233 echo mips-nec-sysv${UNAME_RELEASE}
1242 echo mips-nec-sysv"$UNAME_RELEASE"
12341243 else
1235 echo mips-unknown-sysv${UNAME_RELEASE}
1244 echo mips-unknown-sysv"$UNAME_RELEASE"
12361245 fi
12371246 exit ;;
12381247 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
12511260 echo x86_64-unknown-haiku
12521261 exit ;;
12531262 SX-4:SUPER-UX:*:*)
1254 echo sx4-nec-superux${UNAME_RELEASE}
1263 echo sx4-nec-superux"$UNAME_RELEASE"
12551264 exit ;;
12561265 SX-5:SUPER-UX:*:*)
1257 echo sx5-nec-superux${UNAME_RELEASE}
1266 echo sx5-nec-superux"$UNAME_RELEASE"
12581267 exit ;;
12591268 SX-6:SUPER-UX:*:*)
1260 echo sx6-nec-superux${UNAME_RELEASE}
1269 echo sx6-nec-superux"$UNAME_RELEASE"
12611270 exit ;;
12621271 SX-7:SUPER-UX:*:*)
1263 echo sx7-nec-superux${UNAME_RELEASE}
1272 echo sx7-nec-superux"$UNAME_RELEASE"
12641273 exit ;;
12651274 SX-8:SUPER-UX:*:*)
1266 echo sx8-nec-superux${UNAME_RELEASE}
1275 echo sx8-nec-superux"$UNAME_RELEASE"
12671276 exit ;;
12681277 SX-8R:SUPER-UX:*:*)
1269 echo sx8r-nec-superux${UNAME_RELEASE}
1278 echo sx8r-nec-superux"$UNAME_RELEASE"
1279 exit ;;
1280 SX-ACE:SUPER-UX:*:*)
1281 echo sxace-nec-superux"$UNAME_RELEASE"
12701282 exit ;;
12711283 Power*:Rhapsody:*:*)
1272 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1284 echo powerpc-apple-rhapsody"$UNAME_RELEASE"
12731285 exit ;;
12741286 *:Rhapsody:*:*)
1275 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1287 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
12761288 exit ;;
12771289 *:Darwin:*:*)
12781290 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1279 eval $set_cc_for_build
1291 eval "$set_cc_for_build"
12801292 if test "$UNAME_PROCESSOR" = unknown ; then
12811293 UNAME_PROCESSOR=powerpc
12821294 fi
1283 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1284 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1295 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1296 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
12851297 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1286 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1287 grep IS_64BIT_ARCH >/dev/null
1298 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1299 grep IS_64BIT_ARCH >/dev/null
12881300 then
12891301 case $UNAME_PROCESSOR in
12901302 i386) UNAME_PROCESSOR=x86_64 ;;
12911303 powerpc) UNAME_PROCESSOR=powerpc64 ;;
12921304 esac
1305 fi
1306 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1307 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1308 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1309 grep IS_PPC >/dev/null
1310 then
1311 UNAME_PROCESSOR=powerpc
12931312 fi
12941313 fi
12951314 elif test "$UNAME_PROCESSOR" = i386 ; then
13011320 # that Apple uses in portable devices.
13021321 UNAME_PROCESSOR=x86_64
13031322 fi
1304 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1323 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
13051324 exit ;;
13061325 *:procnto*:*:* | *:QNX:[0123456789]*:*)
13071326 UNAME_PROCESSOR=`uname -p`
1308 if test "$UNAME_PROCESSOR" = "x86"; then
1327 if test "$UNAME_PROCESSOR" = x86; then
13091328 UNAME_PROCESSOR=i386
13101329 UNAME_MACHINE=pc
13111330 fi
1312 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1331 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
13131332 exit ;;
13141333 *:QNX:*:4*)
13151334 echo i386-pc-qnx
13161335 exit ;;
1317 NEO-?:NONSTOP_KERNEL:*:*)
1318 echo neo-tandem-nsk${UNAME_RELEASE}
1336 NEO-*:NONSTOP_KERNEL:*:*)
1337 echo neo-tandem-nsk"$UNAME_RELEASE"
13191338 exit ;;
13201339 NSE-*:NONSTOP_KERNEL:*:*)
1321 echo nse-tandem-nsk${UNAME_RELEASE}
1322 exit ;;
1323 NSR-?:NONSTOP_KERNEL:*:*)
1324 echo nsr-tandem-nsk${UNAME_RELEASE}
1340 echo nse-tandem-nsk"$UNAME_RELEASE"
1341 exit ;;
1342 NSR-*:NONSTOP_KERNEL:*:*)
1343 echo nsr-tandem-nsk"$UNAME_RELEASE"
1344 exit ;;
1345 NSV-*:NONSTOP_KERNEL:*:*)
1346 echo nsv-tandem-nsk"$UNAME_RELEASE"
1347 exit ;;
1348 NSX-*:NONSTOP_KERNEL:*:*)
1349 echo nsx-tandem-nsk"$UNAME_RELEASE"
13251350 exit ;;
13261351 *:NonStop-UX:*:*)
13271352 echo mips-compaq-nonstopux
13301355 echo bs2000-siemens-sysv
13311356 exit ;;
13321357 DS/*:UNIX_System_V:*:*)
1333 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1358 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
13341359 exit ;;
13351360 *:Plan9:*:*)
13361361 # "uname -m" is not consistent, so use $cputype instead. 386
13371362 # is converted to i386 for consistency with other x86
13381363 # operating systems.
1339 if test "$cputype" = "386"; then
1364 if test "$cputype" = 386; then
13401365 UNAME_MACHINE=i386
13411366 else
13421367 UNAME_MACHINE="$cputype"
13431368 fi
1344 echo ${UNAME_MACHINE}-unknown-plan9
1369 echo "$UNAME_MACHINE"-unknown-plan9
13451370 exit ;;
13461371 *:TOPS-10:*:*)
13471372 echo pdp10-unknown-tops10
13621387 echo pdp10-unknown-its
13631388 exit ;;
13641389 SEI:*:*:SEIUX)
1365 echo mips-sei-seiux${UNAME_RELEASE}
1390 echo mips-sei-seiux"$UNAME_RELEASE"
13661391 exit ;;
13671392 *:DragonFly:*:*)
1368 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1393 echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
13691394 exit ;;
13701395 *:*VMS:*:*)
13711396 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1372 case "${UNAME_MACHINE}" in
1397 case "$UNAME_MACHINE" in
13731398 A*) echo alpha-dec-vms ; exit ;;
13741399 I*) echo ia64-dec-vms ; exit ;;
13751400 V*) echo vax-dec-vms ; exit ;;
13781403 echo i386-pc-xenix
13791404 exit ;;
13801405 i*86:skyos:*:*)
1381 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1406 echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
13821407 exit ;;
13831408 i*86:rdos:*:*)
1384 echo ${UNAME_MACHINE}-pc-rdos
1409 echo "$UNAME_MACHINE"-pc-rdos
13851410 exit ;;
13861411 i*86:AROS:*:*)
1387 echo ${UNAME_MACHINE}-pc-aros
1412 echo "$UNAME_MACHINE"-pc-aros
13881413 exit ;;
13891414 x86_64:VMkernel:*:*)
1390 echo ${UNAME_MACHINE}-unknown-esx
1415 echo "$UNAME_MACHINE"-unknown-esx
1416 exit ;;
1417 amd64:Isilon\ OneFS:*:*)
1418 echo x86_64-unknown-onefs
13911419 exit ;;
13921420 esac
13931421
1422 echo "$0: unable to guess system type" >&2
1423
1424 case "$UNAME_MACHINE:$UNAME_SYSTEM" in
1425 mips:Linux | mips64:Linux)
1426 # If we got here on MIPS GNU/Linux, output extra information.
1427 cat >&2 <<EOF
1428
1429 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1430 the system type. Please install a C compiler and try again.
1431 EOF
1432 ;;
1433 esac
1434
13941435 cat >&2 <<EOF
1395 $0: unable to guess system type
1396
1397 This script, last modified $timestamp, has failed to recognize
1398 the operating system you are using. It is advised that you
1399 download the most up to date version of the config scripts from
1400
1401 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1436
1437 This script (version $timestamp), has failed to recognize the
1438 operating system you are using. If your script is old, overwrite *all*
1439 copies of config.guess and config.sub with the latest versions from:
1440
1441 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
14021442 and
1403 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1404
1405 If the version you run ($0) is already up to date, please
1406 send the following data and any information you think might be
1407 pertinent to <config-patches@gnu.org> in order to provide the needed
1408 information to handle your system.
1443 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1444
1445 If $0 has already been updated, send the following data and any
1446 information you think might be pertinent to config-patches@gnu.org to
1447 provide the necessary information to handle your system.
14091448
14101449 config.guess timestamp = $timestamp
14111450
14241463 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
14251464 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
14261465
1427 UNAME_MACHINE = ${UNAME_MACHINE}
1428 UNAME_RELEASE = ${UNAME_RELEASE}
1429 UNAME_SYSTEM = ${UNAME_SYSTEM}
1430 UNAME_VERSION = ${UNAME_VERSION}
1466 UNAME_MACHINE = "$UNAME_MACHINE"
1467 UNAME_RELEASE = "$UNAME_RELEASE"
1468 UNAME_SYSTEM = "$UNAME_SYSTEM"
1469 UNAME_VERSION = "$UNAME_VERSION"
14311470 EOF
14321471
14331472 exit 1
14341473
14351474 # Local variables:
1436 # eval: (add-hook 'write-file-hooks 'time-stamp)
1475 # eval: (add-hook 'write-file-functions 'time-stamp)
14371476 # time-stamp-start: "timestamp='"
14381477 # time-stamp-format: "%:y-%02m-%02d"
14391478 # time-stamp-end: "'"
00 #! /bin/sh
11 # Configuration validation subroutine script.
2 # Copyright 1992-2015 Free Software Foundation, Inc.
3
4 timestamp='2015-08-20'
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-22'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
1414 # General Public License for more details.
1515 #
1616 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
1818 #
1919 # As a special exception to the GNU General Public License, if you
2020 # distribute this file as part of a program that contains a
3232 # Otherwise, we print the canonical config type on stdout and succeed.
3333
3434 # You can get the latest version of this script from:
35 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
35 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
3636
3737 # This file is supposed to be the same for all GNU packages
3838 # and recognize all the CPU types, system types and aliases
5252 me=`echo "$0" | sed -e 's,.*/,,'`
5353
5454 usage="\
55 Usage: $0 [OPTION] CPU-MFR-OPSYS
56 $0 [OPTION] ALIAS
55 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
5756
5857 Canonicalize a configuration name.
5958
60 Operation modes:
59 Options:
6160 -h, --help print this help, then exit
6261 -t, --time-stamp print date of last modification, then exit
6362 -v, --version print version number, then exit
6766 version="\
6867 GNU config.sub ($timestamp)
6968
70 Copyright 1992-2015 Free Software Foundation, Inc.
69 Copyright 1992-2018 Free Software Foundation, Inc.
7170
7271 This is free software; see the source for copying conditions. There is NO
7372 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
9493
9594 *local*)
9695 # First pass through any local machine types.
97 echo $1
96 echo "$1"
9897 exit ;;
9998
10099 * )
112111
113112 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
114113 # Here we must recognize all the valid KERNEL-OS combinations.
115 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
114 maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
116115 case $maybe_os in
117116 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
118117 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119118 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
120 kopensolaris*-gnu* | \
119 kopensolaris*-gnu* | cloudabi*-eabi* | \
121120 storm-chaos* | os2-emx* | rtmk-nova*)
122121 os=-$maybe_os
123 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
122 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
124123 ;;
125124 android-linux)
126125 os=-linux-android
127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
126 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
128127 ;;
129128 *)
130 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
131 if [ $basic_machine != $1 ]
132 then os=`echo $1 | sed 's/.*-/-/'`
129 basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
130 if [ "$basic_machine" != "$1" ]
131 then os=`echo "$1" | sed 's/.*-/-/'`
133132 else os=; fi
134133 ;;
135134 esac
178177 ;;
179178 -sco6)
180179 os=-sco5v6
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
180 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
182181 ;;
183182 -sco5)
184183 os=-sco3.2v5
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
184 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
186185 ;;
187186 -sco4)
188187 os=-sco3.2v4
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
188 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
190189 ;;
191190 -sco3.2.[4-9]*)
192191 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
192 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
194193 ;;
195194 -sco3.2v[4-9]*)
196195 # Don't forget version if it is 3.2v4 or newer.
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
196 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
198197 ;;
199198 -sco5v6*)
200199 # Don't forget version if it is 3.2v4 or newer.
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
200 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
202201 ;;
203202 -sco*)
204203 os=-sco3.2v2
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
204 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
206205 ;;
207206 -udk*)
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
207 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
209208 ;;
210209 -isc)
211210 os=-isc2.2
212 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
211 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
213212 ;;
214213 -clix*)
215214 basic_machine=clipper-intergraph
216215 ;;
217216 -isc*)
218 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
217 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
219218 ;;
220219 -lynx*178)
221220 os=-lynxos178
227226 os=-lynxos
228227 ;;
229228 -ptx*)
230 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
231 ;;
232 -windowsnt*)
233 os=`echo $os | sed -e 's/windowsnt/winnt/'`
229 basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
234230 ;;
235231 -psos*)
236232 os=-psos
263259 | fido | fr30 | frv | ft32 \
264260 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
265261 | hexagon \
266 | i370 | i860 | i960 | ia64 \
262 | i370 | i860 | i960 | ia16 | ia64 \
267263 | ip2k | iq2000 \
268264 | k1om \
269265 | le32 | le64 \
299295 | nios | nios2 | nios2eb | nios2el \
300296 | ns16k | ns32k \
301297 | open8 | or1k | or1knd | or32 \
302 | pdp10 | pdp11 | pj | pjl \
298 | pdp10 | pj | pjl \
303299 | powerpc | powerpc64 | powerpc64le | powerpcle \
300 | pru \
304301 | pyramid \
305302 | riscv32 | riscv64 \
306303 | rl78 | rx \
314311 | ubicom32 \
315312 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
316313 | visium \
317 | we32k \
314 | wasm32 \
318315 | x86 | xc16x | xstormy16 | xtensa \
319316 | z8k | z80)
320317 basic_machine=$basic_machine-unknown
335332 basic_machine=$basic_machine-unknown
336333 os=-none
337334 ;;
338 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
335 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
339336 ;;
340337 ms1)
341338 basic_machine=mt-unknown
364361 ;;
365362 # Object if more than one company name word.
366363 *-*-*)
367 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
364 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
368365 exit 1
369366 ;;
370367 # Recognize the basic CPU types with company name.
387384 | h8300-* | h8500-* \
388385 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
389386 | hexagon-* \
390 | i*86-* | i860-* | i960-* | ia64-* \
387 | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
391388 | ip2k-* | iq2000-* \
392389 | k1om-* \
393390 | le32-* | le64-* \
428425 | orion-* \
429426 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
430427 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
428 | pru-* \
431429 | pyramid-* \
432430 | riscv32-* | riscv64-* \
433431 | rl78-* | romp-* | rs6000-* | rx-* \
444442 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
445443 | vax-* \
446444 | visium-* \
445 | wasm32-* \
447446 | we32k-* \
448447 | x86-* | x86_64-* | xc16x-* | xps100-* \
449448 | xstormy16-* | xtensa*-* \
457456 # Recognize the various machine names and aliases which stand
458457 # for a CPU type and a company and sometimes even an OS.
459458 386bsd)
460 basic_machine=i386-unknown
459 basic_machine=i386-pc
461460 os=-bsd
462461 ;;
463462 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
491490 basic_machine=x86_64-pc
492491 ;;
493492 amd64-*)
494 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
493 basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
495494 ;;
496495 amdahl)
497496 basic_machine=580-amdahl
520519 basic_machine=i386-pc
521520 os=-aros
522521 ;;
523 asmjs)
522 asmjs)
524523 basic_machine=asmjs-unknown
525524 ;;
526525 aux)
536535 os=-linux
537536 ;;
538537 blackfin-*)
539 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
538 basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
540539 os=-linux
541540 ;;
542541 bluegene*)
544543 os=-cnk
545544 ;;
546545 c54x-*)
547 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
546 basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
548547 ;;
549548 c55x-*)
550 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
549 basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
551550 ;;
552551 c6x-*)
553 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
552 basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
554553 ;;
555554 c90)
556555 basic_machine=c90-cray
639638 basic_machine=rs6000-bull
640639 os=-bosx
641640 ;;
642 dpx2* | dpx2*-bull)
641 dpx2*)
643642 basic_machine=m68k-bull
644643 os=-sysv3
644 ;;
645 e500v[12])
646 basic_machine=powerpc-unknown
647 os=$os"spe"
648 ;;
649 e500v[12]-*)
650 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
651 os=$os"spe"
645652 ;;
646653 ebmon29k)
647654 basic_machine=a29k-amd
732739 hp9k8[0-9][0-9] | hp8[0-9][0-9])
733740 basic_machine=hppa1.0-hp
734741 ;;
735 hppa-next)
736 os=-nextstep3
737 ;;
738742 hppaosf)
739743 basic_machine=hppa1.1-hp
740744 os=-osf
747751 basic_machine=i370-ibm
748752 ;;
749753 i*86v32)
750 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
754 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
751755 os=-sysv32
752756 ;;
753757 i*86v4*)
754 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
758 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
755759 os=-sysv4
756760 ;;
757761 i*86v)
758 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
762 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
759763 os=-sysv
760764 ;;
761765 i*86sol2)
762 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
766 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
763767 os=-solaris2
764768 ;;
765769 i386mach)
766770 basic_machine=i386-mach
767771 os=-mach
768772 ;;
769 i386-vsta | vsta)
773 vsta)
770774 basic_machine=i386-unknown
771775 os=-vsta
772776 ;;
785789 os=-sysv
786790 ;;
787791 leon-*|leon[3-9]-*)
788 basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
792 basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
789793 ;;
790794 m68knommu)
791795 basic_machine=m68k-unknown
792796 os=-linux
793797 ;;
794798 m68knommu-*)
795 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
799 basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
796800 os=-linux
797 ;;
798 m88k-omron*)
799 basic_machine=m88k-omron
800801 ;;
801802 magnum | m3230)
802803 basic_machine=mips-mips
829830 os=-mint
830831 ;;
831832 mips3*-*)
832 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
833 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
833834 ;;
834835 mips3*)
835 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
836 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
836837 ;;
837838 monitor)
838839 basic_machine=m68k-rom68k
851852 os=-msdos
852853 ;;
853854 ms1-*)
854 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
855 basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
855856 ;;
856857 msys)
857858 basic_machine=i686-pc
893894 basic_machine=v70-nec
894895 os=-sysv
895896 ;;
896 next | m*-next )
897 next | m*-next)
897898 basic_machine=m68k-next
898899 case $os in
899900 -nextstep* )
938939 nsr-tandem)
939940 basic_machine=nsr-tandem
940941 ;;
942 nsv-tandem)
943 basic_machine=nsv-tandem
944 ;;
945 nsx-tandem)
946 basic_machine=nsx-tandem
947 ;;
941948 op50n-* | op60c-*)
942949 basic_machine=hppa1.1-oki
943950 os=-proelf
970977 os=-linux
971978 ;;
972979 parisc-*)
973 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
980 basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
974981 os=-linux
975982 ;;
976983 pbd)
986993 basic_machine=i386-pc
987994 ;;
988995 pc98-*)
989 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
996 basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
990997 ;;
991998 pentium | p5 | k5 | k6 | nexgen | viac3)
992999 basic_machine=i586-pc
10011008 basic_machine=i786-pc
10021009 ;;
10031010 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1004 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
1011 basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10051012 ;;
10061013 pentiumpro-* | p6-* | 6x86-* | athlon-*)
1007 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1014 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10081015 ;;
10091016 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1010 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1017 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10111018 ;;
10121019 pentium4-*)
1013 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
1020 basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10141021 ;;
10151022 pn)
10161023 basic_machine=pn-gould
10201027 ppc | ppcbe) basic_machine=powerpc-unknown
10211028 ;;
10221029 ppc-* | ppcbe-*)
1023 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1024 ;;
1025 ppcle | powerpclittle | ppc-le | powerpc-little)
1030 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1031 ;;
1032 ppcle | powerpclittle)
10261033 basic_machine=powerpcle-unknown
10271034 ;;
10281035 ppcle-* | powerpclittle-*)
1029 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1036 basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10301037 ;;
10311038 ppc64) basic_machine=powerpc64-unknown
10321039 ;;
1033 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1034 ;;
1035 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1040 ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1041 ;;
1042 ppc64le | powerpc64little)
10361043 basic_machine=powerpc64le-unknown
10371044 ;;
10381045 ppc64le-* | powerpc64little-*)
1039 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1046 basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10401047 ;;
10411048 ps2)
10421049 basic_machine=i386-ibm
10901097 sequent)
10911098 basic_machine=i386-sequent
10921099 ;;
1093 sh)
1094 basic_machine=sh-hitachi
1095 os=-hms
1096 ;;
10971100 sh5el)
10981101 basic_machine=sh5le-unknown
10991102 ;;
1100 sh64)
1101 basic_machine=sh64-unknown
1102 ;;
1103 sparclite-wrs | simso-wrs)
1103 simso-wrs)
11041104 basic_machine=sparclite-wrs
11051105 os=-vxworks
11061106 ;;
11191119 os=-sysv4
11201120 ;;
11211121 strongarm-* | thumb-*)
1122 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1122 basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
11231123 ;;
11241124 sun2)
11251125 basic_machine=m68000-sun
12411241 basic_machine=hppa1.1-winbond
12421242 os=-proelf
12431243 ;;
1244 x64)
1245 basic_machine=x86_64-pc
1246 ;;
12441247 xbox)
12451248 basic_machine=i686-pc
12461249 os=-mingw32
12491252 basic_machine=xps100-honeywell
12501253 ;;
12511254 xscale-* | xscalee[bl]-*)
1252 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1255 basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
12531256 ;;
12541257 ymp)
12551258 basic_machine=ymp-cray
12561259 os=-unicos
1257 ;;
1258 z8k-*-coff)
1259 basic_machine=z8k-unknown
1260 os=-sim
1261 ;;
1262 z80-*-coff)
1263 basic_machine=z80-unknown
1264 os=-sim
12651260 ;;
12661261 none)
12671262 basic_machine=none-none
12911286 vax)
12921287 basic_machine=vax-dec
12931288 ;;
1294 pdp10)
1295 # there are many clones, so DEC is not a safe bet
1296 basic_machine=pdp10-unknown
1297 ;;
12981289 pdp11)
12991290 basic_machine=pdp11-dec
13001291 ;;
13041295 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
13051296 basic_machine=sh-unknown
13061297 ;;
1307 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1308 basic_machine=sparc-sun
1309 ;;
13101298 cydra)
13111299 basic_machine=cydra-cydrome
13121300 ;;
13261314 # Make sure to match an already-canonicalized machine name.
13271315 ;;
13281316 *)
1329 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1317 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
13301318 exit 1
13311319 ;;
13321320 esac
13341322 # Here we canonicalize certain aliases for manufacturers.
13351323 case $basic_machine in
13361324 *-digital*)
1337 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1325 basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
13381326 ;;
13391327 *-commodore*)
1340 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1328 basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
13411329 ;;
13421330 *)
13431331 ;;
13481336 if [ x"$os" != x"" ]
13491337 then
13501338 case $os in
1351 # First match some system type aliases
1352 # that might get confused with valid system types.
1339 # First match some system type aliases that might get confused
1340 # with valid system types.
13531341 # -solaris* is a basic system type, with this one exception.
13541342 -auroraux)
13551343 os=-auroraux
13601348 -solaris)
13611349 os=-solaris2
13621350 ;;
1363 -svr4*)
1364 os=-sysv4
1365 ;;
13661351 -unixware*)
13671352 os=-sysv4.2uw
13681353 ;;
13691354 -gnu/linux*)
13701355 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
13711356 ;;
1372 # First accept the basic system types.
1357 # es1800 is here to avoid being matched by es* (a different OS)
1358 -es1800*)
1359 os=-ose
1360 ;;
1361 # Now accept the basic system types.
13731362 # The portable systems comes first.
1374 # Each alternative MUST END IN A *, to match a version number.
1363 # Each alternative MUST end in a * to match a version number.
13751364 # -sysv* is not here because it comes later, after sysvr4.
13761365 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
13771366 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
13811370 | -aos* | -aros* | -cloudabi* | -sortix* \
13821371 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
13831372 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1384 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1385 | -bitrig* | -openbsd* | -solidbsd* \
1373 | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
1374 | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
13861375 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
13871376 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
13881377 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
13891378 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1390 | -chorusos* | -chorusrdb* | -cegcc* \
1379 | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
13911380 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1392 | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1381 | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
13931382 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
13941383 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1395 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1384 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
13961385 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
13971386 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
13981387 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1399 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1388 | -morphos* | -superux* | -rtmk* | -windiss* \
14001389 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1401 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
1390 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
1391 | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
1392 | -midnightbsd*)
14021393 # Remember, each alternative MUST END IN *, to match a version number.
14031394 ;;
14041395 -qnx*)
14151406 -nto*)
14161407 os=`echo $os | sed -e 's|nto|nto-qnx|'`
14171408 ;;
1418 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1419 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1409 -sim | -xray | -os68k* | -v88r* \
1410 | -windows* | -osx | -abug | -netware* | -os9* \
14201411 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
14211412 ;;
14221413 -mac*)
1423 os=`echo $os | sed -e 's|mac|macos|'`
1414 os=`echo "$os" | sed -e 's|mac|macos|'`
14241415 ;;
14251416 -linux-dietlibc)
14261417 os=-linux-dietlibc
14291420 os=`echo $os | sed -e 's|linux|linux-gnu|'`
14301421 ;;
14311422 -sunos5*)
1432 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1423 os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
14331424 ;;
14341425 -sunos6*)
1435 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1426 os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
14361427 ;;
14371428 -opened*)
14381429 os=-openedition
14431434 -wince*)
14441435 os=-wince
14451436 ;;
1446 -osfrose*)
1447 os=-osfrose
1448 ;;
1449 -osf*)
1450 os=-osf
1451 ;;
14521437 -utek*)
14531438 os=-bsd
14541439 ;;
14731458 -nova*)
14741459 os=-rtmk-nova
14751460 ;;
1476 -ns2 )
1461 -ns2)
14771462 os=-nextstep2
14781463 ;;
14791464 -nsk*)
14951480 -oss*)
14961481 os=-sysv3
14971482 ;;
1498 -svr4)
1483 -svr4*)
14991484 os=-sysv4
15001485 ;;
15011486 -svr3)
15101495 -ose*)
15111496 os=-ose
15121497 ;;
1513 -es1800*)
1514 os=-ose
1515 ;;
1516 -xenix)
1517 os=-xenix
1518 ;;
15191498 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
15201499 os=-mint
15211500 ;;
1522 -aros*)
1523 os=-aros
1524 ;;
15251501 -zvmoe)
15261502 os=-zvmoe
15271503 ;;
15281504 -dicos*)
15291505 os=-dicos
15301506 ;;
1507 -pikeos*)
1508 # Until real need of OS specific support for
1509 # particular features comes up, bare metal
1510 # configurations are quite functional.
1511 case $basic_machine in
1512 arm*)
1513 os=-eabi
1514 ;;
1515 *)
1516 os=-elf
1517 ;;
1518 esac
1519 ;;
15311520 -nacl*)
1521 ;;
1522 -ios)
15321523 ;;
15331524 -none)
15341525 ;;
15351526 *)
15361527 # Get rid of the `-' at the beginning of $os.
15371528 os=`echo $os | sed 's/[^-]*-//'`
1538 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1529 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
15391530 exit 1
15401531 ;;
15411532 esac
16251616 sparc-* | *-sun)
16261617 os=-sunos4.1.1
16271618 ;;
1619 pru-*)
1620 os=-elf
1621 ;;
16281622 *-be)
16291623 os=-beos
16301624 ;;
1631 *-haiku)
1632 os=-haiku
1633 ;;
16341625 *-ibm)
16351626 os=-aix
16361627 ;;
16701661 m88k-omron*)
16711662 os=-luna
16721663 ;;
1673 *-next )
1664 *-next)
16741665 os=-nextstep
16751666 ;;
16761667 *-sequent)
16841675 ;;
16851676 i370-*)
16861677 os=-mvs
1687 ;;
1688 *-next)
1689 os=-nextstep3
16901678 ;;
16911679 *-gould)
16921680 os=-sysv
17971785 vendor=stratus
17981786 ;;
17991787 esac
1800 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1788 basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
18011789 ;;
18021790 esac
18031791
1804 echo $basic_machine$os
1792 echo "$basic_machine$os"
18051793 exit
18061794
18071795 # Local variables:
1808 # eval: (add-hook 'write-file-hooks 'time-stamp)
1796 # eval: (add-hook 'write-file-functions 'time-stamp)
18091797 # time-stamp-start: "timestamp='"
18101798 # time-stamp-format: "%:y-%02m-%02d"
18111799 # time-stamp-end: "'"
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for teckit 2.5.8.
2 # Generated by GNU Autoconf 2.69 for teckit 2.5.9.
33 #
4 # Report bugs to <nrsi@sil.org>.
4 # Report bugs to <wstech@sil.org>.
55 #
66 #
77 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
273273 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
274274 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
275275 else
276 $as_echo "$0: Please tell bug-autoconf@gnu.org and nrsi@sil.org about
277 $0: your system, including any error possibly output before
278 $0: this message. Then install a modern shell, or manually
279 $0: run the script under such a shell if you do have one."
276 $as_echo "$0: Please tell bug-autoconf@gnu.org and wstech@sil.org
277 $0: about your system, including any error possibly output
278 $0: before this message. Then install a modern shell, or
279 $0: manually run the script under such a shell if you do
280 $0: have one."
280281 fi
281282 exit 1
282283 fi
588589 # Identity of this package.
589590 PACKAGE_NAME='teckit'
590591 PACKAGE_TARNAME='teckit'
591 PACKAGE_VERSION='2.5.8'
592 PACKAGE_STRING='teckit 2.5.8'
593 PACKAGE_BUGREPORT='nrsi@sil.org'
592 PACKAGE_VERSION='2.5.9'
593 PACKAGE_STRING='teckit 2.5.9'
594 PACKAGE_BUGREPORT='wstech@sil.org'
594595 PACKAGE_URL=''
595596
596597 ac_unique_file="source/UnicodeNames.cpp"
13631364 # Omit some internal or obsolete options to make the list less imposing.
13641365 # This message is too long to be a string in the A/UX 3.1 sh.
13651366 cat <<_ACEOF
1366 \`configure' configures teckit 2.5.8 to adapt to many kinds of systems.
1367 \`configure' configures teckit 2.5.9 to adapt to many kinds of systems.
13671368
13681369 Usage: $0 [OPTION]... [VAR=VALUE]...
13691370
14351436
14361437 if test -n "$ac_init_help"; then
14371438 case $ac_init_help in
1438 short | recursive ) echo "Configuration of teckit 2.5.8:";;
1439 short | recursive ) echo "Configuration of teckit 2.5.9:";;
14391440 esac
14401441 cat <<\_ACEOF
14411442
14971498 Use these variables to override the choices made by `configure' or to help
14981499 it to find libraries and programs with nonstandard names/locations.
14991500
1500 Report bugs to <nrsi@sil.org>.
1501 Report bugs to <wstech@sil.org>.
15011502 _ACEOF
15021503 ac_status=$?
15031504 fi
15601561 test -n "$ac_init_help" && exit $ac_status
15611562 if $ac_init_version; then
15621563 cat <<\_ACEOF
1563 teckit configure 2.5.8
1564 teckit configure 2.5.9
15641565 generated by GNU Autoconf 2.69
15651566
15661567 Copyright (C) 2012 Free Software Foundation, Inc.
20262027 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
20272028 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
20282029 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2029 ( $as_echo "## --------------------------- ##
2030 ## Report this to nrsi@sil.org ##
2031 ## --------------------------- ##"
2030 ( $as_echo "## ----------------------------- ##
2031 ## Report this to wstech@sil.org ##
2032 ## ----------------------------- ##"
20322033 ) | sed "s/^/$as_me: WARNING: /" >&2
20332034 ;;
20342035 esac
20502051 This file contains any messages produced by compilers while
20512052 running configure, to aid debugging if configure makes a mistake.
20522053
2053 It was created by teckit $as_me 2.5.8, which was
2054 It was created by teckit $as_me 2.5.9, which was
20542055 generated by GNU Autoconf 2.69. Invocation command line was
20552056
20562057 $ $0 $@
30283029
30293030 # Define the identity of the package.
30303031 PACKAGE='teckit'
3031 VERSION='2.5.8'
3032 VERSION='2.5.9'
30323033
30333034
30343035 cat >>confdefs.h <<_ACEOF
1678116782 SYSTEM_EXPAT_FALSE=
1678216783 fi
1678316784
16784 expat_CFLAGS="$CFLAGS"
16785 expat_CFLAGS=""
1678516786 expat_LIBS="$LIBS"
1678616787 CFLAGS="$noexpat_CFLAGS"
1678716788 LIBS="$noexpat_LIBS"
1734117342 # report actual input values of CONFIG_FILES etc. instead of their
1734217343 # values after options handling.
1734317344 ac_log="
17344 This file was extended by teckit $as_me 2.5.8, which was
17345 This file was extended by teckit $as_me 2.5.9, which was
1734517346 generated by GNU Autoconf 2.69. Invocation command line was
1734617347
1734717348 CONFIG_FILES = $CONFIG_FILES
1740117402 Configuration commands:
1740217403 $config_commands
1740317404
17404 Report bugs to <nrsi@sil.org>."
17405 Report bugs to <wstech@sil.org>."
1740517406
1740617407 _ACEOF
1740717408 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1740817409 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1740917410 ac_cs_version="\\
17410 teckit config.status 2.5.8
17411 teckit config.status 2.5.9
1741117412 configured by $0, generated by GNU Autoconf 2.69,
1741217413 with options \\"\$ac_cs_config\\"
1741317414
1871618717 cat <<_LT_EOF >> "$cfgfile"
1871718718 #! $SHELL
1871818719 # Generated automatically by $as_me ($PACKAGE) $VERSION
18719 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1872018720 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1872118721
1872218722 # Provide generalized library-building support services.
00 AC_PREREQ(2.54)
1 AC_INIT(teckit, 2.5.8, nrsi@sil.org)
1 AC_INIT(teckit, 2.5.9, wstech@sil.org)
22 AM_CONFIG_HEADER([config.h])
33 AC_CONFIG_SRCDIR([source/UnicodeNames.cpp])
44 AC_CONFIG_MACRO_DIR([m4])
110110 noexpat_LIBS="$LIBS"
111111 AC_CHECK_LIB(expat, XML_ExpatVersion)
112112 AM_CONDITIONAL(SYSTEM_EXPAT, test x$ac_cv_lib_expat_XML_ExpatVersion = xyes)
113 expat_CFLAGS="$CFLAGS"
113 expat_CFLAGS=""
114114 expat_LIBS="$LIBS"
115115 CFLAGS="$noexpat_CFLAGS"
116116 LIBS="$noexpat_LIBS"
00 #! /bin/sh
11 # depcomp - compile a program generating dependencies as side-effects
22
3 scriptversion=2013-05-30.07; # UTC
4
5 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
3 scriptversion=2016-01-11.22; # UTC
4
5 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
66
77 # This program is free software; you can redistribute it and/or modify
88 # it under the terms of the GNU General Public License as published by
785785 # eval: (add-hook 'write-file-hooks 'time-stamp)
786786 # time-stamp-start: "scriptversion="
787787 # time-stamp-format: "%:y-%02m-%02d.%02H"
788 # time-stamp-time-zone: "UTC"
788 # time-stamp-time-zone: "UTC0"
789789 # time-stamp-end: "; # UTC"
790790 # End:
0 # Makefile.in generated by automake 1.15 from Makefile.am.
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
Binary diff not shown
(No changes)
0 # Makefile.in generated by automake 1.15 from Makefile.am.
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
1111
1212 Rest of the project:
1313
14 Copyright 2002-2018, SIL International
14 Copyright 2002-2019, SIL International
1515 All rights reserved.
1616
1717 This library is free software; you can redistribute it and/or modify
3030
3131 PROGRAM=libtool
3232 PACKAGE=libtool
33 VERSION="2.4.6 Debian-2.4.6-0.1"
33 VERSION="2.4.6 Debian-2.4.6-2"
3434 package_revision=2.4.6
3535
3636
20672067 compiler: $LTCC
20682068 compiler flags: $LTCFLAGS
20692069 linker: $LD (gnu? $with_gnu_ld)
2070 version: $progname (GNU libtool) 2.4.6
2070 version: $progname $scriptversion Debian-2.4.6-2
20712071 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
20722072 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
20732073
727727 cat <<_LT_EOF >> "$cfgfile"
728728 #! $SHELL
729729 # Generated automatically by $as_me ($PACKAGE) $VERSION
730 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
731730 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
732731
733732 # Provide generalized library-building support services.
7474 const UInt32 byteMask = 0x000000BFUL;
7575 const UInt32 byteMark = 0x00000080UL;
7676
77 #define FOUR_CHAR_CODE(a,b,c,d) (UInt32)((a << 24) + (b << 16) + (c << 8) + d)
77 #define FOUR_CHAR_CODE(a,b,c,d) UInt32((a << 24) + (b << 16) + (c << 8) + d)
7878
7979 const UInt32 kCode_Byte = FOUR_CHAR_CODE('B','y','t','e');
8080 const UInt32 kCode_BU = FOUR_CHAR_CODE('B','-','>','U');
141141 {
142142 TECkit_Status result = kStatus_CompilationFailed;
143143 try {
144 Compiler* cmp = new Compiler(txt, len, kForm_Unspecified, (bool)doCompression, false, errFunc, userData);
144 Compiler* cmp = new Compiler(txt, len, kForm_Unspecified, bool(doCompression), false, errFunc, userData);
145145 cmp->GetCompiledTable(*outTable, *outLen);
146146 if (*outTable == 0)
147147 result = kStatus_CompilationFailed;
195195 const CharName *c = &gUnicodeNames[0];
196196 while (c->name != 0)
197197 if (c->usv == usv)
198 return (char*)c->name;
198 return const_cast<char*>(c->name);
199199 else
200200 ++c;
201201 return NULL;
251251 TECkit_GetUnicodeValue(char* name)
252252 {
253253 const CharName *c = &gUnicodeNames[0];
254 int len = strlen(name);
254 size_t len = strlen(name);
255255 while (c->name != 0)
256256 if (unicodeNameCompare(c->name, name, len) == 0)
257 return c->usv;
257 return static_cast<int>(c->usv);
258258 else
259259 ++c;
260260 return -1;
523523 compiledSize = 0;
524524 usedExtStringRules = false;
525525
526 textPtr = (const unsigned char*)txt;
526 textPtr = reinterpret_cast<const unsigned char*>(txt);
527527 textEnd = textPtr + len;
528528
529529 ungotten = kInvalidChar;
627627 errorState = false;
628628
629629 string32::const_iterator i;
630 switch ((int)tok.type) {
630 switch (int(tok.type)) {
631631 default:
632632 Error("this can't happen!");
633633 break;
770770 case '^':
771771 // negation can only apply to a few things:
772772 GetNextToken();
773 switch ((int)tok.type) {
773 switch (int(tok.type)) {
774774 case tok_Number:
775775 AppendLiteral(tok.val, true);
776776 break;
942942
943943 case '{':
944944 {
945 int repeatMin = 0;
946 int repeatMax = 15;
945 UInt32 repeatMin = 0;
946 UInt32 repeatMax = 15;
947947 GetNextToken();
948948 if (tok.type == tok_Number) {
949949 repeatMin = repeatMax = tok.val;
996996 break;
997997 if (!ExpectToken(tok_Number, "expected (NUMBER) STRING after Name"))
998998 break;
999 int nameID = tok.val;
999 UInt16 nameID = tok.val;
10001000 if (!ExpectToken(')', "expected (NUMBER) STRING after Name"))
10011001 break;
10021002 ReadNameString(nameID);
11281128 bool ellipsisOK = false;
11291129 while (tok.type != ')' && tok.type != tok_Newline) {
11301130 GetNextToken();
1131 switch ((int)tok.type) {
1131 switch (int(tok.type)) {
11321132 case tok_USV:
11331133 if (classType == 'B') {
11341134 Error("can't use Unicode value in byte encoding");
12491249 break;
12501250
12511251 default:
1252 Error("unexpected token within class", string((const char*)tokStart, (const char*)textPtr - (const char*)tokStart).c_str());
1252 Error("unexpected token within class", string(reinterpret_cast<const char *>(tokStart), reinterpret_cast<const char *>(textPtr - tokStart)).c_str());
12531253 break;
12541254 }
12551255 }
13381338 string trailer("</teckitMapping>\n");
13391339
13401340 compiledSize = header.length() + xmlRepresentation.length() + trailer.length();
1341 compiledTable = (Byte*)malloc(compiledSize + 1);
1341 compiledTable = static_cast<Byte*>(malloc(compiledSize + 1));
13421342 if (compiledTable == NULL)
13431343 throw bad_alloc();
13441344
13771377 // pack all the name records
13781378 string namesData;
13791379 for (vector<UInt16>::const_iterator i = nameIDs.begin(); i != nameIDs.end(); ++i) {
1380 appendToTable(offsets, (const char*)&offset, sizeof(offset));
1380 appendToTable(offsets, reinterpret_cast<const char*>(&offset), sizeof(offset));
13811381 NameRec r;
13821382 WRITE(r.nameID, *i);
13831383 WRITE(r.nameLength, names[*i].length());
1384 namesData.append((const char*)&r, sizeof(r));
1384 namesData.append(reinterpret_cast<const char*>(&r), sizeof(r));
13851385 namesData.append(names[*i]);
13861386 if ((namesData.length() & 1) != 0)
1387 namesData.append(1, (char)0);
1387 namesData.append(1, '\0');
13881388 offset += namesData.length() - prevLength;
13891389 prevLength = namesData.length();
13901390 }
13911391 if ((namesData.length() & 2) != 0)
1392 namesData.append(2, (char)0);
1392 namesData.append(2, '\0');
13931393 offset += namesData.length() - prevLength;
13941394
13951395 // pack the offsets to the actual mapping tables
13961396 vector<string>::const_iterator t;
13971397 for (t = fwdTables.begin(); t != fwdTables.end(); ++t) {
1398 appendToTable(offsets, (const char*)&offset, sizeof(offset));
1398 appendToTable(offsets, reinterpret_cast<const char*>(&offset), sizeof(offset));
13991399 offset += t->size();
14001400 }
14011401 for (t = revTables.end(); t != revTables.begin(); ) {
14021402 --t;
1403 appendToTable(offsets, (const char*)&offset, sizeof(offset));
1403 appendToTable(offsets, reinterpret_cast<const char*>(&offset), sizeof(offset));
14041404 offset += t->size();
14051405 }
14061406
14161416 for (t = revTables.begin(); t != revTables.end(); ++t)
14171417 compiledSize += t->length();
14181418
1419 compiledTable = (Byte*)malloc(compiledSize);
1419 compiledTable = static_cast<Byte*>(malloc(compiledSize));
14201420 if (compiledTable != 0) {
1421 char* cp = (char*)compiledTable;
1421 Byte* cp = compiledTable;
14221422 memcpy(cp, &fh, sizeof(fh));
14231423 cp += sizeof(fh);
14241424 memcpy(cp, offsets.data(), offsets.length());
14341434 memcpy(cp, t->data(), t->length());
14351435 cp += t->length();
14361436 }
1437 if ((char*)compiledTable + compiledSize != cp)
1437 if (compiledTable + compiledSize != cp)
14381438 cerr << "error!" << endl;
14391439 }
14401440 else
14441444 if (errorCount == 0 && cmp) {
14451445 // do the compression...
14461446 unsigned long destLen = compiledSize * 11 / 10 + 20;
1447 Byte* dest = (Byte*)malloc(destLen + 8);
1447 Byte* dest = static_cast<Byte*>(malloc(destLen + 8));
14481448 if (dest != 0) {
14491449 int result = compress2(dest + 8, &destLen, compiledTable, compiledSize, Z_BEST_COMPRESSION);
14501450 if (result == Z_OK) {
14511451 destLen += 8;
1452 dest = (Byte*)realloc(dest, destLen); // shrink dest to fit
1453 WRITE(((FileHeader*)dest)->type, kMagicNumberCmp);
1454 WRITE(((FileHeader*)dest)->version, compiledSize);
1452 dest = static_cast<Byte*>(realloc(dest, destLen)); // shrink dest to fit
1453 WRITE(reinterpret_cast<FileHeader*>(dest)->type, kMagicNumberCmp);
1454 WRITE(reinterpret_cast<FileHeader*>(dest)->version, compiledSize);
14551455 free(compiledTable);
14561456 compiledTable = dest;
14571457 compiledSize = destLen;
14991499 } else { bytesToWrite = 2;
15001500 c = 0x0000fffd;
15011501 };
1502 rval.append((size_t)bytesToWrite, 0);
1503 int index = rval.length();
1502 rval.append(size_t(bytesToWrite), 0);
1503 size_t index = rval.length();
15041504 switch (bytesToWrite) { /* note: code falls through cases! */
1505 case 4: rval[--index] = (c | byteMark) & byteMask; c >>= 6;
1506 case 3: rval[--index] = (c | byteMark) & byteMask; c >>= 6;
1507 case 2: rval[--index] = (c | byteMark) & byteMask; c >>= 6;
1505 case 4: rval[--index] = static_cast<char>((c | byteMark) & byteMask); c >>= 6;
1506 case 3: rval[--index] = static_cast<char>((c | byteMark) & byteMask); c >>= 6;
1507 case 2: rval[--index] = static_cast<char>((c | byteMark) & byteMask); c >>= 6;
15081508 case 1: rval[--index] = c | firstByteMark[bytesToWrite];
15091509 };
15101510 }
17451745 tok.strval.erase(tok.strval.begin(), tok.strval.end());
17461746 #endif
17471747 while (len-- > 0)
1748 tok.strval.append(1, *str++);
1748 tok.strval.append(1, static_cast<UInt32>(*str++));
17491749 return tok_Identifier;
17501750 }
17511751
17891789
17901790 case kForm_UTF16BE:
17911791 CHECK_AVAIL(2);
1792 rval = *textPtr++ << 8;
1792 rval = static_cast<UInt32>(*textPtr++) << 8;
17931793 rval += *textPtr++;
17941794 if (rval >= kSurrogateHighStart && rval <= kSurrogateHighEnd) {
17951795 // check that 2 more bytes are available
17961796 CHECK_AVAIL(2);
1797 UInt32 low = *textPtr++ << 8;
1797 UInt32 low = static_cast<UInt32>(*textPtr++) << 8;
17981798 low += *textPtr++;
17991799 rval = ((rval - kSurrogateHighStart) << halfShift) + (low - kSurrogateLowStart) + halfBase;
18001800 }
18031803 case kForm_UTF16LE:
18041804 CHECK_AVAIL(2);
18051805 rval = *textPtr++;
1806 rval += *textPtr++ << 8;
1806 rval += static_cast<UInt32>(*textPtr++) << 8;
18071807 if (rval >= kSurrogateHighStart && rval <= kSurrogateHighEnd) {
18081808 CHECK_AVAIL(2);
18091809 UInt32 low = *textPtr++;
1810 low += *textPtr++ << 8;
1810 low += static_cast<UInt32>(*textPtr++) << 8;
18111811 rval = ((rval - kSurrogateHighStart) << halfShift) + (low - kSurrogateLowStart) + halfBase;
18121812 }
18131813 break;
18141814
18151815 case kForm_UTF32BE:
18161816 CHECK_AVAIL(4);
1817 rval = *textPtr++ << 24;
1818 rval += *textPtr++ << 16;
1819 rval += *textPtr++ << 8;
1817 rval = static_cast<UInt32>(*textPtr++) << 24;
1818 rval += static_cast<UInt32>(*textPtr++) << 16;
1819 rval += static_cast<UInt32>(*textPtr++) << 8;
18201820 rval += *textPtr++;
18211821 break;
18221822
18231823 case kForm_UTF32LE:
18241824 CHECK_AVAIL(4);
18251825 rval = *textPtr++;
1826 rval += *textPtr++ << 8;
1827 rval += *textPtr++ << 16;
1828 rval += *textPtr++ << 24;
1826 rval += static_cast<UInt32>(*textPtr++) << 8;
1827 rval += static_cast<UInt32>(*textPtr++) << 16;
1828 rval += static_cast<UInt32>(*textPtr++) << 24;
18291829 break;
18301830 }
18311831
19451945 case '/':
19461946 case '=':
19471947 case '@':
1948 tok.type = (tokenType)currCh;
1948 tok.type = tokenType(currCh);
19491949 return true;
19501950
19511951 case '<':
1952 tok.type = (tokenType)'<';
1952 tok.type = tokenType('<');
19531953 if (textPtr < textEnd) {
19541954 if ((currCh = getChar()) == '>')
19551955 tok.type = tok_Map;
19591959 return true;
19601960
19611961 case '.':
1962 tok.type = (tokenType)'.';
1962 tok.type = tokenType('.');
19631963 if (textPtr < textEnd) {
19641964 if ((currCh = getChar()) == '.')
19651965 tok.type = tok_Ellipsis;
19771977 goto DEFAULT;
19781978 }
19791979 }
1980 tok.type = (tokenType)'_';
1980 tok.type = tokenType('_');
19811981 return true;
19821982
19831983 case '0':
21322132 cout << " at line " << line << endl;
21332133 }
21342134 else
2135 (*errorFunction)(errFuncUserData, (char*)msg, (char*)s, line);
2135 (*errorFunction)(errFuncUserData, const_cast<char*>(msg), const_cast<char*>(s), line);
21362136 errorState = true;
21372137 ++errorCount;
21382138 }
23552355 }
23562356
23572357 void
2358 Compiler::SetMinMax(int repeatMin, int repeatMax)
2358 Compiler::SetMinMax(UInt32 repeatMin, UInt32 repeatMax)
23592359 {
23602360 Item* item = 0;
23612361 switch (ruleState) {
25762576 continue;
25772577
25782578 default:
2579 cerr << "bad rep elem type: " << (int)i->type << endl;
2579 cerr << "bad rep elem type: " << i->type << endl;
25802580 break;
25812581 }
25822582 }
29432943 }
29442944
29452945 void
2946 Compiler::appendMatchElem(string& packedRule, Item& item, int index,
2946 Compiler::appendMatchElem(string& packedRule, Item& item, unsigned int index,
29472947 vector<MatClass>& matchClasses)
29482948 {
29492949 MatchElem m;
29502950 WRITE(m.value.usv.data, 0);
2951 WRITE(m.flags.repeat, (item.repeatMin << 4) + item.repeatMax);
2951 WRITE(m.flags.repeat, (static_cast<UInt32>(item.repeatMin) << 4) + item.repeatMax);
29522952 if (item.negate)
29532953 WRITE(m.flags.type, kMatchElem_Negate);
29542954 else
29962996 WRITE(m.flags.type, READ(m.flags.type) | (kMatchElem_NonLit + kMatchElem_Type_EOS));
29972997 break;
29982998 }
2999 const char* p = (const char*)&m;
3000 packedRule.append(p, sizeof(m));
2999 packedRule.append(reinterpret_cast<const char*>(&m), sizeof(m));
30013000 }
30023001
30033002 void
30383037 WRITE(r.flags.type, kRepElem_Unmapped);
30393038 break;
30403039 }
3041 const char* p = (const char*)&r;
3042 packedRule.append(p, sizeof(r));
3040 packedRule.append(reinterpret_cast<const char*>(&r), sizeof(r));
30433041 }
30443042
30453043 vector<Compiler::Item>
30673065 UInt8 plane = ch >> 16;
30683066 UInt8 page = (ch & 0x00ffff) >> 8;
30693067 if (buildVars.planeMap.size() <= plane)
3070 buildVars.planeMap.resize(plane + 1, 0xff);
3071 if ((UInt8)buildVars.planeMap[plane] == (UInt8)0xff) {
3068 buildVars.planeMap.resize(plane + 1, '\xff');
3069 if (UInt8(buildVars.planeMap[plane]) == 0xff) {
30723070 buildVars.planeMap[plane] = buildVars.pageMaps.size();
30733071 buildVars.pageMaps.resize(buildVars.pageMaps.size() + 1);
3074 buildVars.pageMaps.back().resize(256, 0xff);
3075 }
3076 UInt8 planeIndex = buildVars.planeMap[plane];
3072 buildVars.pageMaps.back().resize(256, '\xff');
3073 }
3074 UInt8 planeIndex = static_cast<UInt8>(buildVars.planeMap[plane]);
30773075 string& pageMap = buildVars.pageMaps[planeIndex];
3078 if ((UInt8)pageMap[page] == (UInt8)0xff) {
3076 if (UInt8(pageMap[page]) == 0xff) {
30793077 pageMap[page] = buildVars.charMaps.size();
30803078 buildVars.charMaps.resize(buildVars.charMaps.size() + 1);
30813079 buildVars.charMaps.back().resize(256);
30823080 }
3083 vector<UInt16>& charMap = buildVars.charMaps[(UInt8)pageMap[page]];
3081 vector<UInt16>& charMap = buildVars.charMaps[UInt8(pageMap[page])];
30843082 charMap[ch & 0x0000ff] = index;
30853083 }
30863084
30873085 void
3088 Compiler::align(string& table, int alignment)
3089 {
3090 int remainder = table.size() % alignment;
3086 Compiler::align(string& table, string::size_type alignment)
3087 {
3088 const string::size_type length = table.size();
3089 const string::size_type remainder = length % alignment;
30913090 if (remainder != 0)
3092 table.resize(table.size() + alignment - remainder);
3091 table.resize(length + alignment - remainder);
30933092 }
30943093
30953094 class Member {
32673266 // mapping to Unicode: direct lookup can only support one Unicode character
32683267 if (rule.replaceStr.size() == 1) {
32693268 const Item& rep = rule.replaceStr.front();
3270 int t = rep.tag.length() > 0 ? findTag(rep.tag, rule.matchStr) : 0;
3269 vector<Item>::size_type tag;
3270 if (rep.tag.length() > 0) {
3271 const int result = findTag(rep.tag, rule.matchStr);
3272 if (result < 0) {
3273 Error("tag not found", rep.tag.c_str(), rule.lineNumber);
3274 continue;
3275 }
3276 tag = static_cast<vector<Item>::size_type>(result);
3277 } else {
3278 tag = 0;
3279 }
32713280 switch (rep.type) {
32723281 case 0:
32733282 WRITE(lookup[i].usv, rep.val);
32753284
32763285 case kMatchElem_Type_Class:
32773286 {
3278 if (t == -1) {
3279 Error("tag not found", rep.tag.c_str(), rule.lineNumber);
3280