Merge lp:~indicator-applet-developers/ubuntu/precise/libindicator/upstream into lp:~ubuntu-desktop/libindicator/ubuntu

Proposed by Ted Gould
Status: Merged
Merged at revision: 392
Proposed branch: lp:~indicator-applet-developers/ubuntu/precise/libindicator/upstream
Merge into: lp:~ubuntu-desktop/libindicator/ubuntu
Diff against target: 14018 lines (+13560/-155)
18 files modified
ChangeLog (+34/-0)
INSTALL (+2/-7)
Makefile.am (+1/-34)
Makefile.am.coverage (+48/-0)
Makefile.in (+48/-40)
compile (+143/-0)
config.guess (+1502/-0)
config.sub (+1714/-0)
configure (+101/-62)
configure.ac (+4/-1)
debian/changelog (+10/-0)
depcomp (+630/-0)
install-sh (+520/-0)
libindicator/indicator-desktop-shortcuts.c (+1/-1)
ltmain.sh (+8413/-0)
m4/gcov.m4 (+13/-9)
missing (+376/-0)
tools/Makefile.am (+0/-1)
To merge this branch: bzr merge lp:~indicator-applet-developers/ubuntu/precise/libindicator/upstream
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+100866@code.launchpad.net

Description of the change

0.4.95

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2012-03-29 20:52:21 +0000
3+++ ChangeLog 2012-04-04 19:56:26 +0000
4@@ -1,5 +1,39 @@
5 # Generated by Makefile. Do not edit.
6
7+2012-04-04 Ted Gould <ted@gould.cx>
8+
9+ 0.4.95
10+
11+2012-04-03 Charles Kerr <charles.kerr@canonical.com>
12+
13+ merge lp:~allanlesage/libindicator/TDD to remove a dependency on gcovr, move gcov targets to their own makefile, and clean up .gcno files.
14+
15+2012-03-27 Allan LeSage <allanlesage@gmail.com>
16+
17+ Removed gcovr dependency, moved coverage targets to own makefile, cleaning up *.gcno.
18+
19+2012-04-03 Charles Kerr <charles.kerr@canonical.com>
20+
21+ merge lp:~charlesk/libindicator/lp-948391 to fix spelling/grammar errors in an error message.
22+
23+2012-04-02 Charles Kerr <charles.kerr@canonical.com>
24+
25+ Fix spelling/grammar errors in an error message.
26+
27+2012-04-02 Charles Kerr <charles.kerr@canonical.com>
28+
29+ When using g_variant_get("&s...", &string), the string must not be free'd.
30+
31+2012-04-01 Marco Trevisan (Treviño) <mail@3v1n0.net>
32+
33+ Setting again the variables as const
34+
35+2012-04-01 Marco Trevisan (Treviño) <mail@3v1n0.net>
36+
37+ Indicator Service Manager: we don't have to free values if got with &s from variant
38+
39+ See http://is.gd/EyhAhP
40+
41 2012-03-29 Charles Kerr <charles.kerr@canonical.com>
42
43 merge lp:~charlesk/libindicator/fix-disthook to fix auto-generation of AUTHORS and Changelog by looking for 'missing' in the directory where we told AC_CONFIG_AUX_DIR to put it.
44
45=== modified file 'INSTALL'
46--- INSTALL 2012-03-29 20:50:56 +0000
47+++ INSTALL 2012-04-04 19:56:26 +0000
48@@ -1,8 +1,8 @@
49 Installation Instructions
50 *************************
51
52-Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
53-Inc.
54+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
55+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
56
57 Copying and distribution of this file, with or without modification,
58 are permitted in any medium without royalty provided the copyright
59@@ -226,11 +226,6 @@
60
61 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
62
63- HP-UX `make' updates targets which have the same time stamps as
64-their prerequisites, which makes it generally unusable when shipped
65-generated files such as `configure' are involved. Use GNU `make'
66-instead.
67-
68 On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
69 parse its `<wchar.h>' header file. The option `-nodtk' can be used as
70 a workaround. If GNU CC is not installed, it is therefore recommended
71
72=== modified file 'Makefile.am'
73--- Makefile.am 2012-03-29 20:16:19 +0000
74+++ Makefile.am 2012-04-04 19:56:26 +0000
75@@ -45,37 +45,4 @@
76 fi
77
78
79-# Coverage targets
80-
81-.PHONY: clean-gcda
82-clean-gcda:
83- @echo Removing old coverage results
84- -find -name '*.gcda' -print | xargs -r rm
85-
86-.PHONY: coverage-html generate-coverage-html clean-coverage-html
87-coverage-html: clean-gcda
88- -$(MAKE) $(AM_MAKEFLAGS) -k check
89- $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
90-
91-generate-coverage-html:
92- @echo Collecting coverage data
93- $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
94- LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
95-
96-clean-coverage-html: clean-gcda
97- -$(LCOV) --directory $(top_builddir) -z
98- -rm -rf coverage.info coveragereport
99-
100-.PHONY: coverage-xml generate-coverage-xml clean-coverage-xml
101-coverage-xml: clean-gcda
102- -$(MAKE) $(AM_MAKEFLAGS) -k check
103- $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml
104-
105-generate-coverage-xml:
106- @echo Generating coverage XML report
107- $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml
108-
109-clean-coverage-xml: clean-gcda
110- -rm -rf $(top_builddir)/coverage.xml
111-
112-clean-local: clean-coverage-html clean-coverage-xml
113+include $(top_srcdir)/Makefile.am.coverage
114
115=== added file 'Makefile.am.coverage'
116--- Makefile.am.coverage 1970-01-01 00:00:00 +0000
117+++ Makefile.am.coverage 2012-04-04 19:56:26 +0000
118@@ -0,0 +1,48 @@
119+
120+# Coverage targets
121+
122+.PHONY: clean-gcno clean-gcda \
123+ coverage-html generate-coverage-html clean-coverage-html \
124+ coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr
125+
126+clean-local: clean-gcno clean-coverage-html clean-coverage-gcovr
127+
128+if HAVE_GCOV
129+
130+clean-gcno:
131+ @echo Removing old coverage instrumentation
132+ -find -name '*.gcno' -print | xargs -r rm
133+
134+clean-gcda:
135+ @echo Removing old coverage results
136+ -find -name '*.gcda' -print | xargs -r rm
137+
138+coverage-html: clean-gcda
139+ -$(MAKE) $(AM_MAKEFLAGS) -k check
140+ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
141+
142+generate-coverage-html:
143+ @echo Collecting coverage data
144+ $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
145+ LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
146+
147+clean-coverage-html: clean-gcda
148+ -$(LCOV) --directory $(top_builddir) -z
149+ -rm -rf coverage.info coveragereport
150+
151+if HAVE_GCOVR
152+
153+coverage-gcovr: clean-gcda
154+ -$(MAKE) $(AM_MAKEFLAGS) -k check
155+ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr
156+
157+generate-coverage-gcovr:
158+ @echo Generating coverage GCOVR report
159+ $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml
160+
161+clean-coverage-gcovr: clean-gcda
162+ -rm -rf $(top_builddir)/coverage.xml
163+
164+endif # HAVE_GCOVR
165+
166+endif # HAVE_GCOV
167
168=== modified file 'Makefile.in'
169--- Makefile.in 2012-03-29 20:52:21 +0000
170+++ Makefile.in 2012-04-04 19:56:26 +0000
171@@ -14,6 +14,8 @@
172 # PARTICULAR PURPOSE.
173
174 @SET_MAKE@
175+
176+# Coverage targets
177 VPATH = @srcdir@
178 pkgdatadir = $(datadir)/@PACKAGE@
179 pkgincludedir = $(includedir)/@PACKAGE@
180@@ -36,13 +38,15 @@
181 @WANT_TESTS_TRUE@am__append_1 = \
182 @WANT_TESTS_TRUE@ tests
183
184-subdir = .
185 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
186 $(srcdir)/Makefile.in $(srcdir)/config.h.in \
187- $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
188- build-aux/compile build-aux/config.guess build-aux/config.sub \
189- build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \
190- build-aux/missing
191+ $(top_srcdir)/Makefile.am.coverage $(top_srcdir)/configure \
192+ AUTHORS COPYING ChangeLog INSTALL NEWS build-aux/compile \
193+ build-aux/config.guess build-aux/config.sub build-aux/depcomp \
194+ build-aux/install-sh build-aux/ltmain.sh build-aux/missing \
195+ compile config.guess config.sub depcomp install-sh ltmain.sh \
196+ missing
197+subdir = .
198 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
199 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
200 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
201@@ -266,7 +270,7 @@
202 .SUFFIXES:
203 am--refresh: Makefile
204 @:
205-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
206+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.coverage $(am__configure_deps)
207 @for dep in $?; do \
208 case '$(am__configure_deps)' in \
209 *$$dep*) \
210@@ -289,6 +293,7 @@
211 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
212 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
213 esac;
214+$(top_srcdir)/Makefile.am.coverage:
215
216 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
217 $(SHELL) ./config.status --recheck
218@@ -808,40 +813,43 @@
219 echo Failed to generate AUTHORS: not a branch >&2; \
220 fi
221
222-# Coverage targets
223-
224-.PHONY: clean-gcda
225-clean-gcda:
226- @echo Removing old coverage results
227- -find -name '*.gcda' -print | xargs -r rm
228-
229-.PHONY: coverage-html generate-coverage-html clean-coverage-html
230-coverage-html: clean-gcda
231- -$(MAKE) $(AM_MAKEFLAGS) -k check
232- $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
233-
234-generate-coverage-html:
235- @echo Collecting coverage data
236- $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
237- LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
238-
239-clean-coverage-html: clean-gcda
240- -$(LCOV) --directory $(top_builddir) -z
241- -rm -rf coverage.info coveragereport
242-
243-.PHONY: coverage-xml generate-coverage-xml clean-coverage-xml
244-coverage-xml: clean-gcda
245- -$(MAKE) $(AM_MAKEFLAGS) -k check
246- $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml
247-
248-generate-coverage-xml:
249- @echo Generating coverage XML report
250- $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml
251-
252-clean-coverage-xml: clean-gcda
253- -rm -rf $(top_builddir)/coverage.xml
254-
255-clean-local: clean-coverage-html clean-coverage-xml
256+.PHONY: clean-gcno clean-gcda \
257+ coverage-html generate-coverage-html clean-coverage-html \
258+ coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr
259+
260+clean-local: clean-gcno clean-coverage-html clean-coverage-gcovr
261+
262+@HAVE_GCOV_TRUE@clean-gcno:
263+@HAVE_GCOV_TRUE@ @echo Removing old coverage instrumentation
264+@HAVE_GCOV_TRUE@ -find -name '*.gcno' -print | xargs -r rm
265+
266+@HAVE_GCOV_TRUE@clean-gcda:
267+@HAVE_GCOV_TRUE@ @echo Removing old coverage results
268+@HAVE_GCOV_TRUE@ -find -name '*.gcda' -print | xargs -r rm
269+
270+@HAVE_GCOV_TRUE@coverage-html: clean-gcda
271+@HAVE_GCOV_TRUE@ -$(MAKE) $(AM_MAKEFLAGS) -k check
272+@HAVE_GCOV_TRUE@ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
273+
274+@HAVE_GCOV_TRUE@generate-coverage-html:
275+@HAVE_GCOV_TRUE@ @echo Collecting coverage data
276+@HAVE_GCOV_TRUE@ $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
277+@HAVE_GCOV_TRUE@ LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
278+
279+@HAVE_GCOV_TRUE@clean-coverage-html: clean-gcda
280+@HAVE_GCOV_TRUE@ -$(LCOV) --directory $(top_builddir) -z
281+@HAVE_GCOV_TRUE@ -rm -rf coverage.info coveragereport
282+
283+@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@coverage-gcovr: clean-gcda
284+@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ -$(MAKE) $(AM_MAKEFLAGS) -k check
285+@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr
286+
287+@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@generate-coverage-gcovr:
288+@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ @echo Generating coverage GCOVR report
289+@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml
290+
291+@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@clean-coverage-gcovr: clean-gcda
292+@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ -rm -rf $(top_builddir)/coverage.xml
293
294 # Tell versions [3.59,3.63) of GNU make to not export all variables.
295 # Otherwise a system limit (for SysV at least) may be exceeded.
296
297=== added file 'compile'
298--- compile 1970-01-01 00:00:00 +0000
299+++ compile 2012-04-04 19:56:26 +0000
300@@ -0,0 +1,143 @@
301+#! /bin/sh
302+# Wrapper for compilers which do not understand `-c -o'.
303+
304+scriptversion=2009-10-06.20; # UTC
305+
306+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
307+# Foundation, Inc.
308+# Written by Tom Tromey <tromey@cygnus.com>.
309+#
310+# This program is free software; you can redistribute it and/or modify
311+# it under the terms of the GNU General Public License as published by
312+# the Free Software Foundation; either version 2, or (at your option)
313+# any later version.
314+#
315+# This program is distributed in the hope that it will be useful,
316+# but WITHOUT ANY WARRANTY; without even the implied warranty of
317+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
318+# GNU General Public License for more details.
319+#
320+# You should have received a copy of the GNU General Public License
321+# along with this program. If not, see <http://www.gnu.org/licenses/>.
322+
323+# As a special exception to the GNU General Public License, if you
324+# distribute this file as part of a program that contains a
325+# configuration script generated by Autoconf, you may include it under
326+# the same distribution terms that you use for the rest of that program.
327+
328+# This file is maintained in Automake, please report
329+# bugs to <bug-automake@gnu.org> or send patches to
330+# <automake-patches@gnu.org>.
331+
332+case $1 in
333+ '')
334+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
335+ exit 1;
336+ ;;
337+ -h | --h*)
338+ cat <<\EOF
339+Usage: compile [--help] [--version] PROGRAM [ARGS]
340+
341+Wrapper for compilers which do not understand `-c -o'.
342+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
343+arguments, and rename the output as expected.
344+
345+If you are trying to build a whole package this is not the
346+right script to run: please start by reading the file `INSTALL'.
347+
348+Report bugs to <bug-automake@gnu.org>.
349+EOF
350+ exit $?
351+ ;;
352+ -v | --v*)
353+ echo "compile $scriptversion"
354+ exit $?
355+ ;;
356+esac
357+
358+ofile=
359+cfile=
360+eat=
361+
362+for arg
363+do
364+ if test -n "$eat"; then
365+ eat=
366+ else
367+ case $1 in
368+ -o)
369+ # configure might choose to run compile as `compile cc -o foo foo.c'.
370+ # So we strip `-o arg' only if arg is an object.
371+ eat=1
372+ case $2 in
373+ *.o | *.obj)
374+ ofile=$2
375+ ;;
376+ *)
377+ set x "$@" -o "$2"
378+ shift
379+ ;;
380+ esac
381+ ;;
382+ *.c)
383+ cfile=$1
384+ set x "$@" "$1"
385+ shift
386+ ;;
387+ *)
388+ set x "$@" "$1"
389+ shift
390+ ;;
391+ esac
392+ fi
393+ shift
394+done
395+
396+if test -z "$ofile" || test -z "$cfile"; then
397+ # If no `-o' option was seen then we might have been invoked from a
398+ # pattern rule where we don't need one. That is ok -- this is a
399+ # normal compilation that the losing compiler can handle. If no
400+ # `.c' file was seen then we are probably linking. That is also
401+ # ok.
402+ exec "$@"
403+fi
404+
405+# Name of file we expect compiler to create.
406+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
407+
408+# Create the lock directory.
409+# Note: use `[/\\:.-]' here to ensure that we don't use the same name
410+# that we are using for the .o file. Also, base the name on the expected
411+# object file name, since that is what matters with a parallel build.
412+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
413+while true; do
414+ if mkdir "$lockdir" >/dev/null 2>&1; then
415+ break
416+ fi
417+ sleep 1
418+done
419+# FIXME: race condition here if user kills between mkdir and trap.
420+trap "rmdir '$lockdir'; exit 1" 1 2 15
421+
422+# Run the compile.
423+"$@"
424+ret=$?
425+
426+if test -f "$cofile"; then
427+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
428+elif test -f "${cofile}bj"; then
429+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
430+fi
431+
432+rmdir "$lockdir"
433+exit $ret
434+
435+# Local Variables:
436+# mode: shell-script
437+# sh-indentation: 2
438+# eval: (add-hook 'write-file-hooks 'time-stamp)
439+# time-stamp-start: "scriptversion="
440+# time-stamp-format: "%:y-%02m-%02d.%02H"
441+# time-stamp-time-zone: "UTC"
442+# time-stamp-end: "; # UTC"
443+# End:
444
445=== added file 'config.guess'
446--- config.guess 1970-01-01 00:00:00 +0000
447+++ config.guess 2012-04-04 19:56:26 +0000
448@@ -0,0 +1,1502 @@
449+#! /bin/sh
450+# Attempt to guess a canonical system name.
451+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
452+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
453+# Free Software Foundation, Inc.
454+
455+timestamp='2009-12-30'
456+
457+# This file is free software; you can redistribute it and/or modify it
458+# under the terms of the GNU General Public License as published by
459+# the Free Software Foundation; either version 2 of the License, or
460+# (at your option) any later version.
461+#
462+# This program is distributed in the hope that it will be useful, but
463+# WITHOUT ANY WARRANTY; without even the implied warranty of
464+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
465+# General Public License for more details.
466+#
467+# You should have received a copy of the GNU General Public License
468+# along with this program; if not, write to the Free Software
469+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
470+# 02110-1301, USA.
471+#
472+# As a special exception to the GNU General Public License, if you
473+# distribute this file as part of a program that contains a
474+# configuration script generated by Autoconf, you may include it under
475+# the same distribution terms that you use for the rest of that program.
476+
477+
478+# Originally written by Per Bothner. Please send patches (context
479+# diff format) to <config-patches@gnu.org> and include a ChangeLog
480+# entry.
481+#
482+# This script attempts to guess a canonical system name similar to
483+# config.sub. If it succeeds, it prints the system name on stdout, and
484+# exits with 0. Otherwise, it exits with 1.
485+#
486+# You can get the latest version of this script from:
487+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
488+
489+me=`echo "$0" | sed -e 's,.*/,,'`
490+
491+usage="\
492+Usage: $0 [OPTION]
493+
494+Output the configuration name of the system \`$me' is run on.
495+
496+Operation modes:
497+ -h, --help print this help, then exit
498+ -t, --time-stamp print date of last modification, then exit
499+ -v, --version print version number, then exit
500+
501+Report bugs and patches to <config-patches@gnu.org>."
502+
503+version="\
504+GNU config.guess ($timestamp)
505+
506+Originally written by Per Bothner.
507+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
508+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
509+Software Foundation, Inc.
510+
511+This is free software; see the source for copying conditions. There is NO
512+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
513+
514+help="
515+Try \`$me --help' for more information."
516+
517+# Parse command line
518+while test $# -gt 0 ; do
519+ case $1 in
520+ --time-stamp | --time* | -t )
521+ echo "$timestamp" ; exit ;;
522+ --version | -v )
523+ echo "$version" ; exit ;;
524+ --help | --h* | -h )
525+ echo "$usage"; exit ;;
526+ -- ) # Stop option processing
527+ shift; break ;;
528+ - ) # Use stdin as input.
529+ break ;;
530+ -* )
531+ echo "$me: invalid option $1$help" >&2
532+ exit 1 ;;
533+ * )
534+ break ;;
535+ esac
536+done
537+
538+if test $# != 0; then
539+ echo "$me: too many arguments$help" >&2
540+ exit 1
541+fi
542+
543+trap 'exit 1' 1 2 15
544+
545+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
546+# compiler to aid in system detection is discouraged as it requires
547+# temporary files to be created and, as you can see below, it is a
548+# headache to deal with in a portable fashion.
549+
550+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
551+# use `HOST_CC' if defined, but it is deprecated.
552+
553+# Portable tmp directory creation inspired by the Autoconf team.
554+
555+set_cc_for_build='
556+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
557+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
558+: ${TMPDIR=/tmp} ;
559+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
560+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
561+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
562+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
563+dummy=$tmp/dummy ;
564+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
565+case $CC_FOR_BUILD,$HOST_CC,$CC in
566+ ,,) echo "int x;" > $dummy.c ;
567+ for c in cc gcc c89 c99 ; do
568+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
569+ CC_FOR_BUILD="$c"; break ;
570+ fi ;
571+ done ;
572+ if test x"$CC_FOR_BUILD" = x ; then
573+ CC_FOR_BUILD=no_compiler_found ;
574+ fi
575+ ;;
576+ ,,*) CC_FOR_BUILD=$CC ;;
577+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
578+esac ; set_cc_for_build= ;'
579+
580+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
581+# (ghazi@noc.rutgers.edu 1994-08-24)
582+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
583+ PATH=$PATH:/.attbin ; export PATH
584+fi
585+
586+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
587+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
588+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
589+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
590+
591+# Note: order is significant - the case branches are not exclusive.
592+
593+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
594+ *:NetBSD:*:*)
595+ # NetBSD (nbsd) targets should (where applicable) match one or
596+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
597+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
598+ # switched to ELF, *-*-netbsd* would select the old
599+ # object file format. This provides both forward
600+ # compatibility and a consistent mechanism for selecting the
601+ # object file format.
602+ #
603+ # Note: NetBSD doesn't particularly care about the vendor
604+ # portion of the name. We always set it to "unknown".
605+ sysctl="sysctl -n hw.machine_arch"
606+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
607+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
608+ case "${UNAME_MACHINE_ARCH}" in
609+ armeb) machine=armeb-unknown ;;
610+ arm*) machine=arm-unknown ;;
611+ sh3el) machine=shl-unknown ;;
612+ sh3eb) machine=sh-unknown ;;
613+ sh5el) machine=sh5le-unknown ;;
614+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
615+ esac
616+ # The Operating System including object format, if it has switched
617+ # to ELF recently, or will in the future.
618+ case "${UNAME_MACHINE_ARCH}" in
619+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
620+ eval $set_cc_for_build
621+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
622+ | grep -q __ELF__
623+ then
624+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
625+ # Return netbsd for either. FIX?
626+ os=netbsd
627+ else
628+ os=netbsdelf
629+ fi
630+ ;;
631+ *)
632+ os=netbsd
633+ ;;
634+ esac
635+ # The OS release
636+ # Debian GNU/NetBSD machines have a different userland, and
637+ # thus, need a distinct triplet. However, they do not need
638+ # kernel version information, so it can be replaced with a
639+ # suitable tag, in the style of linux-gnu.
640+ case "${UNAME_VERSION}" in
641+ Debian*)
642+ release='-gnu'
643+ ;;
644+ *)
645+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
646+ ;;
647+ esac
648+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
649+ # contains redundant information, the shorter form:
650+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
651+ echo "${machine}-${os}${release}"
652+ exit ;;
653+ *:OpenBSD:*:*)
654+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
655+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
656+ exit ;;
657+ *:ekkoBSD:*:*)
658+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
659+ exit ;;
660+ *:SolidBSD:*:*)
661+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
662+ exit ;;
663+ macppc:MirBSD:*:*)
664+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
665+ exit ;;
666+ *:MirBSD:*:*)
667+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
668+ exit ;;
669+ alpha:OSF1:*:*)
670+ case $UNAME_RELEASE in
671+ *4.0)
672+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
673+ ;;
674+ *5.*)
675+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
676+ ;;
677+ esac
678+ # According to Compaq, /usr/sbin/psrinfo has been available on
679+ # OSF/1 and Tru64 systems produced since 1995. I hope that
680+ # covers most systems running today. This code pipes the CPU
681+ # types through head -n 1, so we only detect the type of CPU 0.
682+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
683+ case "$ALPHA_CPU_TYPE" in
684+ "EV4 (21064)")
685+ UNAME_MACHINE="alpha" ;;
686+ "EV4.5 (21064)")
687+ UNAME_MACHINE="alpha" ;;
688+ "LCA4 (21066/21068)")
689+ UNAME_MACHINE="alpha" ;;
690+ "EV5 (21164)")
691+ UNAME_MACHINE="alphaev5" ;;
692+ "EV5.6 (21164A)")
693+ UNAME_MACHINE="alphaev56" ;;
694+ "EV5.6 (21164PC)")
695+ UNAME_MACHINE="alphapca56" ;;
696+ "EV5.7 (21164PC)")
697+ UNAME_MACHINE="alphapca57" ;;
698+ "EV6 (21264)")
699+ UNAME_MACHINE="alphaev6" ;;
700+ "EV6.7 (21264A)")
701+ UNAME_MACHINE="alphaev67" ;;
702+ "EV6.8CB (21264C)")
703+ UNAME_MACHINE="alphaev68" ;;
704+ "EV6.8AL (21264B)")
705+ UNAME_MACHINE="alphaev68" ;;
706+ "EV6.8CX (21264D)")
707+ UNAME_MACHINE="alphaev68" ;;
708+ "EV6.9A (21264/EV69A)")
709+ UNAME_MACHINE="alphaev69" ;;
710+ "EV7 (21364)")
711+ UNAME_MACHINE="alphaev7" ;;
712+ "EV7.9 (21364A)")
713+ UNAME_MACHINE="alphaev79" ;;
714+ esac
715+ # A Pn.n version is a patched version.
716+ # A Vn.n version is a released version.
717+ # A Tn.n version is a released field test version.
718+ # A Xn.n version is an unreleased experimental baselevel.
719+ # 1.2 uses "1.2" for uname -r.
720+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
721+ exit ;;
722+ Alpha\ *:Windows_NT*:*)
723+ # How do we know it's Interix rather than the generic POSIX subsystem?
724+ # Should we change UNAME_MACHINE based on the output of uname instead
725+ # of the specific Alpha model?
726+ echo alpha-pc-interix
727+ exit ;;
728+ 21064:Windows_NT:50:3)
729+ echo alpha-dec-winnt3.5
730+ exit ;;
731+ Amiga*:UNIX_System_V:4.0:*)
732+ echo m68k-unknown-sysv4
733+ exit ;;
734+ *:[Aa]miga[Oo][Ss]:*:*)
735+ echo ${UNAME_MACHINE}-unknown-amigaos
736+ exit ;;
737+ *:[Mm]orph[Oo][Ss]:*:*)
738+ echo ${UNAME_MACHINE}-unknown-morphos
739+ exit ;;
740+ *:OS/390:*:*)
741+ echo i370-ibm-openedition
742+ exit ;;
743+ *:z/VM:*:*)
744+ echo s390-ibm-zvmoe
745+ exit ;;
746+ *:OS400:*:*)
747+ echo powerpc-ibm-os400
748+ exit ;;
749+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
750+ echo arm-acorn-riscix${UNAME_RELEASE}
751+ exit ;;
752+ arm:riscos:*:*|arm:RISCOS:*:*)
753+ echo arm-unknown-riscos
754+ exit ;;
755+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
756+ echo hppa1.1-hitachi-hiuxmpp
757+ exit ;;
758+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
759+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
760+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
761+ echo pyramid-pyramid-sysv3
762+ else
763+ echo pyramid-pyramid-bsd
764+ fi
765+ exit ;;
766+ NILE*:*:*:dcosx)
767+ echo pyramid-pyramid-svr4
768+ exit ;;
769+ DRS?6000:unix:4.0:6*)
770+ echo sparc-icl-nx6
771+ exit ;;
772+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
773+ case `/usr/bin/uname -p` in
774+ sparc) echo sparc-icl-nx7; exit ;;
775+ esac ;;
776+ s390x:SunOS:*:*)
777+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
778+ exit ;;
779+ sun4H:SunOS:5.*:*)
780+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
781+ exit ;;
782+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
783+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
784+ exit ;;
785+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
786+ echo i386-pc-auroraux${UNAME_RELEASE}
787+ exit ;;
788+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
789+ eval $set_cc_for_build
790+ SUN_ARCH="i386"
791+ # If there is a compiler, see if it is configured for 64-bit objects.
792+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
793+ # This test works for both compilers.
794+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
795+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
796+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
797+ grep IS_64BIT_ARCH >/dev/null
798+ then
799+ SUN_ARCH="x86_64"
800+ fi
801+ fi
802+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
803+ exit ;;
804+ sun4*:SunOS:6*:*)
805+ # According to config.sub, this is the proper way to canonicalize
806+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
807+ # it's likely to be more like Solaris than SunOS4.
808+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
809+ exit ;;
810+ sun4*:SunOS:*:*)
811+ case "`/usr/bin/arch -k`" in
812+ Series*|S4*)
813+ UNAME_RELEASE=`uname -v`
814+ ;;
815+ esac
816+ # Japanese Language versions have a version number like `4.1.3-JL'.
817+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
818+ exit ;;
819+ sun3*:SunOS:*:*)
820+ echo m68k-sun-sunos${UNAME_RELEASE}
821+ exit ;;
822+ sun*:*:4.2BSD:*)
823+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
824+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
825+ case "`/bin/arch`" in
826+ sun3)
827+ echo m68k-sun-sunos${UNAME_RELEASE}
828+ ;;
829+ sun4)
830+ echo sparc-sun-sunos${UNAME_RELEASE}
831+ ;;
832+ esac
833+ exit ;;
834+ aushp:SunOS:*:*)
835+ echo sparc-auspex-sunos${UNAME_RELEASE}
836+ exit ;;
837+ # The situation for MiNT is a little confusing. The machine name
838+ # can be virtually everything (everything which is not
839+ # "atarist" or "atariste" at least should have a processor
840+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
841+ # to the lowercase version "mint" (or "freemint"). Finally
842+ # the system name "TOS" denotes a system which is actually not
843+ # MiNT. But MiNT is downward compatible to TOS, so this should
844+ # be no problem.
845+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
846+ echo m68k-atari-mint${UNAME_RELEASE}
847+ exit ;;
848+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
849+ echo m68k-atari-mint${UNAME_RELEASE}
850+ exit ;;
851+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
852+ echo m68k-atari-mint${UNAME_RELEASE}
853+ exit ;;
854+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
855+ echo m68k-milan-mint${UNAME_RELEASE}
856+ exit ;;
857+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
858+ echo m68k-hades-mint${UNAME_RELEASE}
859+ exit ;;
860+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
861+ echo m68k-unknown-mint${UNAME_RELEASE}
862+ exit ;;
863+ m68k:machten:*:*)
864+ echo m68k-apple-machten${UNAME_RELEASE}
865+ exit ;;
866+ powerpc:machten:*:*)
867+ echo powerpc-apple-machten${UNAME_RELEASE}
868+ exit ;;
869+ RISC*:Mach:*:*)
870+ echo mips-dec-mach_bsd4.3
871+ exit ;;
872+ RISC*:ULTRIX:*:*)
873+ echo mips-dec-ultrix${UNAME_RELEASE}
874+ exit ;;
875+ VAX*:ULTRIX*:*:*)
876+ echo vax-dec-ultrix${UNAME_RELEASE}
877+ exit ;;
878+ 2020:CLIX:*:* | 2430:CLIX:*:*)
879+ echo clipper-intergraph-clix${UNAME_RELEASE}
880+ exit ;;
881+ mips:*:*:UMIPS | mips:*:*:RISCos)
882+ eval $set_cc_for_build
883+ sed 's/^ //' << EOF >$dummy.c
884+#ifdef __cplusplus
885+#include <stdio.h> /* for printf() prototype */
886+ int main (int argc, char *argv[]) {
887+#else
888+ int main (argc, argv) int argc; char *argv[]; {
889+#endif
890+ #if defined (host_mips) && defined (MIPSEB)
891+ #if defined (SYSTYPE_SYSV)
892+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
893+ #endif
894+ #if defined (SYSTYPE_SVR4)
895+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
896+ #endif
897+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
898+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
899+ #endif
900+ #endif
901+ exit (-1);
902+ }
903+EOF
904+ $CC_FOR_BUILD -o $dummy $dummy.c &&
905+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
906+ SYSTEM_NAME=`$dummy $dummyarg` &&
907+ { echo "$SYSTEM_NAME"; exit; }
908+ echo mips-mips-riscos${UNAME_RELEASE}
909+ exit ;;
910+ Motorola:PowerMAX_OS:*:*)
911+ echo powerpc-motorola-powermax
912+ exit ;;
913+ Motorola:*:4.3:PL8-*)
914+ echo powerpc-harris-powermax
915+ exit ;;
916+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
917+ echo powerpc-harris-powermax
918+ exit ;;
919+ Night_Hawk:Power_UNIX:*:*)
920+ echo powerpc-harris-powerunix
921+ exit ;;
922+ m88k:CX/UX:7*:*)
923+ echo m88k-harris-cxux7
924+ exit ;;
925+ m88k:*:4*:R4*)
926+ echo m88k-motorola-sysv4
927+ exit ;;
928+ m88k:*:3*:R3*)
929+ echo m88k-motorola-sysv3
930+ exit ;;
931+ AViiON:dgux:*:*)
932+ # DG/UX returns AViiON for all architectures
933+ UNAME_PROCESSOR=`/usr/bin/uname -p`
934+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
935+ then
936+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
937+ [ ${TARGET_BINARY_INTERFACE}x = x ]
938+ then
939+ echo m88k-dg-dgux${UNAME_RELEASE}
940+ else
941+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
942+ fi
943+ else
944+ echo i586-dg-dgux${UNAME_RELEASE}
945+ fi
946+ exit ;;
947+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
948+ echo m88k-dolphin-sysv3
949+ exit ;;
950+ M88*:*:R3*:*)
951+ # Delta 88k system running SVR3
952+ echo m88k-motorola-sysv3
953+ exit ;;
954+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
955+ echo m88k-tektronix-sysv3
956+ exit ;;
957+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
958+ echo m68k-tektronix-bsd
959+ exit ;;
960+ *:IRIX*:*:*)
961+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
962+ exit ;;
963+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
964+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
965+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
966+ i*86:AIX:*:*)
967+ echo i386-ibm-aix
968+ exit ;;
969+ ia64:AIX:*:*)
970+ if [ -x /usr/bin/oslevel ] ; then
971+ IBM_REV=`/usr/bin/oslevel`
972+ else
973+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
974+ fi
975+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
976+ exit ;;
977+ *:AIX:2:3)
978+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
979+ eval $set_cc_for_build
980+ sed 's/^ //' << EOF >$dummy.c
981+ #include <sys/systemcfg.h>
982+
983+ main()
984+ {
985+ if (!__power_pc())
986+ exit(1);
987+ puts("powerpc-ibm-aix3.2.5");
988+ exit(0);
989+ }
990+EOF
991+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
992+ then
993+ echo "$SYSTEM_NAME"
994+ else
995+ echo rs6000-ibm-aix3.2.5
996+ fi
997+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
998+ echo rs6000-ibm-aix3.2.4
999+ else
1000+ echo rs6000-ibm-aix3.2
1001+ fi
1002+ exit ;;
1003+ *:AIX:*:[456])
1004+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
1005+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
1006+ IBM_ARCH=rs6000
1007+ else
1008+ IBM_ARCH=powerpc
1009+ fi
1010+ if [ -x /usr/bin/oslevel ] ; then
1011+ IBM_REV=`/usr/bin/oslevel`
1012+ else
1013+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
1014+ fi
1015+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
1016+ exit ;;
1017+ *:AIX:*:*)
1018+ echo rs6000-ibm-aix
1019+ exit ;;
1020+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
1021+ echo romp-ibm-bsd4.4
1022+ exit ;;
1023+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
1024+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
1025+ exit ;; # report: romp-ibm BSD 4.3
1026+ *:BOSX:*:*)
1027+ echo rs6000-bull-bosx
1028+ exit ;;
1029+ DPX/2?00:B.O.S.:*:*)
1030+ echo m68k-bull-sysv3
1031+ exit ;;
1032+ 9000/[34]??:4.3bsd:1.*:*)
1033+ echo m68k-hp-bsd
1034+ exit ;;
1035+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
1036+ echo m68k-hp-bsd4.4
1037+ exit ;;
1038+ 9000/[34678]??:HP-UX:*:*)
1039+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
1040+ case "${UNAME_MACHINE}" in
1041+ 9000/31? ) HP_ARCH=m68000 ;;
1042+ 9000/[34]?? ) HP_ARCH=m68k ;;
1043+ 9000/[678][0-9][0-9])
1044+ if [ -x /usr/bin/getconf ]; then
1045+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
1046+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
1047+ case "${sc_cpu_version}" in
1048+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
1049+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
1050+ 532) # CPU_PA_RISC2_0
1051+ case "${sc_kernel_bits}" in
1052+ 32) HP_ARCH="hppa2.0n" ;;
1053+ 64) HP_ARCH="hppa2.0w" ;;
1054+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
1055+ esac ;;
1056+ esac
1057+ fi
1058+ if [ "${HP_ARCH}" = "" ]; then
1059+ eval $set_cc_for_build
1060+ sed 's/^ //' << EOF >$dummy.c
1061+
1062+ #define _HPUX_SOURCE
1063+ #include <stdlib.h>
1064+ #include <unistd.h>
1065+
1066+ int main ()
1067+ {
1068+ #if defined(_SC_KERNEL_BITS)
1069+ long bits = sysconf(_SC_KERNEL_BITS);
1070+ #endif
1071+ long cpu = sysconf (_SC_CPU_VERSION);
1072+
1073+ switch (cpu)
1074+ {
1075+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
1076+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
1077+ case CPU_PA_RISC2_0:
1078+ #if defined(_SC_KERNEL_BITS)
1079+ switch (bits)
1080+ {
1081+ case 64: puts ("hppa2.0w"); break;
1082+ case 32: puts ("hppa2.0n"); break;
1083+ default: puts ("hppa2.0"); break;
1084+ } break;
1085+ #else /* !defined(_SC_KERNEL_BITS) */
1086+ puts ("hppa2.0"); break;
1087+ #endif
1088+ default: puts ("hppa1.0"); break;
1089+ }
1090+ exit (0);
1091+ }
1092+EOF
1093+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
1094+ test -z "$HP_ARCH" && HP_ARCH=hppa
1095+ fi ;;
1096+ esac
1097+ if [ ${HP_ARCH} = "hppa2.0w" ]
1098+ then
1099+ eval $set_cc_for_build
1100+
1101+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
1102+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
1103+ # generating 64-bit code. GNU and HP use different nomenclature:
1104+ #
1105+ # $ CC_FOR_BUILD=cc ./config.guess
1106+ # => hppa2.0w-hp-hpux11.23
1107+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
1108+ # => hppa64-hp-hpux11.23
1109+
1110+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
1111+ grep -q __LP64__
1112+ then
1113+ HP_ARCH="hppa2.0w"
1114+ else
1115+ HP_ARCH="hppa64"
1116+ fi
1117+ fi
1118+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
1119+ exit ;;
1120+ ia64:HP-UX:*:*)
1121+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
1122+ echo ia64-hp-hpux${HPUX_REV}
1123+ exit ;;
1124+ 3050*:HI-UX:*:*)
1125+ eval $set_cc_for_build
1126+ sed 's/^ //' << EOF >$dummy.c
1127+ #include <unistd.h>
1128+ int
1129+ main ()
1130+ {
1131+ long cpu = sysconf (_SC_CPU_VERSION);
1132+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
1133+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
1134+ results, however. */
1135+ if (CPU_IS_PA_RISC (cpu))
1136+ {
1137+ switch (cpu)
1138+ {
1139+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
1140+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
1141+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
1142+ default: puts ("hppa-hitachi-hiuxwe2"); break;
1143+ }
1144+ }
1145+ else if (CPU_IS_HP_MC68K (cpu))
1146+ puts ("m68k-hitachi-hiuxwe2");
1147+ else puts ("unknown-hitachi-hiuxwe2");
1148+ exit (0);
1149+ }
1150+EOF
1151+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
1152+ { echo "$SYSTEM_NAME"; exit; }
1153+ echo unknown-hitachi-hiuxwe2
1154+ exit ;;
1155+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
1156+ echo hppa1.1-hp-bsd
1157+ exit ;;
1158+ 9000/8??:4.3bsd:*:*)
1159+ echo hppa1.0-hp-bsd
1160+ exit ;;
1161+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
1162+ echo hppa1.0-hp-mpeix
1163+ exit ;;
1164+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
1165+ echo hppa1.1-hp-osf
1166+ exit ;;
1167+ hp8??:OSF1:*:*)
1168+ echo hppa1.0-hp-osf
1169+ exit ;;
1170+ i*86:OSF1:*:*)
1171+ if [ -x /usr/sbin/sysversion ] ; then
1172+ echo ${UNAME_MACHINE}-unknown-osf1mk
1173+ else
1174+ echo ${UNAME_MACHINE}-unknown-osf1
1175+ fi
1176+ exit ;;
1177+ parisc*:Lites*:*:*)
1178+ echo hppa1.1-hp-lites
1179+ exit ;;
1180+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
1181+ echo c1-convex-bsd
1182+ exit ;;
1183+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
1184+ if getsysinfo -f scalar_acc
1185+ then echo c32-convex-bsd
1186+ else echo c2-convex-bsd
1187+ fi
1188+ exit ;;
1189+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
1190+ echo c34-convex-bsd
1191+ exit ;;
1192+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
1193+ echo c38-convex-bsd
1194+ exit ;;
1195+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
1196+ echo c4-convex-bsd
1197+ exit ;;
1198+ CRAY*Y-MP:*:*:*)
1199+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1200+ exit ;;
1201+ CRAY*[A-Z]90:*:*:*)
1202+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
1203+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
1204+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
1205+ -e 's/\.[^.]*$/.X/'
1206+ exit ;;
1207+ CRAY*TS:*:*:*)
1208+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1209+ exit ;;
1210+ CRAY*T3E:*:*:*)
1211+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1212+ exit ;;
1213+ CRAY*SV1:*:*:*)
1214+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1215+ exit ;;
1216+ *:UNICOS/mp:*:*)
1217+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1218+ exit ;;
1219+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
1220+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
1221+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
1222+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
1223+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
1224+ exit ;;
1225+ 5000:UNIX_System_V:4.*:*)
1226+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
1227+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
1228+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
1229+ exit ;;
1230+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
1231+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
1232+ exit ;;
1233+ sparc*:BSD/OS:*:*)
1234+ echo sparc-unknown-bsdi${UNAME_RELEASE}
1235+ exit ;;
1236+ *:BSD/OS:*:*)
1237+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
1238+ exit ;;
1239+ *:FreeBSD:*:*)
1240+ case ${UNAME_MACHINE} in
1241+ pc98)
1242+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
1243+ amd64)
1244+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
1245+ *)
1246+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
1247+ esac
1248+ exit ;;
1249+ i*:CYGWIN*:*)
1250+ echo ${UNAME_MACHINE}-pc-cygwin
1251+ exit ;;
1252+ *:MINGW*:*)
1253+ echo ${UNAME_MACHINE}-pc-mingw32
1254+ exit ;;
1255+ i*:windows32*:*)
1256+ # uname -m includes "-pc" on this system.
1257+ echo ${UNAME_MACHINE}-mingw32
1258+ exit ;;
1259+ i*:PW*:*)
1260+ echo ${UNAME_MACHINE}-pc-pw32
1261+ exit ;;
1262+ *:Interix*:*)
1263+ case ${UNAME_MACHINE} in
1264+ x86)
1265+ echo i586-pc-interix${UNAME_RELEASE}
1266+ exit ;;
1267+ authenticamd | genuineintel | EM64T)
1268+ echo x86_64-unknown-interix${UNAME_RELEASE}
1269+ exit ;;
1270+ IA64)
1271+ echo ia64-unknown-interix${UNAME_RELEASE}
1272+ exit ;;
1273+ esac ;;
1274+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
1275+ echo i${UNAME_MACHINE}-pc-mks
1276+ exit ;;
1277+ 8664:Windows_NT:*)
1278+ echo x86_64-pc-mks
1279+ exit ;;
1280+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
1281+ # How do we know it's Interix rather than the generic POSIX subsystem?
1282+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
1283+ # UNAME_MACHINE based on the output of uname instead of i386?
1284+ echo i586-pc-interix
1285+ exit ;;
1286+ i*:UWIN*:*)
1287+ echo ${UNAME_MACHINE}-pc-uwin
1288+ exit ;;
1289+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
1290+ echo x86_64-unknown-cygwin
1291+ exit ;;
1292+ p*:CYGWIN*:*)
1293+ echo powerpcle-unknown-cygwin
1294+ exit ;;
1295+ prep*:SunOS:5.*:*)
1296+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
1297+ exit ;;
1298+ *:GNU:*:*)
1299+ # the GNU system
1300+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
1301+ exit ;;
1302+ *:GNU/*:*:*)
1303+ # other systems with GNU libc and userland
1304+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
1305+ exit ;;
1306+ i*86:Minix:*:*)
1307+ echo ${UNAME_MACHINE}-pc-minix
1308+ exit ;;
1309+ alpha:Linux:*:*)
1310+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
1311+ EV5) UNAME_MACHINE=alphaev5 ;;
1312+ EV56) UNAME_MACHINE=alphaev56 ;;
1313+ PCA56) UNAME_MACHINE=alphapca56 ;;
1314+ PCA57) UNAME_MACHINE=alphapca56 ;;
1315+ EV6) UNAME_MACHINE=alphaev6 ;;
1316+ EV67) UNAME_MACHINE=alphaev67 ;;
1317+ EV68*) UNAME_MACHINE=alphaev68 ;;
1318+ esac
1319+ objdump --private-headers /bin/sh | grep -q ld.so.1
1320+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
1321+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
1322+ exit ;;
1323+ arm*:Linux:*:*)
1324+ eval $set_cc_for_build
1325+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
1326+ | grep -q __ARM_EABI__
1327+ then
1328+ echo ${UNAME_MACHINE}-unknown-linux-gnu
1329+ else
1330+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
1331+ fi
1332+ exit ;;
1333+ avr32*:Linux:*:*)
1334+ echo ${UNAME_MACHINE}-unknown-linux-gnu
1335+ exit ;;
1336+ cris:Linux:*:*)
1337+ echo cris-axis-linux-gnu
1338+ exit ;;
1339+ crisv32:Linux:*:*)
1340+ echo crisv32-axis-linux-gnu
1341+ exit ;;
1342+ frv:Linux:*:*)
1343+ echo frv-unknown-linux-gnu
1344+ exit ;;
1345+ i*86:Linux:*:*)
1346+ LIBC=gnu
1347+ eval $set_cc_for_build
1348+ sed 's/^ //' << EOF >$dummy.c
1349+ #ifdef __dietlibc__
1350+ LIBC=dietlibc
1351+ #endif
1352+EOF
1353+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
1354+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1355+ exit ;;
1356+ ia64:Linux:*:*)
1357+ echo ${UNAME_MACHINE}-unknown-linux-gnu
1358+ exit ;;
1359+ m32r*:Linux:*:*)
1360+ echo ${UNAME_MACHINE}-unknown-linux-gnu
1361+ exit ;;
1362+ m68*:Linux:*:*)
1363+ echo ${UNAME_MACHINE}-unknown-linux-gnu
1364+ exit ;;
1365+ mips:Linux:*:* | mips64:Linux:*:*)
1366+ eval $set_cc_for_build
1367+ sed 's/^ //' << EOF >$dummy.c
1368+ #undef CPU
1369+ #undef ${UNAME_MACHINE}
1370+ #undef ${UNAME_MACHINE}el
1371+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
1372+ CPU=${UNAME_MACHINE}el
1373+ #else
1374+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
1375+ CPU=${UNAME_MACHINE}
1376+ #else
1377+ CPU=
1378+ #endif
1379+ #endif
1380+EOF
1381+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
1382+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
1383+ ;;
1384+ or32:Linux:*:*)
1385+ echo or32-unknown-linux-gnu
1386+ exit ;;
1387+ padre:Linux:*:*)
1388+ echo sparc-unknown-linux-gnu
1389+ exit ;;
1390+ parisc64:Linux:*:* | hppa64:Linux:*:*)
1391+ echo hppa64-unknown-linux-gnu
1392+ exit ;;
1393+ parisc:Linux:*:* | hppa:Linux:*:*)
1394+ # Look for CPU level
1395+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1396+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
1397+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
1398+ *) echo hppa-unknown-linux-gnu ;;
1399+ esac
1400+ exit ;;
1401+ ppc64:Linux:*:*)
1402+ echo powerpc64-unknown-linux-gnu
1403+ exit ;;
1404+ ppc:Linux:*:*)
1405+ echo powerpc-unknown-linux-gnu
1406+ exit ;;
1407+ s390:Linux:*:* | s390x:Linux:*:*)
1408+ echo ${UNAME_MACHINE}-ibm-linux
1409+ exit ;;
1410+ sh64*:Linux:*:*)
1411+ echo ${UNAME_MACHINE}-unknown-linux-gnu
1412+ exit ;;
1413+ sh*:Linux:*:*)
1414+ echo ${UNAME_MACHINE}-unknown-linux-gnu
1415+ exit ;;
1416+ sparc:Linux:*:* | sparc64:Linux:*:*)
1417+ echo ${UNAME_MACHINE}-unknown-linux-gnu
1418+ exit ;;
1419+ vax:Linux:*:*)
1420+ echo ${UNAME_MACHINE}-dec-linux-gnu
1421+ exit ;;
1422+ x86_64:Linux:*:*)
1423+ echo x86_64-unknown-linux-gnu
1424+ exit ;;
1425+ xtensa*:Linux:*:*)
1426+ echo ${UNAME_MACHINE}-unknown-linux-gnu
1427+ exit ;;
1428+ i*86:DYNIX/ptx:4*:*)
1429+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1430+ # earlier versions are messed up and put the nodename in both
1431+ # sysname and nodename.
1432+ echo i386-sequent-sysv4
1433+ exit ;;
1434+ i*86:UNIX_SV:4.2MP:2.*)
1435+ # Unixware is an offshoot of SVR4, but it has its own version
1436+ # number series starting with 2...
1437+ # I am not positive that other SVR4 systems won't match this,
1438+ # I just have to hope. -- rms.
1439+ # Use sysv4.2uw... so that sysv4* matches it.
1440+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1441+ exit ;;
1442+ i*86:OS/2:*:*)
1443+ # If we were able to find `uname', then EMX Unix compatibility
1444+ # is probably installed.
1445+ echo ${UNAME_MACHINE}-pc-os2-emx
1446+ exit ;;
1447+ i*86:XTS-300:*:STOP)
1448+ echo ${UNAME_MACHINE}-unknown-stop
1449+ exit ;;
1450+ i*86:atheos:*:*)
1451+ echo ${UNAME_MACHINE}-unknown-atheos
1452+ exit ;;
1453+ i*86:syllable:*:*)
1454+ echo ${UNAME_MACHINE}-pc-syllable
1455+ exit ;;
1456+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1457+ echo i386-unknown-lynxos${UNAME_RELEASE}
1458+ exit ;;
1459+ i*86:*DOS:*:*)
1460+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
1461+ exit ;;
1462+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1463+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1464+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1465+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1466+ else
1467+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1468+ fi
1469+ exit ;;
1470+ i*86:*:5:[678]*)
1471+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
1472+ case `/bin/uname -X | grep "^Machine"` in
1473+ *486*) UNAME_MACHINE=i486 ;;
1474+ *Pentium) UNAME_MACHINE=i586 ;;
1475+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1476+ esac
1477+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1478+ exit ;;
1479+ i*86:*:3.2:*)
1480+ if test -f /usr/options/cb.name; then
1481+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1482+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1483+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
1484+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1485+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1486+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1487+ && UNAME_MACHINE=i586
1488+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1489+ && UNAME_MACHINE=i686
1490+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1491+ && UNAME_MACHINE=i686
1492+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1493+ else
1494+ echo ${UNAME_MACHINE}-pc-sysv32
1495+ fi
1496+ exit ;;
1497+ pc:*:*:*)
1498+ # Left here for compatibility:
1499+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
1500+ # the processor, so we play safe by assuming i586.
1501+ # Note: whatever this is, it MUST be the same as what config.sub
1502+ # prints for the "djgpp" host, or else GDB configury will decide that
1503+ # this is a cross-build.
1504+ echo i586-pc-msdosdjgpp
1505+ exit ;;
1506+ Intel:Mach:3*:*)
1507+ echo i386-pc-mach3
1508+ exit ;;
1509+ paragon:*:*:*)
1510+ echo i860-intel-osf1
1511+ exit ;;
1512+ i860:*:4.*:*) # i860-SVR4
1513+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1514+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1515+ else # Add other i860-SVR4 vendors below as they are discovered.
1516+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1517+ fi
1518+ exit ;;
1519+ mini*:CTIX:SYS*5:*)
1520+ # "miniframe"
1521+ echo m68010-convergent-sysv
1522+ exit ;;
1523+ mc68k:UNIX:SYSTEM5:3.51m)
1524+ echo m68k-convergent-sysv
1525+ exit ;;
1526+ M680?0:D-NIX:5.3:*)
1527+ echo m68k-diab-dnix
1528+ exit ;;
1529+ M68*:*:R3V[5678]*:*)
1530+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1531+ 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)
1532+ OS_REL=''
1533+ test -r /etc/.relid \
1534+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1535+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1536+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1537+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1538+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1539+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1540+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1541+ && { echo i486-ncr-sysv4; exit; } ;;
1542+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1543+ OS_REL='.3'
1544+ test -r /etc/.relid \
1545+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1546+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1547+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1548+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1549+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1550+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1551+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1552+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1553+ echo m68k-unknown-lynxos${UNAME_RELEASE}
1554+ exit ;;
1555+ mc68030:UNIX_System_V:4.*:*)
1556+ echo m68k-atari-sysv4
1557+ exit ;;
1558+ TSUNAMI:LynxOS:2.*:*)
1559+ echo sparc-unknown-lynxos${UNAME_RELEASE}
1560+ exit ;;
1561+ rs6000:LynxOS:2.*:*)
1562+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
1563+ exit ;;
1564+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1565+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
1566+ exit ;;
1567+ SM[BE]S:UNIX_SV:*:*)
1568+ echo mips-dde-sysv${UNAME_RELEASE}
1569+ exit ;;
1570+ RM*:ReliantUNIX-*:*:*)
1571+ echo mips-sni-sysv4
1572+ exit ;;
1573+ RM*:SINIX-*:*:*)
1574+ echo mips-sni-sysv4
1575+ exit ;;
1576+ *:SINIX-*:*:*)
1577+ if uname -p 2>/dev/null >/dev/null ; then
1578+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
1579+ echo ${UNAME_MACHINE}-sni-sysv4
1580+ else
1581+ echo ns32k-sni-sysv
1582+ fi
1583+ exit ;;
1584+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1585+ # says <Richard.M.Bartel@ccMail.Census.GOV>
1586+ echo i586-unisys-sysv4
1587+ exit ;;
1588+ *:UNIX_System_V:4*:FTX*)
1589+ # From Gerald Hewes <hewes@openmarket.com>.
1590+ # How about differentiating between stratus architectures? -djm
1591+ echo hppa1.1-stratus-sysv4
1592+ exit ;;
1593+ *:*:*:FTX*)
1594+ # From seanf@swdc.stratus.com.
1595+ echo i860-stratus-sysv4
1596+ exit ;;
1597+ i*86:VOS:*:*)
1598+ # From Paul.Green@stratus.com.
1599+ echo ${UNAME_MACHINE}-stratus-vos
1600+ exit ;;
1601+ *:VOS:*:*)
1602+ # From Paul.Green@stratus.com.
1603+ echo hppa1.1-stratus-vos
1604+ exit ;;
1605+ mc68*:A/UX:*:*)
1606+ echo m68k-apple-aux${UNAME_RELEASE}
1607+ exit ;;
1608+ news*:NEWS-OS:6*:*)
1609+ echo mips-sony-newsos6
1610+ exit ;;
1611+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1612+ if [ -d /usr/nec ]; then
1613+ echo mips-nec-sysv${UNAME_RELEASE}
1614+ else
1615+ echo mips-unknown-sysv${UNAME_RELEASE}
1616+ fi
1617+ exit ;;
1618+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1619+ echo powerpc-be-beos
1620+ exit ;;
1621+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1622+ echo powerpc-apple-beos
1623+ exit ;;
1624+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1625+ echo i586-pc-beos
1626+ exit ;;
1627+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1628+ echo i586-pc-haiku
1629+ exit ;;
1630+ SX-4:SUPER-UX:*:*)
1631+ echo sx4-nec-superux${UNAME_RELEASE}
1632+ exit ;;
1633+ SX-5:SUPER-UX:*:*)
1634+ echo sx5-nec-superux${UNAME_RELEASE}
1635+ exit ;;
1636+ SX-6:SUPER-UX:*:*)
1637+ echo sx6-nec-superux${UNAME_RELEASE}
1638+ exit ;;
1639+ SX-7:SUPER-UX:*:*)
1640+ echo sx7-nec-superux${UNAME_RELEASE}
1641+ exit ;;
1642+ SX-8:SUPER-UX:*:*)
1643+ echo sx8-nec-superux${UNAME_RELEASE}
1644+ exit ;;
1645+ SX-8R:SUPER-UX:*:*)
1646+ echo sx8r-nec-superux${UNAME_RELEASE}
1647+ exit ;;
1648+ Power*:Rhapsody:*:*)
1649+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
1650+ exit ;;
1651+ *:Rhapsody:*:*)
1652+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1653+ exit ;;
1654+ *:Darwin:*:*)
1655+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1656+ case $UNAME_PROCESSOR in
1657+ i386)
1658+ eval $set_cc_for_build
1659+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1660+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1661+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1662+ grep IS_64BIT_ARCH >/dev/null
1663+ then
1664+ UNAME_PROCESSOR="x86_64"
1665+ fi
1666+ fi ;;
1667+ unknown) UNAME_PROCESSOR=powerpc ;;
1668+ esac
1669+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1670+ exit ;;
1671+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
1672+ UNAME_PROCESSOR=`uname -p`
1673+ if test "$UNAME_PROCESSOR" = "x86"; then
1674+ UNAME_PROCESSOR=i386
1675+ UNAME_MACHINE=pc
1676+ fi
1677+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1678+ exit ;;
1679+ *:QNX:*:4*)
1680+ echo i386-pc-qnx
1681+ exit ;;
1682+ NSE-?:NONSTOP_KERNEL:*:*)
1683+ echo nse-tandem-nsk${UNAME_RELEASE}
1684+ exit ;;
1685+ NSR-?:NONSTOP_KERNEL:*:*)
1686+ echo nsr-tandem-nsk${UNAME_RELEASE}
1687+ exit ;;
1688+ *:NonStop-UX:*:*)
1689+ echo mips-compaq-nonstopux
1690+ exit ;;
1691+ BS2000:POSIX*:*:*)
1692+ echo bs2000-siemens-sysv
1693+ exit ;;
1694+ DS/*:UNIX_System_V:*:*)
1695+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1696+ exit ;;
1697+ *:Plan9:*:*)
1698+ # "uname -m" is not consistent, so use $cputype instead. 386
1699+ # is converted to i386 for consistency with other x86
1700+ # operating systems.
1701+ if test "$cputype" = "386"; then
1702+ UNAME_MACHINE=i386
1703+ else
1704+ UNAME_MACHINE="$cputype"
1705+ fi
1706+ echo ${UNAME_MACHINE}-unknown-plan9
1707+ exit ;;
1708+ *:TOPS-10:*:*)
1709+ echo pdp10-unknown-tops10
1710+ exit ;;
1711+ *:TENEX:*:*)
1712+ echo pdp10-unknown-tenex
1713+ exit ;;
1714+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1715+ echo pdp10-dec-tops20
1716+ exit ;;
1717+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1718+ echo pdp10-xkl-tops20
1719+ exit ;;
1720+ *:TOPS-20:*:*)
1721+ echo pdp10-unknown-tops20
1722+ exit ;;
1723+ *:ITS:*:*)
1724+ echo pdp10-unknown-its
1725+ exit ;;
1726+ SEI:*:*:SEIUX)
1727+ echo mips-sei-seiux${UNAME_RELEASE}
1728+ exit ;;
1729+ *:DragonFly:*:*)
1730+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1731+ exit ;;
1732+ *:*VMS:*:*)
1733+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
1734+ case "${UNAME_MACHINE}" in
1735+ A*) echo alpha-dec-vms ; exit ;;
1736+ I*) echo ia64-dec-vms ; exit ;;
1737+ V*) echo vax-dec-vms ; exit ;;
1738+ esac ;;
1739+ *:XENIX:*:SysV)
1740+ echo i386-pc-xenix
1741+ exit ;;
1742+ i*86:skyos:*:*)
1743+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1744+ exit ;;
1745+ i*86:rdos:*:*)
1746+ echo ${UNAME_MACHINE}-pc-rdos
1747+ exit ;;
1748+ i*86:AROS:*:*)
1749+ echo ${UNAME_MACHINE}-pc-aros
1750+ exit ;;
1751+esac
1752+
1753+#echo '(No uname command or uname output not recognized.)' 1>&2
1754+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1755+
1756+eval $set_cc_for_build
1757+cat >$dummy.c <<EOF
1758+#ifdef _SEQUENT_
1759+# include <sys/types.h>
1760+# include <sys/utsname.h>
1761+#endif
1762+main ()
1763+{
1764+#if defined (sony)
1765+#if defined (MIPSEB)
1766+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1767+ I don't know.... */
1768+ printf ("mips-sony-bsd\n"); exit (0);
1769+#else
1770+#include <sys/param.h>
1771+ printf ("m68k-sony-newsos%s\n",
1772+#ifdef NEWSOS4
1773+ "4"
1774+#else
1775+ ""
1776+#endif
1777+ ); exit (0);
1778+#endif
1779+#endif
1780+
1781+#if defined (__arm) && defined (__acorn) && defined (__unix)
1782+ printf ("arm-acorn-riscix\n"); exit (0);
1783+#endif
1784+
1785+#if defined (hp300) && !defined (hpux)
1786+ printf ("m68k-hp-bsd\n"); exit (0);
1787+#endif
1788+
1789+#if defined (NeXT)
1790+#if !defined (__ARCHITECTURE__)
1791+#define __ARCHITECTURE__ "m68k"
1792+#endif
1793+ int version;
1794+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1795+ if (version < 4)
1796+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1797+ else
1798+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1799+ exit (0);
1800+#endif
1801+
1802+#if defined (MULTIMAX) || defined (n16)
1803+#if defined (UMAXV)
1804+ printf ("ns32k-encore-sysv\n"); exit (0);
1805+#else
1806+#if defined (CMU)
1807+ printf ("ns32k-encore-mach\n"); exit (0);
1808+#else
1809+ printf ("ns32k-encore-bsd\n"); exit (0);
1810+#endif
1811+#endif
1812+#endif
1813+
1814+#if defined (__386BSD__)
1815+ printf ("i386-pc-bsd\n"); exit (0);
1816+#endif
1817+
1818+#if defined (sequent)
1819+#if defined (i386)
1820+ printf ("i386-sequent-dynix\n"); exit (0);
1821+#endif
1822+#if defined (ns32000)
1823+ printf ("ns32k-sequent-dynix\n"); exit (0);
1824+#endif
1825+#endif
1826+
1827+#if defined (_SEQUENT_)
1828+ struct utsname un;
1829+
1830+ uname(&un);
1831+
1832+ if (strncmp(un.version, "V2", 2) == 0) {
1833+ printf ("i386-sequent-ptx2\n"); exit (0);
1834+ }
1835+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1836+ printf ("i386-sequent-ptx1\n"); exit (0);
1837+ }
1838+ printf ("i386-sequent-ptx\n"); exit (0);
1839+
1840+#endif
1841+
1842+#if defined (vax)
1843+# if !defined (ultrix)
1844+# include <sys/param.h>
1845+# if defined (BSD)
1846+# if BSD == 43
1847+ printf ("vax-dec-bsd4.3\n"); exit (0);
1848+# else
1849+# if BSD == 199006
1850+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
1851+# else
1852+ printf ("vax-dec-bsd\n"); exit (0);
1853+# endif
1854+# endif
1855+# else
1856+ printf ("vax-dec-bsd\n"); exit (0);
1857+# endif
1858+# else
1859+ printf ("vax-dec-ultrix\n"); exit (0);
1860+# endif
1861+#endif
1862+
1863+#if defined (alliant) && defined (i860)
1864+ printf ("i860-alliant-bsd\n"); exit (0);
1865+#endif
1866+
1867+ exit (1);
1868+}
1869+EOF
1870+
1871+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1872+ { echo "$SYSTEM_NAME"; exit; }
1873+
1874+# Apollos put the system type in the environment.
1875+
1876+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1877+
1878+# Convex versions that predate uname can use getsysinfo(1)
1879+
1880+if [ -x /usr/convex/getsysinfo ]
1881+then
1882+ case `getsysinfo -f cpu_type` in
1883+ c1*)
1884+ echo c1-convex-bsd
1885+ exit ;;
1886+ c2*)
1887+ if getsysinfo -f scalar_acc
1888+ then echo c32-convex-bsd
1889+ else echo c2-convex-bsd
1890+ fi
1891+ exit ;;
1892+ c34*)
1893+ echo c34-convex-bsd
1894+ exit ;;
1895+ c38*)
1896+ echo c38-convex-bsd
1897+ exit ;;
1898+ c4*)
1899+ echo c4-convex-bsd
1900+ exit ;;
1901+ esac
1902+fi
1903+
1904+cat >&2 <<EOF
1905+$0: unable to guess system type
1906+
1907+This script, last modified $timestamp, has failed to recognize
1908+the operating system you are using. It is advised that you
1909+download the most up to date version of the config scripts from
1910+
1911+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1912+and
1913+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1914+
1915+If the version you run ($0) is already up to date, please
1916+send the following data and any information you think might be
1917+pertinent to <config-patches@gnu.org> in order to provide the needed
1918+information to handle your system.
1919+
1920+config.guess timestamp = $timestamp
1921+
1922+uname -m = `(uname -m) 2>/dev/null || echo unknown`
1923+uname -r = `(uname -r) 2>/dev/null || echo unknown`
1924+uname -s = `(uname -s) 2>/dev/null || echo unknown`
1925+uname -v = `(uname -v) 2>/dev/null || echo unknown`
1926+
1927+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1928+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1929+
1930+hostinfo = `(hostinfo) 2>/dev/null`
1931+/bin/universe = `(/bin/universe) 2>/dev/null`
1932+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1933+/bin/arch = `(/bin/arch) 2>/dev/null`
1934+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1935+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1936+
1937+UNAME_MACHINE = ${UNAME_MACHINE}
1938+UNAME_RELEASE = ${UNAME_RELEASE}
1939+UNAME_SYSTEM = ${UNAME_SYSTEM}
1940+UNAME_VERSION = ${UNAME_VERSION}
1941+EOF
1942+
1943+exit 1
1944+
1945+# Local variables:
1946+# eval: (add-hook 'write-file-hooks 'time-stamp)
1947+# time-stamp-start: "timestamp='"
1948+# time-stamp-format: "%:y-%02m-%02d"
1949+# time-stamp-end: "'"
1950+# End:
1951
1952=== added file 'config.sub'
1953--- config.sub 1970-01-01 00:00:00 +0000
1954+++ config.sub 2012-04-04 19:56:26 +0000
1955@@ -0,0 +1,1714 @@
1956+#! /bin/sh
1957+# Configuration validation subroutine script.
1958+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1959+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
1960+# Free Software Foundation, Inc.
1961+
1962+timestamp='2010-01-22'
1963+
1964+# This file is (in principle) common to ALL GNU software.
1965+# The presence of a machine in this file suggests that SOME GNU software
1966+# can handle that machine. It does not imply ALL GNU software can.
1967+#
1968+# This file is free software; you can redistribute it and/or modify
1969+# it under the terms of the GNU General Public License as published by
1970+# the Free Software Foundation; either version 2 of the License, or
1971+# (at your option) any later version.
1972+#
1973+# This program is distributed in the hope that it will be useful,
1974+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1975+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1976+# GNU General Public License for more details.
1977+#
1978+# You should have received a copy of the GNU General Public License
1979+# along with this program; if not, write to the Free Software
1980+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
1981+# 02110-1301, USA.
1982+#
1983+# As a special exception to the GNU General Public License, if you
1984+# distribute this file as part of a program that contains a
1985+# configuration script generated by Autoconf, you may include it under
1986+# the same distribution terms that you use for the rest of that program.
1987+
1988+
1989+# Please send patches to <config-patches@gnu.org>. Submit a context
1990+# diff and a properly formatted GNU ChangeLog entry.
1991+#
1992+# Configuration subroutine to validate and canonicalize a configuration type.
1993+# Supply the specified configuration type as an argument.
1994+# If it is invalid, we print an error message on stderr and exit with code 1.
1995+# Otherwise, we print the canonical config type on stdout and succeed.
1996+
1997+# You can get the latest version of this script from:
1998+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1999+
2000+# This file is supposed to be the same for all GNU packages
2001+# and recognize all the CPU types, system types and aliases
2002+# that are meaningful with *any* GNU software.
2003+# Each package is responsible for reporting which valid configurations
2004+# it does not support. The user should be able to distinguish
2005+# a failure to support a valid configuration from a meaningless
2006+# configuration.
2007+
2008+# The goal of this file is to map all the various variations of a given
2009+# machine specification into a single specification in the form:
2010+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
2011+# or in some cases, the newer four-part form:
2012+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
2013+# It is wrong to echo any other type of specification.
2014+
2015+me=`echo "$0" | sed -e 's,.*/,,'`
2016+
2017+usage="\
2018+Usage: $0 [OPTION] CPU-MFR-OPSYS
2019+ $0 [OPTION] ALIAS
2020+
2021+Canonicalize a configuration name.
2022+
2023+Operation modes:
2024+ -h, --help print this help, then exit
2025+ -t, --time-stamp print date of last modification, then exit
2026+ -v, --version print version number, then exit
2027+
2028+Report bugs and patches to <config-patches@gnu.org>."
2029+
2030+version="\
2031+GNU config.sub ($timestamp)
2032+
2033+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2034+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
2035+Software Foundation, Inc.
2036+
2037+This is free software; see the source for copying conditions. There is NO
2038+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
2039+
2040+help="
2041+Try \`$me --help' for more information."
2042+
2043+# Parse command line
2044+while test $# -gt 0 ; do
2045+ case $1 in
2046+ --time-stamp | --time* | -t )
2047+ echo "$timestamp" ; exit ;;
2048+ --version | -v )
2049+ echo "$version" ; exit ;;
2050+ --help | --h* | -h )
2051+ echo "$usage"; exit ;;
2052+ -- ) # Stop option processing
2053+ shift; break ;;
2054+ - ) # Use stdin as input.
2055+ break ;;
2056+ -* )
2057+ echo "$me: invalid option $1$help"
2058+ exit 1 ;;
2059+
2060+ *local*)
2061+ # First pass through any local machine types.
2062+ echo $1
2063+ exit ;;
2064+
2065+ * )
2066+ break ;;
2067+ esac
2068+done
2069+
2070+case $# in
2071+ 0) echo "$me: missing argument$help" >&2
2072+ exit 1;;
2073+ 1) ;;
2074+ *) echo "$me: too many arguments$help" >&2
2075+ exit 1;;
2076+esac
2077+
2078+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
2079+# Here we must recognize all the valid KERNEL-OS combinations.
2080+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
2081+case $maybe_os in
2082+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
2083+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
2084+ kopensolaris*-gnu* | \
2085+ storm-chaos* | os2-emx* | rtmk-nova*)
2086+ os=-$maybe_os
2087+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
2088+ ;;
2089+ *)
2090+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
2091+ if [ $basic_machine != $1 ]
2092+ then os=`echo $1 | sed 's/.*-/-/'`
2093+ else os=; fi
2094+ ;;
2095+esac
2096+
2097+### Let's recognize common machines as not being operating systems so
2098+### that things like config.sub decstation-3100 work. We also
2099+### recognize some manufacturers as not being operating systems, so we
2100+### can provide default operating systems below.
2101+case $os in
2102+ -sun*os*)
2103+ # Prevent following clause from handling this invalid input.
2104+ ;;
2105+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
2106+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
2107+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
2108+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
2109+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
2110+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
2111+ -apple | -axis | -knuth | -cray | -microblaze)
2112+ os=
2113+ basic_machine=$1
2114+ ;;
2115+ -bluegene*)
2116+ os=-cnk
2117+ ;;
2118+ -sim | -cisco | -oki | -wec | -winbond)
2119+ os=
2120+ basic_machine=$1
2121+ ;;
2122+ -scout)
2123+ ;;
2124+ -wrs)
2125+ os=-vxworks
2126+ basic_machine=$1
2127+ ;;
2128+ -chorusos*)
2129+ os=-chorusos
2130+ basic_machine=$1
2131+ ;;
2132+ -chorusrdb)
2133+ os=-chorusrdb
2134+ basic_machine=$1
2135+ ;;
2136+ -hiux*)
2137+ os=-hiuxwe2
2138+ ;;
2139+ -sco6)
2140+ os=-sco5v6
2141+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2142+ ;;
2143+ -sco5)
2144+ os=-sco3.2v5
2145+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2146+ ;;
2147+ -sco4)
2148+ os=-sco3.2v4
2149+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2150+ ;;
2151+ -sco3.2.[4-9]*)
2152+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
2153+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2154+ ;;
2155+ -sco3.2v[4-9]*)
2156+ # Don't forget version if it is 3.2v4 or newer.
2157+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2158+ ;;
2159+ -sco5v6*)
2160+ # Don't forget version if it is 3.2v4 or newer.
2161+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2162+ ;;
2163+ -sco*)
2164+ os=-sco3.2v2
2165+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2166+ ;;
2167+ -udk*)
2168+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2169+ ;;
2170+ -isc)
2171+ os=-isc2.2
2172+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2173+ ;;
2174+ -clix*)
2175+ basic_machine=clipper-intergraph
2176+ ;;
2177+ -isc*)
2178+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2179+ ;;
2180+ -lynx*)
2181+ os=-lynxos
2182+ ;;
2183+ -ptx*)
2184+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
2185+ ;;
2186+ -windowsnt*)
2187+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
2188+ ;;
2189+ -psos*)
2190+ os=-psos
2191+ ;;
2192+ -mint | -mint[0-9]*)
2193+ basic_machine=m68k-atari
2194+ os=-mint
2195+ ;;
2196+esac
2197+
2198+# Decode aliases for certain CPU-COMPANY combinations.
2199+case $basic_machine in
2200+ # Recognize the basic CPU types without company name.
2201+ # Some are omitted here because they have special meanings below.
2202+ 1750a | 580 \
2203+ | a29k \
2204+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
2205+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
2206+ | am33_2.0 \
2207+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
2208+ | bfin \
2209+ | c4x | clipper \
2210+ | d10v | d30v | dlx | dsp16xx \
2211+ | fido | fr30 | frv \
2212+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
2213+ | i370 | i860 | i960 | ia64 \
2214+ | ip2k | iq2000 \
2215+ | lm32 \
2216+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
2217+ | maxq | mb | microblaze | mcore | mep | metag \
2218+ | mips | mipsbe | mipseb | mipsel | mipsle \
2219+ | mips16 \
2220+ | mips64 | mips64el \
2221+ | mips64octeon | mips64octeonel \
2222+ | mips64orion | mips64orionel \
2223+ | mips64r5900 | mips64r5900el \
2224+ | mips64vr | mips64vrel \
2225+ | mips64vr4100 | mips64vr4100el \
2226+ | mips64vr4300 | mips64vr4300el \
2227+ | mips64vr5000 | mips64vr5000el \
2228+ | mips64vr5900 | mips64vr5900el \
2229+ | mipsisa32 | mipsisa32el \
2230+ | mipsisa32r2 | mipsisa32r2el \
2231+ | mipsisa64 | mipsisa64el \
2232+ | mipsisa64r2 | mipsisa64r2el \
2233+ | mipsisa64sb1 | mipsisa64sb1el \
2234+ | mipsisa64sr71k | mipsisa64sr71kel \
2235+ | mipstx39 | mipstx39el \
2236+ | mn10200 | mn10300 \
2237+ | moxie \
2238+ | mt \
2239+ | msp430 \
2240+ | nios | nios2 \
2241+ | ns16k | ns32k \
2242+ | or32 \
2243+ | pdp10 | pdp11 | pj | pjl \
2244+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
2245+ | pyramid \
2246+ | rx \
2247+ | score \
2248+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
2249+ | sh64 | sh64le \
2250+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
2251+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
2252+ | spu | strongarm \
2253+ | tahoe | thumb | tic4x | tic80 | tron \
2254+ | ubicom32 \
2255+ | v850 | v850e \
2256+ | we32k \
2257+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
2258+ | z8k | z80)
2259+ basic_machine=$basic_machine-unknown
2260+ ;;
2261+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
2262+ # Motorola 68HC11/12.
2263+ basic_machine=$basic_machine-unknown
2264+ os=-none
2265+ ;;
2266+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
2267+ ;;
2268+ ms1)
2269+ basic_machine=mt-unknown
2270+ ;;
2271+
2272+ # We use `pc' rather than `unknown'
2273+ # because (1) that's what they normally are, and
2274+ # (2) the word "unknown" tends to confuse beginning users.
2275+ i*86 | x86_64)
2276+ basic_machine=$basic_machine-pc
2277+ ;;
2278+ # Object if more than one company name word.
2279+ *-*-*)
2280+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
2281+ exit 1
2282+ ;;
2283+ # Recognize the basic CPU types with company name.
2284+ 580-* \
2285+ | a29k-* \
2286+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
2287+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
2288+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
2289+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
2290+ | avr-* | avr32-* \
2291+ | bfin-* | bs2000-* \
2292+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
2293+ | clipper-* | craynv-* | cydra-* \
2294+ | d10v-* | d30v-* | dlx-* \
2295+ | elxsi-* \
2296+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
2297+ | h8300-* | h8500-* \
2298+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
2299+ | i*86-* | i860-* | i960-* | ia64-* \
2300+ | ip2k-* | iq2000-* \
2301+ | lm32-* \
2302+ | m32c-* | m32r-* | m32rle-* \
2303+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
2304+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
2305+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
2306+ | mips16-* \
2307+ | mips64-* | mips64el-* \
2308+ | mips64octeon-* | mips64octeonel-* \
2309+ | mips64orion-* | mips64orionel-* \
2310+ | mips64r5900-* | mips64r5900el-* \
2311+ | mips64vr-* | mips64vrel-* \
2312+ | mips64vr4100-* | mips64vr4100el-* \
2313+ | mips64vr4300-* | mips64vr4300el-* \
2314+ | mips64vr5000-* | mips64vr5000el-* \
2315+ | mips64vr5900-* | mips64vr5900el-* \
2316+ | mipsisa32-* | mipsisa32el-* \
2317+ | mipsisa32r2-* | mipsisa32r2el-* \
2318+ | mipsisa64-* | mipsisa64el-* \
2319+ | mipsisa64r2-* | mipsisa64r2el-* \
2320+ | mipsisa64sb1-* | mipsisa64sb1el-* \
2321+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
2322+ | mipstx39-* | mipstx39el-* \
2323+ | mmix-* \
2324+ | mt-* \
2325+ | msp430-* \
2326+ | nios-* | nios2-* \
2327+ | none-* | np1-* | ns16k-* | ns32k-* \
2328+ | orion-* \
2329+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
2330+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
2331+ | pyramid-* \
2332+ | romp-* | rs6000-* | rx-* \
2333+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
2334+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
2335+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
2336+ | sparclite-* \
2337+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
2338+ | tahoe-* | thumb-* \
2339+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
2340+ | tile-* | tilegx-* \
2341+ | tron-* \
2342+ | ubicom32-* \
2343+ | v850-* | v850e-* | vax-* \
2344+ | we32k-* \
2345+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
2346+ | xstormy16-* | xtensa*-* \
2347+ | ymp-* \
2348+ | z8k-* | z80-*)
2349+ ;;
2350+ # Recognize the basic CPU types without company name, with glob match.
2351+ xtensa*)
2352+ basic_machine=$basic_machine-unknown
2353+ ;;
2354+ # Recognize the various machine names and aliases which stand
2355+ # for a CPU type and a company and sometimes even an OS.
2356+ 386bsd)
2357+ basic_machine=i386-unknown
2358+ os=-bsd
2359+ ;;
2360+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
2361+ basic_machine=m68000-att
2362+ ;;
2363+ 3b*)
2364+ basic_machine=we32k-att
2365+ ;;
2366+ a29khif)
2367+ basic_machine=a29k-amd
2368+ os=-udi
2369+ ;;
2370+ abacus)
2371+ basic_machine=abacus-unknown
2372+ ;;
2373+ adobe68k)
2374+ basic_machine=m68010-adobe
2375+ os=-scout
2376+ ;;
2377+ alliant | fx80)
2378+ basic_machine=fx80-alliant
2379+ ;;
2380+ altos | altos3068)
2381+ basic_machine=m68k-altos
2382+ ;;
2383+ am29k)
2384+ basic_machine=a29k-none
2385+ os=-bsd
2386+ ;;
2387+ amd64)
2388+ basic_machine=x86_64-pc
2389+ ;;
2390+ amd64-*)
2391+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
2392+ ;;
2393+ amdahl)
2394+ basic_machine=580-amdahl
2395+ os=-sysv
2396+ ;;
2397+ amiga | amiga-*)
2398+ basic_machine=m68k-unknown
2399+ ;;
2400+ amigaos | amigados)
2401+ basic_machine=m68k-unknown
2402+ os=-amigaos
2403+ ;;
2404+ amigaunix | amix)
2405+ basic_machine=m68k-unknown
2406+ os=-sysv4
2407+ ;;
2408+ apollo68)
2409+ basic_machine=m68k-apollo
2410+ os=-sysv
2411+ ;;
2412+ apollo68bsd)
2413+ basic_machine=m68k-apollo
2414+ os=-bsd
2415+ ;;
2416+ aros)
2417+ basic_machine=i386-pc
2418+ os=-aros
2419+ ;;
2420+ aux)
2421+ basic_machine=m68k-apple
2422+ os=-aux
2423+ ;;
2424+ balance)
2425+ basic_machine=ns32k-sequent
2426+ os=-dynix
2427+ ;;
2428+ blackfin)
2429+ basic_machine=bfin-unknown
2430+ os=-linux
2431+ ;;
2432+ blackfin-*)
2433+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
2434+ os=-linux
2435+ ;;
2436+ bluegene*)
2437+ basic_machine=powerpc-ibm
2438+ os=-cnk
2439+ ;;
2440+ c90)
2441+ basic_machine=c90-cray
2442+ os=-unicos
2443+ ;;
2444+ cegcc)
2445+ basic_machine=arm-unknown
2446+ os=-cegcc
2447+ ;;
2448+ convex-c1)
2449+ basic_machine=c1-convex
2450+ os=-bsd
2451+ ;;
2452+ convex-c2)
2453+ basic_machine=c2-convex
2454+ os=-bsd
2455+ ;;
2456+ convex-c32)
2457+ basic_machine=c32-convex
2458+ os=-bsd
2459+ ;;
2460+ convex-c34)
2461+ basic_machine=c34-convex
2462+ os=-bsd
2463+ ;;
2464+ convex-c38)
2465+ basic_machine=c38-convex
2466+ os=-bsd
2467+ ;;
2468+ cray | j90)
2469+ basic_machine=j90-cray
2470+ os=-unicos
2471+ ;;
2472+ craynv)
2473+ basic_machine=craynv-cray
2474+ os=-unicosmp
2475+ ;;
2476+ cr16)
2477+ basic_machine=cr16-unknown
2478+ os=-elf
2479+ ;;
2480+ crds | unos)
2481+ basic_machine=m68k-crds
2482+ ;;
2483+ crisv32 | crisv32-* | etraxfs*)
2484+ basic_machine=crisv32-axis
2485+ ;;
2486+ cris | cris-* | etrax*)
2487+ basic_machine=cris-axis
2488+ ;;
2489+ crx)
2490+ basic_machine=crx-unknown
2491+ os=-elf
2492+ ;;
2493+ da30 | da30-*)
2494+ basic_machine=m68k-da30
2495+ ;;
2496+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
2497+ basic_machine=mips-dec
2498+ ;;
2499+ decsystem10* | dec10*)
2500+ basic_machine=pdp10-dec
2501+ os=-tops10
2502+ ;;
2503+ decsystem20* | dec20*)
2504+ basic_machine=pdp10-dec
2505+ os=-tops20
2506+ ;;
2507+ delta | 3300 | motorola-3300 | motorola-delta \
2508+ | 3300-motorola | delta-motorola)
2509+ basic_machine=m68k-motorola
2510+ ;;
2511+ delta88)
2512+ basic_machine=m88k-motorola
2513+ os=-sysv3
2514+ ;;
2515+ dicos)
2516+ basic_machine=i686-pc
2517+ os=-dicos
2518+ ;;
2519+ djgpp)
2520+ basic_machine=i586-pc
2521+ os=-msdosdjgpp
2522+ ;;
2523+ dpx20 | dpx20-*)
2524+ basic_machine=rs6000-bull
2525+ os=-bosx
2526+ ;;
2527+ dpx2* | dpx2*-bull)
2528+ basic_machine=m68k-bull
2529+ os=-sysv3
2530+ ;;
2531+ ebmon29k)
2532+ basic_machine=a29k-amd
2533+ os=-ebmon
2534+ ;;
2535+ elxsi)
2536+ basic_machine=elxsi-elxsi
2537+ os=-bsd
2538+ ;;
2539+ encore | umax | mmax)
2540+ basic_machine=ns32k-encore
2541+ ;;
2542+ es1800 | OSE68k | ose68k | ose | OSE)
2543+ basic_machine=m68k-ericsson
2544+ os=-ose
2545+ ;;
2546+ fx2800)
2547+ basic_machine=i860-alliant
2548+ ;;
2549+ genix)
2550+ basic_machine=ns32k-ns
2551+ ;;
2552+ gmicro)
2553+ basic_machine=tron-gmicro
2554+ os=-sysv
2555+ ;;
2556+ go32)
2557+ basic_machine=i386-pc
2558+ os=-go32
2559+ ;;
2560+ h3050r* | hiux*)
2561+ basic_machine=hppa1.1-hitachi
2562+ os=-hiuxwe2
2563+ ;;
2564+ h8300hms)
2565+ basic_machine=h8300-hitachi
2566+ os=-hms
2567+ ;;
2568+ h8300xray)
2569+ basic_machine=h8300-hitachi
2570+ os=-xray
2571+ ;;
2572+ h8500hms)
2573+ basic_machine=h8500-hitachi
2574+ os=-hms
2575+ ;;
2576+ harris)
2577+ basic_machine=m88k-harris
2578+ os=-sysv3
2579+ ;;
2580+ hp300-*)
2581+ basic_machine=m68k-hp
2582+ ;;
2583+ hp300bsd)
2584+ basic_machine=m68k-hp
2585+ os=-bsd
2586+ ;;
2587+ hp300hpux)
2588+ basic_machine=m68k-hp
2589+ os=-hpux
2590+ ;;
2591+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
2592+ basic_machine=hppa1.0-hp
2593+ ;;
2594+ hp9k2[0-9][0-9] | hp9k31[0-9])
2595+ basic_machine=m68000-hp
2596+ ;;
2597+ hp9k3[2-9][0-9])
2598+ basic_machine=m68k-hp
2599+ ;;
2600+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
2601+ basic_machine=hppa1.0-hp
2602+ ;;
2603+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
2604+ basic_machine=hppa1.1-hp
2605+ ;;
2606+ hp9k78[0-9] | hp78[0-9])
2607+ # FIXME: really hppa2.0-hp
2608+ basic_machine=hppa1.1-hp
2609+ ;;
2610+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
2611+ # FIXME: really hppa2.0-hp
2612+ basic_machine=hppa1.1-hp
2613+ ;;
2614+ hp9k8[0-9][13679] | hp8[0-9][13679])
2615+ basic_machine=hppa1.1-hp
2616+ ;;
2617+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
2618+ basic_machine=hppa1.0-hp
2619+ ;;
2620+ hppa-next)
2621+ os=-nextstep3
2622+ ;;
2623+ hppaosf)
2624+ basic_machine=hppa1.1-hp
2625+ os=-osf
2626+ ;;
2627+ hppro)
2628+ basic_machine=hppa1.1-hp
2629+ os=-proelf
2630+ ;;
2631+ i370-ibm* | ibm*)
2632+ basic_machine=i370-ibm
2633+ ;;
2634+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
2635+ i*86v32)
2636+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
2637+ os=-sysv32
2638+ ;;
2639+ i*86v4*)
2640+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
2641+ os=-sysv4
2642+ ;;
2643+ i*86v)
2644+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
2645+ os=-sysv
2646+ ;;
2647+ i*86sol2)
2648+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
2649+ os=-solaris2
2650+ ;;
2651+ i386mach)
2652+ basic_machine=i386-mach
2653+ os=-mach
2654+ ;;
2655+ i386-vsta | vsta)
2656+ basic_machine=i386-unknown
2657+ os=-vsta
2658+ ;;
2659+ iris | iris4d)
2660+ basic_machine=mips-sgi
2661+ case $os in
2662+ -irix*)
2663+ ;;
2664+ *)
2665+ os=-irix4
2666+ ;;
2667+ esac
2668+ ;;
2669+ isi68 | isi)
2670+ basic_machine=m68k-isi
2671+ os=-sysv
2672+ ;;
2673+ m68knommu)
2674+ basic_machine=m68k-unknown
2675+ os=-linux
2676+ ;;
2677+ m68knommu-*)
2678+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
2679+ os=-linux
2680+ ;;
2681+ m88k-omron*)
2682+ basic_machine=m88k-omron
2683+ ;;
2684+ magnum | m3230)
2685+ basic_machine=mips-mips
2686+ os=-sysv
2687+ ;;
2688+ merlin)
2689+ basic_machine=ns32k-utek
2690+ os=-sysv
2691+ ;;
2692+ microblaze)
2693+ basic_machine=microblaze-xilinx
2694+ ;;
2695+ mingw32)
2696+ basic_machine=i386-pc
2697+ os=-mingw32
2698+ ;;
2699+ mingw32ce)
2700+ basic_machine=arm-unknown
2701+ os=-mingw32ce
2702+ ;;
2703+ miniframe)
2704+ basic_machine=m68000-convergent
2705+ ;;
2706+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
2707+ basic_machine=m68k-atari
2708+ os=-mint
2709+ ;;
2710+ mips3*-*)
2711+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
2712+ ;;
2713+ mips3*)
2714+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
2715+ ;;
2716+ monitor)
2717+ basic_machine=m68k-rom68k
2718+ os=-coff
2719+ ;;
2720+ morphos)
2721+ basic_machine=powerpc-unknown
2722+ os=-morphos
2723+ ;;
2724+ msdos)
2725+ basic_machine=i386-pc
2726+ os=-msdos
2727+ ;;
2728+ ms1-*)
2729+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
2730+ ;;
2731+ mvs)
2732+ basic_machine=i370-ibm
2733+ os=-mvs
2734+ ;;
2735+ ncr3000)
2736+ basic_machine=i486-ncr
2737+ os=-sysv4
2738+ ;;
2739+ netbsd386)
2740+ basic_machine=i386-unknown
2741+ os=-netbsd
2742+ ;;
2743+ netwinder)
2744+ basic_machine=armv4l-rebel
2745+ os=-linux
2746+ ;;
2747+ news | news700 | news800 | news900)
2748+ basic_machine=m68k-sony
2749+ os=-newsos
2750+ ;;
2751+ news1000)
2752+ basic_machine=m68030-sony
2753+ os=-newsos
2754+ ;;
2755+ news-3600 | risc-news)
2756+ basic_machine=mips-sony
2757+ os=-newsos
2758+ ;;
2759+ necv70)
2760+ basic_machine=v70-nec
2761+ os=-sysv
2762+ ;;
2763+ next | m*-next )
2764+ basic_machine=m68k-next
2765+ case $os in
2766+ -nextstep* )
2767+ ;;
2768+ -ns2*)
2769+ os=-nextstep2
2770+ ;;
2771+ *)
2772+ os=-nextstep3
2773+ ;;
2774+ esac
2775+ ;;
2776+ nh3000)
2777+ basic_machine=m68k-harris
2778+ os=-cxux
2779+ ;;
2780+ nh[45]000)
2781+ basic_machine=m88k-harris
2782+ os=-cxux
2783+ ;;
2784+ nindy960)
2785+ basic_machine=i960-intel
2786+ os=-nindy
2787+ ;;
2788+ mon960)
2789+ basic_machine=i960-intel
2790+ os=-mon960
2791+ ;;
2792+ nonstopux)
2793+ basic_machine=mips-compaq
2794+ os=-nonstopux
2795+ ;;
2796+ np1)
2797+ basic_machine=np1-gould
2798+ ;;
2799+ nsr-tandem)
2800+ basic_machine=nsr-tandem
2801+ ;;
2802+ op50n-* | op60c-*)
2803+ basic_machine=hppa1.1-oki
2804+ os=-proelf
2805+ ;;
2806+ openrisc | openrisc-*)
2807+ basic_machine=or32-unknown
2808+ ;;
2809+ os400)
2810+ basic_machine=powerpc-ibm
2811+ os=-os400
2812+ ;;
2813+ OSE68000 | ose68000)
2814+ basic_machine=m68000-ericsson
2815+ os=-ose
2816+ ;;
2817+ os68k)
2818+ basic_machine=m68k-none
2819+ os=-os68k
2820+ ;;
2821+ pa-hitachi)
2822+ basic_machine=hppa1.1-hitachi
2823+ os=-hiuxwe2
2824+ ;;
2825+ paragon)
2826+ basic_machine=i860-intel
2827+ os=-osf
2828+ ;;
2829+ parisc)
2830+ basic_machine=hppa-unknown
2831+ os=-linux
2832+ ;;
2833+ parisc-*)
2834+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
2835+ os=-linux
2836+ ;;
2837+ pbd)
2838+ basic_machine=sparc-tti
2839+ ;;
2840+ pbb)
2841+ basic_machine=m68k-tti
2842+ ;;
2843+ pc532 | pc532-*)
2844+ basic_machine=ns32k-pc532
2845+ ;;
2846+ pc98)
2847+ basic_machine=i386-pc
2848+ ;;
2849+ pc98-*)
2850+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
2851+ ;;
2852+ pentium | p5 | k5 | k6 | nexgen | viac3)
2853+ basic_machine=i586-pc
2854+ ;;
2855+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
2856+ basic_machine=i686-pc
2857+ ;;
2858+ pentiumii | pentium2 | pentiumiii | pentium3)
2859+ basic_machine=i686-pc
2860+ ;;
2861+ pentium4)
2862+ basic_machine=i786-pc
2863+ ;;
2864+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
2865+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
2866+ ;;
2867+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
2868+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
2869+ ;;
2870+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
2871+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
2872+ ;;
2873+ pentium4-*)
2874+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
2875+ ;;
2876+ pn)
2877+ basic_machine=pn-gould
2878+ ;;
2879+ power) basic_machine=power-ibm
2880+ ;;
2881+ ppc) basic_machine=powerpc-unknown
2882+ ;;
2883+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
2884+ ;;
2885+ ppcle | powerpclittle | ppc-le | powerpc-little)
2886+ basic_machine=powerpcle-unknown
2887+ ;;
2888+ ppcle-* | powerpclittle-*)
2889+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
2890+ ;;
2891+ ppc64) basic_machine=powerpc64-unknown
2892+ ;;
2893+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
2894+ ;;
2895+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
2896+ basic_machine=powerpc64le-unknown
2897+ ;;
2898+ ppc64le-* | powerpc64little-*)
2899+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
2900+ ;;
2901+ ps2)
2902+ basic_machine=i386-ibm
2903+ ;;
2904+ pw32)
2905+ basic_machine=i586-unknown
2906+ os=-pw32
2907+ ;;
2908+ rdos)
2909+ basic_machine=i386-pc
2910+ os=-rdos
2911+ ;;
2912+ rom68k)
2913+ basic_machine=m68k-rom68k
2914+ os=-coff
2915+ ;;
2916+ rm[46]00)
2917+ basic_machine=mips-siemens
2918+ ;;
2919+ rtpc | rtpc-*)
2920+ basic_machine=romp-ibm
2921+ ;;
2922+ s390 | s390-*)
2923+ basic_machine=s390-ibm
2924+ ;;
2925+ s390x | s390x-*)
2926+ basic_machine=s390x-ibm
2927+ ;;
2928+ sa29200)
2929+ basic_machine=a29k-amd
2930+ os=-udi
2931+ ;;
2932+ sb1)
2933+ basic_machine=mipsisa64sb1-unknown
2934+ ;;
2935+ sb1el)
2936+ basic_machine=mipsisa64sb1el-unknown
2937+ ;;
2938+ sde)
2939+ basic_machine=mipsisa32-sde
2940+ os=-elf
2941+ ;;
2942+ sei)
2943+ basic_machine=mips-sei
2944+ os=-seiux
2945+ ;;
2946+ sequent)
2947+ basic_machine=i386-sequent
2948+ ;;
2949+ sh)
2950+ basic_machine=sh-hitachi
2951+ os=-hms
2952+ ;;
2953+ sh5el)
2954+ basic_machine=sh5le-unknown
2955+ ;;
2956+ sh64)
2957+ basic_machine=sh64-unknown
2958+ ;;
2959+ sparclite-wrs | simso-wrs)
2960+ basic_machine=sparclite-wrs
2961+ os=-vxworks
2962+ ;;
2963+ sps7)
2964+ basic_machine=m68k-bull
2965+ os=-sysv2
2966+ ;;
2967+ spur)
2968+ basic_machine=spur-unknown
2969+ ;;
2970+ st2000)
2971+ basic_machine=m68k-tandem
2972+ ;;
2973+ stratus)
2974+ basic_machine=i860-stratus
2975+ os=-sysv4
2976+ ;;
2977+ sun2)
2978+ basic_machine=m68000-sun
2979+ ;;
2980+ sun2os3)
2981+ basic_machine=m68000-sun
2982+ os=-sunos3
2983+ ;;
2984+ sun2os4)
2985+ basic_machine=m68000-sun
2986+ os=-sunos4
2987+ ;;
2988+ sun3os3)
2989+ basic_machine=m68k-sun
2990+ os=-sunos3
2991+ ;;
2992+ sun3os4)
2993+ basic_machine=m68k-sun
2994+ os=-sunos4
2995+ ;;
2996+ sun4os3)
2997+ basic_machine=sparc-sun
2998+ os=-sunos3
2999+ ;;
3000+ sun4os4)
3001+ basic_machine=sparc-sun
3002+ os=-sunos4
3003+ ;;
3004+ sun4sol2)
3005+ basic_machine=sparc-sun
3006+ os=-solaris2
3007+ ;;
3008+ sun3 | sun3-*)
3009+ basic_machine=m68k-sun
3010+ ;;
3011+ sun4)
3012+ basic_machine=sparc-sun
3013+ ;;
3014+ sun386 | sun386i | roadrunner)
3015+ basic_machine=i386-sun
3016+ ;;
3017+ sv1)
3018+ basic_machine=sv1-cray
3019+ os=-unicos
3020+ ;;
3021+ symmetry)
3022+ basic_machine=i386-sequent
3023+ os=-dynix
3024+ ;;
3025+ t3e)
3026+ basic_machine=alphaev5-cray
3027+ os=-unicos
3028+ ;;
3029+ t90)
3030+ basic_machine=t90-cray
3031+ os=-unicos
3032+ ;;
3033+ tic54x | c54x*)
3034+ basic_machine=tic54x-unknown
3035+ os=-coff
3036+ ;;
3037+ tic55x | c55x*)
3038+ basic_machine=tic55x-unknown
3039+ os=-coff
3040+ ;;
3041+ tic6x | c6x*)
3042+ basic_machine=tic6x-unknown
3043+ os=-coff
3044+ ;;
3045+ # This must be matched before tile*.
3046+ tilegx*)
3047+ basic_machine=tilegx-unknown
3048+ os=-linux-gnu
3049+ ;;
3050+ tile*)
3051+ basic_machine=tile-unknown
3052+ os=-linux-gnu
3053+ ;;
3054+ tx39)
3055+ basic_machine=mipstx39-unknown
3056+ ;;
3057+ tx39el)
3058+ basic_machine=mipstx39el-unknown
3059+ ;;
3060+ toad1)
3061+ basic_machine=pdp10-xkl
3062+ os=-tops20
3063+ ;;
3064+ tower | tower-32)
3065+ basic_machine=m68k-ncr
3066+ ;;
3067+ tpf)
3068+ basic_machine=s390x-ibm
3069+ os=-tpf
3070+ ;;
3071+ udi29k)
3072+ basic_machine=a29k-amd
3073+ os=-udi
3074+ ;;
3075+ ultra3)
3076+ basic_machine=a29k-nyu
3077+ os=-sym1
3078+ ;;
3079+ v810 | necv810)
3080+ basic_machine=v810-nec
3081+ os=-none
3082+ ;;
3083+ vaxv)
3084+ basic_machine=vax-dec
3085+ os=-sysv
3086+ ;;
3087+ vms)
3088+ basic_machine=vax-dec
3089+ os=-vms
3090+ ;;
3091+ vpp*|vx|vx-*)
3092+ basic_machine=f301-fujitsu
3093+ ;;
3094+ vxworks960)
3095+ basic_machine=i960-wrs
3096+ os=-vxworks
3097+ ;;
3098+ vxworks68)
3099+ basic_machine=m68k-wrs
3100+ os=-vxworks
3101+ ;;
3102+ vxworks29k)
3103+ basic_machine=a29k-wrs
3104+ os=-vxworks
3105+ ;;
3106+ w65*)
3107+ basic_machine=w65-wdc
3108+ os=-none
3109+ ;;
3110+ w89k-*)
3111+ basic_machine=hppa1.1-winbond
3112+ os=-proelf
3113+ ;;
3114+ xbox)
3115+ basic_machine=i686-pc
3116+ os=-mingw32
3117+ ;;
3118+ xps | xps100)
3119+ basic_machine=xps100-honeywell
3120+ ;;
3121+ ymp)
3122+ basic_machine=ymp-cray
3123+ os=-unicos
3124+ ;;
3125+ z8k-*-coff)
3126+ basic_machine=z8k-unknown
3127+ os=-sim
3128+ ;;
3129+ z80-*-coff)
3130+ basic_machine=z80-unknown
3131+ os=-sim
3132+ ;;
3133+ none)
3134+ basic_machine=none-none
3135+ os=-none
3136+ ;;
3137+
3138+# Here we handle the default manufacturer of certain CPU types. It is in
3139+# some cases the only manufacturer, in others, it is the most popular.
3140+ w89k)
3141+ basic_machine=hppa1.1-winbond
3142+ ;;
3143+ op50n)
3144+ basic_machine=hppa1.1-oki
3145+ ;;
3146+ op60c)
3147+ basic_machine=hppa1.1-oki
3148+ ;;
3149+ romp)
3150+ basic_machine=romp-ibm
3151+ ;;
3152+ mmix)
3153+ basic_machine=mmix-knuth
3154+ ;;
3155+ rs6000)
3156+ basic_machine=rs6000-ibm
3157+ ;;
3158+ vax)
3159+ basic_machine=vax-dec
3160+ ;;
3161+ pdp10)
3162+ # there are many clones, so DEC is not a safe bet
3163+ basic_machine=pdp10-unknown
3164+ ;;
3165+ pdp11)
3166+ basic_machine=pdp11-dec
3167+ ;;
3168+ we32k)
3169+ basic_machine=we32k-att
3170+ ;;
3171+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
3172+ basic_machine=sh-unknown
3173+ ;;
3174+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
3175+ basic_machine=sparc-sun
3176+ ;;
3177+ cydra)
3178+ basic_machine=cydra-cydrome
3179+ ;;
3180+ orion)
3181+ basic_machine=orion-highlevel
3182+ ;;
3183+ orion105)
3184+ basic_machine=clipper-highlevel
3185+ ;;
3186+ mac | mpw | mac-mpw)
3187+ basic_machine=m68k-apple
3188+ ;;
3189+ pmac | pmac-mpw)
3190+ basic_machine=powerpc-apple
3191+ ;;
3192+ *-unknown)
3193+ # Make sure to match an already-canonicalized machine name.
3194+ ;;
3195+ *)
3196+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
3197+ exit 1
3198+ ;;
3199+esac
3200+
3201+# Here we canonicalize certain aliases for manufacturers.
3202+case $basic_machine in
3203+ *-digital*)
3204+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
3205+ ;;
3206+ *-commodore*)
3207+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
3208+ ;;
3209+ *)
3210+ ;;
3211+esac
3212+
3213+# Decode manufacturer-specific aliases for certain operating systems.
3214+
3215+if [ x"$os" != x"" ]
3216+then
3217+case $os in
3218+ # First match some system type aliases
3219+ # that might get confused with valid system types.
3220+ # -solaris* is a basic system type, with this one exception.
3221+ -auroraux)
3222+ os=-auroraux
3223+ ;;
3224+ -solaris1 | -solaris1.*)
3225+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
3226+ ;;
3227+ -solaris)
3228+ os=-solaris2
3229+ ;;
3230+ -svr4*)
3231+ os=-sysv4
3232+ ;;
3233+ -unixware*)
3234+ os=-sysv4.2uw
3235+ ;;
3236+ -gnu/linux*)
3237+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
3238+ ;;
3239+ # First accept the basic system types.
3240+ # The portable systems comes first.
3241+ # Each alternative MUST END IN A *, to match a version number.
3242+ # -sysv* is not here because it comes later, after sysvr4.
3243+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
3244+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
3245+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
3246+ | -sym* | -kopensolaris* \
3247+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
3248+ | -aos* | -aros* \
3249+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
3250+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
3251+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
3252+ | -openbsd* | -solidbsd* \
3253+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
3254+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
3255+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
3256+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
3257+ | -chorusos* | -chorusrdb* | -cegcc* \
3258+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
3259+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
3260+ | -uxpv* | -beos* | -mpeix* | -udk* \
3261+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
3262+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
3263+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
3264+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
3265+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
3266+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
3267+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
3268+ # Remember, each alternative MUST END IN *, to match a version number.
3269+ ;;
3270+ -qnx*)
3271+ case $basic_machine in
3272+ x86-* | i*86-*)
3273+ ;;
3274+ *)
3275+ os=-nto$os
3276+ ;;
3277+ esac
3278+ ;;
3279+ -nto-qnx*)
3280+ ;;
3281+ -nto*)
3282+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
3283+ ;;
3284+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
3285+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
3286+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
3287+ ;;
3288+ -mac*)
3289+ os=`echo $os | sed -e 's|mac|macos|'`
3290+ ;;
3291+ -linux-dietlibc)
3292+ os=-linux-dietlibc
3293+ ;;
3294+ -linux*)
3295+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
3296+ ;;
3297+ -sunos5*)
3298+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
3299+ ;;
3300+ -sunos6*)
3301+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
3302+ ;;
3303+ -opened*)
3304+ os=-openedition
3305+ ;;
3306+ -os400*)
3307+ os=-os400
3308+ ;;
3309+ -wince*)
3310+ os=-wince
3311+ ;;
3312+ -osfrose*)
3313+ os=-osfrose
3314+ ;;
3315+ -osf*)
3316+ os=-osf
3317+ ;;
3318+ -utek*)
3319+ os=-bsd
3320+ ;;
3321+ -dynix*)
3322+ os=-bsd
3323+ ;;
3324+ -acis*)
3325+ os=-aos
3326+ ;;
3327+ -atheos*)
3328+ os=-atheos
3329+ ;;
3330+ -syllable*)
3331+ os=-syllable
3332+ ;;
3333+ -386bsd)
3334+ os=-bsd
3335+ ;;
3336+ -ctix* | -uts*)
3337+ os=-sysv
3338+ ;;
3339+ -nova*)
3340+ os=-rtmk-nova
3341+ ;;
3342+ -ns2 )
3343+ os=-nextstep2
3344+ ;;
3345+ -nsk*)
3346+ os=-nsk
3347+ ;;
3348+ # Preserve the version number of sinix5.
3349+ -sinix5.*)
3350+ os=`echo $os | sed -e 's|sinix|sysv|'`
3351+ ;;
3352+ -sinix*)
3353+ os=-sysv4
3354+ ;;
3355+ -tpf*)
3356+ os=-tpf
3357+ ;;
3358+ -triton*)
3359+ os=-sysv3
3360+ ;;
3361+ -oss*)
3362+ os=-sysv3
3363+ ;;
3364+ -svr4)
3365+ os=-sysv4
3366+ ;;
3367+ -svr3)
3368+ os=-sysv3
3369+ ;;
3370+ -sysvr4)
3371+ os=-sysv4
3372+ ;;
3373+ # This must come after -sysvr4.
3374+ -sysv*)
3375+ ;;
3376+ -ose*)
3377+ os=-ose
3378+ ;;
3379+ -es1800*)
3380+ os=-ose
3381+ ;;
3382+ -xenix)
3383+ os=-xenix
3384+ ;;
3385+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
3386+ os=-mint
3387+ ;;
3388+ -aros*)
3389+ os=-aros
3390+ ;;
3391+ -kaos*)
3392+ os=-kaos
3393+ ;;
3394+ -zvmoe)
3395+ os=-zvmoe
3396+ ;;
3397+ -dicos*)
3398+ os=-dicos
3399+ ;;
3400+ -nacl*)
3401+ ;;
3402+ -none)
3403+ ;;
3404+ *)
3405+ # Get rid of the `-' at the beginning of $os.
3406+ os=`echo $os | sed 's/[^-]*-//'`
3407+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
3408+ exit 1
3409+ ;;
3410+esac
3411+else
3412+
3413+# Here we handle the default operating systems that come with various machines.
3414+# The value should be what the vendor currently ships out the door with their
3415+# machine or put another way, the most popular os provided with the machine.
3416+
3417+# Note that if you're going to try to match "-MANUFACTURER" here (say,
3418+# "-sun"), then you have to tell the case statement up towards the top
3419+# that MANUFACTURER isn't an operating system. Otherwise, code above
3420+# will signal an error saying that MANUFACTURER isn't an operating
3421+# system, and we'll never get to this point.
3422+
3423+case $basic_machine in
3424+ score-*)
3425+ os=-elf
3426+ ;;
3427+ spu-*)
3428+ os=-elf
3429+ ;;
3430+ *-acorn)
3431+ os=-riscix1.2
3432+ ;;
3433+ arm*-rebel)
3434+ os=-linux
3435+ ;;
3436+ arm*-semi)
3437+ os=-aout
3438+ ;;
3439+ c4x-* | tic4x-*)
3440+ os=-coff
3441+ ;;
3442+ # This must come before the *-dec entry.
3443+ pdp10-*)
3444+ os=-tops20
3445+ ;;
3446+ pdp11-*)
3447+ os=-none
3448+ ;;
3449+ *-dec | vax-*)
3450+ os=-ultrix4.2
3451+ ;;
3452+ m68*-apollo)
3453+ os=-domain
3454+ ;;
3455+ i386-sun)
3456+ os=-sunos4.0.2
3457+ ;;
3458+ m68000-sun)
3459+ os=-sunos3
3460+ # This also exists in the configure program, but was not the
3461+ # default.
3462+ # os=-sunos4
3463+ ;;
3464+ m68*-cisco)
3465+ os=-aout
3466+ ;;
3467+ mep-*)
3468+ os=-elf
3469+ ;;
3470+ mips*-cisco)
3471+ os=-elf
3472+ ;;
3473+ mips*-*)
3474+ os=-elf
3475+ ;;
3476+ or32-*)
3477+ os=-coff
3478+ ;;
3479+ *-tti) # must be before sparc entry or we get the wrong os.
3480+ os=-sysv3
3481+ ;;
3482+ sparc-* | *-sun)
3483+ os=-sunos4.1.1
3484+ ;;
3485+ *-be)
3486+ os=-beos
3487+ ;;
3488+ *-haiku)
3489+ os=-haiku
3490+ ;;
3491+ *-ibm)
3492+ os=-aix
3493+ ;;
3494+ *-knuth)
3495+ os=-mmixware
3496+ ;;
3497+ *-wec)
3498+ os=-proelf
3499+ ;;
3500+ *-winbond)
3501+ os=-proelf
3502+ ;;
3503+ *-oki)
3504+ os=-proelf
3505+ ;;
3506+ *-hp)
3507+ os=-hpux
3508+ ;;
3509+ *-hitachi)
3510+ os=-hiux
3511+ ;;
3512+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
3513+ os=-sysv
3514+ ;;
3515+ *-cbm)
3516+ os=-amigaos
3517+ ;;
3518+ *-dg)
3519+ os=-dgux
3520+ ;;
3521+ *-dolphin)
3522+ os=-sysv3
3523+ ;;
3524+ m68k-ccur)
3525+ os=-rtu
3526+ ;;
3527+ m88k-omron*)
3528+ os=-luna
3529+ ;;
3530+ *-next )
3531+ os=-nextstep
3532+ ;;
3533+ *-sequent)
3534+ os=-ptx
3535+ ;;
3536+ *-crds)
3537+ os=-unos
3538+ ;;
3539+ *-ns)
3540+ os=-genix
3541+ ;;
3542+ i370-*)
3543+ os=-mvs
3544+ ;;
3545+ *-next)
3546+ os=-nextstep3
3547+ ;;
3548+ *-gould)
3549+ os=-sysv
3550+ ;;
3551+ *-highlevel)
3552+ os=-bsd
3553+ ;;
3554+ *-encore)
3555+ os=-bsd
3556+ ;;
3557+ *-sgi)
3558+ os=-irix
3559+ ;;
3560+ *-siemens)
3561+ os=-sysv4
3562+ ;;
3563+ *-masscomp)
3564+ os=-rtu
3565+ ;;
3566+ f30[01]-fujitsu | f700-fujitsu)
3567+ os=-uxpv
3568+ ;;
3569+ *-rom68k)
3570+ os=-coff
3571+ ;;
3572+ *-*bug)
3573+ os=-coff
3574+ ;;
3575+ *-apple)
3576+ os=-macos
3577+ ;;
3578+ *-atari*)
3579+ os=-mint
3580+ ;;
3581+ *)
3582+ os=-none
3583+ ;;
3584+esac
3585+fi
3586+
3587+# Here we handle the case where we know the os, and the CPU type, but not the
3588+# manufacturer. We pick the logical manufacturer.
3589+vendor=unknown
3590+case $basic_machine in
3591+ *-unknown)
3592+ case $os in
3593+ -riscix*)
3594+ vendor=acorn
3595+ ;;
3596+ -sunos*)
3597+ vendor=sun
3598+ ;;
3599+ -cnk*|-aix*)
3600+ vendor=ibm
3601+ ;;
3602+ -beos*)
3603+ vendor=be
3604+ ;;
3605+ -hpux*)
3606+ vendor=hp
3607+ ;;
3608+ -mpeix*)
3609+ vendor=hp
3610+ ;;
3611+ -hiux*)
3612+ vendor=hitachi
3613+ ;;
3614+ -unos*)
3615+ vendor=crds
3616+ ;;
3617+ -dgux*)
3618+ vendor=dg
3619+ ;;
3620+ -luna*)
3621+ vendor=omron
3622+ ;;
3623+ -genix*)
3624+ vendor=ns
3625+ ;;
3626+ -mvs* | -opened*)
3627+ vendor=ibm
3628+ ;;
3629+ -os400*)
3630+ vendor=ibm
3631+ ;;
3632+ -ptx*)
3633+ vendor=sequent
3634+ ;;
3635+ -tpf*)
3636+ vendor=ibm
3637+ ;;
3638+ -vxsim* | -vxworks* | -windiss*)
3639+ vendor=wrs
3640+ ;;
3641+ -aux*)
3642+ vendor=apple
3643+ ;;
3644+ -hms*)
3645+ vendor=hitachi
3646+ ;;
3647+ -mpw* | -macos*)
3648+ vendor=apple
3649+ ;;
3650+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
3651+ vendor=atari
3652+ ;;
3653+ -vos*)
3654+ vendor=stratus
3655+ ;;
3656+ esac
3657+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
3658+ ;;
3659+esac
3660+
3661+echo $basic_machine$os
3662+exit
3663+
3664+# Local variables:
3665+# eval: (add-hook 'write-file-hooks 'time-stamp)
3666+# time-stamp-start: "timestamp='"
3667+# time-stamp-format: "%:y-%02m-%02d"
3668+# time-stamp-end: "'"
3669+# End:
3670
3671=== modified file 'configure'
3672--- configure 2012-03-29 20:52:21 +0000
3673+++ configure 2012-04-04 19:56:26 +0000
3674@@ -1,6 +1,6 @@
3675 #! /bin/sh
3676 # Guess values for system-dependent variables and create Makefiles.
3677-# Generated by GNU Autoconf 2.68 for libindicator 0.4.94.
3678+# Generated by GNU Autoconf 2.68 for libindicator 0.4.95.
3679 #
3680 # Report bugs to <http://bugs.launchpad.net/libindicator>.
3681 #
3682@@ -570,8 +570,8 @@
3683 # Identity of this package.
3684 PACKAGE_NAME='libindicator'
3685 PACKAGE_TARNAME='libindicator'
3686-PACKAGE_VERSION='0.4.94'
3687-PACKAGE_STRING='libindicator 0.4.94'
3688+PACKAGE_VERSION='0.4.95'
3689+PACKAGE_STRING='libindicator 0.4.95'
3690 PACKAGE_BUGREPORT='http://bugs.launchpad.net/libindicator'
3691 PACKAGE_URL='http://launchpad.net/libindicator'
3692
3693@@ -618,6 +618,12 @@
3694 COVERAGE_LDFLAGS
3695 COVERAGE_CXXFLAGS
3696 COVERAGE_CFLAGS
3697+HAVE_GCOVR_FALSE
3698+HAVE_GCOVR_TRUE
3699+HAVE_LCOV_FALSE
3700+HAVE_LCOV_TRUE
3701+HAVE_GCOV_FALSE
3702+HAVE_GCOV_TRUE
3703 GCOVR
3704 GENHTML
3705 LCOV
3706@@ -1331,7 +1337,7 @@
3707 # Omit some internal or obsolete options to make the list less imposing.
3708 # This message is too long to be a string in the A/UX 3.1 sh.
3709 cat <<_ACEOF
3710-\`configure' configures libindicator 0.4.94 to adapt to many kinds of systems.
3711+\`configure' configures libindicator 0.4.95 to adapt to many kinds of systems.
3712
3713 Usage: $0 [OPTION]... [VAR=VALUE]...
3714
3715@@ -1401,7 +1407,7 @@
3716
3717 if test -n "$ac_init_help"; then
3718 case $ac_init_help in
3719- short | recursive ) echo "Configuration of libindicator 0.4.94:";;
3720+ short | recursive ) echo "Configuration of libindicator 0.4.95:";;
3721 esac
3722 cat <<\_ACEOF
3723
3724@@ -1521,7 +1527,7 @@
3725 test -n "$ac_init_help" && exit $ac_status
3726 if $ac_init_version; then
3727 cat <<\_ACEOF
3728-libindicator configure 0.4.94
3729+libindicator configure 0.4.95
3730 generated by GNU Autoconf 2.68
3731
3732 Copyright (C) 2010 Free Software Foundation, Inc.
3733@@ -1799,7 +1805,7 @@
3734 This file contains any messages produced by compilers while
3735 running configure, to aid debugging if configure makes a mistake.
3736
3737-It was created by libindicator $as_me 0.4.94, which was
3738+It was created by libindicator $as_me 0.4.95, which was
3739 generated by GNU Autoconf 2.68. Invocation command line was
3740
3741 $ $0 $@
3742@@ -2622,7 +2628,7 @@
3743
3744 # Define the identity of the package.
3745 PACKAGE='libindicator'
3746- VERSION='0.4.94'
3747+ VERSION='0.4.95'
3748
3749
3750 cat >>confdefs.h <<_ACEOF
3751@@ -12247,13 +12253,8 @@
3752 # and reports the executables to the variables LCOV, GCOVR and GENHTML.
3753 # AC_TDD_GCOV
3754
3755-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether code coverage tools are available" >&5
3756-$as_echo_n "checking whether code coverage tools are available... " >&6; }
3757-if ${ac_cv_check_gcov+:} false; then :
3758- $as_echo_n "(cached) " >&6
3759-else
3760
3761-# Check whether --enable-gcov was given.
3762+ # Check whether --enable-gcov was given.
3763 if test "${enable_gcov+set}" = set; then :
3764 enableval=$enable_gcov; use_gcov=$enableval
3765 else
3766@@ -12389,43 +12390,6 @@
3767 fi
3768
3769
3770- # Extract the first word of "gcovr", so it can be a program name with args.
3771-set dummy gcovr; ac_word=$2
3772-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773-$as_echo_n "checking for $ac_word... " >&6; }
3774-if ${ac_cv_prog_GCOVR+:} false; then :
3775- $as_echo_n "(cached) " >&6
3776-else
3777- if test -n "$GCOVR"; then
3778- ac_cv_prog_GCOVR="$GCOVR" # Let the user override the test.
3779-else
3780-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781-for as_dir in $PATH
3782-do
3783- IFS=$as_save_IFS
3784- test -z "$as_dir" && as_dir=.
3785- for ac_exec_ext in '' $ac_executable_extensions; do
3786- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3787- ac_cv_prog_GCOVR="gcovr"
3788- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3789- break 2
3790- fi
3791-done
3792- done
3793-IFS=$as_save_IFS
3794-
3795-fi
3796-fi
3797-GCOVR=$ac_cv_prog_GCOVR
3798-if test -n "$GCOVR"; then
3799- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOVR" >&5
3800-$as_echo "$GCOVR" >&6; }
3801-else
3802- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3803-$as_echo "no" >&6; }
3804-fi
3805-
3806-
3807
3808 if test "$LCOV"; then
3809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&5
3810@@ -12462,10 +12426,8 @@
3811 as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5
3812 fi
3813
3814- if test -z "$GCOVR"; then
3815- as_fn_error $? "Could not find gcovr; easy_install (or pip) gcovr" "$LINENO" 5
3816- fi
3817-
3818+ ac_cv_check_gcov=yes
3819+ ac_cv_check_lcov=yes
3820
3821 # Remove all optimization flags from CFLAGS
3822
3823@@ -12477,11 +12439,76 @@
3824 COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage"
3825 COVERAGE_LDFLAGS="-lgcov"
3826
3827-fi
3828-
3829-fi
3830-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_check_gcov" >&5
3831-$as_echo "$ac_cv_check_gcov" >&6; }
3832+ # Check availability of gcovr
3833+ # Extract the first word of "gcovr", so it can be a program name with args.
3834+set dummy gcovr; ac_word=$2
3835+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3836+$as_echo_n "checking for $ac_word... " >&6; }
3837+if ${ac_cv_prog_GCOVR+:} false; then :
3838+ $as_echo_n "(cached) " >&6
3839+else
3840+ if test -n "$GCOVR"; then
3841+ ac_cv_prog_GCOVR="$GCOVR" # Let the user override the test.
3842+else
3843+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3844+for as_dir in $PATH
3845+do
3846+ IFS=$as_save_IFS
3847+ test -z "$as_dir" && as_dir=.
3848+ for ac_exec_ext in '' $ac_executable_extensions; do
3849+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3850+ ac_cv_prog_GCOVR="gcovr"
3851+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3852+ break 2
3853+ fi
3854+done
3855+ done
3856+IFS=$as_save_IFS
3857+
3858+fi
3859+fi
3860+GCOVR=$ac_cv_prog_GCOVR
3861+if test -n "$GCOVR"; then
3862+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOVR" >&5
3863+$as_echo "$GCOVR" >&6; }
3864+else
3865+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3866+$as_echo "no" >&6; }
3867+fi
3868+
3869+
3870+ if test -z "$GCOVR"; then
3871+ ac_cv_check_gcovr=no
3872+ else
3873+ ac_cv_check_gcovr=yes
3874+ fi
3875+
3876+fi
3877+
3878+ if test "x$ac_cv_check_gcov" = xyes; then
3879+ HAVE_GCOV_TRUE=
3880+ HAVE_GCOV_FALSE='#'
3881+else
3882+ HAVE_GCOV_TRUE='#'
3883+ HAVE_GCOV_FALSE=
3884+fi
3885+
3886+ if test "x$ac_cv_check_lcov" = xyes; then
3887+ HAVE_LCOV_TRUE=
3888+ HAVE_LCOV_FALSE='#'
3889+else
3890+ HAVE_LCOV_TRUE='#'
3891+ HAVE_LCOV_FALSE=
3892+fi
3893+
3894+ if test "x$ac_cv_check_gcovr" = xyes; then
3895+ HAVE_GCOVR_TRUE=
3896+ HAVE_GCOVR_FALSE='#'
3897+else
3898+ HAVE_GCOVR_TRUE='#'
3899+ HAVE_GCOVR_FALSE=
3900+fi
3901+
3902
3903
3904
3905@@ -12633,6 +12660,18 @@
3906 as_fn_error $? "conditional \"ENABLE_DEBUG\" was never defined.
3907 Usually this means the macro was only invoked conditionally." "$LINENO" 5
3908 fi
3909+if test -z "${HAVE_GCOV_TRUE}" && test -z "${HAVE_GCOV_FALSE}"; then
3910+ as_fn_error $? "conditional \"HAVE_GCOV\" was never defined.
3911+Usually this means the macro was only invoked conditionally." "$LINENO" 5
3912+fi
3913+if test -z "${HAVE_LCOV_TRUE}" && test -z "${HAVE_LCOV_FALSE}"; then
3914+ as_fn_error $? "conditional \"HAVE_LCOV\" was never defined.
3915+Usually this means the macro was only invoked conditionally." "$LINENO" 5
3916+fi
3917+if test -z "${HAVE_GCOVR_TRUE}" && test -z "${HAVE_GCOVR_FALSE}"; then
3918+ as_fn_error $? "conditional \"HAVE_GCOVR\" was never defined.
3919+Usually this means the macro was only invoked conditionally." "$LINENO" 5
3920+fi
3921
3922 : "${CONFIG_STATUS=./config.status}"
3923 ac_write_fail=0
3924@@ -13042,7 +13081,7 @@
3925 # report actual input values of CONFIG_FILES etc. instead of their
3926 # values after options handling.
3927 ac_log="
3928-This file was extended by libindicator $as_me 0.4.94, which was
3929+This file was extended by libindicator $as_me 0.4.95, which was
3930 generated by GNU Autoconf 2.68. Invocation command line was
3931
3932 CONFIG_FILES = $CONFIG_FILES
3933@@ -13109,7 +13148,7 @@
3934 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3935 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
3936 ac_cs_version="\\
3937-libindicator config.status 0.4.94
3938+libindicator config.status 0.4.95
3939 configured by $0, generated by GNU Autoconf 2.68,
3940 with options \\"\$ac_cs_config\\"
3941
3942
3943=== modified file 'configure.ac'
3944--- configure.ac 2012-03-29 20:52:21 +0000
3945+++ configure.ac 2012-04-04 19:56:26 +0000
3946@@ -1,5 +1,5 @@
3947 AC_INIT([libindicator],
3948- [0.4.94],
3949+ [0.4.95],
3950 [http://bugs.launchpad.net/libindicator],
3951 [libindicator],
3952 [http://launchpad.net/libindicator])
3953@@ -137,6 +137,9 @@
3954 ###########################
3955 m4_include([m4/gcov.m4])
3956 AC_TDD_GCOV
3957+AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes])
3958+AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes])
3959+AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes])
3960 AC_SUBST(COVERAGE_CFLAGS)
3961 AC_SUBST(COVERAGE_CXXFLAGS)
3962 AC_SUBST(COVERAGE_LDFLAGS)
3963
3964=== modified file 'debian/changelog'
3965--- debian/changelog 2012-04-02 09:09:19 +0000
3966+++ debian/changelog 2012-04-04 19:56:26 +0000
3967@@ -1,3 +1,13 @@
3968+libindicator (0.4.95-0ubuntu1~ppa1) precise; urgency=low
3969+
3970+ * New upstream release.
3971+ * Fix a free that shouldn't be (LP: #969360)
3972+ * Spelling mistake in error message (LP: #948391)
3973+ * Add coverage build targets
3974+ * Fix building AUTHORS and Changelog at dist time
3975+
3976+ -- Ted Gould <ted@ubuntu.com> Wed, 04 Apr 2012 14:39:16 -0500
3977+
3978 libindicator (0.4.94-0ubuntu2) precise; urgency=low
3979
3980 * Revert r457 it's creating invalid free errors
3981
3982=== added file 'depcomp'
3983--- depcomp 1970-01-01 00:00:00 +0000
3984+++ depcomp 2012-04-04 19:56:26 +0000
3985@@ -0,0 +1,630 @@
3986+#! /bin/sh
3987+# depcomp - compile a program generating dependencies as side-effects
3988+
3989+scriptversion=2009-04-28.21; # UTC
3990+
3991+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
3992+# Software Foundation, Inc.
3993+
3994+# This program is free software; you can redistribute it and/or modify
3995+# it under the terms of the GNU General Public License as published by
3996+# the Free Software Foundation; either version 2, or (at your option)
3997+# any later version.
3998+
3999+# This program is distributed in the hope that it will be useful,
4000+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4001+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4002+# GNU General Public License for more details.
4003+
4004+# You should have received a copy of the GNU General Public License
4005+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4006+
4007+# As a special exception to the GNU General Public License, if you
4008+# distribute this file as part of a program that contains a
4009+# configuration script generated by Autoconf, you may include it under
4010+# the same distribution terms that you use for the rest of that program.
4011+
4012+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
4013+
4014+case $1 in
4015+ '')
4016+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
4017+ exit 1;
4018+ ;;
4019+ -h | --h*)
4020+ cat <<\EOF
4021+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
4022+
4023+Run PROGRAMS ARGS to compile a file, generating dependencies
4024+as side-effects.
4025+
4026+Environment variables:
4027+ depmode Dependency tracking mode.
4028+ source Source file read by `PROGRAMS ARGS'.
4029+ object Object file output by `PROGRAMS ARGS'.
4030+ DEPDIR directory where to store dependencies.
4031+ depfile Dependency file to output.
4032+ tmpdepfile Temporary file to use when outputing dependencies.
4033+ libtool Whether libtool is used (yes/no).
4034+
4035+Report bugs to <bug-automake@gnu.org>.
4036+EOF
4037+ exit $?
4038+ ;;
4039+ -v | --v*)
4040+ echo "depcomp $scriptversion"
4041+ exit $?
4042+ ;;
4043+esac
4044+
4045+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
4046+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
4047+ exit 1
4048+fi
4049+
4050+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
4051+depfile=${depfile-`echo "$object" |
4052+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
4053+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
4054+
4055+rm -f "$tmpdepfile"
4056+
4057+# Some modes work just like other modes, but use different flags. We
4058+# parameterize here, but still list the modes in the big case below,
4059+# to make depend.m4 easier to write. Note that we *cannot* use a case
4060+# here, because this file can only contain one case statement.
4061+if test "$depmode" = hp; then
4062+ # HP compiler uses -M and no extra arg.
4063+ gccflag=-M
4064+ depmode=gcc
4065+fi
4066+
4067+if test "$depmode" = dashXmstdout; then
4068+ # This is just like dashmstdout with a different argument.
4069+ dashmflag=-xM
4070+ depmode=dashmstdout
4071+fi
4072+
4073+cygpath_u="cygpath -u -f -"
4074+if test "$depmode" = msvcmsys; then
4075+ # This is just like msvisualcpp but w/o cygpath translation.
4076+ # Just convert the backslash-escaped backslashes to single forward
4077+ # slashes to satisfy depend.m4
4078+ cygpath_u="sed s,\\\\\\\\,/,g"
4079+ depmode=msvisualcpp
4080+fi
4081+
4082+case "$depmode" in
4083+gcc3)
4084+## gcc 3 implements dependency tracking that does exactly what
4085+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
4086+## it if -MD -MP comes after the -MF stuff. Hmm.
4087+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
4088+## the command line argument order; so add the flags where they
4089+## appear in depend2.am. Note that the slowdown incurred here
4090+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
4091+ for arg
4092+ do
4093+ case $arg in
4094+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
4095+ *) set fnord "$@" "$arg" ;;
4096+ esac
4097+ shift # fnord
4098+ shift # $arg
4099+ done
4100+ "$@"
4101+ stat=$?
4102+ if test $stat -eq 0; then :
4103+ else
4104+ rm -f "$tmpdepfile"
4105+ exit $stat
4106+ fi
4107+ mv "$tmpdepfile" "$depfile"
4108+ ;;
4109+
4110+gcc)
4111+## There are various ways to get dependency output from gcc. Here's
4112+## why we pick this rather obscure method:
4113+## - Don't want to use -MD because we'd like the dependencies to end
4114+## up in a subdir. Having to rename by hand is ugly.
4115+## (We might end up doing this anyway to support other compilers.)
4116+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
4117+## -MM, not -M (despite what the docs say).
4118+## - Using -M directly means running the compiler twice (even worse
4119+## than renaming).
4120+ if test -z "$gccflag"; then
4121+ gccflag=-MD,
4122+ fi
4123+ "$@" -Wp,"$gccflag$tmpdepfile"
4124+ stat=$?
4125+ if test $stat -eq 0; then :
4126+ else
4127+ rm -f "$tmpdepfile"
4128+ exit $stat
4129+ fi
4130+ rm -f "$depfile"
4131+ echo "$object : \\" > "$depfile"
4132+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
4133+## The second -e expression handles DOS-style file names with drive letters.
4134+ sed -e 's/^[^:]*: / /' \
4135+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
4136+## This next piece of magic avoids the `deleted header file' problem.
4137+## The problem is that when a header file which appears in a .P file
4138+## is deleted, the dependency causes make to die (because there is
4139+## typically no way to rebuild the header). We avoid this by adding
4140+## dummy dependencies for each header file. Too bad gcc doesn't do
4141+## this for us directly.
4142+ tr ' ' '
4143+' < "$tmpdepfile" |
4144+## Some versions of gcc put a space before the `:'. On the theory
4145+## that the space means something, we add a space to the output as
4146+## well.
4147+## Some versions of the HPUX 10.20 sed can't process this invocation
4148+## correctly. Breaking it into two sed invocations is a workaround.
4149+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
4150+ rm -f "$tmpdepfile"
4151+ ;;
4152+
4153+hp)
4154+ # This case exists only to let depend.m4 do its work. It works by
4155+ # looking at the text of this script. This case will never be run,
4156+ # since it is checked for above.
4157+ exit 1
4158+ ;;
4159+
4160+sgi)
4161+ if test "$libtool" = yes; then
4162+ "$@" "-Wp,-MDupdate,$tmpdepfile"
4163+ else
4164+ "$@" -MDupdate "$tmpdepfile"
4165+ fi
4166+ stat=$?
4167+ if test $stat -eq 0; then :
4168+ else
4169+ rm -f "$tmpdepfile"
4170+ exit $stat
4171+ fi
4172+ rm -f "$depfile"
4173+
4174+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
4175+ echo "$object : \\" > "$depfile"
4176+
4177+ # Clip off the initial element (the dependent). Don't try to be
4178+ # clever and replace this with sed code, as IRIX sed won't handle
4179+ # lines with more than a fixed number of characters (4096 in
4180+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
4181+ # the IRIX cc adds comments like `#:fec' to the end of the
4182+ # dependency line.
4183+ tr ' ' '
4184+' < "$tmpdepfile" \
4185+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
4186+ tr '
4187+' ' ' >> "$depfile"
4188+ echo >> "$depfile"
4189+
4190+ # The second pass generates a dummy entry for each header file.
4191+ tr ' ' '
4192+' < "$tmpdepfile" \
4193+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
4194+ >> "$depfile"
4195+ else
4196+ # The sourcefile does not contain any dependencies, so just
4197+ # store a dummy comment line, to avoid errors with the Makefile
4198+ # "include basename.Plo" scheme.
4199+ echo "#dummy" > "$depfile"
4200+ fi
4201+ rm -f "$tmpdepfile"
4202+ ;;
4203+
4204+aix)
4205+ # The C for AIX Compiler uses -M and outputs the dependencies
4206+ # in a .u file. In older versions, this file always lives in the
4207+ # current directory. Also, the AIX compiler puts `$object:' at the
4208+ # start of each line; $object doesn't have directory information.
4209+ # Version 6 uses the directory in both cases.
4210+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
4211+ test "x$dir" = "x$object" && dir=
4212+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
4213+ if test "$libtool" = yes; then
4214+ tmpdepfile1=$dir$base.u
4215+ tmpdepfile2=$base.u
4216+ tmpdepfile3=$dir.libs/$base.u
4217+ "$@" -Wc,-M
4218+ else
4219+ tmpdepfile1=$dir$base.u
4220+ tmpdepfile2=$dir$base.u
4221+ tmpdepfile3=$dir$base.u
4222+ "$@" -M
4223+ fi
4224+ stat=$?
4225+
4226+ if test $stat -eq 0; then :
4227+ else
4228+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
4229+ exit $stat
4230+ fi
4231+
4232+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
4233+ do
4234+ test -f "$tmpdepfile" && break
4235+ done
4236+ if test -f "$tmpdepfile"; then
4237+ # Each line is of the form `foo.o: dependent.h'.
4238+ # Do two passes, one to just change these to
4239+ # `$object: dependent.h' and one to simply `dependent.h:'.
4240+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
4241+ # That's a tab and a space in the [].
4242+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
4243+ else
4244+ # The sourcefile does not contain any dependencies, so just
4245+ # store a dummy comment line, to avoid errors with the Makefile
4246+ # "include basename.Plo" scheme.
4247+ echo "#dummy" > "$depfile"
4248+ fi
4249+ rm -f "$tmpdepfile"
4250+ ;;
4251+
4252+icc)
4253+ # Intel's C compiler understands `-MD -MF file'. However on
4254+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
4255+ # ICC 7.0 will fill foo.d with something like
4256+ # foo.o: sub/foo.c
4257+ # foo.o: sub/foo.h
4258+ # which is wrong. We want:
4259+ # sub/foo.o: sub/foo.c
4260+ # sub/foo.o: sub/foo.h
4261+ # sub/foo.c:
4262+ # sub/foo.h:
4263+ # ICC 7.1 will output
4264+ # foo.o: sub/foo.c sub/foo.h
4265+ # and will wrap long lines using \ :
4266+ # foo.o: sub/foo.c ... \
4267+ # sub/foo.h ... \
4268+ # ...
4269+
4270+ "$@" -MD -MF "$tmpdepfile"
4271+ stat=$?
4272+ if test $stat -eq 0; then :
4273+ else
4274+ rm -f "$tmpdepfile"
4275+ exit $stat
4276+ fi
4277+ rm -f "$depfile"
4278+ # Each line is of the form `foo.o: dependent.h',
4279+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
4280+ # Do two passes, one to just change these to
4281+ # `$object: dependent.h' and one to simply `dependent.h:'.
4282+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
4283+ # Some versions of the HPUX 10.20 sed can't process this invocation
4284+ # correctly. Breaking it into two sed invocations is a workaround.
4285+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
4286+ sed -e 's/$/ :/' >> "$depfile"
4287+ rm -f "$tmpdepfile"
4288+ ;;
4289+
4290+hp2)
4291+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
4292+ # compilers, which have integrated preprocessors. The correct option
4293+ # to use with these is +Maked; it writes dependencies to a file named
4294+ # 'foo.d', which lands next to the object file, wherever that
4295+ # happens to be.
4296+ # Much of this is similar to the tru64 case; see comments there.
4297+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
4298+ test "x$dir" = "x$object" && dir=
4299+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
4300+ if test "$libtool" = yes; then
4301+ tmpdepfile1=$dir$base.d
4302+ tmpdepfile2=$dir.libs/$base.d
4303+ "$@" -Wc,+Maked
4304+ else
4305+ tmpdepfile1=$dir$base.d
4306+ tmpdepfile2=$dir$base.d
4307+ "$@" +Maked
4308+ fi
4309+ stat=$?
4310+ if test $stat -eq 0; then :
4311+ else
4312+ rm -f "$tmpdepfile1" "$tmpdepfile2"
4313+ exit $stat
4314+ fi
4315+
4316+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
4317+ do
4318+ test -f "$tmpdepfile" && break
4319+ done
4320+ if test -f "$tmpdepfile"; then
4321+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
4322+ # Add `dependent.h:' lines.
4323+ sed -ne '2,${
4324+ s/^ *//
4325+ s/ \\*$//
4326+ s/$/:/
4327+ p
4328+ }' "$tmpdepfile" >> "$depfile"
4329+ else
4330+ echo "#dummy" > "$depfile"
4331+ fi
4332+ rm -f "$tmpdepfile" "$tmpdepfile2"
4333+ ;;
4334+
4335+tru64)
4336+ # The Tru64 compiler uses -MD to generate dependencies as a side
4337+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
4338+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
4339+ # dependencies in `foo.d' instead, so we check for that too.
4340+ # Subdirectories are respected.
4341+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
4342+ test "x$dir" = "x$object" && dir=
4343+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
4344+
4345+ if test "$libtool" = yes; then
4346+ # With Tru64 cc, shared objects can also be used to make a
4347+ # static library. This mechanism is used in libtool 1.4 series to
4348+ # handle both shared and static libraries in a single compilation.
4349+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
4350+ #
4351+ # With libtool 1.5 this exception was removed, and libtool now
4352+ # generates 2 separate objects for the 2 libraries. These two
4353+ # compilations output dependencies in $dir.libs/$base.o.d and
4354+ # in $dir$base.o.d. We have to check for both files, because
4355+ # one of the two compilations can be disabled. We should prefer
4356+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
4357+ # automatically cleaned when .libs/ is deleted, while ignoring
4358+ # the former would cause a distcleancheck panic.
4359+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
4360+ tmpdepfile2=$dir$base.o.d # libtool 1.5
4361+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
4362+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
4363+ "$@" -Wc,-MD
4364+ else
4365+ tmpdepfile1=$dir$base.o.d
4366+ tmpdepfile2=$dir$base.d
4367+ tmpdepfile3=$dir$base.d
4368+ tmpdepfile4=$dir$base.d
4369+ "$@" -MD
4370+ fi
4371+
4372+ stat=$?
4373+ if test $stat -eq 0; then :
4374+ else
4375+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
4376+ exit $stat
4377+ fi
4378+
4379+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
4380+ do
4381+ test -f "$tmpdepfile" && break
4382+ done
4383+ if test -f "$tmpdepfile"; then
4384+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
4385+ # That's a tab and a space in the [].
4386+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
4387+ else
4388+ echo "#dummy" > "$depfile"
4389+ fi
4390+ rm -f "$tmpdepfile"
4391+ ;;
4392+
4393+#nosideeffect)
4394+ # This comment above is used by automake to tell side-effect
4395+ # dependency tracking mechanisms from slower ones.
4396+
4397+dashmstdout)
4398+ # Important note: in order to support this mode, a compiler *must*
4399+ # always write the preprocessed file to stdout, regardless of -o.
4400+ "$@" || exit $?
4401+
4402+ # Remove the call to Libtool.
4403+ if test "$libtool" = yes; then
4404+ while test "X$1" != 'X--mode=compile'; do
4405+ shift
4406+ done
4407+ shift
4408+ fi
4409+
4410+ # Remove `-o $object'.
4411+ IFS=" "
4412+ for arg
4413+ do
4414+ case $arg in
4415+ -o)
4416+ shift
4417+ ;;
4418+ $object)
4419+ shift
4420+ ;;
4421+ *)
4422+ set fnord "$@" "$arg"
4423+ shift # fnord
4424+ shift # $arg
4425+ ;;
4426+ esac
4427+ done
4428+
4429+ test -z "$dashmflag" && dashmflag=-M
4430+ # Require at least two characters before searching for `:'
4431+ # in the target name. This is to cope with DOS-style filenames:
4432+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
4433+ "$@" $dashmflag |
4434+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
4435+ rm -f "$depfile"
4436+ cat < "$tmpdepfile" > "$depfile"
4437+ tr ' ' '
4438+' < "$tmpdepfile" | \
4439+## Some versions of the HPUX 10.20 sed can't process this invocation
4440+## correctly. Breaking it into two sed invocations is a workaround.
4441+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
4442+ rm -f "$tmpdepfile"
4443+ ;;
4444+
4445+dashXmstdout)
4446+ # This case only exists to satisfy depend.m4. It is never actually
4447+ # run, as this mode is specially recognized in the preamble.
4448+ exit 1
4449+ ;;
4450+
4451+makedepend)
4452+ "$@" || exit $?
4453+ # Remove any Libtool call
4454+ if test "$libtool" = yes; then
4455+ while test "X$1" != 'X--mode=compile'; do
4456+ shift
4457+ done
4458+ shift
4459+ fi
4460+ # X makedepend
4461+ shift
4462+ cleared=no eat=no
4463+ for arg
4464+ do
4465+ case $cleared in
4466+ no)
4467+ set ""; shift
4468+ cleared=yes ;;
4469+ esac
4470+ if test $eat = yes; then
4471+ eat=no
4472+ continue
4473+ fi
4474+ case "$arg" in
4475+ -D*|-I*)
4476+ set fnord "$@" "$arg"; shift ;;
4477+ # Strip any option that makedepend may not understand. Remove
4478+ # the object too, otherwise makedepend will parse it as a source file.
4479+ -arch)
4480+ eat=yes ;;
4481+ -*|$object)
4482+ ;;
4483+ *)
4484+ set fnord "$@" "$arg"; shift ;;
4485+ esac
4486+ done
4487+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
4488+ touch "$tmpdepfile"
4489+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
4490+ rm -f "$depfile"
4491+ cat < "$tmpdepfile" > "$depfile"
4492+ sed '1,2d' "$tmpdepfile" | tr ' ' '
4493+' | \
4494+## Some versions of the HPUX 10.20 sed can't process this invocation
4495+## correctly. Breaking it into two sed invocations is a workaround.
4496+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
4497+ rm -f "$tmpdepfile" "$tmpdepfile".bak
4498+ ;;
4499+
4500+cpp)
4501+ # Important note: in order to support this mode, a compiler *must*
4502+ # always write the preprocessed file to stdout.
4503+ "$@" || exit $?
4504+
4505+ # Remove the call to Libtool.
4506+ if test "$libtool" = yes; then
4507+ while test "X$1" != 'X--mode=compile'; do
4508+ shift
4509+ done
4510+ shift
4511+ fi
4512+
4513+ # Remove `-o $object'.
4514+ IFS=" "
4515+ for arg
4516+ do
4517+ case $arg in
4518+ -o)
4519+ shift
4520+ ;;
4521+ $object)
4522+ shift
4523+ ;;
4524+ *)
4525+ set fnord "$@" "$arg"
4526+ shift # fnord
4527+ shift # $arg
4528+ ;;
4529+ esac
4530+ done
4531+
4532+ "$@" -E |
4533+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
4534+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
4535+ sed '$ s: \\$::' > "$tmpdepfile"
4536+ rm -f "$depfile"
4537+ echo "$object : \\" > "$depfile"
4538+ cat < "$tmpdepfile" >> "$depfile"
4539+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
4540+ rm -f "$tmpdepfile"
4541+ ;;
4542+
4543+msvisualcpp)
4544+ # Important note: in order to support this mode, a compiler *must*
4545+ # always write the preprocessed file to stdout.
4546+ "$@" || exit $?
4547+
4548+ # Remove the call to Libtool.
4549+ if test "$libtool" = yes; then
4550+ while test "X$1" != 'X--mode=compile'; do
4551+ shift
4552+ done
4553+ shift
4554+ fi
4555+
4556+ IFS=" "
4557+ for arg
4558+ do
4559+ case "$arg" in
4560+ -o)
4561+ shift
4562+ ;;
4563+ $object)
4564+ shift
4565+ ;;
4566+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
4567+ set fnord "$@"
4568+ shift
4569+ shift
4570+ ;;
4571+ *)
4572+ set fnord "$@" "$arg"
4573+ shift
4574+ shift
4575+ ;;
4576+ esac
4577+ done
4578+ "$@" -E 2>/dev/null |
4579+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
4580+ rm -f "$depfile"
4581+ echo "$object : \\" > "$depfile"
4582+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
4583+ echo " " >> "$depfile"
4584+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
4585+ rm -f "$tmpdepfile"
4586+ ;;
4587+
4588+msvcmsys)
4589+ # This case exists only to let depend.m4 do its work. It works by
4590+ # looking at the text of this script. This case will never be run,
4591+ # since it is checked for above.
4592+ exit 1
4593+ ;;
4594+
4595+none)
4596+ exec "$@"
4597+ ;;
4598+
4599+*)
4600+ echo "Unknown depmode $depmode" 1>&2
4601+ exit 1
4602+ ;;
4603+esac
4604+
4605+exit 0
4606+
4607+# Local Variables:
4608+# mode: shell-script
4609+# sh-indentation: 2
4610+# eval: (add-hook 'write-file-hooks 'time-stamp)
4611+# time-stamp-start: "scriptversion="
4612+# time-stamp-format: "%:y-%02m-%02d.%02H"
4613+# time-stamp-time-zone: "UTC"
4614+# time-stamp-end: "; # UTC"
4615+# End:
4616
4617=== added file 'install-sh'
4618--- install-sh 1970-01-01 00:00:00 +0000
4619+++ install-sh 2012-04-04 19:56:26 +0000
4620@@ -0,0 +1,520 @@
4621+#!/bin/sh
4622+# install - install a program, script, or datafile
4623+
4624+scriptversion=2009-04-28.21; # UTC
4625+
4626+# This originates from X11R5 (mit/util/scripts/install.sh), which was
4627+# later released in X11R6 (xc/config/util/install.sh) with the
4628+# following copyright and license.
4629+#
4630+# Copyright (C) 1994 X Consortium
4631+#
4632+# Permission is hereby granted, free of charge, to any person obtaining a copy
4633+# of this software and associated documentation files (the "Software"), to
4634+# deal in the Software without restriction, including without limitation the
4635+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
4636+# sell copies of the Software, and to permit persons to whom the Software is
4637+# furnished to do so, subject to the following conditions:
4638+#
4639+# The above copyright notice and this permission notice shall be included in
4640+# all copies or substantial portions of the Software.
4641+#
4642+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4643+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4644+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4645+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
4646+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
4647+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4648+#
4649+# Except as contained in this notice, the name of the X Consortium shall not
4650+# be used in advertising or otherwise to promote the sale, use or other deal-
4651+# ings in this Software without prior written authorization from the X Consor-
4652+# tium.
4653+#
4654+#
4655+# FSF changes to this file are in the public domain.
4656+#
4657+# Calling this script install-sh is preferred over install.sh, to prevent
4658+# `make' implicit rules from creating a file called install from it
4659+# when there is no Makefile.
4660+#
4661+# This script is compatible with the BSD install script, but was written
4662+# from scratch.
4663+
4664+nl='
4665+'
4666+IFS=" "" $nl"
4667+
4668+# set DOITPROG to echo to test this script
4669+
4670+# Don't use :- since 4.3BSD and earlier shells don't like it.
4671+doit=${DOITPROG-}
4672+if test -z "$doit"; then
4673+ doit_exec=exec
4674+else
4675+ doit_exec=$doit
4676+fi
4677+
4678+# Put in absolute file names if you don't have them in your path;
4679+# or use environment vars.
4680+
4681+chgrpprog=${CHGRPPROG-chgrp}
4682+chmodprog=${CHMODPROG-chmod}
4683+chownprog=${CHOWNPROG-chown}
4684+cmpprog=${CMPPROG-cmp}
4685+cpprog=${CPPROG-cp}
4686+mkdirprog=${MKDIRPROG-mkdir}
4687+mvprog=${MVPROG-mv}
4688+rmprog=${RMPROG-rm}
4689+stripprog=${STRIPPROG-strip}
4690+
4691+posix_glob='?'
4692+initialize_posix_glob='
4693+ test "$posix_glob" != "?" || {
4694+ if (set -f) 2>/dev/null; then
4695+ posix_glob=
4696+ else
4697+ posix_glob=:
4698+ fi
4699+ }
4700+'
4701+
4702+posix_mkdir=
4703+
4704+# Desired mode of installed file.
4705+mode=0755
4706+
4707+chgrpcmd=
4708+chmodcmd=$chmodprog
4709+chowncmd=
4710+mvcmd=$mvprog
4711+rmcmd="$rmprog -f"
4712+stripcmd=
4713+
4714+src=
4715+dst=
4716+dir_arg=
4717+dst_arg=
4718+
4719+copy_on_change=false
4720+no_target_directory=
4721+
4722+usage="\
4723+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
4724+ or: $0 [OPTION]... SRCFILES... DIRECTORY
4725+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
4726+ or: $0 [OPTION]... -d DIRECTORIES...
4727+
4728+In the 1st form, copy SRCFILE to DSTFILE.
4729+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
4730+In the 4th, create DIRECTORIES.
4731+
4732+Options:
4733+ --help display this help and exit.
4734+ --version display version info and exit.
4735+
4736+ -c (ignored)
4737+ -C install only if different (preserve the last data modification time)
4738+ -d create directories instead of installing files.
4739+ -g GROUP $chgrpprog installed files to GROUP.
4740+ -m MODE $chmodprog installed files to MODE.
4741+ -o USER $chownprog installed files to USER.
4742+ -s $stripprog installed files.
4743+ -t DIRECTORY install into DIRECTORY.
4744+ -T report an error if DSTFILE is a directory.
4745+
4746+Environment variables override the default commands:
4747+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
4748+ RMPROG STRIPPROG
4749+"
4750+
4751+while test $# -ne 0; do
4752+ case $1 in
4753+ -c) ;;
4754+
4755+ -C) copy_on_change=true;;
4756+
4757+ -d) dir_arg=true;;
4758+
4759+ -g) chgrpcmd="$chgrpprog $2"
4760+ shift;;
4761+
4762+ --help) echo "$usage"; exit $?;;
4763+
4764+ -m) mode=$2
4765+ case $mode in
4766+ *' '* | *' '* | *'
4767+'* | *'*'* | *'?'* | *'['*)
4768+ echo "$0: invalid mode: $mode" >&2
4769+ exit 1;;
4770+ esac
4771+ shift;;
4772+
4773+ -o) chowncmd="$chownprog $2"
4774+ shift;;
4775+
4776+ -s) stripcmd=$stripprog;;
4777+
4778+ -t) dst_arg=$2
4779+ shift;;
4780+
4781+ -T) no_target_directory=true;;
4782+
4783+ --version) echo "$0 $scriptversion"; exit $?;;
4784+
4785+ --) shift
4786+ break;;
4787+
4788+ -*) echo "$0: invalid option: $1" >&2
4789+ exit 1;;
4790+
4791+ *) break;;
4792+ esac
4793+ shift
4794+done
4795+
4796+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
4797+ # When -d is used, all remaining arguments are directories to create.
4798+ # When -t is used, the destination is already specified.
4799+ # Otherwise, the last argument is the destination. Remove it from $@.
4800+ for arg
4801+ do
4802+ if test -n "$dst_arg"; then
4803+ # $@ is not empty: it contains at least $arg.
4804+ set fnord "$@" "$dst_arg"
4805+ shift # fnord
4806+ fi
4807+ shift # arg
4808+ dst_arg=$arg
4809+ done
4810+fi
4811+
4812+if test $# -eq 0; then
4813+ if test -z "$dir_arg"; then
4814+ echo "$0: no input file specified." >&2
4815+ exit 1
4816+ fi
4817+ # It's OK to call `install-sh -d' without argument.
4818+ # This can happen when creating conditional directories.
4819+ exit 0
4820+fi
4821+
4822+if test -z "$dir_arg"; then
4823+ trap '(exit $?); exit' 1 2 13 15
4824+
4825+ # Set umask so as not to create temps with too-generous modes.
4826+ # However, 'strip' requires both read and write access to temps.
4827+ case $mode in
4828+ # Optimize common cases.
4829+ *644) cp_umask=133;;
4830+ *755) cp_umask=22;;
4831+
4832+ *[0-7])
4833+ if test -z "$stripcmd"; then
4834+ u_plus_rw=
4835+ else
4836+ u_plus_rw='% 200'
4837+ fi
4838+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
4839+ *)
4840+ if test -z "$stripcmd"; then
4841+ u_plus_rw=
4842+ else
4843+ u_plus_rw=,u+rw
4844+ fi
4845+ cp_umask=$mode$u_plus_rw;;
4846+ esac
4847+fi
4848+
4849+for src
4850+do
4851+ # Protect names starting with `-'.
4852+ case $src in
4853+ -*) src=./$src;;
4854+ esac
4855+
4856+ if test -n "$dir_arg"; then
4857+ dst=$src
4858+ dstdir=$dst
4859+ test -d "$dstdir"
4860+ dstdir_status=$?
4861+ else
4862+
4863+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
4864+ # might cause directories to be created, which would be especially bad
4865+ # if $src (and thus $dsttmp) contains '*'.
4866+ if test ! -f "$src" && test ! -d "$src"; then
4867+ echo "$0: $src does not exist." >&2
4868+ exit 1
4869+ fi
4870+
4871+ if test -z "$dst_arg"; then
4872+ echo "$0: no destination specified." >&2
4873+ exit 1
4874+ fi
4875+
4876+ dst=$dst_arg
4877+ # Protect names starting with `-'.
4878+ case $dst in
4879+ -*) dst=./$dst;;
4880+ esac
4881+
4882+ # If destination is a directory, append the input filename; won't work
4883+ # if double slashes aren't ignored.
4884+ if test -d "$dst"; then
4885+ if test -n "$no_target_directory"; then
4886+ echo "$0: $dst_arg: Is a directory" >&2
4887+ exit 1
4888+ fi
4889+ dstdir=$dst
4890+ dst=$dstdir/`basename "$src"`
4891+ dstdir_status=0
4892+ else
4893+ # Prefer dirname, but fall back on a substitute if dirname fails.
4894+ dstdir=`
4895+ (dirname "$dst") 2>/dev/null ||
4896+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4897+ X"$dst" : 'X\(//\)[^/]' \| \
4898+ X"$dst" : 'X\(//\)$' \| \
4899+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
4900+ echo X"$dst" |
4901+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4902+ s//\1/
4903+ q
4904+ }
4905+ /^X\(\/\/\)[^/].*/{
4906+ s//\1/
4907+ q
4908+ }
4909+ /^X\(\/\/\)$/{
4910+ s//\1/
4911+ q
4912+ }
4913+ /^X\(\/\).*/{
4914+ s//\1/
4915+ q
4916+ }
4917+ s/.*/./; q'
4918+ `
4919+
4920+ test -d "$dstdir"
4921+ dstdir_status=$?
4922+ fi
4923+ fi
4924+
4925+ obsolete_mkdir_used=false
4926+
4927+ if test $dstdir_status != 0; then
4928+ case $posix_mkdir in
4929+ '')
4930+ # Create intermediate dirs using mode 755 as modified by the umask.
4931+ # This is like FreeBSD 'install' as of 1997-10-28.
4932+ umask=`umask`
4933+ case $stripcmd.$umask in
4934+ # Optimize common cases.
4935+ *[2367][2367]) mkdir_umask=$umask;;
4936+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
4937+
4938+ *[0-7])
4939+ mkdir_umask=`expr $umask + 22 \
4940+ - $umask % 100 % 40 + $umask % 20 \
4941+ - $umask % 10 % 4 + $umask % 2
4942+ `;;
4943+ *) mkdir_umask=$umask,go-w;;
4944+ esac
4945+
4946+ # With -d, create the new directory with the user-specified mode.
4947+ # Otherwise, rely on $mkdir_umask.
4948+ if test -n "$dir_arg"; then
4949+ mkdir_mode=-m$mode
4950+ else
4951+ mkdir_mode=
4952+ fi
4953+
4954+ posix_mkdir=false
4955+ case $umask in
4956+ *[123567][0-7][0-7])
4957+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
4958+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
4959+ ;;
4960+ *)
4961+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
4962+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
4963+
4964+ if (umask $mkdir_umask &&
4965+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
4966+ then
4967+ if test -z "$dir_arg" || {
4968+ # Check for POSIX incompatibilities with -m.
4969+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
4970+ # other-writeable bit of parent directory when it shouldn't.
4971+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
4972+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
4973+ case $ls_ld_tmpdir in
4974+ d????-?r-*) different_mode=700;;
4975+ d????-?--*) different_mode=755;;
4976+ *) false;;
4977+ esac &&
4978+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
4979+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
4980+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
4981+ }
4982+ }
4983+ then posix_mkdir=:
4984+ fi
4985+ rmdir "$tmpdir/d" "$tmpdir"
4986+ else
4987+ # Remove any dirs left behind by ancient mkdir implementations.
4988+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
4989+ fi
4990+ trap '' 0;;
4991+ esac;;
4992+ esac
4993+
4994+ if
4995+ $posix_mkdir && (
4996+ umask $mkdir_umask &&
4997+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
4998+ )
4999+ then :
5000+ else
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches