You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1502 lines
44 KiB

12 years ago
  1. #! /bin/sh
  2. # Attempt to guess a canonical system name.
  3. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
  4. # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
  5. # Free Software Foundation, Inc.
  6. timestamp='2009-12-30'
  7. # This file is free software; you can redistribute it and/or modify it
  8. # under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful, but
  13. # WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. # General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, write to the Free Software
  19. # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
  20. # 02110-1301, USA.
  21. #
  22. # As a special exception to the GNU General Public License, if you
  23. # distribute this file as part of a program that contains a
  24. # configuration script generated by Autoconf, you may include it under
  25. # the same distribution terms that you use for the rest of that program.
  26. # Originally written by Per Bothner. Please send patches (context
  27. # diff format) to <config-patches@gnu.org> and include a ChangeLog
  28. # entry.
  29. #
  30. # This script attempts to guess a canonical system name similar to
  31. # config.sub. If it succeeds, it prints the system name on stdout, and
  32. # exits with 0. Otherwise, it exits with 1.
  33. #
  34. # 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.guess;hb=HEAD
  36. me=`echo "$0" | sed -e 's,.*/,,'`
  37. usage="\
  38. Usage: $0 [OPTION]
  39. Output the configuration name of the system \`$me' is run on.
  40. Operation modes:
  41. -h, --help print this help, then exit
  42. -t, --time-stamp print date of last modification, then exit
  43. -v, --version print version number, then exit
  44. Report bugs and patches to <config-patches@gnu.org>."
  45. version="\
  46. GNU config.guess ($timestamp)
  47. Originally written by Per Bothner.
  48. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
  49. 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
  50. Software Foundation, Inc.
  51. This is free software; see the source for copying conditions. There is NO
  52. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  53. help="
  54. Try \`$me --help' for more information."
  55. # Parse command line
  56. while test $# -gt 0 ; do
  57. case $1 in
  58. --time-stamp | --time* | -t )
  59. echo "$timestamp" ; exit ;;
  60. --version | -v )
  61. echo "$version" ; exit ;;
  62. --help | --h* | -h )
  63. echo "$usage"; exit ;;
  64. -- ) # Stop option processing
  65. shift; break ;;
  66. - ) # Use stdin as input.
  67. break ;;
  68. -* )
  69. echo "$me: invalid option $1$help" >&2
  70. exit 1 ;;
  71. * )
  72. break ;;
  73. esac
  74. done
  75. if test $# != 0; then
  76. echo "$me: too many arguments$help" >&2
  77. exit 1
  78. fi
  79. trap 'exit 1' 1 2 15
  80. # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
  81. # compiler to aid in system detection is discouraged as it requires
  82. # temporary files to be created and, as you can see below, it is a
  83. # headache to deal with in a portable fashion.
  84. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
  85. # use `HOST_CC' if defined, but it is deprecated.
  86. # Portable tmp directory creation inspired by the Autoconf team.
  87. set_cc_for_build='
  88. trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
  89. trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
  90. : ${TMPDIR=/tmp} ;
  91. { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  92. { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
  93. { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  94. { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
  95. dummy=$tmp/dummy ;
  96. tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
  97. case $CC_FOR_BUILD,$HOST_CC,$CC in
  98. ,,) echo "int x;" > $dummy.c ;
  99. for c in cc gcc c89 c99 ; do
  100. if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
  101. CC_FOR_BUILD="$c"; break ;
  102. fi ;
  103. done ;
  104. if test x"$CC_FOR_BUILD" = x ; then
  105. CC_FOR_BUILD=no_compiler_found ;
  106. fi
  107. ;;
  108. ,,*) CC_FOR_BUILD=$CC ;;
  109. ,*,*) CC_FOR_BUILD=$HOST_CC ;;
  110. esac ; set_cc_for_build= ;'
  111. # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
  112. # (ghazi@noc.rutgers.edu 1994-08-24)
  113. if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
  114. PATH=$PATH:/.attbin ; export PATH
  115. fi
  116. UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
  117. UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
  118. UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
  119. UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  120. # Note: order is significant - the case branches are not exclusive.
  121. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
  122. *:NetBSD:*:*)
  123. # NetBSD (nbsd) targets should (where applicable) match one or
  124. # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
  125. # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
  126. # switched to ELF, *-*-netbsd* would select the old
  127. # object file format. This provides both forward
  128. # compatibility and a consistent mechanism for selecting the
  129. # object file format.
  130. #
  131. # Note: NetBSD doesn't particularly care about the vendor
  132. # portion of the name. We always set it to "unknown".
  133. sysctl="sysctl -n hw.machine_arch"
  134. UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
  135. /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
  136. case "${UNAME_MACHINE_ARCH}" in
  137. armeb) machine=armeb-unknown ;;
  138. arm*) machine=arm-unknown ;;
  139. sh3el) machine=shl-unknown ;;
  140. sh3eb) machine=sh-unknown ;;
  141. sh5el) machine=sh5le-unknown ;;
  142. *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
  143. esac
  144. # The Operating System including object format, if it has switched
  145. # to ELF recently, or will in the future.
  146. case "${UNAME_MACHINE_ARCH}" in
  147. arm*|i386|m68k|ns32k|sh3*|sparc|vax)
  148. eval $set_cc_for_build
  149. if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
  150. | grep -q __ELF__
  151. then
  152. # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
  153. # Return netbsd for either. FIX?
  154. os=netbsd
  155. else
  156. os=netbsdelf
  157. fi
  158. ;;
  159. *)
  160. os=netbsd
  161. ;;
  162. esac
  163. # The OS release
  164. # Debian GNU/NetBSD machines have a different userland, and
  165. # thus, need a distinct triplet. However, they do not need
  166. # kernel version information, so it can be replaced with a
  167. # suitable tag, in the style of linux-gnu.
  168. case "${UNAME_VERSION}" in
  169. Debian*)
  170. release='-gnu'
  171. ;;
  172. *)
  173. release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
  174. ;;
  175. esac
  176. # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
  177. # contains redundant information, the shorter form:
  178. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
  179. echo "${machine}-${os}${release}"
  180. exit ;;
  181. *:OpenBSD:*:*)
  182. UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
  183. echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
  184. exit ;;
  185. *:ekkoBSD:*:*)
  186. echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
  187. exit ;;
  188. *:SolidBSD:*:*)
  189. echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
  190. exit ;;
  191. macppc:MirBSD:*:*)
  192. echo powerpc-unknown-mirbsd${UNAME_RELEASE}
  193. exit ;;
  194. *:MirBSD:*:*)
  195. echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
  196. exit ;;
  197. alpha:OSF1:*:*)
  198. case $UNAME_RELEASE in
  199. *4.0)
  200. UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
  201. ;;
  202. *5.*)
  203. UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
  204. ;;
  205. esac
  206. # According to Compaq, /usr/sbin/psrinfo has been available on
  207. # OSF/1 and Tru64 systems produced since 1995. I hope that
  208. # covers most systems running today. This code pipes the CPU
  209. # types through head -n 1, so we only detect the type of CPU 0.
  210. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
  211. case "$ALPHA_CPU_TYPE" in
  212. "EV4 (21064)")
  213. UNAME_MACHINE="alpha" ;;
  214. "EV4.5 (21064)")
  215. UNAME_MACHINE="alpha" ;;
  216. "LCA4 (21066/21068)")
  217. UNAME_MACHINE="alpha" ;;
  218. "EV5 (21164)")
  219. UNAME_MACHINE="alphaev5" ;;
  220. "EV5.6 (21164A)")
  221. UNAME_MACHINE="alphaev56" ;;
  222. "EV5.6 (21164PC)")
  223. UNAME_MACHINE="alphapca56" ;;
  224. "EV5.7 (21164PC)")
  225. UNAME_MACHINE="alphapca57" ;;
  226. "EV6 (21264)")
  227. UNAME_MACHINE="alphaev6" ;;
  228. "EV6.7 (21264A)")
  229. UNAME_MACHINE="alphaev67" ;;
  230. "EV6.8CB (21264C)")
  231. UNAME_MACHINE="alphaev68" ;;
  232. "EV6.8AL (21264B)")
  233. UNAME_MACHINE="alphaev68" ;;
  234. "EV6.8CX (21264D)")
  235. UNAME_MACHINE="alphaev68" ;;
  236. "EV6.9A (21264/EV69A)")
  237. UNAME_MACHINE="alphaev69" ;;
  238. "EV7 (21364)")
  239. UNAME_MACHINE="alphaev7" ;;
  240. "EV7.9 (21364A)")
  241. UNAME_MACHINE="alphaev79" ;;
  242. esac
  243. # A Pn.n version is a patched version.
  244. # A Vn.n version is a released version.
  245. # A Tn.n version is a released field test version.
  246. # A Xn.n version is an unreleased experimental baselevel.
  247. # 1.2 uses "1.2" for uname -r.
  248. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  249. exit ;;
  250. Alpha\ *:Windows_NT*:*)
  251. # How do we know it's Interix rather than the generic POSIX subsystem?
  252. # Should we change UNAME_MACHINE based on the output of uname instead
  253. # of the specific Alpha model?
  254. echo alpha-pc-interix
  255. exit ;;
  256. 21064:Windows_NT:50:3)
  257. echo alpha-dec-winnt3.5
  258. exit ;;
  259. Amiga*:UNIX_System_V:4.0:*)
  260. echo m68k-unknown-sysv4
  261. exit ;;
  262. *:[Aa]miga[Oo][Ss]:*:*)
  263. echo ${UNAME_MACHINE}-unknown-amigaos
  264. exit ;;
  265. *:[Mm]orph[Oo][Ss]:*:*)
  266. echo ${UNAME_MACHINE}-unknown-morphos
  267. exit ;;
  268. *:OS/390:*:*)
  269. echo i370-ibm-openedition
  270. exit ;;
  271. *:z/VM:*:*)
  272. echo s390-ibm-zvmoe
  273. exit ;;
  274. *:OS400:*:*)
  275. echo powerpc-ibm-os400
  276. exit ;;
  277. arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  278. echo arm-acorn-riscix${UNAME_RELEASE}
  279. exit ;;
  280. arm:riscos:*:*|arm:RISCOS:*:*)
  281. echo arm-unknown-riscos
  282. exit ;;
  283. SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
  284. echo hppa1.1-hitachi-hiuxmpp
  285. exit ;;
  286. Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
  287. # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
  288. if test "`(/bin/universe) 2>/dev/null`" = att ; then
  289. echo pyramid-pyramid-sysv3
  290. else
  291. echo pyramid-pyramid-bsd
  292. fi
  293. exit ;;
  294. NILE*:*:*:dcosx)
  295. echo pyramid-pyramid-svr4
  296. exit ;;
  297. DRS?6000:unix:4.0:6*)
  298. echo sparc-icl-nx6
  299. exit ;;
  300. DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
  301. case `/usr/bin/uname -p` in
  302. sparc) echo sparc-icl-nx7; exit ;;
  303. esac ;;
  304. s390x:SunOS:*:*)
  305. echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  306. exit ;;
  307. sun4H:SunOS:5.*:*)
  308. echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  309. exit ;;
  310. sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
  311. echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  312. exit ;;
  313. i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
  314. echo i386-pc-auroraux${UNAME_RELEASE}
  315. exit ;;
  316. i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
  317. eval $set_cc_for_build
  318. SUN_ARCH="i386"
  319. # If there is a compiler, see if it is configured for 64-bit objects.
  320. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
  321. # This test works for both compilers.
  322. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
  323. if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
  324. (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  325. grep IS_64BIT_ARCH >/dev/null
  326. then
  327. SUN_ARCH="x86_64"
  328. fi
  329. fi
  330. echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  331. exit ;;
  332. sun4*:SunOS:6*:*)
  333. # According to config.sub, this is the proper way to canonicalize
  334. # SunOS6. Hard to guess exactly what SunOS6 will be like, but
  335. # it's likely to be more like Solaris than SunOS4.
  336. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  337. exit ;;
  338. sun4*:SunOS:*:*)
  339. case "`/usr/bin/arch -k`" in
  340. Series*|S4*)
  341. UNAME_RELEASE=`uname -v`
  342. ;;
  343. esac
  344. # Japanese Language versions have a version number like `4.1.3-JL'.
  345. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
  346. exit ;;
  347. sun3*:SunOS:*:*)
  348. echo m68k-sun-sunos${UNAME_RELEASE}
  349. exit ;;
  350. sun*:*:4.2BSD:*)
  351. UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
  352. test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
  353. case "`/bin/arch`" in
  354. sun3)
  355. echo m68k-sun-sunos${UNAME_RELEASE}
  356. ;;
  357. sun4)
  358. echo sparc-sun-sunos${UNAME_RELEASE}
  359. ;;
  360. esac
  361. exit ;;
  362. aushp:SunOS:*:*)
  363. echo sparc-auspex-sunos${UNAME_RELEASE}
  364. exit ;;
  365. # The situation for MiNT is a little confusing. The machine name
  366. # can be virtually everything (everything which is not
  367. # "atarist" or "atariste" at least should have a processor
  368. # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
  369. # to the lowercase version "mint" (or "freemint"). Finally
  370. # the system name "TOS" denotes a system which is actually not
  371. # MiNT. But MiNT is downward compatible to TOS, so this should
  372. # be no problem.
  373. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
  374. echo m68k-atari-mint${UNAME_RELEASE}
  375. exit ;;
  376. atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
  377. echo m68k-atari-mint${UNAME_RELEASE}
  378. exit ;;
  379. *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
  380. echo m68k-atari-mint${UNAME_RELEASE}
  381. exit ;;
  382. milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
  383. echo m68k-milan-mint${UNAME_RELEASE}
  384. exit ;;
  385. hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
  386. echo m68k-hades-mint${UNAME_RELEASE}
  387. exit ;;
  388. *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
  389. echo m68k-unknown-mint${UNAME_RELEASE}
  390. exit ;;
  391. m68k:machten:*:*)
  392. echo m68k-apple-machten${UNAME_RELEASE}
  393. exit ;;
  394. powerpc:machten:*:*)
  395. echo powerpc-apple-machten${UNAME_RELEASE}
  396. exit ;;
  397. RISC*:Mach:*:*)
  398. echo mips-dec-mach_bsd4.3
  399. exit ;;
  400. RISC*:ULTRIX:*:*)
  401. echo mips-dec-ultrix${UNAME_RELEASE}
  402. exit ;;
  403. VAX*:ULTRIX*:*:*)
  404. echo vax-dec-ultrix${UNAME_RELEASE}
  405. exit ;;
  406. 2020:CLIX:*:* | 2430:CLIX:*:*)
  407. echo clipper-intergraph-clix${UNAME_RELEASE}
  408. exit ;;
  409. mips:*:*:UMIPS | mips:*:*:RISCos)
  410. eval $set_cc_for_build
  411. sed 's/^ //' << EOF >$dummy.c
  412. #ifdef __cplusplus
  413. #include <stdio.h> /* for printf() prototype */
  414. int main (int argc, char *argv[]) {
  415. #else
  416. int main (argc, argv) int argc; char *argv[]; {
  417. #endif
  418. #if defined (host_mips) && defined (MIPSEB)
  419. #if defined (SYSTYPE_SYSV)
  420. printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
  421. #endif
  422. #if defined (SYSTYPE_SVR4)
  423. printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
  424. #endif
  425. #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
  426. printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
  427. #endif
  428. #endif
  429. exit (-1);
  430. }
  431. EOF
  432. $CC_FOR_BUILD -o $dummy $dummy.c &&
  433. dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
  434. SYSTEM_NAME=`$dummy $dummyarg` &&
  435. { echo "$SYSTEM_NAME"; exit; }
  436. echo mips-mips-riscos${UNAME_RELEASE}
  437. exit ;;
  438. Motorola:PowerMAX_OS:*:*)
  439. echo powerpc-motorola-powermax
  440. exit ;;
  441. Motorola:*:4.3:PL8-*)
  442. echo powerpc-harris-powermax
  443. exit ;;
  444. Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
  445. echo powerpc-harris-powermax
  446. exit ;;
  447. Night_Hawk:Power_UNIX:*:*)
  448. echo powerpc-harris-powerunix
  449. exit ;;
  450. m88k:CX/UX:7*:*)
  451. echo m88k-harris-cxux7
  452. exit ;;
  453. m88k:*:4*:R4*)
  454. echo m88k-motorola-sysv4
  455. exit ;;
  456. m88k:*:3*:R3*)
  457. echo m88k-motorola-sysv3
  458. exit ;;
  459. AViiON:dgux:*:*)
  460. # DG/UX returns AViiON for all architectures
  461. UNAME_PROCESSOR=`/usr/bin/uname -p`
  462. if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
  463. then
  464. if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
  465. [ ${TARGET_BINARY_INTERFACE}x = x ]
  466. then
  467. echo m88k-dg-dgux${UNAME_RELEASE}
  468. else
  469. echo m88k-dg-dguxbcs${UNAME_RELEASE}
  470. fi
  471. else
  472. echo i586-dg-dgux${UNAME_RELEASE}
  473. fi
  474. exit ;;
  475. M88*:DolphinOS:*:*) # DolphinOS (SVR3)
  476. echo m88k-dolphin-sysv3
  477. exit ;;
  478. M88*:*:R3*:*)
  479. # Delta 88k system running SVR3
  480. echo m88k-motorola-sysv3
  481. exit ;;
  482. XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
  483. echo m88k-tektronix-sysv3
  484. exit ;;
  485. Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
  486. echo m68k-tektronix-bsd
  487. exit ;;
  488. *:IRIX*:*:*)
  489. echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
  490. exit ;;
  491. ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
  492. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
  493. exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
  494. i*86:AIX:*:*)
  495. echo i386-ibm-aix
  496. exit ;;
  497. ia64:AIX:*:*)
  498. if [ -x /usr/bin/oslevel ] ; then
  499. IBM_REV=`/usr/bin/oslevel`
  500. else
  501. IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
  502. fi
  503. echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
  504. exit ;;
  505. *:AIX:2:3)
  506. if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
  507. eval $set_cc_for_build
  508. sed 's/^ //' << EOF >$dummy.c
  509. #include <sys/systemcfg.h>
  510. main()
  511. {
  512. if (!__power_pc())
  513. exit(1);
  514. puts("powerpc-ibm-aix3.2.5");
  515. exit(0);
  516. }
  517. EOF
  518. if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
  519. then
  520. echo "$SYSTEM_NAME"
  521. else
  522. echo rs6000-ibm-aix3.2.5
  523. fi
  524. elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
  525. echo rs6000-ibm-aix3.2.4
  526. else
  527. echo rs6000-ibm-aix3.2
  528. fi
  529. exit ;;
  530. *:AIX:*:[456])
  531. IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
  532. if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
  533. IBM_ARCH=rs6000
  534. else
  535. IBM_ARCH=powerpc
  536. fi
  537. if [ -x /usr/bin/oslevel ] ; then
  538. IBM_REV=`/usr/bin/oslevel`
  539. else
  540. IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
  541. fi
  542. echo ${IBM_ARCH}-ibm-aix${IBM_REV}
  543. exit ;;
  544. *:AIX:*:*)
  545. echo rs6000-ibm-aix
  546. exit ;;
  547. ibmrt:4.4BSD:*|romp-ibm:BSD:*)
  548. echo romp-ibm-bsd4.4
  549. exit ;;
  550. ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
  551. echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
  552. exit ;; # report: romp-ibm BSD 4.3
  553. *:BOSX:*:*)
  554. echo rs6000-bull-bosx
  555. exit ;;
  556. DPX/2?00:B.O.S.:*:*)
  557. echo m68k-bull-sysv3
  558. exit ;;
  559. 9000/[34]??:4.3bsd:1.*:*)
  560. echo m68k-hp-bsd
  561. exit ;;
  562. hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
  563. echo m68k-hp-bsd4.4
  564. exit ;;
  565. 9000/[34678]??:HP-UX:*:*)
  566. HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  567. case "${UNAME_MACHINE}" in
  568. 9000/31? ) HP_ARCH=m68000 ;;
  569. 9000/[34]?? ) HP_ARCH=m68k ;;
  570. 9000/[678][0-9][0-9])
  571. if [ -x /usr/bin/getconf ]; then
  572. sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
  573. sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  574. case "${sc_cpu_version}" in
  575. 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
  576. 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
  577. 532) # CPU_PA_RISC2_0
  578. case "${sc_kernel_bits}" in
  579. 32) HP_ARCH="hppa2.0n" ;;
  580. 64) HP_ARCH="hppa2.0w" ;;
  581. '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
  582. esac ;;
  583. esac
  584. fi
  585. if [ "${HP_ARCH}" = "" ]; then
  586. eval $set_cc_for_build
  587. sed 's/^ //' << EOF >$dummy.c
  588. #define _HPUX_SOURCE
  589. #include <stdlib.h>
  590. #include <unistd.h>
  591. int main ()
  592. {
  593. #if defined(_SC_KERNEL_BITS)
  594. long bits = sysconf(_SC_KERNEL_BITS);
  595. #endif
  596. long cpu = sysconf (_SC_CPU_VERSION);
  597. switch (cpu)
  598. {
  599. case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  600. case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  601. case CPU_PA_RISC2_0:
  602. #if defined(_SC_KERNEL_BITS)
  603. switch (bits)
  604. {
  605. case 64: puts ("hppa2.0w"); break;
  606. case 32: puts ("hppa2.0n"); break;
  607. default: puts ("hppa2.0"); break;
  608. } break;
  609. #else /* !defined(_SC_KERNEL_BITS) */
  610. puts ("hppa2.0"); break;
  611. #endif
  612. default: puts ("hppa1.0"); break;
  613. }
  614. exit (0);
  615. }
  616. EOF
  617. (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
  618. test -z "$HP_ARCH" && HP_ARCH=hppa
  619. fi ;;
  620. esac
  621. if [ ${HP_ARCH} = "hppa2.0w" ]
  622. then
  623. eval $set_cc_for_build
  624. # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
  625. # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
  626. # generating 64-bit code. GNU and HP use different nomenclature:
  627. #
  628. # $ CC_FOR_BUILD=cc ./config.guess
  629. # => hppa2.0w-hp-hpux11.23
  630. # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
  631. # => hppa64-hp-hpux11.23
  632. if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
  633. grep -q __LP64__
  634. then
  635. HP_ARCH="hppa2.0w"
  636. else
  637. HP_ARCH="hppa64"
  638. fi
  639. fi
  640. echo ${HP_ARCH}-hp-hpux${HPUX_REV}
  641. exit ;;
  642. ia64:HP-UX:*:*)
  643. HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  644. echo ia64-hp-hpux${HPUX_REV}
  645. exit ;;
  646. 3050*:HI-UX:*:*)
  647. eval $set_cc_for_build
  648. sed 's/^ //' << EOF >$dummy.c
  649. #include <unistd.h>
  650. int
  651. main ()
  652. {
  653. long cpu = sysconf (_SC_CPU_VERSION);
  654. /* The order matters, because CPU_IS_HP_MC68K erroneously returns
  655. true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
  656. results, however. */
  657. if (CPU_IS_PA_RISC (cpu))
  658. {
  659. switch (cpu)
  660. {
  661. case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
  662. case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
  663. case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
  664. default: puts ("hppa-hitachi-hiuxwe2"); break;
  665. }
  666. }
  667. else if (CPU_IS_HP_MC68K (cpu))
  668. puts ("m68k-hitachi-hiuxwe2");
  669. else puts ("unknown-hitachi-hiuxwe2");
  670. exit (0);
  671. }
  672. EOF
  673. $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
  674. { echo "$SYSTEM_NAME"; exit; }
  675. echo unknown-hitachi-hiuxwe2
  676. exit ;;
  677. 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
  678. echo hppa1.1-hp-bsd
  679. exit ;;
  680. 9000/8??:4.3bsd:*:*)
  681. echo hppa1.0-hp-bsd
  682. exit ;;
  683. *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
  684. echo hppa1.0-hp-mpeix
  685. exit ;;
  686. hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
  687. echo hppa1.1-hp-osf
  688. exit ;;
  689. hp8??:OSF1:*:*)
  690. echo hppa1.0-hp-osf
  691. exit ;;
  692. i*86:OSF1:*:*)
  693. if [ -x /usr/sbin/sysversion ] ; then
  694. echo ${UNAME_MACHINE}-unknown-osf1mk
  695. else
  696. echo ${UNAME_MACHINE}-unknown-osf1
  697. fi
  698. exit ;;
  699. parisc*:Lites*:*:*)
  700. echo hppa1.1-hp-lites
  701. exit ;;
  702. C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  703. echo c1-convex-bsd
  704. exit ;;
  705. C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  706. if getsysinfo -f scalar_acc
  707. then echo c32-convex-bsd
  708. else echo c2-convex-bsd
  709. fi
  710. exit ;;
  711. C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  712. echo c34-convex-bsd
  713. exit ;;
  714. C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
  715. echo c38-convex-bsd
  716. exit ;;
  717. C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  718. echo c4-convex-bsd
  719. exit ;;
  720. CRAY*Y-MP:*:*:*)
  721. echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  722. exit ;;
  723. CRAY*[A-Z]90:*:*:*)
  724. echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
  725. | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
  726. -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
  727. -e 's/\.[^.]*$/.X/'
  728. exit ;;
  729. CRAY*TS:*:*:*)
  730. echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  731. exit ;;
  732. CRAY*T3E:*:*:*)
  733. echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  734. exit ;;
  735. CRAY*SV1:*:*:*)
  736. echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  737. exit ;;
  738. *:UNICOS/mp:*:*)
  739. echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  740. exit ;;
  741. F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
  742. FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  743. FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  744. FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  745. echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  746. exit ;;
  747. 5000:UNIX_System_V:4.*:*)
  748. FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  749. FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
  750. echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  751. exit ;;
  752. i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
  753. echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
  754. exit ;;
  755. sparc*:BSD/OS:*:*)
  756. echo sparc-unknown-bsdi${UNAME_RELEASE}
  757. exit ;;
  758. *:BSD/OS:*:*)
  759. echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
  760. exit ;;
  761. *:FreeBSD:*:*)
  762. case ${UNAME_MACHINE} in
  763. pc98)
  764. echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  765. amd64)
  766. echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  767. *)
  768. echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  769. esac
  770. exit ;;
  771. i*:CYGWIN*:*)
  772. echo ${UNAME_MACHINE}-pc-cygwin
  773. exit ;;
  774. *:MINGW*:*)
  775. echo ${UNAME_MACHINE}-pc-mingw32
  776. exit ;;
  777. i*:windows32*:*)
  778. # uname -m includes "-pc" on this system.
  779. echo ${UNAME_MACHINE}-mingw32
  780. exit ;;
  781. i*:PW*:*)
  782. echo ${UNAME_MACHINE}-pc-pw32
  783. exit ;;
  784. *:Interix*:*)
  785. case ${UNAME_MACHINE} in
  786. x86)
  787. echo i586-pc-interix${UNAME_RELEASE}
  788. exit ;;
  789. authenticamd | genuineintel | EM64T)
  790. echo x86_64-unknown-interix${UNAME_RELEASE}
  791. exit ;;
  792. IA64)
  793. echo ia64-unknown-interix${UNAME_RELEASE}
  794. exit ;;
  795. esac ;;
  796. [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
  797. echo i${UNAME_MACHINE}-pc-mks
  798. exit ;;
  799. 8664:Windows_NT:*)
  800. echo x86_64-pc-mks
  801. exit ;;
  802. i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
  803. # How do we know it's Interix rather than the generic POSIX subsystem?
  804. # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
  805. # UNAME_MACHINE based on the output of uname instead of i386?
  806. echo i586-pc-interix
  807. exit ;;
  808. i*:UWIN*:*)
  809. echo ${UNAME_MACHINE}-pc-uwin
  810. exit ;;
  811. amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
  812. echo x86_64-unknown-cygwin
  813. exit ;;
  814. p*:CYGWIN*:*)
  815. echo powerpcle-unknown-cygwin
  816. exit ;;
  817. prep*:SunOS:5.*:*)
  818. echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  819. exit ;;
  820. *:GNU:*:*)
  821. # the GNU system
  822. echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  823. exit ;;
  824. *:GNU/*:*:*)
  825. # other systems with GNU libc and userland
  826. echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
  827. exit ;;
  828. i*86:Minix:*:*)
  829. echo ${UNAME_MACHINE}-pc-minix
  830. exit ;;
  831. alpha:Linux:*:*)
  832. case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  833. EV5) UNAME_MACHINE=alphaev5 ;;
  834. EV56) UNAME_MACHINE=alphaev56 ;;
  835. PCA56) UNAME_MACHINE=alphapca56 ;;
  836. PCA57) UNAME_MACHINE=alphapca56 ;;
  837. EV6) UNAME_MACHINE=alphaev6 ;;
  838. EV67) UNAME_MACHINE=alphaev67 ;;
  839. EV68*) UNAME_MACHINE=alphaev68 ;;
  840. esac
  841. objdump --private-headers /bin/sh | grep -q ld.so.1
  842. if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
  843. echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
  844. exit ;;
  845. arm*:Linux:*:*)
  846. eval $set_cc_for_build
  847. if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
  848. | grep -q __ARM_EABI__
  849. then
  850. echo ${UNAME_MACHINE}-unknown-linux-gnu
  851. else
  852. echo ${UNAME_MACHINE}-unknown-linux-gnueabi
  853. fi
  854. exit ;;
  855. avr32*:Linux:*:*)
  856. echo ${UNAME_MACHINE}-unknown-linux-gnu
  857. exit ;;
  858. cris:Linux:*:*)
  859. echo cris-axis-linux-gnu
  860. exit ;;
  861. crisv32:Linux:*:*)
  862. echo crisv32-axis-linux-gnu
  863. exit ;;
  864. frv:Linux:*:*)
  865. echo frv-unknown-linux-gnu
  866. exit ;;
  867. i*86:Linux:*:*)
  868. LIBC=gnu
  869. eval $set_cc_for_build
  870. sed 's/^ //' << EOF >$dummy.c
  871. #ifdef __dietlibc__
  872. LIBC=dietlibc
  873. #endif
  874. EOF
  875. eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
  876. echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
  877. exit ;;
  878. ia64:Linux:*:*)
  879. echo ${UNAME_MACHINE}-unknown-linux-gnu
  880. exit ;;
  881. m32r*:Linux:*:*)
  882. echo ${UNAME_MACHINE}-unknown-linux-gnu
  883. exit ;;
  884. m68*:Linux:*:*)
  885. echo ${UNAME_MACHINE}-unknown-linux-gnu
  886. exit ;;
  887. mips:Linux:*:* | mips64:Linux:*:*)
  888. eval $set_cc_for_build
  889. sed 's/^ //' << EOF >$dummy.c
  890. #undef CPU
  891. #undef ${UNAME_MACHINE}
  892. #undef ${UNAME_MACHINE}el
  893. #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
  894. CPU=${UNAME_MACHINE}el
  895. #else
  896. #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
  897. CPU=${UNAME_MACHINE}
  898. #else
  899. CPU=
  900. #endif
  901. #endif
  902. EOF
  903. eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
  904. test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  905. ;;
  906. or32:Linux:*:*)
  907. echo or32-unknown-linux-gnu
  908. exit ;;
  909. padre:Linux:*:*)
  910. echo sparc-unknown-linux-gnu
  911. exit ;;
  912. parisc64:Linux:*:* | hppa64:Linux:*:*)
  913. echo hppa64-unknown-linux-gnu
  914. exit ;;
  915. parisc:Linux:*:* | hppa:Linux:*:*)
  916. # Look for CPU level
  917. case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  918. PA7*) echo hppa1.1-unknown-linux-gnu ;;
  919. PA8*) echo hppa2.0-unknown-linux-gnu ;;
  920. *) echo hppa-unknown-linux-gnu ;;
  921. esac
  922. exit ;;
  923. ppc64:Linux:*:*)
  924. echo powerpc64-unknown-linux-gnu
  925. exit ;;
  926. ppc:Linux:*:*)
  927. echo powerpc-unknown-linux-gnu
  928. exit ;;
  929. s390:Linux:*:* | s390x:Linux:*:*)
  930. echo ${UNAME_MACHINE}-ibm-linux
  931. exit ;;
  932. sh64*:Linux:*:*)
  933. echo ${UNAME_MACHINE}-unknown-linux-gnu
  934. exit ;;
  935. sh*:Linux:*:*)
  936. echo ${UNAME_MACHINE}-unknown-linux-gnu
  937. exit ;;
  938. sparc:Linux:*:* | sparc64:Linux:*:*)
  939. echo ${UNAME_MACHINE}-unknown-linux-gnu
  940. exit ;;
  941. vax:Linux:*:*)
  942. echo ${UNAME_MACHINE}-dec-linux-gnu
  943. exit ;;
  944. x86_64:Linux:*:*)
  945. echo x86_64-unknown-linux-gnu
  946. exit ;;
  947. xtensa*:Linux:*:*)
  948. echo ${UNAME_MACHINE}-unknown-linux-gnu
  949. exit ;;
  950. i*86:DYNIX/ptx:4*:*)
  951. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  952. # earlier versions are messed up and put the nodename in both
  953. # sysname and nodename.
  954. echo i386-sequent-sysv4
  955. exit ;;
  956. i*86:UNIX_SV:4.2MP:2.*)
  957. # Unixware is an offshoot of SVR4, but it has its own version
  958. # number series starting with 2...
  959. # I am not positive that other SVR4 systems won't match this,
  960. # I just have to hope. -- rms.
  961. # Use sysv4.2uw... so that sysv4* matches it.
  962. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  963. exit ;;
  964. i*86:OS/2:*:*)
  965. # If we were able to find `uname', then EMX Unix compatibility
  966. # is probably installed.
  967. echo ${UNAME_MACHINE}-pc-os2-emx
  968. exit ;;
  969. i*86:XTS-300:*:STOP)
  970. echo ${UNAME_MACHINE}-unknown-stop
  971. exit ;;
  972. i*86:atheos:*:*)
  973. echo ${UNAME_MACHINE}-unknown-atheos
  974. exit ;;
  975. i*86:syllable:*:*)
  976. echo ${UNAME_MACHINE}-pc-syllable
  977. exit ;;
  978. i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
  979. echo i386-unknown-lynxos${UNAME_RELEASE}
  980. exit ;;
  981. i*86:*DOS:*:*)
  982. echo ${UNAME_MACHINE}-pc-msdosdjgpp
  983. exit ;;
  984. i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
  985. UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
  986. if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
  987. echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
  988. else
  989. echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
  990. fi
  991. exit ;;
  992. i*86:*:5:[678]*)
  993. # UnixWare 7.x, OpenUNIX and OpenServer 6.
  994. case `/bin/uname -X | grep "^Machine"` in
  995. *486*) UNAME_MACHINE=i486 ;;
  996. *Pentium) UNAME_MACHINE=i586 ;;
  997. *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
  998. esac
  999. echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
  1000. exit ;;
  1001. i*86:*:3.2:*)
  1002. if test -f /usr/options/cb.name; then
  1003. UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
  1004. echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
  1005. elif /bin/uname -X 2>/dev/null >/dev/null ; then
  1006. UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
  1007. (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
  1008. (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
  1009. && UNAME_MACHINE=i586
  1010. (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
  1011. && UNAME_MACHINE=i686
  1012. (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
  1013. && UNAME_MACHINE=i686
  1014. echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
  1015. else
  1016. echo ${UNAME_MACHINE}-pc-sysv32
  1017. fi
  1018. exit ;;
  1019. pc:*:*:*)
  1020. # Left here for compatibility:
  1021. # uname -m prints for DJGPP always 'pc', but it prints nothing about
  1022. # the processor, so we play safe by assuming i586.
  1023. # Note: whatever this is, it MUST be the same as what config.sub
  1024. # prints for the "djgpp" host, or else GDB configury will decide that
  1025. # this is a cross-build.
  1026. echo i586-pc-msdosdjgpp
  1027. exit ;;
  1028. Intel:Mach:3*:*)
  1029. echo i386-pc-mach3
  1030. exit ;;
  1031. paragon:*:*:*)
  1032. echo i860-intel-osf1
  1033. exit ;;
  1034. i860:*:4.*:*) # i860-SVR4
  1035. if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
  1036. echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
  1037. else # Add other i860-SVR4 vendors below as they are discovered.
  1038. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
  1039. fi
  1040. exit ;;
  1041. mini*:CTIX:SYS*5:*)
  1042. # "miniframe"
  1043. echo m68010-convergent-sysv
  1044. exit ;;
  1045. mc68k:UNIX:SYSTEM5:3.51m)
  1046. echo m68k-convergent-sysv
  1047. exit ;;
  1048. M680?0:D-NIX:5.3:*)
  1049. echo m68k-diab-dnix
  1050. exit ;;
  1051. M68*:*:R3V[5678]*:*)
  1052. test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
  1053. 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
  1054. OS_REL=''
  1055. test -r /etc/.relid \
  1056. && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1057. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1058. && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
  1059. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1060. && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  1061. 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  1062. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1063. && { echo i486-ncr-sysv4; exit; } ;;
  1064. NCR*:*:4.2:* | MPRAS*:*:4.2:*)
  1065. OS_REL='.3'
  1066. test -r /etc/.relid \
  1067. && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1068. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1069. && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
  1070. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1071. && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
  1072. /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
  1073. && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  1074. m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
  1075. echo m68k-unknown-lynxos${UNAME_RELEASE}
  1076. exit ;;
  1077. mc68030:UNIX_System_V:4.*:*)
  1078. echo m68k-atari-sysv4
  1079. exit ;;
  1080. TSUNAMI:LynxOS:2.*:*)
  1081. echo sparc-unknown-lynxos${UNAME_RELEASE}
  1082. exit ;;
  1083. rs6000:LynxOS:2.*:*)
  1084. echo rs6000-unknown-lynxos${UNAME_RELEASE}
  1085. exit ;;
  1086. PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
  1087. echo powerpc-unknown-lynxos${UNAME_RELEASE}
  1088. exit ;;
  1089. SM[BE]S:UNIX_SV:*:*)
  1090. echo mips-dde-sysv${UNAME_RELEASE}
  1091. exit ;;
  1092. RM*:ReliantUNIX-*:*:*)
  1093. echo mips-sni-sysv4
  1094. exit ;;
  1095. RM*:SINIX-*:*:*)
  1096. echo mips-sni-sysv4
  1097. exit ;;
  1098. *:SINIX-*:*:*)
  1099. if uname -p 2>/dev/null >/dev/null ; then
  1100. UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1101. echo ${UNAME_MACHINE}-sni-sysv4
  1102. else
  1103. echo ns32k-sni-sysv
  1104. fi
  1105. exit ;;
  1106. PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  1107. # says <Richard.M.Bartel@ccMail.Census.GOV>
  1108. echo i586-unisys-sysv4
  1109. exit ;;
  1110. *:UNIX_System_V:4*:FTX*)
  1111. # From Gerald Hewes <hewes@openmarket.com>.
  1112. # How about differentiating between stratus architectures? -djm
  1113. echo hppa1.1-stratus-sysv4
  1114. exit ;;
  1115. *:*:*:FTX*)
  1116. # From seanf@swdc.stratus.com.
  1117. echo i860-stratus-sysv4
  1118. exit ;;
  1119. i*86:VOS:*:*)
  1120. # From Paul.Green@stratus.com.
  1121. echo ${UNAME_MACHINE}-stratus-vos
  1122. exit ;;
  1123. *:VOS:*:*)
  1124. # From Paul.Green@stratus.com.
  1125. echo hppa1.1-stratus-vos
  1126. exit ;;
  1127. mc68*:A/UX:*:*)
  1128. echo m68k-apple-aux${UNAME_RELEASE}
  1129. exit ;;
  1130. news*:NEWS-OS:6*:*)
  1131. echo mips-sony-newsos6
  1132. exit ;;
  1133. R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  1134. if [ -d /usr/nec ]; then
  1135. echo mips-nec-sysv${UNAME_RELEASE}
  1136. else
  1137. echo mips-unknown-sysv${UNAME_RELEASE}
  1138. fi
  1139. exit ;;
  1140. BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
  1141. echo powerpc-be-beos
  1142. exit ;;
  1143. BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
  1144. echo powerpc-apple-beos
  1145. exit ;;
  1146. BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
  1147. echo i586-pc-beos
  1148. exit ;;
  1149. BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
  1150. echo i586-pc-haiku
  1151. exit ;;
  1152. SX-4:SUPER-UX:*:*)
  1153. echo sx4-nec-superux${UNAME_RELEASE}
  1154. exit ;;
  1155. SX-5:SUPER-UX:*:*)
  1156. echo sx5-nec-superux${UNAME_RELEASE}
  1157. exit ;;
  1158. SX-6:SUPER-UX:*:*)
  1159. echo sx6-nec-superux${UNAME_RELEASE}
  1160. exit ;;
  1161. SX-7:SUPER-UX:*:*)
  1162. echo sx7-nec-superux${UNAME_RELEASE}
  1163. exit ;;
  1164. SX-8:SUPER-UX:*:*)
  1165. echo sx8-nec-superux${UNAME_RELEASE}
  1166. exit ;;
  1167. SX-8R:SUPER-UX:*:*)
  1168. echo sx8r-nec-superux${UNAME_RELEASE}
  1169. exit ;;
  1170. Power*:Rhapsody:*:*)
  1171. echo powerpc-apple-rhapsody${UNAME_RELEASE}
  1172. exit ;;
  1173. *:Rhapsody:*:*)
  1174. echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
  1175. exit ;;
  1176. *:Darwin:*:*)
  1177. UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
  1178. case $UNAME_PROCESSOR in
  1179. i386)
  1180. eval $set_cc_for_build
  1181. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
  1182. if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
  1183. (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  1184. grep IS_64BIT_ARCH >/dev/null
  1185. then
  1186. UNAME_PROCESSOR="x86_64"
  1187. fi
  1188. fi ;;
  1189. unknown) UNAME_PROCESSOR=powerpc ;;
  1190. esac
  1191. echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
  1192. exit ;;
  1193. *:procnto*:*:* | *:QNX:[0123456789]*:*)
  1194. UNAME_PROCESSOR=`uname -p`
  1195. if test "$UNAME_PROCESSOR" = "x86"; then
  1196. UNAME_PROCESSOR=i386
  1197. UNAME_MACHINE=pc
  1198. fi
  1199. echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
  1200. exit ;;
  1201. *:QNX:*:4*)
  1202. echo i386-pc-qnx
  1203. exit ;;
  1204. NSE-?:NONSTOP_KERNEL:*:*)
  1205. echo nse-tandem-nsk${UNAME_RELEASE}
  1206. exit ;;
  1207. NSR-?:NONSTOP_KERNEL:*:*)
  1208. echo nsr-tandem-nsk${UNAME_RELEASE}
  1209. exit ;;
  1210. *:NonStop-UX:*:*)
  1211. echo mips-compaq-nonstopux
  1212. exit ;;
  1213. BS2000:POSIX*:*:*)
  1214. echo bs2000-siemens-sysv
  1215. exit ;;
  1216. DS/*:UNIX_System_V:*:*)
  1217. echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
  1218. exit ;;
  1219. *:Plan9:*:*)
  1220. # "uname -m" is not consistent, so use $cputype instead. 386
  1221. # is converted to i386 for consistency with other x86
  1222. # operating systems.
  1223. if test "$cputype" = "386"; then
  1224. UNAME_MACHINE=i386
  1225. else
  1226. UNAME_MACHINE="$cputype"
  1227. fi
  1228. echo ${UNAME_MACHINE}-unknown-plan9
  1229. exit ;;
  1230. *:TOPS-10:*:*)
  1231. echo pdp10-unknown-tops10
  1232. exit ;;
  1233. *:TENEX:*:*)
  1234. echo pdp10-unknown-tenex
  1235. exit ;;
  1236. KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
  1237. echo pdp10-dec-tops20
  1238. exit ;;
  1239. XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
  1240. echo pdp10-xkl-tops20
  1241. exit ;;
  1242. *:TOPS-20:*:*)
  1243. echo pdp10-unknown-tops20
  1244. exit ;;
  1245. *:ITS:*:*)
  1246. echo pdp10-unknown-its
  1247. exit ;;
  1248. SEI:*:*:SEIUX)
  1249. echo mips-sei-seiux${UNAME_RELEASE}
  1250. exit ;;
  1251. *:DragonFly:*:*)
  1252. echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  1253. exit ;;
  1254. *:*VMS:*:*)
  1255. UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1256. case "${UNAME_MACHINE}" in
  1257. A*) echo alpha-dec-vms ; exit ;;
  1258. I*) echo ia64-dec-vms ; exit ;;
  1259. V*) echo vax-dec-vms ; exit ;;
  1260. esac ;;
  1261. *:XENIX:*:SysV)
  1262. echo i386-pc-xenix
  1263. exit ;;
  1264. i*86:skyos:*:*)
  1265. echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
  1266. exit ;;
  1267. i*86:rdos:*:*)
  1268. echo ${UNAME_MACHINE}-pc-rdos
  1269. exit ;;
  1270. i*86:AROS:*:*)
  1271. echo ${UNAME_MACHINE}-pc-aros
  1272. exit ;;
  1273. esac
  1274. #echo '(No uname command or uname output not recognized.)' 1>&2
  1275. #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  1276. eval $set_cc_for_build
  1277. cat >$dummy.c <<EOF
  1278. #ifdef _SEQUENT_
  1279. # include <sys/types.h>
  1280. # include <sys/utsname.h>
  1281. #endif
  1282. main ()
  1283. {
  1284. #if defined (sony)
  1285. #if defined (MIPSEB)
  1286. /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
  1287. I don't know.... */
  1288. printf ("mips-sony-bsd\n"); exit (0);
  1289. #else
  1290. #include <sys/param.h>
  1291. printf ("m68k-sony-newsos%s\n",
  1292. #ifdef NEWSOS4
  1293. "4"
  1294. #else
  1295. ""
  1296. #endif
  1297. ); exit (0);
  1298. #endif
  1299. #endif
  1300. #if defined (__arm) && defined (__acorn) && defined (__unix)
  1301. printf ("arm-acorn-riscix\n"); exit (0);
  1302. #endif
  1303. #if defined (hp300) && !defined (hpux)
  1304. printf ("m68k-hp-bsd\n"); exit (0);
  1305. #endif
  1306. #if defined (NeXT)
  1307. #if !defined (__ARCHITECTURE__)
  1308. #define __ARCHITECTURE__ "m68k"
  1309. #endif
  1310. int version;
  1311. version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  1312. if (version < 4)
  1313. printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  1314. else
  1315. printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  1316. exit (0);
  1317. #endif
  1318. #if defined (MULTIMAX) || defined (n16)
  1319. #if defined (UMAXV)
  1320. printf ("ns32k-encore-sysv\n"); exit (0);
  1321. #else
  1322. #if defined (CMU)
  1323. printf ("ns32k-encore-mach\n"); exit (0);
  1324. #else
  1325. printf ("ns32k-encore-bsd\n"); exit (0);
  1326. #endif
  1327. #endif
  1328. #endif
  1329. #if defined (__386BSD__)
  1330. printf ("i386-pc-bsd\n"); exit (0);
  1331. #endif
  1332. #if defined (sequent)
  1333. #if defined (i386)
  1334. printf ("i386-sequent-dynix\n"); exit (0);
  1335. #endif
  1336. #if defined (ns32000)
  1337. printf ("ns32k-sequent-dynix\n"); exit (0);
  1338. #endif
  1339. #endif
  1340. #if defined (_SEQUENT_)
  1341. struct utsname un;
  1342. uname(&un);
  1343. if (strncmp(un.version, "V2", 2) == 0) {
  1344. printf ("i386-sequent-ptx2\n"); exit (0);
  1345. }
  1346. if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
  1347. printf ("i386-sequent-ptx1\n"); exit (0);
  1348. }
  1349. printf ("i386-sequent-ptx\n"); exit (0);
  1350. #endif
  1351. #if defined (vax)
  1352. # if !defined (ultrix)
  1353. # include <sys/param.h>
  1354. # if defined (BSD)
  1355. # if BSD == 43
  1356. printf ("vax-dec-bsd4.3\n"); exit (0);
  1357. # else
  1358. # if BSD == 199006
  1359. printf ("vax-dec-bsd4.3reno\n"); exit (0);
  1360. # else
  1361. printf ("vax-dec-bsd\n"); exit (0);
  1362. # endif
  1363. # endif
  1364. # else
  1365. printf ("vax-dec-bsd\n"); exit (0);
  1366. # endif
  1367. # else
  1368. printf ("vax-dec-ultrix\n"); exit (0);
  1369. # endif
  1370. #endif
  1371. #if defined (alliant) && defined (i860)
  1372. printf ("i860-alliant-bsd\n"); exit (0);
  1373. #endif
  1374. exit (1);
  1375. }
  1376. EOF
  1377. $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
  1378. { echo "$SYSTEM_NAME"; exit; }
  1379. # Apollos put the system type in the environment.
  1380. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
  1381. # Convex versions that predate uname can use getsysinfo(1)
  1382. if [ -x /usr/convex/getsysinfo ]
  1383. then
  1384. case `getsysinfo -f cpu_type` in
  1385. c1*)
  1386. echo c1-convex-bsd
  1387. exit ;;
  1388. c2*)
  1389. if getsysinfo -f scalar_acc
  1390. then echo c32-convex-bsd
  1391. else echo c2-convex-bsd
  1392. fi
  1393. exit ;;
  1394. c34*)
  1395. echo c34-convex-bsd
  1396. exit ;;
  1397. c38*)
  1398. echo c38-convex-bsd
  1399. exit ;;
  1400. c4*)
  1401. echo c4-convex-bsd
  1402. exit ;;
  1403. esac
  1404. fi
  1405. cat >&2 <<EOF
  1406. $0: unable to guess system type
  1407. This script, last modified $timestamp, has failed to recognize
  1408. the operating system you are using. It is advised that you
  1409. download the most up to date version of the config scripts from
  1410. http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
  1411. and
  1412. http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
  1413. If the version you run ($0) is already up to date, please
  1414. send the following data and any information you think might be
  1415. pertinent to <config-patches@gnu.org> in order to provide the needed
  1416. information to handle your system.
  1417. config.guess timestamp = $timestamp
  1418. uname -m = `(uname -m) 2>/dev/null || echo unknown`
  1419. uname -r = `(uname -r) 2>/dev/null || echo unknown`
  1420. uname -s = `(uname -s) 2>/dev/null || echo unknown`
  1421. uname -v = `(uname -v) 2>/dev/null || echo unknown`
  1422. /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
  1423. /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
  1424. hostinfo = `(hostinfo) 2>/dev/null`
  1425. /bin/universe = `(/bin/universe) 2>/dev/null`
  1426. /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
  1427. /bin/arch = `(/bin/arch) 2>/dev/null`
  1428. /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
  1429. /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
  1430. UNAME_MACHINE = ${UNAME_MACHINE}
  1431. UNAME_RELEASE = ${UNAME_RELEASE}
  1432. UNAME_SYSTEM = ${UNAME_SYSTEM}
  1433. UNAME_VERSION = ${UNAME_VERSION}
  1434. EOF
  1435. exit 1
  1436. # Local variables:
  1437. # eval: (add-hook 'write-file-hooks 'time-stamp)
  1438. # time-stamp-start: "timestamp='"
  1439. # time-stamp-format: "%:y-%02m-%02d"
  1440. # time-stamp-end: "'"
  1441. # End: