fermisurfer Git
Revision | 43d7181a6ac9eb50142fa0af634d6d32454cad83 (tree) |
---|---|
Zeit | 2017-06-15 01:11:31 |
Autor | ![]() |
Commiter | mitsuaki1987 |
Backup
@@ -29,4 +29,5 @@ src/resource.h | ||
29 | 29 | doc/ja/_build/ |
30 | 30 | doc/en/_build/ |
31 | 31 | *.o |
32 | -doc/html/ | |
\ No newline at end of file | ||
32 | +doc/html/ | |
33 | +autom4te.cache/ |
@@ -0,0 +1,791 @@ | ||
1 | +# Makefile.in generated by automake 1.14.1 from Makefile.am. | |
2 | +# @configure_input@ | |
3 | + | |
4 | +# Copyright (C) 1994-2013 Free Software Foundation, Inc. | |
5 | + | |
6 | +# This Makefile.in is free software; the Free Software Foundation | |
7 | +# gives unlimited permission to copy and/or distribute it, | |
8 | +# with or without modifications, as long as this notice is preserved. | |
9 | + | |
10 | +# This program is distributed in the hope that it will be useful, | |
11 | +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
12 | +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
13 | +# PARTICULAR PURPOSE. | |
14 | + | |
15 | +@SET_MAKE@ | |
16 | +VPATH = @srcdir@ | |
17 | +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' | |
18 | +am__make_running_with_option = \ | |
19 | + case $${target_option-} in \ | |
20 | + ?) ;; \ | |
21 | + *) echo "am__make_running_with_option: internal error: invalid" \ | |
22 | + "target option '$${target_option-}' specified" >&2; \ | |
23 | + exit 1;; \ | |
24 | + esac; \ | |
25 | + has_opt=no; \ | |
26 | + sane_makeflags=$$MAKEFLAGS; \ | |
27 | + if $(am__is_gnu_make); then \ | |
28 | + sane_makeflags=$$MFLAGS; \ | |
29 | + else \ | |
30 | + case $$MAKEFLAGS in \ | |
31 | + *\\[\ \ ]*) \ | |
32 | + bs=\\; \ | |
33 | + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | |
34 | + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ | |
35 | + esac; \ | |
36 | + fi; \ | |
37 | + skip_next=no; \ | |
38 | + strip_trailopt () \ | |
39 | + { \ | |
40 | + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ | |
41 | + }; \ | |
42 | + for flg in $$sane_makeflags; do \ | |
43 | + test $$skip_next = yes && { skip_next=no; continue; }; \ | |
44 | + case $$flg in \ | |
45 | + *=*|--*) continue;; \ | |
46 | + -*I) strip_trailopt 'I'; skip_next=yes;; \ | |
47 | + -*I?*) strip_trailopt 'I';; \ | |
48 | + -*O) strip_trailopt 'O'; skip_next=yes;; \ | |
49 | + -*O?*) strip_trailopt 'O';; \ | |
50 | + -*l) strip_trailopt 'l'; skip_next=yes;; \ | |
51 | + -*l?*) strip_trailopt 'l';; \ | |
52 | + -[dEDm]) skip_next=yes;; \ | |
53 | + -[JT]) skip_next=yes;; \ | |
54 | + esac; \ | |
55 | + case $$flg in \ | |
56 | + *$$target_option*) has_opt=yes; break;; \ | |
57 | + esac; \ | |
58 | + done; \ | |
59 | + test $$has_opt = yes | |
60 | +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) | |
61 | +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) | |
62 | +pkgdatadir = $(datadir)/@PACKAGE@ | |
63 | +pkgincludedir = $(includedir)/@PACKAGE@ | |
64 | +pkglibdir = $(libdir)/@PACKAGE@ | |
65 | +pkglibexecdir = $(libexecdir)/@PACKAGE@ | |
66 | +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | |
67 | +install_sh_DATA = $(install_sh) -c -m 644 | |
68 | +install_sh_PROGRAM = $(install_sh) -c | |
69 | +install_sh_SCRIPT = $(install_sh) -c | |
70 | +INSTALL_HEADER = $(INSTALL_DATA) | |
71 | +transform = $(program_transform_name) | |
72 | +NORMAL_INSTALL = : | |
73 | +PRE_INSTALL = : | |
74 | +POST_INSTALL = : | |
75 | +NORMAL_UNINSTALL = : | |
76 | +PRE_UNINSTALL = : | |
77 | +POST_UNINSTALL = : | |
78 | +build_triplet = @build@ | |
79 | +host_triplet = @host@ | |
80 | +subdir = . | |
81 | +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ | |
82 | + $(top_srcdir)/configure $(am__configure_deps) \ | |
83 | + $(srcdir)/config.h.in config/compile config/config.guess \ | |
84 | + config/config.sub config/depcomp config/install-sh \ | |
85 | + config/missing $(top_srcdir)/config/compile \ | |
86 | + $(top_srcdir)/config/config.guess \ | |
87 | + $(top_srcdir)/config/config.sub \ | |
88 | + $(top_srcdir)/config/install-sh $(top_srcdir)/config/missing | |
89 | +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
90 | +am__aclocal_m4_deps = $(top_srcdir)/configure.ac | |
91 | +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | |
92 | + $(ACLOCAL_M4) | |
93 | +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ | |
94 | + configure.lineno config.status.lineno | |
95 | +mkinstalldirs = $(install_sh) -d | |
96 | +CONFIG_HEADER = config.h | |
97 | +CONFIG_CLEAN_FILES = | |
98 | +CONFIG_CLEAN_VPATH_FILES = | |
99 | +AM_V_P = $(am__v_P_@AM_V@) | |
100 | +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) | |
101 | +am__v_P_0 = false | |
102 | +am__v_P_1 = : | |
103 | +AM_V_GEN = $(am__v_GEN_@AM_V@) | |
104 | +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) | |
105 | +am__v_GEN_0 = @echo " GEN " $@; | |
106 | +am__v_GEN_1 = | |
107 | +AM_V_at = $(am__v_at_@AM_V@) | |
108 | +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) | |
109 | +am__v_at_0 = @ | |
110 | +am__v_at_1 = | |
111 | +SOURCES = | |
112 | +DIST_SOURCES = | |
113 | +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ | |
114 | + ctags-recursive dvi-recursive html-recursive info-recursive \ | |
115 | + install-data-recursive install-dvi-recursive \ | |
116 | + install-exec-recursive install-html-recursive \ | |
117 | + install-info-recursive install-pdf-recursive \ | |
118 | + install-ps-recursive install-recursive installcheck-recursive \ | |
119 | + installdirs-recursive pdf-recursive ps-recursive \ | |
120 | + tags-recursive uninstall-recursive | |
121 | +am__can_run_installinfo = \ | |
122 | + case $$AM_UPDATE_INFO_DIR in \ | |
123 | + n|no|NO) false;; \ | |
124 | + *) (install-info --version) >/dev/null 2>&1;; \ | |
125 | + esac | |
126 | +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ | |
127 | + distclean-recursive maintainer-clean-recursive | |
128 | +am__recursive_targets = \ | |
129 | + $(RECURSIVE_TARGETS) \ | |
130 | + $(RECURSIVE_CLEAN_TARGETS) \ | |
131 | + $(am__extra_recursive_targets) | |
132 | +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ | |
133 | + cscope distdir dist dist-all distcheck | |
134 | +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ | |
135 | + $(LISP)config.h.in | |
136 | +# Read a list of newline-separated strings from the standard input, | |
137 | +# and print each of them once, without duplicates. Input order is | |
138 | +# *not* preserved. | |
139 | +am__uniquify_input = $(AWK) '\ | |
140 | + BEGIN { nonempty = 0; } \ | |
141 | + { items[$$0] = 1; nonempty = 1; } \ | |
142 | + END { if (nonempty) { for (i in items) print i; }; } \ | |
143 | +' | |
144 | +# Make sure the list of sources is unique. This is necessary because, | |
145 | +# e.g., the same source file might be shared among _SOURCES variables | |
146 | +# for different programs/libraries. | |
147 | +am__define_uniq_tagged_files = \ | |
148 | + list='$(am__tagged_files)'; \ | |
149 | + unique=`for i in $$list; do \ | |
150 | + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | |
151 | + done | $(am__uniquify_input)` | |
152 | +ETAGS = etags | |
153 | +CTAGS = ctags | |
154 | +CSCOPE = cscope | |
155 | +DIST_SUBDIRS = $(SUBDIRS) | |
156 | +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | |
157 | +distdir = $(PACKAGE)-$(VERSION) | |
158 | +top_distdir = $(distdir) | |
159 | +am__remove_distdir = \ | |
160 | + if test -d "$(distdir)"; then \ | |
161 | + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ | |
162 | + && rm -rf "$(distdir)" \ | |
163 | + || { sleep 5 && rm -rf "$(distdir)"; }; \ | |
164 | + else :; fi | |
165 | +am__post_remove_distdir = $(am__remove_distdir) | |
166 | +am__relativize = \ | |
167 | + dir0=`pwd`; \ | |
168 | + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ | |
169 | + sed_rest='s,^[^/]*/*,,'; \ | |
170 | + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ | |
171 | + sed_butlast='s,/*[^/]*$$,,'; \ | |
172 | + while test -n "$$dir1"; do \ | |
173 | + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ | |
174 | + if test "$$first" != "."; then \ | |
175 | + if test "$$first" = ".."; then \ | |
176 | + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ | |
177 | + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ | |
178 | + else \ | |
179 | + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ | |
180 | + if test "$$first2" = "$$first"; then \ | |
181 | + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ | |
182 | + else \ | |
183 | + dir2="../$$dir2"; \ | |
184 | + fi; \ | |
185 | + dir0="$$dir0"/"$$first"; \ | |
186 | + fi; \ | |
187 | + fi; \ | |
188 | + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ | |
189 | + done; \ | |
190 | + reldir="$$dir2" | |
191 | +DIST_ARCHIVES = $(distdir).tar.gz | |
192 | +GZIP_ENV = --best | |
193 | +DIST_TARGETS = dist-gzip | |
194 | +distuninstallcheck_listfiles = find . -type f -print | |
195 | +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | |
196 | + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' | |
197 | +distcleancheck_listfiles = find . -type f -print | |
198 | +ACLOCAL = @ACLOCAL@ | |
199 | +AMTAR = @AMTAR@ | |
200 | +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | |
201 | +AUTOCONF = @AUTOCONF@ | |
202 | +AUTOHEADER = @AUTOHEADER@ | |
203 | +AUTOMAKE = @AUTOMAKE@ | |
204 | +AWK = @AWK@ | |
205 | +CC = @CC@ | |
206 | +CCDEPMODE = @CCDEPMODE@ | |
207 | +CFLAGS = @CFLAGS@ | |
208 | +CPP = @CPP@ | |
209 | +CPPFLAGS = @CPPFLAGS@ | |
210 | +CXX = @CXX@ | |
211 | +CXXDEPMODE = @CXXDEPMODE@ | |
212 | +CXXFLAGS = @CXXFLAGS@ | |
213 | +CYGPATH_W = @CYGPATH_W@ | |
214 | +DEFS = @DEFS@ | |
215 | +DEPDIR = @DEPDIR@ | |
216 | +ECHO_C = @ECHO_C@ | |
217 | +ECHO_N = @ECHO_N@ | |
218 | +ECHO_T = @ECHO_T@ | |
219 | +EGREP = @EGREP@ | |
220 | +EXEEXT = @EXEEXT@ | |
221 | +GLUT_CFLAGS = @GLUT_CFLAGS@ | |
222 | +GLUT_LDFLAGS = @GLUT_LDFLAGS@ | |
223 | +GLUT_LIBS = @GLUT_LIBS@ | |
224 | +GLU_CFLAGS = @GLU_CFLAGS@ | |
225 | +GLU_LDFLAGS = @GLU_LDFLAGS@ | |
226 | +GLU_LIBS = @GLU_LIBS@ | |
227 | +GL_CFLAGS = @GL_CFLAGS@ | |
228 | +GL_LDFLAGS = @GL_LDFLAGS@ | |
229 | +GL_LIBS = @GL_LIBS@ | |
230 | +GREP = @GREP@ | |
231 | +INSTALL = @INSTALL@ | |
232 | +INSTALL_DATA = @INSTALL_DATA@ | |
233 | +INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
234 | +INSTALL_SCRIPT = @INSTALL_SCRIPT@ | |
235 | +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | |
236 | +LDFLAGS = @LDFLAGS@ | |
237 | +LIBOBJS = @LIBOBJS@ | |
238 | +LIBS = @LIBS@ | |
239 | +LTLIBOBJS = @LTLIBOBJS@ | |
240 | +MAKEINFO = @MAKEINFO@ | |
241 | +MKDIR_P = @MKDIR_P@ | |
242 | +OBJEXT = @OBJEXT@ | |
243 | +PACKAGE = @PACKAGE@ | |
244 | +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | |
245 | +PACKAGE_NAME = @PACKAGE_NAME@ | |
246 | +PACKAGE_STRING = @PACKAGE_STRING@ | |
247 | +PACKAGE_TARNAME = @PACKAGE_TARNAME@ | |
248 | +PACKAGE_URL = @PACKAGE_URL@ | |
249 | +PACKAGE_VERSION = @PACKAGE_VERSION@ | |
250 | +PATH_SEPARATOR = @PATH_SEPARATOR@ | |
251 | +PKG_CONFIG = @PKG_CONFIG@ | |
252 | +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
253 | +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
254 | +SET_MAKE = @SET_MAKE@ | |
255 | +SHELL = @SHELL@ | |
256 | +STRIP = @STRIP@ | |
257 | +VERSION = @VERSION@ | |
258 | +XMKMF = @XMKMF@ | |
259 | +X_CFLAGS = @X_CFLAGS@ | |
260 | +X_EXTRA_LIBS = @X_EXTRA_LIBS@ | |
261 | +X_LIBS = @X_LIBS@ | |
262 | +X_PRE_LIBS = @X_PRE_LIBS@ | |
263 | +abs_builddir = @abs_builddir@ | |
264 | +abs_srcdir = @abs_srcdir@ | |
265 | +abs_top_builddir = @abs_top_builddir@ | |
266 | +abs_top_srcdir = @abs_top_srcdir@ | |
267 | +ac_ct_CC = @ac_ct_CC@ | |
268 | +ac_ct_CXX = @ac_ct_CXX@ | |
269 | +am__include = @am__include@ | |
270 | +am__leading_dot = @am__leading_dot@ | |
271 | +am__quote = @am__quote@ | |
272 | +am__tar = @am__tar@ | |
273 | +am__untar = @am__untar@ | |
274 | +bindir = @bindir@ | |
275 | +build = @build@ | |
276 | +build_alias = @build_alias@ | |
277 | +build_cpu = @build_cpu@ | |
278 | +build_os = @build_os@ | |
279 | +build_vendor = @build_vendor@ | |
280 | +builddir = @builddir@ | |
281 | +datadir = @datadir@ | |
282 | +datarootdir = @datarootdir@ | |
283 | +docdir = @docdir@ | |
284 | +dvidir = @dvidir@ | |
285 | +exec_prefix = @exec_prefix@ | |
286 | +host = @host@ | |
287 | +host_alias = @host_alias@ | |
288 | +host_cpu = @host_cpu@ | |
289 | +host_os = @host_os@ | |
290 | +host_vendor = @host_vendor@ | |
291 | +htmldir = @htmldir@ | |
292 | +includedir = @includedir@ | |
293 | +infodir = @infodir@ | |
294 | +install_sh = @install_sh@ | |
295 | +libdir = @libdir@ | |
296 | +libexecdir = @libexecdir@ | |
297 | +localedir = @localedir@ | |
298 | +localstatedir = @localstatedir@ | |
299 | +mandir = @mandir@ | |
300 | +mkdir_p = @mkdir_p@ | |
301 | +oldincludedir = @oldincludedir@ | |
302 | +pdfdir = @pdfdir@ | |
303 | +prefix = @prefix@ | |
304 | +program_transform_name = @program_transform_name@ | |
305 | +psdir = @psdir@ | |
306 | +sbindir = @sbindir@ | |
307 | +sharedstatedir = @sharedstatedir@ | |
308 | +srcdir = @srcdir@ | |
309 | +sysconfdir = @sysconfdir@ | |
310 | +target_alias = @target_alias@ | |
311 | +top_build_prefix = @top_build_prefix@ | |
312 | +top_builddir = @top_builddir@ | |
313 | +top_srcdir = @top_srcdir@ | |
314 | +ACLOCAL_AMFLAGS = -I config/m4 | |
315 | +SUBDIRS = src | |
316 | +MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure | |
317 | +all: config.h | |
318 | + $(MAKE) $(AM_MAKEFLAGS) all-recursive | |
319 | + | |
320 | +.SUFFIXES: | |
321 | +am--refresh: Makefile | |
322 | + @: | |
323 | +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | |
324 | + @for dep in $?; do \ | |
325 | + case '$(am__configure_deps)' in \ | |
326 | + *$$dep*) \ | |
327 | + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ | |
328 | + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ | |
329 | + && exit 0; \ | |
330 | + exit 1;; \ | |
331 | + esac; \ | |
332 | + done; \ | |
333 | + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ | |
334 | + $(am__cd) $(top_srcdir) && \ | |
335 | + $(AUTOMAKE) --foreign Makefile | |
336 | +.PRECIOUS: Makefile | |
337 | +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
338 | + @case '$?' in \ | |
339 | + *config.status*) \ | |
340 | + echo ' $(SHELL) ./config.status'; \ | |
341 | + $(SHELL) ./config.status;; \ | |
342 | + *) \ | |
343 | + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ | |
344 | + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ | |
345 | + esac; | |
346 | + | |
347 | +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | |
348 | + $(SHELL) ./config.status --recheck | |
349 | + | |
350 | +$(top_srcdir)/configure: $(am__configure_deps) | |
351 | + $(am__cd) $(srcdir) && $(AUTOCONF) | |
352 | +$(ACLOCAL_M4): $(am__aclocal_m4_deps) | |
353 | + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) | |
354 | +$(am__aclocal_m4_deps): | |
355 | + | |
356 | +config.h: stamp-h1 | |
357 | + @test -f $@ || rm -f stamp-h1 | |
358 | + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 | |
359 | + | |
360 | +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status | |
361 | + @rm -f stamp-h1 | |
362 | + cd $(top_builddir) && $(SHELL) ./config.status config.h | |
363 | +$(srcdir)/config.h.in: $(am__configure_deps) | |
364 | + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) | |
365 | + rm -f stamp-h1 | |
366 | + touch $@ | |
367 | + | |
368 | +distclean-hdr: | |
369 | + -rm -f config.h stamp-h1 | |
370 | + | |
371 | +# This directory's subdirectories are mostly independent; you can cd | |
372 | +# into them and run 'make' without going through this Makefile. | |
373 | +# To change the values of 'make' variables: instead of editing Makefiles, | |
374 | +# (1) if the variable is set in 'config.status', edit 'config.status' | |
375 | +# (which will cause the Makefiles to be regenerated when you run 'make'); | |
376 | +# (2) otherwise, pass the desired values on the 'make' command line. | |
377 | +$(am__recursive_targets): | |
378 | + @fail=; \ | |
379 | + if $(am__make_keepgoing); then \ | |
380 | + failcom='fail=yes'; \ | |
381 | + else \ | |
382 | + failcom='exit 1'; \ | |
383 | + fi; \ | |
384 | + dot_seen=no; \ | |
385 | + target=`echo $@ | sed s/-recursive//`; \ | |
386 | + case "$@" in \ | |
387 | + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ | |
388 | + *) list='$(SUBDIRS)' ;; \ | |
389 | + esac; \ | |
390 | + for subdir in $$list; do \ | |
391 | + echo "Making $$target in $$subdir"; \ | |
392 | + if test "$$subdir" = "."; then \ | |
393 | + dot_seen=yes; \ | |
394 | + local_target="$$target-am"; \ | |
395 | + else \ | |
396 | + local_target="$$target"; \ | |
397 | + fi; \ | |
398 | + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ | |
399 | + || eval $$failcom; \ | |
400 | + done; \ | |
401 | + if test "$$dot_seen" = "no"; then \ | |
402 | + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ | |
403 | + fi; test -z "$$fail" | |
404 | + | |
405 | +ID: $(am__tagged_files) | |
406 | + $(am__define_uniq_tagged_files); mkid -fID $$unique | |
407 | +tags: tags-recursive | |
408 | +TAGS: tags | |
409 | + | |
410 | +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) | |
411 | + set x; \ | |
412 | + here=`pwd`; \ | |
413 | + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ | |
414 | + include_option=--etags-include; \ | |
415 | + empty_fix=.; \ | |
416 | + else \ | |
417 | + include_option=--include; \ | |
418 | + empty_fix=; \ | |
419 | + fi; \ | |
420 | + list='$(SUBDIRS)'; for subdir in $$list; do \ | |
421 | + if test "$$subdir" = .; then :; else \ | |
422 | + test ! -f $$subdir/TAGS || \ | |
423 | + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ | |
424 | + fi; \ | |
425 | + done; \ | |
426 | + $(am__define_uniq_tagged_files); \ | |
427 | + shift; \ | |
428 | + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | |
429 | + test -n "$$unique" || unique=$$empty_fix; \ | |
430 | + if test $$# -gt 0; then \ | |
431 | + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | |
432 | + "$$@" $$unique; \ | |
433 | + else \ | |
434 | + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | |
435 | + $$unique; \ | |
436 | + fi; \ | |
437 | + fi | |
438 | +ctags: ctags-recursive | |
439 | + | |
440 | +CTAGS: ctags | |
441 | +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) | |
442 | + $(am__define_uniq_tagged_files); \ | |
443 | + test -z "$(CTAGS_ARGS)$$unique" \ | |
444 | + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | |
445 | + $$unique | |
446 | + | |
447 | +GTAGS: | |
448 | + here=`$(am__cd) $(top_builddir) && pwd` \ | |
449 | + && $(am__cd) $(top_srcdir) \ | |
450 | + && gtags -i $(GTAGS_ARGS) "$$here" | |
451 | +cscope: cscope.files | |
452 | + test ! -s cscope.files \ | |
453 | + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) | |
454 | +clean-cscope: | |
455 | + -rm -f cscope.files | |
456 | +cscope.files: clean-cscope cscopelist | |
457 | +cscopelist: cscopelist-recursive | |
458 | + | |
459 | +cscopelist-am: $(am__tagged_files) | |
460 | + list='$(am__tagged_files)'; \ | |
461 | + case "$(srcdir)" in \ | |
462 | + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ | |
463 | + *) sdir=$(subdir)/$(srcdir) ;; \ | |
464 | + esac; \ | |
465 | + for i in $$list; do \ | |
466 | + if test -f "$$i"; then \ | |
467 | + echo "$(subdir)/$$i"; \ | |
468 | + else \ | |
469 | + echo "$$sdir/$$i"; \ | |
470 | + fi; \ | |
471 | + done >> $(top_builddir)/cscope.files | |
472 | + | |
473 | +distclean-tags: | |
474 | + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | |
475 | + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files | |
476 | + | |
477 | +distdir: $(DISTFILES) | |
478 | + $(am__remove_distdir) | |
479 | + test -d "$(distdir)" || mkdir "$(distdir)" | |
480 | + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
481 | + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
482 | + list='$(DISTFILES)'; \ | |
483 | + dist_files=`for file in $$list; do echo $$file; done | \ | |
484 | + sed -e "s|^$$srcdirstrip/||;t" \ | |
485 | + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | |
486 | + case $$dist_files in \ | |
487 | + */*) $(MKDIR_P) `echo "$$dist_files" | \ | |
488 | + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | |
489 | + sort -u` ;; \ | |
490 | + esac; \ | |
491 | + for file in $$dist_files; do \ | |
492 | + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | |
493 | + if test -d $$d/$$file; then \ | |
494 | + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | |
495 | + if test -d "$(distdir)/$$file"; then \ | |
496 | + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
497 | + fi; \ | |
498 | + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | |
499 | + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | |
500 | + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
501 | + fi; \ | |
502 | + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | |
503 | + else \ | |
504 | + test -f "$(distdir)/$$file" \ | |
505 | + || cp -p $$d/$$file "$(distdir)/$$file" \ | |
506 | + || exit 1; \ | |
507 | + fi; \ | |
508 | + done | |
509 | + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ | |
510 | + if test "$$subdir" = .; then :; else \ | |
511 | + $(am__make_dryrun) \ | |
512 | + || test -d "$(distdir)/$$subdir" \ | |
513 | + || $(MKDIR_P) "$(distdir)/$$subdir" \ | |
514 | + || exit 1; \ | |
515 | + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ | |
516 | + $(am__relativize); \ | |
517 | + new_distdir=$$reldir; \ | |
518 | + dir1=$$subdir; dir2="$(top_distdir)"; \ | |
519 | + $(am__relativize); \ | |
520 | + new_top_distdir=$$reldir; \ | |
521 | + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ | |
522 | + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ | |
523 | + ($(am__cd) $$subdir && \ | |
524 | + $(MAKE) $(AM_MAKEFLAGS) \ | |
525 | + top_distdir="$$new_top_distdir" \ | |
526 | + distdir="$$new_distdir" \ | |
527 | + am__remove_distdir=: \ | |
528 | + am__skip_length_check=: \ | |
529 | + am__skip_mode_fix=: \ | |
530 | + distdir) \ | |
531 | + || exit 1; \ | |
532 | + fi; \ | |
533 | + done | |
534 | + -test -n "$(am__skip_mode_fix)" \ | |
535 | + || find "$(distdir)" -type d ! -perm -755 \ | |
536 | + -exec chmod u+rwx,go+rx {} \; -o \ | |
537 | + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ | |
538 | + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ | |
539 | + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ | |
540 | + || chmod -R a+r "$(distdir)" | |
541 | +dist-gzip: distdir | |
542 | + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz | |
543 | + $(am__post_remove_distdir) | |
544 | + | |
545 | +dist-bzip2: distdir | |
546 | + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 | |
547 | + $(am__post_remove_distdir) | |
548 | + | |
549 | +dist-lzip: distdir | |
550 | + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz | |
551 | + $(am__post_remove_distdir) | |
552 | + | |
553 | +dist-xz: distdir | |
554 | + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz | |
555 | + $(am__post_remove_distdir) | |
556 | + | |
557 | +dist-tarZ: distdir | |
558 | + @echo WARNING: "Support for shar distribution archives is" \ | |
559 | + "deprecated." >&2 | |
560 | + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 | |
561 | + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z | |
562 | + $(am__post_remove_distdir) | |
563 | + | |
564 | +dist-shar: distdir | |
565 | + @echo WARNING: "Support for distribution archives compressed with" \ | |
566 | + "legacy program 'compress' is deprecated." >&2 | |
567 | + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 | |
568 | + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz | |
569 | + $(am__post_remove_distdir) | |
570 | + | |
571 | +dist-zip: distdir | |
572 | + -rm -f $(distdir).zip | |
573 | + zip -rq $(distdir).zip $(distdir) | |
574 | + $(am__post_remove_distdir) | |
575 | + | |
576 | +dist dist-all: | |
577 | + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' | |
578 | + $(am__post_remove_distdir) | |
579 | + | |
580 | +# This target untars the dist file and tries a VPATH configuration. Then | |
581 | +# it guarantees that the distribution is self-contained by making another | |
582 | +# tarfile. | |
583 | +distcheck: dist | |
584 | + case '$(DIST_ARCHIVES)' in \ | |
585 | + *.tar.gz*) \ | |
586 | + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ | |
587 | + *.tar.bz2*) \ | |
588 | + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ | |
589 | + *.tar.lz*) \ | |
590 | + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ | |
591 | + *.tar.xz*) \ | |
592 | + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ | |
593 | + *.tar.Z*) \ | |
594 | + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ | |
595 | + *.shar.gz*) \ | |
596 | + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ | |
597 | + *.zip*) \ | |
598 | + unzip $(distdir).zip ;;\ | |
599 | + esac | |
600 | + chmod -R a-w $(distdir) | |
601 | + chmod u+w $(distdir) | |
602 | + mkdir $(distdir)/_build $(distdir)/_inst | |
603 | + chmod a-w $(distdir) | |
604 | + test -d $(distdir)/_build || exit 0; \ | |
605 | + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ | |
606 | + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ | |
607 | + && am__cwd=`pwd` \ | |
608 | + && $(am__cd) $(distdir)/_build \ | |
609 | + && ../configure \ | |
610 | + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ | |
611 | + $(DISTCHECK_CONFIGURE_FLAGS) \ | |
612 | + --srcdir=.. --prefix="$$dc_install_base" \ | |
613 | + && $(MAKE) $(AM_MAKEFLAGS) \ | |
614 | + && $(MAKE) $(AM_MAKEFLAGS) dvi \ | |
615 | + && $(MAKE) $(AM_MAKEFLAGS) check \ | |
616 | + && $(MAKE) $(AM_MAKEFLAGS) install \ | |
617 | + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ | |
618 | + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ | |
619 | + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ | |
620 | + distuninstallcheck \ | |
621 | + && chmod -R a-w "$$dc_install_base" \ | |
622 | + && ({ \ | |
623 | + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ | |
624 | + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ | |
625 | + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ | |
626 | + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ | |
627 | + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ | |
628 | + } || { rm -rf "$$dc_destdir"; exit 1; }) \ | |
629 | + && rm -rf "$$dc_destdir" \ | |
630 | + && $(MAKE) $(AM_MAKEFLAGS) dist \ | |
631 | + && rm -rf $(DIST_ARCHIVES) \ | |
632 | + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ | |
633 | + && cd "$$am__cwd" \ | |
634 | + || exit 1 | |
635 | + $(am__post_remove_distdir) | |
636 | + @(echo "$(distdir) archives ready for distribution: "; \ | |
637 | + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ | |
638 | + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' | |
639 | +distuninstallcheck: | |
640 | + @test -n '$(distuninstallcheck_dir)' || { \ | |
641 | + echo 'ERROR: trying to run $@ with an empty' \ | |
642 | + '$$(distuninstallcheck_dir)' >&2; \ | |
643 | + exit 1; \ | |
644 | + }; \ | |
645 | + $(am__cd) '$(distuninstallcheck_dir)' || { \ | |
646 | + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ | |
647 | + exit 1; \ | |
648 | + }; \ | |
649 | + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ | |
650 | + || { echo "ERROR: files left after uninstall:" ; \ | |
651 | + if test -n "$(DESTDIR)"; then \ | |
652 | + echo " (check DESTDIR support)"; \ | |
653 | + fi ; \ | |
654 | + $(distuninstallcheck_listfiles) ; \ | |
655 | + exit 1; } >&2 | |
656 | +distcleancheck: distclean | |
657 | + @if test '$(srcdir)' = . ; then \ | |
658 | + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ | |
659 | + exit 1 ; \ | |
660 | + fi | |
661 | + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ | |
662 | + || { echo "ERROR: files left in build directory after distclean:" ; \ | |
663 | + $(distcleancheck_listfiles) ; \ | |
664 | + exit 1; } >&2 | |
665 | +check-am: all-am | |
666 | +check: check-recursive | |
667 | +all-am: Makefile config.h | |
668 | +installdirs: installdirs-recursive | |
669 | +installdirs-am: | |
670 | +install: install-recursive | |
671 | +install-exec: install-exec-recursive | |
672 | +install-data: install-data-recursive | |
673 | +uninstall: uninstall-recursive | |
674 | + | |
675 | +install-am: all-am | |
676 | + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | |
677 | + | |
678 | +installcheck: installcheck-recursive | |
679 | +install-strip: | |
680 | + if test -z '$(STRIP)'; then \ | |
681 | + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
682 | + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
683 | + install; \ | |
684 | + else \ | |
685 | + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
686 | + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
687 | + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ | |
688 | + fi | |
689 | +mostlyclean-generic: | |
690 | + | |
691 | +clean-generic: | |
692 | + | |
693 | +distclean-generic: | |
694 | + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | |
695 | + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | |
696 | + | |
697 | +maintainer-clean-generic: | |
698 | + @echo "This command is intended for maintainers to use" | |
699 | + @echo "it deletes files that may require special tools to rebuild." | |
700 | + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | |
701 | +clean: clean-recursive | |
702 | + | |
703 | +clean-am: clean-generic mostlyclean-am | |
704 | + | |
705 | +distclean: distclean-recursive | |
706 | + -rm -f $(am__CONFIG_DISTCLEAN_FILES) | |
707 | + -rm -f Makefile | |
708 | +distclean-am: clean-am distclean-generic distclean-hdr distclean-tags | |
709 | + | |
710 | +dvi: dvi-recursive | |
711 | + | |
712 | +dvi-am: | |
713 | + | |
714 | +html: html-recursive | |
715 | + | |
716 | +html-am: | |
717 | + | |
718 | +info: info-recursive | |
719 | + | |
720 | +info-am: | |
721 | + | |
722 | +install-data-am: | |
723 | + | |
724 | +install-dvi: install-dvi-recursive | |
725 | + | |
726 | +install-dvi-am: | |
727 | + | |
728 | +install-exec-am: | |
729 | + | |
730 | +install-html: install-html-recursive | |
731 | + | |
732 | +install-html-am: | |
733 | + | |
734 | +install-info: install-info-recursive | |
735 | + | |
736 | +install-info-am: | |
737 | + | |
738 | +install-man: | |
739 | + | |
740 | +install-pdf: install-pdf-recursive | |
741 | + | |
742 | +install-pdf-am: | |
743 | + | |
744 | +install-ps: install-ps-recursive | |
745 | + | |
746 | +install-ps-am: | |
747 | + | |
748 | +installcheck-am: | |
749 | + | |
750 | +maintainer-clean: maintainer-clean-recursive | |
751 | + -rm -f $(am__CONFIG_DISTCLEAN_FILES) | |
752 | + -rm -rf $(top_srcdir)/autom4te.cache | |
753 | + -rm -f Makefile | |
754 | +maintainer-clean-am: distclean-am maintainer-clean-generic | |
755 | + | |
756 | +mostlyclean: mostlyclean-recursive | |
757 | + | |
758 | +mostlyclean-am: mostlyclean-generic | |
759 | + | |
760 | +pdf: pdf-recursive | |
761 | + | |
762 | +pdf-am: | |
763 | + | |
764 | +ps: ps-recursive | |
765 | + | |
766 | +ps-am: | |
767 | + | |
768 | +uninstall-am: | |
769 | + | |
770 | +.MAKE: $(am__recursive_targets) all install-am install-strip | |
771 | + | |
772 | +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ | |
773 | + am--refresh check check-am clean clean-cscope clean-generic \ | |
774 | + cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ | |
775 | + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ | |
776 | + distcheck distclean distclean-generic distclean-hdr \ | |
777 | + distclean-tags distcleancheck distdir distuninstallcheck dvi \ | |
778 | + dvi-am html html-am info info-am install install-am \ | |
779 | + install-data install-data-am install-dvi install-dvi-am \ | |
780 | + install-exec install-exec-am install-html install-html-am \ | |
781 | + install-info install-info-am install-man install-pdf \ | |
782 | + install-pdf-am install-ps install-ps-am install-strip \ | |
783 | + installcheck installcheck-am installdirs installdirs-am \ | |
784 | + maintainer-clean maintainer-clean-generic mostlyclean \ | |
785 | + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ | |
786 | + uninstall-am | |
787 | + | |
788 | + | |
789 | +# Tell versions [3.59,3.63) of GNU make to not export all variables. | |
790 | +# Otherwise a system limit (for SysV at least) may be exceeded. | |
791 | +.NOEXPORT: |
@@ -0,0 +1,2554 @@ | ||
1 | +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- | |
2 | + | |
3 | +# Copyright (C) 1996-2013 Free Software Foundation, Inc. | |
4 | + | |
5 | +# This file is free software; the Free Software Foundation | |
6 | +# gives unlimited permission to copy and/or distribute it, | |
7 | +# with or without modifications, as long as this notice is preserved. | |
8 | + | |
9 | +# This program is distributed in the hope that it will be useful, | |
10 | +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
11 | +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
12 | +# PARTICULAR PURPOSE. | |
13 | + | |
14 | +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) | |
15 | +m4_ifndef([AC_AUTOCONF_VERSION], | |
16 | + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | |
17 | +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, | |
18 | +[m4_warning([this file was generated for autoconf 2.69. | |
19 | +You have another version of autoconf. It may work, but is not guaranteed to. | |
20 | +If you have problems, you may need to regenerate the build system entirely. | |
21 | +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) | |
22 | + | |
23 | +# =========================================================================== | |
24 | +# http://www.gnu.org/software/autoconf-archive/ax_check_gl.html | |
25 | +# =========================================================================== | |
26 | +# | |
27 | +# SYNOPSIS | |
28 | +# | |
29 | +# AX_CHECK_GL | |
30 | +# | |
31 | +# DESCRIPTION | |
32 | +# | |
33 | +# Check for an OpenGL implementation. If GL is found, the required | |
34 | +# compiler and linker flags are included in the output variables | |
35 | +# "GL_CFLAGS", "GL_LIBS", "GL_LDFLAGS", respectively. If no usable GL | |
36 | +# implementation is found, "no_gl" is set to "yes". | |
37 | +# | |
38 | +# You could disable OpenGL using --with-gl=no | |
39 | +# | |
40 | +# You could choose a specific OpenGL libs using --with-gl=lib_name | |
41 | +# | |
42 | +# Under darwin, cygwin and mingw target you could prefer the OpenGL | |
43 | +# implementation that link with X setting --with-gl=x or without X support | |
44 | +# with --with-gl=nox. Notes that this script try to guess the right | |
45 | +# implementation. | |
46 | +# | |
47 | +# If the header "GL/gl.h" is found, "HAVE_GL_GL_H" is defined. If the | |
48 | +# header "OpenGL/gl.h" is found, HAVE_OPENGL_GL_H is defined. These | |
49 | +# preprocessor definitions may not be mutually exclusive. | |
50 | +# | |
51 | +# You should use something like this in your headers: | |
52 | +# | |
53 | +# #if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
54 | +# # include <windows.h> | |
55 | +# #endif | |
56 | +# #ifdef HAVE_GL_GL_H | |
57 | +# # include <GL/gl.h> | |
58 | +# #elif defined(HAVE_OPENGL_GL_H) | |
59 | +# # include <OpenGL/gl.h> | |
60 | +# #else | |
61 | +# # error no gl.h | |
62 | +# #endif | |
63 | +# | |
64 | +# LICENSE | |
65 | +# | |
66 | +# Copyright (c) 2009 Braden McDaniel <braden@endoframe.com> | |
67 | +# Copyright (c) 2012 Bastien Roucaries <roucaries.bastien+autoconf@gmail.com> | |
68 | +# | |
69 | +# This program is free software; you can redistribute it and/or modify it | |
70 | +# under the terms of the GNU General Public License as published by the | |
71 | +# Free Software Foundation; either version 2 of the License, or (at your | |
72 | +# option) any later version. | |
73 | +# | |
74 | +# This program is distributed in the hope that it will be useful, but | |
75 | +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
76 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
77 | +# Public License for more details. | |
78 | +# | |
79 | +# You should have received a copy of the GNU General Public License along | |
80 | +# with this program. If not, see <http://www.gnu.org/licenses/>. | |
81 | +# | |
82 | +# As a special exception, the respective Autoconf Macro's copyright owner | |
83 | +# gives unlimited permission to copy, distribute and modify the configure | |
84 | +# scripts that are the output of Autoconf when processing the Macro. You | |
85 | +# need not follow the terms of the GNU General Public License when using | |
86 | +# or distributing such scripts, even though portions of the text of the | |
87 | +# Macro appear in them. The GNU General Public License (GPL) does govern | |
88 | +# all other use of the material that constitutes the Autoconf Macro. | |
89 | +# | |
90 | +# This special exception to the GPL applies to versions of the Autoconf | |
91 | +# Macro released by the Autoconf Archive. When you make and distribute a | |
92 | +# modified version of the Autoconf Macro, you may extend this special | |
93 | +# exception to the GPL to apply to your modified version as well. | |
94 | + | |
95 | +#serial 15 | |
96 | + | |
97 | +m4_define([_AX_CHECK_GL_PROGRAM], | |
98 | + [AC_LANG_PROGRAM([[ | |
99 | +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
100 | +# include <windows.h> | |
101 | +# endif | |
102 | +# ifdef HAVE_GL_GL_H | |
103 | +# include <GL/gl.h> | |
104 | +# elif defined(HAVE_OPENGL_GL_H) | |
105 | +# include <OpenGL/gl.h> | |
106 | +# else | |
107 | +# error no gl.h | |
108 | +# endif | |
109 | +]],[[glBegin(0)]])]) | |
110 | + | |
111 | +dnl Default include : add windows.h | |
112 | +dnl see http://www.opengl.org/wiki/Platform_specifics:_Windows | |
113 | +dnl (acceded 20120801) | |
114 | +AC_DEFUN([_AX_CHECK_GL_INCLUDES_DEFAULT],dnl | |
115 | +[ | |
116 | + AC_INCLUDES_DEFAULT | |
117 | + [ | |
118 | + # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
119 | + # include <windows.h> | |
120 | + # endif | |
121 | + ] | |
122 | +]) | |
123 | + | |
124 | +dnl local save flags | |
125 | +AC_DEFUN([_AX_CHECK_GL_SAVE_FLAGS], | |
126 | +[dnl | |
127 | +ax_check_gl_saved_libs="${LIBS}" | |
128 | +ax_check_gl_saved_cflags="${CFLAGS}" | |
129 | +ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
130 | +ax_check_gl_saved_ldflags="${LDFLAGS}" | |
131 | +]) | |
132 | + | |
133 | +dnl local restore flags | |
134 | +AC_DEFUN([_AX_CHECK_GL_RESTORE_FLAGS], | |
135 | +[dnl | |
136 | +LIBS="${ax_check_gl_saved_libs}" | |
137 | +CFLAGS="${ax_check_gl_saved_cflags}" | |
138 | +CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
139 | +LDFLAGS="${ax_check_gl_saved_ldflags}" | |
140 | +]) | |
141 | + | |
142 | +# set the varible ax_check_gl_need_x | |
143 | +# this variable determine if we need opengl that link with X | |
144 | +# value are default aka try the first library wether if it link or not with x | |
145 | +# yes that means we need a opengl with x | |
146 | +# no that means we do not need an opengl with x | |
147 | +AC_DEFUN([_AX_CHECK_GL_NEED_X], | |
148 | +[dnl | |
149 | + # do not check if empty : allow a subroutine to modify the choice | |
150 | + AS_IF([test "X$ax_check_gl_need_x" = "X"], | |
151 | + [ax_check_gl_need_x="default" | |
152 | + AS_IF([test "X$no_x" = "Xyes"],[ax_check_gl_need_x="no"]) | |
153 | + AS_IF([test "X$ax_check_gl_want_gl" = "Xnox"],[ax_check_gl_need_x="no"]) | |
154 | + AS_IF([test "X$ax_check_gl_want_gl" = "Xx"],[ax_check_gl_need_x="yes"])]) | |
155 | +]) | |
156 | + | |
157 | +# compile the example program | |
158 | +AC_DEFUN([_AX_CHECK_GL_COMPILE], | |
159 | +[dnl | |
160 | + AC_LANG_PUSH([C]) | |
161 | + _AX_CHECK_GL_SAVE_FLAGS() | |
162 | + CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
163 | + AC_COMPILE_IFELSE([_AX_CHECK_GL_PROGRAM], | |
164 | + [ax_check_gl_compile_opengl="yes"], | |
165 | + [ax_check_gl_compile_opengl="no"]) | |
166 | + _AX_CHECK_GL_RESTORE_FLAGS() | |
167 | + AC_LANG_POP([C]) | |
168 | +]) | |
169 | + | |
170 | +# compile the example program (cache) | |
171 | +AC_DEFUN([_AX_CHECK_GL_COMPILE_CV], | |
172 | +[dnl | |
173 | + AC_CACHE_CHECK([for compiling a minimal OpenGL program],[ax_cv_check_gl_compile_opengl], | |
174 | + [_AX_CHECK_GL_COMPILE() | |
175 | + ax_cv_check_gl_compile_opengl="${ax_check_gl_compile_opengl}"]) | |
176 | + ax_check_gl_compile_opengl="${ax_cv_check_gl_compile_opengl}" | |
177 | +]) | |
178 | + | |
179 | +# link the example program | |
180 | +AC_DEFUN([_AX_CHECK_GL_LINK], | |
181 | +[dnl | |
182 | + AC_LANG_PUSH([C]) | |
183 | + _AX_CHECK_GL_SAVE_FLAGS() | |
184 | + CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
185 | + LIBS="${GL_LIBS} ${LIBS}" | |
186 | + LDFLAGS="${GL_LDFLAGS} ${LDFLAGS}" | |
187 | + AC_LINK_IFELSE([_AX_CHECK_GL_PROGRAM], | |
188 | + [ax_check_gl_link_opengl="yes"], | |
189 | + [ax_check_gl_link_opengl="no"]) | |
190 | + _AX_CHECK_GL_RESTORE_FLAGS() | |
191 | + AC_LANG_POP([C]) | |
192 | +]) | |
193 | + | |
194 | +# link the example program (cache) | |
195 | +AC_DEFUN([_AX_CHECK_GL_LINK_CV], | |
196 | +[dnl | |
197 | + AC_CACHE_CHECK([for linking a minimal OpenGL program],[ax_cv_check_gl_link_opengl], | |
198 | + [_AX_CHECK_GL_LINK() | |
199 | + ax_cv_check_gl_link_opengl="${ax_check_gl_link_opengl}"]) | |
200 | + ax_check_gl_link_opengl="${ax_cv_check_gl_link_opengl}" | |
201 | +]) | |
202 | + | |
203 | +dnl Check headers manually (default case) | |
204 | +AC_DEFUN([_AX_CHECK_GL_MANUAL_HEADERS_DEFAULT], | |
205 | +[AC_REQUIRE([AC_PATH_XTRA]) | |
206 | + AC_LANG_PUSH([C]) | |
207 | + _AX_CHECK_GL_SAVE_FLAGS() | |
208 | + CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
209 | + # see comment in _AX_CHECK_GL_INCLUDES_DEFAULT | |
210 | + AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT]) | |
211 | + # FIXME: use extra cflags | |
212 | + AC_CHECK_HEADERS([GL/gl.h],[ax_check_gl_have_headers="yes"], | |
213 | + [ax_check_gl_have_headers_headers="no"], | |
214 | + [_AX_CHECK_GL_INCLUDES_DEFAULT()]) | |
215 | + # do not try darwin specific OpenGl/gl.h | |
216 | + _AX_CHECK_GL_RESTORE_FLAGS() | |
217 | + AC_LANG_POP([C]) | |
218 | +]) | |
219 | + | |
220 | +# darwin headers without X | |
221 | +AC_DEFUN([_AX_CHECK_GL_MANUAL_HEADERS_DARWIN_NOX],[ | |
222 | + AC_LANG_PUSH([C]) | |
223 | + _AX_CHECK_GL_SAVE_FLAGS() | |
224 | + # FIXME: use -framework opengl as an extra cflags | |
225 | + CFLAGS="-framework opengl ${GL_CFLAGS} ${CFLAGS}" | |
226 | + AC_CHECK_HEADERS([OpenGL/gl.h],[ax_check_gl_have_headers="yes"], | |
227 | + [ax_check_gl_have_headers_headers="no"], | |
228 | + [_AX_CHECK_GL_INCLUDES_DEFAULT()]) | |
229 | + AS_IF([test "X$ax_check_gl_have_headers" = "yes"], | |
230 | + [GL_CFLAGS="-framework opengl ${GL_CFLAGS}"]) | |
231 | + _AX_CHECK_GL_SAVE_FLAGS() | |
232 | + AC_LANG_POP([C]) | |
233 | +]) | |
234 | + | |
235 | +# check header for darwin | |
236 | +AC_DEFUN([_AX_CHECK_GL_MANUAL_HEADERS_DARWIN], | |
237 | +[AC_REQUIRE([_AX_CHECK_GL_NEED_X])dnl | |
238 | + AS_CASE([$ax_check_gl_need_x], | |
239 | + # try to get X libs if possible do not use framework | |
240 | + [yes],[_AX_CHECK_GL_MANUAL_HEADERS_DEFAULT()] | |
241 | + [no],[_AX_CHECK_GL_MANUAL_HEADERS_DARWIN_NOX()] | |
242 | + # per default use framework that will select if possible no_x version | |
243 | + [_AX_CHECK_GL_MANUAL_HEADERS_DARWIN_NOX() | |
244 | + # if not found set that we need x in order to found the good library | |
245 | + AS_IF([test "X$ax_check_gl_have_headers" = "yes"], | |
246 | + [ax_check_gl_need_x="no"], | |
247 | + [ax_check_gl_need_x="yes" | |
248 | + # retry with general test | |
249 | + _AX_CHECK_GL_MANUAL_HEADERS_DEFAULT()]) | |
250 | + ]) | |
251 | +]) | |
252 | + | |
253 | +dnl Check headers manually: subroutine must set ax_check_gl_have_headers={yes,no} | |
254 | +AC_DEFUN([_AX_CHECK_GL_MANUAL_HEADERS], | |
255 | +[AC_REQUIRE([AC_CANONICAL_HOST]) | |
256 | + AS_CASE([${host}], | |
257 | + [*-darwin*],[_AX_CHECK_GL_MANUAL_HEADERS_DARWIN], | |
258 | + [_AX_CHECK_GL_MANUAL_HEADERS_DEFAULT()]) | |
259 | + AC_CACHE_CHECK([for OpenGL headers],[ax_cv_check_gl_have_headers], | |
260 | + [ax_cv_check_gl_have_headers="${ax_check_gl_have_headers}"]) | |
261 | +]) | |
262 | + | |
263 | +# dnl try to found library (generic case) | |
264 | +# dnl $1 is set to the library to found | |
265 | +AC_DEFUN([_AX_CHECK_GL_MANUAL_LIBS_GENERIC], | |
266 | +[dnl | |
267 | + ax_check_gl_manual_libs_generic_extra_libs="$1" | |
268 | + AS_IF([test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"], | |
269 | + [AC_MSG_ERROR([AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty])]) | |
270 | + | |
271 | + AC_LANG_PUSH([C]) | |
272 | + _AX_CHECK_GL_SAVE_FLAGS() | |
273 | + CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
274 | + LIBS="${GL_LIBS} ${LIBS}" | |
275 | + AC_SEARCH_LIBS([glBegin],[$ax_check_gl_manual_libs_generic_extra_libs], | |
276 | + [ax_check_gl_lib_opengl="yes"], | |
277 | + [ax_check_gl_lib_opengl="no"]) | |
278 | + AS_CASE([$ac_cv_search_glBegin], | |
279 | + ["none required"],[], | |
280 | + [no],[], | |
281 | + [GL_LIBS="${ac_cv_search_glBegin} ${GL_LIBS}"]) | |
282 | + _AX_CHECK_GL_RESTORE_FLAGS() | |
283 | + AC_LANG_PUSH([C]) | |
284 | +]) | |
285 | + | |
286 | +# dnl try to found lib under darwin | |
287 | +# darwin opengl hack | |
288 | +# see http://web.archive.org/web/20090410052741/http://developer.apple.com/qa/qa2007/qa1567.html | |
289 | +# and http://web.eecs.umich.edu/~sugih/courses/eecs487/glut-howto/ | |
290 | +AC_DEFUN([_AX_CHECK_GL_MANUAL_LIBS_DARWIN], | |
291 | +[# ldhack list | |
292 | + ldhack1 = "-Wl,-framework,OpenGL" | |
293 | + ldhack2 = "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" | |
294 | + ldhack3 = "$ldhack1,$ldhack2" | |
295 | + | |
296 | + # select hack | |
297 | + AS_IF([test "X$ax_check_gl_need_x" = "Xyes"], | |
298 | + [# libs already set by -framework cflag | |
299 | + darwinlibs="" | |
300 | + ldhacks="$ldhack1 $ldhack2 $ldhack3"], | |
301 | + [# do not use framework ldflags in case of x version | |
302 | + darwinlibs="GL gl MesaGL" | |
303 | + ldhack="$ldhack2"]) | |
304 | + | |
305 | + ax_check_gl_link_opengl="no" | |
306 | + for extralibs in " " $darwinlibs; do | |
307 | + for extraldflags in " " ldhacks; do | |
308 | + AC_LANG_PUSH([C]) | |
309 | + _AX_CHECK_GL_SAVE_FLAGS() | |
310 | + CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
311 | + LIBS="$extralibs ${GL_LIBS} ${LIBS}" | |
312 | + LDFLAGS="$extraldflags ${GL_LDFLAGS} ${LDFLAGS}" | |
313 | + AC_LINK_IFELSE([_AX_CHECK_GL_PROGRAM], | |
314 | + [ax_check_gl_link_opengl="yes"], | |
315 | + [ax_check_gl_link_opengl="no"]) | |
316 | + _AX_CHECK_GL_RESTORE_FLAGS() | |
317 | + AC_LANG_POP([C]) | |
318 | + AS_IF([test "X$ax_check_gl_link_opengl" = "Xyes"],[break]) | |
319 | + done; | |
320 | + AS_IF([test "X$ax_check_gl_link_opengl" = "Xyes"],[break]) | |
321 | + done; | |
322 | + GL_LIBS="$extralibs ${GL_LIBS}" | |
323 | + GL_LDFLAGS="$extraldflags ${GL_LDFLAGS}" | |
324 | +]) | |
325 | + | |
326 | +dnl Check library manually: subroutine must set | |
327 | +dnl $ax_check_gl_lib_opengl={yes,no} | |
328 | +AC_DEFUN([_AX_CHECK_GL_MANUAL_LIBS], | |
329 | +[AC_REQUIRE([AC_CANONICAL_HOST]) | |
330 | + AS_CASE([${host}], | |
331 | + [*-darwin*],[_AX_CHECK_GL_MANUAL_LIBS_DARWIN()], | |
332 | + # try first cygwin version | |
333 | + [*-cygwin*],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([GL gl MesaGL opengl32])], | |
334 | + # try first native | |
335 | + [*-mingw*],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([opengl32 GL gl MesaGL])], | |
336 | + [_AX_CHECK_GL_MANUAL_LIBS_GENERIC([GL gl MesaGL])]) | |
337 | + | |
338 | + AC_CACHE_CHECK([for OpenGL libraries],[ax_cv_check_gl_lib_opengl], | |
339 | + [ax_cv_check_gl_lib_opengl="${ax_check_gl_lib_opengl}"]) | |
340 | + ax_check_gl_lib_opengl="${ax_cv_check_gl_lib_opengl}" | |
341 | +]) | |
342 | + | |
343 | +# manually check aka old way | |
344 | +AC_DEFUN([_AX_CHECK_GL_MANUAL], | |
345 | +[AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
346 | + AC_REQUIRE([AC_PATH_XTRA])dnl | |
347 | + | |
348 | + no_gl="yes" | |
349 | + | |
350 | + _AX_CHECK_GL_MANUAL_HEADERS() | |
351 | + AS_IF([test "X$ax_check_gl_have_headers" = "Xyes"], | |
352 | + [_AX_CHECK_GL_COMPILE_CV()], | |
353 | + [ax_check_gl_compile_opengl=no]) | |
354 | + | |
355 | + AS_IF([test "X$ax_check_gl_compile_opengl" = "Xyes"], | |
356 | + [_AX_CHECK_GL_MANUAL_LIBS], | |
357 | + [ax_check_gl_lib_opengl=no]) | |
358 | + | |
359 | + AS_IF([test "X$ax_check_gl_lib_opengl" = "Xyes"], | |
360 | + [_AX_CHECK_GL_LINK_CV()], | |
361 | + [ax_check_gl_link_opengl=no]) | |
362 | + | |
363 | + AS_IF([test "X$ax_check_gl_link_opengl" = "Xyes"], | |
364 | + [no_gl="no"], | |
365 | + [no_gl="yes"]) | |
366 | +])dnl | |
367 | + | |
368 | + | |
369 | +# try to test using pkgconfig: set ax_check_gl_pkg_config=no if not found | |
370 | +AC_DEFUN([_AX_CHECK_GL_PKG_CONFIG],dnl | |
371 | +[dnl | |
372 | + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
373 | + | |
374 | + PKG_CHECK_MODULES([GL],[gl],[ax_check_gl_pkg_config=yes],[ax_check_gl_pkg_config=no]) | |
375 | + AS_IF([test "X$ax_check_gl_pkg_config" = "Xyes"],[ | |
376 | + # check headers | |
377 | + AC_LANG_PUSH([C]) | |
378 | + _AX_CHECK_GL_SAVE_FLAGS() | |
379 | + CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
380 | + AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT]) | |
381 | + AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h], | |
382 | + [ax_check_gl_have_headers="yes";break], | |
383 | + [ax_check_gl_have_headers_headers="no"], | |
384 | + [_AX_CHECK_GL_INCLUDES_DEFAULT()]) | |
385 | + _AX_CHECK_GL_RESTORE_FLAGS() | |
386 | + AC_LANG_POP([C]) | |
387 | + AC_CACHE_CHECK([for OpenGL headers],[ax_cv_check_gl_have_headers], | |
388 | + [ax_cv_check_gl_have_headers="${ax_check_gl_have_headers}"]) | |
389 | + | |
390 | + # pkgconfig library are suposed to work ... | |
391 | + AS_IF([test "X$ax_cv_check_gl_have_headers" = "Xno"], | |
392 | + [AC_MSG_ERROR("Pkgconfig detected OpenGL library has no headers!")]) | |
393 | + | |
394 | + _AX_CHECK_GL_COMPILE_CV() | |
395 | + AS_IF([test "X$ax_cv_check_gl_compile_opengl" = "Xno"], | |
396 | + [AC_MSG_ERROR("Pkgconfig detected opengl library could not be used for compiling minimal program!")]) | |
397 | + | |
398 | + _AX_CHECK_GL_LINK_CV() | |
399 | + AS_IF([test "X$ax_cv_check_gl_link_opengl" = "Xno"], | |
400 | + [AC_MSG_ERROR("Pkgconfig detected opengl library could not be used for linking minimal program!")]) | |
401 | + ]) | |
402 | +]) | |
403 | + | |
404 | +# test if gl link with X | |
405 | +AC_DEFUN([_AX_CHECK_GL_WITH_X], | |
406 | +[ | |
407 | + # try if opengl need X | |
408 | + AC_LANG_PUSH([C]) | |
409 | + _AX_CHECK_GL_SAVE_FLAGS() | |
410 | + CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
411 | + LIBS="${GL_LIBS} ${LIBS}" | |
412 | + LDFLAGS="${GL_LDFLAGS} ${LDFLAGS}" | |
413 | + AC_LINK_IFELSE([AC_LANG_CALL([], [glXQueryVersion])], | |
414 | + [ax_check_gl_link_implicitly_with_x="yes"], | |
415 | + [ax_check_gl_link_implicitly_with_x="no"]) | |
416 | + _AX_CHECK_GL_RESTORE_FLAGS() | |
417 | + AC_LANG_POP([C]) | |
418 | +]) | |
419 | + | |
420 | +# internal routine: entry point if gl not disable | |
421 | +AC_DEFUN([_AX_CHECK_GL],[dnl | |
422 | + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
423 | + AC_REQUIRE([AC_PATH_X])dnl | |
424 | + | |
425 | + # does we need X or not | |
426 | + _AX_CHECK_GL_NEED_X() | |
427 | + | |
428 | + # try first pkgconfig | |
429 | + AC_MSG_CHECKING([for a working OpenGL implementation by pkg-config]) | |
430 | + AS_IF([test "X${PKG_CONFIG}" = "X"], | |
431 | + [ AC_MSG_RESULT([no]) | |
432 | + ax_check_gl_pkg_config=no], | |
433 | + [ AC_MSG_RESULT([yes]) | |
434 | + _AX_CHECK_GL_PKG_CONFIG()]) | |
435 | + | |
436 | + # if no pkgconfig or pkgconfig fail try manual way | |
437 | + AS_IF([test "X$ax_check_gl_pkg_config" = "Xno"], | |
438 | + [_AX_CHECK_GL_MANUAL()], | |
439 | + [no_gl=no]) | |
440 | + | |
441 | + | |
442 | + # test if need to test X compatibility | |
443 | + AS_IF([test $no_gl = no], | |
444 | + [# test X compatibility | |
445 | + AS_IF([test X$ax_check_gl_need_x != "Xdefault"], | |
446 | + [AC_CACHE_CHECK([wether OpenGL link implictly with X],[ax_cv_check_gl_link_with_x], | |
447 | + [_AX_CHECK_GL_WITH_X() | |
448 | + ax_cv_check_gl_link_with_x="${ax_check_gl_link_implicitly_with_x}"]) | |
449 | + AS_IF([test "X${ax_cv_check_gl_link_with_x}" = "X${ax_check_gl_need_x}"], | |
450 | + [no_gl="no"], | |
451 | + [no_gl=yes])]) | |
452 | + ]) | |
453 | +]) | |
454 | + | |
455 | +# ax_check_gl entry point | |
456 | +AC_DEFUN([AX_CHECK_GL], | |
457 | +[AC_REQUIRE([AC_PATH_X])dnl | |
458 | + | |
459 | + AC_ARG_WITH([gl], | |
460 | + [AS_HELP_STRING([--with-gl@<:@=ARG@:>@], | |
461 | + [use opengl (ARG=yes), | |
462 | + using the specific lib (ARG=<lib>), | |
463 | + using the OpenGL lib that link with X (ARG=x), | |
464 | + using the OpenGL lib that link without X (ARG=nox), | |
465 | + or disable it (ARG=no) | |
466 | + @<:@ARG=yes@:>@ ])], | |
467 | + [ | |
468 | + AS_CASE(["$withval"], | |
469 | + ["no"|"NO"],[ax_check_gl_want_gl="no"], | |
470 | + ["yes"|"YES"],[ax_check_gl_want_gl="yes"], | |
471 | + [ax_check_gl_want_gl="$withval"]) | |
472 | + ], | |
473 | + [ax_check_gl_want_gl="yes"]) | |
474 | + | |
475 | + # check consistency of parameters | |
476 | + AS_IF([test "X$have_x" = "Xdisabled"], | |
477 | + [AS_IF([test X$ax_check_gl_want_gl = "Xx"], | |
478 | + [AC_MSG_ERROR([You prefer OpenGL with X and asked for no X support])])]) | |
479 | + | |
480 | + # set flags | |
481 | + no_gl="yes" | |
482 | + | |
483 | + # now do the real testing | |
484 | + AS_IF([test X$ax_check_gl_want_gl != "Xno"], | |
485 | + [_AX_CHECK_GL()]) | |
486 | + | |
487 | + AC_MSG_CHECKING([for a working OpenGL implementation]) | |
488 | + AS_IF([test "X$no_gl" = "Xno"], | |
489 | + [AC_MSG_RESULT([yes]) | |
490 | + AC_MSG_CHECKING([for CFLAGS needed for OpenGL]) | |
491 | + AC_MSG_RESULT(["${GL_CFLAGS}"]) | |
492 | + AC_MSG_CHECKING([for LIBS needed for OpenGL]) | |
493 | + AC_MSG_RESULT(["${GL_LIBS}"]) | |
494 | + AC_MSG_CHECKING([for LDFLAGS needed for OpenGL]) | |
495 | + AC_MSG_RESULT(["${GL_LDFLAGS}"])], | |
496 | + [AC_MSG_RESULT([no]) | |
497 | + GL_CFLAGS="" | |
498 | + GL_LIBS="" | |
499 | + GL_LDFLAGS=""]) | |
500 | + | |
501 | + AC_SUBST([GL_CFLAGS]) | |
502 | + AC_SUBST([GL_LIBS]) | |
503 | + AC_SUBST([GL_LDFLAGS]) | |
504 | +]) | |
505 | + | |
506 | +# =========================================================================== | |
507 | +# http://www.gnu.org/software/autoconf-archive/ax_check_glu.html | |
508 | +# =========================================================================== | |
509 | +# | |
510 | +# SYNOPSIS | |
511 | +# | |
512 | +# AX_CHECK_GLU | |
513 | +# | |
514 | +# DESCRIPTION | |
515 | +# | |
516 | +# Check for GLU. If GLU is found, the required preprocessor and linker | |
517 | +# flags are included in the output variables "GLU_CFLAGS" and "GLU_LIBS", | |
518 | +# respectively. If no GLU implementation is found, "no_glu" is set to | |
519 | +# "yes". | |
520 | +# | |
521 | +# If the header "GL/glu.h" is found, "HAVE_GL_GLU_H" is defined. If the | |
522 | +# header "OpenGL/glu.h" is found, HAVE_OPENGL_GLU_H is defined. These | |
523 | +# preprocessor definitions may not be mutually exclusive. | |
524 | +# | |
525 | +# You should use something like this in your headers: | |
526 | +# | |
527 | +# # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
528 | +# # include <windows.h> | |
529 | +# # endif | |
530 | +# # if defined(HAVE_GL_GLU_H) | |
531 | +# # include <GL/glu.h> | |
532 | +# # elif defined(HAVE_OPENGL_GLU_H) | |
533 | +# # include <OpenGL/glu.h> | |
534 | +# # else | |
535 | +# # error no glu.h | |
536 | +# # endif | |
537 | +# | |
538 | +# Some implementations (in particular, some versions of Mac OS X) are | |
539 | +# known to treat the GLU tesselator callback function type as "GLvoid | |
540 | +# (*)(...)" rather than the standard "GLvoid (*)()". If the former | |
541 | +# condition is detected, this macro defines "HAVE_VARARGS_GLU_TESSCB". | |
542 | +# | |
543 | +# LICENSE | |
544 | +# | |
545 | +# Copyright (c) 2009 Braden McDaniel <braden@endoframe.com> | |
546 | +# Copyright (c) 2013 Bastien Roucaries <roucaries.bastien+autoconf@gmail.com> | |
547 | +# | |
548 | +# This program is free software; you can redistribute it and/or modify it | |
549 | +# under the terms of the GNU General Public License as published by the | |
550 | +# Free Software Foundation; either version 2 of the License, or (at your | |
551 | +# option) any later version. | |
552 | +# | |
553 | +# This program is distributed in the hope that it will be useful, but | |
554 | +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
555 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
556 | +# Public License for more details. | |
557 | +# | |
558 | +# You should have received a copy of the GNU General Public License along | |
559 | +# with this program. If not, see <http://www.gnu.org/licenses/>. | |
560 | +# | |
561 | +# As a special exception, the respective Autoconf Macro's copyright owner | |
562 | +# gives unlimited permission to copy, distribute and modify the configure | |
563 | +# scripts that are the output of Autoconf when processing the Macro. You | |
564 | +# need not follow the terms of the GNU General Public License when using | |
565 | +# or distributing such scripts, even though portions of the text of the | |
566 | +# Macro appear in them. The GNU General Public License (GPL) does govern | |
567 | +# all other use of the material that constitutes the Autoconf Macro. | |
568 | +# | |
569 | +# This special exception to the GPL applies to versions of the Autoconf | |
570 | +# Macro released by the Autoconf Archive. When you make and distribute a | |
571 | +# modified version of the Autoconf Macro, you may extend this special | |
572 | +# exception to the GPL to apply to your modified version as well. | |
573 | + | |
574 | +#serial 16 | |
575 | + | |
576 | +# exemple program | |
577 | +m4_define([_AX_CHECK_GLU_PROGRAM], | |
578 | + [AC_LANG_PROGRAM([[ | |
579 | +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
580 | +# include <windows.h> | |
581 | +# endif | |
582 | +# ifdef HAVE_GL_GLU_H | |
583 | +# include <GL/glu.h> | |
584 | +# elif defined(HAVE_OPENGL_GLU_H) | |
585 | +# include <OpenGL/glu.h> | |
586 | +# else | |
587 | +# error no glu.h | |
588 | +# endif | |
589 | +]],[[gluBeginCurve(0)]])]) | |
590 | + | |
591 | + | |
592 | +dnl Default include : add windows.h | |
593 | +dnl see http://www.opengl.org/wiki/Platform_specifics:_Windows | |
594 | +dnl (acceded 20120801) | |
595 | +AC_DEFUN([_AX_CHECK_GLU_INCLUDES_DEFAULT],dnl | |
596 | +[ | |
597 | + AC_INCLUDES_DEFAULT | |
598 | + [ | |
599 | + # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
600 | + # include <windows.h> | |
601 | + # endif | |
602 | + ] | |
603 | +]) | |
604 | + | |
605 | +dnl local save flags | |
606 | +AC_DEFUN([_AX_CHECK_GLU_SAVE_FLAGS], | |
607 | +[dnl | |
608 | +ax_check_glu_saved_libs="${LIBS}" | |
609 | +ax_check_glu_saved_cflags="${CFLAGS}" | |
610 | +ax_check_glu_saved_cppflags="${CPPFLAGS}" | |
611 | +ax_check_glu_saved_ldflags="${LDFLAGS}" | |
612 | +]) | |
613 | + | |
614 | + | |
615 | +dnl local restore flags | |
616 | +AC_DEFUN([_AX_CHECK_GLU_RESTORE_FLAGS], | |
617 | +[dnl | |
618 | +LIBS="${ax_check_glu_saved_libs}" | |
619 | +CFLAGS="${ax_check_glu_saved_cflags}" | |
620 | +CPPFLAGS="${ax_check_glu_saved_cppflags}" | |
621 | +LDFLAGS="${ax_check_glu_saved_ldflags}" | |
622 | +]) | |
623 | + | |
624 | + | |
625 | +# compile the example program | |
626 | +AC_DEFUN([_AX_CHECK_GLU_COMPILE], | |
627 | +[dnl | |
628 | + AC_LANG_PUSH([C]) | |
629 | + _AX_CHECK_GLU_SAVE_FLAGS() | |
630 | + CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
631 | + AC_COMPILE_IFELSE([_AX_CHECK_GLU_PROGRAM], | |
632 | + [ax_check_glu_compile_opengl="yes"], | |
633 | + [ax_check_glu_compile_opengl="no"]) | |
634 | + _AX_CHECK_GLU_RESTORE_FLAGS() | |
635 | + AC_LANG_POP([C]) | |
636 | +]) | |
637 | + | |
638 | +# compile the example program (cache) | |
639 | +AC_DEFUN([_AX_CHECK_GLU_COMPILE_CV], | |
640 | +[dnl | |
641 | + AC_CACHE_CHECK([for compiling a minimal OpenGL Utility (GLU) program],[ax_cv_check_glu_compile_opengl], | |
642 | + [_AX_CHECK_GLU_COMPILE() | |
643 | + ax_cv_check_glu_compile_opengl="${ax_check_glu_compile_opengl}"]) | |
644 | + ax_check_glu_compile_opengl="${ax_cv_check_glu_compile_opengl}" | |
645 | +]) | |
646 | + | |
647 | +# link the example program | |
648 | +AC_DEFUN([_AX_CHECK_GLU_LINK], | |
649 | +[dnl | |
650 | + AC_LANG_PUSH([C]) | |
651 | + _AX_CHECK_GLU_SAVE_FLAGS() | |
652 | + CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
653 | + LIBS="${GLU_LIBS} ${LIBS}" | |
654 | + LDFLAGS="${GLU_LDFLAGS} ${LDFLAGS}" | |
655 | + AC_LINK_IFELSE([_AX_CHECK_GLU_PROGRAM], | |
656 | + [ax_check_glu_link_opengl="yes"], | |
657 | + [ax_check_glu_link_opengl="no"]) | |
658 | + _AX_CHECK_GLU_RESTORE_FLAGS() | |
659 | + AC_LANG_POP([C]) | |
660 | +]) | |
661 | + | |
662 | +# link the example program (cache) | |
663 | +AC_DEFUN([_AX_CHECK_GLU_LINK_CV], | |
664 | +[dnl | |
665 | + AC_CACHE_CHECK([for linking a minimal OpenGL Utility (GLU) program],[ax_cv_check_glu_link_opengl], | |
666 | + [_AX_CHECK_GLU_LINK() | |
667 | + ax_cv_check_glu_link_opengl="${ax_check_glu_link_opengl}"]) | |
668 | + ax_check_glu_link_opengl="${ax_cv_check_glu_link_opengl}" | |
669 | +]) | |
670 | + | |
671 | +dnl Check headers manually (default case) | |
672 | +AC_DEFUN([_AX_CHECK_GLU_HEADERS], | |
673 | +[AC_LANG_PUSH([C]) | |
674 | + _AX_CHECK_GLU_SAVE_FLAGS() | |
675 | + CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
676 | + # see comment in _AX_CHECK_GL_INCLUDES_DEFAULT | |
677 | + AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT]) | |
678 | + AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h], | |
679 | + [ax_check_glu_have_headers="yes";break], | |
680 | + [ax_check_glu_have_headers_headers="no"], | |
681 | + [_AX_CHECK_GLU_INCLUDES_DEFAULT()]) | |
682 | + # do not try darwin specific OpenGl/gl.h | |
683 | + _AX_CHECK_GLU_RESTORE_FLAGS() | |
684 | + AC_LANG_POP([C]) | |
685 | +]) | |
686 | + | |
687 | +# check tesselation callback function signature. | |
688 | +m4_define([_AX_CHECK_GLU_VARARGS_TESSVB_PROGRAM], | |
689 | +[AC_LANG_PROGRAM([[ | |
690 | +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
691 | +# include <windows.h> | |
692 | +# endif | |
693 | +# ifdef HAVE_GL_GLU_H | |
694 | +# include <GL/glu.h> | |
695 | +# elif defined(HAVE_OPENGL_GLU_H) | |
696 | +# include <OpenGL/glu.h> | |
697 | +# else | |
698 | +# error no glu.h | |
699 | +# endif | |
700 | +]], | |
701 | +[[GLvoid (*func)(...); gluTessCallback(0, 0, func)]]) | |
702 | +]) | |
703 | + | |
704 | +# compile the tesselation callback function program | |
705 | +# test with c++ | |
706 | +AC_DEFUN([_AX_CHECK_GLU_COMPILE_VARARGS_TESSVB_PROGRAM], | |
707 | +[AC_REQUIRE([AC_PROG_CXX])dnl | |
708 | + | |
709 | + AC_LANG_PUSH([C++]) | |
710 | + _AX_CHECK_GLU_SAVE_FLAGS() | |
711 | + CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
712 | + AC_COMPILE_IFELSE([_AX_CHECK_GLU_VARARGS_TESSVB_PROGRAM], | |
713 | + [ax_check_glu_compile_varargs_tessvb_program="yes"], | |
714 | + [ax_check_glu_compile_varargs_tessvb_program="no"]) | |
715 | + _AX_CHECK_GLU_RESTORE_FLAGS() | |
716 | + AC_LANG_POP([C++]) | |
717 | +]) | |
718 | + | |
719 | + | |
720 | +# | |
721 | +# Some versions of Mac OS X include a broken interpretation of the GLU | |
722 | +# tesselation callback function signature. | |
723 | +# | |
724 | +AC_DEFUN([_AX_CHECK_GLU_VARARGS_TESSVB], | |
725 | +[ | |
726 | +AC_CACHE_CHECK([for varargs OpenGL Utility (GLU) tesselator callback function type], | |
727 | + [ax_cv_varargs_glu_tesscb], | |
728 | + [_AX_CHECK_GLU_COMPILE_VARARGS_TESSVB_PROGRAM | |
729 | + ax_cv_varargs_glu_tesscb="${ax_check_glu_compile_varargs_tessvb_program}"]) | |
730 | +ax_check_glu_compile_varargs_tessvb_program="${ax_cv_varargs_glu_tesscb}" | |
731 | + | |
732 | +AS_IF([test X$ax_cv_varargs_glu_tesscb = Xyes], | |
733 | + [AC_DEFINE([HAVE_VARARGS_GLU_TESSCB], [1], | |
734 | + [Use nonstandard varargs form for the GLU tesselator callback])]) | |
735 | +]) | |
736 | + | |
737 | + | |
738 | +# dnl try to found library (generic case) | |
739 | +# dnl $1 is set to the library to found | |
740 | +AC_DEFUN([_AX_CHECK_GLU_MANUAL_LIBS_GENERIC], | |
741 | +[dnl | |
742 | + ax_check_glu_manual_libs_generic_extra_libs="$1" | |
743 | + AS_IF([test "X$ax_check_glu_manual_libs_generic_extra_libs" = "X"], | |
744 | + [AC_MSG_ERROR([AX_CHECK_GLU_MANUAL_LIBS_GENERIC argument must no be empty])]) | |
745 | + | |
746 | + AC_LANG_PUSH([C]) | |
747 | + _AX_CHECK_GLU_SAVE_FLAGS() | |
748 | + CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
749 | + LIBS="${GLU_LIBS} ${LIBS}" | |
750 | + AC_SEARCH_LIBS([gluBeginCurve],[$ax_check_glu_manual_libs_generic_extra_libs], | |
751 | + [ax_check_glu_lib_opengl="yes"], | |
752 | + [ax_check_glu_lib_opengl="no"]) | |
753 | + AS_CASE([$ac_cv_search_gluBeginCurve], | |
754 | + ["none required"],[], | |
755 | + [no],[], | |
756 | + [GLU_LIBS="${ac_cv_search_gluBeginCurve} ${GLU_LIBS}"]) | |
757 | + _AX_CHECK_GLU_RESTORE_FLAGS() | |
758 | + AC_LANG_PUSH([C]) | |
759 | +]) | |
760 | + | |
761 | + | |
762 | +dnl Check library manually: subroutine must set | |
763 | +dnl $ax_check_gl_lib_opengl={yes,no} | |
764 | +AC_DEFUN([_AX_CHECK_GLU_MANUAL_LIBS], | |
765 | +[AC_REQUIRE([AC_CANONICAL_HOST]) | |
766 | + GLU_LIBS="${GLU_LIBS} ${GL_LIBS}" | |
767 | + AS_CASE([${host}], | |
768 | + # try first cygwin version | |
769 | + [*-cygwin*],[_AX_CHECK_GLU_MANUAL_LIBS_GENERIC([GLU glu MesaGLU glu32])], | |
770 | + # try first native | |
771 | + [*-mingw*],[_AX_CHECK_GLU_MANUAL_LIBS_GENERIC([glu32 GLU glu MesaGLU])], | |
772 | + [_AX_CHECK_GLU_MANUAL_LIBS_GENERIC([GLU glu MesaGLU])]) | |
773 | + | |
774 | + AC_CACHE_CHECK([for OpenGL Utility (GLU) libraries],[ax_cv_check_glu_lib_opengl], | |
775 | + [ax_cv_check_glu_lib_opengl="${ax_check_glu_lib_opengl}"]) | |
776 | + ax_check_glu_lib_opengl="${ax_cv_check_glu_lib_opengl}" | |
777 | +]) | |
778 | + | |
779 | + | |
780 | +dnl Manual way to detect GLU | |
781 | +AC_DEFUN([_AX_CHECK_GLU_MANUAL], | |
782 | +[dnl | |
783 | + | |
784 | +# inherit cflags | |
785 | +GLU_CFLAGS="${GLU_CFLAGS} ${GL_CFLAGS}" | |
786 | + | |
787 | +# check headers | |
788 | +_AX_CHECK_GLU_HEADERS | |
789 | + | |
790 | +AS_IF([test "X$ax_check_glu_have_headers" = "Xyes"], | |
791 | + [_AX_CHECK_GLU_MANUAL_LIBS], | |
792 | + [ax_check_glu_lib_opengl="no"]) | |
793 | + | |
794 | +AS_IF([test "X$ax_check_glu_lib_opengl" = "Xyes"], | |
795 | + [_AX_CHECK_GLU_COMPILE_CV()], | |
796 | + [ax_cv_check_glu_compile_opengl="no"]) | |
797 | + | |
798 | +AS_IF([test "X$ax_cv_check_glu_compile_opengl" = "Xyes"], | |
799 | + [_AX_CHECK_GLU_LINK_CV()], | |
800 | + [ax_cv_check_glu_link_opengl="no"]) | |
801 | + | |
802 | +AS_IF([test "X$ax_cv_check_glu_link_opengl" = "Xyes"], | |
803 | + [no_glu="no"], | |
804 | + [no_glu="yes"]) | |
805 | +]) | |
806 | + | |
807 | +# detect using pkgconfig | |
808 | +AC_DEFUN([_AX_CHECK_GLU_PKG_CONFIG], | |
809 | +[ | |
810 | + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
811 | + | |
812 | + PKG_CHECK_MODULES([GLU],[glu],[ax_check_glu_pkg_config=yes],[ax_check_glu_pkg_config=no]) | |
813 | + | |
814 | + AS_IF([test "X$ax_check_glu_pkg_config" = "Xyes"],[ | |
815 | + # check headers | |
816 | + AC_LANG_PUSH([C]) | |
817 | + _AX_CHECK_GLU_SAVE_FLAGS() | |
818 | + CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
819 | + AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT]) | |
820 | + AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h], | |
821 | + [ax_check_glu_have_headers="yes";break], | |
822 | + [ax_check_glu_have_headers_headers="no"], | |
823 | + [_AX_CHECK_GLU_INCLUDES_DEFAULT()]) | |
824 | + _AX_CHECK_GL_RESTORE_FLAGS() | |
825 | + AC_LANG_POP([C]) | |
826 | + AC_CACHE_CHECK([for OpenGL Utility (GLU) headers],[ax_cv_check_glu_have_headers], | |
827 | + [ax_cv_check_glu_have_headers="${ax_check_glu_have_headers}"]) | |
828 | + | |
829 | + # pkgconfig library are suposed to work ... | |
830 | + AS_IF([test "X$ax_cv_check_glu_have_headers" = "Xno"], | |
831 | + [AC_MSG_ERROR("Pkgconfig detected OpenGL Utility (GLU) library has no headers!")]) | |
832 | + | |
833 | + _AX_CHECK_GLU_COMPILE_CV() | |
834 | + AS_IF([test "X$ax_cv_check_glu_compile_opengl" = "Xno"], | |
835 | + [AC_MSG_ERROR("Pkgconfig detected OpenGL Utility (GLU) library could not be used for compiling minimal program!")]) | |
836 | + | |
837 | + _AX_CHECK_GLU_LINK_CV() | |
838 | + AS_IF([test "X$ax_cv_check_glu_link_opengl" = "Xno"], | |
839 | + [AC_MSG_ERROR("Pkgconfig detected OpenGL Utility (GLU) library could not be used for linking minimal program!")]) | |
840 | + ]) | |
841 | +]) | |
842 | + | |
843 | +# entry point | |
844 | +AC_DEFUN([AX_CHECK_GLU],dnl | |
845 | +[ | |
846 | + AC_REQUIRE([AX_CHECK_GL]) | |
847 | + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
848 | + | |
849 | + # set flags | |
850 | + no_glu="yes" | |
851 | + | |
852 | + AC_MSG_CHECKING([for a working OpenGL Utility (GLU) implementation by pkg-config]) | |
853 | + # try first pkgconfig | |
854 | + AS_IF([test "X${PKG_CONFIG}" = "X"], | |
855 | + [AC_MSG_RESULT([no]) | |
856 | + ax_check_glu_pkg_config=no], | |
857 | + [AC_MSG_RESULT([yes]) | |
858 | + _AX_CHECK_GLU_PKG_CONFIG()]) | |
859 | + | |
860 | + # if no pkg-config or pkg-config fail try manual way | |
861 | + AS_IF([test "X$ax_check_glu_pkg_config" = "Xno"], | |
862 | + [_AX_CHECK_GLU_MANUAL()], | |
863 | + [no_glu=no]) | |
864 | + | |
865 | + # check broken implementation | |
866 | + AS_IF([test "X$no_glu" = "Xno"], | |
867 | + [_AX_CHECK_GLU_VARARGS_TESSVB],[]) | |
868 | + | |
869 | + AC_MSG_CHECKING([for a working OpenGL Utility (GLU) implementation]) | |
870 | + AS_IF([test "X$no_glu" = "Xno"], | |
871 | + [AC_MSG_RESULT([yes]) | |
872 | + AC_MSG_CHECKING([for CFLAGS needed for OpenGL Utility (GLU)]) | |
873 | + AC_MSG_RESULT(["${GLU_CFLAGS}"]) | |
874 | + AC_MSG_CHECKING([for LIBS needed for OpenGL Utility (GLU)]) | |
875 | + AC_MSG_RESULT(["${GLU_LIBS}"]) | |
876 | + AC_MSG_CHECKING([for LDFLAGS needed for OpenGL Utility (GLU)]) | |
877 | + AC_MSG_RESULT(["${GLU_LDFLAGS}"])], | |
878 | + [AC_MSG_RESULT([no]) | |
879 | + GLU_CFLAGS="" | |
880 | + GLU_LIBS="" | |
881 | + GLU_LDFLAGS=""]) | |
882 | + | |
883 | + AC_SUBST([GLU_CFLAGS]) | |
884 | + AC_SUBST([GLU_LIBS]) | |
885 | + AC_SUBST([GLU_LDFLAGS]) | |
886 | + | |
887 | +]) | |
888 | + | |
889 | +# =========================================================================== | |
890 | +# http://www.gnu.org/software/autoconf-archive/ax_check_glut.html | |
891 | +# =========================================================================== | |
892 | +# | |
893 | +# SYNOPSIS | |
894 | +# | |
895 | +# AX_CHECK_GLUT | |
896 | +# | |
897 | +# DESCRIPTION | |
898 | +# | |
899 | +# Check for GLUT. If GLUT is found, the required compiler and linker flags | |
900 | +# are included in the output variables "GLUT_CFLAGS" and "GLUT_LIBS", | |
901 | +# respectively. If GLUT is not found, "no_glut" is set to "yes". | |
902 | +# | |
903 | +# If the header "GL/glut.h" is found, "HAVE_GL_GLUT_H" is defined. If the | |
904 | +# header "GLUT/glut.h" is found, HAVE_GLUT_GLUT_H is defined. These | |
905 | +# preprocessor definitions may not be mutually exclusive. | |
906 | +# | |
907 | +# You should use something like this in your headers: | |
908 | +# | |
909 | +# # if HAVE_WINDOWS_H && defined(_WIN32) | |
910 | +# # include <windows.h> | |
911 | +# # endif | |
912 | +# # if defined(HAVE_GL_GLUT_H) | |
913 | +# # include <GL/glut.h> | |
914 | +# # elif defined(HAVE_GLUT_GLUT_H) | |
915 | +# # include <GLUT/glut.h> | |
916 | +# # else | |
917 | +# # error no glut.h | |
918 | +# # endif | |
919 | +# | |
920 | +# LICENSE | |
921 | +# | |
922 | +# Copyright (c) 2009 Braden McDaniel <braden@endoframe.com> | |
923 | +# Copyright (c) 2013 Bastien Roucaries <roucaries.bastien+autoconf@gmail.com> | |
924 | +# | |
925 | +# This program is free software; you can redistribute it and/or modify it | |
926 | +# under the terms of the GNU General Public License as published by the | |
927 | +# Free Software Foundation; either version 2 of the License, or (at your | |
928 | +# option) any later version. | |
929 | +# | |
930 | +# This program is distributed in the hope that it will be useful, but | |
931 | +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
932 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
933 | +# Public License for more details. | |
934 | +# | |
935 | +# You should have received a copy of the GNU General Public License along | |
936 | +# with this program. If not, see <http://www.gnu.org/licenses/>. | |
937 | +# | |
938 | +# As a special exception, the respective Autoconf Macro's copyright owner | |
939 | +# gives unlimited permission to copy, distribute and modify the configure | |
940 | +# scripts that are the output of Autoconf when processing the Macro. You | |
941 | +# need not follow the terms of the GNU General Public License when using | |
942 | +# or distributing such scripts, even though portions of the text of the | |
943 | +# Macro appear in them. The GNU General Public License (GPL) does govern | |
944 | +# all other use of the material that constitutes the Autoconf Macro. | |
945 | +# | |
946 | +# This special exception to the GPL applies to versions of the Autoconf | |
947 | +# Macro released by the Autoconf Archive. When you make and distribute a | |
948 | +# modified version of the Autoconf Macro, you may extend this special | |
949 | +# exception to the GPL to apply to your modified version as well. | |
950 | + | |
951 | +#serial 13 | |
952 | + | |
953 | +dnl local save flags | |
954 | +AC_DEFUN([_AX_CHECK_GLUT_SAVE_FLAGS], | |
955 | +[dnl | |
956 | +ax_check_glut_saved_libs="${LIBS}" | |
957 | +ax_check_glut_saved_cflags="${CFLAGS}" | |
958 | +ax_check_glut_saved_cppflags="${CPPFLAGS}" | |
959 | +ax_check_glut_saved_ldflags="${LDFLAGS}" | |
960 | +]) | |
961 | + | |
962 | + | |
963 | +dnl local restore flags | |
964 | +AC_DEFUN([_AX_CHECK_GLUT_RESTORE_FLAGS], | |
965 | +[dnl | |
966 | +LIBS="${ax_check_glut_saved_libs}" | |
967 | +CFLAGS="${ax_check_glut_saved_cflags}" | |
968 | +CPPFLAGS="${ax_check_glut_saved_cppflags}" | |
969 | +LDFLAGS="${ax_check_glut_saved_ldflags}" | |
970 | +]) | |
971 | + | |
972 | +dnl Default include : add windows.h | |
973 | +dnl see http://www.opengl.org/wiki/Platform_specifics:_Windows | |
974 | +dnl (acceded 20120801) | |
975 | +AC_DEFUN([_AX_CHECK_GLUT_INCLUDES_DEFAULT],dnl | |
976 | +[ | |
977 | + AC_INCLUDES_DEFAULT | |
978 | + [ | |
979 | + # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
980 | + # include <windows.h> | |
981 | + # endif | |
982 | + ] | |
983 | +]) | |
984 | + | |
985 | +m4_define([_AX_CHECK_GLUT_PROGRAM], | |
986 | + [AC_LANG_PROGRAM([[ | |
987 | +# if HAVE_WINDOWS_H && defined(_WIN32) | |
988 | +# include <windows.h> | |
989 | +# endif | |
990 | +# ifdef HAVE_GL_GLUT_H | |
991 | +# include <GL/glut.h> | |
992 | +# elif defined(HAVE_GLUT_GLUT_H) | |
993 | +# include <GLUT/glut.h> | |
994 | +# else | |
995 | +# error no glut.h | |
996 | +# endif]], | |
997 | +[[glutMainLoop()]])]) | |
998 | + | |
999 | + | |
1000 | +dnl Check headers manually (default case) | |
1001 | +AC_DEFUN([_AX_CHECK_GLUT_HEADERS], | |
1002 | +[AC_LANG_PUSH([C]) | |
1003 | + _AX_CHECK_GLUT_SAVE_FLAGS() | |
1004 | + CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
1005 | + # see comment in _AX_CHECK_GL_INCLUDES_DEFAULT | |
1006 | + AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT]) | |
1007 | + AC_CHECK_HEADERS([GL/glut.h OpenGL/glut.h], | |
1008 | + [ax_check_glut_have_headers="yes";break], | |
1009 | + [ax_check_glut_have_headers_headers="no"], | |
1010 | + [_AX_CHECK_GLUT_INCLUDES_DEFAULT()]) | |
1011 | + # do not try darwin specific OpenGl/gl.h | |
1012 | + _AX_CHECK_GLUT_RESTORE_FLAGS() | |
1013 | + AC_LANG_POP([C]) | |
1014 | +]) | |
1015 | + | |
1016 | +# dnl try to found library (generic case) | |
1017 | +# dnl $1 is set to the library to found | |
1018 | +AC_DEFUN([_AX_CHECK_GLUT_MANUAL_LIBS_GENERIC], | |
1019 | +[dnl | |
1020 | + ax_check_glut_manual_libs_generic_extra_libs="$1" | |
1021 | + AS_IF([test "X$ax_check_glut_manual_libs_generic_extra_libs" = "X"], | |
1022 | + [AC_MSG_ERROR([AX_CHECK_GLUT_MANUAL_LIBS_GENERIC argument must no be empty])]) | |
1023 | + | |
1024 | + AC_LANG_PUSH([C]) | |
1025 | + _AX_CHECK_GLUT_SAVE_FLAGS() | |
1026 | + CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
1027 | + LIBS="${GLUT_LIBS} ${LIBS}" | |
1028 | + AC_SEARCH_LIBS([glutMainLoop],[$ax_check_glut_manual_libs_generic_extra_libs], | |
1029 | + [ax_check_glut_lib_opengl="yes"], | |
1030 | + [ax_check_glut_lib_opengl="no"]) | |
1031 | + AS_CASE([$ac_cv_search_glutMainLoop], | |
1032 | + ["none required"],[], | |
1033 | + [no],[], | |
1034 | + [GLUT_LIBS="${ac_cv_search_glutMainLoop} ${GLU_LIBS}"]) | |
1035 | + _AX_CHECK_GLUT_RESTORE_FLAGS() | |
1036 | + AC_LANG_PUSH([C]) | |
1037 | +]) | |
1038 | + | |
1039 | + | |
1040 | +dnl Check library manually: subroutine must set | |
1041 | +dnl $ax_check_glut_lib_opengl={yes,no} | |
1042 | +dnl for windows part see | |
1043 | +dnl - http://www.transmissionzero.co.uk/computing/using-glut-with-mingw/ | |
1044 | +dnl - http://user.xmission.com/~nate/glut.html | |
1045 | +AC_DEFUN([_AX_CHECK_GLUT_MANUAL_LIBS], | |
1046 | +[AC_REQUIRE([AC_CANONICAL_HOST]) | |
1047 | + GLUT_LIBS="${GLUT_LIBS} ${GLU_LIBS}" | |
1048 | + AS_CASE([${host}], | |
1049 | + # try first cygwin version | |
1050 | + [*-cygwin*],[_AX_CHECK_GLUT_MANUAL_LIBS_GENERIC([GLUT glut MesaGLUT freeglut freeglut32 glut32])], | |
1051 | + # try first native | |
1052 | + [*-mingw*],[_AX_CHECK_GLUT_MANUAL_LIBS_GENERIC([glut32 GLUT glut MesaGLUT freeglut freeglut32])], | |
1053 | + [_AX_CHECK_GLUT_MANUAL_LIBS_GENERIC([GLUT glut freeglut MesaGLUT])]) | |
1054 | + | |
1055 | + AC_CACHE_CHECK([for OpenGL Utility Toolkit (GLUT) libraries],[ax_cv_check_glut_lib_opengl], | |
1056 | + [ax_cv_check_glut_lib_opengl="${ax_check_glut_lib_opengl}"]) | |
1057 | + ax_check_glut_lib_opengl="${ax_cv_check_glut_lib_opengl}" | |
1058 | +]) | |
1059 | + | |
1060 | +# compile the example program | |
1061 | +AC_DEFUN([_AX_CHECK_GLUT_COMPILE], | |
1062 | +[dnl | |
1063 | + AC_LANG_PUSH([C]) | |
1064 | + _AX_CHECK_GLUT_SAVE_FLAGS() | |
1065 | + CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
1066 | + AC_COMPILE_IFELSE([_AX_CHECK_GLUT_PROGRAM], | |
1067 | + [ax_check_glut_compile_opengl="yes"], | |
1068 | + [ax_check_glut_compile_opengl="no"]) | |
1069 | + _AX_CHECK_GLUT_RESTORE_FLAGS() | |
1070 | + AC_LANG_POP([C]) | |
1071 | +]) | |
1072 | + | |
1073 | +# compile the example program (cache) | |
1074 | +AC_DEFUN([_AX_CHECK_GLUT_COMPILE_CV], | |
1075 | +[dnl | |
1076 | + AC_CACHE_CHECK([for compiling a minimal OpenGL Utility Toolkit (GLUT) program],[ax_cv_check_glut_compile_opengl], | |
1077 | + [_AX_CHECK_GLUT_COMPILE() | |
1078 | + ax_cv_check_glut_compile_opengl="${ax_check_glut_compile_opengl}"]) | |
1079 | + ax_check_glut_compile_opengl="${ax_cv_check_glut_compile_opengl}" | |
1080 | +]) | |
1081 | + | |
1082 | +# link the example program | |
1083 | +AC_DEFUN([_AX_CHECK_GLUT_LINK], | |
1084 | +[dnl | |
1085 | + AC_LANG_PUSH([C]) | |
1086 | + _AX_CHECK_GLUT_SAVE_FLAGS() | |
1087 | + CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
1088 | + LIBS="${GLUT_LIBS} ${LIBS}" | |
1089 | + LDFLAGS="${GLUT_LDFLAGS} ${LDFLAGS}" | |
1090 | + AC_LINK_IFELSE([_AX_CHECK_GLUT_PROGRAM], | |
1091 | + [ax_check_glut_link_opengl="yes"], | |
1092 | + [ax_check_glut_link_opengl="no"]) | |
1093 | + _AX_CHECK_GLUT_RESTORE_FLAGS() | |
1094 | + AC_LANG_POP([C]) | |
1095 | +]) | |
1096 | + | |
1097 | +# link the example program (cache) | |
1098 | +AC_DEFUN([_AX_CHECK_GLUT_LINK_CV], | |
1099 | +[dnl | |
1100 | + AC_CACHE_CHECK([for linking a minimal OpenGL Utility Toolkit (GLUT) program],[ax_cv_check_glut_link_opengl], | |
1101 | + [_AX_CHECK_GLUT_LINK() | |
1102 | + ax_cv_check_glut_link_opengl="${ax_check_glut_link_opengl}"]) | |
1103 | + ax_check_glut_link_opengl="${ax_cv_check_glut_link_opengl}" | |
1104 | +]) | |
1105 | + | |
1106 | + | |
1107 | +# manually check GLUT | |
1108 | +AC_DEFUN([_AX_CHECK_GLUT_MANUAL],dnl | |
1109 | +[ | |
1110 | +GLUT_CFLAGS="${GLUT_CFLAGS} ${GLU_CFLAGS}" | |
1111 | +_AX_CHECK_GLUT_HEADERS | |
1112 | + | |
1113 | +AS_IF([test "X$ax_check_glut_have_headers" = "Xyes"], | |
1114 | + [_AX_CHECK_GLUT_MANUAL_LIBS], | |
1115 | + [ax_check_glut_lib="no"]) | |
1116 | + | |
1117 | +AS_IF([test "X$ax_check_glut_lib_opengl" = "Xyes"], | |
1118 | + [_AX_CHECK_GLUT_COMPILE_CV()], | |
1119 | + [ax_cv_check_glut_compile_opengl="no"]) | |
1120 | + | |
1121 | +AS_IF([test "X$ax_cv_check_glut_compile_opengl" = "Xyes"], | |
1122 | + [_AX_CHECK_GLUT_LINK_CV()], | |
1123 | + [ax_cv_check_glut_link_opengl="no"]) | |
1124 | + | |
1125 | +AS_IF([test "X$ax_cv_check_glut_link_opengl" = "Xyes"], | |
1126 | + [no_glut="no"], | |
1127 | + [no_glut="yes"]) | |
1128 | +]) | |
1129 | + | |
1130 | + | |
1131 | +# main entry point | |
1132 | +AC_DEFUN([AX_CHECK_GLUT], | |
1133 | +[dnl | |
1134 | + AC_REQUIRE([AX_CHECK_GL])dnl | |
1135 | + AC_REQUIRE([AX_CHECK_GLU])dnl | |
1136 | + | |
1137 | + _AX_CHECK_GLUT_MANUAL | |
1138 | + | |
1139 | + AC_MSG_CHECKING([for a working OpenGL Utility Toolkit (GLUT) implementation]) | |
1140 | + AS_IF([test "X$no_glut" = "Xno"], | |
1141 | + [AC_MSG_RESULT([yes]) | |
1142 | + AC_MSG_CHECKING([for CFLAGS needed for OpenGL Utility Toolkit (GLUT)]) | |
1143 | + AC_MSG_RESULT(["${GLUT_CFLAGS}"]) | |
1144 | + AC_MSG_CHECKING([for LIBS needed for OpenGL Utility Toolkit (GLUT)]) | |
1145 | + AC_MSG_RESULT(["${GLUT_LIBS}"]) | |
1146 | + AC_MSG_CHECKING([for LDFLAGS needed for OpenGL Utility Toolkit (GLUT)]) | |
1147 | + AC_MSG_RESULT(["${GLUT_LDFLAGS}"])], | |
1148 | + [AC_MSG_RESULT([no]) | |
1149 | + GLUT_CFLAGS="" | |
1150 | + GLUT_LIBS="" | |
1151 | + GLUT_LDFLAGS=""]) | |
1152 | + | |
1153 | + AC_SUBST([GLUT_CFLAGS]) | |
1154 | + AC_SUBST([GLUT_LIBS]) | |
1155 | + AC_SUBST([GLUT_LDFLAGS]) | |
1156 | +]) | |
1157 | + | |
1158 | +# =========================================================================== | |
1159 | +# http://www.gnu.org/software/autoconf-archive/ax_openmp.html | |
1160 | +# =========================================================================== | |
1161 | +# | |
1162 | +# SYNOPSIS | |
1163 | +# | |
1164 | +# AX_OPENMP([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | |
1165 | +# | |
1166 | +# DESCRIPTION | |
1167 | +# | |
1168 | +# This macro tries to find out how to compile programs that use OpenMP a | |
1169 | +# standard API and set of compiler directives for parallel programming | |
1170 | +# (see http://www-unix.mcs/) | |
1171 | +# | |
1172 | +# On success, it sets the OPENMP_CFLAGS/OPENMP_CXXFLAGS/OPENMP_F77FLAGS | |
1173 | +# output variable to the flag (e.g. -omp) used both to compile *and* link | |
1174 | +# OpenMP programs in the current language. | |
1175 | +# | |
1176 | +# NOTE: You are assumed to not only compile your program with these flags, | |
1177 | +# but also link it with them as well. | |
1178 | +# | |
1179 | +# If you want to compile everything with OpenMP, you should set: | |
1180 | +# | |
1181 | +# CFLAGS="$CFLAGS $OPENMP_CFLAGS" | |
1182 | +# #OR# CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS" | |
1183 | +# #OR# FFLAGS="$FFLAGS $OPENMP_FFLAGS" | |
1184 | +# | |
1185 | +# (depending on the selected language). | |
1186 | +# | |
1187 | +# The user can override the default choice by setting the corresponding | |
1188 | +# environment variable (e.g. OPENMP_CFLAGS). | |
1189 | +# | |
1190 | +# ACTION-IF-FOUND is a list of shell commands to run if an OpenMP flag is | |
1191 | +# found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it is | |
1192 | +# not found. If ACTION-IF-FOUND is not specified, the default action will | |
1193 | +# define HAVE_OPENMP. | |
1194 | +# | |
1195 | +# LICENSE | |
1196 | +# | |
1197 | +# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> | |
1198 | +# | |
1199 | +# This program is free software: you can redistribute it and/or modify it | |
1200 | +# under the terms of the GNU General Public License as published by the | |
1201 | +# Free Software Foundation, either version 3 of the License, or (at your | |
1202 | +# option) any later version. | |
1203 | +# | |
1204 | +# This program is distributed in the hope that it will be useful, but | |
1205 | +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
1206 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
1207 | +# Public License for more details. | |
1208 | +# | |
1209 | +# You should have received a copy of the GNU General Public License along | |
1210 | +# with this program. If not, see <http://www.gnu.org/licenses/>. | |
1211 | +# | |
1212 | +# As a special exception, the respective Autoconf Macro's copyright owner | |
1213 | +# gives unlimited permission to copy, distribute and modify the configure | |
1214 | +# scripts that are the output of Autoconf when processing the Macro. You | |
1215 | +# need not follow the terms of the GNU General Public License when using | |
1216 | +# or distributing such scripts, even though portions of the text of the | |
1217 | +# Macro appear in them. The GNU General Public License (GPL) does govern | |
1218 | +# all other use of the material that constitutes the Autoconf Macro. | |
1219 | +# | |
1220 | +# This special exception to the GPL applies to versions of the Autoconf | |
1221 | +# Macro released by the Autoconf Archive. When you make and distribute a | |
1222 | +# modified version of the Autoconf Macro, you may extend this special | |
1223 | +# exception to the GPL to apply to your modified version as well. | |
1224 | + | |
1225 | +#serial 9 | |
1226 | + | |
1227 | +AC_DEFUN([AX_OPENMP], [ | |
1228 | +AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX | |
1229 | + | |
1230 | +AC_CACHE_CHECK([for OpenMP flag of _AC_LANG compiler], ax_cv_[]_AC_LANG_ABBREV[]_openmp, [save[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS | |
1231 | +ax_cv_[]_AC_LANG_ABBREV[]_openmp=unknown | |
1232 | +# Flags to try: -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI), | |
1233 | +# -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX), none | |
1234 | +ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp none" | |
1235 | +if test "x$OPENMP_[]_AC_LANG_PREFIX[]FLAGS" != x; then | |
1236 | + ax_openmp_flags="$OPENMP_[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flags" | |
1237 | +fi | |
1238 | +for ax_openmp_flag in $ax_openmp_flags; do | |
1239 | + case $ax_openmp_flag in | |
1240 | + none) []_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[] ;; | |
1241 | + *) []_AC_LANG_PREFIX[]FLAGS="$save[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flag" ;; | |
1242 | + esac | |
1243 | + AC_TRY_LINK([#ifdef __cplusplus | |
1244 | +extern "C" | |
1245 | +#endif | |
1246 | +void omp_set_num_threads(int);], [const int N = 100000; | |
1247 | + int i, arr[N]; | |
1248 | + | |
1249 | + omp_set_num_threads(2); | |
1250 | + | |
1251 | + #pragma omp parallel for | |
1252 | + for (i = 0; i < N; i++) { | |
1253 | + arr[i] = i; | |
1254 | + }], [ax_cv_[]_AC_LANG_ABBREV[]_openmp=$ax_openmp_flag; break]) | |
1255 | +done | |
1256 | +[]_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[]FLAGS | |
1257 | +]) | |
1258 | +if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" = "xunknown"; then | |
1259 | + m4_default([$2],:) | |
1260 | +else | |
1261 | + if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" != "xnone"; then | |
1262 | + OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ax_cv_[]_AC_LANG_ABBREV[]_openmp | |
1263 | + fi | |
1264 | + m4_default([$1], [AC_DEFINE(HAVE_OPENMP,1,[Define if OpenMP is enabled])]) | |
1265 | +fi | |
1266 | +])dnl AX_OPENMP | |
1267 | + | |
1268 | +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | |
1269 | +# serial 1 (pkg-config-0.24) | |
1270 | +# | |
1271 | +# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | |
1272 | +# | |
1273 | +# This program is free software; you can redistribute it and/or modify | |
1274 | +# it under the terms of the GNU General Public License as published by | |
1275 | +# the Free Software Foundation; either version 2 of the License, or | |
1276 | +# (at your option) any later version. | |
1277 | +# | |
1278 | +# This program is distributed in the hope that it will be useful, but | |
1279 | +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
1280 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
1281 | +# General Public License for more details. | |
1282 | +# | |
1283 | +# You should have received a copy of the GNU General Public License | |
1284 | +# along with this program; if not, write to the Free Software | |
1285 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
1286 | +# | |
1287 | +# As a special exception to the GNU General Public License, if you | |
1288 | +# distribute this file as part of a program that contains a | |
1289 | +# configuration script generated by Autoconf, you may include it under | |
1290 | +# the same distribution terms that you use for the rest of that program. | |
1291 | + | |
1292 | +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) | |
1293 | +# ---------------------------------- | |
1294 | +AC_DEFUN([PKG_PROG_PKG_CONFIG], | |
1295 | +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) | |
1296 | +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) | |
1297 | +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) | |
1298 | +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) | |
1299 | +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) | |
1300 | +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) | |
1301 | + | |
1302 | +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
1303 | + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) | |
1304 | +fi | |
1305 | +if test -n "$PKG_CONFIG"; then | |
1306 | + _pkg_min_version=m4_default([$1], [0.9.0]) | |
1307 | + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) | |
1308 | + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
1309 | + AC_MSG_RESULT([yes]) | |
1310 | + else | |
1311 | + AC_MSG_RESULT([no]) | |
1312 | + PKG_CONFIG="" | |
1313 | + fi | |
1314 | +fi[]dnl | |
1315 | +])# PKG_PROG_PKG_CONFIG | |
1316 | + | |
1317 | +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | |
1318 | +# | |
1319 | +# Check to see whether a particular set of modules exists. Similar | |
1320 | +# to PKG_CHECK_MODULES(), but does not set variables or print errors. | |
1321 | +# | |
1322 | +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
1323 | +# only at the first occurence in configure.ac, so if the first place | |
1324 | +# it's called might be skipped (such as if it is within an "if", you | |
1325 | +# have to call PKG_CHECK_EXISTS manually | |
1326 | +# -------------------------------------------------------------- | |
1327 | +AC_DEFUN([PKG_CHECK_EXISTS], | |
1328 | +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | |
1329 | +if test -n "$PKG_CONFIG" && \ | |
1330 | + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then | |
1331 | + m4_default([$2], [:]) | |
1332 | +m4_ifvaln([$3], [else | |
1333 | + $3])dnl | |
1334 | +fi]) | |
1335 | + | |
1336 | +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) | |
1337 | +# --------------------------------------------- | |
1338 | +m4_define([_PKG_CONFIG], | |
1339 | +[if test -n "$$1"; then | |
1340 | + pkg_cv_[]$1="$$1" | |
1341 | + elif test -n "$PKG_CONFIG"; then | |
1342 | + PKG_CHECK_EXISTS([$3], | |
1343 | + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` | |
1344 | + test "x$?" != "x0" && pkg_failed=yes ], | |
1345 | + [pkg_failed=yes]) | |
1346 | + else | |
1347 | + pkg_failed=untried | |
1348 | +fi[]dnl | |
1349 | +])# _PKG_CONFIG | |
1350 | + | |
1351 | +# _PKG_SHORT_ERRORS_SUPPORTED | |
1352 | +# ----------------------------- | |
1353 | +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], | |
1354 | +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
1355 | +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
1356 | + _pkg_short_errors_supported=yes | |
1357 | +else | |
1358 | + _pkg_short_errors_supported=no | |
1359 | +fi[]dnl | |
1360 | +])# _PKG_SHORT_ERRORS_SUPPORTED | |
1361 | + | |
1362 | + | |
1363 | +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | |
1364 | +# [ACTION-IF-NOT-FOUND]) | |
1365 | +# | |
1366 | +# | |
1367 | +# Note that if there is a possibility the first call to | |
1368 | +# PKG_CHECK_MODULES might not happen, you should be sure to include an | |
1369 | +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac | |
1370 | +# | |
1371 | +# | |
1372 | +# -------------------------------------------------------------- | |
1373 | +AC_DEFUN([PKG_CHECK_MODULES], | |
1374 | +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | |
1375 | +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | |
1376 | +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl | |
1377 | + | |
1378 | +pkg_failed=no | |
1379 | +AC_MSG_CHECKING([for $1]) | |
1380 | + | |
1381 | +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | |
1382 | +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) | |
1383 | + | |
1384 | +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS | |
1385 | +and $1[]_LIBS to avoid the need to call pkg-config. | |
1386 | +See the pkg-config man page for more details.]) | |
1387 | + | |
1388 | +if test $pkg_failed = yes; then | |
1389 | + AC_MSG_RESULT([no]) | |
1390 | + _PKG_SHORT_ERRORS_SUPPORTED | |
1391 | + if test $_pkg_short_errors_supported = yes; then | |
1392 | + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` | |
1393 | + else | |
1394 | + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` | |
1395 | + fi | |
1396 | + # Put the nasty error message in config.log where it belongs | |
1397 | + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD | |
1398 | + | |
1399 | + m4_default([$4], [AC_MSG_ERROR( | |
1400 | +[Package requirements ($2) were not met: | |
1401 | + | |
1402 | +$$1_PKG_ERRORS | |
1403 | + | |
1404 | +Consider adjusting the PKG_CONFIG_PATH environment variable if you | |
1405 | +installed software in a non-standard prefix. | |
1406 | + | |
1407 | +_PKG_TEXT])[]dnl | |
1408 | + ]) | |
1409 | +elif test $pkg_failed = untried; then | |
1410 | + AC_MSG_RESULT([no]) | |
1411 | + m4_default([$4], [AC_MSG_FAILURE( | |
1412 | +[The pkg-config script could not be found or is too old. Make sure it | |
1413 | +is in your PATH or set the PKG_CONFIG environment variable to the full | |
1414 | +path to pkg-config. | |
1415 | + | |
1416 | +_PKG_TEXT | |
1417 | + | |
1418 | +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl | |
1419 | + ]) | |
1420 | +else | |
1421 | + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS | |
1422 | + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS | |
1423 | + AC_MSG_RESULT([yes]) | |
1424 | + $3 | |
1425 | +fi[]dnl | |
1426 | +])# PKG_CHECK_MODULES | |
1427 | + | |
1428 | +# Copyright (C) 2002-2013 Free Software Foundation, Inc. | |
1429 | +# | |
1430 | +# This file is free software; the Free Software Foundation | |
1431 | +# gives unlimited permission to copy and/or distribute it, | |
1432 | +# with or without modifications, as long as this notice is preserved. | |
1433 | + | |
1434 | +# AM_AUTOMAKE_VERSION(VERSION) | |
1435 | +# ---------------------------- | |
1436 | +# Automake X.Y traces this macro to ensure aclocal.m4 has been | |
1437 | +# generated from the m4 files accompanying Automake X.Y. | |
1438 | +# (This private macro should not be called outside this file.) | |
1439 | +AC_DEFUN([AM_AUTOMAKE_VERSION], | |
1440 | +[am__api_version='1.14' | |
1441 | +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to | |
1442 | +dnl require some minimum version. Point them to the right macro. | |
1443 | +m4_if([$1], [1.14.1], [], | |
1444 | + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl | |
1445 | +]) | |
1446 | + | |
1447 | +# _AM_AUTOCONF_VERSION(VERSION) | |
1448 | +# ----------------------------- | |
1449 | +# aclocal traces this macro to find the Autoconf version. | |
1450 | +# This is a private macro too. Using m4_define simplifies | |
1451 | +# the logic in aclocal, which can simply ignore this definition. | |
1452 | +m4_define([_AM_AUTOCONF_VERSION], []) | |
1453 | + | |
1454 | +# AM_SET_CURRENT_AUTOMAKE_VERSION | |
1455 | +# ------------------------------- | |
1456 | +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. | |
1457 | +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. | |
1458 | +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | |
1459 | +[AM_AUTOMAKE_VERSION([1.14.1])dnl | |
1460 | +m4_ifndef([AC_AUTOCONF_VERSION], | |
1461 | + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | |
1462 | +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) | |
1463 | + | |
1464 | +# AM_AUX_DIR_EXPAND -*- Autoconf -*- | |
1465 | + | |
1466 | +# Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
1467 | +# | |
1468 | +# This file is free software; the Free Software Foundation | |
1469 | +# gives unlimited permission to copy and/or distribute it, | |
1470 | +# with or without modifications, as long as this notice is preserved. | |
1471 | + | |
1472 | +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets | |
1473 | +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to | |
1474 | +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. | |
1475 | +# | |
1476 | +# Of course, Automake must honor this variable whenever it calls a | |
1477 | +# tool from the auxiliary directory. The problem is that $srcdir (and | |
1478 | +# therefore $ac_aux_dir as well) can be either absolute or relative, | |
1479 | +# depending on how configure is run. This is pretty annoying, since | |
1480 | +# it makes $ac_aux_dir quite unusable in subdirectories: in the top | |
1481 | +# source directory, any form will work fine, but in subdirectories a | |
1482 | +# relative path needs to be adjusted first. | |
1483 | +# | |
1484 | +# $ac_aux_dir/missing | |
1485 | +# fails when called from a subdirectory if $ac_aux_dir is relative | |
1486 | +# $top_srcdir/$ac_aux_dir/missing | |
1487 | +# fails if $ac_aux_dir is absolute, | |
1488 | +# fails when called from a subdirectory in a VPATH build with | |
1489 | +# a relative $ac_aux_dir | |
1490 | +# | |
1491 | +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir | |
1492 | +# are both prefixed by $srcdir. In an in-source build this is usually | |
1493 | +# harmless because $srcdir is '.', but things will broke when you | |
1494 | +# start a VPATH build or use an absolute $srcdir. | |
1495 | +# | |
1496 | +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, | |
1497 | +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: | |
1498 | +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` | |
1499 | +# and then we would define $MISSING as | |
1500 | +# MISSING="\${SHELL} $am_aux_dir/missing" | |
1501 | +# This will work as long as MISSING is not called from configure, because | |
1502 | +# unfortunately $(top_srcdir) has no meaning in configure. | |
1503 | +# However there are other variables, like CC, which are often used in | |
1504 | +# configure, and could therefore not use this "fixed" $ac_aux_dir. | |
1505 | +# | |
1506 | +# Another solution, used here, is to always expand $ac_aux_dir to an | |
1507 | +# absolute PATH. The drawback is that using absolute paths prevent a | |
1508 | +# configured tree to be moved without reconfiguration. | |
1509 | + | |
1510 | +AC_DEFUN([AM_AUX_DIR_EXPAND], | |
1511 | +[dnl Rely on autoconf to set up CDPATH properly. | |
1512 | +AC_PREREQ([2.50])dnl | |
1513 | +# expand $ac_aux_dir to an absolute path | |
1514 | +am_aux_dir=`cd $ac_aux_dir && pwd` | |
1515 | +]) | |
1516 | + | |
1517 | +# AM_CONDITIONAL -*- Autoconf -*- | |
1518 | + | |
1519 | +# Copyright (C) 1997-2013 Free Software Foundation, Inc. | |
1520 | +# | |
1521 | +# This file is free software; the Free Software Foundation | |
1522 | +# gives unlimited permission to copy and/or distribute it, | |
1523 | +# with or without modifications, as long as this notice is preserved. | |
1524 | + | |
1525 | +# AM_CONDITIONAL(NAME, SHELL-CONDITION) | |
1526 | +# ------------------------------------- | |
1527 | +# Define a conditional. | |
1528 | +AC_DEFUN([AM_CONDITIONAL], | |
1529 | +[AC_PREREQ([2.52])dnl | |
1530 | + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], | |
1531 | + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl | |
1532 | +AC_SUBST([$1_TRUE])dnl | |
1533 | +AC_SUBST([$1_FALSE])dnl | |
1534 | +_AM_SUBST_NOTMAKE([$1_TRUE])dnl | |
1535 | +_AM_SUBST_NOTMAKE([$1_FALSE])dnl | |
1536 | +m4_define([_AM_COND_VALUE_$1], [$2])dnl | |
1537 | +if $2; then | |
1538 | + $1_TRUE= | |
1539 | + $1_FALSE='#' | |
1540 | +else | |
1541 | + $1_TRUE='#' | |
1542 | + $1_FALSE= | |
1543 | +fi | |
1544 | +AC_CONFIG_COMMANDS_PRE( | |
1545 | +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then | |
1546 | + AC_MSG_ERROR([[conditional "$1" was never defined. | |
1547 | +Usually this means the macro was only invoked conditionally.]]) | |
1548 | +fi])]) | |
1549 | + | |
1550 | +# Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
1551 | +# | |
1552 | +# This file is free software; the Free Software Foundation | |
1553 | +# gives unlimited permission to copy and/or distribute it, | |
1554 | +# with or without modifications, as long as this notice is preserved. | |
1555 | + | |
1556 | + | |
1557 | +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be | |
1558 | +# written in clear, in which case automake, when reading aclocal.m4, | |
1559 | +# will think it sees a *use*, and therefore will trigger all it's | |
1560 | +# C support machinery. Also note that it means that autoscan, seeing | |
1561 | +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... | |
1562 | + | |
1563 | + | |
1564 | +# _AM_DEPENDENCIES(NAME) | |
1565 | +# ---------------------- | |
1566 | +# See how the compiler implements dependency checking. | |
1567 | +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". | |
1568 | +# We try a few techniques and use that to set a single cache variable. | |
1569 | +# | |
1570 | +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was | |
1571 | +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular | |
1572 | +# dependency, and given that the user is not expected to run this macro, | |
1573 | +# just rely on AC_PROG_CC. | |
1574 | +AC_DEFUN([_AM_DEPENDENCIES], | |
1575 | +[AC_REQUIRE([AM_SET_DEPDIR])dnl | |
1576 | +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl | |
1577 | +AC_REQUIRE([AM_MAKE_INCLUDE])dnl | |
1578 | +AC_REQUIRE([AM_DEP_TRACK])dnl | |
1579 | + | |
1580 | +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], | |
1581 | + [$1], [CXX], [depcc="$CXX" am_compiler_list=], | |
1582 | + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], | |
1583 | + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], | |
1584 | + [$1], [UPC], [depcc="$UPC" am_compiler_list=], | |
1585 | + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], | |
1586 | + [depcc="$$1" am_compiler_list=]) | |
1587 | + | |
1588 | +AC_CACHE_CHECK([dependency style of $depcc], | |
1589 | + [am_cv_$1_dependencies_compiler_type], | |
1590 | +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
1591 | + # We make a subdir and do the tests there. Otherwise we can end up | |
1592 | + # making bogus files that we don't know about and never remove. For | |
1593 | + # instance it was reported that on HP-UX the gcc test will end up | |
1594 | + # making a dummy file named 'D' -- because '-MD' means "put the output | |
1595 | + # in D". | |
1596 | + rm -rf conftest.dir | |
1597 | + mkdir conftest.dir | |
1598 | + # Copy depcomp to subdir because otherwise we won't find it if we're | |
1599 | + # using a relative directory. | |
1600 | + cp "$am_depcomp" conftest.dir | |
1601 | + cd conftest.dir | |
1602 | + # We will build objects and dependencies in a subdirectory because | |
1603 | + # it helps to detect inapplicable dependency modes. For instance | |
1604 | + # both Tru64's cc and ICC support -MD to output dependencies as a | |
1605 | + # side effect of compilation, but ICC will put the dependencies in | |
1606 | + # the current directory while Tru64 will put them in the object | |
1607 | + # directory. | |
1608 | + mkdir sub | |
1609 | + | |
1610 | + am_cv_$1_dependencies_compiler_type=none | |
1611 | + if test "$am_compiler_list" = ""; then | |
1612 | + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` | |
1613 | + fi | |
1614 | + am__universal=false | |
1615 | + m4_case([$1], [CC], | |
1616 | + [case " $depcc " in #( | |
1617 | + *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
1618 | + esac], | |
1619 | + [CXX], | |
1620 | + [case " $depcc " in #( | |
1621 | + *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
1622 | + esac]) | |
1623 | + | |
1624 | + for depmode in $am_compiler_list; do | |
1625 | + # Setup a source with many dependencies, because some compilers | |
1626 | + # like to wrap large dependency lists on column 80 (with \), and | |
1627 | + # we should not choose a depcomp mode which is confused by this. | |
1628 | + # | |
1629 | + # We need to recreate these files for each test, as the compiler may | |
1630 | + # overwrite some of them when testing with obscure command lines. | |
1631 | + # This happens at least with the AIX C compiler. | |
1632 | + : > sub/conftest.c | |
1633 | + for i in 1 2 3 4 5 6; do | |
1634 | + echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
1635 | + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with | |
1636 | + # Solaris 10 /bin/sh. | |
1637 | + echo '/* dummy */' > sub/conftst$i.h | |
1638 | + done | |
1639 | + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
1640 | + | |
1641 | + # We check with '-c' and '-o' for the sake of the "dashmstdout" | |
1642 | + # mode. It turns out that the SunPro C++ compiler does not properly | |
1643 | + # handle '-M -o', and we need to detect this. Also, some Intel | |
1644 | + # versions had trouble with output in subdirs. | |
1645 | + am__obj=sub/conftest.${OBJEXT-o} | |
1646 | + am__minus_obj="-o $am__obj" | |
1647 | + case $depmode in | |
1648 | + gcc) | |
1649 | + # This depmode causes a compiler race in universal mode. | |
1650 | + test "$am__universal" = false || continue | |
1651 | + ;; | |
1652 | + nosideeffect) | |
1653 | + # After this tag, mechanisms are not by side-effect, so they'll | |
1654 | + # only be used when explicitly requested. | |
1655 | + if test "x$enable_dependency_tracking" = xyes; then | |
1656 | + continue | |
1657 | + else | |
1658 | + break | |
1659 | + fi | |
1660 | + ;; | |
1661 | + msvc7 | msvc7msys | msvisualcpp | msvcmsys) | |
1662 | + # This compiler won't grok '-c -o', but also, the minuso test has | |
1663 | + # not run yet. These depmodes are late enough in the game, and | |
1664 | + # so weak that their functioning should not be impacted. | |
1665 | + am__obj=conftest.${OBJEXT-o} | |
1666 | + am__minus_obj= | |
1667 | + ;; | |
1668 | + none) break ;; | |
1669 | + esac | |
1670 | + if depmode=$depmode \ | |
1671 | + source=sub/conftest.c object=$am__obj \ | |
1672 | + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
1673 | + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
1674 | + >/dev/null 2>conftest.err && | |
1675 | + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
1676 | + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
1677 | + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
1678 | + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
1679 | + # icc doesn't choke on unknown options, it will just issue warnings | |
1680 | + # or remarks (even with -Werror). So we grep stderr for any message | |
1681 | + # that says an option was ignored or not supported. | |
1682 | + # When given -MP, icc 7.0 and 7.1 complain thusly: | |
1683 | + # icc: Command line warning: ignoring option '-M'; no argument required | |
1684 | + # The diagnosis changed in icc 8.0: | |
1685 | + # icc: Command line remark: option '-MP' not supported | |
1686 | + if (grep 'ignoring option' conftest.err || | |
1687 | + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
1688 | + am_cv_$1_dependencies_compiler_type=$depmode | |
1689 | + break | |
1690 | + fi | |
1691 | + fi | |
1692 | + done | |
1693 | + | |
1694 | + cd .. | |
1695 | + rm -rf conftest.dir | |
1696 | +else | |
1697 | + am_cv_$1_dependencies_compiler_type=none | |
1698 | +fi | |
1699 | +]) | |
1700 | +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) | |
1701 | +AM_CONDITIONAL([am__fastdep$1], [ | |
1702 | + test "x$enable_dependency_tracking" != xno \ | |
1703 | + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) | |
1704 | +]) | |
1705 | + | |
1706 | + | |
1707 | +# AM_SET_DEPDIR | |
1708 | +# ------------- | |
1709 | +# Choose a directory name for dependency files. | |
1710 | +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. | |
1711 | +AC_DEFUN([AM_SET_DEPDIR], | |
1712 | +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl | |
1713 | +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl | |
1714 | +]) | |
1715 | + | |
1716 | + | |
1717 | +# AM_DEP_TRACK | |
1718 | +# ------------ | |
1719 | +AC_DEFUN([AM_DEP_TRACK], | |
1720 | +[AC_ARG_ENABLE([dependency-tracking], [dnl | |
1721 | +AS_HELP_STRING( | |
1722 | + [--enable-dependency-tracking], | |
1723 | + [do not reject slow dependency extractors]) | |
1724 | +AS_HELP_STRING( | |
1725 | + [--disable-dependency-tracking], | |
1726 | + [speeds up one-time build])]) | |
1727 | +if test "x$enable_dependency_tracking" != xno; then | |
1728 | + am_depcomp="$ac_aux_dir/depcomp" | |
1729 | + AMDEPBACKSLASH='\' | |
1730 | + am__nodep='_no' | |
1731 | +fi | |
1732 | +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) | |
1733 | +AC_SUBST([AMDEPBACKSLASH])dnl | |
1734 | +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl | |
1735 | +AC_SUBST([am__nodep])dnl | |
1736 | +_AM_SUBST_NOTMAKE([am__nodep])dnl | |
1737 | +]) | |
1738 | + | |
1739 | +# Generate code to set up dependency tracking. -*- Autoconf -*- | |
1740 | + | |
1741 | +# Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
1742 | +# | |
1743 | +# This file is free software; the Free Software Foundation | |
1744 | +# gives unlimited permission to copy and/or distribute it, | |
1745 | +# with or without modifications, as long as this notice is preserved. | |
1746 | + | |
1747 | + | |
1748 | +# _AM_OUTPUT_DEPENDENCY_COMMANDS | |
1749 | +# ------------------------------ | |
1750 | +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | |
1751 | +[{ | |
1752 | + # Older Autoconf quotes --file arguments for eval, but not when files | |
1753 | + # are listed without --file. Let's play safe and only enable the eval | |
1754 | + # if we detect the quoting. | |
1755 | + case $CONFIG_FILES in | |
1756 | + *\'*) eval set x "$CONFIG_FILES" ;; | |
1757 | + *) set x $CONFIG_FILES ;; | |
1758 | + esac | |
1759 | + shift | |
1760 | + for mf | |
1761 | + do | |
1762 | + # Strip MF so we end up with the name of the file. | |
1763 | + mf=`echo "$mf" | sed -e 's/:.*$//'` | |
1764 | + # Check whether this is an Automake generated Makefile or not. | |
1765 | + # We used to match only the files named 'Makefile.in', but | |
1766 | + # some people rename them; so instead we look at the file content. | |
1767 | + # Grep'ing the first line is not enough: some people post-process | |
1768 | + # each Makefile.in and add a new line on top of each file to say so. | |
1769 | + # Grep'ing the whole file is not good either: AIX grep has a line | |
1770 | + # limit of 2048, but all sed's we know have understand at least 4000. | |
1771 | + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
1772 | + dirpart=`AS_DIRNAME("$mf")` | |
1773 | + else | |
1774 | + continue | |
1775 | + fi | |
1776 | + # Extract the definition of DEPDIR, am__include, and am__quote | |
1777 | + # from the Makefile without running 'make'. | |
1778 | + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
1779 | + test -z "$DEPDIR" && continue | |
1780 | + am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
1781 | + test -z "$am__include" && continue | |
1782 | + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
1783 | + # Find all dependency output files, they are included files with | |
1784 | + # $(DEPDIR) in their names. We invoke sed twice because it is the | |
1785 | + # simplest approach to changing $(DEPDIR) to its actual value in the | |
1786 | + # expansion. | |
1787 | + for file in `sed -n " | |
1788 | + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
1789 | + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do | |
1790 | + # Make sure the directory exists. | |
1791 | + test -f "$dirpart/$file" && continue | |
1792 | + fdir=`AS_DIRNAME(["$file"])` | |
1793 | + AS_MKDIR_P([$dirpart/$fdir]) | |
1794 | + # echo "creating $dirpart/$file" | |
1795 | + echo '# dummy' > "$dirpart/$file" | |
1796 | + done | |
1797 | + done | |
1798 | +} | |
1799 | +])# _AM_OUTPUT_DEPENDENCY_COMMANDS | |
1800 | + | |
1801 | + | |
1802 | +# AM_OUTPUT_DEPENDENCY_COMMANDS | |
1803 | +# ----------------------------- | |
1804 | +# This macro should only be invoked once -- use via AC_REQUIRE. | |
1805 | +# | |
1806 | +# This code is only required when automatic dependency tracking | |
1807 | +# is enabled. FIXME. This creates each '.P' file that we will | |
1808 | +# need in order to bootstrap the dependency handling code. | |
1809 | +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | |
1810 | +[AC_CONFIG_COMMANDS([depfiles], | |
1811 | + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], | |
1812 | + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) | |
1813 | +]) | |
1814 | + | |
1815 | +# Do all the work for Automake. -*- Autoconf -*- | |
1816 | + | |
1817 | +# Copyright (C) 1996-2013 Free Software Foundation, Inc. | |
1818 | +# | |
1819 | +# This file is free software; the Free Software Foundation | |
1820 | +# gives unlimited permission to copy and/or distribute it, | |
1821 | +# with or without modifications, as long as this notice is preserved. | |
1822 | + | |
1823 | +# This macro actually does too much. Some checks are only needed if | |
1824 | +# your package does certain things. But this isn't really a big deal. | |
1825 | + | |
1826 | +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. | |
1827 | +m4_define([AC_PROG_CC], | |
1828 | +m4_defn([AC_PROG_CC]) | |
1829 | +[_AM_PROG_CC_C_O | |
1830 | +]) | |
1831 | + | |
1832 | +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) | |
1833 | +# AM_INIT_AUTOMAKE([OPTIONS]) | |
1834 | +# ----------------------------------------------- | |
1835 | +# The call with PACKAGE and VERSION arguments is the old style | |
1836 | +# call (pre autoconf-2.50), which is being phased out. PACKAGE | |
1837 | +# and VERSION should now be passed to AC_INIT and removed from | |
1838 | +# the call to AM_INIT_AUTOMAKE. | |
1839 | +# We support both call styles for the transition. After | |
1840 | +# the next Automake release, Autoconf can make the AC_INIT | |
1841 | +# arguments mandatory, and then we can depend on a new Autoconf | |
1842 | +# release and drop the old call support. | |
1843 | +AC_DEFUN([AM_INIT_AUTOMAKE], | |
1844 | +[AC_PREREQ([2.65])dnl | |
1845 | +dnl Autoconf wants to disallow AM_ names. We explicitly allow | |
1846 | +dnl the ones we care about. | |
1847 | +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl | |
1848 | +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl | |
1849 | +AC_REQUIRE([AC_PROG_INSTALL])dnl | |
1850 | +if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
1851 | + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
1852 | + # is not polluted with repeated "-I." | |
1853 | + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl | |
1854 | + # test to see if srcdir already configured | |
1855 | + if test -f $srcdir/config.status; then | |
1856 | + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | |
1857 | + fi | |
1858 | +fi | |
1859 | + | |
1860 | +# test whether we have cygpath | |
1861 | +if test -z "$CYGPATH_W"; then | |
1862 | + if (cygpath --version) >/dev/null 2>/dev/null; then | |
1863 | + CYGPATH_W='cygpath -w' | |
1864 | + else | |
1865 | + CYGPATH_W=echo | |
1866 | + fi | |
1867 | +fi | |
1868 | +AC_SUBST([CYGPATH_W]) | |
1869 | + | |
1870 | +# Define the identity of the package. | |
1871 | +dnl Distinguish between old-style and new-style calls. | |
1872 | +m4_ifval([$2], | |
1873 | +[AC_DIAGNOSE([obsolete], | |
1874 | + [$0: two- and three-arguments forms are deprecated.]) | |
1875 | +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl | |
1876 | + AC_SUBST([PACKAGE], [$1])dnl | |
1877 | + AC_SUBST([VERSION], [$2])], | |
1878 | +[_AM_SET_OPTIONS([$1])dnl | |
1879 | +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. | |
1880 | +m4_if( | |
1881 | + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), | |
1882 | + [ok:ok],, | |
1883 | + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl | |
1884 | + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl | |
1885 | + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl | |
1886 | + | |
1887 | +_AM_IF_OPTION([no-define],, | |
1888 | +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) | |
1889 | + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl | |
1890 | + | |
1891 | +# Some tools Automake needs. | |
1892 | +AC_REQUIRE([AM_SANITY_CHECK])dnl | |
1893 | +AC_REQUIRE([AC_ARG_PROGRAM])dnl | |
1894 | +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) | |
1895 | +AM_MISSING_PROG([AUTOCONF], [autoconf]) | |
1896 | +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) | |
1897 | +AM_MISSING_PROG([AUTOHEADER], [autoheader]) | |
1898 | +AM_MISSING_PROG([MAKEINFO], [makeinfo]) | |
1899 | +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | |
1900 | +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl | |
1901 | +AC_REQUIRE([AC_PROG_MKDIR_P])dnl | |
1902 | +# For better backward compatibility. To be removed once Automake 1.9.x | |
1903 | +# dies out for good. For more background, see: | |
1904 | +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | |
1905 | +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | |
1906 | +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) | |
1907 | +# We need awk for the "check" target. The system "awk" is bad on | |
1908 | +# some platforms. | |
1909 | +AC_REQUIRE([AC_PROG_AWK])dnl | |
1910 | +AC_REQUIRE([AC_PROG_MAKE_SET])dnl | |
1911 | +AC_REQUIRE([AM_SET_LEADING_DOT])dnl | |
1912 | +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], | |
1913 | + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], | |
1914 | + [_AM_PROG_TAR([v7])])]) | |
1915 | +_AM_IF_OPTION([no-dependencies],, | |
1916 | +[AC_PROVIDE_IFELSE([AC_PROG_CC], | |
1917 | + [_AM_DEPENDENCIES([CC])], | |
1918 | + [m4_define([AC_PROG_CC], | |
1919 | + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl | |
1920 | +AC_PROVIDE_IFELSE([AC_PROG_CXX], | |
1921 | + [_AM_DEPENDENCIES([CXX])], | |
1922 | + [m4_define([AC_PROG_CXX], | |
1923 | + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl | |
1924 | +AC_PROVIDE_IFELSE([AC_PROG_OBJC], | |
1925 | + [_AM_DEPENDENCIES([OBJC])], | |
1926 | + [m4_define([AC_PROG_OBJC], | |
1927 | + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl | |
1928 | +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], | |
1929 | + [_AM_DEPENDENCIES([OBJCXX])], | |
1930 | + [m4_define([AC_PROG_OBJCXX], | |
1931 | + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl | |
1932 | +]) | |
1933 | +AC_REQUIRE([AM_SILENT_RULES])dnl | |
1934 | +dnl The testsuite driver may need to know about EXEEXT, so add the | |
1935 | +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This | |
1936 | +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. | |
1937 | +AC_CONFIG_COMMANDS_PRE(dnl | |
1938 | +[m4_provide_if([_AM_COMPILER_EXEEXT], | |
1939 | + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl | |
1940 | + | |
1941 | +# POSIX will say in a future version that running "rm -f" with no argument | |
1942 | +# is OK; and we want to be able to make that assumption in our Makefile | |
1943 | +# recipes. So use an aggressive probe to check that the usage we want is | |
1944 | +# actually supported "in the wild" to an acceptable degree. | |
1945 | +# See automake bug#10828. | |
1946 | +# To make any issue more visible, cause the running configure to be aborted | |
1947 | +# by default if the 'rm' program in use doesn't match our expectations; the | |
1948 | +# user can still override this though. | |
1949 | +if rm -f && rm -fr && rm -rf; then : OK; else | |
1950 | + cat >&2 <<'END' | |
1951 | +Oops! | |
1952 | + | |
1953 | +Your 'rm' program seems unable to run without file operands specified | |
1954 | +on the command line, even when the '-f' option is present. This is contrary | |
1955 | +to the behaviour of most rm programs out there, and not conforming with | |
1956 | +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> | |
1957 | + | |
1958 | +Please tell bug-automake@gnu.org about your system, including the value | |
1959 | +of your $PATH and any error possibly output before this message. This | |
1960 | +can help us improve future automake versions. | |
1961 | + | |
1962 | +END | |
1963 | + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then | |
1964 | + echo 'Configuration will proceed anyway, since you have set the' >&2 | |
1965 | + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 | |
1966 | + echo >&2 | |
1967 | + else | |
1968 | + cat >&2 <<'END' | |
1969 | +Aborting the configuration process, to ensure you take notice of the issue. | |
1970 | + | |
1971 | +You can download and install GNU coreutils to get an 'rm' implementation | |
1972 | +that behaves properly: <http://www.gnu.org/software/coreutils/>. | |
1973 | + | |
1974 | +If you want to complete the configuration process using your problematic | |
1975 | +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM | |
1976 | +to "yes", and re-run configure. | |
1977 | + | |
1978 | +END | |
1979 | + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) | |
1980 | + fi | |
1981 | +fi]) | |
1982 | + | |
1983 | +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not | |
1984 | +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further | |
1985 | +dnl mangled by Autoconf and run in a shell conditional statement. | |
1986 | +m4_define([_AC_COMPILER_EXEEXT], | |
1987 | +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) | |
1988 | + | |
1989 | +# When config.status generates a header, we must update the stamp-h file. | |
1990 | +# This file resides in the same directory as the config header | |
1991 | +# that is generated. The stamp files are numbered to have different names. | |
1992 | + | |
1993 | +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the | |
1994 | +# loop where config.status creates the headers, so we can generate | |
1995 | +# our stamp files there. | |
1996 | +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], | |
1997 | +[# Compute $1's index in $config_headers. | |
1998 | +_am_arg=$1 | |
1999 | +_am_stamp_count=1 | |
2000 | +for _am_header in $config_headers :; do | |
2001 | + case $_am_header in | |
2002 | + $_am_arg | $_am_arg:* ) | |
2003 | + break ;; | |
2004 | + * ) | |
2005 | + _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
2006 | + esac | |
2007 | +done | |
2008 | +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) | |
2009 | + | |
2010 | +# Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
2011 | +# | |
2012 | +# This file is free software; the Free Software Foundation | |
2013 | +# gives unlimited permission to copy and/or distribute it, | |
2014 | +# with or without modifications, as long as this notice is preserved. | |
2015 | + | |
2016 | +# AM_PROG_INSTALL_SH | |
2017 | +# ------------------ | |
2018 | +# Define $install_sh. | |
2019 | +AC_DEFUN([AM_PROG_INSTALL_SH], | |
2020 | +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
2021 | +if test x"${install_sh}" != xset; then | |
2022 | + case $am_aux_dir in | |
2023 | + *\ * | *\ *) | |
2024 | + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
2025 | + *) | |
2026 | + install_sh="\${SHELL} $am_aux_dir/install-sh" | |
2027 | + esac | |
2028 | +fi | |
2029 | +AC_SUBST([install_sh])]) | |
2030 | + | |
2031 | +# Copyright (C) 2003-2013 Free Software Foundation, Inc. | |
2032 | +# | |
2033 | +# This file is free software; the Free Software Foundation | |
2034 | +# gives unlimited permission to copy and/or distribute it, | |
2035 | +# with or without modifications, as long as this notice is preserved. | |
2036 | + | |
2037 | +# Check whether the underlying file-system supports filenames | |
2038 | +# with a leading dot. For instance MS-DOS doesn't. | |
2039 | +AC_DEFUN([AM_SET_LEADING_DOT], | |
2040 | +[rm -rf .tst 2>/dev/null | |
2041 | +mkdir .tst 2>/dev/null | |
2042 | +if test -d .tst; then | |
2043 | + am__leading_dot=. | |
2044 | +else | |
2045 | + am__leading_dot=_ | |
2046 | +fi | |
2047 | +rmdir .tst 2>/dev/null | |
2048 | +AC_SUBST([am__leading_dot])]) | |
2049 | + | |
2050 | +# Check to see how 'make' treats includes. -*- Autoconf -*- | |
2051 | + | |
2052 | +# Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
2053 | +# | |
2054 | +# This file is free software; the Free Software Foundation | |
2055 | +# gives unlimited permission to copy and/or distribute it, | |
2056 | +# with or without modifications, as long as this notice is preserved. | |
2057 | + | |
2058 | +# AM_MAKE_INCLUDE() | |
2059 | +# ----------------- | |
2060 | +# Check to see how make treats includes. | |
2061 | +AC_DEFUN([AM_MAKE_INCLUDE], | |
2062 | +[am_make=${MAKE-make} | |
2063 | +cat > confinc << 'END' | |
2064 | +am__doit: | |
2065 | + @echo this is the am__doit target | |
2066 | +.PHONY: am__doit | |
2067 | +END | |
2068 | +# If we don't find an include directive, just comment out the code. | |
2069 | +AC_MSG_CHECKING([for style of include used by $am_make]) | |
2070 | +am__include="#" | |
2071 | +am__quote= | |
2072 | +_am_result=none | |
2073 | +# First try GNU make style include. | |
2074 | +echo "include confinc" > confmf | |
2075 | +# Ignore all kinds of additional output from 'make'. | |
2076 | +case `$am_make -s -f confmf 2> /dev/null` in #( | |
2077 | +*the\ am__doit\ target*) | |
2078 | + am__include=include | |
2079 | + am__quote= | |
2080 | + _am_result=GNU | |
2081 | + ;; | |
2082 | +esac | |
2083 | +# Now try BSD make style include. | |
2084 | +if test "$am__include" = "#"; then | |
2085 | + echo '.include "confinc"' > confmf | |
2086 | + case `$am_make -s -f confmf 2> /dev/null` in #( | |
2087 | + *the\ am__doit\ target*) | |
2088 | + am__include=.include | |
2089 | + am__quote="\"" | |
2090 | + _am_result=BSD | |
2091 | + ;; | |
2092 | + esac | |
2093 | +fi | |
2094 | +AC_SUBST([am__include]) | |
2095 | +AC_SUBST([am__quote]) | |
2096 | +AC_MSG_RESULT([$_am_result]) | |
2097 | +rm -f confinc confmf | |
2098 | +]) | |
2099 | + | |
2100 | +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- | |
2101 | + | |
2102 | +# Copyright (C) 1997-2013 Free Software Foundation, Inc. | |
2103 | +# | |
2104 | +# This file is free software; the Free Software Foundation | |
2105 | +# gives unlimited permission to copy and/or distribute it, | |
2106 | +# with or without modifications, as long as this notice is preserved. | |
2107 | + | |
2108 | +# AM_MISSING_PROG(NAME, PROGRAM) | |
2109 | +# ------------------------------ | |
2110 | +AC_DEFUN([AM_MISSING_PROG], | |
2111 | +[AC_REQUIRE([AM_MISSING_HAS_RUN]) | |
2112 | +$1=${$1-"${am_missing_run}$2"} | |
2113 | +AC_SUBST($1)]) | |
2114 | + | |
2115 | +# AM_MISSING_HAS_RUN | |
2116 | +# ------------------ | |
2117 | +# Define MISSING if not defined so far and test if it is modern enough. | |
2118 | +# If it is, set am_missing_run to use it, otherwise, to nothing. | |
2119 | +AC_DEFUN([AM_MISSING_HAS_RUN], | |
2120 | +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
2121 | +AC_REQUIRE_AUX_FILE([missing])dnl | |
2122 | +if test x"${MISSING+set}" != xset; then | |
2123 | + case $am_aux_dir in | |
2124 | + *\ * | *\ *) | |
2125 | + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
2126 | + *) | |
2127 | + MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
2128 | + esac | |
2129 | +fi | |
2130 | +# Use eval to expand $SHELL | |
2131 | +if eval "$MISSING --is-lightweight"; then | |
2132 | + am_missing_run="$MISSING " | |
2133 | +else | |
2134 | + am_missing_run= | |
2135 | + AC_MSG_WARN(['missing' script is too old or missing]) | |
2136 | +fi | |
2137 | +]) | |
2138 | + | |
2139 | +# Helper functions for option handling. -*- Autoconf -*- | |
2140 | + | |
2141 | +# Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
2142 | +# | |
2143 | +# This file is free software; the Free Software Foundation | |
2144 | +# gives unlimited permission to copy and/or distribute it, | |
2145 | +# with or without modifications, as long as this notice is preserved. | |
2146 | + | |
2147 | +# _AM_MANGLE_OPTION(NAME) | |
2148 | +# ----------------------- | |
2149 | +AC_DEFUN([_AM_MANGLE_OPTION], | |
2150 | +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) | |
2151 | + | |
2152 | +# _AM_SET_OPTION(NAME) | |
2153 | +# -------------------- | |
2154 | +# Set option NAME. Presently that only means defining a flag for this option. | |
2155 | +AC_DEFUN([_AM_SET_OPTION], | |
2156 | +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) | |
2157 | + | |
2158 | +# _AM_SET_OPTIONS(OPTIONS) | |
2159 | +# ------------------------ | |
2160 | +# OPTIONS is a space-separated list of Automake options. | |
2161 | +AC_DEFUN([_AM_SET_OPTIONS], | |
2162 | +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) | |
2163 | + | |
2164 | +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) | |
2165 | +# ------------------------------------------- | |
2166 | +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | |
2167 | +AC_DEFUN([_AM_IF_OPTION], | |
2168 | +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) | |
2169 | + | |
2170 | +# Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
2171 | +# | |
2172 | +# This file is free software; the Free Software Foundation | |
2173 | +# gives unlimited permission to copy and/or distribute it, | |
2174 | +# with or without modifications, as long as this notice is preserved. | |
2175 | + | |
2176 | +# _AM_PROG_CC_C_O | |
2177 | +# --------------- | |
2178 | +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC | |
2179 | +# to automatically call this. | |
2180 | +AC_DEFUN([_AM_PROG_CC_C_O], | |
2181 | +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
2182 | +AC_REQUIRE_AUX_FILE([compile])dnl | |
2183 | +AC_LANG_PUSH([C])dnl | |
2184 | +AC_CACHE_CHECK( | |
2185 | + [whether $CC understands -c and -o together], | |
2186 | + [am_cv_prog_cc_c_o], | |
2187 | + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) | |
2188 | + # Make sure it works both with $CC and with simple cc. | |
2189 | + # Following AC_PROG_CC_C_O, we do the test twice because some | |
2190 | + # compilers refuse to overwrite an existing .o file with -o, | |
2191 | + # though they will create one. | |
2192 | + am_cv_prog_cc_c_o=yes | |
2193 | + for am_i in 1 2; do | |
2194 | + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ | |
2195 | + && test -f conftest2.$ac_objext; then | |
2196 | + : OK | |
2197 | + else | |
2198 | + am_cv_prog_cc_c_o=no | |
2199 | + break | |
2200 | + fi | |
2201 | + done | |
2202 | + rm -f core conftest* | |
2203 | + unset am_i]) | |
2204 | +if test "$am_cv_prog_cc_c_o" != yes; then | |
2205 | + # Losing compiler, so override with the script. | |
2206 | + # FIXME: It is wrong to rewrite CC. | |
2207 | + # But if we don't then we get into trouble of one sort or another. | |
2208 | + # A longer-term fix would be to have automake use am__CC in this case, | |
2209 | + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
2210 | + CC="$am_aux_dir/compile $CC" | |
2211 | +fi | |
2212 | +AC_LANG_POP([C])]) | |
2213 | + | |
2214 | +# For backward compatibility. | |
2215 | +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) | |
2216 | + | |
2217 | +# Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
2218 | +# | |
2219 | +# This file is free software; the Free Software Foundation | |
2220 | +# gives unlimited permission to copy and/or distribute it, | |
2221 | +# with or without modifications, as long as this notice is preserved. | |
2222 | + | |
2223 | +# AM_RUN_LOG(COMMAND) | |
2224 | +# ------------------- | |
2225 | +# Run COMMAND, save the exit status in ac_status, and log it. | |
2226 | +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) | |
2227 | +AC_DEFUN([AM_RUN_LOG], | |
2228 | +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD | |
2229 | + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD | |
2230 | + ac_status=$? | |
2231 | + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | |
2232 | + (exit $ac_status); }]) | |
2233 | + | |
2234 | +# Check to make sure that the build environment is sane. -*- Autoconf -*- | |
2235 | + | |
2236 | +# Copyright (C) 1996-2013 Free Software Foundation, Inc. | |
2237 | +# | |
2238 | +# This file is free software; the Free Software Foundation | |
2239 | +# gives unlimited permission to copy and/or distribute it, | |
2240 | +# with or without modifications, as long as this notice is preserved. | |
2241 | + | |
2242 | +# AM_SANITY_CHECK | |
2243 | +# --------------- | |
2244 | +AC_DEFUN([AM_SANITY_CHECK], | |
2245 | +[AC_MSG_CHECKING([whether build environment is sane]) | |
2246 | +# Reject unsafe characters in $srcdir or the absolute working directory | |
2247 | +# name. Accept space and tab only in the latter. | |
2248 | +am_lf=' | |
2249 | +' | |
2250 | +case `pwd` in | |
2251 | + *[[\\\"\#\$\&\'\`$am_lf]]*) | |
2252 | + AC_MSG_ERROR([unsafe absolute working directory name]);; | |
2253 | +esac | |
2254 | +case $srcdir in | |
2255 | + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) | |
2256 | + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; | |
2257 | +esac | |
2258 | + | |
2259 | +# Do 'set' in a subshell so we don't clobber the current shell's | |
2260 | +# arguments. Must try -L first in case configure is actually a | |
2261 | +# symlink; some systems play weird games with the mod time of symlinks | |
2262 | +# (eg FreeBSD returns the mod time of the symlink's containing | |
2263 | +# directory). | |
2264 | +if ( | |
2265 | + am_has_slept=no | |
2266 | + for am_try in 1 2; do | |
2267 | + echo "timestamp, slept: $am_has_slept" > conftest.file | |
2268 | + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
2269 | + if test "$[*]" = "X"; then | |
2270 | + # -L didn't work. | |
2271 | + set X `ls -t "$srcdir/configure" conftest.file` | |
2272 | + fi | |
2273 | + if test "$[*]" != "X $srcdir/configure conftest.file" \ | |
2274 | + && test "$[*]" != "X conftest.file $srcdir/configure"; then | |
2275 | + | |
2276 | + # If neither matched, then we have a broken ls. This can happen | |
2277 | + # if, for instance, CONFIG_SHELL is bash and it inherits a | |
2278 | + # broken ls alias from the environment. This has actually | |
2279 | + # happened. Such a system could not be considered "sane". | |
2280 | + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | |
2281 | + alias in your environment]) | |
2282 | + fi | |
2283 | + if test "$[2]" = conftest.file || test $am_try -eq 2; then | |
2284 | + break | |
2285 | + fi | |
2286 | + # Just in case. | |
2287 | + sleep 1 | |
2288 | + am_has_slept=yes | |
2289 | + done | |
2290 | + test "$[2]" = conftest.file | |
2291 | + ) | |
2292 | +then | |
2293 | + # Ok. | |
2294 | + : | |
2295 | +else | |
2296 | + AC_MSG_ERROR([newly created file is older than distributed files! | |
2297 | +Check your system clock]) | |
2298 | +fi | |
2299 | +AC_MSG_RESULT([yes]) | |
2300 | +# If we didn't sleep, we still need to ensure time stamps of config.status and | |
2301 | +# generated files are strictly newer. | |
2302 | +am_sleep_pid= | |
2303 | +if grep 'slept: no' conftest.file >/dev/null 2>&1; then | |
2304 | + ( sleep 1 ) & | |
2305 | + am_sleep_pid=$! | |
2306 | +fi | |
2307 | +AC_CONFIG_COMMANDS_PRE( | |
2308 | + [AC_MSG_CHECKING([that generated files are newer than configure]) | |
2309 | + if test -n "$am_sleep_pid"; then | |
2310 | + # Hide warnings about reused PIDs. | |
2311 | + wait $am_sleep_pid 2>/dev/null | |
2312 | + fi | |
2313 | + AC_MSG_RESULT([done])]) | |
2314 | +rm -f conftest.file | |
2315 | +]) | |
2316 | + | |
2317 | +# Copyright (C) 2009-2013 Free Software Foundation, Inc. | |
2318 | +# | |
2319 | +# This file is free software; the Free Software Foundation | |
2320 | +# gives unlimited permission to copy and/or distribute it, | |
2321 | +# with or without modifications, as long as this notice is preserved. | |
2322 | + | |
2323 | +# AM_SILENT_RULES([DEFAULT]) | |
2324 | +# -------------------------- | |
2325 | +# Enable less verbose build rules; with the default set to DEFAULT | |
2326 | +# ("yes" being less verbose, "no" or empty being verbose). | |
2327 | +AC_DEFUN([AM_SILENT_RULES], | |
2328 | +[AC_ARG_ENABLE([silent-rules], [dnl | |
2329 | +AS_HELP_STRING( | |
2330 | + [--enable-silent-rules], | |
2331 | + [less verbose build output (undo: "make V=1")]) | |
2332 | +AS_HELP_STRING( | |
2333 | + [--disable-silent-rules], | |
2334 | + [verbose build output (undo: "make V=0")])dnl | |
2335 | +]) | |
2336 | +case $enable_silent_rules in @%:@ ((( | |
2337 | + yes) AM_DEFAULT_VERBOSITY=0;; | |
2338 | + no) AM_DEFAULT_VERBOSITY=1;; | |
2339 | + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; | |
2340 | +esac | |
2341 | +dnl | |
2342 | +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) | |
2343 | +dnl do not support nested variable expansions. | |
2344 | +dnl See automake bug#9928 and bug#10237. | |
2345 | +am_make=${MAKE-make} | |
2346 | +AC_CACHE_CHECK([whether $am_make supports nested variables], | |
2347 | + [am_cv_make_support_nested_variables], | |
2348 | + [if AS_ECHO([['TRUE=$(BAR$(V)) | |
2349 | +BAR0=false | |
2350 | +BAR1=true | |
2351 | +V=1 | |
2352 | +am__doit: | |
2353 | + @$(TRUE) | |
2354 | +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then | |
2355 | + am_cv_make_support_nested_variables=yes | |
2356 | +else | |
2357 | + am_cv_make_support_nested_variables=no | |
2358 | +fi]) | |
2359 | +if test $am_cv_make_support_nested_variables = yes; then | |
2360 | + dnl Using '$V' instead of '$(V)' breaks IRIX make. | |
2361 | + AM_V='$(V)' | |
2362 | + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | |
2363 | +else | |
2364 | + AM_V=$AM_DEFAULT_VERBOSITY | |
2365 | + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | |
2366 | +fi | |
2367 | +AC_SUBST([AM_V])dnl | |
2368 | +AM_SUBST_NOTMAKE([AM_V])dnl | |
2369 | +AC_SUBST([AM_DEFAULT_V])dnl | |
2370 | +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl | |
2371 | +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl | |
2372 | +AM_BACKSLASH='\' | |
2373 | +AC_SUBST([AM_BACKSLASH])dnl | |
2374 | +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl | |
2375 | +]) | |
2376 | + | |
2377 | +# Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
2378 | +# | |
2379 | +# This file is free software; the Free Software Foundation | |
2380 | +# gives unlimited permission to copy and/or distribute it, | |
2381 | +# with or without modifications, as long as this notice is preserved. | |
2382 | + | |
2383 | +# AM_PROG_INSTALL_STRIP | |
2384 | +# --------------------- | |
2385 | +# One issue with vendor 'install' (even GNU) is that you can't | |
2386 | +# specify the program used to strip binaries. This is especially | |
2387 | +# annoying in cross-compiling environments, where the build's strip | |
2388 | +# is unlikely to handle the host's binaries. | |
2389 | +# Fortunately install-sh will honor a STRIPPROG variable, so we | |
2390 | +# always use install-sh in "make install-strip", and initialize | |
2391 | +# STRIPPROG with the value of the STRIP variable (set by the user). | |
2392 | +AC_DEFUN([AM_PROG_INSTALL_STRIP], | |
2393 | +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | |
2394 | +# Installed binaries are usually stripped using 'strip' when the user | |
2395 | +# run "make install-strip". However 'strip' might not be the right | |
2396 | +# tool to use in cross-compilation environments, therefore Automake | |
2397 | +# will honor the 'STRIP' environment variable to overrule this program. | |
2398 | +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. | |
2399 | +if test "$cross_compiling" != no; then | |
2400 | + AC_CHECK_TOOL([STRIP], [strip], :) | |
2401 | +fi | |
2402 | +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
2403 | +AC_SUBST([INSTALL_STRIP_PROGRAM])]) | |
2404 | + | |
2405 | +# Copyright (C) 2006-2013 Free Software Foundation, Inc. | |
2406 | +# | |
2407 | +# This file is free software; the Free Software Foundation | |
2408 | +# gives unlimited permission to copy and/or distribute it, | |
2409 | +# with or without modifications, as long as this notice is preserved. | |
2410 | + | |
2411 | +# _AM_SUBST_NOTMAKE(VARIABLE) | |
2412 | +# --------------------------- | |
2413 | +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. | |
2414 | +# This macro is traced by Automake. | |
2415 | +AC_DEFUN([_AM_SUBST_NOTMAKE]) | |
2416 | + | |
2417 | +# AM_SUBST_NOTMAKE(VARIABLE) | |
2418 | +# -------------------------- | |
2419 | +# Public sister of _AM_SUBST_NOTMAKE. | |
2420 | +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | |
2421 | + | |
2422 | +# Check how to create a tarball. -*- Autoconf -*- | |
2423 | + | |
2424 | +# Copyright (C) 2004-2013 Free Software Foundation, Inc. | |
2425 | +# | |
2426 | +# This file is free software; the Free Software Foundation | |
2427 | +# gives unlimited permission to copy and/or distribute it, | |
2428 | +# with or without modifications, as long as this notice is preserved. | |
2429 | + | |
2430 | +# _AM_PROG_TAR(FORMAT) | |
2431 | +# -------------------- | |
2432 | +# Check how to create a tarball in format FORMAT. | |
2433 | +# FORMAT should be one of 'v7', 'ustar', or 'pax'. | |
2434 | +# | |
2435 | +# Substitute a variable $(am__tar) that is a command | |
2436 | +# writing to stdout a FORMAT-tarball containing the directory | |
2437 | +# $tardir. | |
2438 | +# tardir=directory && $(am__tar) > result.tar | |
2439 | +# | |
2440 | +# Substitute a variable $(am__untar) that extract such | |
2441 | +# a tarball read from stdin. | |
2442 | +# $(am__untar) < result.tar | |
2443 | +# | |
2444 | +AC_DEFUN([_AM_PROG_TAR], | |
2445 | +[# Always define AMTAR for backward compatibility. Yes, it's still used | |
2446 | +# in the wild :-( We should find a proper way to deprecate it ... | |
2447 | +AC_SUBST([AMTAR], ['$${TAR-tar}']) | |
2448 | + | |
2449 | +# We'll loop over all known methods to create a tar archive until one works. | |
2450 | +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' | |
2451 | + | |
2452 | +m4_if([$1], [v7], | |
2453 | + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], | |
2454 | + | |
2455 | + [m4_case([$1], | |
2456 | + [ustar], | |
2457 | + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. | |
2458 | + # There is notably a 21 bits limit for the UID and the GID. In fact, | |
2459 | + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 | |
2460 | + # and bug#13588). | |
2461 | + am_max_uid=2097151 # 2^21 - 1 | |
2462 | + am_max_gid=$am_max_uid | |
2463 | + # The $UID and $GID variables are not portable, so we need to resort | |
2464 | + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls | |
2465 | + # below are definitely unexpected, so allow the users to see them | |
2466 | + # (that is, avoid stderr redirection). | |
2467 | + am_uid=`id -u || echo unknown` | |
2468 | + am_gid=`id -g || echo unknown` | |
2469 | + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) | |
2470 | + if test $am_uid -le $am_max_uid; then | |
2471 | + AC_MSG_RESULT([yes]) | |
2472 | + else | |
2473 | + AC_MSG_RESULT([no]) | |
2474 | + _am_tools=none | |
2475 | + fi | |
2476 | + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) | |
2477 | + if test $am_gid -le $am_max_gid; then | |
2478 | + AC_MSG_RESULT([yes]) | |
2479 | + else | |
2480 | + AC_MSG_RESULT([no]) | |
2481 | + _am_tools=none | |
2482 | + fi], | |
2483 | + | |
2484 | + [pax], | |
2485 | + [], | |
2486 | + | |
2487 | + [m4_fatal([Unknown tar format])]) | |
2488 | + | |
2489 | + AC_MSG_CHECKING([how to create a $1 tar archive]) | |
2490 | + | |
2491 | + # Go ahead even if we have the value already cached. We do so because we | |
2492 | + # need to set the values for the 'am__tar' and 'am__untar' variables. | |
2493 | + _am_tools=${am_cv_prog_tar_$1-$_am_tools} | |
2494 | + | |
2495 | + for _am_tool in $_am_tools; do | |
2496 | + case $_am_tool in | |
2497 | + gnutar) | |
2498 | + for _am_tar in tar gnutar gtar; do | |
2499 | + AM_RUN_LOG([$_am_tar --version]) && break | |
2500 | + done | |
2501 | + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' | |
2502 | + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' | |
2503 | + am__untar="$_am_tar -xf -" | |
2504 | + ;; | |
2505 | + plaintar) | |
2506 | + # Must skip GNU tar: if it does not support --format= it doesn't create | |
2507 | + # ustar tarball either. | |
2508 | + (tar --version) >/dev/null 2>&1 && continue | |
2509 | + am__tar='tar chf - "$$tardir"' | |
2510 | + am__tar_='tar chf - "$tardir"' | |
2511 | + am__untar='tar xf -' | |
2512 | + ;; | |
2513 | + pax) | |
2514 | + am__tar='pax -L -x $1 -w "$$tardir"' | |
2515 | + am__tar_='pax -L -x $1 -w "$tardir"' | |
2516 | + am__untar='pax -r' | |
2517 | + ;; | |
2518 | + cpio) | |
2519 | + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' | |
2520 | + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' | |
2521 | + am__untar='cpio -i -H $1 -d' | |
2522 | + ;; | |
2523 | + none) | |
2524 | + am__tar=false | |
2525 | + am__tar_=false | |
2526 | + am__untar=false | |
2527 | + ;; | |
2528 | + esac | |
2529 | + | |
2530 | + # If the value was cached, stop now. We just wanted to have am__tar | |
2531 | + # and am__untar set. | |
2532 | + test -n "${am_cv_prog_tar_$1}" && break | |
2533 | + | |
2534 | + # tar/untar a dummy directory, and stop if the command works. | |
2535 | + rm -rf conftest.dir | |
2536 | + mkdir conftest.dir | |
2537 | + echo GrepMe > conftest.dir/file | |
2538 | + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) | |
2539 | + rm -rf conftest.dir | |
2540 | + if test -s conftest.tar; then | |
2541 | + AM_RUN_LOG([$am__untar <conftest.tar]) | |
2542 | + AM_RUN_LOG([cat conftest.dir/file]) | |
2543 | + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break | |
2544 | + fi | |
2545 | + done | |
2546 | + rm -rf conftest.dir | |
2547 | + | |
2548 | + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) | |
2549 | + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) | |
2550 | + | |
2551 | +AC_SUBST([am__tar]) | |
2552 | +AC_SUBST([am__untar]) | |
2553 | +]) # _AM_PROG_TAR | |
2554 | + |
@@ -0,0 +1,82 @@ | ||
1 | +/* config.h.in. Generated from configure.ac by autoheader. */ | |
2 | + | |
3 | +/* Define to 1 if you have the <GL/glut.h> header file. */ | |
4 | +#undef HAVE_GL_GLUT_H | |
5 | + | |
6 | +/* Define to 1 if you have the <GL/glu.h> header file. */ | |
7 | +#undef HAVE_GL_GLU_H | |
8 | + | |
9 | +/* Define to 1 if you have the <GL/gl.h> header file. */ | |
10 | +#undef HAVE_GL_GL_H | |
11 | + | |
12 | +/* Define to 1 if you have the <inttypes.h> header file. */ | |
13 | +#undef HAVE_INTTYPES_H | |
14 | + | |
15 | +/* Define to 1 if you have the <memory.h> header file. */ | |
16 | +#undef HAVE_MEMORY_H | |
17 | + | |
18 | +/* Define to 1 if you have the <OpenGL/glut.h> header file. */ | |
19 | +#undef HAVE_OPENGL_GLUT_H | |
20 | + | |
21 | +/* Define to 1 if you have the <OpenGL/glu.h> header file. */ | |
22 | +#undef HAVE_OPENGL_GLU_H | |
23 | + | |
24 | +/* Define to 1 if you have the <OpenGL/gl.h> header file. */ | |
25 | +#undef HAVE_OPENGL_GL_H | |
26 | + | |
27 | +/* Define to 1 if you have the <stdint.h> header file. */ | |
28 | +#undef HAVE_STDINT_H | |
29 | + | |
30 | +/* Define to 1 if you have the <stdlib.h> header file. */ | |
31 | +#undef HAVE_STDLIB_H | |
32 | + | |
33 | +/* Define to 1 if you have the <strings.h> header file. */ | |
34 | +#undef HAVE_STRINGS_H | |
35 | + | |
36 | +/* Define to 1 if you have the <string.h> header file. */ | |
37 | +#undef HAVE_STRING_H | |
38 | + | |
39 | +/* Define to 1 if you have the <sys/stat.h> header file. */ | |
40 | +#undef HAVE_SYS_STAT_H | |
41 | + | |
42 | +/* Define to 1 if you have the <sys/types.h> header file. */ | |
43 | +#undef HAVE_SYS_TYPES_H | |
44 | + | |
45 | +/* Define to 1 if you have the <unistd.h> header file. */ | |
46 | +#undef HAVE_UNISTD_H | |
47 | + | |
48 | +/* Use nonstandard varargs form for the GLU tesselator callback */ | |
49 | +#undef HAVE_VARARGS_GLU_TESSCB | |
50 | + | |
51 | +/* Define to 1 if you have the <windows.h> header file. */ | |
52 | +#undef HAVE_WINDOWS_H | |
53 | + | |
54 | +/* Name of package */ | |
55 | +#undef PACKAGE | |
56 | + | |
57 | +/* Define to the address where bug reports for this package should be sent. */ | |
58 | +#undef PACKAGE_BUGREPORT | |
59 | + | |
60 | +/* Define to the full name of this package. */ | |
61 | +#undef PACKAGE_NAME | |
62 | + | |
63 | +/* Define to the full name and version of this package. */ | |
64 | +#undef PACKAGE_STRING | |
65 | + | |
66 | +/* Define to the one symbol short name of this package. */ | |
67 | +#undef PACKAGE_TARNAME | |
68 | + | |
69 | +/* Define to the home page for this package. */ | |
70 | +#undef PACKAGE_URL | |
71 | + | |
72 | +/* Define to the version of this package. */ | |
73 | +#undef PACKAGE_VERSION | |
74 | + | |
75 | +/* Define to 1 if you have the ANSI C header files. */ | |
76 | +#undef STDC_HEADERS | |
77 | + | |
78 | +/* Version number of package */ | |
79 | +#undef VERSION | |
80 | + | |
81 | +/* Define to 1 if the X Window System is missing or not being used. */ | |
82 | +#undef X_DISPLAY_MISSING |
@@ -0,0 +1,347 @@ | ||
1 | +#! /bin/sh | |
2 | +# Wrapper for compilers which do not understand '-c -o'. | |
3 | + | |
4 | +scriptversion=2012-10-14.11; # UTC | |
5 | + | |
6 | +# Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
7 | +# Written by Tom Tromey <tromey@cygnus.com>. | |
8 | +# | |
9 | +# This program is free software; you can redistribute it and/or modify | |
10 | +# it under the terms of the GNU General Public License as published by | |
11 | +# the Free Software Foundation; either version 2, or (at your option) | |
12 | +# any later version. | |
13 | +# | |
14 | +# This program is distributed in the hope that it will be useful, | |
15 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | +# GNU General Public License for more details. | |
18 | +# | |
19 | +# You should have received a copy of the GNU General Public License | |
20 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 | + | |
22 | +# As a special exception to the GNU General Public License, if you | |
23 | +# distribute this file as part of a program that contains a | |
24 | +# configuration script generated by Autoconf, you may include it under | |
25 | +# the same distribution terms that you use for the rest of that program. | |
26 | + | |
27 | +# This file is maintained in Automake, please report | |
28 | +# bugs to <bug-automake@gnu.org> or send patches to | |
29 | +# <automake-patches@gnu.org>. | |
30 | + | |
31 | +nl=' | |
32 | +' | |
33 | + | |
34 | +# We need space, tab and new line, in precisely that order. Quoting is | |
35 | +# there to prevent tools from complaining about whitespace usage. | |
36 | +IFS=" "" $nl" | |
37 | + | |
38 | +file_conv= | |
39 | + | |
40 | +# func_file_conv build_file lazy | |
41 | +# Convert a $build file to $host form and store it in $file | |
42 | +# Currently only supports Windows hosts. If the determined conversion | |
43 | +# type is listed in (the comma separated) LAZY, no conversion will | |
44 | +# take place. | |
45 | +func_file_conv () | |
46 | +{ | |
47 | + file=$1 | |
48 | + case $file in | |
49 | + / | /[!/]*) # absolute file, and not a UNC file | |
50 | + if test -z "$file_conv"; then | |
51 | + # lazily determine how to convert abs files | |
52 | + case `uname -s` in | |
53 | + MINGW*) | |
54 | + file_conv=mingw | |
55 | + ;; | |
56 | + CYGWIN*) | |
57 | + file_conv=cygwin | |
58 | + ;; | |
59 | + *) | |
60 | + file_conv=wine | |
61 | + ;; | |
62 | + esac | |
63 | + fi | |
64 | + case $file_conv/,$2, in | |
65 | + *,$file_conv,*) | |
66 | + ;; | |
67 | + mingw/*) | |
68 | + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` | |
69 | + ;; | |
70 | + cygwin/*) | |
71 | + file=`cygpath -m "$file" || echo "$file"` | |
72 | + ;; | |
73 | + wine/*) | |
74 | + file=`winepath -w "$file" || echo "$file"` | |
75 | + ;; | |
76 | + esac | |
77 | + ;; | |
78 | + esac | |
79 | +} | |
80 | + | |
81 | +# func_cl_dashL linkdir | |
82 | +# Make cl look for libraries in LINKDIR | |
83 | +func_cl_dashL () | |
84 | +{ | |
85 | + func_file_conv "$1" | |
86 | + if test -z "$lib_path"; then | |
87 | + lib_path=$file | |
88 | + else | |
89 | + lib_path="$lib_path;$file" | |
90 | + fi | |
91 | + linker_opts="$linker_opts -LIBPATH:$file" | |
92 | +} | |
93 | + | |
94 | +# func_cl_dashl library | |
95 | +# Do a library search-path lookup for cl | |
96 | +func_cl_dashl () | |
97 | +{ | |
98 | + lib=$1 | |
99 | + found=no | |
100 | + save_IFS=$IFS | |
101 | + IFS=';' | |
102 | + for dir in $lib_path $LIB | |
103 | + do | |
104 | + IFS=$save_IFS | |
105 | + if $shared && test -f "$dir/$lib.dll.lib"; then | |
106 | + found=yes | |
107 | + lib=$dir/$lib.dll.lib | |
108 | + break | |
109 | + fi | |
110 | + if test -f "$dir/$lib.lib"; then | |
111 | + found=yes | |
112 | + lib=$dir/$lib.lib | |
113 | + break | |
114 | + fi | |
115 | + if test -f "$dir/lib$lib.a"; then | |
116 | + found=yes | |
117 | + lib=$dir/lib$lib.a | |
118 | + break | |
119 | + fi | |
120 | + done | |
121 | + IFS=$save_IFS | |
122 | + | |
123 | + if test "$found" != yes; then | |
124 | + lib=$lib.lib | |
125 | + fi | |
126 | +} | |
127 | + | |
128 | +# func_cl_wrapper cl arg... | |
129 | +# Adjust compile command to suit cl | |
130 | +func_cl_wrapper () | |
131 | +{ | |
132 | + # Assume a capable shell | |
133 | + lib_path= | |
134 | + shared=: | |
135 | + linker_opts= | |
136 | + for arg | |
137 | + do | |
138 | + if test -n "$eat"; then | |
139 | + eat= | |
140 | + else | |
141 | + case $1 in | |
142 | + -o) | |
143 | + # configure might choose to run compile as 'compile cc -o foo foo.c'. | |
144 | + eat=1 | |
145 | + case $2 in | |
146 | + *.o | *.[oO][bB][jJ]) | |
147 | + func_file_conv "$2" | |
148 | + set x "$@" -Fo"$file" | |
149 | + shift | |
150 | + ;; | |
151 | + *) | |
152 | + func_file_conv "$2" | |
153 | + set x "$@" -Fe"$file" | |
154 | + shift | |
155 | + ;; | |
156 | + esac | |
157 | + ;; | |
158 | + -I) | |
159 | + eat=1 | |
160 | + func_file_conv "$2" mingw | |
161 | + set x "$@" -I"$file" | |
162 | + shift | |
163 | + ;; | |
164 | + -I*) | |
165 | + func_file_conv "${1#-I}" mingw | |
166 | + set x "$@" -I"$file" | |
167 | + shift | |
168 | + ;; | |
169 | + -l) | |
170 | + eat=1 | |
171 | + func_cl_dashl "$2" | |
172 | + set x "$@" "$lib" | |
173 | + shift | |
174 | + ;; | |
175 | + -l*) | |
176 | + func_cl_dashl "${1#-l}" | |
177 | + set x "$@" "$lib" | |
178 | + shift | |
179 | + ;; | |
180 | + -L) | |
181 | + eat=1 | |
182 | + func_cl_dashL "$2" | |
183 | + ;; | |
184 | + -L*) | |
185 | + func_cl_dashL "${1#-L}" | |
186 | + ;; | |
187 | + -static) | |
188 | + shared=false | |
189 | + ;; | |
190 | + -Wl,*) | |
191 | + arg=${1#-Wl,} | |
192 | + save_ifs="$IFS"; IFS=',' | |
193 | + for flag in $arg; do | |
194 | + IFS="$save_ifs" | |
195 | + linker_opts="$linker_opts $flag" | |
196 | + done | |
197 | + IFS="$save_ifs" | |
198 | + ;; | |
199 | + -Xlinker) | |
200 | + eat=1 | |
201 | + linker_opts="$linker_opts $2" | |
202 | + ;; | |
203 | + -*) | |
204 | + set x "$@" "$1" | |
205 | + shift | |
206 | + ;; | |
207 | + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) | |
208 | + func_file_conv "$1" | |
209 | + set x "$@" -Tp"$file" | |
210 | + shift | |
211 | + ;; | |
212 | + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) | |
213 | + func_file_conv "$1" mingw | |
214 | + set x "$@" "$file" | |
215 | + shift | |
216 | + ;; | |
217 | + *) | |
218 | + set x "$@" "$1" | |
219 | + shift | |
220 | + ;; | |
221 | + esac | |
222 | + fi | |
223 | + shift | |
224 | + done | |
225 | + if test -n "$linker_opts"; then | |
226 | + linker_opts="-link$linker_opts" | |
227 | + fi | |
228 | + exec "$@" $linker_opts | |
229 | + exit 1 | |
230 | +} | |
231 | + | |
232 | +eat= | |
233 | + | |
234 | +case $1 in | |
235 | + '') | |
236 | + echo "$0: No command. Try '$0 --help' for more information." 1>&2 | |
237 | + exit 1; | |
238 | + ;; | |
239 | + -h | --h*) | |
240 | + cat <<\EOF | |
241 | +Usage: compile [--help] [--version] PROGRAM [ARGS] | |
242 | + | |
243 | +Wrapper for compilers which do not understand '-c -o'. | |
244 | +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining | |
245 | +arguments, and rename the output as expected. | |
246 | + | |
247 | +If you are trying to build a whole package this is not the | |
248 | +right script to run: please start by reading the file 'INSTALL'. | |
249 | + | |
250 | +Report bugs to <bug-automake@gnu.org>. | |
251 | +EOF | |
252 | + exit $? | |
253 | + ;; | |
254 | + -v | --v*) | |
255 | + echo "compile $scriptversion" | |
256 | + exit $? | |
257 | + ;; | |
258 | + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) | |
259 | + func_cl_wrapper "$@" # Doesn't return... | |
260 | + ;; | |
261 | +esac | |
262 | + | |
263 | +ofile= | |
264 | +cfile= | |
265 | + | |
266 | +for arg | |
267 | +do | |
268 | + if test -n "$eat"; then | |
269 | + eat= | |
270 | + else | |
271 | + case $1 in | |
272 | + -o) | |
273 | + # configure might choose to run compile as 'compile cc -o foo foo.c'. | |
274 | + # So we strip '-o arg' only if arg is an object. | |
275 | + eat=1 | |
276 | + case $2 in | |
277 | + *.o | *.obj) | |
278 | + ofile=$2 | |
279 | + ;; | |
280 | + *) | |
281 | + set x "$@" -o "$2" | |
282 | + shift | |
283 | + ;; | |
284 | + esac | |
285 | + ;; | |
286 | + *.c) | |
287 | + cfile=$1 | |
288 | + set x "$@" "$1" | |
289 | + shift | |
290 | + ;; | |
291 | + *) | |
292 | + set x "$@" "$1" | |
293 | + shift | |
294 | + ;; | |
295 | + esac | |
296 | + fi | |
297 | + shift | |
298 | +done | |
299 | + | |
300 | +if test -z "$ofile" || test -z "$cfile"; then | |
301 | + # If no '-o' option was seen then we might have been invoked from a | |
302 | + # pattern rule where we don't need one. That is ok -- this is a | |
303 | + # normal compilation that the losing compiler can handle. If no | |
304 | + # '.c' file was seen then we are probably linking. That is also | |
305 | + # ok. | |
306 | + exec "$@" | |
307 | +fi | |
308 | + | |
309 | +# Name of file we expect compiler to create. | |
310 | +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` | |
311 | + | |
312 | +# Create the lock directory. | |
313 | +# Note: use '[/\\:.-]' here to ensure that we don't use the same name | |
314 | +# that we are using for the .o file. Also, base the name on the expected | |
315 | +# object file name, since that is what matters with a parallel build. | |
316 | +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d | |
317 | +while true; do | |
318 | + if mkdir "$lockdir" >/dev/null 2>&1; then | |
319 | + break | |
320 | + fi | |
321 | + sleep 1 | |
322 | +done | |
323 | +# FIXME: race condition here if user kills between mkdir and trap. | |
324 | +trap "rmdir '$lockdir'; exit 1" 1 2 15 | |
325 | + | |
326 | +# Run the compile. | |
327 | +"$@" | |
328 | +ret=$? | |
329 | + | |
330 | +if test -f "$cofile"; then | |
331 | + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" | |
332 | +elif test -f "${cofile}bj"; then | |
333 | + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" | |
334 | +fi | |
335 | + | |
336 | +rmdir "$lockdir" | |
337 | +exit $ret | |
338 | + | |
339 | +# Local Variables: | |
340 | +# mode: shell-script | |
341 | +# sh-indentation: 2 | |
342 | +# eval: (add-hook 'write-file-hooks 'time-stamp) | |
343 | +# time-stamp-start: "scriptversion=" | |
344 | +# time-stamp-format: "%:y-%02m-%02d.%02H" | |
345 | +# time-stamp-time-zone: "UTC" | |
346 | +# time-stamp-end: "; # UTC" | |
347 | +# End: |
@@ -0,0 +1,1558 @@ | ||
1 | +#! /bin/sh | |
2 | +# Attempt to guess a canonical system name. | |
3 | +# Copyright 1992-2013 Free Software Foundation, Inc. | |
4 | + | |
5 | +timestamp='2013-06-10' | |
6 | + | |
7 | +# This file is free software; you can redistribute it and/or modify it | |
8 | +# under the terms of the GNU General Public License as published by | |
9 | +# the Free Software Foundation; either version 3 of the License, or | |
10 | +# (at your option) any later version. | |
11 | +# | |
12 | +# This program is distributed in the hope that it will be useful, but | |
13 | +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | +# General Public License for more details. | |
16 | +# | |
17 | +# You should have received a copy of the GNU General Public License | |
18 | +# along with this program; if not, see <http://www.gnu.org/licenses/>. | |
19 | +# | |
20 | +# As a special exception to the GNU General Public License, if you | |
21 | +# distribute this file as part of a program that contains a | |
22 | +# configuration script generated by Autoconf, you may include it under | |
23 | +# the same distribution terms that you use for the rest of that | |
24 | +# program. This Exception is an additional permission under section 7 | |
25 | +# of the GNU General Public License, version 3 ("GPLv3"). | |
26 | +# | |
27 | +# Originally written by Per Bothner. | |
28 | +# | |
29 | +# You can get the latest version of this script from: | |
30 | +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | |
31 | +# | |
32 | +# Please send patches with a ChangeLog entry to config-patches@gnu.org. | |
33 | + | |
34 | + | |
35 | +me=`echo "$0" | sed -e 's,.*/,,'` | |
36 | + | |
37 | +usage="\ | |
38 | +Usage: $0 [OPTION] | |
39 | + | |
40 | +Output the configuration name of the system \`$me' is run on. | |
41 | + | |
42 | +Operation modes: | |
43 | + -h, --help print this help, then exit | |
44 | + -t, --time-stamp print date of last modification, then exit | |
45 | + -v, --version print version number, then exit | |
46 | + | |
47 | +Report bugs and patches to <config-patches@gnu.org>." | |
48 | + | |
49 | +version="\ | |
50 | +GNU config.guess ($timestamp) | |
51 | + | |
52 | +Originally written by Per Bothner. | |
53 | +Copyright 1992-2013 Free Software Foundation, Inc. | |
54 | + | |
55 | +This is free software; see the source for copying conditions. There is NO | |
56 | +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | |
57 | + | |
58 | +help=" | |
59 | +Try \`$me --help' for more information." | |
60 | + | |
61 | +# Parse command line | |
62 | +while test $# -gt 0 ; do | |
63 | + case $1 in | |
64 | + --time-stamp | --time* | -t ) | |
65 | + echo "$timestamp" ; exit ;; | |
66 | + --version | -v ) | |
67 | + echo "$version" ; exit ;; | |
68 | + --help | --h* | -h ) | |
69 | + echo "$usage"; exit ;; | |
70 | + -- ) # Stop option processing | |
71 | + shift; break ;; | |
72 | + - ) # Use stdin as input. | |
73 | + break ;; | |
74 | + -* ) | |
75 | + echo "$me: invalid option $1$help" >&2 | |
76 | + exit 1 ;; | |
77 | + * ) | |
78 | + break ;; | |
79 | + esac | |
80 | +done | |
81 | + | |
82 | +if test $# != 0; then | |
83 | + echo "$me: too many arguments$help" >&2 | |
84 | + exit 1 | |
85 | +fi | |
86 | + | |
87 | +trap 'exit 1' 1 2 15 | |
88 | + | |
89 | +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a | |
90 | +# compiler to aid in system detection is discouraged as it requires | |
91 | +# temporary files to be created and, as you can see below, it is a | |
92 | +# headache to deal with in a portable fashion. | |
93 | + | |
94 | +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still | |
95 | +# use `HOST_CC' if defined, but it is deprecated. | |
96 | + | |
97 | +# Portable tmp directory creation inspired by the Autoconf team. | |
98 | + | |
99 | +set_cc_for_build=' | |
100 | +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; | |
101 | +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; | |
102 | +: ${TMPDIR=/tmp} ; | |
103 | + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | |
104 | + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || | |
105 | + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || | |
106 | + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; | |
107 | +dummy=$tmp/dummy ; | |
108 | +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; | |
109 | +case $CC_FOR_BUILD,$HOST_CC,$CC in | |
110 | + ,,) echo "int x;" > $dummy.c ; | |
111 | + for c in cc gcc c89 c99 ; do | |
112 | + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then | |
113 | + CC_FOR_BUILD="$c"; break ; | |
114 | + fi ; | |
115 | + done ; | |
116 | + if test x"$CC_FOR_BUILD" = x ; then | |
117 | + CC_FOR_BUILD=no_compiler_found ; | |
118 | + fi | |
119 | + ;; | |
120 | + ,,*) CC_FOR_BUILD=$CC ;; | |
121 | + ,*,*) CC_FOR_BUILD=$HOST_CC ;; | |
122 | +esac ; set_cc_for_build= ;' | |
123 | + | |
124 | +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. | |
125 | +# (ghazi@noc.rutgers.edu 1994-08-24) | |
126 | +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then | |
127 | + PATH=$PATH:/.attbin ; export PATH | |
128 | +fi | |
129 | + | |
130 | +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown | |
131 | +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown | |
132 | +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | |
133 | +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown | |
134 | + | |
135 | +case "${UNAME_SYSTEM}" in | |
136 | +Linux|GNU|GNU/*) | |
137 | + # If the system lacks a compiler, then just pick glibc. | |
138 | + # We could probably try harder. | |
139 | + LIBC=gnu | |
140 | + | |
141 | + eval $set_cc_for_build | |
142 | + cat <<-EOF > $dummy.c | |
143 | + #include <features.h> | |
144 | + #if defined(__UCLIBC__) | |
145 | + LIBC=uclibc | |
146 | + #elif defined(__dietlibc__) | |
147 | + LIBC=dietlibc | |
148 | + #else | |
149 | + LIBC=gnu | |
150 | + #endif | |
151 | + EOF | |
152 | + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` | |
153 | + ;; | |
154 | +esac | |
155 | + | |
156 | +# Note: order is significant - the case branches are not exclusive. | |
157 | + | |
158 | +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |
159 | + *:NetBSD:*:*) | |
160 | + # NetBSD (nbsd) targets should (where applicable) match one or | |
161 | + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, | |
162 | + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently | |
163 | + # switched to ELF, *-*-netbsd* would select the old | |
164 | + # object file format. This provides both forward | |
165 | + # compatibility and a consistent mechanism for selecting the | |
166 | + # object file format. | |
167 | + # | |
168 | + # Note: NetBSD doesn't particularly care about the vendor | |
169 | + # portion of the name. We always set it to "unknown". | |
170 | + sysctl="sysctl -n hw.machine_arch" | |
171 | + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ | |
172 | + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` | |
173 | + case "${UNAME_MACHINE_ARCH}" in | |
174 | + armeb) machine=armeb-unknown ;; | |
175 | + arm*) machine=arm-unknown ;; | |
176 | + sh3el) machine=shl-unknown ;; | |
177 | + sh3eb) machine=sh-unknown ;; | |
178 | + sh5el) machine=sh5le-unknown ;; | |
179 | + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; | |
180 | + esac | |
181 | + # The Operating System including object format, if it has switched | |
182 | + # to ELF recently, or will in the future. | |
183 | + case "${UNAME_MACHINE_ARCH}" in | |
184 | + arm*|i386|m68k|ns32k|sh3*|sparc|vax) | |
185 | + eval $set_cc_for_build | |
186 | + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | |
187 | + | grep -q __ELF__ | |
188 | + then | |
189 | + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). | |
190 | + # Return netbsd for either. FIX? | |
191 | + os=netbsd | |
192 | + else | |
193 | + os=netbsdelf | |
194 | + fi | |
195 | + ;; | |
196 | + *) | |
197 | + os=netbsd | |
198 | + ;; | |
199 | + esac | |
200 | + # The OS release | |
201 | + # Debian GNU/NetBSD machines have a different userland, and | |
202 | + # thus, need a distinct triplet. However, they do not need | |
203 | + # kernel version information, so it can be replaced with a | |
204 | + # suitable tag, in the style of linux-gnu. | |
205 | + case "${UNAME_VERSION}" in | |
206 | + Debian*) | |
207 | + release='-gnu' | |
208 | + ;; | |
209 | + *) | |
210 | + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | |
211 | + ;; | |
212 | + esac | |
213 | + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | |
214 | + # contains redundant information, the shorter form: | |
215 | + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | |
216 | + echo "${machine}-${os}${release}" | |
217 | + exit ;; | |
218 | + *:Bitrig:*:*) | |
219 | + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` | |
220 | + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} | |
221 | + exit ;; | |
222 | + *:OpenBSD:*:*) | |
223 | + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` | |
224 | + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} | |
225 | + exit ;; | |
226 | + *:ekkoBSD:*:*) | |
227 | + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} | |
228 | + exit ;; | |
229 | + *:SolidBSD:*:*) | |
230 | + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} | |
231 | + exit ;; | |
232 | + macppc:MirBSD:*:*) | |
233 | + echo powerpc-unknown-mirbsd${UNAME_RELEASE} | |
234 | + exit ;; | |
235 | + *:MirBSD:*:*) | |
236 | + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} | |
237 | + exit ;; | |
238 | + alpha:OSF1:*:*) | |
239 | + case $UNAME_RELEASE in | |
240 | + *4.0) | |
241 | + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` | |
242 | + ;; | |
243 | + *5.*) | |
244 | + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | |
245 | + ;; | |
246 | + esac | |
247 | + # According to Compaq, /usr/sbin/psrinfo has been available on | |
248 | + # OSF/1 and Tru64 systems produced since 1995. I hope that | |
249 | + # covers most systems running today. This code pipes the CPU | |
250 | + # types through head -n 1, so we only detect the type of CPU 0. | |
251 | + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` | |
252 | + case "$ALPHA_CPU_TYPE" in | |
253 | + "EV4 (21064)") | |
254 | + UNAME_MACHINE="alpha" ;; | |
255 | + "EV4.5 (21064)") | |
256 | + UNAME_MACHINE="alpha" ;; | |
257 | + "LCA4 (21066/21068)") | |
258 | + UNAME_MACHINE="alpha" ;; | |
259 | + "EV5 (21164)") | |
260 | + UNAME_MACHINE="alphaev5" ;; | |
261 | + "EV5.6 (21164A)") | |
262 | + UNAME_MACHINE="alphaev56" ;; | |
263 | + "EV5.6 (21164PC)") | |
264 | + UNAME_MACHINE="alphapca56" ;; | |
265 | + "EV5.7 (21164PC)") | |
266 | + UNAME_MACHINE="alphapca57" ;; | |
267 | + "EV6 (21264)") | |
268 | + UNAME_MACHINE="alphaev6" ;; | |
269 | + "EV6.7 (21264A)") | |
270 | + UNAME_MACHINE="alphaev67" ;; | |
271 | + "EV6.8CB (21264C)") | |
272 | + UNAME_MACHINE="alphaev68" ;; | |
273 | + "EV6.8AL (21264B)") | |
274 | + UNAME_MACHINE="alphaev68" ;; | |
275 | + "EV6.8CX (21264D)") | |
276 | + UNAME_MACHINE="alphaev68" ;; | |
277 | + "EV6.9A (21264/EV69A)") | |
278 | + UNAME_MACHINE="alphaev69" ;; | |
279 | + "EV7 (21364)") | |
280 | + UNAME_MACHINE="alphaev7" ;; | |
281 | + "EV7.9 (21364A)") | |
282 | + UNAME_MACHINE="alphaev79" ;; | |
283 | + esac | |
284 | + # A Pn.n version is a patched version. | |
285 | + # A Vn.n version is a released version. | |
286 | + # A Tn.n version is a released field test version. | |
287 | + # A Xn.n version is an unreleased experimental baselevel. | |
288 | + # 1.2 uses "1.2" for uname -r. | |
289 | + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | |
290 | + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | |
291 | + exitcode=$? | |
292 | + trap '' 0 | |
293 | + exit $exitcode ;; | |
294 | + Alpha\ *:Windows_NT*:*) | |
295 | + # How do we know it's Interix rather than the generic POSIX subsystem? | |
296 | + # Should we change UNAME_MACHINE based on the output of uname instead | |
297 | + # of the specific Alpha model? | |
298 | + echo alpha-pc-interix | |
299 | + exit ;; | |
300 | + 21064:Windows_NT:50:3) | |
301 | + echo alpha-dec-winnt3.5 | |
302 | + exit ;; | |
303 | + Amiga*:UNIX_System_V:4.0:*) | |
304 | + echo m68k-unknown-sysv4 | |
305 | + exit ;; | |
306 | + *:[Aa]miga[Oo][Ss]:*:*) | |
307 | + echo ${UNAME_MACHINE}-unknown-amigaos | |
308 | + exit ;; | |
309 | + *:[Mm]orph[Oo][Ss]:*:*) | |
310 | + echo ${UNAME_MACHINE}-unknown-morphos | |
311 | + exit ;; | |
312 | + *:OS/390:*:*) | |
313 | + echo i370-ibm-openedition | |
314 | + exit ;; | |
315 | + *:z/VM:*:*) | |
316 | + echo s390-ibm-zvmoe | |
317 | + exit ;; | |
318 | + *:OS400:*:*) | |
319 | + echo powerpc-ibm-os400 | |
320 | + exit ;; | |
321 | + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) | |
322 | + echo arm-acorn-riscix${UNAME_RELEASE} | |
323 | + exit ;; | |
324 | + arm*:riscos:*:*|arm*:RISCOS:*:*) | |
325 | + echo arm-unknown-riscos | |
326 | + exit ;; | |
327 | + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) | |
328 | + echo hppa1.1-hitachi-hiuxmpp | |
329 | + exit ;; | |
330 | + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) | |
331 | + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. | |
332 | + if test "`(/bin/universe) 2>/dev/null`" = att ; then | |
333 | + echo pyramid-pyramid-sysv3 | |
334 | + else | |
335 | + echo pyramid-pyramid-bsd | |
336 | + fi | |
337 | + exit ;; | |
338 | + NILE*:*:*:dcosx) | |
339 | + echo pyramid-pyramid-svr4 | |
340 | + exit ;; | |
341 | + DRS?6000:unix:4.0:6*) | |
342 | + echo sparc-icl-nx6 | |
343 | + exit ;; | |
344 | + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) | |
345 | + case `/usr/bin/uname -p` in | |
346 | + sparc) echo sparc-icl-nx7; exit ;; | |
347 | + esac ;; | |
348 | + s390x:SunOS:*:*) | |
349 | + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
350 | + exit ;; | |
351 | + sun4H:SunOS:5.*:*) | |
352 | + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
353 | + exit ;; | |
354 | + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) | |
355 | + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
356 | + exit ;; | |
357 | + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) | |
358 | + echo i386-pc-auroraux${UNAME_RELEASE} | |
359 | + exit ;; | |
360 | + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) | |
361 | + eval $set_cc_for_build | |
362 | + SUN_ARCH="i386" | |
363 | + # If there is a compiler, see if it is configured for 64-bit objects. | |
364 | + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. | |
365 | + # This test works for both compilers. | |
366 | + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | |
367 | + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
368 | + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
369 | + grep IS_64BIT_ARCH >/dev/null | |
370 | + then | |
371 | + SUN_ARCH="x86_64" | |
372 | + fi | |
373 | + fi | |
374 | + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
375 | + exit ;; | |
376 | + sun4*:SunOS:6*:*) | |
377 | + # According to config.sub, this is the proper way to canonicalize | |
378 | + # SunOS6. Hard to guess exactly what SunOS6 will be like, but | |
379 | + # it's likely to be more like Solaris than SunOS4. | |
380 | + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
381 | + exit ;; | |
382 | + sun4*:SunOS:*:*) | |
383 | + case "`/usr/bin/arch -k`" in | |
384 | + Series*|S4*) | |
385 | + UNAME_RELEASE=`uname -v` | |
386 | + ;; | |
387 | + esac | |
388 | + # Japanese Language versions have a version number like `4.1.3-JL'. | |
389 | + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` | |
390 | + exit ;; | |
391 | + sun3*:SunOS:*:*) | |
392 | + echo m68k-sun-sunos${UNAME_RELEASE} | |
393 | + exit ;; | |
394 | + sun*:*:4.2BSD:*) | |
395 | + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` | |
396 | + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 | |
397 | + case "`/bin/arch`" in | |
398 | + sun3) | |
399 | + echo m68k-sun-sunos${UNAME_RELEASE} | |
400 | + ;; | |
401 | + sun4) | |
402 | + echo sparc-sun-sunos${UNAME_RELEASE} | |
403 | + ;; | |
404 | + esac | |
405 | + exit ;; | |
406 | + aushp:SunOS:*:*) | |
407 | + echo sparc-auspex-sunos${UNAME_RELEASE} | |
408 | + exit ;; | |
409 | + # The situation for MiNT is a little confusing. The machine name | |
410 | + # can be virtually everything (everything which is not | |
411 | + # "atarist" or "atariste" at least should have a processor | |
412 | + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" | |
413 | + # to the lowercase version "mint" (or "freemint"). Finally | |
414 | + # the system name "TOS" denotes a system which is actually not | |
415 | + # MiNT. But MiNT is downward compatible to TOS, so this should | |
416 | + # be no problem. | |
417 | + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) | |
418 | + echo m68k-atari-mint${UNAME_RELEASE} | |
419 | + exit ;; | |
420 | + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) | |
421 | + echo m68k-atari-mint${UNAME_RELEASE} | |
422 | + exit ;; | |
423 | + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) | |
424 | + echo m68k-atari-mint${UNAME_RELEASE} | |
425 | + exit ;; | |
426 | + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) | |
427 | + echo m68k-milan-mint${UNAME_RELEASE} | |
428 | + exit ;; | |
429 | + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) | |
430 | + echo m68k-hades-mint${UNAME_RELEASE} | |
431 | + exit ;; | |
432 | + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) | |
433 | + echo m68k-unknown-mint${UNAME_RELEASE} | |
434 | + exit ;; | |
435 | + m68k:machten:*:*) | |
436 | + echo m68k-apple-machten${UNAME_RELEASE} | |
437 | + exit ;; | |
438 | + powerpc:machten:*:*) | |
439 | + echo powerpc-apple-machten${UNAME_RELEASE} | |
440 | + exit ;; | |
441 | + RISC*:Mach:*:*) | |
442 | + echo mips-dec-mach_bsd4.3 | |
443 | + exit ;; | |
444 | + RISC*:ULTRIX:*:*) | |
445 | + echo mips-dec-ultrix${UNAME_RELEASE} | |
446 | + exit ;; | |
447 | + VAX*:ULTRIX*:*:*) | |
448 | + echo vax-dec-ultrix${UNAME_RELEASE} | |
449 | + exit ;; | |
450 | + 2020:CLIX:*:* | 2430:CLIX:*:*) | |
451 | + echo clipper-intergraph-clix${UNAME_RELEASE} | |
452 | + exit ;; | |
453 | + mips:*:*:UMIPS | mips:*:*:RISCos) | |
454 | + eval $set_cc_for_build | |
455 | + sed 's/^ //' << EOF >$dummy.c | |
456 | +#ifdef __cplusplus | |
457 | +#include <stdio.h> /* for printf() prototype */ | |
458 | + int main (int argc, char *argv[]) { | |
459 | +#else | |
460 | + int main (argc, argv) int argc; char *argv[]; { | |
461 | +#endif | |
462 | + #if defined (host_mips) && defined (MIPSEB) | |
463 | + #if defined (SYSTYPE_SYSV) | |
464 | + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); | |
465 | + #endif | |
466 | + #if defined (SYSTYPE_SVR4) | |
467 | + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); | |
468 | + #endif | |
469 | + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) | |
470 | + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); | |
471 | + #endif | |
472 | + #endif | |
473 | + exit (-1); | |
474 | + } | |
475 | +EOF | |
476 | + $CC_FOR_BUILD -o $dummy $dummy.c && | |
477 | + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && | |
478 | + SYSTEM_NAME=`$dummy $dummyarg` && | |
479 | + { echo "$SYSTEM_NAME"; exit; } | |
480 | + echo mips-mips-riscos${UNAME_RELEASE} | |
481 | + exit ;; | |
482 | + Motorola:PowerMAX_OS:*:*) | |
483 | + echo powerpc-motorola-powermax | |
484 | + exit ;; | |
485 | + Motorola:*:4.3:PL8-*) | |
486 | + echo powerpc-harris-powermax | |
487 | + exit ;; | |
488 | + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) | |
489 | + echo powerpc-harris-powermax | |
490 | + exit ;; | |
491 | + Night_Hawk:Power_UNIX:*:*) | |
492 | + echo powerpc-harris-powerunix | |
493 | + exit ;; | |
494 | + m88k:CX/UX:7*:*) | |
495 | + echo m88k-harris-cxux7 | |
496 | + exit ;; | |
497 | + m88k:*:4*:R4*) | |
498 | + echo m88k-motorola-sysv4 | |
499 | + exit ;; | |
500 | + m88k:*:3*:R3*) | |
501 | + echo m88k-motorola-sysv3 | |
502 | + exit ;; | |
503 | + AViiON:dgux:*:*) | |
504 | + # DG/UX returns AViiON for all architectures | |
505 | + UNAME_PROCESSOR=`/usr/bin/uname -p` | |
506 | + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] | |
507 | + then | |
508 | + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ | |
509 | + [ ${TARGET_BINARY_INTERFACE}x = x ] | |
510 | + then | |
511 | + echo m88k-dg-dgux${UNAME_RELEASE} | |
512 | + else | |
513 | + echo m88k-dg-dguxbcs${UNAME_RELEASE} | |
514 | + fi | |
515 | + else | |
516 | + echo i586-dg-dgux${UNAME_RELEASE} | |
517 | + fi | |
518 | + exit ;; | |
519 | + M88*:DolphinOS:*:*) # DolphinOS (SVR3) | |
520 | + echo m88k-dolphin-sysv3 | |
521 | + exit ;; | |
522 | + M88*:*:R3*:*) | |
523 | + # Delta 88k system running SVR3 | |
524 | + echo m88k-motorola-sysv3 | |
525 | + exit ;; | |
526 | + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) | |
527 | + echo m88k-tektronix-sysv3 | |
528 | + exit ;; | |
529 | + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) | |
530 | + echo m68k-tektronix-bsd | |
531 | + exit ;; | |
532 | + *:IRIX*:*:*) | |
533 | + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` | |
534 | + exit ;; | |
535 | + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. | |
536 | + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id | |
537 | + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | |
538 | + i*86:AIX:*:*) | |
539 | + echo i386-ibm-aix | |
540 | + exit ;; | |
541 | + ia64:AIX:*:*) | |
542 | + if [ -x /usr/bin/oslevel ] ; then | |
543 | + IBM_REV=`/usr/bin/oslevel` | |
544 | + else | |
545 | + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | |
546 | + fi | |
547 | + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} | |
548 | + exit ;; | |
549 | + *:AIX:2:3) | |
550 | + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then | |
551 | + eval $set_cc_for_build | |
552 | + sed 's/^ //' << EOF >$dummy.c | |
553 | + #include <sys/systemcfg.h> | |
554 | + | |
555 | + main() | |
556 | + { | |
557 | + if (!__power_pc()) | |
558 | + exit(1); | |
559 | + puts("powerpc-ibm-aix3.2.5"); | |
560 | + exit(0); | |
561 | + } | |
562 | +EOF | |
563 | + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` | |
564 | + then | |
565 | + echo "$SYSTEM_NAME" | |
566 | + else | |
567 | + echo rs6000-ibm-aix3.2.5 | |
568 | + fi | |
569 | + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then | |
570 | + echo rs6000-ibm-aix3.2.4 | |
571 | + else | |
572 | + echo rs6000-ibm-aix3.2 | |
573 | + fi | |
574 | + exit ;; | |
575 | + *:AIX:*:[4567]) | |
576 | + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` | |
577 | + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then | |
578 | + IBM_ARCH=rs6000 | |
579 | + else | |
580 | + IBM_ARCH=powerpc | |
581 | + fi | |
582 | + if [ -x /usr/bin/oslevel ] ; then | |
583 | + IBM_REV=`/usr/bin/oslevel` | |
584 | + else | |
585 | + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | |
586 | + fi | |
587 | + echo ${IBM_ARCH}-ibm-aix${IBM_REV} | |
588 | + exit ;; | |
589 | + *:AIX:*:*) | |
590 | + echo rs6000-ibm-aix | |
591 | + exit ;; | |
592 | + ibmrt:4.4BSD:*|romp-ibm:BSD:*) | |
593 | + echo romp-ibm-bsd4.4 | |
594 | + exit ;; | |
595 | + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and | |
596 | + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to | |
597 | + exit ;; # report: romp-ibm BSD 4.3 | |
598 | + *:BOSX:*:*) | |
599 | + echo rs6000-bull-bosx | |
600 | + exit ;; | |
601 | + DPX/2?00:B.O.S.:*:*) | |
602 | + echo m68k-bull-sysv3 | |
603 | + exit ;; | |
604 | + 9000/[34]??:4.3bsd:1.*:*) | |
605 | + echo m68k-hp-bsd | |
606 | + exit ;; | |
607 | + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) | |
608 | + echo m68k-hp-bsd4.4 | |
609 | + exit ;; | |
610 | + 9000/[34678]??:HP-UX:*:*) | |
611 | + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
612 | + case "${UNAME_MACHINE}" in | |
613 | + 9000/31? ) HP_ARCH=m68000 ;; | |
614 | + 9000/[34]?? ) HP_ARCH=m68k ;; | |
615 | + 9000/[678][0-9][0-9]) | |
616 | + if [ -x /usr/bin/getconf ]; then | |
617 | + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` | |
618 | + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | |
619 | + case "${sc_cpu_version}" in | |
620 | + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 | |
621 | + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 | |
622 | + 532) # CPU_PA_RISC2_0 | |
623 | + case "${sc_kernel_bits}" in | |
624 | + 32) HP_ARCH="hppa2.0n" ;; | |
625 | + 64) HP_ARCH="hppa2.0w" ;; | |
626 | + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 | |
627 | + esac ;; | |
628 | + esac | |
629 | + fi | |
630 | + if [ "${HP_ARCH}" = "" ]; then | |
631 | + eval $set_cc_for_build | |
632 | + sed 's/^ //' << EOF >$dummy.c | |
633 | + | |
634 | + #define _HPUX_SOURCE | |
635 | + #include <stdlib.h> | |
636 | + #include <unistd.h> | |
637 | + | |
638 | + int main () | |
639 | + { | |
640 | + #if defined(_SC_KERNEL_BITS) | |
641 | + long bits = sysconf(_SC_KERNEL_BITS); | |
642 | + #endif | |
643 | + long cpu = sysconf (_SC_CPU_VERSION); | |
644 | + | |
645 | + switch (cpu) | |
646 | + { | |
647 | + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; | |
648 | + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; | |
649 | + case CPU_PA_RISC2_0: | |
650 | + #if defined(_SC_KERNEL_BITS) | |
651 | + switch (bits) | |
652 | + { | |
653 | + case 64: puts ("hppa2.0w"); break; | |
654 | + case 32: puts ("hppa2.0n"); break; | |
655 | + default: puts ("hppa2.0"); break; | |
656 | + } break; | |
657 | + #else /* !defined(_SC_KERNEL_BITS) */ | |
658 | + puts ("hppa2.0"); break; | |
659 | + #endif | |
660 | + default: puts ("hppa1.0"); break; | |
661 | + } | |
662 | + exit (0); | |
663 | + } | |
664 | +EOF | |
665 | + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` | |
666 | + test -z "$HP_ARCH" && HP_ARCH=hppa | |
667 | + fi ;; | |
668 | + esac | |
669 | + if [ ${HP_ARCH} = "hppa2.0w" ] | |
670 | + then | |
671 | + eval $set_cc_for_build | |
672 | + | |
673 | + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating | |
674 | + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler | |
675 | + # generating 64-bit code. GNU and HP use different nomenclature: | |
676 | + # | |
677 | + # $ CC_FOR_BUILD=cc ./config.guess | |
678 | + # => hppa2.0w-hp-hpux11.23 | |
679 | + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess | |
680 | + # => hppa64-hp-hpux11.23 | |
681 | + | |
682 | + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | | |
683 | + grep -q __LP64__ | |
684 | + then | |
685 | + HP_ARCH="hppa2.0w" | |
686 | + else | |
687 | + HP_ARCH="hppa64" | |
688 | + fi | |
689 | + fi | |
690 | + echo ${HP_ARCH}-hp-hpux${HPUX_REV} | |
691 | + exit ;; | |
692 | + ia64:HP-UX:*:*) | |
693 | + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
694 | + echo ia64-hp-hpux${HPUX_REV} | |
695 | + exit ;; | |
696 | + 3050*:HI-UX:*:*) | |
697 | + eval $set_cc_for_build | |
698 | + sed 's/^ //' << EOF >$dummy.c | |
699 | + #include <unistd.h> | |
700 | + int | |
701 | + main () | |
702 | + { | |
703 | + long cpu = sysconf (_SC_CPU_VERSION); | |
704 | + /* The order matters, because CPU_IS_HP_MC68K erroneously returns | |
705 | + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct | |
706 | + results, however. */ | |
707 | + if (CPU_IS_PA_RISC (cpu)) | |
708 | + { | |
709 | + switch (cpu) | |
710 | + { | |
711 | + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; | |
712 | + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; | |
713 | + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; | |
714 | + default: puts ("hppa-hitachi-hiuxwe2"); break; | |
715 | + } | |
716 | + } | |
717 | + else if (CPU_IS_HP_MC68K (cpu)) | |
718 | + puts ("m68k-hitachi-hiuxwe2"); | |
719 | + else puts ("unknown-hitachi-hiuxwe2"); | |
720 | + exit (0); | |
721 | + } | |
722 | +EOF | |
723 | + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && | |
724 | + { echo "$SYSTEM_NAME"; exit; } | |
725 | + echo unknown-hitachi-hiuxwe2 | |
726 | + exit ;; | |
727 | + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) | |
728 | + echo hppa1.1-hp-bsd | |
729 | + exit ;; | |
730 | + 9000/8??:4.3bsd:*:*) | |
731 | + echo hppa1.0-hp-bsd | |
732 | + exit ;; | |
733 | + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) | |
734 | + echo hppa1.0-hp-mpeix | |
735 | + exit ;; | |
736 | + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) | |
737 | + echo hppa1.1-hp-osf | |
738 | + exit ;; | |
739 | + hp8??:OSF1:*:*) | |
740 | + echo hppa1.0-hp-osf | |
741 | + exit ;; | |
742 | + i*86:OSF1:*:*) | |
743 | + if [ -x /usr/sbin/sysversion ] ; then | |
744 | + echo ${UNAME_MACHINE}-unknown-osf1mk | |
745 | + else | |
746 | + echo ${UNAME_MACHINE}-unknown-osf1 | |
747 | + fi | |
748 | + exit ;; | |
749 | + parisc*:Lites*:*:*) | |
750 | + echo hppa1.1-hp-lites | |
751 | + exit ;; | |
752 | + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) | |
753 | + echo c1-convex-bsd | |
754 | + exit ;; | |
755 | + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) | |
756 | + if getsysinfo -f scalar_acc | |
757 | + then echo c32-convex-bsd | |
758 | + else echo c2-convex-bsd | |
759 | + fi | |
760 | + exit ;; | |
761 | + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) | |
762 | + echo c34-convex-bsd | |
763 | + exit ;; | |
764 | + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) | |
765 | + echo c38-convex-bsd | |
766 | + exit ;; | |
767 | + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) | |
768 | + echo c4-convex-bsd | |
769 | + exit ;; | |
770 | + CRAY*Y-MP:*:*:*) | |
771 | + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
772 | + exit ;; | |
773 | + CRAY*[A-Z]90:*:*:*) | |
774 | + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | |
775 | + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ | |
776 | + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ | |
777 | + -e 's/\.[^.]*$/.X/' | |
778 | + exit ;; | |
779 | + CRAY*TS:*:*:*) | |
780 | + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
781 | + exit ;; | |
782 | + CRAY*T3E:*:*:*) | |
783 | + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
784 | + exit ;; | |
785 | + CRAY*SV1:*:*:*) | |
786 | + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
787 | + exit ;; | |
788 | + *:UNICOS/mp:*:*) | |
789 | + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
790 | + exit ;; | |
791 | + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) | |
792 | + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | |
793 | + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
794 | + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | |
795 | + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
796 | + exit ;; | |
797 | + 5000:UNIX_System_V:4.*:*) | |
798 | + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
799 | + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` | |
800 | + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
801 | + exit ;; | |
802 | + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) | |
803 | + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | |
804 | + exit ;; | |
805 | + sparc*:BSD/OS:*:*) | |
806 | + echo sparc-unknown-bsdi${UNAME_RELEASE} | |
807 | + exit ;; | |
808 | + *:BSD/OS:*:*) | |
809 | + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} | |
810 | + exit ;; | |
811 | + *:FreeBSD:*:*) | |
812 | + UNAME_PROCESSOR=`/usr/bin/uname -p` | |
813 | + case ${UNAME_PROCESSOR} in | |
814 | + amd64) | |
815 | + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | |
816 | + *) | |
817 | + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | |
818 | + esac | |
819 | + exit ;; | |
820 | + i*:CYGWIN*:*) | |
821 | + echo ${UNAME_MACHINE}-pc-cygwin | |
822 | + exit ;; | |
823 | + *:MINGW64*:*) | |
824 | + echo ${UNAME_MACHINE}-pc-mingw64 | |
825 | + exit ;; | |
826 | + *:MINGW*:*) | |
827 | + echo ${UNAME_MACHINE}-pc-mingw32 | |
828 | + exit ;; | |
829 | + i*:MSYS*:*) | |
830 | + echo ${UNAME_MACHINE}-pc-msys | |
831 | + exit ;; | |
832 | + i*:windows32*:*) | |
833 | + # uname -m includes "-pc" on this system. | |
834 | + echo ${UNAME_MACHINE}-mingw32 | |
835 | + exit ;; | |
836 | + i*:PW*:*) | |
837 | + echo ${UNAME_MACHINE}-pc-pw32 | |
838 | + exit ;; | |
839 | + *:Interix*:*) | |
840 | + case ${UNAME_MACHINE} in | |
841 | + x86) | |
842 | + echo i586-pc-interix${UNAME_RELEASE} | |
843 | + exit ;; | |
844 | + authenticamd | genuineintel | EM64T) | |
845 | + echo x86_64-unknown-interix${UNAME_RELEASE} | |
846 | + exit ;; | |
847 | + IA64) | |
848 | + echo ia64-unknown-interix${UNAME_RELEASE} | |
849 | + exit ;; | |
850 | + esac ;; | |
851 | + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) | |
852 | + echo i${UNAME_MACHINE}-pc-mks | |
853 | + exit ;; | |
854 | + 8664:Windows_NT:*) | |
855 | + echo x86_64-pc-mks | |
856 | + exit ;; | |
857 | + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) | |
858 | + # How do we know it's Interix rather than the generic POSIX subsystem? | |
859 | + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we | |
860 | + # UNAME_MACHINE based on the output of uname instead of i386? | |
861 | + echo i586-pc-interix | |
862 | + exit ;; | |
863 | + i*:UWIN*:*) | |
864 | + echo ${UNAME_MACHINE}-pc-uwin | |
865 | + exit ;; | |
866 | + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) | |
867 | + echo x86_64-unknown-cygwin | |
868 | + exit ;; | |
869 | + p*:CYGWIN*:*) | |
870 | + echo powerpcle-unknown-cygwin | |
871 | + exit ;; | |
872 | + prep*:SunOS:5.*:*) | |
873 | + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
874 | + exit ;; | |
875 | + *:GNU:*:*) | |
876 | + # the GNU system | |
877 | + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | |
878 | + exit ;; | |
879 | + *:GNU/*:*:*) | |
880 | + # other systems with GNU libc and userland | |
881 | + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} | |
882 | + exit ;; | |
883 | + i*86:Minix:*:*) | |
884 | + echo ${UNAME_MACHINE}-pc-minix | |
885 | + exit ;; | |
886 | + aarch64:Linux:*:*) | |
887 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
888 | + exit ;; | |
889 | + aarch64_be:Linux:*:*) | |
890 | + UNAME_MACHINE=aarch64_be | |
891 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
892 | + exit ;; | |
893 | + alpha:Linux:*:*) | |
894 | + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | |
895 | + EV5) UNAME_MACHINE=alphaev5 ;; | |
896 | + EV56) UNAME_MACHINE=alphaev56 ;; | |
897 | + PCA56) UNAME_MACHINE=alphapca56 ;; | |
898 | + PCA57) UNAME_MACHINE=alphapca56 ;; | |
899 | + EV6) UNAME_MACHINE=alphaev6 ;; | |
900 | + EV67) UNAME_MACHINE=alphaev67 ;; | |
901 | + EV68*) UNAME_MACHINE=alphaev68 ;; | |
902 | + esac | |
903 | + objdump --private-headers /bin/sh | grep -q ld.so.1 | |
904 | + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi | |
905 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
906 | + exit ;; | |
907 | + arc:Linux:*:* | arceb:Linux:*:*) | |
908 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
909 | + exit ;; | |
910 | + arm*:Linux:*:*) | |
911 | + eval $set_cc_for_build | |
912 | + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | |
913 | + | grep -q __ARM_EABI__ | |
914 | + then | |
915 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
916 | + else | |
917 | + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | |
918 | + | grep -q __ARM_PCS_VFP | |
919 | + then | |
920 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi | |
921 | + else | |
922 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf | |
923 | + fi | |
924 | + fi | |
925 | + exit ;; | |
926 | + avr32*:Linux:*:*) | |
927 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
928 | + exit ;; | |
929 | + cris:Linux:*:*) | |
930 | + echo ${UNAME_MACHINE}-axis-linux-${LIBC} | |
931 | + exit ;; | |
932 | + crisv32:Linux:*:*) | |
933 | + echo ${UNAME_MACHINE}-axis-linux-${LIBC} | |
934 | + exit ;; | |
935 | + frv:Linux:*:*) | |
936 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
937 | + exit ;; | |
938 | + hexagon:Linux:*:*) | |
939 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
940 | + exit ;; | |
941 | + i*86:Linux:*:*) | |
942 | + echo ${UNAME_MACHINE}-pc-linux-${LIBC} | |
943 | + exit ;; | |
944 | + ia64:Linux:*:*) | |
945 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
946 | + exit ;; | |
947 | + m32r*:Linux:*:*) | |
948 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
949 | + exit ;; | |
950 | + m68*:Linux:*:*) | |
951 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
952 | + exit ;; | |
953 | + mips:Linux:*:* | mips64:Linux:*:*) | |
954 | + eval $set_cc_for_build | |
955 | + sed 's/^ //' << EOF >$dummy.c | |
956 | + #undef CPU | |
957 | + #undef ${UNAME_MACHINE} | |
958 | + #undef ${UNAME_MACHINE}el | |
959 | + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | |
960 | + CPU=${UNAME_MACHINE}el | |
961 | + #else | |
962 | + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | |
963 | + CPU=${UNAME_MACHINE} | |
964 | + #else | |
965 | + CPU= | |
966 | + #endif | |
967 | + #endif | |
968 | +EOF | |
969 | + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` | |
970 | + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } | |
971 | + ;; | |
972 | + or1k:Linux:*:*) | |
973 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
974 | + exit ;; | |
975 | + or32:Linux:*:*) | |
976 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
977 | + exit ;; | |
978 | + padre:Linux:*:*) | |
979 | + echo sparc-unknown-linux-${LIBC} | |
980 | + exit ;; | |
981 | + parisc64:Linux:*:* | hppa64:Linux:*:*) | |
982 | + echo hppa64-unknown-linux-${LIBC} | |
983 | + exit ;; | |
984 | + parisc:Linux:*:* | hppa:Linux:*:*) | |
985 | + # Look for CPU level | |
986 | + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in | |
987 | + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; | |
988 | + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; | |
989 | + *) echo hppa-unknown-linux-${LIBC} ;; | |
990 | + esac | |
991 | + exit ;; | |
992 | + ppc64:Linux:*:*) | |
993 | + echo powerpc64-unknown-linux-${LIBC} | |
994 | + exit ;; | |
995 | + ppc:Linux:*:*) | |
996 | + echo powerpc-unknown-linux-${LIBC} | |
997 | + exit ;; | |
998 | + ppc64le:Linux:*:*) | |
999 | + echo powerpc64le-unknown-linux-${LIBC} | |
1000 | + exit ;; | |
1001 | + ppcle:Linux:*:*) | |
1002 | + echo powerpcle-unknown-linux-${LIBC} | |
1003 | + exit ;; | |
1004 | + s390:Linux:*:* | s390x:Linux:*:*) | |
1005 | + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} | |
1006 | + exit ;; | |
1007 | + sh64*:Linux:*:*) | |
1008 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1009 | + exit ;; | |
1010 | + sh*:Linux:*:*) | |
1011 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1012 | + exit ;; | |
1013 | + sparc:Linux:*:* | sparc64:Linux:*:*) | |
1014 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1015 | + exit ;; | |
1016 | + tile*:Linux:*:*) | |
1017 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1018 | + exit ;; | |
1019 | + vax:Linux:*:*) | |
1020 | + echo ${UNAME_MACHINE}-dec-linux-${LIBC} | |
1021 | + exit ;; | |
1022 | + x86_64:Linux:*:*) | |
1023 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1024 | + exit ;; | |
1025 | + xtensa*:Linux:*:*) | |
1026 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1027 | + exit ;; | |
1028 | + i*86:DYNIX/ptx:4*:*) | |
1029 | + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. | |
1030 | + # earlier versions are messed up and put the nodename in both | |
1031 | + # sysname and nodename. | |
1032 | + echo i386-sequent-sysv4 | |
1033 | + exit ;; | |
1034 | + i*86:UNIX_SV:4.2MP:2.*) | |
1035 | + # Unixware is an offshoot of SVR4, but it has its own version | |
1036 | + # number series starting with 2... | |
1037 | + # I am not positive that other SVR4 systems won't match this, | |
1038 | + # I just have to hope. -- rms. | |
1039 | + # Use sysv4.2uw... so that sysv4* matches it. | |
1040 | + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} | |
1041 | + exit ;; | |
1042 | + i*86:OS/2:*:*) | |
1043 | + # If we were able to find `uname', then EMX Unix compatibility | |
1044 | + # is probably installed. | |
1045 | + echo ${UNAME_MACHINE}-pc-os2-emx | |
1046 | + exit ;; | |
1047 | + i*86:XTS-300:*:STOP) | |
1048 | + echo ${UNAME_MACHINE}-unknown-stop | |
1049 | + exit ;; | |
1050 | + i*86:atheos:*:*) | |
1051 | + echo ${UNAME_MACHINE}-unknown-atheos | |
1052 | + exit ;; | |
1053 | + i*86:syllable:*:*) | |
1054 | + echo ${UNAME_MACHINE}-pc-syllable | |
1055 | + exit ;; | |
1056 | + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) | |
1057 | + echo i386-unknown-lynxos${UNAME_RELEASE} | |
1058 | + exit ;; | |
1059 | + i*86:*DOS:*:*) | |
1060 | + echo ${UNAME_MACHINE}-pc-msdosdjgpp | |
1061 | + exit ;; | |
1062 | + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) | |
1063 | + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` | |
1064 | + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then | |
1065 | + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} | |
1066 | + else | |
1067 | + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} | |
1068 | + fi | |
1069 | + exit ;; | |
1070 | + i*86:*:5:[678]*) | |
1071 | + # UnixWare 7.x, OpenUNIX and OpenServer 6. | |
1072 | + case `/bin/uname -X | grep "^Machine"` in | |
1073 | + *486*) UNAME_MACHINE=i486 ;; | |
1074 | + *Pentium) UNAME_MACHINE=i586 ;; | |
1075 | + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; | |
1076 | + esac | |
1077 | + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} | |
1078 | + exit ;; | |
1079 | + i*86:*:3.2:*) | |
1080 | + if test -f /usr/options/cb.name; then | |
1081 | + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` | |
1082 | + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL | |
1083 | + elif /bin/uname -X 2>/dev/null >/dev/null ; then | |
1084 | + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` | |
1085 | + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 | |
1086 | + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ | |
1087 | + && UNAME_MACHINE=i586 | |
1088 | + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ | |
1089 | + && UNAME_MACHINE=i686 | |
1090 | + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ | |
1091 | + && UNAME_MACHINE=i686 | |
1092 | + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL | |
1093 | + else | |
1094 | + echo ${UNAME_MACHINE}-pc-sysv32 | |
1095 | + fi | |
1096 | + exit ;; | |
1097 | + pc:*:*:*) | |
1098 | + # Left here for compatibility: | |
1099 | + # uname -m prints for DJGPP always 'pc', but it prints nothing about | |
1100 | + # the processor, so we play safe by assuming i586. | |
1101 | + # Note: whatever this is, it MUST be the same as what config.sub | |
1102 | + # prints for the "djgpp" host, or else GDB configury will decide that | |
1103 | + # this is a cross-build. | |
1104 | + echo i586-pc-msdosdjgpp | |
1105 | + exit ;; | |
1106 | + Intel:Mach:3*:*) | |
1107 | + echo i386-pc-mach3 | |
1108 | + exit ;; | |
1109 | + paragon:*:*:*) | |
1110 | + echo i860-intel-osf1 | |
1111 | + exit ;; | |
1112 | + i860:*:4.*:*) # i860-SVR4 | |
1113 | + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then | |
1114 | + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 | |
1115 | + else # Add other i860-SVR4 vendors below as they are discovered. | |
1116 | + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 | |
1117 | + fi | |
1118 | + exit ;; | |
1119 | + mini*:CTIX:SYS*5:*) | |
1120 | + # "miniframe" | |
1121 | + echo m68010-convergent-sysv | |
1122 | + exit ;; | |
1123 | + mc68k:UNIX:SYSTEM5:3.51m) | |
1124 | + echo m68k-convergent-sysv | |
1125 | + exit ;; | |
1126 | + M680?0:D-NIX:5.3:*) | |
1127 | + echo m68k-diab-dnix | |
1128 | + exit ;; | |
1129 | + M68*:*:R3V[5678]*:*) | |
1130 | + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; | |
1131 | + 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) | |
1132 | + OS_REL='' | |
1133 | + test -r /etc/.relid \ | |
1134 | + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | |
1135 | + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1136 | + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | |
1137 | + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | |
1138 | + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | |
1139 | + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) | |
1140 | + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1141 | + && { echo i486-ncr-sysv4; exit; } ;; | |
1142 | + NCR*:*:4.2:* | MPRAS*:*:4.2:*) | |
1143 | + OS_REL='.3' | |
1144 | + test -r /etc/.relid \ | |
1145 | + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | |
1146 | + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1147 | + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | |
1148 | + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | |
1149 | + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } | |
1150 | + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ | |
1151 | + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | |
1152 | + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) | |
1153 | + echo m68k-unknown-lynxos${UNAME_RELEASE} | |
1154 | + exit ;; | |
1155 | + mc68030:UNIX_System_V:4.*:*) | |
1156 | + echo m68k-atari-sysv4 | |
1157 | + exit ;; | |
1158 | + TSUNAMI:LynxOS:2.*:*) | |
1159 | + echo sparc-unknown-lynxos${UNAME_RELEASE} | |
1160 | + exit ;; | |
1161 | + rs6000:LynxOS:2.*:*) | |
1162 | + echo rs6000-unknown-lynxos${UNAME_RELEASE} | |
1163 | + exit ;; | |
1164 | + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) | |
1165 | + echo powerpc-unknown-lynxos${UNAME_RELEASE} | |
1166 | + exit ;; | |
1167 | + SM[BE]S:UNIX_SV:*:*) | |
1168 | + echo mips-dde-sysv${UNAME_RELEASE} | |
1169 | + exit ;; | |
1170 | + RM*:ReliantUNIX-*:*:*) | |
1171 | + echo mips-sni-sysv4 | |
1172 | + exit ;; | |
1173 | + RM*:SINIX-*:*:*) | |
1174 | + echo mips-sni-sysv4 | |
1175 | + exit ;; | |
1176 | + *:SINIX-*:*:*) | |
1177 | + if uname -p 2>/dev/null >/dev/null ; then | |
1178 | + UNAME_MACHINE=`(uname -p) 2>/dev/null` | |
1179 | + echo ${UNAME_MACHINE}-sni-sysv4 | |
1180 | + else | |
1181 | + echo ns32k-sni-sysv | |
1182 | + fi | |
1183 | + exit ;; | |
1184 | + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | |
1185 | + # says <Richard.M.Bartel@ccMail.Census.GOV> | |
1186 | + echo i586-unisys-sysv4 | |
1187 | + exit ;; | |
1188 | + *:UNIX_System_V:4*:FTX*) | |
1189 | + # From Gerald Hewes <hewes@openmarket.com>. | |
1190 | + # How about differentiating between stratus architectures? -djm | |
1191 | + echo hppa1.1-stratus-sysv4 | |
1192 | + exit ;; | |
1193 | + *:*:*:FTX*) | |
1194 | + # From seanf@swdc.stratus.com. | |
1195 | + echo i860-stratus-sysv4 | |
1196 | + exit ;; | |
1197 | + i*86:VOS:*:*) | |
1198 | + # From Paul.Green@stratus.com. | |
1199 | + echo ${UNAME_MACHINE}-stratus-vos | |
1200 | + exit ;; | |
1201 | + *:VOS:*:*) | |
1202 | + # From Paul.Green@stratus.com. | |
1203 | + echo hppa1.1-stratus-vos | |
1204 | + exit ;; | |
1205 | + mc68*:A/UX:*:*) | |
1206 | + echo m68k-apple-aux${UNAME_RELEASE} | |
1207 | + exit ;; | |
1208 | + news*:NEWS-OS:6*:*) | |
1209 | + echo mips-sony-newsos6 | |
1210 | + exit ;; | |
1211 | + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) | |
1212 | + if [ -d /usr/nec ]; then | |
1213 | + echo mips-nec-sysv${UNAME_RELEASE} | |
1214 | + else | |
1215 | + echo mips-unknown-sysv${UNAME_RELEASE} | |
1216 | + fi | |
1217 | + exit ;; | |
1218 | + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. | |
1219 | + echo powerpc-be-beos | |
1220 | + exit ;; | |
1221 | + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. | |
1222 | + echo powerpc-apple-beos | |
1223 | + exit ;; | |
1224 | + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. | |
1225 | + echo i586-pc-beos | |
1226 | + exit ;; | |
1227 | + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. | |
1228 | + echo i586-pc-haiku | |
1229 | + exit ;; | |
1230 | + x86_64:Haiku:*:*) | |
1231 | + echo x86_64-unknown-haiku | |
1232 | + exit ;; | |
1233 | + SX-4:SUPER-UX:*:*) | |
1234 | + echo sx4-nec-superux${UNAME_RELEASE} | |
1235 | + exit ;; | |
1236 | + SX-5:SUPER-UX:*:*) | |
1237 | + echo sx5-nec-superux${UNAME_RELEASE} | |
1238 | + exit ;; | |
1239 | + SX-6:SUPER-UX:*:*) | |
1240 | + echo sx6-nec-superux${UNAME_RELEASE} | |
1241 | + exit ;; | |
1242 | + SX-7:SUPER-UX:*:*) | |
1243 | + echo sx7-nec-superux${UNAME_RELEASE} | |
1244 | + exit ;; | |
1245 | + SX-8:SUPER-UX:*:*) | |
1246 | + echo sx8-nec-superux${UNAME_RELEASE} | |
1247 | + exit ;; | |
1248 | + SX-8R:SUPER-UX:*:*) | |
1249 | + echo sx8r-nec-superux${UNAME_RELEASE} | |
1250 | + exit ;; | |
1251 | + Power*:Rhapsody:*:*) | |
1252 | + echo powerpc-apple-rhapsody${UNAME_RELEASE} | |
1253 | + exit ;; | |
1254 | + *:Rhapsody:*:*) | |
1255 | + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | |
1256 | + exit ;; | |
1257 | + *:Darwin:*:*) | |
1258 | + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | |
1259 | + eval $set_cc_for_build | |
1260 | + if test "$UNAME_PROCESSOR" = unknown ; then | |
1261 | + UNAME_PROCESSOR=powerpc | |
1262 | + fi | |
1263 | + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | |
1264 | + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
1265 | + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1266 | + grep IS_64BIT_ARCH >/dev/null | |
1267 | + then | |
1268 | + case $UNAME_PROCESSOR in | |
1269 | + i386) UNAME_PROCESSOR=x86_64 ;; | |
1270 | + powerpc) UNAME_PROCESSOR=powerpc64 ;; | |
1271 | + esac | |
1272 | + fi | |
1273 | + fi | |
1274 | + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | |
1275 | + exit ;; | |
1276 | + *:procnto*:*:* | *:QNX:[0123456789]*:*) | |
1277 | + UNAME_PROCESSOR=`uname -p` | |
1278 | + if test "$UNAME_PROCESSOR" = "x86"; then | |
1279 | + UNAME_PROCESSOR=i386 | |
1280 | + UNAME_MACHINE=pc | |
1281 | + fi | |
1282 | + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} | |
1283 | + exit ;; | |
1284 | + *:QNX:*:4*) | |
1285 | + echo i386-pc-qnx | |
1286 | + exit ;; | |
1287 | + NEO-?:NONSTOP_KERNEL:*:*) | |
1288 | + echo neo-tandem-nsk${UNAME_RELEASE} | |
1289 | + exit ;; | |
1290 | + NSE-*:NONSTOP_KERNEL:*:*) | |
1291 | + echo nse-tandem-nsk${UNAME_RELEASE} | |
1292 | + exit ;; | |
1293 | + NSR-?:NONSTOP_KERNEL:*:*) | |
1294 | + echo nsr-tandem-nsk${UNAME_RELEASE} | |
1295 | + exit ;; | |
1296 | + *:NonStop-UX:*:*) | |
1297 | + echo mips-compaq-nonstopux | |
1298 | + exit ;; | |
1299 | + BS2000:POSIX*:*:*) | |
1300 | + echo bs2000-siemens-sysv | |
1301 | + exit ;; | |
1302 | + DS/*:UNIX_System_V:*:*) | |
1303 | + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} | |
1304 | + exit ;; | |
1305 | + *:Plan9:*:*) | |
1306 | + # "uname -m" is not consistent, so use $cputype instead. 386 | |
1307 | + # is converted to i386 for consistency with other x86 | |
1308 | + # operating systems. | |
1309 | + if test "$cputype" = "386"; then | |
1310 | + UNAME_MACHINE=i386 | |
1311 | + else | |
1312 | + UNAME_MACHINE="$cputype" | |
1313 | + fi | |
1314 | + echo ${UNAME_MACHINE}-unknown-plan9 | |
1315 | + exit ;; | |
1316 | + *:TOPS-10:*:*) | |
1317 | + echo pdp10-unknown-tops10 | |
1318 | + exit ;; | |
1319 | + *:TENEX:*:*) | |
1320 | + echo pdp10-unknown-tenex | |
1321 | + exit ;; | |
1322 | + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) | |
1323 | + echo pdp10-dec-tops20 | |
1324 | + exit ;; | |
1325 | + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) | |
1326 | + echo pdp10-xkl-tops20 | |
1327 | + exit ;; | |
1328 | + *:TOPS-20:*:*) | |
1329 | + echo pdp10-unknown-tops20 | |
1330 | + exit ;; | |
1331 | + *:ITS:*:*) | |
1332 | + echo pdp10-unknown-its | |
1333 | + exit ;; | |
1334 | + SEI:*:*:SEIUX) | |
1335 | + echo mips-sei-seiux${UNAME_RELEASE} | |
1336 | + exit ;; | |
1337 | + *:DragonFly:*:*) | |
1338 | + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | |
1339 | + exit ;; | |
1340 | + *:*VMS:*:*) | |
1341 | + UNAME_MACHINE=`(uname -p) 2>/dev/null` | |
1342 | + case "${UNAME_MACHINE}" in | |
1343 | + A*) echo alpha-dec-vms ; exit ;; | |
1344 | + I*) echo ia64-dec-vms ; exit ;; | |
1345 | + V*) echo vax-dec-vms ; exit ;; | |
1346 | + esac ;; | |
1347 | + *:XENIX:*:SysV) | |
1348 | + echo i386-pc-xenix | |
1349 | + exit ;; | |
1350 | + i*86:skyos:*:*) | |
1351 | + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' | |
1352 | + exit ;; | |
1353 | + i*86:rdos:*:*) | |
1354 | + echo ${UNAME_MACHINE}-pc-rdos | |
1355 | + exit ;; | |
1356 | + i*86:AROS:*:*) | |
1357 | + echo ${UNAME_MACHINE}-pc-aros | |
1358 | + exit ;; | |
1359 | + x86_64:VMkernel:*:*) | |
1360 | + echo ${UNAME_MACHINE}-unknown-esx | |
1361 | + exit ;; | |
1362 | +esac | |
1363 | + | |
1364 | +eval $set_cc_for_build | |
1365 | +cat >$dummy.c <<EOF | |
1366 | +#ifdef _SEQUENT_ | |
1367 | +# include <sys/types.h> | |
1368 | +# include <sys/utsname.h> | |
1369 | +#endif | |
1370 | +main () | |
1371 | +{ | |
1372 | +#if defined (sony) | |
1373 | +#if defined (MIPSEB) | |
1374 | + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, | |
1375 | + I don't know.... */ | |
1376 | + printf ("mips-sony-bsd\n"); exit (0); | |
1377 | +#else | |
1378 | +#include <sys/param.h> | |
1379 | + printf ("m68k-sony-newsos%s\n", | |
1380 | +#ifdef NEWSOS4 | |
1381 | + "4" | |
1382 | +#else | |
1383 | + "" | |
1384 | +#endif | |
1385 | + ); exit (0); | |
1386 | +#endif | |
1387 | +#endif | |
1388 | + | |
1389 | +#if defined (__arm) && defined (__acorn) && defined (__unix) | |
1390 | + printf ("arm-acorn-riscix\n"); exit (0); | |
1391 | +#endif | |
1392 | + | |
1393 | +#if defined (hp300) && !defined (hpux) | |
1394 | + printf ("m68k-hp-bsd\n"); exit (0); | |
1395 | +#endif | |
1396 | + | |
1397 | +#if defined (NeXT) | |
1398 | +#if !defined (__ARCHITECTURE__) | |
1399 | +#define __ARCHITECTURE__ "m68k" | |
1400 | +#endif | |
1401 | + int version; | |
1402 | + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; | |
1403 | + if (version < 4) | |
1404 | + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | |
1405 | + else | |
1406 | + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | |
1407 | + exit (0); | |
1408 | +#endif | |
1409 | + | |
1410 | +#if defined (MULTIMAX) || defined (n16) | |
1411 | +#if defined (UMAXV) | |
1412 | + printf ("ns32k-encore-sysv\n"); exit (0); | |
1413 | +#else | |
1414 | +#if defined (CMU) | |
1415 | + printf ("ns32k-encore-mach\n"); exit (0); | |
1416 | +#else | |
1417 | + printf ("ns32k-encore-bsd\n"); exit (0); | |
1418 | +#endif | |
1419 | +#endif | |
1420 | +#endif | |
1421 | + | |
1422 | +#if defined (__386BSD__) | |
1423 | + printf ("i386-pc-bsd\n"); exit (0); | |
1424 | +#endif | |
1425 | + | |
1426 | +#if defined (sequent) | |
1427 | +#if defined (i386) | |
1428 | + printf ("i386-sequent-dynix\n"); exit (0); | |
1429 | +#endif | |
1430 | +#if defined (ns32000) | |
1431 | + printf ("ns32k-sequent-dynix\n"); exit (0); | |
1432 | +#endif | |
1433 | +#endif | |
1434 | + | |
1435 | +#if defined (_SEQUENT_) | |
1436 | + struct utsname un; | |
1437 | + | |
1438 | + uname(&un); | |
1439 | + | |
1440 | + if (strncmp(un.version, "V2", 2) == 0) { | |
1441 | + printf ("i386-sequent-ptx2\n"); exit (0); | |
1442 | + } | |
1443 | + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | |
1444 | + printf ("i386-sequent-ptx1\n"); exit (0); | |
1445 | + } | |
1446 | + printf ("i386-sequent-ptx\n"); exit (0); | |
1447 | + | |
1448 | +#endif | |
1449 | + | |
1450 | +#if defined (vax) | |
1451 | +# if !defined (ultrix) | |
1452 | +# include <sys/param.h> | |
1453 | +# if defined (BSD) | |
1454 | +# if BSD == 43 | |
1455 | + printf ("vax-dec-bsd4.3\n"); exit (0); | |
1456 | +# else | |
1457 | +# if BSD == 199006 | |
1458 | + printf ("vax-dec-bsd4.3reno\n"); exit (0); | |
1459 | +# else | |
1460 | + printf ("vax-dec-bsd\n"); exit (0); | |
1461 | +# endif | |
1462 | +# endif | |
1463 | +# else | |
1464 | + printf ("vax-dec-bsd\n"); exit (0); | |
1465 | +# endif | |
1466 | +# else | |
1467 | + printf ("vax-dec-ultrix\n"); exit (0); | |
1468 | +# endif | |
1469 | +#endif | |
1470 | + | |
1471 | +#if defined (alliant) && defined (i860) | |
1472 | + printf ("i860-alliant-bsd\n"); exit (0); | |
1473 | +#endif | |
1474 | + | |
1475 | + exit (1); | |
1476 | +} | |
1477 | +EOF | |
1478 | + | |
1479 | +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && | |
1480 | + { echo "$SYSTEM_NAME"; exit; } | |
1481 | + | |
1482 | +# Apollos put the system type in the environment. | |
1483 | + | |
1484 | +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } | |
1485 | + | |
1486 | +# Convex versions that predate uname can use getsysinfo(1) | |
1487 | + | |
1488 | +if [ -x /usr/convex/getsysinfo ] | |
1489 | +then | |
1490 | + case `getsysinfo -f cpu_type` in | |
1491 | + c1*) | |
1492 | + echo c1-convex-bsd | |
1493 | + exit ;; | |
1494 | + c2*) | |
1495 | + if getsysinfo -f scalar_acc | |
1496 | + then echo c32-convex-bsd | |
1497 | + else echo c2-convex-bsd | |
1498 | + fi | |
1499 | + exit ;; | |
1500 | + c34*) | |
1501 | + echo c34-convex-bsd | |
1502 | + exit ;; | |
1503 | + c38*) | |
1504 | + echo c38-convex-bsd | |
1505 | + exit ;; | |
1506 | + c4*) | |
1507 | + echo c4-convex-bsd | |
1508 | + exit ;; | |
1509 | + esac | |
1510 | +fi | |
1511 | + | |
1512 | +cat >&2 <<EOF | |
1513 | +$0: unable to guess system type | |
1514 | + | |
1515 | +This script, last modified $timestamp, has failed to recognize | |
1516 | +the operating system you are using. It is advised that you | |
1517 | +download the most up to date version of the config scripts from | |
1518 | + | |
1519 | + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | |
1520 | +and | |
1521 | + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD | |
1522 | + | |
1523 | +If the version you run ($0) is already up to date, please | |
1524 | +send the following data and any information you think might be | |
1525 | +pertinent to <config-patches@gnu.org> in order to provide the needed | |
1526 | +information to handle your system. | |
1527 | + | |
1528 | +config.guess timestamp = $timestamp | |
1529 | + | |
1530 | +uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1531 | +uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1532 | +uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1533 | +uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1534 | + | |
1535 | +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` | |
1536 | +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` | |
1537 | + | |
1538 | +hostinfo = `(hostinfo) 2>/dev/null` | |
1539 | +/bin/universe = `(/bin/universe) 2>/dev/null` | |
1540 | +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` | |
1541 | +/bin/arch = `(/bin/arch) 2>/dev/null` | |
1542 | +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` | |
1543 | +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` | |
1544 | + | |
1545 | +UNAME_MACHINE = ${UNAME_MACHINE} | |
1546 | +UNAME_RELEASE = ${UNAME_RELEASE} | |
1547 | +UNAME_SYSTEM = ${UNAME_SYSTEM} | |
1548 | +UNAME_VERSION = ${UNAME_VERSION} | |
1549 | +EOF | |
1550 | + | |
1551 | +exit 1 | |
1552 | + | |
1553 | +# Local variables: | |
1554 | +# eval: (add-hook 'write-file-hooks 'time-stamp) | |
1555 | +# time-stamp-start: "timestamp='" | |
1556 | +# time-stamp-format: "%:y-%02m-%02d" | |
1557 | +# time-stamp-end: "'" | |
1558 | +# End: |
@@ -0,0 +1,1791 @@ | ||
1 | +#! /bin/sh | |
2 | +# Configuration validation subroutine script. | |
3 | +# Copyright 1992-2013 Free Software Foundation, Inc. | |
4 | + | |
5 | +timestamp='2013-08-10' | |
6 | + | |
7 | +# This file is free software; you can redistribute it and/or modify it | |
8 | +# under the terms of the GNU General Public License as published by | |
9 | +# the Free Software Foundation; either version 3 of the License, or | |
10 | +# (at your option) any later version. | |
11 | +# | |
12 | +# This program is distributed in the hope that it will be useful, but | |
13 | +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | +# General Public License for more details. | |
16 | +# | |
17 | +# You should have received a copy of the GNU General Public License | |
18 | +# along with this program; if not, see <http://www.gnu.org/licenses/>. | |
19 | +# | |
20 | +# As a special exception to the GNU General Public License, if you | |
21 | +# distribute this file as part of a program that contains a | |
22 | +# configuration script generated by Autoconf, you may include it under | |
23 | +# the same distribution terms that you use for the rest of that | |
24 | +# program. This Exception is an additional permission under section 7 | |
25 | +# of the GNU General Public License, version 3 ("GPLv3"). | |
26 | + | |
27 | + | |
28 | +# Please send patches with a ChangeLog entry to config-patches@gnu.org. | |
29 | +# | |
30 | +# Configuration subroutine to validate and canonicalize a configuration type. | |
31 | +# Supply the specified configuration type as an argument. | |
32 | +# If it is invalid, we print an error message on stderr and exit with code 1. | |
33 | +# Otherwise, we print the canonical config type on stdout and succeed. | |
34 | + | |
35 | +# You can get the latest version of this script from: | |
36 | +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD | |
37 | + | |
38 | +# This file is supposed to be the same for all GNU packages | |
39 | +# and recognize all the CPU types, system types and aliases | |
40 | +# that are meaningful with *any* GNU software. | |
41 | +# Each package is responsible for reporting which valid configurations | |
42 | +# it does not support. The user should be able to distinguish | |
43 | +# a failure to support a valid configuration from a meaningless | |
44 | +# configuration. | |
45 | + | |
46 | +# The goal of this file is to map all the various variations of a given | |
47 | +# machine specification into a single specification in the form: | |
48 | +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | |
49 | +# or in some cases, the newer four-part form: | |
50 | +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM | |
51 | +# It is wrong to echo any other type of specification. | |
52 | + | |
53 | +me=`echo "$0" | sed -e 's,.*/,,'` | |
54 | + | |
55 | +usage="\ | |
56 | +Usage: $0 [OPTION] CPU-MFR-OPSYS | |
57 | + $0 [OPTION] ALIAS | |
58 | + | |
59 | +Canonicalize a configuration name. | |
60 | + | |
61 | +Operation modes: | |
62 | + -h, --help print this help, then exit | |
63 | + -t, --time-stamp print date of last modification, then exit | |
64 | + -v, --version print version number, then exit | |
65 | + | |
66 | +Report bugs and patches to <config-patches@gnu.org>." | |
67 | + | |
68 | +version="\ | |
69 | +GNU config.sub ($timestamp) | |
70 | + | |
71 | +Copyright 1992-2013 Free Software Foundation, Inc. | |
72 | + | |
73 | +This is free software; see the source for copying conditions. There is NO | |
74 | +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | |
75 | + | |
76 | +help=" | |
77 | +Try \`$me --help' for more information." | |
78 | + | |
79 | +# Parse command line | |
80 | +while test $# -gt 0 ; do | |
81 | + case $1 in | |
82 | + --time-stamp | --time* | -t ) | |
83 | + echo "$timestamp" ; exit ;; | |
84 | + --version | -v ) | |
85 | + echo "$version" ; exit ;; | |
86 | + --help | --h* | -h ) | |
87 | + echo "$usage"; exit ;; | |
88 | + -- ) # Stop option processing | |
89 | + shift; break ;; | |
90 | + - ) # Use stdin as input. | |
91 | + break ;; | |
92 | + -* ) | |
93 | + echo "$me: invalid option $1$help" | |
94 | + exit 1 ;; | |
95 | + | |
96 | + *local*) | |
97 | + # First pass through any local machine types. | |
98 | + echo $1 | |
99 | + exit ;; | |
100 | + | |
101 | + * ) | |
102 | + break ;; | |
103 | + esac | |
104 | +done | |
105 | + | |
106 | +case $# in | |
107 | + 0) echo "$me: missing argument$help" >&2 | |
108 | + exit 1;; | |
109 | + 1) ;; | |
110 | + *) echo "$me: too many arguments$help" >&2 | |
111 | + exit 1;; | |
112 | +esac | |
113 | + | |
114 | +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). | |
115 | +# Here we must recognize all the valid KERNEL-OS combinations. | |
116 | +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | |
117 | +case $maybe_os in | |
118 | + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ | |
119 | + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ | |
120 | + knetbsd*-gnu* | netbsd*-gnu* | \ | |
121 | + kopensolaris*-gnu* | \ | |
122 | + storm-chaos* | os2-emx* | rtmk-nova*) | |
123 | + os=-$maybe_os | |
124 | + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | |
125 | + ;; | |
126 | + android-linux) | |
127 | + os=-linux-android | |
128 | + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown | |
129 | + ;; | |
130 | + *) | |
131 | + basic_machine=`echo $1 | sed 's/-[^-]*$//'` | |
132 | + if [ $basic_machine != $1 ] | |
133 | + then os=`echo $1 | sed 's/.*-/-/'` | |
134 | + else os=; fi | |
135 | + ;; | |
136 | +esac | |
137 | + | |
138 | +### Let's recognize common machines as not being operating systems so | |
139 | +### that things like config.sub decstation-3100 work. We also | |
140 | +### recognize some manufacturers as not being operating systems, so we | |
141 | +### can provide default operating systems below. | |
142 | +case $os in | |
143 | + -sun*os*) | |
144 | + # Prevent following clause from handling this invalid input. | |
145 | + ;; | |
146 | + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | |
147 | + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
148 | + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ | |
149 | + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | |
150 | + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | |
151 | + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ | |
152 | + -apple | -axis | -knuth | -cray | -microblaze*) | |
153 | + os= | |
154 | + basic_machine=$1 | |
155 | + ;; | |
156 | + -bluegene*) | |
157 | + os=-cnk | |
158 | + ;; | |
159 | + -sim | -cisco | -oki | -wec | -winbond) | |
160 | + os= | |
161 | + basic_machine=$1 | |
162 | + ;; | |
163 | + -scout) | |
164 | + ;; | |
165 | + -wrs) | |
166 | + os=-vxworks | |
167 | + basic_machine=$1 | |
168 | + ;; | |
169 | + -chorusos*) | |
170 | + os=-chorusos | |
171 | + basic_machine=$1 | |
172 | + ;; | |
173 | + -chorusrdb) | |
174 | + os=-chorusrdb | |
175 | + basic_machine=$1 | |
176 | + ;; | |
177 | + -hiux*) | |
178 | + os=-hiuxwe2 | |
179 | + ;; | |
180 | + -sco6) | |
181 | + os=-sco5v6 | |
182 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
183 | + ;; | |
184 | + -sco5) | |
185 | + os=-sco3.2v5 | |
186 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
187 | + ;; | |
188 | + -sco4) | |
189 | + os=-sco3.2v4 | |
190 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
191 | + ;; | |
192 | + -sco3.2.[4-9]*) | |
193 | + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
194 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
195 | + ;; | |
196 | + -sco3.2v[4-9]*) | |
197 | + # Don't forget version if it is 3.2v4 or newer. | |
198 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
199 | + ;; | |
200 | + -sco5v6*) | |
201 | + # Don't forget version if it is 3.2v4 or newer. | |
202 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
203 | + ;; | |
204 | + -sco*) | |
205 | + os=-sco3.2v2 | |
206 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
207 | + ;; | |
208 | + -udk*) | |
209 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
210 | + ;; | |
211 | + -isc) | |
212 | + os=-isc2.2 | |
213 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
214 | + ;; | |
215 | + -clix*) | |
216 | + basic_machine=clipper-intergraph | |
217 | + ;; | |
218 | + -isc*) | |
219 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
220 | + ;; | |
221 | + -lynx*178) | |
222 | + os=-lynxos178 | |
223 | + ;; | |
224 | + -lynx*5) | |
225 | + os=-lynxos5 | |
226 | + ;; | |
227 | + -lynx*) | |
228 | + os=-lynxos | |
229 | + ;; | |
230 | + -ptx*) | |
231 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | |
232 | + ;; | |
233 | + -windowsnt*) | |
234 | + os=`echo $os | sed -e 's/windowsnt/winnt/'` | |
235 | + ;; | |
236 | + -psos*) | |
237 | + os=-psos | |
238 | + ;; | |
239 | + -mint | -mint[0-9]*) | |
240 | + basic_machine=m68k-atari | |
241 | + os=-mint | |
242 | + ;; | |
243 | +esac | |
244 | + | |
245 | +# Decode aliases for certain CPU-COMPANY combinations. | |
246 | +case $basic_machine in | |
247 | + # Recognize the basic CPU types without company name. | |
248 | + # Some are omitted here because they have special meanings below. | |
249 | + 1750a | 580 \ | |
250 | + | a29k \ | |
251 | + | aarch64 | aarch64_be \ | |
252 | + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | |
253 | + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | |
254 | + | am33_2.0 \ | |
255 | + | arc | arceb \ | |
256 | + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | |
257 | + | avr | avr32 \ | |
258 | + | be32 | be64 \ | |
259 | + | bfin \ | |
260 | + | c4x | c8051 | clipper \ | |
261 | + | d10v | d30v | dlx | dsp16xx \ | |
262 | + | epiphany \ | |
263 | + | fido | fr30 | frv \ | |
264 | + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
265 | + | hexagon \ | |
266 | + | i370 | i860 | i960 | ia64 \ | |
267 | + | ip2k | iq2000 \ | |
268 | + | le32 | le64 \ | |
269 | + | lm32 \ | |
270 | + | m32c | m32r | m32rle | m68000 | m68k | m88k \ | |
271 | + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | |
272 | + | mips | mipsbe | mipseb | mipsel | mipsle \ | |
273 | + | mips16 \ | |
274 | + | mips64 | mips64el \ | |
275 | + | mips64octeon | mips64octeonel \ | |
276 | + | mips64orion | mips64orionel \ | |
277 | + | mips64r5900 | mips64r5900el \ | |
278 | + | mips64vr | mips64vrel \ | |
279 | + | mips64vr4100 | mips64vr4100el \ | |
280 | + | mips64vr4300 | mips64vr4300el \ | |
281 | + | mips64vr5000 | mips64vr5000el \ | |
282 | + | mips64vr5900 | mips64vr5900el \ | |
283 | + | mipsisa32 | mipsisa32el \ | |
284 | + | mipsisa32r2 | mipsisa32r2el \ | |
285 | + | mipsisa64 | mipsisa64el \ | |
286 | + | mipsisa64r2 | mipsisa64r2el \ | |
287 | + | mipsisa64sb1 | mipsisa64sb1el \ | |
288 | + | mipsisa64sr71k | mipsisa64sr71kel \ | |
289 | + | mipsr5900 | mipsr5900el \ | |
290 | + | mipstx39 | mipstx39el \ | |
291 | + | mn10200 | mn10300 \ | |
292 | + | moxie \ | |
293 | + | mt \ | |
294 | + | msp430 \ | |
295 | + | nds32 | nds32le | nds32be \ | |
296 | + | nios | nios2 | nios2eb | nios2el \ | |
297 | + | ns16k | ns32k \ | |
298 | + | open8 \ | |
299 | + | or1k | or32 \ | |
300 | + | pdp10 | pdp11 | pj | pjl \ | |
301 | + | powerpc | powerpc64 | powerpc64le | powerpcle \ | |
302 | + | pyramid \ | |
303 | + | rl78 | rx \ | |
304 | + | score \ | |
305 | + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | |
306 | + | sh64 | sh64le \ | |
307 | + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | |
308 | + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | |
309 | + | spu \ | |
310 | + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | |
311 | + | ubicom32 \ | |
312 | + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | |
313 | + | we32k \ | |
314 | + | x86 | xc16x | xstormy16 | xtensa \ | |
315 | + | z8k | z80) | |
316 | + basic_machine=$basic_machine-unknown | |
317 | + ;; | |
318 | + c54x) | |
319 | + basic_machine=tic54x-unknown | |
320 | + ;; | |
321 | + c55x) | |
322 | + basic_machine=tic55x-unknown | |
323 | + ;; | |
324 | + c6x) | |
325 | + basic_machine=tic6x-unknown | |
326 | + ;; | |
327 | + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) | |
328 | + basic_machine=$basic_machine-unknown | |
329 | + os=-none | |
330 | + ;; | |
331 | + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) | |
332 | + ;; | |
333 | + ms1) | |
334 | + basic_machine=mt-unknown | |
335 | + ;; | |
336 | + | |
337 | + strongarm | thumb | xscale) | |
338 | + basic_machine=arm-unknown | |
339 | + ;; | |
340 | + xgate) | |
341 | + basic_machine=$basic_machine-unknown | |
342 | + os=-none | |
343 | + ;; | |
344 | + xscaleeb) | |
345 | + basic_machine=armeb-unknown | |
346 | + ;; | |
347 | + | |
348 | + xscaleel) | |
349 | + basic_machine=armel-unknown | |
350 | + ;; | |
351 | + | |
352 | + # We use `pc' rather than `unknown' | |
353 | + # because (1) that's what they normally are, and | |
354 | + # (2) the word "unknown" tends to confuse beginning users. | |
355 | + i*86 | x86_64) | |
356 | + basic_machine=$basic_machine-pc | |
357 | + ;; | |
358 | + # Object if more than one company name word. | |
359 | + *-*-*) | |
360 | + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
361 | + exit 1 | |
362 | + ;; | |
363 | + # Recognize the basic CPU types with company name. | |
364 | + 580-* \ | |
365 | + | a29k-* \ | |
366 | + | aarch64-* | aarch64_be-* \ | |
367 | + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | |
368 | + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | |
369 | + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | |
370 | + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | |
371 | + | avr-* | avr32-* \ | |
372 | + | be32-* | be64-* \ | |
373 | + | bfin-* | bs2000-* \ | |
374 | + | c[123]* | c30-* | [cjt]90-* | c4x-* \ | |
375 | + | c8051-* | clipper-* | craynv-* | cydra-* \ | |
376 | + | d10v-* | d30v-* | dlx-* \ | |
377 | + | elxsi-* \ | |
378 | + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | |
379 | + | h8300-* | h8500-* \ | |
380 | + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | |
381 | + | hexagon-* \ | |
382 | + | i*86-* | i860-* | i960-* | ia64-* \ | |
383 | + | ip2k-* | iq2000-* \ | |
384 | + | le32-* | le64-* \ | |
385 | + | lm32-* \ | |
386 | + | m32c-* | m32r-* | m32rle-* \ | |
387 | + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | |
388 | + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | |
389 | + | microblaze-* | microblazeel-* \ | |
390 | + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | |
391 | + | mips16-* \ | |
392 | + | mips64-* | mips64el-* \ | |
393 | + | mips64octeon-* | mips64octeonel-* \ | |
394 | + | mips64orion-* | mips64orionel-* \ | |
395 | + | mips64r5900-* | mips64r5900el-* \ | |
396 | + | mips64vr-* | mips64vrel-* \ | |
397 | + | mips64vr4100-* | mips64vr4100el-* \ | |
398 | + | mips64vr4300-* | mips64vr4300el-* \ | |
399 | + | mips64vr5000-* | mips64vr5000el-* \ | |
400 | + | mips64vr5900-* | mips64vr5900el-* \ | |
401 | + | mipsisa32-* | mipsisa32el-* \ | |
402 | + | mipsisa32r2-* | mipsisa32r2el-* \ | |
403 | + | mipsisa64-* | mipsisa64el-* \ | |
404 | + | mipsisa64r2-* | mipsisa64r2el-* \ | |
405 | + | mipsisa64sb1-* | mipsisa64sb1el-* \ | |
406 | + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | |
407 | + | mipsr5900-* | mipsr5900el-* \ | |
408 | + | mipstx39-* | mipstx39el-* \ | |
409 | + | mmix-* \ | |
410 | + | mt-* \ | |
411 | + | msp430-* \ | |
412 | + | nds32-* | nds32le-* | nds32be-* \ | |
413 | + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | |
414 | + | none-* | np1-* | ns16k-* | ns32k-* \ | |
415 | + | open8-* \ | |
416 | + | orion-* \ | |
417 | + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | |
418 | + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | |
419 | + | pyramid-* \ | |
420 | + | rl78-* | romp-* | rs6000-* | rx-* \ | |
421 | + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | |
422 | + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | |
423 | + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | |
424 | + | sparclite-* \ | |
425 | + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | |
426 | + | tahoe-* \ | |
427 | + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | |
428 | + | tile*-* \ | |
429 | + | tron-* \ | |
430 | + | ubicom32-* \ | |
431 | + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | |
432 | + | vax-* \ | |
433 | + | we32k-* \ | |
434 | + | x86-* | x86_64-* | xc16x-* | xps100-* \ | |
435 | + | xstormy16-* | xtensa*-* \ | |
436 | + | ymp-* \ | |
437 | + | z8k-* | z80-*) | |
438 | + ;; | |
439 | + # Recognize the basic CPU types without company name, with glob match. | |
440 | + xtensa*) | |
441 | + basic_machine=$basic_machine-unknown | |
442 | + ;; | |
443 | + # Recognize the various machine names and aliases which stand | |
444 | + # for a CPU type and a company and sometimes even an OS. | |
445 | + 386bsd) | |
446 | + basic_machine=i386-unknown | |
447 | + os=-bsd | |
448 | + ;; | |
449 | + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | |
450 | + basic_machine=m68000-att | |
451 | + ;; | |
452 | + 3b*) | |
453 | + basic_machine=we32k-att | |
454 | + ;; | |
455 | + a29khif) | |
456 | + basic_machine=a29k-amd | |
457 | + os=-udi | |
458 | + ;; | |
459 | + abacus) | |
460 | + basic_machine=abacus-unknown | |
461 | + ;; | |
462 | + adobe68k) | |
463 | + basic_machine=m68010-adobe | |
464 | + os=-scout | |
465 | + ;; | |
466 | + alliant | fx80) | |
467 | + basic_machine=fx80-alliant | |
468 | + ;; | |
469 | + altos | altos3068) | |
470 | + basic_machine=m68k-altos | |
471 | + ;; | |
472 | + am29k) | |
473 | + basic_machine=a29k-none | |
474 | + os=-bsd | |
475 | + ;; | |
476 | + amd64) | |
477 | + basic_machine=x86_64-pc | |
478 | + ;; | |
479 | + amd64-*) | |
480 | + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
481 | + ;; | |
482 | + amdahl) | |
483 | + basic_machine=580-amdahl | |
484 | + os=-sysv | |
485 | + ;; | |
486 | + amiga | amiga-*) | |
487 | + basic_machine=m68k-unknown | |
488 | + ;; | |
489 | + amigaos | amigados) | |
490 | + basic_machine=m68k-unknown | |
491 | + os=-amigaos | |
492 | + ;; | |
493 | + amigaunix | amix) | |
494 | + basic_machine=m68k-unknown | |
495 | + os=-sysv4 | |
496 | + ;; | |
497 | + apollo68) | |
498 | + basic_machine=m68k-apollo | |
499 | + os=-sysv | |
500 | + ;; | |
501 | + apollo68bsd) | |
502 | + basic_machine=m68k-apollo | |
503 | + os=-bsd | |
504 | + ;; | |
505 | + aros) | |
506 | + basic_machine=i386-pc | |
507 | + os=-aros | |
508 | + ;; | |
509 | + aux) | |
510 | + basic_machine=m68k-apple | |
511 | + os=-aux | |
512 | + ;; | |
513 | + balance) | |
514 | + basic_machine=ns32k-sequent | |
515 | + os=-dynix | |
516 | + ;; | |
517 | + blackfin) | |
518 | + basic_machine=bfin-unknown | |
519 | + os=-linux | |
520 | + ;; | |
521 | + blackfin-*) | |
522 | + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` | |
523 | + os=-linux | |
524 | + ;; | |
525 | + bluegene*) | |
526 | + basic_machine=powerpc-ibm | |
527 | + os=-cnk | |
528 | + ;; | |
529 | + c54x-*) | |
530 | + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
531 | + ;; | |
532 | + c55x-*) | |
533 | + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
534 | + ;; | |
535 | + c6x-*) | |
536 | + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
537 | + ;; | |
538 | + c90) | |
539 | + basic_machine=c90-cray | |
540 | + os=-unicos | |
541 | + ;; | |
542 | + cegcc) | |
543 | + basic_machine=arm-unknown | |
544 | + os=-cegcc | |
545 | + ;; | |
546 | + convex-c1) | |
547 | + basic_machine=c1-convex | |
548 | + os=-bsd | |
549 | + ;; | |
550 | + convex-c2) | |
551 | + basic_machine=c2-convex | |
552 | + os=-bsd | |
553 | + ;; | |
554 | + convex-c32) | |
555 | + basic_machine=c32-convex | |
556 | + os=-bsd | |
557 | + ;; | |
558 | + convex-c34) | |
559 | + basic_machine=c34-convex | |
560 | + os=-bsd | |
561 | + ;; | |
562 | + convex-c38) | |
563 | + basic_machine=c38-convex | |
564 | + os=-bsd | |
565 | + ;; | |
566 | + cray | j90) | |
567 | + basic_machine=j90-cray | |
568 | + os=-unicos | |
569 | + ;; | |
570 | + craynv) | |
571 | + basic_machine=craynv-cray | |
572 | + os=-unicosmp | |
573 | + ;; | |
574 | + cr16 | cr16-*) | |
575 | + basic_machine=cr16-unknown | |
576 | + os=-elf | |
577 | + ;; | |
578 | + crds | unos) | |
579 | + basic_machine=m68k-crds | |
580 | + ;; | |
581 | + crisv32 | crisv32-* | etraxfs*) | |
582 | + basic_machine=crisv32-axis | |
583 | + ;; | |
584 | + cris | cris-* | etrax*) | |
585 | + basic_machine=cris-axis | |
586 | + ;; | |
587 | + crx) | |
588 | + basic_machine=crx-unknown | |
589 | + os=-elf | |
590 | + ;; | |
591 | + da30 | da30-*) | |
592 | + basic_machine=m68k-da30 | |
593 | + ;; | |
594 | + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) | |
595 | + basic_machine=mips-dec | |
596 | + ;; | |
597 | + decsystem10* | dec10*) | |
598 | + basic_machine=pdp10-dec | |
599 | + os=-tops10 | |
600 | + ;; | |
601 | + decsystem20* | dec20*) | |
602 | + basic_machine=pdp10-dec | |
603 | + os=-tops20 | |
604 | + ;; | |
605 | + delta | 3300 | motorola-3300 | motorola-delta \ | |
606 | + | 3300-motorola | delta-motorola) | |
607 | + basic_machine=m68k-motorola | |
608 | + ;; | |
609 | + delta88) | |
610 | + basic_machine=m88k-motorola | |
611 | + os=-sysv3 | |
612 | + ;; | |
613 | + dicos) | |
614 | + basic_machine=i686-pc | |
615 | + os=-dicos | |
616 | + ;; | |
617 | + djgpp) | |
618 | + basic_machine=i586-pc | |
619 | + os=-msdosdjgpp | |
620 | + ;; | |
621 | + dpx20 | dpx20-*) | |
622 | + basic_machine=rs6000-bull | |
623 | + os=-bosx | |
624 | + ;; | |
625 | + dpx2* | dpx2*-bull) | |
626 | + basic_machine=m68k-bull | |
627 | + os=-sysv3 | |
628 | + ;; | |
629 | + ebmon29k) | |
630 | + basic_machine=a29k-amd | |
631 | + os=-ebmon | |
632 | + ;; | |
633 | + elxsi) | |
634 | + basic_machine=elxsi-elxsi | |
635 | + os=-bsd | |
636 | + ;; | |
637 | + encore | umax | mmax) | |
638 | + basic_machine=ns32k-encore | |
639 | + ;; | |
640 | + es1800 | OSE68k | ose68k | ose | OSE) | |
641 | + basic_machine=m68k-ericsson | |
642 | + os=-ose | |
643 | + ;; | |
644 | + fx2800) | |
645 | + basic_machine=i860-alliant | |
646 | + ;; | |
647 | + genix) | |
648 | + basic_machine=ns32k-ns | |
649 | + ;; | |
650 | + gmicro) | |
651 | + basic_machine=tron-gmicro | |
652 | + os=-sysv | |
653 | + ;; | |
654 | + go32) | |
655 | + basic_machine=i386-pc | |
656 | + os=-go32 | |
657 | + ;; | |
658 | + h3050r* | hiux*) | |
659 | + basic_machine=hppa1.1-hitachi | |
660 | + os=-hiuxwe2 | |
661 | + ;; | |
662 | + h8300hms) | |
663 | + basic_machine=h8300-hitachi | |
664 | + os=-hms | |
665 | + ;; | |
666 | + h8300xray) | |
667 | + basic_machine=h8300-hitachi | |
668 | + os=-xray | |
669 | + ;; | |
670 | + h8500hms) | |
671 | + basic_machine=h8500-hitachi | |
672 | + os=-hms | |
673 | + ;; | |
674 | + harris) | |
675 | + basic_machine=m88k-harris | |
676 | + os=-sysv3 | |
677 | + ;; | |
678 | + hp300-*) | |
679 | + basic_machine=m68k-hp | |
680 | + ;; | |
681 | + hp300bsd) | |
682 | + basic_machine=m68k-hp | |
683 | + os=-bsd | |
684 | + ;; | |
685 | + hp300hpux) | |
686 | + basic_machine=m68k-hp | |
687 | + os=-hpux | |
688 | + ;; | |
689 | + hp3k9[0-9][0-9] | hp9[0-9][0-9]) | |
690 | + basic_machine=hppa1.0-hp | |
691 | + ;; | |
692 | + hp9k2[0-9][0-9] | hp9k31[0-9]) | |
693 | + basic_machine=m68000-hp | |
694 | + ;; | |
695 | + hp9k3[2-9][0-9]) | |
696 | + basic_machine=m68k-hp | |
697 | + ;; | |
698 | + hp9k6[0-9][0-9] | hp6[0-9][0-9]) | |
699 | + basic_machine=hppa1.0-hp | |
700 | + ;; | |
701 | + hp9k7[0-79][0-9] | hp7[0-79][0-9]) | |
702 | + basic_machine=hppa1.1-hp | |
703 | + ;; | |
704 | + hp9k78[0-9] | hp78[0-9]) | |
705 | + # FIXME: really hppa2.0-hp | |
706 | + basic_machine=hppa1.1-hp | |
707 | + ;; | |
708 | + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | |
709 | + # FIXME: really hppa2.0-hp | |
710 | + basic_machine=hppa1.1-hp | |
711 | + ;; | |
712 | + hp9k8[0-9][13679] | hp8[0-9][13679]) | |
713 | + basic_machine=hppa1.1-hp | |
714 | + ;; | |
715 | + hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
716 | + basic_machine=hppa1.0-hp | |
717 | + ;; | |
718 | + hppa-next) | |
719 | + os=-nextstep3 | |
720 | + ;; | |
721 | + hppaosf) | |
722 | + basic_machine=hppa1.1-hp | |
723 | + os=-osf | |
724 | + ;; | |
725 | + hppro) | |
726 | + basic_machine=hppa1.1-hp | |
727 | + os=-proelf | |
728 | + ;; | |
729 | + i370-ibm* | ibm*) | |
730 | + basic_machine=i370-ibm | |
731 | + ;; | |
732 | + i*86v32) | |
733 | + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
734 | + os=-sysv32 | |
735 | + ;; | |
736 | + i*86v4*) | |
737 | + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
738 | + os=-sysv4 | |
739 | + ;; | |
740 | + i*86v) | |
741 | + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
742 | + os=-sysv | |
743 | + ;; | |
744 | + i*86sol2) | |
745 | + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
746 | + os=-solaris2 | |
747 | + ;; | |
748 | + i386mach) | |
749 | + basic_machine=i386-mach | |
750 | + os=-mach | |
751 | + ;; | |
752 | + i386-vsta | vsta) | |
753 | + basic_machine=i386-unknown | |
754 | + os=-vsta | |
755 | + ;; | |
756 | + iris | iris4d) | |
757 | + basic_machine=mips-sgi | |
758 | + case $os in | |
759 | + -irix*) | |
760 | + ;; | |
761 | + *) | |
762 | + os=-irix4 | |
763 | + ;; | |
764 | + esac | |
765 | + ;; | |
766 | + isi68 | isi) | |
767 | + basic_machine=m68k-isi | |
768 | + os=-sysv | |
769 | + ;; | |
770 | + m68knommu) | |
771 | + basic_machine=m68k-unknown | |
772 | + os=-linux | |
773 | + ;; | |
774 | + m68knommu-*) | |
775 | + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` | |
776 | + os=-linux | |
777 | + ;; | |
778 | + m88k-omron*) | |
779 | + basic_machine=m88k-omron | |
780 | + ;; | |
781 | + magnum | m3230) | |
782 | + basic_machine=mips-mips | |
783 | + os=-sysv | |
784 | + ;; | |
785 | + merlin) | |
786 | + basic_machine=ns32k-utek | |
787 | + os=-sysv | |
788 | + ;; | |
789 | + microblaze*) | |
790 | + basic_machine=microblaze-xilinx | |
791 | + ;; | |
792 | + mingw64) | |
793 | + basic_machine=x86_64-pc | |
794 | + os=-mingw64 | |
795 | + ;; | |
796 | + mingw32) | |
797 | + basic_machine=i686-pc | |
798 | + os=-mingw32 | |
799 | + ;; | |
800 | + mingw32ce) | |
801 | + basic_machine=arm-unknown | |
802 | + os=-mingw32ce | |
803 | + ;; | |
804 | + miniframe) | |
805 | + basic_machine=m68000-convergent | |
806 | + ;; | |
807 | + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
808 | + basic_machine=m68k-atari | |
809 | + os=-mint | |
810 | + ;; | |
811 | + mips3*-*) | |
812 | + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` | |
813 | + ;; | |
814 | + mips3*) | |
815 | + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown | |
816 | + ;; | |
817 | + monitor) | |
818 | + basic_machine=m68k-rom68k | |
819 | + os=-coff | |
820 | + ;; | |
821 | + morphos) | |
822 | + basic_machine=powerpc-unknown | |
823 | + os=-morphos | |
824 | + ;; | |
825 | + msdos) | |
826 | + basic_machine=i386-pc | |
827 | + os=-msdos | |
828 | + ;; | |
829 | + ms1-*) | |
830 | + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` | |
831 | + ;; | |
832 | + msys) | |
833 | + basic_machine=i686-pc | |
834 | + os=-msys | |
835 | + ;; | |
836 | + mvs) | |
837 | + basic_machine=i370-ibm | |
838 | + os=-mvs | |
839 | + ;; | |
840 | + nacl) | |
841 | + basic_machine=le32-unknown | |
842 | + os=-nacl | |
843 | + ;; | |
844 | + ncr3000) | |
845 | + basic_machine=i486-ncr | |
846 | + os=-sysv4 | |
847 | + ;; | |
848 | + netbsd386) | |
849 | + basic_machine=i386-unknown | |
850 | + os=-netbsd | |
851 | + ;; | |
852 | + netwinder) | |
853 | + basic_machine=armv4l-rebel | |
854 | + os=-linux | |
855 | + ;; | |
856 | + news | news700 | news800 | news900) | |
857 | + basic_machine=m68k-sony | |
858 | + os=-newsos | |
859 | + ;; | |
860 | + news1000) | |
861 | + basic_machine=m68030-sony | |
862 | + os=-newsos | |
863 | + ;; | |
864 | + news-3600 | risc-news) | |
865 | + basic_machine=mips-sony | |
866 | + os=-newsos | |
867 | + ;; | |
868 | + necv70) | |
869 | + basic_machine=v70-nec | |
870 | + os=-sysv | |
871 | + ;; | |
872 | + next | m*-next ) | |
873 | + basic_machine=m68k-next | |
874 | + case $os in | |
875 | + -nextstep* ) | |
876 | + ;; | |
877 | + -ns2*) | |
878 | + os=-nextstep2 | |
879 | + ;; | |
880 | + *) | |
881 | + os=-nextstep3 | |
882 | + ;; | |
883 | + esac | |
884 | + ;; | |
885 | + nh3000) | |
886 | + basic_machine=m68k-harris | |
887 | + os=-cxux | |
888 | + ;; | |
889 | + nh[45]000) | |
890 | + basic_machine=m88k-harris | |
891 | + os=-cxux | |
892 | + ;; | |
893 | + nindy960) | |
894 | + basic_machine=i960-intel | |
895 | + os=-nindy | |
896 | + ;; | |
897 | + mon960) | |
898 | + basic_machine=i960-intel | |
899 | + os=-mon960 | |
900 | + ;; | |
901 | + nonstopux) | |
902 | + basic_machine=mips-compaq | |
903 | + os=-nonstopux | |
904 | + ;; | |
905 | + np1) | |
906 | + basic_machine=np1-gould | |
907 | + ;; | |
908 | + neo-tandem) | |
909 | + basic_machine=neo-tandem | |
910 | + ;; | |
911 | + nse-tandem) | |
912 | + basic_machine=nse-tandem | |
913 | + ;; | |
914 | + nsr-tandem) | |
915 | + basic_machine=nsr-tandem | |
916 | + ;; | |
917 | + op50n-* | op60c-*) | |
918 | + basic_machine=hppa1.1-oki | |
919 | + os=-proelf | |
920 | + ;; | |
921 | + openrisc | openrisc-*) | |
922 | + basic_machine=or32-unknown | |
923 | + ;; | |
924 | + os400) | |
925 | + basic_machine=powerpc-ibm | |
926 | + os=-os400 | |
927 | + ;; | |
928 | + OSE68000 | ose68000) | |
929 | + basic_machine=m68000-ericsson | |
930 | + os=-ose | |
931 | + ;; | |
932 | + os68k) | |
933 | + basic_machine=m68k-none | |
934 | + os=-os68k | |
935 | + ;; | |
936 | + pa-hitachi) | |
937 | + basic_machine=hppa1.1-hitachi | |
938 | + os=-hiuxwe2 | |
939 | + ;; | |
940 | + paragon) | |
941 | + basic_machine=i860-intel | |
942 | + os=-osf | |
943 | + ;; | |
944 | + parisc) | |
945 | + basic_machine=hppa-unknown | |
946 | + os=-linux | |
947 | + ;; | |
948 | + parisc-*) | |
949 | + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` | |
950 | + os=-linux | |
951 | + ;; | |
952 | + pbd) | |
953 | + basic_machine=sparc-tti | |
954 | + ;; | |
955 | + pbb) | |
956 | + basic_machine=m68k-tti | |
957 | + ;; | |
958 | + pc532 | pc532-*) | |
959 | + basic_machine=ns32k-pc532 | |
960 | + ;; | |
961 | + pc98) | |
962 | + basic_machine=i386-pc | |
963 | + ;; | |
964 | + pc98-*) | |
965 | + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` | |
966 | + ;; | |
967 | + pentium | p5 | k5 | k6 | nexgen | viac3) | |
968 | + basic_machine=i586-pc | |
969 | + ;; | |
970 | + pentiumpro | p6 | 6x86 | athlon | athlon_*) | |
971 | + basic_machine=i686-pc | |
972 | + ;; | |
973 | + pentiumii | pentium2 | pentiumiii | pentium3) | |
974 | + basic_machine=i686-pc | |
975 | + ;; | |
976 | + pentium4) | |
977 | + basic_machine=i786-pc | |
978 | + ;; | |
979 | + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
980 | + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` | |
981 | + ;; | |
982 | + pentiumpro-* | p6-* | 6x86-* | athlon-*) | |
983 | + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
984 | + ;; | |
985 | + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
986 | + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
987 | + ;; | |
988 | + pentium4-*) | |
989 | + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` | |
990 | + ;; | |
991 | + pn) | |
992 | + basic_machine=pn-gould | |
993 | + ;; | |
994 | + power) basic_machine=power-ibm | |
995 | + ;; | |
996 | + ppc | ppcbe) basic_machine=powerpc-unknown | |
997 | + ;; | |
998 | + ppc-* | ppcbe-*) | |
999 | + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1000 | + ;; | |
1001 | + ppcle | powerpclittle | ppc-le | powerpc-little) | |
1002 | + basic_machine=powerpcle-unknown | |
1003 | + ;; | |
1004 | + ppcle-* | powerpclittle-*) | |
1005 | + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1006 | + ;; | |
1007 | + ppc64) basic_machine=powerpc64-unknown | |
1008 | + ;; | |
1009 | + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1010 | + ;; | |
1011 | + ppc64le | powerpc64little | ppc64-le | powerpc64-little) | |
1012 | + basic_machine=powerpc64le-unknown | |
1013 | + ;; | |
1014 | + ppc64le-* | powerpc64little-*) | |
1015 | + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1016 | + ;; | |
1017 | + ps2) | |
1018 | + basic_machine=i386-ibm | |
1019 | + ;; | |
1020 | + pw32) | |
1021 | + basic_machine=i586-unknown | |
1022 | + os=-pw32 | |
1023 | + ;; | |
1024 | + rdos | rdos64) | |
1025 | + basic_machine=x86_64-pc | |
1026 | + os=-rdos | |
1027 | + ;; | |
1028 | + rdos32) | |
1029 | + basic_machine=i386-pc | |
1030 | + os=-rdos | |
1031 | + ;; | |
1032 | + rom68k) | |
1033 | + basic_machine=m68k-rom68k | |
1034 | + os=-coff | |
1035 | + ;; | |
1036 | + rm[46]00) | |
1037 | + basic_machine=mips-siemens | |
1038 | + ;; | |
1039 | + rtpc | rtpc-*) | |
1040 | + basic_machine=romp-ibm | |
1041 | + ;; | |
1042 | + s390 | s390-*) | |
1043 | + basic_machine=s390-ibm | |
1044 | + ;; | |
1045 | + s390x | s390x-*) | |
1046 | + basic_machine=s390x-ibm | |
1047 | + ;; | |
1048 | + sa29200) | |
1049 | + basic_machine=a29k-amd | |
1050 | + os=-udi | |
1051 | + ;; | |
1052 | + sb1) | |
1053 | + basic_machine=mipsisa64sb1-unknown | |
1054 | + ;; | |
1055 | + sb1el) | |
1056 | + basic_machine=mipsisa64sb1el-unknown | |
1057 | + ;; | |
1058 | + sde) | |
1059 | + basic_machine=mipsisa32-sde | |
1060 | + os=-elf | |
1061 | + ;; | |
1062 | + sei) | |
1063 | + basic_machine=mips-sei | |
1064 | + os=-seiux | |
1065 | + ;; | |
1066 | + sequent) | |
1067 | + basic_machine=i386-sequent | |
1068 | + ;; | |
1069 | + sh) | |
1070 | + basic_machine=sh-hitachi | |
1071 | + os=-hms | |
1072 | + ;; | |
1073 | + sh5el) | |
1074 | + basic_machine=sh5le-unknown | |
1075 | + ;; | |
1076 | + sh64) | |
1077 | + basic_machine=sh64-unknown | |
1078 | + ;; | |
1079 | + sparclite-wrs | simso-wrs) | |
1080 | + basic_machine=sparclite-wrs | |
1081 | + os=-vxworks | |
1082 | + ;; | |
1083 | + sps7) | |
1084 | + basic_machine=m68k-bull | |
1085 | + os=-sysv2 | |
1086 | + ;; | |
1087 | + spur) | |
1088 | + basic_machine=spur-unknown | |
1089 | + ;; | |
1090 | + st2000) | |
1091 | + basic_machine=m68k-tandem | |
1092 | + ;; | |
1093 | + stratus) | |
1094 | + basic_machine=i860-stratus | |
1095 | + os=-sysv4 | |
1096 | + ;; | |
1097 | + strongarm-* | thumb-*) | |
1098 | + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1099 | + ;; | |
1100 | + sun2) | |
1101 | + basic_machine=m68000-sun | |
1102 | + ;; | |
1103 | + sun2os3) | |
1104 | + basic_machine=m68000-sun | |
1105 | + os=-sunos3 | |
1106 | + ;; | |
1107 | + sun2os4) | |
1108 | + basic_machine=m68000-sun | |
1109 | + os=-sunos4 | |
1110 | + ;; | |
1111 | + sun3os3) | |
1112 | + basic_machine=m68k-sun | |
1113 | + os=-sunos3 | |
1114 | + ;; | |
1115 | + sun3os4) | |
1116 | + basic_machine=m68k-sun | |
1117 | + os=-sunos4 | |
1118 | + ;; | |
1119 | + sun4os3) | |
1120 | + basic_machine=sparc-sun | |
1121 | + os=-sunos3 | |
1122 | + ;; | |
1123 | + sun4os4) | |
1124 | + basic_machine=sparc-sun | |
1125 | + os=-sunos4 | |
1126 | + ;; | |
1127 | + sun4sol2) | |
1128 | + basic_machine=sparc-sun | |
1129 | + os=-solaris2 | |
1130 | + ;; | |
1131 | + sun3 | sun3-*) | |
1132 | + basic_machine=m68k-sun | |
1133 | + ;; | |
1134 | + sun4) | |
1135 | + basic_machine=sparc-sun | |
1136 | + ;; | |
1137 | + sun386 | sun386i | roadrunner) | |
1138 | + basic_machine=i386-sun | |
1139 | + ;; | |
1140 | + sv1) | |
1141 | + basic_machine=sv1-cray | |
1142 | + os=-unicos | |
1143 | + ;; | |
1144 | + symmetry) | |
1145 | + basic_machine=i386-sequent | |
1146 | + os=-dynix | |
1147 | + ;; | |
1148 | + t3e) | |
1149 | + basic_machine=alphaev5-cray | |
1150 | + os=-unicos | |
1151 | + ;; | |
1152 | + t90) | |
1153 | + basic_machine=t90-cray | |
1154 | + os=-unicos | |
1155 | + ;; | |
1156 | + tile*) | |
1157 | + basic_machine=$basic_machine-unknown | |
1158 | + os=-linux-gnu | |
1159 | + ;; | |
1160 | + tx39) | |
1161 | + basic_machine=mipstx39-unknown | |
1162 | + ;; | |
1163 | + tx39el) | |
1164 | + basic_machine=mipstx39el-unknown | |
1165 | + ;; | |
1166 | + toad1) | |
1167 | + basic_machine=pdp10-xkl | |
1168 | + os=-tops20 | |
1169 | + ;; | |
1170 | + tower | tower-32) | |
1171 | + basic_machine=m68k-ncr | |
1172 | + ;; | |
1173 | + tpf) | |
1174 | + basic_machine=s390x-ibm | |
1175 | + os=-tpf | |
1176 | + ;; | |
1177 | + udi29k) | |
1178 | + basic_machine=a29k-amd | |
1179 | + os=-udi | |
1180 | + ;; | |
1181 | + ultra3) | |
1182 | + basic_machine=a29k-nyu | |
1183 | + os=-sym1 | |
1184 | + ;; | |
1185 | + v810 | necv810) | |
1186 | + basic_machine=v810-nec | |
1187 | + os=-none | |
1188 | + ;; | |
1189 | + vaxv) | |
1190 | + basic_machine=vax-dec | |
1191 | + os=-sysv | |
1192 | + ;; | |
1193 | + vms) | |
1194 | + basic_machine=vax-dec | |
1195 | + os=-vms | |
1196 | + ;; | |
1197 | + vpp*|vx|vx-*) | |
1198 | + basic_machine=f301-fujitsu | |
1199 | + ;; | |
1200 | + vxworks960) | |
1201 | + basic_machine=i960-wrs | |
1202 | + os=-vxworks | |
1203 | + ;; | |
1204 | + vxworks68) | |
1205 | + basic_machine=m68k-wrs | |
1206 | + os=-vxworks | |
1207 | + ;; | |
1208 | + vxworks29k) | |
1209 | + basic_machine=a29k-wrs | |
1210 | + os=-vxworks | |
1211 | + ;; | |
1212 | + w65*) | |
1213 | + basic_machine=w65-wdc | |
1214 | + os=-none | |
1215 | + ;; | |
1216 | + w89k-*) | |
1217 | + basic_machine=hppa1.1-winbond | |
1218 | + os=-proelf | |
1219 | + ;; | |
1220 | + xbox) | |
1221 | + basic_machine=i686-pc | |
1222 | + os=-mingw32 | |
1223 | + ;; | |
1224 | + xps | xps100) | |
1225 | + basic_machine=xps100-honeywell | |
1226 | + ;; | |
1227 | + xscale-* | xscalee[bl]-*) | |
1228 | + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` | |
1229 | + ;; | |
1230 | + ymp) | |
1231 | + basic_machine=ymp-cray | |
1232 | + os=-unicos | |
1233 | + ;; | |
1234 | + z8k-*-coff) | |
1235 | + basic_machine=z8k-unknown | |
1236 | + os=-sim | |
1237 | + ;; | |
1238 | + z80-*-coff) | |
1239 | + basic_machine=z80-unknown | |
1240 | + os=-sim | |
1241 | + ;; | |
1242 | + none) | |
1243 | + basic_machine=none-none | |
1244 | + os=-none | |
1245 | + ;; | |
1246 | + | |
1247 | +# Here we handle the default manufacturer of certain CPU types. It is in | |
1248 | +# some cases the only manufacturer, in others, it is the most popular. | |
1249 | + w89k) | |
1250 | + basic_machine=hppa1.1-winbond | |
1251 | + ;; | |
1252 | + op50n) | |
1253 | + basic_machine=hppa1.1-oki | |
1254 | + ;; | |
1255 | + op60c) | |
1256 | + basic_machine=hppa1.1-oki | |
1257 | + ;; | |
1258 | + romp) | |
1259 | + basic_machine=romp-ibm | |
1260 | + ;; | |
1261 | + mmix) | |
1262 | + basic_machine=mmix-knuth | |
1263 | + ;; | |
1264 | + rs6000) | |
1265 | + basic_machine=rs6000-ibm | |
1266 | + ;; | |
1267 | + vax) | |
1268 | + basic_machine=vax-dec | |
1269 | + ;; | |
1270 | + pdp10) | |
1271 | + # there are many clones, so DEC is not a safe bet | |
1272 | + basic_machine=pdp10-unknown | |
1273 | + ;; | |
1274 | + pdp11) | |
1275 | + basic_machine=pdp11-dec | |
1276 | + ;; | |
1277 | + we32k) | |
1278 | + basic_machine=we32k-att | |
1279 | + ;; | |
1280 | + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) | |
1281 | + basic_machine=sh-unknown | |
1282 | + ;; | |
1283 | + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) | |
1284 | + basic_machine=sparc-sun | |
1285 | + ;; | |
1286 | + cydra) | |
1287 | + basic_machine=cydra-cydrome | |
1288 | + ;; | |
1289 | + orion) | |
1290 | + basic_machine=orion-highlevel | |
1291 | + ;; | |
1292 | + orion105) | |
1293 | + basic_machine=clipper-highlevel | |
1294 | + ;; | |
1295 | + mac | mpw | mac-mpw) | |
1296 | + basic_machine=m68k-apple | |
1297 | + ;; | |
1298 | + pmac | pmac-mpw) | |
1299 | + basic_machine=powerpc-apple | |
1300 | + ;; | |
1301 | + *-unknown) | |
1302 | + # Make sure to match an already-canonicalized machine name. | |
1303 | + ;; | |
1304 | + *) | |
1305 | + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
1306 | + exit 1 | |
1307 | + ;; | |
1308 | +esac | |
1309 | + | |
1310 | +# Here we canonicalize certain aliases for manufacturers. | |
1311 | +case $basic_machine in | |
1312 | + *-digital*) | |
1313 | + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` | |
1314 | + ;; | |
1315 | + *-commodore*) | |
1316 | + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` | |
1317 | + ;; | |
1318 | + *) | |
1319 | + ;; | |
1320 | +esac | |
1321 | + | |
1322 | +# Decode manufacturer-specific aliases for certain operating systems. | |
1323 | + | |
1324 | +if [ x"$os" != x"" ] | |
1325 | +then | |
1326 | +case $os in | |
1327 | + # First match some system type aliases | |
1328 | + # that might get confused with valid system types. | |
1329 | + # -solaris* is a basic system type, with this one exception. | |
1330 | + -auroraux) | |
1331 | + os=-auroraux | |
1332 | + ;; | |
1333 | + -solaris1 | -solaris1.*) | |
1334 | + os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
1335 | + ;; | |
1336 | + -solaris) | |
1337 | + os=-solaris2 | |
1338 | + ;; | |
1339 | + -svr4*) | |
1340 | + os=-sysv4 | |
1341 | + ;; | |
1342 | + -unixware*) | |
1343 | + os=-sysv4.2uw | |
1344 | + ;; | |
1345 | + -gnu/linux*) | |
1346 | + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` | |
1347 | + ;; | |
1348 | + # First accept the basic system types. | |
1349 | + # The portable systems comes first. | |
1350 | + # Each alternative MUST END IN A *, to match a version number. | |
1351 | + # -sysv* is not here because it comes later, after sysvr4. | |
1352 | + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | |
1353 | + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | |
1354 | + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | |
1355 | + | -sym* | -kopensolaris* | -plan9* \ | |
1356 | + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | |
1357 | + | -aos* | -aros* \ | |
1358 | + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | |
1359 | + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | |
1360 | + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | |
1361 | + | -bitrig* | -openbsd* | -solidbsd* \ | |
1362 | + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | |
1363 | + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | |
1364 | + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | |
1365 | + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | |
1366 | + | -chorusos* | -chorusrdb* | -cegcc* \ | |
1367 | + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | |
1368 | + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | |
1369 | + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | |
1370 | + | -uxpv* | -beos* | -mpeix* | -udk* \ | |
1371 | + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | |
1372 | + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | |
1373 | + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | |
1374 | + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | |
1375 | + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | |
1376 | + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | |
1377 | + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) | |
1378 | + # Remember, each alternative MUST END IN *, to match a version number. | |
1379 | + ;; | |
1380 | + -qnx*) | |
1381 | + case $basic_machine in | |
1382 | + x86-* | i*86-*) | |
1383 | + ;; | |
1384 | + *) | |
1385 | + os=-nto$os | |
1386 | + ;; | |
1387 | + esac | |
1388 | + ;; | |
1389 | + -nto-qnx*) | |
1390 | + ;; | |
1391 | + -nto*) | |
1392 | + os=`echo $os | sed -e 's|nto|nto-qnx|'` | |
1393 | + ;; | |
1394 | + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | |
1395 | + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | |
1396 | + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) | |
1397 | + ;; | |
1398 | + -mac*) | |
1399 | + os=`echo $os | sed -e 's|mac|macos|'` | |
1400 | + ;; | |
1401 | + -linux-dietlibc) | |
1402 | + os=-linux-dietlibc | |
1403 | + ;; | |
1404 | + -linux*) | |
1405 | + os=`echo $os | sed -e 's|linux|linux-gnu|'` | |
1406 | + ;; | |
1407 | + -sunos5*) | |
1408 | + os=`echo $os | sed -e 's|sunos5|solaris2|'` | |
1409 | + ;; | |
1410 | + -sunos6*) | |
1411 | + os=`echo $os | sed -e 's|sunos6|solaris3|'` | |
1412 | + ;; | |
1413 | + -opened*) | |
1414 | + os=-openedition | |
1415 | + ;; | |
1416 | + -os400*) | |
1417 | + os=-os400 | |
1418 | + ;; | |
1419 | + -wince*) | |
1420 | + os=-wince | |
1421 | + ;; | |
1422 | + -osfrose*) | |
1423 | + os=-osfrose | |
1424 | + ;; | |
1425 | + -osf*) | |
1426 | + os=-osf | |
1427 | + ;; | |
1428 | + -utek*) | |
1429 | + os=-bsd | |
1430 | + ;; | |
1431 | + -dynix*) | |
1432 | + os=-bsd | |
1433 | + ;; | |
1434 | + -acis*) | |
1435 | + os=-aos | |
1436 | + ;; | |
1437 | + -atheos*) | |
1438 | + os=-atheos | |
1439 | + ;; | |
1440 | + -syllable*) | |
1441 | + os=-syllable | |
1442 | + ;; | |
1443 | + -386bsd) | |
1444 | + os=-bsd | |
1445 | + ;; | |
1446 | + -ctix* | -uts*) | |
1447 | + os=-sysv | |
1448 | + ;; | |
1449 | + -nova*) | |
1450 | + os=-rtmk-nova | |
1451 | + ;; | |
1452 | + -ns2 ) | |
1453 | + os=-nextstep2 | |
1454 | + ;; | |
1455 | + -nsk*) | |
1456 | + os=-nsk | |
1457 | + ;; | |
1458 | + # Preserve the version number of sinix5. | |
1459 | + -sinix5.*) | |
1460 | + os=`echo $os | sed -e 's|sinix|sysv|'` | |
1461 | + ;; | |
1462 | + -sinix*) | |
1463 | + os=-sysv4 | |
1464 | + ;; | |
1465 | + -tpf*) | |
1466 | + os=-tpf | |
1467 | + ;; | |
1468 | + -triton*) | |
1469 | + os=-sysv3 | |
1470 | + ;; | |
1471 | + -oss*) | |
1472 | + os=-sysv3 | |
1473 | + ;; | |
1474 | + -svr4) | |
1475 | + os=-sysv4 | |
1476 | + ;; | |
1477 | + -svr3) | |
1478 | + os=-sysv3 | |
1479 | + ;; | |
1480 | + -sysvr4) | |
1481 | + os=-sysv4 | |
1482 | + ;; | |
1483 | + # This must come after -sysvr4. | |
1484 | + -sysv*) | |
1485 | + ;; | |
1486 | + -ose*) | |
1487 | + os=-ose | |
1488 | + ;; | |
1489 | + -es1800*) | |
1490 | + os=-ose | |
1491 | + ;; | |
1492 | + -xenix) | |
1493 | + os=-xenix | |
1494 | + ;; | |
1495 | + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
1496 | + os=-mint | |
1497 | + ;; | |
1498 | + -aros*) | |
1499 | + os=-aros | |
1500 | + ;; | |
1501 | + -zvmoe) | |
1502 | + os=-zvmoe | |
1503 | + ;; | |
1504 | + -dicos*) | |
1505 | + os=-dicos | |
1506 | + ;; | |
1507 | + -nacl*) | |
1508 | + ;; | |
1509 | + -none) | |
1510 | + ;; | |
1511 | + *) | |
1512 | + # Get rid of the `-' at the beginning of $os. | |
1513 | + os=`echo $os | sed 's/[^-]*-//'` | |
1514 | + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 | |
1515 | + exit 1 | |
1516 | + ;; | |
1517 | +esac | |
1518 | +else | |
1519 | + | |
1520 | +# Here we handle the default operating systems that come with various machines. | |
1521 | +# The value should be what the vendor currently ships out the door with their | |
1522 | +# machine or put another way, the most popular os provided with the machine. | |
1523 | + | |
1524 | +# Note that if you're going to try to match "-MANUFACTURER" here (say, | |
1525 | +# "-sun"), then you have to tell the case statement up towards the top | |
1526 | +# that MANUFACTURER isn't an operating system. Otherwise, code above | |
1527 | +# will signal an error saying that MANUFACTURER isn't an operating | |
1528 | +# system, and we'll never get to this point. | |
1529 | + | |
1530 | +case $basic_machine in | |
1531 | + score-*) | |
1532 | + os=-elf | |
1533 | + ;; | |
1534 | + spu-*) | |
1535 | + os=-elf | |
1536 | + ;; | |
1537 | + *-acorn) | |
1538 | + os=-riscix1.2 | |
1539 | + ;; | |
1540 | + arm*-rebel) | |
1541 | + os=-linux | |
1542 | + ;; | |
1543 | + arm*-semi) | |
1544 | + os=-aout | |
1545 | + ;; | |
1546 | + c4x-* | tic4x-*) | |
1547 | + os=-coff | |
1548 | + ;; | |
1549 | + c8051-*) | |
1550 | + os=-elf | |
1551 | + ;; | |
1552 | + hexagon-*) | |
1553 | + os=-elf | |
1554 | + ;; | |
1555 | + tic54x-*) | |
1556 | + os=-coff | |
1557 | + ;; | |
1558 | + tic55x-*) | |
1559 | + os=-coff | |
1560 | + ;; | |
1561 | + tic6x-*) | |
1562 | + os=-coff | |
1563 | + ;; | |
1564 | + # This must come before the *-dec entry. | |
1565 | + pdp10-*) | |
1566 | + os=-tops20 | |
1567 | + ;; | |
1568 | + pdp11-*) | |
1569 | + os=-none | |
1570 | + ;; | |
1571 | + *-dec | vax-*) | |
1572 | + os=-ultrix4.2 | |
1573 | + ;; | |
1574 | + m68*-apollo) | |
1575 | + os=-domain | |
1576 | + ;; | |
1577 | + i386-sun) | |
1578 | + os=-sunos4.0.2 | |
1579 | + ;; | |
1580 | + m68000-sun) | |
1581 | + os=-sunos3 | |
1582 | + ;; | |
1583 | + m68*-cisco) | |
1584 | + os=-aout | |
1585 | + ;; | |
1586 | + mep-*) | |
1587 | + os=-elf | |
1588 | + ;; | |
1589 | + mips*-cisco) | |
1590 | + os=-elf | |
1591 | + ;; | |
1592 | + mips*-*) | |
1593 | + os=-elf | |
1594 | + ;; | |
1595 | + or1k-*) | |
1596 | + os=-elf | |
1597 | + ;; | |
1598 | + or32-*) | |
1599 | + os=-coff | |
1600 | + ;; | |
1601 | + *-tti) # must be before sparc entry or we get the wrong os. | |
1602 | + os=-sysv3 | |
1603 | + ;; | |
1604 | + sparc-* | *-sun) | |
1605 | + os=-sunos4.1.1 | |
1606 | + ;; | |
1607 | + *-be) | |
1608 | + os=-beos | |
1609 | + ;; | |
1610 | + *-haiku) | |
1611 | + os=-haiku | |
1612 | + ;; | |
1613 | + *-ibm) | |
1614 | + os=-aix | |
1615 | + ;; | |
1616 | + *-knuth) | |
1617 | + os=-mmixware | |
1618 | + ;; | |
1619 | + *-wec) | |
1620 | + os=-proelf | |
1621 | + ;; | |
1622 | + *-winbond) | |
1623 | + os=-proelf | |
1624 | + ;; | |
1625 | + *-oki) | |
1626 | + os=-proelf | |
1627 | + ;; | |
1628 | + *-hp) | |
1629 | + os=-hpux | |
1630 | + ;; | |
1631 | + *-hitachi) | |
1632 | + os=-hiux | |
1633 | + ;; | |
1634 | + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) | |
1635 | + os=-sysv | |
1636 | + ;; | |
1637 | + *-cbm) | |
1638 | + os=-amigaos | |
1639 | + ;; | |
1640 | + *-dg) | |
1641 | + os=-dgux | |
1642 | + ;; | |
1643 | + *-dolphin) | |
1644 | + os=-sysv3 | |
1645 | + ;; | |
1646 | + m68k-ccur) | |
1647 | + os=-rtu | |
1648 | + ;; | |
1649 | + m88k-omron*) | |
1650 | + os=-luna | |
1651 | + ;; | |
1652 | + *-next ) | |
1653 | + os=-nextstep | |
1654 | + ;; | |
1655 | + *-sequent) | |
1656 | + os=-ptx | |
1657 | + ;; | |
1658 | + *-crds) | |
1659 | + os=-unos | |
1660 | + ;; | |
1661 | + *-ns) | |
1662 | + os=-genix | |
1663 | + ;; | |
1664 | + i370-*) | |
1665 | + os=-mvs | |
1666 | + ;; | |
1667 | + *-next) | |
1668 | + os=-nextstep3 | |
1669 | + ;; | |
1670 | + *-gould) | |
1671 | + os=-sysv | |
1672 | + ;; | |
1673 | + *-highlevel) | |
1674 | + os=-bsd | |
1675 | + ;; | |
1676 | + *-encore) | |
1677 | + os=-bsd | |
1678 | + ;; | |
1679 | + *-sgi) | |
1680 | + os=-irix | |
1681 | + ;; | |
1682 | + *-siemens) | |
1683 | + os=-sysv4 | |
1684 | + ;; | |
1685 | + *-masscomp) | |
1686 | + os=-rtu | |
1687 | + ;; | |
1688 | + f30[01]-fujitsu | f700-fujitsu) | |
1689 | + os=-uxpv | |
1690 | + ;; | |
1691 | + *-rom68k) | |
1692 | + os=-coff | |
1693 | + ;; | |
1694 | + *-*bug) | |
1695 | + os=-coff | |
1696 | + ;; | |
1697 | + *-apple) | |
1698 | + os=-macos | |
1699 | + ;; | |
1700 | + *-atari*) | |
1701 | + os=-mint | |
1702 | + ;; | |
1703 | + *) | |
1704 | + os=-none | |
1705 | + ;; | |
1706 | +esac | |
1707 | +fi | |
1708 | + | |
1709 | +# Here we handle the case where we know the os, and the CPU type, but not the | |
1710 | +# manufacturer. We pick the logical manufacturer. | |
1711 | +vendor=unknown | |
1712 | +case $basic_machine in | |
1713 | + *-unknown) | |
1714 | + case $os in | |
1715 | + -riscix*) | |
1716 | + vendor=acorn | |
1717 | + ;; | |
1718 | + -sunos*) | |
1719 | + vendor=sun | |
1720 | + ;; | |
1721 | + -cnk*|-aix*) | |
1722 | + vendor=ibm | |
1723 | + ;; | |
1724 | + -beos*) | |
1725 | + vendor=be | |
1726 | + ;; | |
1727 | + -hpux*) | |
1728 | + vendor=hp | |
1729 | + ;; | |
1730 | + -mpeix*) | |
1731 | + vendor=hp | |
1732 | + ;; | |
1733 | + -hiux*) | |
1734 | + vendor=hitachi | |
1735 | + ;; | |
1736 | + -unos*) | |
1737 | + vendor=crds | |
1738 | + ;; | |
1739 | + -dgux*) | |
1740 | + vendor=dg | |
1741 | + ;; | |
1742 | + -luna*) | |
1743 | + vendor=omron | |
1744 | + ;; | |
1745 | + -genix*) | |
1746 | + vendor=ns | |
1747 | + ;; | |
1748 | + -mvs* | -opened*) | |
1749 | + vendor=ibm | |
1750 | + ;; | |
1751 | + -os400*) | |
1752 | + vendor=ibm | |
1753 | + ;; | |
1754 | + -ptx*) | |
1755 | + vendor=sequent | |
1756 | + ;; | |
1757 | + -tpf*) | |
1758 | + vendor=ibm | |
1759 | + ;; | |
1760 | + -vxsim* | -vxworks* | -windiss*) | |
1761 | + vendor=wrs | |
1762 | + ;; | |
1763 | + -aux*) | |
1764 | + vendor=apple | |
1765 | + ;; | |
1766 | + -hms*) | |
1767 | + vendor=hitachi | |
1768 | + ;; | |
1769 | + -mpw* | -macos*) | |
1770 | + vendor=apple | |
1771 | + ;; | |
1772 | + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
1773 | + vendor=atari | |
1774 | + ;; | |
1775 | + -vos*) | |
1776 | + vendor=stratus | |
1777 | + ;; | |
1778 | + esac | |
1779 | + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | |
1780 | + ;; | |
1781 | +esac | |
1782 | + | |
1783 | +echo $basic_machine$os | |
1784 | +exit | |
1785 | + | |
1786 | +# Local variables: | |
1787 | +# eval: (add-hook 'write-file-hooks 'time-stamp) | |
1788 | +# time-stamp-start: "timestamp='" | |
1789 | +# time-stamp-format: "%:y-%02m-%02d" | |
1790 | +# time-stamp-end: "'" | |
1791 | +# End: |
@@ -0,0 +1,791 @@ | ||
1 | +#! /bin/sh | |
2 | +# depcomp - compile a program generating dependencies as side-effects | |
3 | + | |
4 | +scriptversion=2013-05-30.07; # UTC | |
5 | + | |
6 | +# Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
7 | + | |
8 | +# This program is free software; you can redistribute it and/or modify | |
9 | +# it under the terms of the GNU General Public License as published by | |
10 | +# the Free Software Foundation; either version 2, or (at your option) | |
11 | +# any later version. | |
12 | + | |
13 | +# This program is distributed in the hope that it will be useful, | |
14 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | +# GNU General Public License for more details. | |
17 | + | |
18 | +# You should have received a copy of the GNU General Public License | |
19 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 | + | |
21 | +# As a special exception to the GNU General Public License, if you | |
22 | +# distribute this file as part of a program that contains a | |
23 | +# configuration script generated by Autoconf, you may include it under | |
24 | +# the same distribution terms that you use for the rest of that program. | |
25 | + | |
26 | +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. | |
27 | + | |
28 | +case $1 in | |
29 | + '') | |
30 | + echo "$0: No command. Try '$0 --help' for more information." 1>&2 | |
31 | + exit 1; | |
32 | + ;; | |
33 | + -h | --h*) | |
34 | + cat <<\EOF | |
35 | +Usage: depcomp [--help] [--version] PROGRAM [ARGS] | |
36 | + | |
37 | +Run PROGRAMS ARGS to compile a file, generating dependencies | |
38 | +as side-effects. | |
39 | + | |
40 | +Environment variables: | |
41 | + depmode Dependency tracking mode. | |
42 | + source Source file read by 'PROGRAMS ARGS'. | |
43 | + object Object file output by 'PROGRAMS ARGS'. | |
44 | + DEPDIR directory where to store dependencies. | |
45 | + depfile Dependency file to output. | |
46 | + tmpdepfile Temporary file to use when outputting dependencies. | |
47 | + libtool Whether libtool is used (yes/no). | |
48 | + | |
49 | +Report bugs to <bug-automake@gnu.org>. | |
50 | +EOF | |
51 | + exit $? | |
52 | + ;; | |
53 | + -v | --v*) | |
54 | + echo "depcomp $scriptversion" | |
55 | + exit $? | |
56 | + ;; | |
57 | +esac | |
58 | + | |
59 | +# Get the directory component of the given path, and save it in the | |
60 | +# global variables '$dir'. Note that this directory component will | |
61 | +# be either empty or ending with a '/' character. This is deliberate. | |
62 | +set_dir_from () | |
63 | +{ | |
64 | + case $1 in | |
65 | + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; | |
66 | + *) dir=;; | |
67 | + esac | |
68 | +} | |
69 | + | |
70 | +# Get the suffix-stripped basename of the given path, and save it the | |
71 | +# global variable '$base'. | |
72 | +set_base_from () | |
73 | +{ | |
74 | + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` | |
75 | +} | |
76 | + | |
77 | +# If no dependency file was actually created by the compiler invocation, | |
78 | +# we still have to create a dummy depfile, to avoid errors with the | |
79 | +# Makefile "include basename.Plo" scheme. | |
80 | +make_dummy_depfile () | |
81 | +{ | |
82 | + echo "#dummy" > "$depfile" | |
83 | +} | |
84 | + | |
85 | +# Factor out some common post-processing of the generated depfile. | |
86 | +# Requires the auxiliary global variable '$tmpdepfile' to be set. | |
87 | +aix_post_process_depfile () | |
88 | +{ | |
89 | + # If the compiler actually managed to produce a dependency file, | |
90 | + # post-process it. | |
91 | + if test -f "$tmpdepfile"; then | |
92 | + # Each line is of the form 'foo.o: dependency.h'. | |
93 | + # Do two passes, one to just change these to | |
94 | + # $object: dependency.h | |
95 | + # and one to simply output | |
96 | + # dependency.h: | |
97 | + # which is needed to avoid the deleted-header problem. | |
98 | + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" | |
99 | + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" | |
100 | + } > "$depfile" | |
101 | + rm -f "$tmpdepfile" | |
102 | + else | |
103 | + make_dummy_depfile | |
104 | + fi | |
105 | +} | |
106 | + | |
107 | +# A tabulation character. | |
108 | +tab=' ' | |
109 | +# A newline character. | |
110 | +nl=' | |
111 | +' | |
112 | +# Character ranges might be problematic outside the C locale. | |
113 | +# These definitions help. | |
114 | +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ | |
115 | +lower=abcdefghijklmnopqrstuvwxyz | |
116 | +digits=0123456789 | |
117 | +alpha=${upper}${lower} | |
118 | + | |
119 | +if test -z "$depmode" || test -z "$source" || test -z "$object"; then | |
120 | + echo "depcomp: Variables source, object and depmode must be set" 1>&2 | |
121 | + exit 1 | |
122 | +fi | |
123 | + | |
124 | +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. | |
125 | +depfile=${depfile-`echo "$object" | | |
126 | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} | |
127 | +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} | |
128 | + | |
129 | +rm -f "$tmpdepfile" | |
130 | + | |
131 | +# Avoid interferences from the environment. | |
132 | +gccflag= dashmflag= | |
133 | + | |
134 | +# Some modes work just like other modes, but use different flags. We | |
135 | +# parameterize here, but still list the modes in the big case below, | |
136 | +# to make depend.m4 easier to write. Note that we *cannot* use a case | |
137 | +# here, because this file can only contain one case statement. | |
138 | +if test "$depmode" = hp; then | |
139 | + # HP compiler uses -M and no extra arg. | |
140 | + gccflag=-M | |
141 | + depmode=gcc | |
142 | +fi | |
143 | + | |
144 | +if test "$depmode" = dashXmstdout; then | |
145 | + # This is just like dashmstdout with a different argument. | |
146 | + dashmflag=-xM | |
147 | + depmode=dashmstdout | |
148 | +fi | |
149 | + | |
150 | +cygpath_u="cygpath -u -f -" | |
151 | +if test "$depmode" = msvcmsys; then | |
152 | + # This is just like msvisualcpp but w/o cygpath translation. | |
153 | + # Just convert the backslash-escaped backslashes to single forward | |
154 | + # slashes to satisfy depend.m4 | |
155 | + cygpath_u='sed s,\\\\,/,g' | |
156 | + depmode=msvisualcpp | |
157 | +fi | |
158 | + | |
159 | +if test "$depmode" = msvc7msys; then | |
160 | + # This is just like msvc7 but w/o cygpath translation. | |
161 | + # Just convert the backslash-escaped backslashes to single forward | |
162 | + # slashes to satisfy depend.m4 | |
163 | + cygpath_u='sed s,\\\\,/,g' | |
164 | + depmode=msvc7 | |
165 | +fi | |
166 | + | |
167 | +if test "$depmode" = xlc; then | |
168 | + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. | |
169 | + gccflag=-qmakedep=gcc,-MF | |
170 | + depmode=gcc | |
171 | +fi | |
172 | + | |
173 | +case "$depmode" in | |
174 | +gcc3) | |
175 | +## gcc 3 implements dependency tracking that does exactly what | |
176 | +## we want. Yay! Note: for some reason libtool 1.4 doesn't like | |
177 | +## it if -MD -MP comes after the -MF stuff. Hmm. | |
178 | +## Unfortunately, FreeBSD c89 acceptance of flags depends upon | |
179 | +## the command line argument order; so add the flags where they | |
180 | +## appear in depend2.am. Note that the slowdown incurred here | |
181 | +## affects only configure: in makefiles, %FASTDEP% shortcuts this. | |
182 | + for arg | |
183 | + do | |
184 | + case $arg in | |
185 | + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; | |
186 | + *) set fnord "$@" "$arg" ;; | |
187 | + esac | |
188 | + shift # fnord | |
189 | + shift # $arg | |
190 | + done | |
191 | + "$@" | |
192 | + stat=$? | |
193 | + if test $stat -ne 0; then | |
194 | + rm -f "$tmpdepfile" | |
195 | + exit $stat | |
196 | + fi | |
197 | + mv "$tmpdepfile" "$depfile" | |
198 | + ;; | |
199 | + | |
200 | +gcc) | |
201 | +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. | |
202 | +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. | |
203 | +## (see the conditional assignment to $gccflag above). | |
204 | +## There are various ways to get dependency output from gcc. Here's | |
205 | +## why we pick this rather obscure method: | |
206 | +## - Don't want to use -MD because we'd like the dependencies to end | |
207 | +## up in a subdir. Having to rename by hand is ugly. | |
208 | +## (We might end up doing this anyway to support other compilers.) | |
209 | +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like | |
210 | +## -MM, not -M (despite what the docs say). Also, it might not be | |
211 | +## supported by the other compilers which use the 'gcc' depmode. | |
212 | +## - Using -M directly means running the compiler twice (even worse | |
213 | +## than renaming). | |
214 | + if test -z "$gccflag"; then | |
215 | + gccflag=-MD, | |
216 | + fi | |
217 | + "$@" -Wp,"$gccflag$tmpdepfile" | |
218 | + stat=$? | |
219 | + if test $stat -ne 0; then | |
220 | + rm -f "$tmpdepfile" | |
221 | + exit $stat | |
222 | + fi | |
223 | + rm -f "$depfile" | |
224 | + echo "$object : \\" > "$depfile" | |
225 | + # The second -e expression handles DOS-style file names with drive | |
226 | + # letters. | |
227 | + sed -e 's/^[^:]*: / /' \ | |
228 | + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" | |
229 | +## This next piece of magic avoids the "deleted header file" problem. | |
230 | +## The problem is that when a header file which appears in a .P file | |
231 | +## is deleted, the dependency causes make to die (because there is | |
232 | +## typically no way to rebuild the header). We avoid this by adding | |
233 | +## dummy dependencies for each header file. Too bad gcc doesn't do | |
234 | +## this for us directly. | |
235 | +## Some versions of gcc put a space before the ':'. On the theory | |
236 | +## that the space means something, we add a space to the output as | |
237 | +## well. hp depmode also adds that space, but also prefixes the VPATH | |
238 | +## to the object. Take care to not repeat it in the output. | |
239 | +## Some versions of the HPUX 10.20 sed can't process this invocation | |
240 | +## correctly. Breaking it into two sed invocations is a workaround. | |
241 | + tr ' ' "$nl" < "$tmpdepfile" \ | |
242 | + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | |
243 | + | sed -e 's/$/ :/' >> "$depfile" | |
244 | + rm -f "$tmpdepfile" | |
245 | + ;; | |
246 | + | |
247 | +hp) | |
248 | + # This case exists only to let depend.m4 do its work. It works by | |
249 | + # looking at the text of this script. This case will never be run, | |
250 | + # since it is checked for above. | |
251 | + exit 1 | |
252 | + ;; | |
253 | + | |
254 | +sgi) | |
255 | + if test "$libtool" = yes; then | |
256 | + "$@" "-Wp,-MDupdate,$tmpdepfile" | |
257 | + else | |
258 | + "$@" -MDupdate "$tmpdepfile" | |
259 | + fi | |
260 | + stat=$? | |
261 | + if test $stat -ne 0; then | |
262 | + rm -f "$tmpdepfile" | |
263 | + exit $stat | |
264 | + fi | |
265 | + rm -f "$depfile" | |
266 | + | |
267 | + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files | |
268 | + echo "$object : \\" > "$depfile" | |
269 | + # Clip off the initial element (the dependent). Don't try to be | |
270 | + # clever and replace this with sed code, as IRIX sed won't handle | |
271 | + # lines with more than a fixed number of characters (4096 in | |
272 | + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; | |
273 | + # the IRIX cc adds comments like '#:fec' to the end of the | |
274 | + # dependency line. | |
275 | + tr ' ' "$nl" < "$tmpdepfile" \ | |
276 | + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | |
277 | + | tr "$nl" ' ' >> "$depfile" | |
278 | + echo >> "$depfile" | |
279 | + # The second pass generates a dummy entry for each header file. | |
280 | + tr ' ' "$nl" < "$tmpdepfile" \ | |
281 | + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ | |
282 | + >> "$depfile" | |
283 | + else | |
284 | + make_dummy_depfile | |
285 | + fi | |
286 | + rm -f "$tmpdepfile" | |
287 | + ;; | |
288 | + | |
289 | +xlc) | |
290 | + # This case exists only to let depend.m4 do its work. It works by | |
291 | + # looking at the text of this script. This case will never be run, | |
292 | + # since it is checked for above. | |
293 | + exit 1 | |
294 | + ;; | |
295 | + | |
296 | +aix) | |
297 | + # The C for AIX Compiler uses -M and outputs the dependencies | |
298 | + # in a .u file. In older versions, this file always lives in the | |
299 | + # current directory. Also, the AIX compiler puts '$object:' at the | |
300 | + # start of each line; $object doesn't have directory information. | |
301 | + # Version 6 uses the directory in both cases. | |
302 | + set_dir_from "$object" | |
303 | + set_base_from "$object" | |
304 | + if test "$libtool" = yes; then | |
305 | + tmpdepfile1=$dir$base.u | |
306 | + tmpdepfile2=$base.u | |
307 | + tmpdepfile3=$dir.libs/$base.u | |
308 | + "$@" -Wc,-M | |
309 | + else | |
310 | + tmpdepfile1=$dir$base.u | |
311 | + tmpdepfile2=$dir$base.u | |
312 | + tmpdepfile3=$dir$base.u | |
313 | + "$@" -M | |
314 | + fi | |
315 | + stat=$? | |
316 | + if test $stat -ne 0; then | |
317 | + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
318 | + exit $stat | |
319 | + fi | |
320 | + | |
321 | + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
322 | + do | |
323 | + test -f "$tmpdepfile" && break | |
324 | + done | |
325 | + aix_post_process_depfile | |
326 | + ;; | |
327 | + | |
328 | +tcc) | |
329 | + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 | |
330 | + # FIXME: That version still under development at the moment of writing. | |
331 | + # Make that this statement remains true also for stable, released | |
332 | + # versions. | |
333 | + # It will wrap lines (doesn't matter whether long or short) with a | |
334 | + # trailing '\', as in: | |
335 | + # | |
336 | + # foo.o : \ | |
337 | + # foo.c \ | |
338 | + # foo.h \ | |
339 | + # | |
340 | + # It will put a trailing '\' even on the last line, and will use leading | |
341 | + # spaces rather than leading tabs (at least since its commit 0394caf7 | |
342 | + # "Emit spaces for -MD"). | |
343 | + "$@" -MD -MF "$tmpdepfile" | |
344 | + stat=$? | |
345 | + if test $stat -ne 0; then | |
346 | + rm -f "$tmpdepfile" | |
347 | + exit $stat | |
348 | + fi | |
349 | + rm -f "$depfile" | |
350 | + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. | |
351 | + # We have to change lines of the first kind to '$object: \'. | |
352 | + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" | |
353 | + # And for each line of the second kind, we have to emit a 'dep.h:' | |
354 | + # dummy dependency, to avoid the deleted-header problem. | |
355 | + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" | |
356 | + rm -f "$tmpdepfile" | |
357 | + ;; | |
358 | + | |
359 | +## The order of this option in the case statement is important, since the | |
360 | +## shell code in configure will try each of these formats in the order | |
361 | +## listed in this file. A plain '-MD' option would be understood by many | |
362 | +## compilers, so we must ensure this comes after the gcc and icc options. | |
363 | +pgcc) | |
364 | + # Portland's C compiler understands '-MD'. | |
365 | + # Will always output deps to 'file.d' where file is the root name of the | |
366 | + # source file under compilation, even if file resides in a subdirectory. | |
367 | + # The object file name does not affect the name of the '.d' file. | |
368 | + # pgcc 10.2 will output | |
369 | + # foo.o: sub/foo.c sub/foo.h | |
370 | + # and will wrap long lines using '\' : | |
371 | + # foo.o: sub/foo.c ... \ | |
372 | + # sub/foo.h ... \ | |
373 | + # ... | |
374 | + set_dir_from "$object" | |
375 | + # Use the source, not the object, to determine the base name, since | |
376 | + # that's sadly what pgcc will do too. | |
377 | + set_base_from "$source" | |
378 | + tmpdepfile=$base.d | |
379 | + | |
380 | + # For projects that build the same source file twice into different object | |
381 | + # files, the pgcc approach of using the *source* file root name can cause | |
382 | + # problems in parallel builds. Use a locking strategy to avoid stomping on | |
383 | + # the same $tmpdepfile. | |
384 | + lockdir=$base.d-lock | |
385 | + trap " | |
386 | + echo '$0: caught signal, cleaning up...' >&2 | |
387 | + rmdir '$lockdir' | |
388 | + exit 1 | |
389 | + " 1 2 13 15 | |
390 | + numtries=100 | |
391 | + i=$numtries | |
392 | + while test $i -gt 0; do | |
393 | + # mkdir is a portable test-and-set. | |
394 | + if mkdir "$lockdir" 2>/dev/null; then | |
395 | + # This process acquired the lock. | |
396 | + "$@" -MD | |
397 | + stat=$? | |
398 | + # Release the lock. | |
399 | + rmdir "$lockdir" | |
400 | + break | |
401 | + else | |
402 | + # If the lock is being held by a different process, wait | |
403 | + # until the winning process is done or we timeout. | |
404 | + while test -d "$lockdir" && test $i -gt 0; do | |
405 | + sleep 1 | |
406 | + i=`expr $i - 1` | |
407 | + done | |
408 | + fi | |
409 | + i=`expr $i - 1` | |
410 | + done | |
411 | + trap - 1 2 13 15 | |
412 | + if test $i -le 0; then | |
413 | + echo "$0: failed to acquire lock after $numtries attempts" >&2 | |
414 | + echo "$0: check lockdir '$lockdir'" >&2 | |
415 | + exit 1 | |
416 | + fi | |
417 | + | |
418 | + if test $stat -ne 0; then | |
419 | + rm -f "$tmpdepfile" | |
420 | + exit $stat | |
421 | + fi | |
422 | + rm -f "$depfile" | |
423 | + # Each line is of the form `foo.o: dependent.h', | |
424 | + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. | |
425 | + # Do two passes, one to just change these to | |
426 | + # `$object: dependent.h' and one to simply `dependent.h:'. | |
427 | + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" | |
428 | + # Some versions of the HPUX 10.20 sed can't process this invocation | |
429 | + # correctly. Breaking it into two sed invocations is a workaround. | |
430 | + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | |
431 | + | sed -e 's/$/ :/' >> "$depfile" | |
432 | + rm -f "$tmpdepfile" | |
433 | + ;; | |
434 | + | |
435 | +hp2) | |
436 | + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 | |
437 | + # compilers, which have integrated preprocessors. The correct option | |
438 | + # to use with these is +Maked; it writes dependencies to a file named | |
439 | + # 'foo.d', which lands next to the object file, wherever that | |
440 | + # happens to be. | |
441 | + # Much of this is similar to the tru64 case; see comments there. | |
442 | + set_dir_from "$object" | |
443 | + set_base_from "$object" | |
444 | + if test "$libtool" = yes; then | |
445 | + tmpdepfile1=$dir$base.d | |
446 | + tmpdepfile2=$dir.libs/$base.d | |
447 | + "$@" -Wc,+Maked | |
448 | + else | |
449 | + tmpdepfile1=$dir$base.d | |
450 | + tmpdepfile2=$dir$base.d | |
451 | + "$@" +Maked | |
452 | + fi | |
453 | + stat=$? | |
454 | + if test $stat -ne 0; then | |
455 | + rm -f "$tmpdepfile1" "$tmpdepfile2" | |
456 | + exit $stat | |
457 | + fi | |
458 | + | |
459 | + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" | |
460 | + do | |
461 | + test -f "$tmpdepfile" && break | |
462 | + done | |
463 | + if test -f "$tmpdepfile"; then | |
464 | + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" | |
465 | + # Add 'dependent.h:' lines. | |
466 | + sed -ne '2,${ | |
467 | + s/^ *// | |
468 | + s/ \\*$// | |
469 | + s/$/:/ | |
470 | + p | |
471 | + }' "$tmpdepfile" >> "$depfile" | |
472 | + else | |
473 | + make_dummy_depfile | |
474 | + fi | |
475 | + rm -f "$tmpdepfile" "$tmpdepfile2" | |
476 | + ;; | |
477 | + | |
478 | +tru64) | |
479 | + # The Tru64 compiler uses -MD to generate dependencies as a side | |
480 | + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. | |
481 | + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put | |
482 | + # dependencies in 'foo.d' instead, so we check for that too. | |
483 | + # Subdirectories are respected. | |
484 | + set_dir_from "$object" | |
485 | + set_base_from "$object" | |
486 | + | |
487 | + if test "$libtool" = yes; then | |
488 | + # Libtool generates 2 separate objects for the 2 libraries. These | |
489 | + # two compilations output dependencies in $dir.libs/$base.o.d and | |
490 | + # in $dir$base.o.d. We have to check for both files, because | |
491 | + # one of the two compilations can be disabled. We should prefer | |
492 | + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is | |
493 | + # automatically cleaned when .libs/ is deleted, while ignoring | |
494 | + # the former would cause a distcleancheck panic. | |
495 | + tmpdepfile1=$dir$base.o.d # libtool 1.5 | |
496 | + tmpdepfile2=$dir.libs/$base.o.d # Likewise. | |
497 | + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 | |
498 | + "$@" -Wc,-MD | |
499 | + else | |
500 | + tmpdepfile1=$dir$base.d | |
501 | + tmpdepfile2=$dir$base.d | |
502 | + tmpdepfile3=$dir$base.d | |
503 | + "$@" -MD | |
504 | + fi | |
505 | + | |
506 | + stat=$? | |
507 | + if test $stat -ne 0; then | |
508 | + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
509 | + exit $stat | |
510 | + fi | |
511 | + | |
512 | + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
513 | + do | |
514 | + test -f "$tmpdepfile" && break | |
515 | + done | |
516 | + # Same post-processing that is required for AIX mode. | |
517 | + aix_post_process_depfile | |
518 | + ;; | |
519 | + | |
520 | +msvc7) | |
521 | + if test "$libtool" = yes; then | |
522 | + showIncludes=-Wc,-showIncludes | |
523 | + else | |
524 | + showIncludes=-showIncludes | |
525 | + fi | |
526 | + "$@" $showIncludes > "$tmpdepfile" | |
527 | + stat=$? | |
528 | + grep -v '^Note: including file: ' "$tmpdepfile" | |
529 | + if test $stat -ne 0; then | |
530 | + rm -f "$tmpdepfile" | |
531 | + exit $stat | |
532 | + fi | |
533 | + rm -f "$depfile" | |
534 | + echo "$object : \\" > "$depfile" | |
535 | + # The first sed program below extracts the file names and escapes | |
536 | + # backslashes for cygpath. The second sed program outputs the file | |
537 | + # name when reading, but also accumulates all include files in the | |
538 | + # hold buffer in order to output them again at the end. This only | |
539 | + # works with sed implementations that can handle large buffers. | |
540 | + sed < "$tmpdepfile" -n ' | |
541 | +/^Note: including file: *\(.*\)/ { | |
542 | + s//\1/ | |
543 | + s/\\/\\\\/g | |
544 | + p | |
545 | +}' | $cygpath_u | sort -u | sed -n ' | |
546 | +s/ /\\ /g | |
547 | +s/\(.*\)/'"$tab"'\1 \\/p | |
548 | +s/.\(.*\) \\/\1:/ | |
549 | +H | |
550 | +$ { | |
551 | + s/.*/'"$tab"'/ | |
552 | + G | |
553 | + p | |
554 | +}' >> "$depfile" | |
555 | + echo >> "$depfile" # make sure the fragment doesn't end with a backslash | |
556 | + rm -f "$tmpdepfile" | |
557 | + ;; | |
558 | + | |
559 | +msvc7msys) | |
560 | + # This case exists only to let depend.m4 do its work. It works by | |
561 | + # looking at the text of this script. This case will never be run, | |
562 | + # since it is checked for above. | |
563 | + exit 1 | |
564 | + ;; | |
565 | + | |
566 | +#nosideeffect) | |
567 | + # This comment above is used by automake to tell side-effect | |
568 | + # dependency tracking mechanisms from slower ones. | |
569 | + | |
570 | +dashmstdout) | |
571 | + # Important note: in order to support this mode, a compiler *must* | |
572 | + # always write the preprocessed file to stdout, regardless of -o. | |
573 | + "$@" || exit $? | |
574 | + | |
575 | + # Remove the call to Libtool. | |
576 | + if test "$libtool" = yes; then | |
577 | + while test "X$1" != 'X--mode=compile'; do | |
578 | + shift | |
579 | + done | |
580 | + shift | |
581 | + fi | |
582 | + | |
583 | + # Remove '-o $object'. | |
584 | + IFS=" " | |
585 | + for arg | |
586 | + do | |
587 | + case $arg in | |
588 | + -o) | |
589 | + shift | |
590 | + ;; | |
591 | + $object) | |
592 | + shift | |
593 | + ;; | |
594 | + *) | |
595 | + set fnord "$@" "$arg" | |
596 | + shift # fnord | |
597 | + shift # $arg | |
598 | + ;; | |
599 | + esac | |
600 | + done | |
601 | + | |
602 | + test -z "$dashmflag" && dashmflag=-M | |
603 | + # Require at least two characters before searching for ':' | |
604 | + # in the target name. This is to cope with DOS-style filenames: | |
605 | + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. | |
606 | + "$@" $dashmflag | | |
607 | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" | |
608 | + rm -f "$depfile" | |
609 | + cat < "$tmpdepfile" > "$depfile" | |
610 | + # Some versions of the HPUX 10.20 sed can't process this sed invocation | |
611 | + # correctly. Breaking it into two sed invocations is a workaround. | |
612 | + tr ' ' "$nl" < "$tmpdepfile" \ | |
613 | + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | |
614 | + | sed -e 's/$/ :/' >> "$depfile" | |
615 | + rm -f "$tmpdepfile" | |
616 | + ;; | |
617 | + | |
618 | +dashXmstdout) | |
619 | + # This case only exists to satisfy depend.m4. It is never actually | |
620 | + # run, as this mode is specially recognized in the preamble. | |
621 | + exit 1 | |
622 | + ;; | |
623 | + | |
624 | +makedepend) | |
625 | + "$@" || exit $? | |
626 | + # Remove any Libtool call | |
627 | + if test "$libtool" = yes; then | |
628 | + while test "X$1" != 'X--mode=compile'; do | |
629 | + shift | |
630 | + done | |
631 | + shift | |
632 | + fi | |
633 | + # X makedepend | |
634 | + shift | |
635 | + cleared=no eat=no | |
636 | + for arg | |
637 | + do | |
638 | + case $cleared in | |
639 | + no) | |
640 | + set ""; shift | |
641 | + cleared=yes ;; | |
642 | + esac | |
643 | + if test $eat = yes; then | |
644 | + eat=no | |
645 | + continue | |
646 | + fi | |
647 | + case "$arg" in | |
648 | + -D*|-I*) | |
649 | + set fnord "$@" "$arg"; shift ;; | |
650 | + # Strip any option that makedepend may not understand. Remove | |
651 | + # the object too, otherwise makedepend will parse it as a source file. | |
652 | + -arch) | |
653 | + eat=yes ;; | |
654 | + -*|$object) | |
655 | + ;; | |
656 | + *) | |
657 | + set fnord "$@" "$arg"; shift ;; | |
658 | + esac | |
659 | + done | |
660 | + obj_suffix=`echo "$object" | sed 's/^.*\././'` | |
661 | + touch "$tmpdepfile" | |
662 | + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" | |
663 | + rm -f "$depfile" | |
664 | + # makedepend may prepend the VPATH from the source file name to the object. | |
665 | + # No need to regex-escape $object, excess matching of '.' is harmless. | |
666 | + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" | |
667 | + # Some versions of the HPUX 10.20 sed can't process the last invocation | |
668 | + # correctly. Breaking it into two sed invocations is a workaround. | |
669 | + sed '1,2d' "$tmpdepfile" \ | |
670 | + | tr ' ' "$nl" \ | |
671 | + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | |
672 | + | sed -e 's/$/ :/' >> "$depfile" | |
673 | + rm -f "$tmpdepfile" "$tmpdepfile".bak | |
674 | + ;; | |
675 | + | |
676 | +cpp) | |
677 | + # Important note: in order to support this mode, a compiler *must* | |
678 | + # always write the preprocessed file to stdout. | |
679 | + "$@" || exit $? | |
680 | + | |
681 | + # Remove the call to Libtool. | |
682 | + if test "$libtool" = yes; then | |
683 | + while test "X$1" != 'X--mode=compile'; do | |
684 | + shift | |
685 | + done | |
686 | + shift | |
687 | + fi | |
688 | + | |
689 | + # Remove '-o $object'. | |
690 | + IFS=" " | |
691 | + for arg | |
692 | + do | |
693 | + case $arg in | |
694 | + -o) | |
695 | + shift | |
696 | + ;; | |
697 | + $object) | |
698 | + shift | |
699 | + ;; | |
700 | + *) | |
701 | + set fnord "$@" "$arg" | |
702 | + shift # fnord | |
703 | + shift # $arg | |
704 | + ;; | |
705 | + esac | |
706 | + done | |
707 | + | |
708 | + "$@" -E \ | |
709 | + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | |
710 | + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | |
711 | + | sed '$ s: \\$::' > "$tmpdepfile" | |
712 | + rm -f "$depfile" | |
713 | + echo "$object : \\" > "$depfile" | |
714 | + cat < "$tmpdepfile" >> "$depfile" | |
715 | + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" | |
716 | + rm -f "$tmpdepfile" | |
717 | + ;; | |
718 | + | |
719 | +msvisualcpp) | |
720 | + # Important note: in order to support this mode, a compiler *must* | |
721 | + # always write the preprocessed file to stdout. | |
722 | + "$@" || exit $? | |
723 | + | |
724 | + # Remove the call to Libtool. | |
725 | + if test "$libtool" = yes; then | |
726 | + while test "X$1" != 'X--mode=compile'; do | |
727 | + shift | |
728 | + done | |
729 | + shift | |
730 | + fi | |
731 | + | |
732 | + IFS=" " | |
733 | + for arg | |
734 | + do | |
735 | + case "$arg" in | |
736 | + -o) | |
737 | + shift | |
738 | + ;; | |
739 | + $object) | |
740 | + shift | |
741 | + ;; | |
742 | + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") | |
743 | + set fnord "$@" | |
744 | + shift | |
745 | + shift | |
746 | + ;; | |
747 | + *) | |
748 | + set fnord "$@" "$arg" | |
749 | + shift | |
750 | + shift | |
751 | + ;; | |
752 | + esac | |
753 | + done | |
754 | + "$@" -E 2>/dev/null | | |
755 | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" | |
756 | + rm -f "$depfile" | |
757 | + echo "$object : \\" > "$depfile" | |
758 | + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" | |
759 | + echo "$tab" >> "$depfile" | |
760 | + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" | |
761 | + rm -f "$tmpdepfile" | |
762 | + ;; | |
763 | + | |
764 | +msvcmsys) | |
765 | + # This case exists only to let depend.m4 do its work. It works by | |
766 | + # looking at the text of this script. This case will never be run, | |
767 | + # since it is checked for above. | |
768 | + exit 1 | |
769 | + ;; | |
770 | + | |
771 | +none) | |
772 | + exec "$@" | |
773 | + ;; | |
774 | + | |
775 | +*) | |
776 | + echo "Unknown depmode $depmode" 1>&2 | |
777 | + exit 1 | |
778 | + ;; | |
779 | +esac | |
780 | + | |
781 | +exit 0 | |
782 | + | |
783 | +# Local Variables: | |
784 | +# mode: shell-script | |
785 | +# sh-indentation: 2 | |
786 | +# eval: (add-hook 'write-file-hooks 'time-stamp) | |
787 | +# time-stamp-start: "scriptversion=" | |
788 | +# time-stamp-format: "%:y-%02m-%02d.%02H" | |
789 | +# time-stamp-time-zone: "UTC" | |
790 | +# time-stamp-end: "; # UTC" | |
791 | +# End: |
@@ -0,0 +1,527 @@ | ||
1 | +#!/bin/sh | |
2 | +# install - install a program, script, or datafile | |
3 | + | |
4 | +scriptversion=2011-11-20.07; # UTC | |
5 | + | |
6 | +# This originates from X11R5 (mit/util/scripts/install.sh), which was | |
7 | +# later released in X11R6 (xc/config/util/install.sh) with the | |
8 | +# following copyright and license. | |
9 | +# | |
10 | +# Copyright (C) 1994 X Consortium | |
11 | +# | |
12 | +# Permission is hereby granted, free of charge, to any person obtaining a copy | |
13 | +# of this software and associated documentation files (the "Software"), to | |
14 | +# deal in the Software without restriction, including without limitation the | |
15 | +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
16 | +# sell copies of the Software, and to permit persons to whom the Software is | |
17 | +# furnished to do so, subject to the following conditions: | |
18 | +# | |
19 | +# The above copyright notice and this permission notice shall be included in | |
20 | +# all copies or substantial portions of the Software. | |
21 | +# | |
22 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
23 | +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
24 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
25 | +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |
26 | +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- | |
27 | +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
28 | +# | |
29 | +# Except as contained in this notice, the name of the X Consortium shall not | |
30 | +# be used in advertising or otherwise to promote the sale, use or other deal- | |
31 | +# ings in this Software without prior written authorization from the X Consor- | |
32 | +# tium. | |
33 | +# | |
34 | +# | |
35 | +# FSF changes to this file are in the public domain. | |
36 | +# | |
37 | +# Calling this script install-sh is preferred over install.sh, to prevent | |
38 | +# 'make' implicit rules from creating a file called install from it | |
39 | +# when there is no Makefile. | |
40 | +# | |
41 | +# This script is compatible with the BSD install script, but was written | |
42 | +# from scratch. | |
43 | + | |
44 | +nl=' | |
45 | +' | |
46 | +IFS=" "" $nl" | |
47 | + | |
48 | +# set DOITPROG to echo to test this script | |
49 | + | |
50 | +# Don't use :- since 4.3BSD and earlier shells don't like it. | |
51 | +doit=${DOITPROG-} | |
52 | +if test -z "$doit"; then | |
53 | + doit_exec=exec | |
54 | +else | |
55 | + doit_exec=$doit | |
56 | +fi | |
57 | + | |
58 | +# Put in absolute file names if you don't have them in your path; | |
59 | +# or use environment vars. | |
60 | + | |
61 | +chgrpprog=${CHGRPPROG-chgrp} | |
62 | +chmodprog=${CHMODPROG-chmod} | |
63 | +chownprog=${CHOWNPROG-chown} | |
64 | +cmpprog=${CMPPROG-cmp} | |
65 | +cpprog=${CPPROG-cp} | |
66 | +mkdirprog=${MKDIRPROG-mkdir} | |
67 | +mvprog=${MVPROG-mv} | |
68 | +rmprog=${RMPROG-rm} | |
69 | +stripprog=${STRIPPROG-strip} | |
70 | + | |
71 | +posix_glob='?' | |
72 | +initialize_posix_glob=' | |
73 | + test "$posix_glob" != "?" || { | |
74 | + if (set -f) 2>/dev/null; then | |
75 | + posix_glob= | |
76 | + else | |
77 | + posix_glob=: | |
78 | + fi | |
79 | + } | |
80 | +' | |
81 | + | |
82 | +posix_mkdir= | |
83 | + | |
84 | +# Desired mode of installed file. | |
85 | +mode=0755 | |
86 | + | |
87 | +chgrpcmd= | |
88 | +chmodcmd=$chmodprog | |
89 | +chowncmd= | |
90 | +mvcmd=$mvprog | |
91 | +rmcmd="$rmprog -f" | |
92 | +stripcmd= | |
93 | + | |
94 | +src= | |
95 | +dst= | |
96 | +dir_arg= | |
97 | +dst_arg= | |
98 | + | |
99 | +copy_on_change=false | |
100 | +no_target_directory= | |
101 | + | |
102 | +usage="\ | |
103 | +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE | |
104 | + or: $0 [OPTION]... SRCFILES... DIRECTORY | |
105 | + or: $0 [OPTION]... -t DIRECTORY SRCFILES... | |
106 | + or: $0 [OPTION]... -d DIRECTORIES... | |
107 | + | |
108 | +In the 1st form, copy SRCFILE to DSTFILE. | |
109 | +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. | |
110 | +In the 4th, create DIRECTORIES. | |
111 | + | |
112 | +Options: | |
113 | + --help display this help and exit. | |
114 | + --version display version info and exit. | |
115 | + | |
116 | + -c (ignored) | |
117 | + -C install only if different (preserve the last data modification time) | |
118 | + -d create directories instead of installing files. | |
119 | + -g GROUP $chgrpprog installed files to GROUP. | |
120 | + -m MODE $chmodprog installed files to MODE. | |
121 | + -o USER $chownprog installed files to USER. | |
122 | + -s $stripprog installed files. | |
123 | + -t DIRECTORY install into DIRECTORY. | |
124 | + -T report an error if DSTFILE is a directory. | |
125 | + | |
126 | +Environment variables override the default commands: | |
127 | + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG | |
128 | + RMPROG STRIPPROG | |
129 | +" | |
130 | + | |
131 | +while test $# -ne 0; do | |
132 | + case $1 in | |
133 | + -c) ;; | |
134 | + | |
135 | + -C) copy_on_change=true;; | |
136 | + | |
137 | + -d) dir_arg=true;; | |
138 | + | |
139 | + -g) chgrpcmd="$chgrpprog $2" | |
140 | + shift;; | |
141 | + | |
142 | + --help) echo "$usage"; exit $?;; | |
143 | + | |
144 | + -m) mode=$2 | |
145 | + case $mode in | |
146 | + *' '* | *' '* | *' | |
147 | +'* | *'*'* | *'?'* | *'['*) | |
148 | + echo "$0: invalid mode: $mode" >&2 | |
149 | + exit 1;; | |
150 | + esac | |
151 | + shift;; | |
152 | + | |
153 | + -o) chowncmd="$chownprog $2" | |
154 | + shift;; | |
155 | + | |
156 | + -s) stripcmd=$stripprog;; | |
157 | + | |
158 | + -t) dst_arg=$2 | |
159 | + # Protect names problematic for 'test' and other utilities. | |
160 | + case $dst_arg in | |
161 | + -* | [=\(\)!]) dst_arg=./$dst_arg;; | |
162 | + esac | |
163 | + shift;; | |
164 | + | |
165 | + -T) no_target_directory=true;; | |
166 | + | |
167 | + --version) echo "$0 $scriptversion"; exit $?;; | |
168 | + | |
169 | + --) shift | |
170 | + break;; | |
171 | + | |
172 | + -*) echo "$0: invalid option: $1" >&2 | |
173 | + exit 1;; | |
174 | + | |
175 | + *) break;; | |
176 | + esac | |
177 | + shift | |
178 | +done | |
179 | + | |
180 | +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then | |
181 | + # When -d is used, all remaining arguments are directories to create. | |
182 | + # When -t is used, the destination is already specified. | |
183 | + # Otherwise, the last argument is the destination. Remove it from $@. | |
184 | + for arg | |
185 | + do | |
186 | + if test -n "$dst_arg"; then | |
187 | + # $@ is not empty: it contains at least $arg. | |
188 | + set fnord "$@" "$dst_arg" | |
189 | + shift # fnord | |
190 | + fi | |
191 | + shift # arg | |
192 | + dst_arg=$arg | |
193 | + # Protect names problematic for 'test' and other utilities. | |
194 | + case $dst_arg in | |
195 | + -* | [=\(\)!]) dst_arg=./$dst_arg;; | |
196 | + esac | |
197 | + done | |
198 | +fi | |
199 | + | |
200 | +if test $# -eq 0; then | |
201 | + if test -z "$dir_arg"; then | |
202 | + echo "$0: no input file specified." >&2 | |
203 | + exit 1 | |
204 | + fi | |
205 | + # It's OK to call 'install-sh -d' without argument. | |
206 | + # This can happen when creating conditional directories. | |
207 | + exit 0 | |
208 | +fi | |
209 | + | |
210 | +if test -z "$dir_arg"; then | |
211 | + do_exit='(exit $ret); exit $ret' | |
212 | + trap "ret=129; $do_exit" 1 | |
213 | + trap "ret=130; $do_exit" 2 | |
214 | + trap "ret=141; $do_exit" 13 | |
215 | + trap "ret=143; $do_exit" 15 | |
216 | + | |
217 | + # Set umask so as not to create temps with too-generous modes. | |
218 | + # However, 'strip' requires both read and write access to temps. | |
219 | + case $mode in | |
220 | + # Optimize common cases. | |
221 | + *644) cp_umask=133;; | |
222 | + *755) cp_umask=22;; | |
223 | + | |
224 | + *[0-7]) | |
225 | + if test -z "$stripcmd"; then | |
226 | + u_plus_rw= | |
227 | + else | |
228 | + u_plus_rw='% 200' | |
229 | + fi | |
230 | + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; | |
231 | + *) | |
232 | + if test -z "$stripcmd"; then | |
233 | + u_plus_rw= | |
234 | + else | |
235 | + u_plus_rw=,u+rw | |
236 | + fi | |
237 | + cp_umask=$mode$u_plus_rw;; | |
238 | + esac | |
239 | +fi | |
240 | + | |
241 | +for src | |
242 | +do | |
243 | + # Protect names problematic for 'test' and other utilities. | |
244 | + case $src in | |
245 | + -* | [=\(\)!]) src=./$src;; | |
246 | + esac | |
247 | + | |
248 | + if test -n "$dir_arg"; then | |
249 | + dst=$src | |
250 | + dstdir=$dst | |
251 | + test -d "$dstdir" | |
252 | + dstdir_status=$? | |
253 | + else | |
254 | + | |
255 | + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command | |
256 | + # might cause directories to be created, which would be especially bad | |
257 | + # if $src (and thus $dsttmp) contains '*'. | |
258 | + if test ! -f "$src" && test ! -d "$src"; then | |
259 | + echo "$0: $src does not exist." >&2 | |
260 | + exit 1 | |
261 | + fi | |
262 | + | |
263 | + if test -z "$dst_arg"; then | |
264 | + echo "$0: no destination specified." >&2 | |
265 | + exit 1 | |
266 | + fi | |
267 | + dst=$dst_arg | |
268 | + | |
269 | + # If destination is a directory, append the input filename; won't work | |
270 | + # if double slashes aren't ignored. | |
271 | + if test -d "$dst"; then | |
272 | + if test -n "$no_target_directory"; then | |
273 | + echo "$0: $dst_arg: Is a directory" >&2 | |
274 | + exit 1 | |
275 | + fi | |
276 | + dstdir=$dst | |
277 | + dst=$dstdir/`basename "$src"` | |
278 | + dstdir_status=0 | |
279 | + else | |
280 | + # Prefer dirname, but fall back on a substitute if dirname fails. | |
281 | + dstdir=` | |
282 | + (dirname "$dst") 2>/dev/null || | |
283 | + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
284 | + X"$dst" : 'X\(//\)[^/]' \| \ | |
285 | + X"$dst" : 'X\(//\)$' \| \ | |
286 | + X"$dst" : 'X\(/\)' \| . 2>/dev/null || | |
287 | + echo X"$dst" | | |
288 | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
289 | + s//\1/ | |
290 | + q | |
291 | + } | |
292 | + /^X\(\/\/\)[^/].*/{ | |
293 | + s//\1/ | |
294 | + q | |
295 | + } | |
296 | + /^X\(\/\/\)$/{ | |
297 | + s//\1/ | |
298 | + q | |
299 | + } | |
300 | + /^X\(\/\).*/{ | |
301 | + s//\1/ | |
302 | + q | |
303 | + } | |
304 | + s/.*/./; q' | |
305 | + ` | |
306 | + | |
307 | + test -d "$dstdir" | |
308 | + dstdir_status=$? | |
309 | + fi | |
310 | + fi | |
311 | + | |
312 | + obsolete_mkdir_used=false | |
313 | + | |
314 | + if test $dstdir_status != 0; then | |
315 | + case $posix_mkdir in | |
316 | + '') | |
317 | + # Create intermediate dirs using mode 755 as modified by the umask. | |
318 | + # This is like FreeBSD 'install' as of 1997-10-28. | |
319 | + umask=`umask` | |
320 | + case $stripcmd.$umask in | |
321 | + # Optimize common cases. | |
322 | + *[2367][2367]) mkdir_umask=$umask;; | |
323 | + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; | |
324 | + | |
325 | + *[0-7]) | |
326 | + mkdir_umask=`expr $umask + 22 \ | |
327 | + - $umask % 100 % 40 + $umask % 20 \ | |
328 | + - $umask % 10 % 4 + $umask % 2 | |
329 | + `;; | |
330 | + *) mkdir_umask=$umask,go-w;; | |
331 | + esac | |
332 | + | |
333 | + # With -d, create the new directory with the user-specified mode. | |
334 | + # Otherwise, rely on $mkdir_umask. | |
335 | + if test -n "$dir_arg"; then | |
336 | + mkdir_mode=-m$mode | |
337 | + else | |
338 | + mkdir_mode= | |
339 | + fi | |
340 | + | |
341 | + posix_mkdir=false | |
342 | + case $umask in | |
343 | + *[123567][0-7][0-7]) | |
344 | + # POSIX mkdir -p sets u+wx bits regardless of umask, which | |
345 | + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. | |
346 | + ;; | |
347 | + *) | |
348 | + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ | |
349 | + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 | |
350 | + | |
351 | + if (umask $mkdir_umask && | |
352 | + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 | |
353 | + then | |
354 | + if test -z "$dir_arg" || { | |
355 | + # Check for POSIX incompatibilities with -m. | |
356 | + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or | |
357 | + # other-writable bit of parent directory when it shouldn't. | |
358 | + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. | |
359 | + ls_ld_tmpdir=`ls -ld "$tmpdir"` | |
360 | + case $ls_ld_tmpdir in | |
361 | + d????-?r-*) different_mode=700;; | |
362 | + d????-?--*) different_mode=755;; | |
363 | + *) false;; | |
364 | + esac && | |
365 | + $mkdirprog -m$different_mode -p -- "$tmpdir" && { | |
366 | + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` | |
367 | + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" | |
368 | + } | |
369 | + } | |
370 | + then posix_mkdir=: | |
371 | + fi | |
372 | + rmdir "$tmpdir/d" "$tmpdir" | |
373 | + else | |
374 | + # Remove any dirs left behind by ancient mkdir implementations. | |
375 | + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null | |
376 | + fi | |
377 | + trap '' 0;; | |
378 | + esac;; | |
379 | + esac | |
380 | + | |
381 | + if | |
382 | + $posix_mkdir && ( | |
383 | + umask $mkdir_umask && | |
384 | + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" | |
385 | + ) | |
386 | + then : | |
387 | + else | |
388 | + | |
389 | + # The umask is ridiculous, or mkdir does not conform to POSIX, | |
390 | + # or it failed possibly due to a race condition. Create the | |
391 | + # directory the slow way, step by step, checking for races as we go. | |
392 | + | |
393 | + case $dstdir in | |
394 | + /*) prefix='/';; | |
395 | + [-=\(\)!]*) prefix='./';; | |
396 | + *) prefix='';; | |
397 | + esac | |
398 | + | |
399 | + eval "$initialize_posix_glob" | |
400 | + | |
401 | + oIFS=$IFS | |
402 | + IFS=/ | |
403 | + $posix_glob set -f | |
404 | + set fnord $dstdir | |
405 | + shift | |
406 | + $posix_glob set +f | |
407 | + IFS=$oIFS | |
408 | + | |
409 | + prefixes= | |
410 | + | |
411 | + for d | |
412 | + do | |
413 | + test X"$d" = X && continue | |
414 | + | |
415 | + prefix=$prefix$d | |
416 | + if test -d "$prefix"; then | |
417 | + prefixes= | |
418 | + else | |
419 | + if $posix_mkdir; then | |
420 | + (umask=$mkdir_umask && | |
421 | + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break | |
422 | + # Don't fail if two instances are running concurrently. | |
423 | + test -d "$prefix" || exit 1 | |
424 | + else | |
425 | + case $prefix in | |
426 | + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; | |
427 | + *) qprefix=$prefix;; | |
428 | + esac | |
429 | + prefixes="$prefixes '$qprefix'" | |
430 | + fi | |
431 | + fi | |
432 | + prefix=$prefix/ | |
433 | + done | |
434 | + | |
435 | + if test -n "$prefixes"; then | |
436 | + # Don't fail if two instances are running concurrently. | |
437 | + (umask $mkdir_umask && | |
438 | + eval "\$doit_exec \$mkdirprog $prefixes") || | |
439 | + test -d "$dstdir" || exit 1 | |
440 | + obsolete_mkdir_used=true | |
441 | + fi | |
442 | + fi | |
443 | + fi | |
444 | + | |
445 | + if test -n "$dir_arg"; then | |
446 | + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && | |
447 | + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && | |
448 | + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || | |
449 | + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 | |
450 | + else | |
451 | + | |
452 | + # Make a couple of temp file names in the proper directory. | |
453 | + dsttmp=$dstdir/_inst.$$_ | |
454 | + rmtmp=$dstdir/_rm.$$_ | |
455 | + | |
456 | + # Trap to clean up those temp files at exit. | |
457 | + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 | |
458 | + | |
459 | + # Copy the file name to the temp name. | |
460 | + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && | |
461 | + | |
462 | + # and set any options; do chmod last to preserve setuid bits. | |
463 | + # | |
464 | + # If any of these fail, we abort the whole thing. If we want to | |
465 | + # ignore errors from any of these, just make sure not to ignore | |
466 | + # errors from the above "$doit $cpprog $src $dsttmp" command. | |
467 | + # | |
468 | + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && | |
469 | + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && | |
470 | + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && | |
471 | + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && | |
472 | + | |
473 | + # If -C, don't bother to copy if it wouldn't change the file. | |
474 | + if $copy_on_change && | |
475 | + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && | |
476 | + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && | |
477 | + | |
478 | + eval "$initialize_posix_glob" && | |
479 | + $posix_glob set -f && | |
480 | + set X $old && old=:$2:$4:$5:$6 && | |
481 | + set X $new && new=:$2:$4:$5:$6 && | |
482 | + $posix_glob set +f && | |
483 | + | |
484 | + test "$old" = "$new" && | |
485 | + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 | |
486 | + then | |
487 | + rm -f "$dsttmp" | |
488 | + else | |
489 | + # Rename the file to the real destination. | |
490 | + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || | |
491 | + | |
492 | + # The rename failed, perhaps because mv can't rename something else | |
493 | + # to itself, or perhaps because mv is so ancient that it does not | |
494 | + # support -f. | |
495 | + { | |
496 | + # Now remove or move aside any old file at destination location. | |
497 | + # We try this two ways since rm can't unlink itself on some | |
498 | + # systems and the destination file might be busy for other | |
499 | + # reasons. In this case, the final cleanup might fail but the new | |
500 | + # file should still install successfully. | |
501 | + { | |
502 | + test ! -f "$dst" || | |
503 | + $doit $rmcmd -f "$dst" 2>/dev/null || | |
504 | + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && | |
505 | + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } | |
506 | + } || | |
507 | + { echo "$0: cannot unlink or rename $dst" >&2 | |
508 | + (exit 1); exit 1 | |
509 | + } | |
510 | + } && | |
511 | + | |
512 | + # Now rename the file to the real destination. | |
513 | + $doit $mvcmd "$dsttmp" "$dst" | |
514 | + } | |
515 | + fi || exit 1 | |
516 | + | |
517 | + trap '' 0 | |
518 | + fi | |
519 | +done | |
520 | + | |
521 | +# Local variables: | |
522 | +# eval: (add-hook 'write-file-hooks 'time-stamp) | |
523 | +# time-stamp-start: "scriptversion=" | |
524 | +# time-stamp-format: "%:y-%02m-%02d.%02H" | |
525 | +# time-stamp-time-zone: "UTC" | |
526 | +# time-stamp-end: "; # UTC" | |
527 | +# End: |
@@ -0,0 +1,215 @@ | ||
1 | +#! /bin/sh | |
2 | +# Common wrapper for a few potentially missing GNU programs. | |
3 | + | |
4 | +scriptversion=2013-10-28.13; # UTC | |
5 | + | |
6 | +# Copyright (C) 1996-2013 Free Software Foundation, Inc. | |
7 | +# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. | |
8 | + | |
9 | +# This program is free software; you can redistribute it and/or modify | |
10 | +# it under the terms of the GNU General Public License as published by | |
11 | +# the Free Software Foundation; either version 2, or (at your option) | |
12 | +# any later version. | |
13 | + | |
14 | +# This program is distributed in the hope that it will be useful, | |
15 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | +# GNU General Public License for more details. | |
18 | + | |
19 | +# You should have received a copy of the GNU General Public License | |
20 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 | + | |
22 | +# As a special exception to the GNU General Public License, if you | |
23 | +# distribute this file as part of a program that contains a | |
24 | +# configuration script generated by Autoconf, you may include it under | |
25 | +# the same distribution terms that you use for the rest of that program. | |
26 | + | |
27 | +if test $# -eq 0; then | |
28 | + echo 1>&2 "Try '$0 --help' for more information" | |
29 | + exit 1 | |
30 | +fi | |
31 | + | |
32 | +case $1 in | |
33 | + | |
34 | + --is-lightweight) | |
35 | + # Used by our autoconf macros to check whether the available missing | |
36 | + # script is modern enough. | |
37 | + exit 0 | |
38 | + ;; | |
39 | + | |
40 | + --run) | |
41 | + # Back-compat with the calling convention used by older automake. | |
42 | + shift | |
43 | + ;; | |
44 | + | |
45 | + -h|--h|--he|--hel|--help) | |
46 | + echo "\ | |
47 | +$0 [OPTION]... PROGRAM [ARGUMENT]... | |
48 | + | |
49 | +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due | |
50 | +to PROGRAM being missing or too old. | |
51 | + | |
52 | +Options: | |
53 | + -h, --help display this help and exit | |
54 | + -v, --version output version information and exit | |
55 | + | |
56 | +Supported PROGRAM values: | |
57 | + aclocal autoconf autoheader autom4te automake makeinfo | |
58 | + bison yacc flex lex help2man | |
59 | + | |
60 | +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and | |
61 | +'g' are ignored when checking the name. | |
62 | + | |
63 | +Send bug reports to <bug-automake@gnu.org>." | |
64 | + exit $? | |
65 | + ;; | |
66 | + | |
67 | + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) | |
68 | + echo "missing $scriptversion (GNU Automake)" | |
69 | + exit $? | |
70 | + ;; | |
71 | + | |
72 | + -*) | |
73 | + echo 1>&2 "$0: unknown '$1' option" | |
74 | + echo 1>&2 "Try '$0 --help' for more information" | |
75 | + exit 1 | |
76 | + ;; | |
77 | + | |
78 | +esac | |
79 | + | |
80 | +# Run the given program, remember its exit status. | |
81 | +"$@"; st=$? | |
82 | + | |
83 | +# If it succeeded, we are done. | |
84 | +test $st -eq 0 && exit 0 | |
85 | + | |
86 | +# Also exit now if we it failed (or wasn't found), and '--version' was | |
87 | +# passed; such an option is passed most likely to detect whether the | |
88 | +# program is present and works. | |
89 | +case $2 in --version|--help) exit $st;; esac | |
90 | + | |
91 | +# Exit code 63 means version mismatch. This often happens when the user | |
92 | +# tries to use an ancient version of a tool on a file that requires a | |
93 | +# minimum version. | |
94 | +if test $st -eq 63; then | |
95 | + msg="probably too old" | |
96 | +elif test $st -eq 127; then | |
97 | + # Program was missing. | |
98 | + msg="missing on your system" | |
99 | +else | |
100 | + # Program was found and executed, but failed. Give up. | |
101 | + exit $st | |
102 | +fi | |
103 | + | |
104 | +perl_URL=http://www.perl.org/ | |
105 | +flex_URL=http://flex.sourceforge.net/ | |
106 | +gnu_software_URL=http://www.gnu.org/software | |
107 | + | |
108 | +program_details () | |
109 | +{ | |
110 | + case $1 in | |
111 | + aclocal|automake) | |
112 | + echo "The '$1' program is part of the GNU Automake package:" | |
113 | + echo "<$gnu_software_URL/automake>" | |
114 | + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" | |
115 | + echo "<$gnu_software_URL/autoconf>" | |
116 | + echo "<$gnu_software_URL/m4/>" | |
117 | + echo "<$perl_URL>" | |
118 | + ;; | |
119 | + autoconf|autom4te|autoheader) | |
120 | + echo "The '$1' program is part of the GNU Autoconf package:" | |
121 | + echo "<$gnu_software_URL/autoconf/>" | |
122 | + echo "It also requires GNU m4 and Perl in order to run:" | |
123 | + echo "<$gnu_software_URL/m4/>" | |
124 | + echo "<$perl_URL>" | |
125 | + ;; | |
126 | + esac | |
127 | +} | |
128 | + | |
129 | +give_advice () | |
130 | +{ | |
131 | + # Normalize program name to check for. | |
132 | + normalized_program=`echo "$1" | sed ' | |
133 | + s/^gnu-//; t | |
134 | + s/^gnu//; t | |
135 | + s/^g//; t'` | |
136 | + | |
137 | + printf '%s\n' "'$1' is $msg." | |
138 | + | |
139 | + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" | |
140 | + case $normalized_program in | |
141 | + autoconf*) | |
142 | + echo "You should only need it if you modified 'configure.ac'," | |
143 | + echo "or m4 files included by it." | |
144 | + program_details 'autoconf' | |
145 | + ;; | |
146 | + autoheader*) | |
147 | + echo "You should only need it if you modified 'acconfig.h' or" | |
148 | + echo "$configure_deps." | |
149 | + program_details 'autoheader' | |
150 | + ;; | |
151 | + automake*) | |
152 | + echo "You should only need it if you modified 'Makefile.am' or" | |
153 | + echo "$configure_deps." | |
154 | + program_details 'automake' | |
155 | + ;; | |
156 | + aclocal*) | |
157 | + echo "You should only need it if you modified 'acinclude.m4' or" | |
158 | + echo "$configure_deps." | |
159 | + program_details 'aclocal' | |
160 | + ;; | |
161 | + autom4te*) | |
162 | + echo "You might have modified some maintainer files that require" | |
163 | + echo "the 'autom4te' program to be rebuilt." | |
164 | + program_details 'autom4te' | |
165 | + ;; | |
166 | + bison*|yacc*) | |
167 | + echo "You should only need it if you modified a '.y' file." | |
168 | + echo "You may want to install the GNU Bison package:" | |
169 | + echo "<$gnu_software_URL/bison/>" | |
170 | + ;; | |
171 | + lex*|flex*) | |
172 | + echo "You should only need it if you modified a '.l' file." | |
173 | + echo "You may want to install the Fast Lexical Analyzer package:" | |
174 | + echo "<$flex_URL>" | |
175 | + ;; | |
176 | + help2man*) | |
177 | + echo "You should only need it if you modified a dependency" \ | |
178 | + "of a man page." | |
179 | + echo "You may want to install the GNU Help2man package:" | |
180 | + echo "<$gnu_software_URL/help2man/>" | |
181 | + ;; | |
182 | + makeinfo*) | |
183 | + echo "You should only need it if you modified a '.texi' file, or" | |
184 | + echo "any other file indirectly affecting the aspect of the manual." | |
185 | + echo "You might want to install the Texinfo package:" | |
186 | + echo "<$gnu_software_URL/texinfo/>" | |
187 | + echo "The spurious makeinfo call might also be the consequence of" | |
188 | + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" | |
189 | + echo "want to install GNU make:" | |
190 | + echo "<$gnu_software_URL/make/>" | |
191 | + ;; | |
192 | + *) | |
193 | + echo "You might have modified some files without having the proper" | |
194 | + echo "tools for further handling them. Check the 'README' file, it" | |
195 | + echo "often tells you about the needed prerequisites for installing" | |
196 | + echo "this package. You may also peek at any GNU archive site, in" | |
197 | + echo "case some other package contains this missing '$1' program." | |
198 | + ;; | |
199 | + esac | |
200 | +} | |
201 | + | |
202 | +give_advice "$1" | sed -e '1s/^/WARNING: /' \ | |
203 | + -e '2,$s/^/ /' >&2 | |
204 | + | |
205 | +# Propagate the correct exit status (expected to be 127 for a program | |
206 | +# not found, 63 for a program that failed due to version mismatch). | |
207 | +exit $st | |
208 | + | |
209 | +# Local variables: | |
210 | +# eval: (add-hook 'write-file-hooks 'time-stamp) | |
211 | +# time-stamp-start: "scriptversion=" | |
212 | +# time-stamp-format: "%:y-%02m-%02d.%02H" | |
213 | +# time-stamp-time-zone: "UTC" | |
214 | +# time-stamp-end: "; # UTC" | |
215 | +# End: |
@@ -0,0 +1,9849 @@ | ||
1 | +#! /bin/sh | |
2 | +# Guess values for system-dependent variables and create Makefiles. | |
3 | +# Generated by GNU Autoconf 2.69 for fermisurfer 1.9. | |
4 | +# | |
5 | +# Report bugs to <mkawamura@issp.u-tokyo.ac.jp>. | |
6 | +# | |
7 | +# | |
8 | +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. | |
9 | +# | |
10 | +# | |
11 | +# This configure script is free software; the Free Software Foundation | |
12 | +# gives unlimited permission to copy, distribute and modify it. | |
13 | +## -------------------- ## | |
14 | +## M4sh Initialization. ## | |
15 | +## -------------------- ## | |
16 | + | |
17 | +# Be more Bourne compatible | |
18 | +DUALCASE=1; export DUALCASE # for MKS sh | |
19 | +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
20 | + emulate sh | |
21 | + NULLCMD=: | |
22 | + # Pre-4.2 vers |