]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
093e61a6 | 2 | |
861bb6c1 | 3 | # Guess values for system-dependent variables and create Makefiles. |
093e61a6 RS |
4 | # Generated automatically using autoconf version 2.13 |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
861bb6c1 JL |
6 | # |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
093e61a6 RS |
10 | # Defaults: |
11 | ac_help= | |
861bb6c1 | 12 | ac_default_prefix=/usr/local |
093e61a6 RS |
13 | # Any additions from configure.in: |
14 | ac_help="$ac_help | |
15 | --with-local-prefix=DIR specifies directory to put local include" | |
16 | ac_help="$ac_help | |
17 | --with-gxx-include-dir=DIR | |
18 | specifies directory to put g++ header files" | |
19 | ac_help="$ac_help | |
20 | --with-cpp-install-dir=DIR | |
21 | install the user visible C preprocessor in DIR | |
22 | (relative to PREFIX) as well as PREFIX/bin" | |
51b9ff45 KC |
23 | ac_help="$ac_help |
24 | --enable-generated-files-in-srcdir Put generated files in source dir" | |
093e61a6 RS |
25 | ac_help="$ac_help |
26 | --with-gnu-ld arrange to work with GNU ld." | |
27 | ac_help="$ac_help | |
28 | --with-ld arrange to use the specified ld (full pathname)" | |
29 | ac_help="$ac_help | |
30 | --with-gnu-as arrange to work with GNU as" | |
31 | ac_help="$ac_help | |
32 | --with-as arrange to use the specified as (full pathname)" | |
33 | ac_help="$ac_help | |
34 | --enable-werror enable -Werror in bootstrap stage2 and later" | |
35 | ac_help="$ac_help | |
36 | --enable-checking[=LIST] | |
37 | enable expensive run-time checks. With LIST, | |
38 | enable only specific categories of checks. | |
5dfa45d0 | 39 | Categories are: misc,tree,rtl,rtlflag,gc,gcac,fold; |
093e61a6 RS |
40 | default is misc,tree,gc,rtlflag" |
41 | ac_help="$ac_help | |
42 | --enable-coverage[=LEVEL] | |
43 | enable compiler\'s code coverage collection. | |
44 | Use to measure compiler performance and locate | |
45 | unused parts of the compiler. With LEVEL, specify | |
46 | optimization. Values are opt, noopt, | |
47 | default is noopt" | |
48 | ac_help="$ac_help | |
49 | --with-stabs arrange to use stabs instead of host debug format" | |
093e61a6 RS |
50 | ac_help="$ac_help |
51 | --enable-multilib enable library support for multiple ABIs" | |
52 | ac_help="$ac_help | |
53 | --enable-__cxa_atexit enable __cxa_atexit for C++" | |
093e61a6 RS |
54 | ac_help="$ac_help |
55 | --enable-threads enable thread usage for target GCC | |
56 | --enable-threads=LIB use LIB thread package for target GCC" | |
57 | ac_help="$ac_help | |
58 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
59 | the GNU Objective-C runtime" | |
60 | ac_help="$ac_help | |
61 | --with-dwarf2 force the default debug format to be DWARF 2" | |
62 | ac_help="$ac_help | |
63 | --disable-shared don't provide a shared libgcc" | |
64 | ac_help="$ac_help | |
65 | --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR." | |
d1bd0ded GK |
66 | ac_help="$ac_help |
67 | --enable-intermodule build the compiler in one step" | |
093e61a6 RS |
68 | ac_help="$ac_help |
69 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
70 | ac_help="$ac_help | |
71 | --enable-initfini-array use .init_array/.fini_array sections" | |
72 | ac_help="$ac_help | |
73 | --enable-sjlj-exceptions | |
74 | arrange to use setjmp/longjmp exception handling" | |
75 | ac_help="$ac_help | |
76 | --enable-libunwind-exceptions force use libunwind for exceptions" | |
093e61a6 RS |
77 | ac_help="$ac_help |
78 | --disable-win32-registry | |
79 | disable lookup of installation paths in the | |
80 | Registry on Windows hosts | |
81 | --enable-win32-registry enable registry lookup (default) | |
82 | --enable-win32-registry=KEY | |
83 | use KEY instead of GCC version as the last portion | |
84 | of the registry key" | |
85 | ac_help="$ac_help | |
b6f61163 | 86 | --with-gc={simple,page,zone} choose the garbage collection mechanism to use |
093e61a6 RS |
87 | with the compiler" |
88 | ac_help="$ac_help | |
89 | --with-system-zlib use installed libz" | |
90 | ac_help="$ac_help | |
91 | --enable-maintainer-mode | |
92 | enable make rules and dependencies not useful | |
93 | (and sometimes confusing) to the casual installer" | |
94 | ac_help="$ac_help | |
95 | --enable-version-specific-runtime-libs | |
96 | specify that runtime libraries should be | |
97 | installed in a compiler-specific directory" | |
98 | ac_help="$ac_help | |
99 | --with-slibdir=DIR shared libraries in DIR [LIBDIR]" | |
861bb6c1 JL |
100 | |
101 | # Initialize some variables set by options. | |
102 | # The variables have the same names as the options, with | |
103 | # dashes changed to underlines. | |
093e61a6 RS |
104 | build=NONE |
105 | cache_file=./config.cache | |
861bb6c1 | 106 | exec_prefix=NONE |
093e61a6 | 107 | host=NONE |
861bb6c1 | 108 | no_create= |
093e61a6 | 109 | nonopt=NONE |
861bb6c1 JL |
110 | no_recursion= |
111 | prefix=NONE | |
112 | program_prefix=NONE | |
113 | program_suffix=NONE | |
114 | program_transform_name=s,x,x, | |
115 | silent= | |
116 | site= | |
117 | srcdir= | |
093e61a6 | 118 | target=NONE |
861bb6c1 JL |
119 | verbose= |
120 | x_includes=NONE | |
121 | x_libraries=NONE | |
122 | bindir='${exec_prefix}/bin' | |
123 | sbindir='${exec_prefix}/sbin' | |
124 | libexecdir='${exec_prefix}/libexec' | |
125 | datadir='${prefix}/share' | |
126 | sysconfdir='${prefix}/etc' | |
127 | sharedstatedir='${prefix}/com' | |
128 | localstatedir='${prefix}/var' | |
129 | libdir='${exec_prefix}/lib' | |
130 | includedir='${prefix}/include' | |
131 | oldincludedir='/usr/include' | |
132 | infodir='${prefix}/info' | |
133 | mandir='${prefix}/man' | |
134 | ||
093e61a6 RS |
135 | # Initialize some other variables. |
136 | subdirs= | |
137 | MFLAGS= MAKEFLAGS= | |
138 | SHELL=${CONFIG_SHELL-/bin/sh} | |
139 | # Maximum number of lines to put in a shell here document. | |
140 | ac_max_here_lines=12 | |
141 | ||
861bb6c1 JL |
142 | ac_prev= |
143 | for ac_option | |
144 | do | |
093e61a6 | 145 | |
861bb6c1 JL |
146 | # If the previous option needs an argument, assign it. |
147 | if test -n "$ac_prev"; then | |
148 | eval "$ac_prev=\$ac_option" | |
149 | ac_prev= | |
150 | continue | |
151 | fi | |
152 | ||
093e61a6 RS |
153 | case "$ac_option" in |
154 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
155 | *) ac_optarg= ;; | |
156 | esac | |
861bb6c1 JL |
157 | |
158 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
159 | ||
093e61a6 | 160 | case "$ac_option" in |
861bb6c1 JL |
161 | |
162 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
163 | ac_prev=bindir ;; | |
164 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
093e61a6 | 165 | bindir="$ac_optarg" ;; |
861bb6c1 JL |
166 | |
167 | -build | --build | --buil | --bui | --bu) | |
093e61a6 | 168 | ac_prev=build ;; |
861bb6c1 | 169 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
093e61a6 | 170 | build="$ac_optarg" ;; |
861bb6c1 JL |
171 | |
172 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
173 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
174 | ac_prev=cache_file ;; | |
175 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
176 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
093e61a6 | 177 | cache_file="$ac_optarg" ;; |
861bb6c1 JL |
178 | |
179 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
180 | ac_prev=datadir ;; | |
181 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
182 | | --da=*) | |
093e61a6 | 183 | datadir="$ac_optarg" ;; |
861bb6c1 JL |
184 | |
185 | -disable-* | --disable-*) | |
093e61a6 | 186 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
861bb6c1 | 187 | # Reject names that are not valid shell variable names. |
093e61a6 RS |
188 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
189 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
190 | fi | |
191 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
192 | eval "enable_${ac_feature}=no" ;; | |
861bb6c1 JL |
193 | |
194 | -enable-* | --enable-*) | |
093e61a6 | 195 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
861bb6c1 | 196 | # Reject names that are not valid shell variable names. |
093e61a6 RS |
197 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
198 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
199 | fi | |
200 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
201 | case "$ac_option" in | |
202 | *=*) ;; | |
861bb6c1 JL |
203 | *) ac_optarg=yes ;; |
204 | esac | |
093e61a6 | 205 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
861bb6c1 JL |
206 | |
207 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
208 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
209 | | --exec | --exe | --ex) | |
210 | ac_prev=exec_prefix ;; | |
211 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
212 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
213 | | --exec=* | --exe=* | --ex=*) | |
093e61a6 | 214 | exec_prefix="$ac_optarg" ;; |
861bb6c1 JL |
215 | |
216 | -gas | --gas | --ga | --g) | |
217 | # Obsolete; use --with-gas. | |
218 | with_gas=yes ;; | |
219 | ||
093e61a6 RS |
220 | -help | --help | --hel | --he) |
221 | # Omit some internal or obsolete options to make the list less imposing. | |
222 | # This message is too long to be a string in the A/UX 3.1 sh. | |
223 | cat << EOF | |
224 | Usage: configure [options] [host] | |
225 | Options: [defaults in brackets after descriptions] | |
226 | Configuration: | |
227 | --cache-file=FILE cache test results in FILE | |
228 | --help print this message | |
229 | --no-create do not create output files | |
230 | --quiet, --silent do not print \`checking...' messages | |
231 | --version print the version of autoconf that created configure | |
232 | Directory and file names: | |
233 | --prefix=PREFIX install architecture-independent files in PREFIX | |
234 | [$ac_default_prefix] | |
235 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
236 | [same as prefix] | |
237 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
238 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
239 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
240 | --datadir=DIR read-only architecture-independent data in DIR | |
241 | [PREFIX/share] | |
242 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
243 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
244 | [PREFIX/com] | |
245 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
246 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
247 | --includedir=DIR C header files in DIR [PREFIX/include] | |
248 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
249 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
250 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
251 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
252 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
253 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
254 | --program-transform-name=PROGRAM | |
255 | run sed PROGRAM on installed program names | |
256 | EOF | |
257 | cat << EOF | |
258 | Host type: | |
259 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
260 | --host=HOST configure for HOST [guessed] | |
261 | --target=TARGET configure for TARGET [TARGET=HOST] | |
262 | Features and packages: | |
263 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
264 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
265 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
266 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
267 | --x-includes=DIR X include files are in DIR | |
268 | --x-libraries=DIR X library files are in DIR | |
269 | EOF | |
270 | if test -n "$ac_help"; then | |
271 | echo "--enable and --with options recognized:$ac_help" | |
272 | fi | |
273 | exit 0 ;; | |
861bb6c1 JL |
274 | |
275 | -host | --host | --hos | --ho) | |
093e61a6 | 276 | ac_prev=host ;; |
861bb6c1 | 277 | -host=* | --host=* | --hos=* | --ho=*) |
093e61a6 | 278 | host="$ac_optarg" ;; |
861bb6c1 JL |
279 | |
280 | -includedir | --includedir | --includedi | --included | --include \ | |
281 | | --includ | --inclu | --incl | --inc) | |
282 | ac_prev=includedir ;; | |
283 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
284 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
093e61a6 | 285 | includedir="$ac_optarg" ;; |
861bb6c1 JL |
286 | |
287 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
288 | ac_prev=infodir ;; | |
289 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
093e61a6 | 290 | infodir="$ac_optarg" ;; |
861bb6c1 JL |
291 | |
292 | -libdir | --libdir | --libdi | --libd) | |
293 | ac_prev=libdir ;; | |
294 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
093e61a6 | 295 | libdir="$ac_optarg" ;; |
861bb6c1 JL |
296 | |
297 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
298 | | --libexe | --libex | --libe) | |
299 | ac_prev=libexecdir ;; | |
300 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
301 | | --libexe=* | --libex=* | --libe=*) | |
093e61a6 | 302 | libexecdir="$ac_optarg" ;; |
861bb6c1 JL |
303 | |
304 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
305 | | --localstate | --localstat | --localsta | --localst \ | |
306 | | --locals | --local | --loca | --loc | --lo) | |
307 | ac_prev=localstatedir ;; | |
308 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
309 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
310 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
093e61a6 | 311 | localstatedir="$ac_optarg" ;; |
861bb6c1 JL |
312 | |
313 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
314 | ac_prev=mandir ;; | |
315 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
093e61a6 | 316 | mandir="$ac_optarg" ;; |
861bb6c1 JL |
317 | |
318 | -nfp | --nfp | --nf) | |
319 | # Obsolete; use --without-fp. | |
320 | with_fp=no ;; | |
321 | ||
322 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
093e61a6 | 323 | | --no-cr | --no-c) |
861bb6c1 JL |
324 | no_create=yes ;; |
325 | ||
326 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
327 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
328 | no_recursion=yes ;; | |
329 | ||
330 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
331 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
332 | | --oldin | --oldi | --old | --ol | --o) | |
333 | ac_prev=oldincludedir ;; | |
334 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
335 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
336 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
093e61a6 | 337 | oldincludedir="$ac_optarg" ;; |
861bb6c1 JL |
338 | |
339 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
340 | ac_prev=prefix ;; | |
341 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
093e61a6 | 342 | prefix="$ac_optarg" ;; |
861bb6c1 JL |
343 | |
344 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
345 | | --program-pre | --program-pr | --program-p) | |
346 | ac_prev=program_prefix ;; | |
347 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
348 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
093e61a6 | 349 | program_prefix="$ac_optarg" ;; |
861bb6c1 JL |
350 | |
351 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
352 | | --program-suf | --program-su | --program-s) | |
353 | ac_prev=program_suffix ;; | |
354 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
355 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
093e61a6 | 356 | program_suffix="$ac_optarg" ;; |
861bb6c1 JL |
357 | |
358 | -program-transform-name | --program-transform-name \ | |
359 | | --program-transform-nam | --program-transform-na \ | |
360 | | --program-transform-n | --program-transform- \ | |
361 | | --program-transform | --program-transfor \ | |
362 | | --program-transfo | --program-transf \ | |
363 | | --program-trans | --program-tran \ | |
364 | | --progr-tra | --program-tr | --program-t) | |
365 | ac_prev=program_transform_name ;; | |
366 | -program-transform-name=* | --program-transform-name=* \ | |
367 | | --program-transform-nam=* | --program-transform-na=* \ | |
368 | | --program-transform-n=* | --program-transform-=* \ | |
369 | | --program-transform=* | --program-transfor=* \ | |
370 | | --program-transfo=* | --program-transf=* \ | |
371 | | --program-trans=* | --program-tran=* \ | |
372 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
093e61a6 | 373 | program_transform_name="$ac_optarg" ;; |
861bb6c1 JL |
374 | |
375 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
376 | | -silent | --silent | --silen | --sile | --sil) | |
377 | silent=yes ;; | |
378 | ||
379 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
380 | ac_prev=sbindir ;; | |
381 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
382 | | --sbi=* | --sb=*) | |
093e61a6 | 383 | sbindir="$ac_optarg" ;; |
861bb6c1 JL |
384 | |
385 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
386 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
387 | | --sharedst | --shareds | --shared | --share | --shar \ | |
388 | | --sha | --sh) | |
389 | ac_prev=sharedstatedir ;; | |
390 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
391 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
392 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
393 | | --sha=* | --sh=*) | |
093e61a6 | 394 | sharedstatedir="$ac_optarg" ;; |
861bb6c1 JL |
395 | |
396 | -site | --site | --sit) | |
397 | ac_prev=site ;; | |
398 | -site=* | --site=* | --sit=*) | |
093e61a6 | 399 | site="$ac_optarg" ;; |
861bb6c1 JL |
400 | |
401 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
402 | ac_prev=srcdir ;; | |
403 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
093e61a6 | 404 | srcdir="$ac_optarg" ;; |
861bb6c1 JL |
405 | |
406 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
407 | | --syscon | --sysco | --sysc | --sys | --sy) | |
408 | ac_prev=sysconfdir ;; | |
409 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
410 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
093e61a6 | 411 | sysconfdir="$ac_optarg" ;; |
861bb6c1 JL |
412 | |
413 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
093e61a6 | 414 | ac_prev=target ;; |
861bb6c1 | 415 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
093e61a6 | 416 | target="$ac_optarg" ;; |
861bb6c1 JL |
417 | |
418 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
419 | verbose=yes ;; | |
420 | ||
093e61a6 RS |
421 | -version | --version | --versio | --versi | --vers) |
422 | echo "configure generated by autoconf version 2.13" | |
423 | exit 0 ;; | |
861bb6c1 JL |
424 | |
425 | -with-* | --with-*) | |
093e61a6 | 426 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
861bb6c1 | 427 | # Reject names that are not valid shell variable names. |
093e61a6 RS |
428 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
429 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
430 | fi | |
861bb6c1 | 431 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
093e61a6 RS |
432 | case "$ac_option" in |
433 | *=*) ;; | |
861bb6c1 JL |
434 | *) ac_optarg=yes ;; |
435 | esac | |
093e61a6 | 436 | eval "with_${ac_package}='$ac_optarg'" ;; |
861bb6c1 JL |
437 | |
438 | -without-* | --without-*) | |
093e61a6 | 439 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
861bb6c1 | 440 | # Reject names that are not valid shell variable names. |
093e61a6 RS |
441 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
442 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
443 | fi | |
444 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
445 | eval "with_${ac_package}=no" ;; | |
861bb6c1 JL |
446 | |
447 | --x) | |
448 | # Obsolete; use --with-x. | |
449 | with_x=yes ;; | |
450 | ||
451 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
452 | | --x-incl | --x-inc | --x-in | --x-i) | |
453 | ac_prev=x_includes ;; | |
454 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
455 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
093e61a6 | 456 | x_includes="$ac_optarg" ;; |
861bb6c1 JL |
457 | |
458 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
459 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
460 | ac_prev=x_libraries ;; | |
461 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
462 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
093e61a6 | 463 | x_libraries="$ac_optarg" ;; |
861bb6c1 | 464 | |
093e61a6 | 465 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
861bb6c1 JL |
466 | ;; |
467 | ||
468 | *) | |
093e61a6 RS |
469 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
470 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
471 | fi | |
472 | if test "x$nonopt" != xNONE; then | |
473 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
474 | fi | |
475 | nonopt="$ac_option" | |
861bb6c1 JL |
476 | ;; |
477 | ||
478 | esac | |
479 | done | |
480 | ||
481 | if test -n "$ac_prev"; then | |
093e61a6 | 482 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
861bb6c1 | 483 | fi |
861bb6c1 | 484 | |
093e61a6 | 485 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
861bb6c1 | 486 | |
093e61a6 RS |
487 | # File descriptor usage: |
488 | # 0 standard input | |
489 | # 1 file creation | |
490 | # 2 errors and warnings | |
491 | # 3 some systems may open it to /dev/tty | |
492 | # 4 used on the Kubota Titan | |
493 | # 6 checking for... messages and results | |
494 | # 5 compiler messages saved in config.log | |
495 | if test "$silent" = yes; then | |
496 | exec 6>/dev/null | |
497 | else | |
498 | exec 6>&1 | |
499 | fi | |
500 | exec 5>./config.log | |
501 | ||
502 | echo "\ | |
503 | This file contains any messages produced by compilers while | |
504 | running configure, to aid debugging if configure makes a mistake. | |
505 | " 1>&5 | |
506 | ||
507 | # Strip out --no-create and --no-recursion so they do not pile up. | |
508 | # Also quote any args containing shell metacharacters. | |
509 | ac_configure_args= | |
510 | for ac_arg | |
861bb6c1 | 511 | do |
093e61a6 RS |
512 | case "$ac_arg" in |
513 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
514 | | --no-cr | --no-c) ;; | |
515 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
516 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
517 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
518 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
519 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
861bb6c1 JL |
520 | esac |
521 | done | |
522 | ||
093e61a6 RS |
523 | # NLS nuisances. |
524 | # Only set these to C if already set. These must not be set unconditionally | |
525 | # because not all systems understand e.g. LANG=C (notably SCO). | |
526 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
527 | # Non-C LC_CTYPE values break the ctype check. | |
528 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
529 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
530 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
531 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
cafe096b | 532 | |
093e61a6 RS |
533 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
534 | rm -rf conftest* confdefs.h | |
535 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
536 | echo > confdefs.h | |
861bb6c1 | 537 | |
093e61a6 RS |
538 | # A filename unique to this package, relative to the directory that |
539 | # configure is in, which we can look for to find out if srcdir is correct. | |
540 | ac_unique_file=tree.c | |
861bb6c1 JL |
541 | |
542 | # Find the source files, if location was not specified. | |
543 | if test -z "$srcdir"; then | |
544 | ac_srcdir_defaulted=yes | |
545 | # Try the directory containing this script, then its parent. | |
093e61a6 RS |
546 | ac_prog=$0 |
547 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
548 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
861bb6c1 JL |
549 | srcdir=$ac_confdir |
550 | if test ! -r $srcdir/$ac_unique_file; then | |
551 | srcdir=.. | |
552 | fi | |
553 | else | |
554 | ac_srcdir_defaulted=no | |
555 | fi | |
556 | if test ! -r $srcdir/$ac_unique_file; then | |
557 | if test "$ac_srcdir_defaulted" = yes; then | |
093e61a6 | 558 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
789b7de5 | 559 | else |
093e61a6 | 560 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
861bb6c1 JL |
561 | fi |
562 | fi | |
093e61a6 | 563 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
861bb6c1 | 564 | |
093e61a6 | 565 | # Prefer explicitly selected file to automatically selected ones. |
6eb95e99 ZW |
566 | if test -z "$CONFIG_SITE"; then |
567 | if test "x$prefix" != xNONE; then | |
568 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
569 | else | |
570 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
093e61a6 RS |
571 | fi |
572 | fi | |
573 | for ac_site_file in $CONFIG_SITE; do | |
574 | if test -r "$ac_site_file"; then | |
575 | echo "loading site script $ac_site_file" | |
576 | . "$ac_site_file" | |
577 | fi | |
578 | done | |
579 | ||
580 | if test -r "$cache_file"; then | |
581 | echo "loading cache $cache_file" | |
582 | . $cache_file | |
583 | else | |
584 | echo "creating cache $cache_file" | |
585 | > $cache_file | |
586 | fi | |
861bb6c1 | 587 | |
093e61a6 RS |
588 | ac_ext=c |
589 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
590 | ac_cpp='$CPP $CPPFLAGS' | |
591 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
592 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
593 | cross_compiling=$ac_cv_prog_cc_cross | |
594 | ||
595 | ac_exeext= | |
596 | ac_objext=o | |
597 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
598 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
599 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
600 | ac_n= ac_c=' | |
601 | ' ac_t=' ' | |
602 | else | |
603 | ac_n=-n ac_c= ac_t= | |
604 | fi | |
605 | else | |
606 | ac_n= ac_c='\c' ac_t= | |
607 | fi | |
861bb6c1 JL |
608 | |
609 | ||
610 | ||
611 | ||
093e61a6 RS |
612 | # Determine the host, build, and target systems |
613 | ac_aux_dir= | |
fecba15f | 614 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
093e61a6 RS |
615 | if test -f $ac_dir/install-sh; then |
616 | ac_aux_dir=$ac_dir | |
617 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
618 | break | |
619 | elif test -f $ac_dir/install.sh; then | |
620 | ac_aux_dir=$ac_dir | |
621 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
622 | break | |
623 | fi | |
624 | done | |
625 | if test -z "$ac_aux_dir"; then | |
626 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
627 | fi | |
628 | ac_config_guess=$ac_aux_dir/config.guess | |
629 | ac_config_sub=$ac_aux_dir/config.sub | |
630 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
13c22933 JJ |
631 | |
632 | ||
093e61a6 RS |
633 | # Do some error checking and defaulting for the host and target type. |
634 | # The inputs are: | |
635 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
636 | # | |
637 | # The rules are: | |
638 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
639 | # same time. | |
640 | # 2. Host defaults to nonopt. | |
641 | # 3. If nonopt is not specified, then host defaults to the current host, | |
642 | # as determined by config.guess. | |
643 | # 4. Target and build default to nonopt. | |
644 | # 5. If nonopt is not specified, then target and build default to host. | |
13c22933 | 645 | |
093e61a6 RS |
646 | # The aliases save the names the user supplied, while $host etc. |
647 | # will get canonicalized. | |
648 | case $host---$target---$nonopt in | |
649 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
650 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
651 | esac | |
13c22933 JJ |
652 | |
653 | ||
093e61a6 RS |
654 | # Make sure we can run config.sub. |
655 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
656 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
13c22933 JJ |
657 | fi |
658 | ||
093e61a6 | 659 | echo $ac_n "checking host system type""... $ac_c" 1>&6 |
51b9ff45 | 660 | echo "configure:661: checking host system type" >&5 |
13c22933 | 661 | |
093e61a6 RS |
662 | host_alias=$host |
663 | case "$host_alias" in | |
664 | NONE) | |
665 | case $nonopt in | |
666 | NONE) | |
667 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
668 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
669 | fi ;; | |
670 | *) host_alias=$nonopt ;; | |
671 | esac ;; | |
672 | esac | |
13c22933 | 673 | |
093e61a6 RS |
674 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
675 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
676 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
677 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
678 | echo "$ac_t""$host" 1>&6 | |
679 | ||
680 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
51b9ff45 | 681 | echo "configure:682: checking target system type" >&5 |
093e61a6 RS |
682 | |
683 | target_alias=$target | |
684 | case "$target_alias" in | |
685 | NONE) | |
686 | case $nonopt in | |
687 | NONE) target_alias=$host_alias ;; | |
688 | *) target_alias=$nonopt ;; | |
689 | esac ;; | |
690 | esac | |
13c22933 | 691 | |
093e61a6 RS |
692 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
693 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
694 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
695 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
696 | echo "$ac_t""$target" 1>&6 | |
697 | ||
698 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
51b9ff45 | 699 | echo "configure:700: checking build system type" >&5 |
093e61a6 RS |
700 | |
701 | build_alias=$build | |
702 | case "$build_alias" in | |
703 | NONE) | |
704 | case $nonopt in | |
705 | NONE) build_alias=$host_alias ;; | |
706 | *) build_alias=$nonopt ;; | |
707 | esac ;; | |
708 | esac | |
709 | ||
710 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
711 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
712 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
713 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
714 | echo "$ac_t""$build" 1>&6 | |
13c22933 | 715 | |
093e61a6 RS |
716 | test "$host_alias" != "$target_alias" && |
717 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
718 | NONENONEs,x,x, && | |
719 | program_prefix=${target_alias}- | |
13c22933 | 720 | |
73458fb7 | 721 | |
caa55b1e | 722 | # Determine the noncanonical target name, for directory use. |
4665e56c NN |
723 | case ${build_alias} in |
724 | "") build_noncanonical=${build} ;; | |
725 | *) build_noncanonical=${build_alias} ;; | |
726 | esac | |
73458fb7 | 727 | |
4665e56c NN |
728 | case ${host_alias} in |
729 | "") host_noncanonical=${build_noncanonical} ;; | |
730 | *) host_noncanonical=${host_alias} ;; | |
731 | esac | |
73458fb7 | 732 | |
4665e56c NN |
733 | case ${target_alias} in |
734 | "") target_noncanonical=${host_noncanonical} ;; | |
735 | *) target_noncanonical=${target_alias} ;; | |
736 | esac | |
093e61a6 | 737 | |
caa55b1e NN |
738 | |
739 | # Determine the target- and build-specific subdirectories | |
4665e56c NN |
740 | # Prefix 'build-' so this never conflicts with target_subdir. |
741 | build_subdir="build-${build_noncanonical}" | |
742 | # Not really a subdirectory, but here for completeness. | |
743 | host_subdir=. | |
744 | # No prefix. | |
745 | target_subdir=${target_noncanonical} | |
746 | ||
73458fb7 | 747 | |
093e61a6 RS |
748 | # Set program_transform_name |
749 | if test "$program_transform_name" = s,x,x,; then | |
750 | program_transform_name= | |
13c22933 | 751 | else |
093e61a6 RS |
752 | # Double any \ or $. echo might interpret backslashes. |
753 | cat <<\EOF_SED > conftestsed | |
754 | s,\\,\\\\,g; s,\$,$$,g | |
755 | EOF_SED | |
756 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
757 | rm -f conftestsed | |
cafe096b | 758 | fi |
13c22933 | 759 | test "$program_prefix" != NONE && |
093e61a6 | 760 | program_transform_name="s,^,${program_prefix},; $program_transform_name" |
13c22933 JJ |
761 | # Use a double $ so make ignores it. |
762 | test "$program_suffix" != NONE && | |
093e61a6 RS |
763 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" |
764 | ||
765 | # sed with no file args requires a program. | |
766 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
13c22933 JJ |
767 | |
768 | ||
34a86c2b NN |
769 | # Check for bogus environment variables. |
770 | # Test if LIBRARY_PATH contains the notation for the current directory | |
771 | # since this would lead to problems installing/building glibc. | |
772 | # LIBRARY_PATH contains the current directory if one of the following | |
773 | # is true: | |
774 | # - one of the terminals (":" and ";") is the first or last sign | |
775 | # - two terminals occur directly after each other | |
776 | # - the path contains an element with a dot in it | |
093e61a6 | 777 | echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 |
51b9ff45 | 778 | echo "configure:779: checking LIBRARY_PATH variable" >&5 |
34a86c2b NN |
779 | case ${LIBRARY_PATH} in |
780 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
781 | library_path_setting="contains current directory" | |
782 | ;; | |
783 | *) | |
784 | library_path_setting="ok" | |
785 | ;; | |
786 | esac | |
093e61a6 | 787 | echo "$ac_t""$library_path_setting" 1>&6 |
34a86c2b | 788 | if test "$library_path_setting" != "ok"; then |
093e61a6 | 789 | { echo "configure: error: |
34a86c2b NN |
790 | *** LIBRARY_PATH shouldn't contain the current directory when |
791 | *** building gcc. Please change the environment variable | |
093e61a6 | 792 | *** and run configure again." 1>&2; exit 1; } |
e9a25f70 JL |
793 | fi |
794 | ||
34a86c2b NN |
795 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
796 | # since this would lead to problems installing/building glibc. | |
797 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
798 | # is true: | |
799 | # - one of the terminals (":" and ";") is the first or last sign | |
800 | # - two terminals occur directly after each other | |
801 | # - the path contains an element with a dot in it | |
093e61a6 | 802 | echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 |
51b9ff45 | 803 | echo "configure:804: checking GCC_EXEC_PREFIX variable" >&5 |
34a86c2b NN |
804 | case ${GCC_EXEC_PREFIX} in |
805 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
806 | gcc_exec_prefix_setting="contains current directory" | |
807 | ;; | |
808 | *) | |
809 | gcc_exec_prefix_setting="ok" | |
810 | ;; | |
811 | esac | |
093e61a6 | 812 | echo "$ac_t""$gcc_exec_prefix_setting" 1>&6 |
34a86c2b | 813 | if test "$gcc_exec_prefix_setting" != "ok"; then |
093e61a6 | 814 | { echo "configure: error: |
cafe096b EC |
815 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
816 | *** building gcc. Please change the environment variable | |
093e61a6 | 817 | *** and run configure again." 1>&2; exit 1; } |
34a86c2b NN |
818 | fi |
819 | ||
820 | # ----------- | |
821 | # Directories | |
822 | # ----------- | |
823 | ||
824 | # Specify the local prefix | |
825 | local_prefix= | |
826 | # Check whether --with-local-prefix or --without-local-prefix was given. | |
827 | if test "${with_local_prefix+set}" = set; then | |
828 | withval="$with_local_prefix" | |
829 | case "${withval}" in | |
093e61a6 | 830 | yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;; |
34a86c2b NN |
831 | no) ;; |
832 | *) local_prefix=$with_local_prefix ;; | |
833 | esac | |
093e61a6 RS |
834 | fi |
835 | ||
34a86c2b NN |
836 | |
837 | # Default local prefix if it is empty | |
838 | if test x$local_prefix = x; then | |
839 | local_prefix=/usr/local | |
840 | fi | |
841 | ||
842 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
843 | # passed in by the toplevel make and thus we'd get different behavior | |
844 | # depending on where we built the sources. | |
845 | gcc_gxx_include_dir= | |
846 | # Specify the g++ header file directory | |
847 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. | |
848 | if test "${with_gxx_include_dir+set}" = set; then | |
849 | withval="$with_gxx_include_dir" | |
850 | case "${withval}" in | |
093e61a6 | 851 | yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;; |
34a86c2b NN |
852 | no) ;; |
853 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
854 | esac | |
093e61a6 RS |
855 | fi |
856 | ||
34a86c2b NN |
857 | |
858 | if test x${gcc_gxx_include_dir} = x; then | |
859 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
860 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
861 | else | |
862 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if | |
863 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} | |
864 | fi | |
865 | fi | |
866 | ||
867 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. | |
868 | if test "${with_cpp_install_dir+set}" = set; then | |
869 | withval="$with_cpp_install_dir" | |
870 | if test x$withval = xyes; then | |
093e61a6 | 871 | { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } |
34a86c2b NN |
872 | elif test x$withval != xno; then |
873 | cpp_install_dir=$withval | |
874 | fi | |
093e61a6 RS |
875 | fi |
876 | ||
34a86c2b | 877 | |
51b9ff45 KC |
878 | # We would like to our source tree to be readonly. However when releases or |
879 | # pre-releases are generated, the flex/bison generated files as well as the | |
880 | # various formats of manuals need to be included along with the rest of the | |
881 | # sources. Therefore we have --enable-generated-files-in-srcdir to do | |
882 | # just that. | |
883 | ||
884 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
885 | if test "${enable_generated_files_in_srcdir+set}" = set; then | |
886 | enableval="$enable_generated_files_in_srcdir" | |
887 | case ${enableval} in | |
888 | no) parsedir='$(objdir)'; docobjdir='$(objdir)/doc';; | |
941ba69d | 889 | *) parsedir='$(srcdir)'; docobjdir='$(srcdir)/doc';; |
51b9ff45 KC |
890 | esac |
891 | else | |
892 | parsedir='$(objdir)'; docobjdir='$(objdir)/doc'; | |
893 | fi | |
894 | ||
895 | ||
34a86c2b NN |
896 | # ------------------- |
897 | # Find default linker | |
898 | # ------------------- | |
899 | ||
900 | # With GNU ld | |
901 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
902 | if test "${with_gnu_ld+set}" = set; then | |
903 | withval="$with_gnu_ld" | |
904 | gnu_ld_flag="$with_gnu_ld" | |
905 | else | |
906 | gnu_ld_flag=no | |
093e61a6 | 907 | fi |
34a86c2b | 908 | |
cafe096b | 909 | |
093e61a6 | 910 | # With pre-defined ld |
34a86c2b NN |
911 | # Check whether --with-ld or --without-ld was given. |
912 | if test "${with_ld+set}" = set; then | |
913 | withval="$with_ld" | |
914 | DEFAULT_LINKER="$with_ld" | |
093e61a6 RS |
915 | fi |
916 | ||
34a86c2b NN |
917 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
918 | if test ! -x "$DEFAULT_LINKER"; then | |
093e61a6 | 919 | echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2 |
34a86c2b NN |
920 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
921 | gnu_ld_flag=yes | |
922 | fi | |
093e61a6 | 923 | cat >> confdefs.h <<EOF |
34a86c2b | 924 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
093e61a6 | 925 | EOF |
34a86c2b NN |
926 | |
927 | fi | |
928 | ||
093e61a6 | 929 | echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 |
51b9ff45 | 930 | echo "configure:931: checking whether a default linker was specified" >&5 |
34a86c2b NN |
931 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
932 | if test x"$gnu_ld_flag" = x"no"; then | |
093e61a6 | 933 | echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 |
34a86c2b | 934 | else |
093e61a6 | 935 | echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6 |
34a86c2b NN |
936 | fi |
937 | else | |
093e61a6 | 938 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
939 | fi |
940 | ||
941 | # ---------------------- | |
942 | # Find default assembler | |
943 | # ---------------------- | |
944 | ||
945 | # With GNU as | |
946 | # Check whether --with-gnu-as or --without-gnu-as was given. | |
947 | if test "${with_gnu_as+set}" = set; then | |
948 | withval="$with_gnu_as" | |
949 | gas_flag="$with_gnu_as" | |
950 | else | |
951 | gas_flag=no | |
093e61a6 | 952 | fi |
34a86c2b NN |
953 | |
954 | ||
955 | # Check whether --with-as or --without-as was given. | |
956 | if test "${with_as+set}" = set; then | |
957 | withval="$with_as" | |
958 | DEFAULT_ASSEMBLER="$with_as" | |
093e61a6 RS |
959 | fi |
960 | ||
34a86c2b NN |
961 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
962 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
093e61a6 | 963 | echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2 |
34a86c2b NN |
964 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
965 | gas_flag=yes | |
966 | fi | |
093e61a6 | 967 | cat >> confdefs.h <<EOF |
34a86c2b | 968 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
093e61a6 | 969 | EOF |
34a86c2b NN |
970 | |
971 | fi | |
972 | ||
093e61a6 | 973 | echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 |
51b9ff45 | 974 | echo "configure:975: checking whether a default assembler was specified" >&5 |
34a86c2b NN |
975 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
976 | if test x"$gas_flag" = x"no"; then | |
093e61a6 | 977 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 |
34a86c2b | 978 | else |
093e61a6 | 979 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6 |
34a86c2b NN |
980 | fi |
981 | else | |
093e61a6 | 982 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
983 | fi |
984 | ||
985 | # --------------- | |
986 | # Find C compiler | |
987 | # --------------- | |
988 | ||
989 | # Find the native compiler | |
093e61a6 | 990 | # Extract the first word of "gcc", so it can be a program name with args. |
34a86c2b | 991 | set dummy gcc; ac_word=$2 |
093e61a6 | 992 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
51b9ff45 | 993 | echo "configure:994: checking for $ac_word" >&5 |
093e61a6 RS |
994 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
995 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
996 | else |
997 | if test -n "$CC"; then | |
998 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
999 | else | |
093e61a6 RS |
1000 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1001 | ac_dummy="$PATH" | |
1002 | for ac_dir in $ac_dummy; do | |
1003 | test -z "$ac_dir" && ac_dir=. | |
1004 | if test -f $ac_dir/$ac_word; then | |
1005 | ac_cv_prog_CC="gcc" | |
1006 | break | |
1007 | fi | |
1008 | done | |
1009 | IFS="$ac_save_ifs" | |
34a86c2b NN |
1010 | fi |
1011 | fi | |
093e61a6 | 1012 | CC="$ac_cv_prog_CC" |
34a86c2b | 1013 | if test -n "$CC"; then |
093e61a6 | 1014 | echo "$ac_t""$CC" 1>&6 |
cafe096b | 1015 | else |
093e61a6 | 1016 | echo "$ac_t""no" 1>&6 |
cafe096b | 1017 | fi |
cafe096b | 1018 | |
34a86c2b NN |
1019 | if test -z "$CC"; then |
1020 | # Extract the first word of "cc", so it can be a program name with args. | |
1021 | set dummy cc; ac_word=$2 | |
093e61a6 | 1022 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
51b9ff45 | 1023 | echo "configure:1024: checking for $ac_word" >&5 |
093e61a6 RS |
1024 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1025 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9a25f70 JL |
1026 | else |
1027 | if test -n "$CC"; then | |
1028 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1029 | else | |
093e61a6 | 1030 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
e9a25f70 | 1031 | ac_prog_rejected=no |
093e61a6 RS |
1032 | ac_dummy="$PATH" |
1033 | for ac_dir in $ac_dummy; do | |
1034 | test -z "$ac_dir" && ac_dir=. | |
1035 | if test -f $ac_dir/$ac_word; then | |
1036 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1037 | ac_prog_rejected=yes | |
1038 | continue | |
1039 | fi | |
1040 | ac_cv_prog_CC="cc" | |
1041 | break | |
1042 | fi | |
1043 | done | |
1044 | IFS="$ac_save_ifs" | |
e9a25f70 JL |
1045 | if test $ac_prog_rejected = yes; then |
1046 | # We found a bogon in the path, so make sure we never use it. | |
1047 | set dummy $ac_cv_prog_CC | |
1048 | shift | |
093e61a6 | 1049 | if test $# -gt 0; then |
e9a25f70 JL |
1050 | # We chose a different compiler from the bogus one. |
1051 | # However, it has the same basename, so the bogon will be chosen | |
1052 | # first if we set CC to just the basename; use the full file name. | |
1053 | shift | |
093e61a6 RS |
1054 | set dummy "$ac_dir/$ac_word" "$@" |
1055 | shift | |
1056 | ac_cv_prog_CC="$@" | |
e9a25f70 JL |
1057 | fi |
1058 | fi | |
1059 | fi | |
1060 | fi | |
093e61a6 | 1061 | CC="$ac_cv_prog_CC" |
e9a25f70 | 1062 | if test -n "$CC"; then |
093e61a6 | 1063 | echo "$ac_t""$CC" 1>&6 |
e9a25f70 | 1064 | else |
093e61a6 | 1065 | echo "$ac_t""no" 1>&6 |
e9a25f70 JL |
1066 | fi |
1067 | ||
093e61a6 RS |
1068 | if test -z "$CC"; then |
1069 | case "`uname -s`" in | |
1070 | *win32* | *WIN32*) | |
1071 | # Extract the first word of "cl", so it can be a program name with args. | |
1072 | set dummy cl; ac_word=$2 | |
1073 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
51b9ff45 | 1074 | echo "configure:1075: checking for $ac_word" >&5 |
093e61a6 RS |
1075 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1076 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cd9e5e7c MK |
1077 | else |
1078 | if test -n "$CC"; then | |
1079 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1080 | else | |
093e61a6 RS |
1081 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1082 | ac_dummy="$PATH" | |
1083 | for ac_dir in $ac_dummy; do | |
1084 | test -z "$ac_dir" && ac_dir=. | |
1085 | if test -f $ac_dir/$ac_word; then | |
1086 | ac_cv_prog_CC="cl" | |
1087 | break | |
1088 | fi | |
1089 | done | |
1090 | IFS="$ac_save_ifs" | |
cd9e5e7c MK |
1091 | fi |
1092 | fi | |
093e61a6 | 1093 | CC="$ac_cv_prog_CC" |
cd9e5e7c | 1094 | if test -n "$CC"; then |
093e61a6 | 1095 | echo "$ac_t""$CC" 1>&6 |
cd9e5e7c | 1096 | else |
093e61a6 | 1097 | echo "$ac_t""no" 1>&6 |
e9a25f70 | 1098 | fi |
093e61a6 RS |
1099 | ;; |
1100 | esac | |
cafe096b | 1101 | fi |
093e61a6 | 1102 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
cafe096b | 1103 | fi |
e9a25f70 | 1104 | |
093e61a6 | 1105 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
51b9ff45 | 1106 | echo "configure:1107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
e9a25f70 | 1107 | |
093e61a6 RS |
1108 | ac_ext=c |
1109 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1110 | ac_cpp='$CPP $CPPFLAGS' | |
1111 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1112 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1113 | cross_compiling=$ac_cv_prog_cc_cross | |
b27d2bd5 | 1114 | |
093e61a6 | 1115 | cat > conftest.$ac_ext << EOF |
b27d2bd5 | 1116 | |
51b9ff45 | 1117 | #line 1118 "configure" |
093e61a6 RS |
1118 | #include "confdefs.h" |
1119 | ||
1120 | main(){return(0);} | |
1121 | EOF | |
51b9ff45 | 1122 | if { (eval echo configure:1123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
1123 | ac_cv_prog_cc_works=yes |
1124 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1125 | if (./conftest; exit) 2>/dev/null; then | |
1126 | ac_cv_prog_cc_cross=no | |
e9a25f70 | 1127 | else |
093e61a6 | 1128 | ac_cv_prog_cc_cross=yes |
e9a25f70 | 1129 | fi |
e9a25f70 | 1130 | else |
093e61a6 RS |
1131 | echo "configure: failed program was:" >&5 |
1132 | cat conftest.$ac_ext >&5 | |
1133 | ac_cv_prog_cc_works=no | |
e9a25f70 | 1134 | fi |
093e61a6 RS |
1135 | rm -fr conftest* |
1136 | ac_ext=c | |
1137 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1138 | ac_cpp='$CPP $CPPFLAGS' | |
1139 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1140 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1141 | cross_compiling=$ac_cv_prog_cc_cross | |
cafe096b | 1142 | |
093e61a6 RS |
1143 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
1144 | if test $ac_cv_prog_cc_works = no; then | |
1145 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
e9a25f70 | 1146 | fi |
093e61a6 | 1147 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
51b9ff45 | 1148 | echo "configure:1149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
093e61a6 RS |
1149 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1150 | cross_compiling=$ac_cv_prog_cc_cross | |
e9a25f70 | 1151 | |
093e61a6 | 1152 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
51b9ff45 | 1153 | echo "configure:1154: checking whether we are using GNU C" >&5 |
093e61a6 RS |
1154 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1155 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1156 | else | |
1157 | cat > conftest.c <<EOF | |
1158 | #ifdef __GNUC__ | |
1159 | yes; | |
cafe096b | 1160 | #endif |
093e61a6 | 1161 | EOF |
51b9ff45 | 1162 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
093e61a6 RS |
1163 | ac_cv_prog_gcc=yes |
1164 | else | |
1165 | ac_cv_prog_gcc=no | |
1166 | fi | |
1167 | fi | |
e9a25f70 | 1168 | |
093e61a6 | 1169 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
cd9e5e7c | 1170 | |
093e61a6 RS |
1171 | if test $ac_cv_prog_gcc = yes; then |
1172 | GCC=yes | |
1173 | else | |
1174 | GCC= | |
1175 | fi | |
cafe096b | 1176 | |
093e61a6 RS |
1177 | ac_test_CFLAGS="${CFLAGS+set}" |
1178 | ac_save_CFLAGS="$CFLAGS" | |
1179 | CFLAGS= | |
1180 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
51b9ff45 | 1181 | echo "configure:1182: checking whether ${CC-cc} accepts -g" >&5 |
093e61a6 RS |
1182 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1183 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1184 | else | |
1185 | echo 'void f(){}' > conftest.c | |
1186 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
e9a25f70 JL |
1187 | ac_cv_prog_cc_g=yes |
1188 | else | |
093e61a6 | 1189 | ac_cv_prog_cc_g=no |
e9a25f70 | 1190 | fi |
093e61a6 RS |
1191 | rm -f conftest* |
1192 | ||
cafe096b | 1193 | fi |
093e61a6 RS |
1194 | |
1195 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
cd9e5e7c | 1196 | if test "$ac_test_CFLAGS" = set; then |
093e61a6 | 1197 | CFLAGS="$ac_save_CFLAGS" |
cd9e5e7c MK |
1198 | elif test $ac_cv_prog_cc_g = yes; then |
1199 | if test "$GCC" = yes; then | |
e9a25f70 JL |
1200 | CFLAGS="-g -O2" |
1201 | else | |
cd9e5e7c | 1202 | CFLAGS="-g" |
81814e35 | 1203 | fi |
3723cad9 | 1204 | else |
cd9e5e7c MK |
1205 | if test "$GCC" = yes; then |
1206 | CFLAGS="-O2" | |
1207 | else | |
1208 | CFLAGS= | |
1209 | fi | |
e9a25f70 JL |
1210 | fi |
1211 | ||
3ec83fc2 | 1212 | if test "x$CC" != xcc; then |
093e61a6 | 1213 | echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 |
51b9ff45 | 1214 | echo "configure:1215: checking whether $CC and cc understand -c and -o together" >&5 |
3ec83fc2 | 1215 | else |
093e61a6 | 1216 | echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 |
51b9ff45 | 1217 | echo "configure:1218: checking whether cc understands -c and -o together" >&5 |
3ec83fc2 | 1218 | fi |
093e61a6 RS |
1219 | set dummy $CC; ac_cc="`echo $2 | |
1220 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" | |
1221 | if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then | |
1222 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3ec83fc2 | 1223 | else |
093e61a6 | 1224 | echo 'foo(){}' > conftest.c |
3ec83fc2 RH |
1225 | # Make sure it works both with $CC and with simple cc. |
1226 | # We do the test twice because some compilers refuse to overwrite an | |
1227 | # existing .o file with -o, though they will create one. | |
093e61a6 | 1228 | ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' |
51b9ff45 KC |
1229 | if { (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1230 | test -f conftest.o && { (eval echo configure:1231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1231 | then |
1232 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
1233 | if test "x$CC" != xcc; then | |
1234 | # Test first that cc exists at all. | |
51b9ff45 | 1235 | if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
093e61a6 | 1236 | ac_try='cc -c conftest.c -o conftest.o 1>&5' |
51b9ff45 KC |
1237 | if { (eval echo configure:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1238 | test -f conftest.o && { (eval echo configure:1239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1239 | then |
1240 | # cc works too. | |
1241 | : | |
1242 | else | |
1243 | # cc exists but doesn't like -o. | |
1244 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1245 | fi | |
1246 | fi | |
1247 | fi | |
1248 | else | |
1249 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1250 | fi | |
1251 | rm -f conftest* | |
1252 | ||
1253 | fi | |
1254 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
093e61a6 | 1255 | echo "$ac_t""yes" 1>&6 |
3ec83fc2 | 1256 | else |
093e61a6 RS |
1257 | echo "$ac_t""no" 1>&6 |
1258 | cat >> confdefs.h <<\EOF | |
3ec83fc2 | 1259 | #define NO_MINUS_C_MINUS_O 1 |
093e61a6 | 1260 | EOF |
3ec83fc2 RH |
1261 | |
1262 | fi | |
1263 | ||
414d23ae HPN |
1264 | # autoconf is lame and doesn't give us any substitution variable for this. |
1265 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
1266 | NO_MINUS_C_MINUS_O=yes | |
1267 | else | |
1268 | OUTPUT_OPTION='-o $@' | |
1269 | fi | |
1270 | ||
1271 | ||
1272 | ||
73458fb7 NN |
1273 | # ------------------------- |
1274 | # Check C compiler features | |
1275 | # ------------------------- | |
1276 | ||
093e61a6 | 1277 | echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 |
51b9ff45 | 1278 | echo "configure:1279: checking whether ${CC-cc} accepts -Wno-long-long" >&5 |
093e61a6 RS |
1279 | if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then |
1280 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa ZW |
1281 | else |
1282 | save_CFLAGS="$CFLAGS" | |
1283 | CFLAGS="-Wno-long-long" | |
093e61a6 | 1284 | cat > conftest.$ac_ext <<EOF |
51b9ff45 | 1285 | #line 1286 "configure" |
093e61a6 | 1286 | #include "confdefs.h" |
75e93faa | 1287 | |
093e61a6 | 1288 | int main() { |
75e93faa | 1289 | |
093e61a6 RS |
1290 | ; return 0; } |
1291 | EOF | |
51b9ff45 | 1292 | if { (eval echo configure:1293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1293 | rm -rf conftest* |
34a86c2b | 1294 | ac_cv_prog_cc_no_long_long=yes |
200ef634 | 1295 | else |
093e61a6 RS |
1296 | echo "configure: failed program was:" >&5 |
1297 | cat conftest.$ac_ext >&5 | |
1298 | rm -rf conftest* | |
1299 | ac_cv_prog_cc_no_long_long=no | |
200ef634 | 1300 | fi |
093e61a6 | 1301 | rm -f conftest* |
34a86c2b | 1302 | CFLAGS="$save_CFLAGS" |
75e93faa ZW |
1303 | fi |
1304 | ||
093e61a6 RS |
1305 | echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6 |
1306 | ||
1307 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
51b9ff45 | 1308 | echo "configure:1309: checking how to run the C preprocessor" >&5 |
84c041a1 ZW |
1309 | # On Suns, sometimes $CPP names a directory. |
1310 | if test -n "$CPP" && test -d "$CPP"; then | |
1311 | CPP= | |
1312 | fi | |
1313 | if test -z "$CPP"; then | |
093e61a6 RS |
1314 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
1315 | echo $ac_n "(cached) $ac_c" 1>&6 | |
84c041a1 | 1316 | else |
093e61a6 RS |
1317 | # This must be in double quotes, not single quotes, because CPP may get |
1318 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1319 | CPP="${CC-cc} -E" | |
84c041a1 | 1320 | # On the NeXT, cc -E runs the code through the compiler's parser, |
093e61a6 RS |
1321 | # not just through cpp. |
1322 | cat > conftest.$ac_ext <<EOF | |
51b9ff45 | 1323 | #line 1324 "configure" |
093e61a6 RS |
1324 | #include "confdefs.h" |
1325 | #include <assert.h> | |
1326 | Syntax Error | |
1327 | EOF | |
1328 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
51b9ff45 | 1329 | { (eval echo configure:1330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1330 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1331 | if test -z "$ac_err"; then | |
84c041a1 ZW |
1332 | : |
1333 | else | |
093e61a6 RS |
1334 | echo "$ac_err" >&5 |
1335 | echo "configure: failed program was:" >&5 | |
1336 | cat conftest.$ac_ext >&5 | |
1337 | rm -rf conftest* | |
1338 | CPP="${CC-cc} -E -traditional-cpp" | |
1339 | cat > conftest.$ac_ext <<EOF | |
51b9ff45 | 1340 | #line 1341 "configure" |
093e61a6 RS |
1341 | #include "confdefs.h" |
1342 | #include <assert.h> | |
1343 | Syntax Error | |
1344 | EOF | |
1345 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
51b9ff45 | 1346 | { (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1347 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1348 | if test -z "$ac_err"; then | |
1349 | : | |
cafe096b | 1350 | else |
093e61a6 RS |
1351 | echo "$ac_err" >&5 |
1352 | echo "configure: failed program was:" >&5 | |
1353 | cat conftest.$ac_ext >&5 | |
1354 | rm -rf conftest* | |
1355 | CPP="${CC-cc} -nologo -E" | |
1356 | cat > conftest.$ac_ext <<EOF | |
51b9ff45 | 1357 | #line 1358 "configure" |
093e61a6 RS |
1358 | #include "confdefs.h" |
1359 | #include <assert.h> | |
1360 | Syntax Error | |
1361 | EOF | |
1362 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
51b9ff45 | 1363 | { (eval echo configure:1364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1364 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1365 | if test -z "$ac_err"; then | |
1366 | : | |
cafe096b | 1367 | else |
093e61a6 RS |
1368 | echo "$ac_err" >&5 |
1369 | echo "configure: failed program was:" >&5 | |
1370 | cat conftest.$ac_ext >&5 | |
1371 | rm -rf conftest* | |
1372 | CPP=/lib/cpp | |
cafe096b | 1373 | fi |
093e61a6 | 1374 | rm -f conftest* |
cafe096b | 1375 | fi |
093e61a6 | 1376 | rm -f conftest* |
cafe096b | 1377 | fi |
093e61a6 RS |
1378 | rm -f conftest* |
1379 | ac_cv_prog_CPP="$CPP" | |
414d23ae | 1380 | fi |
093e61a6 | 1381 | CPP="$ac_cv_prog_CPP" |
414d23ae | 1382 | else |
093e61a6 | 1383 | ac_cv_prog_CPP="$CPP" |
414d23ae | 1384 | fi |
093e61a6 | 1385 | echo "$ac_t""$CPP" 1>&6 |
414d23ae | 1386 | |
093e61a6 | 1387 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
51b9ff45 | 1388 | echo "configure:1389: checking for inline" >&5 |
093e61a6 RS |
1389 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1390 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
1391 | else |
1392 | ac_cv_c_inline=no | |
1393 | for ac_kw in inline __inline__ __inline; do | |
093e61a6 | 1394 | cat > conftest.$ac_ext <<EOF |
51b9ff45 | 1395 | #line 1396 "configure" |
093e61a6 | 1396 | #include "confdefs.h" |
414d23ae | 1397 | |
093e61a6 RS |
1398 | int main() { |
1399 | } $ac_kw foo() { | |
1400 | ; return 0; } | |
1401 | EOF | |
51b9ff45 | 1402 | if { (eval echo configure:1403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1403 | rm -rf conftest* |
414d23ae HPN |
1404 | ac_cv_c_inline=$ac_kw; break |
1405 | else | |
093e61a6 RS |
1406 | echo "configure: failed program was:" >&5 |
1407 | cat conftest.$ac_ext >&5 | |
414d23ae | 1408 | fi |
093e61a6 | 1409 | rm -f conftest* |
414d23ae HPN |
1410 | done |
1411 | ||
1412 | fi | |
093e61a6 RS |
1413 | |
1414 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1415 | case "$ac_cv_c_inline" in | |
414d23ae | 1416 | inline | yes) ;; |
093e61a6 RS |
1417 | no) cat >> confdefs.h <<\EOF |
1418 | #define inline | |
1419 | EOF | |
414d23ae | 1420 | ;; |
093e61a6 | 1421 | *) cat >> confdefs.h <<EOF |
414d23ae | 1422 | #define inline $ac_cv_c_inline |
093e61a6 | 1423 | EOF |
414d23ae HPN |
1424 | ;; |
1425 | esac | |
1426 | ||
414d23ae | 1427 | |
093e61a6 | 1428 | echo $ac_n "checking for long long int""... $ac_c" 1>&6 |
51b9ff45 | 1429 | echo "configure:1430: checking for long long int" >&5 |
093e61a6 RS |
1430 | if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then |
1431 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1432 | else |
093e61a6 | 1433 | cat > conftest.$ac_ext <<EOF |
51b9ff45 | 1434 | #line 1435 "configure" |
093e61a6 | 1435 | #include "confdefs.h" |
414d23ae | 1436 | |
093e61a6 | 1437 | int main() { |
414d23ae | 1438 | long long int i; |
093e61a6 RS |
1439 | ; return 0; } |
1440 | EOF | |
51b9ff45 | 1441 | if { (eval echo configure:1442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1442 | rm -rf conftest* |
414d23ae HPN |
1443 | ac_cv_c_long_long=yes |
1444 | else | |
093e61a6 RS |
1445 | echo "configure: failed program was:" >&5 |
1446 | cat conftest.$ac_ext >&5 | |
1447 | rm -rf conftest* | |
1448 | ac_cv_c_long_long=no | |
414d23ae | 1449 | fi |
093e61a6 | 1450 | rm -f conftest* |
414d23ae | 1451 | fi |
cafe096b | 1452 | |
093e61a6 RS |
1453 | echo "$ac_t""$ac_cv_c_long_long" 1>&6 |
1454 | if test $ac_cv_c_long_long = yes; then | |
1455 | cat >> confdefs.h <<\EOF | |
414d23ae | 1456 | #define HAVE_LONG_LONG 1 |
093e61a6 | 1457 | EOF |
414d23ae HPN |
1458 | |
1459 | fi | |
093e61a6 | 1460 | echo $ac_n "checking for __int64""... $ac_c" 1>&6 |
51b9ff45 | 1461 | echo "configure:1462: checking for __int64" >&5 |
093e61a6 RS |
1462 | if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then |
1463 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1464 | else | |
1465 | cat > conftest.$ac_ext <<EOF | |
51b9ff45 | 1466 | #line 1467 "configure" |
093e61a6 | 1467 | #include "confdefs.h" |
414d23ae | 1468 | |
093e61a6 | 1469 | int main() { |
414d23ae | 1470 | __int64 i; |
093e61a6 RS |
1471 | ; return 0; } |
1472 | EOF | |
51b9ff45 | 1473 | if { (eval echo configure:1474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1474 | rm -rf conftest* |
414d23ae HPN |
1475 | ac_cv_c___int64=yes |
1476 | else | |
093e61a6 RS |
1477 | echo "configure: failed program was:" >&5 |
1478 | cat conftest.$ac_ext >&5 | |
1479 | rm -rf conftest* | |
1480 | ac_cv_c___int64=no | |
414d23ae | 1481 | fi |
093e61a6 | 1482 | rm -f conftest* |
414d23ae | 1483 | fi |
cafe096b | 1484 | |
093e61a6 RS |
1485 | echo "$ac_t""$ac_cv_c___int64" 1>&6 |
1486 | if test $ac_cv_c___int64 = yes; then | |
1487 | cat >> confdefs.h <<\EOF | |
414d23ae | 1488 | #define HAVE___INT64 1 |
093e61a6 | 1489 | EOF |
414d23ae HPN |
1490 | |
1491 | fi | |
1492 | ||
093e61a6 | 1493 | echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 |
51b9ff45 | 1494 | echo "configure:1495: checking for built-in _Bool" >&5 |
093e61a6 RS |
1495 | if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then |
1496 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1497 | else |
093e61a6 | 1498 | cat > conftest.$ac_ext <<EOF |
51b9ff45 | 1499 | #line 1500 "configure" |
093e61a6 | 1500 | #include "confdefs.h" |
414d23ae | 1501 | |
093e61a6 | 1502 | int main() { |
414d23ae | 1503 | _Bool foo; |
093e61a6 RS |
1504 | ; return 0; } |
1505 | EOF | |
51b9ff45 | 1506 | if { (eval echo configure:1507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1507 | rm -rf conftest* |
414d23ae HPN |
1508 | gcc_cv_c__bool=yes |
1509 | else | |
093e61a6 RS |
1510 | echo "configure: failed program was:" >&5 |
1511 | cat conftest.$ac_ext >&5 | |
1512 | rm -rf conftest* | |
1513 | gcc_cv_c__bool=no | |
414d23ae | 1514 | fi |
093e61a6 | 1515 | rm -f conftest* |
414d23ae | 1516 | |
cafe096b | 1517 | fi |
cafe096b | 1518 | |
093e61a6 RS |
1519 | echo "$ac_t""$gcc_cv_c__bool" 1>&6 |
1520 | if test $gcc_cv_c__bool = yes; then | |
1521 | cat >> confdefs.h <<\EOF | |
414d23ae | 1522 | #define HAVE__BOOL 1 |
093e61a6 | 1523 | EOF |
414d23ae HPN |
1524 | |
1525 | fi | |
1526 | ||
1527 | ||
1528 | # sizeof(char) is 1 by definition. | |
75b6f3fd | 1529 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
51b9ff45 | 1530 | echo "configure:1531: checking size of void *" >&5 |
75b6f3fd KG |
1531 | if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then |
1532 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1533 | else | |
1534 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. | |
1535 | cat > conftest.$ac_ext <<EOF | |
51b9ff45 | 1536 | #line 1537 "configure" |
75b6f3fd KG |
1537 | #include "confdefs.h" |
1538 | #include "confdefs.h" | |
1539 | #include <sys/types.h> | |
1540 | ||
1541 | ||
1542 | int main() { | |
1543 | switch (0) case 0: case (sizeof (void *) == $ac_size):; | |
1544 | ; return 0; } | |
1545 | EOF | |
51b9ff45 | 1546 | if { (eval echo configure:1547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75b6f3fd KG |
1547 | rm -rf conftest* |
1548 | ac_cv_sizeof_void_p=$ac_size | |
1549 | else | |
1550 | echo "configure: failed program was:" >&5 | |
1551 | cat conftest.$ac_ext >&5 | |
1552 | fi | |
1553 | rm -f conftest* | |
1554 | if test x$ac_cv_sizeof_void_p != x ; then break; fi | |
1555 | done | |
1556 | ||
1557 | fi | |
1558 | ||
1559 | if test x$ac_cv_sizeof_void_p = x ; then | |
1560 | { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; } | |
1561 | fi | |
1562 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 | |
1563 | cat >> confdefs.h <<EOF | |
1564 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
1565 | EOF | |
1566 | ||
1567 | ||
093e61a6 | 1568 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
51b9ff45 | 1569 | echo "configure:1570: checking size of short" >&5 |
093e61a6 RS |
1570 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
1571 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1572 | else |
4977bab6 | 1573 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1574 | cat > conftest.$ac_ext <<EOF |
51b9ff45 | 1575 | #line 1576 "configure" |
093e61a6 | 1576 | #include "confdefs.h" |
414d23ae HPN |
1577 | #include "confdefs.h" |
1578 | #include <sys/types.h> | |
1579 | ||
1580 | ||
093e61a6 | 1581 | int main() { |
414d23ae | 1582 | switch (0) case 0: case (sizeof (short) == $ac_size):; |
093e61a6 RS |
1583 | ; return 0; } |
1584 | EOF | |
51b9ff45 | 1585 | if { (eval echo configure:1586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1586 | rm -rf conftest* |
414d23ae HPN |
1587 | ac_cv_sizeof_short=$ac_size |
1588 | else | |
093e61a6 RS |
1589 | echo "configure: failed program was:" >&5 |
1590 | cat conftest.$ac_ext >&5 | |
84c041a1 | 1591 | fi |
093e61a6 | 1592 | rm -f conftest* |
414d23ae HPN |
1593 | if test x$ac_cv_sizeof_short != x ; then break; fi |
1594 | done | |
1595 | ||
84c041a1 | 1596 | fi |
414d23ae HPN |
1597 | |
1598 | if test x$ac_cv_sizeof_short = x ; then | |
093e61a6 | 1599 | { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } |
84c041a1 | 1600 | fi |
093e61a6 RS |
1601 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
1602 | cat >> confdefs.h <<EOF | |
414d23ae | 1603 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
093e61a6 | 1604 | EOF |
84c041a1 | 1605 | |
414d23ae | 1606 | |
093e61a6 | 1607 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
51b9ff45 | 1608 | echo "configure:1609: checking size of int" >&5 |
093e61a6 RS |
1609 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
1610 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1611 | else |
4977bab6 | 1612 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1613 | cat > conftest.$ac_ext <<EOF |
51b9ff45 | 1614 | #line 1615 "configure" |
093e61a6 | 1615 | #include "confdefs.h" |
414d23ae HPN |
1616 | #include "confdefs.h" |
1617 | #include <sys/types.h> | |
1618 | ||
75e93faa | 1619 | |
093e61a6 | 1620 | int main() { |
414d23ae | 1621 | switch (0) case 0: case (sizeof (int) == $ac_size):; |
093e61a6 RS |
1622 | ; return 0; } |
1623 | EOF | |
51b9ff45 | 1624 | if { (eval echo configure:1625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1625 | rm -rf conftest* |
414d23ae | 1626 | ac_cv_sizeof_int=$ac_size |
75e93faa | 1627 | else |
093e61a6 RS |
1628 | echo "configure: failed program was:" >&5 |
1629 | cat conftest.$ac_ext >&5 | |
75e93faa | 1630 | fi |
093e61a6 | 1631 | rm -f conftest* |
414d23ae | 1632 | if test x$ac_cv_sizeof_int != x ; then break; fi |
75e93faa ZW |
1633 | done |
1634 | ||
1635 | fi | |
1636 | ||
414d23ae | 1637 | if test x$ac_cv_sizeof_int = x ; then |
093e61a6 | 1638 | { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } |
414d23ae | 1639 | fi |
093e61a6 RS |
1640 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
1641 | cat >> confdefs.h <<EOF | |
414d23ae | 1642 | #define SIZEOF_INT $ac_cv_sizeof_int |
093e61a6 | 1643 | EOF |
75e93faa | 1644 | |
414d23ae | 1645 | |
093e61a6 | 1646 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
51b9ff45 | 1647 | echo "configure:1648: checking size of long" >&5 |
093e61a6 RS |
1648 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
1649 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1650 | else |
4977bab6 | 1651 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1652 | cat > conftest.$ac_ext <<EOF |
51b9ff45 | 1653 | #line 1654 "configure" |
093e61a6 | 1654 | #include "confdefs.h" |
75e93faa | 1655 | #include "confdefs.h" |
414d23ae HPN |
1656 | #include <sys/types.h> |
1657 | ||
75e93faa | 1658 | |
093e61a6 | 1659 | int main() { |
414d23ae | 1660 | switch (0) case 0: case (sizeof (long) == $ac_size):; |
093e61a6 RS |
1661 | ; return 0; } |
1662 | EOF | |
51b9ff45 | 1663 | if { (eval echo configure:1664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1664 | rm -rf conftest* |
414d23ae | 1665 | ac_cv_sizeof_long=$ac_size |
75e93faa | 1666 | else |
093e61a6 RS |
1667 | echo "configure: failed program was:" >&5 |
1668 | cat conftest.$ac_ext >&5 | |
75e93faa | 1669 | fi |
093e61a6 | 1670 | rm -f conftest* |
414d23ae HPN |
1671 | if test x$ac_cv_sizeof_long != x ; then break; fi |
1672 | done | |
75e93faa | 1673 | |
414d23ae | 1674 | fi |
75e93faa | 1675 | |
414d23ae | 1676 | if test x$ac_cv_sizeof_long = x ; then |
093e61a6 | 1677 | { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } |
75e93faa | 1678 | fi |
093e61a6 RS |
1679 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
1680 | cat >> confdefs.h <<EOF | |
414d23ae | 1681 | #define SIZEOF_LONG $ac_cv_sizeof_long |
093e61a6 | 1682 | EOF |
75e93faa ZW |
1683 | |
1684 | ||
414d23ae | 1685 | if test $ac_cv_c_long_long = yes; then |
093e61a6 | 1686 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
51b9ff45 | 1687 | echo "configure:1688: checking size of long long" >&5 |
093e61a6 RS |
1688 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
1689 | echo $ac_n "(cached) $ac_c" 1>&6 | |
04cabffc | 1690 | else |
4977bab6 | 1691 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1692 | cat > conftest.$ac_ext <<EOF |
51b9ff45 | 1693 | #line 1694 "configure" |
093e61a6 | 1694 | #include "confdefs.h" |
414d23ae HPN |
1695 | #include "confdefs.h" |
1696 | #include <sys/types.h> | |
1697 | ||
04cabffc | 1698 | |
093e61a6 | 1699 | int main() { |
414d23ae | 1700 | switch (0) case 0: case (sizeof (long long) == $ac_size):; |
093e61a6 RS |
1701 | ; return 0; } |
1702 | EOF | |
51b9ff45 | 1703 | if { (eval echo configure:1704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1704 | rm -rf conftest* |
414d23ae | 1705 | ac_cv_sizeof_long_long=$ac_size |
04cabffc | 1706 | else |
093e61a6 RS |
1707 | echo "configure: failed program was:" >&5 |
1708 | cat conftest.$ac_ext >&5 | |
04cabffc | 1709 | fi |
093e61a6 | 1710 | rm -f conftest* |
414d23ae HPN |
1711 | if test x$ac_cv_sizeof_long_long != x ; then break; fi |
1712 | done | |
1713 | ||
04cabffc KG |
1714 | fi |
1715 | ||
414d23ae | 1716 | if test x$ac_cv_sizeof_long_long = x ; then |
093e61a6 | 1717 | { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } |
414d23ae | 1718 | fi |
093e61a6 RS |
1719 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
1720 | cat >> confdefs.h <<EOF | |
414d23ae | 1721 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
093e61a6 | 1722 | EOF |
04cabffc | 1723 | |
04cabffc | 1724 | |
414d23ae HPN |
1725 | fi |
1726 | if test $ac_cv_c___int64 = yes; then | |
093e61a6 | 1727 | echo $ac_n "checking size of __int64""... $ac_c" 1>&6 |
51b9ff45 | 1728 | echo "configure:1729: checking size of __int64" >&5 |
093e61a6 RS |
1729 | if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then |
1730 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1731 | else |
4977bab6 | 1732 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1733 | cat > conftest.$ac_ext <<EOF |
51b9ff45 | 1734 | #line 1735 "configure" |
093e61a6 | 1735 | #include "confdefs.h" |
414d23ae HPN |
1736 | #include "confdefs.h" |
1737 | #include <sys/types.h> | |
1738 | ||
61842080 | 1739 | |
093e61a6 | 1740 | int main() { |
414d23ae | 1741 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; |
093e61a6 RS |
1742 | ; return 0; } |
1743 | EOF | |
51b9ff45 | 1744 | if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1745 | rm -rf conftest* |
414d23ae | 1746 | ac_cv_sizeof___int64=$ac_size |
75e93faa | 1747 | else |
093e61a6 RS |
1748 | echo "configure: failed program was:" >&5 |
1749 | cat conftest.$ac_ext >&5 | |
75e93faa | 1750 | fi |
093e61a6 | 1751 | rm -f conftest* |
414d23ae HPN |
1752 | if test x$ac_cv_sizeof___int64 != x ; then break; fi |
1753 | done | |
1754 | ||
75e93faa ZW |
1755 | fi |
1756 | ||
414d23ae | 1757 | if test x$ac_cv_sizeof___int64 = x ; then |
093e61a6 | 1758 | { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; } |
414d23ae | 1759 | fi |
093e61a6 RS |
1760 | echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 |
1761 | cat >> confdefs.h <<EOF | |
414d23ae | 1762 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
093e61a6 | 1763 | EOF |
414d23ae | 1764 | |
cafe096b | 1765 | |
414d23ae HPN |
1766 | fi |
1767 | ||
34a86c2b NN |
1768 | # ----------------- |
1769 | # Find Ada compiler | |
1770 | # ----------------- | |
1771 | ||
1772 | # See if GNAT has been installed | |
093e61a6 RS |
1773 | if test $host != $build; then |
1774 | ac_tool_prefix=${host_alias}- | |
1775 | else | |
1776 | ac_tool_prefix= | |
1777 | fi | |
34a86c2b NN |
1778 | |
1779 | ||
093e61a6 | 1780 | # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. |
34a86c2b | 1781 | set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 |
093e61a6 | 1782 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
51b9ff45 | 1783 | echo "configure:1784: checking for $ac_word" >&5 |
093e61a6 RS |
1784 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1785 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1786 | else |
1787 | if test -n "$GNATBIND"; then | |
1788 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
1789 | else | |
093e61a6 RS |
1790 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1791 | ac_dummy="$PATH" | |
1792 | for ac_dir in $ac_dummy; do | |
1793 | test -z "$ac_dir" && ac_dir=. | |
1794 | if test -f $ac_dir/$ac_word; then | |
1795 | ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" | |
1796 | break | |
1797 | fi | |
1798 | done | |
1799 | IFS="$ac_save_ifs" | |
34a86c2b NN |
1800 | fi |
1801 | fi | |
093e61a6 | 1802 | GNATBIND="$ac_cv_prog_GNATBIND" |
34a86c2b | 1803 | if test -n "$GNATBIND"; then |
093e61a6 | 1804 | echo "$ac_t""$GNATBIND" 1>&6 |
34a86c2b | 1805 | else |
093e61a6 | 1806 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
1807 | fi |
1808 | ||
093e61a6 | 1809 | |
34a86c2b | 1810 | if test -z "$ac_cv_prog_GNATBIND"; then |
093e61a6 | 1811 | if test -n "$ac_tool_prefix"; then |
34a86c2b NN |
1812 | # Extract the first word of "gnatbind", so it can be a program name with args. |
1813 | set dummy gnatbind; ac_word=$2 | |
093e61a6 | 1814 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
51b9ff45 | 1815 | echo "configure:1816: checking for $ac_word" >&5 |
093e61a6 RS |
1816 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1817 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b | 1818 | else |
093e61a6 RS |
1819 | if test -n "$GNATBIND"; then |
1820 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
34a86c2b | 1821 | else |
093e61a6 RS |
1822 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1823 | ac_dummy="$PATH" | |
1824 | for ac_dir in $ac_dummy; do | |
1825 | test -z "$ac_dir" && ac_dir=. | |
1826 | if test -f $ac_dir/$ac_word; then | |
1827 | ac_cv_prog_GNATBIND="gnatbind" | |
1828 | break | |
1829 | fi | |
1830 | done | |
1831 | IFS="$ac_save_ifs" | |
1832 | test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no" | |
34a86c2b NN |
1833 | fi |
1834 | fi | |
093e61a6 RS |
1835 | GNATBIND="$ac_cv_prog_GNATBIND" |
1836 | if test -n "$GNATBIND"; then | |
1837 | echo "$ac_t""$GNATBIND" 1>&6 | |
34a86c2b | 1838 | else |
093e61a6 | 1839 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
1840 | fi |
1841 | ||
1842 | else | |
093e61a6 RS |
1843 | GNATBIND="no" |
1844 | fi | |
34a86c2b NN |
1845 | fi |
1846 | ||
093e61a6 | 1847 | echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6 |
51b9ff45 | 1848 | echo "configure:1849: checking for compiler driver that understands Ada" >&5 |
093e61a6 RS |
1849 | if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then |
1850 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1851 | else |
1852 | cat >conftest.adb <<EOF | |
1853 | procedure conftest is begin null; end conftest; | |
1854 | EOF | |
1855 | gcc_cv_prog_adac=no | |
1856 | # Have to do ac_tool_prefix and user overrides by hand. | |
1857 | for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \ | |
1858 | ${ac_tool_prefix}gcc gcc \ | |
1859 | ${ac_tool_prefix}cc cc \ | |
1860 | ${ac_tool_prefix}gnatgcc gnatgcc \ | |
1861 | ${ac_tool_prefix}gnatcc gnatcc \ | |
1862 | ${ac_tool_prefix}adagcc adagcc \ | |
1863 | ${ac_tool_prefix}adacc adacc ; do | |
1864 | # There is a bug in all released versions of GCC which causes the | |
1865 | # driver to exit successfully when the appropriate language module | |
1866 | # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. | |
1867 | # Therefore we must check for the error message as well as an | |
1868 | # unsuccessful exit. | |
1869 | errors=`($cand -c conftest.adb) 2>&1 || echo failure` | |
1870 | if test x"$errors" = x; then | |
1871 | gcc_cv_prog_adac=$cand | |
1872 | break | |
1873 | fi | |
1874 | done | |
1875 | rm -f conftest.* | |
1876 | fi | |
093e61a6 RS |
1877 | |
1878 | echo "$ac_t""$gcc_cv_prog_adac" 1>&6 | |
34a86c2b NN |
1879 | ADAC=$gcc_cv_prog_adac |
1880 | ||
1881 | ||
1882 | if test x$GNATBIND != xno && test x$ADAC != xno; then | |
1883 | have_gnat=yes | |
1884 | else | |
1885 | have_gnat=no | |
1886 | fi | |
1887 | ||
1888 | ||
093e61a6 RS |
1889 | if test x$have_gnat != xno ; then |
1890 | echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6 | |
51b9ff45 | 1891 | echo "configure:1892: checking whether ${ADAC} accepts -Wno-long-long" >&5 |
093e61a6 RS |
1892 | if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then |
1893 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1894 | else |
1895 | cat >conftest.adb <<EOF | |
1896 | procedure conftest is begin null; end conftest; | |
1897 | EOF | |
1898 | if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then | |
1899 | ac_cv_prog_adac_no_long_long=yes | |
1900 | else | |
1901 | ac_cv_prog_adac_no_long_long=no | |
1902 | fi | |
1903 | rm -f conftest* | |
1904 | fi | |
093e61a6 RS |
1905 | |
1906 | echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6 | |
34a86c2b NN |
1907 | else |
1908 | ac_cv_prog_adac_no_long_long=yes | |
1909 | fi | |
1910 | ||
1911 | # --------------------- | |
1912 | # Warnings and checking | |
1913 | # --------------------- | |
1914 | ||
1915 | strict1_warn= | |
1916 | if test $ac_cv_prog_cc_no_long_long = yes && \ | |
1917 | test $ac_cv_prog_adac_no_long_long = yes ; then | |
1918 | strict1_warn="-pedantic -Wno-long-long" | |
1919 | fi | |
1920 | ||
1921 | ||
093e61a6 | 1922 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
1923 | # That's useful for people building cross-compilers, or just running a |
1924 | # quick `make'. | |
1925 | warn_cflags= | |
1926 | if test "x$GCC" = "xyes"; then | |
1927 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
1928 | fi | |
1929 | ||
1930 | ||
dd859b8a KG |
1931 | # Enable -Werror in bootstrap stage2 and later. |
1932 | # Change the default to "no" on release branches. | |
1933 | # Check whether --enable-werror or --disable-werror was given. | |
1934 | if test "${enable_werror+set}" = set; then | |
1935 | enableval="$enable_werror" | |
093e61a6 | 1936 | : |
dd859b8a KG |
1937 | else |
1938 | enable_werror=yes | |
093e61a6 RS |
1939 | fi |
1940 | ||
dd859b8a KG |
1941 | if test x$enable_werror = xyes ; then |
1942 | WERROR=-Werror | |
1943 | fi | |
1944 | ||
1945 | ||
414d23ae HPN |
1946 | # Enable expensive internal checks |
1947 | # Check whether --enable-checking or --disable-checking was given. | |
1948 | if test "${enable_checking+set}" = set; then | |
1949 | enableval="$enable_checking" | |
1950 | ac_checking= | |
1951 | ac_tree_checking= | |
1952 | ac_rtl_checking= | |
1953 | ac_rtlflag_checking= | |
1954 | ac_gc_checking= | |
1955 | ac_gc_always_collect= | |
5dfa45d0 | 1956 | ac_fold_checking= |
414d23ae HPN |
1957 | case "${enableval}" in |
1958 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; | |
1959 | ac_rtlflag_checking=1 ;; | |
1960 | no) ;; | |
1961 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
1962 | set fnord $enableval; shift | |
1963 | IFS="$ac_save_IFS" | |
1964 | for check | |
1965 | do | |
1966 | case $check in | |
1967 | misc) ac_checking=1 ;; | |
1968 | tree) ac_tree_checking=1 ;; | |
1969 | rtlflag) ac_rtlflag_checking=1 ;; | |
1970 | rtl) ac_rtl_checking=1 ;; | |
1971 | gc) ac_gc_checking=1 ;; | |
1972 | gcac) ac_gc_always_collect=1 ;; | |
5dfa45d0 | 1973 | fold) ac_fold_checking=1 ;; |
414d23ae | 1974 | valgrind) ac_checking_valgrind=1 ;; |
093e61a6 | 1975 | *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;; |
414d23ae HPN |
1976 | esac |
1977 | done | |
1978 | ;; | |
1979 | esac | |
1980 | ||
75e93faa | 1981 | else |
414d23ae HPN |
1982 | # Enable some checks by default for development versions of GCC |
1983 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; | |
093e61a6 RS |
1984 | fi |
1985 | ||
414d23ae HPN |
1986 | nocommon_flag="" |
1987 | if test x$ac_checking != x ; then | |
093e61a6 | 1988 | cat >> confdefs.h <<\EOF |
414d23ae | 1989 | #define ENABLE_CHECKING 1 |
093e61a6 | 1990 | EOF |
75e93faa | 1991 | |
414d23ae HPN |
1992 | nocommon_flag=-fno-common |
1993 | fi | |
827ae6cf | 1994 | |
414d23ae | 1995 | if test x$ac_tree_checking != x ; then |
093e61a6 | 1996 | cat >> confdefs.h <<\EOF |
414d23ae | 1997 | #define ENABLE_TREE_CHECKING 1 |
093e61a6 | 1998 | EOF |
827ae6cf RO |
1999 | |
2000 | fi | |
414d23ae | 2001 | if test x$ac_rtl_checking != x ; then |
093e61a6 | 2002 | cat >> confdefs.h <<\EOF |
414d23ae | 2003 | #define ENABLE_RTL_CHECKING 1 |
093e61a6 | 2004 | EOF |
827ae6cf | 2005 | |
414d23ae HPN |
2006 | fi |
2007 | if test x$ac_rtlflag_checking != x ; then | |
093e61a6 | 2008 | cat >> confdefs.h <<\EOF |
414d23ae | 2009 | #define ENABLE_RTL_FLAG_CHECKING 1 |
093e61a6 | 2010 | EOF |
827ae6cf RO |
2011 | |
2012 | fi | |
414d23ae | 2013 | if test x$ac_gc_checking != x ; then |
093e61a6 | 2014 | cat >> confdefs.h <<\EOF |
414d23ae | 2015 | #define ENABLE_GC_CHECKING 1 |
093e61a6 | 2016 | EOF |
827ae6cf | 2017 | |
414d23ae HPN |
2018 | fi |
2019 | if test x$ac_gc_always_collect != x ; then | |
093e61a6 | 2020 | cat >> confdefs.h <<\EOF |
414d23ae | 2021 | #define ENABLE_GC_ALWAYS_COLLECT 1 |
093e61a6 | 2022 | EOF |
75e93faa | 2023 | |
5dfa45d0 JJ |
2024 | fi |
2025 | if test x$ac_fold_checking != x ; then | |
2026 | cat >> confdefs.h <<\EOF | |
2027 | #define ENABLE_FOLD_CHECKING 1 | |
2028 | EOF | |
2029 | ||
414d23ae HPN |
2030 | fi |
2031 | valgrind_path_defines= | |
2032 | valgrind_command= | |
2033 | if test x$ac_checking_valgrind != x ; then | |
2034 | # It is certainly possible that there's valgrind but no valgrind.h. | |
2035 | # GCC relies on making annotations so we must have both. | |
a207b594 HPN |
2036 | echo $ac_n "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>""... $ac_c" 1>&6 |
2037 | echo "configure:2038: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 | |
093e61a6 | 2038 | cat > conftest.$ac_ext <<EOF |
51b9ff45 | 2039 | #line 2040 "configure" |
093e61a6 | 2040 | #include "confdefs.h" |
a207b594 | 2041 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
2042 | #ifndef VALGRIND_DISCARD |
2043 | #error VALGRIND_DISCARD not defined | |
2044 | #endif | |
093e61a6 RS |
2045 | EOF |
2046 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
51b9ff45 | 2047 | { (eval echo configure:2048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 | 2048 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
a207b594 HPN |
2049 | if test -z "$ac_err"; then |
2050 | rm -rf conftest* | |
2051 | gcc_cv_header_valgrind_memcheck_h=yes | |
2052 | else | |
2053 | echo "$ac_err" >&5 | |
2054 | echo "configure: failed program was:" >&5 | |
2055 | cat conftest.$ac_ext >&5 | |
2056 | rm -rf conftest* | |
2057 | gcc_cv_header_valgrind_memcheck_h=no | |
2058 | fi | |
2059 | rm -f conftest* | |
2060 | echo "$ac_t""$gcc_cv_header_valgrind_memcheck_h" 1>&6 | |
2061 | echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6 | |
2062 | echo "configure:2063: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
2063 | cat > conftest.$ac_ext <<EOF | |
2064 | #line 2065 "configure" | |
2065 | #include "confdefs.h" | |
2066 | #include <memcheck.h> | |
2067 | #ifndef VALGRIND_DISCARD | |
2068 | #error VALGRIND_DISCARD not defined | |
2069 | #endif | |
2070 | EOF | |
2071 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2072 | { (eval echo configure:2073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
2073 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
093e61a6 RS |
2074 | if test -z "$ac_err"; then |
2075 | rm -rf conftest* | |
14011ca4 AJ |
2076 | gcc_cv_header_memcheck_h=yes |
2077 | else | |
093e61a6 RS |
2078 | echo "$ac_err" >&5 |
2079 | echo "configure: failed program was:" >&5 | |
2080 | cat conftest.$ac_ext >&5 | |
2081 | rm -rf conftest* | |
cafe096b EC |
2082 | gcc_cv_header_memcheck_h=no |
2083 | fi | |
cafe096b | 2084 | rm -f conftest* |
093e61a6 RS |
2085 | echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6 |
2086 | ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'` | |
2087 | echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6 | |
a207b594 | 2088 | echo "configure:2089: checking for valgrind.h" >&5 |
093e61a6 RS |
2089 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2090 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2091 | else | |
2092 | cat > conftest.$ac_ext <<EOF | |
a207b594 | 2093 | #line 2094 "configure" |
093e61a6 RS |
2094 | #include "confdefs.h" |
2095 | #include <valgrind.h> | |
2096 | EOF | |
2097 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
a207b594 | 2098 | { (eval echo configure:2099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2099 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2100 | if test -z "$ac_err"; then | |
2101 | rm -rf conftest* | |
2102 | eval "ac_cv_header_$ac_safe=yes" | |
2103 | else | |
2104 | echo "$ac_err" >&5 | |
2105 | echo "configure: failed program was:" >&5 | |
2106 | cat conftest.$ac_ext >&5 | |
2107 | rm -rf conftest* | |
2108 | eval "ac_cv_header_$ac_safe=no" | |
75e93faa | 2109 | fi |
093e61a6 | 2110 | rm -f conftest* |
414d23ae | 2111 | fi |
093e61a6 RS |
2112 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
2113 | echo "$ac_t""yes" 1>&6 | |
414d23ae HPN |
2114 | have_valgrind_h=yes |
2115 | else | |
093e61a6 RS |
2116 | echo "$ac_t""no" 1>&6 |
2117 | have_valgrind_h=no | |
75e93faa ZW |
2118 | fi |
2119 | ||
56694dd9 ZW |
2120 | |
2121 | # Prepare PATH_SEPARATOR. | |
2122 | # The user is always right. | |
2123 | if test "${PATH_SEPARATOR+set}" != set; then | |
2124 | echo "#! /bin/sh" >conf$$.sh | |
2125 | echo "exit 0" >>conf$$.sh | |
2126 | chmod +x conf$$.sh | |
2127 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
2128 | PATH_SEPARATOR=';' | |
2129 | else | |
2130 | PATH_SEPARATOR=: | |
2131 | fi | |
2132 | rm -f conf$$.sh | |
2133 | fi | |
2134 | ||
2135 | # Find out how to test for executable files. Don't use a zero-byte file, | |
2136 | # as systems may use methods other than mode bits to determine executability. | |
2137 | cat >conf$$.file <<_ASEOF | |
2138 | #! /bin/sh | |
2139 | exit 0 | |
2140 | _ASEOF | |
2141 | chmod +x conf$$.file | |
2142 | if test -x conf$$.file >/dev/null 2>&1; then | |
2143 | ac_executable_p="test -x" | |
2144 | else | |
2145 | ac_executable_p="test -f" | |
2146 | fi | |
2147 | rm -f conf$$.file | |
2148 | ||
2149 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 2150 | set dummy valgrind; ac_word=$2 |
093e61a6 | 2151 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
a207b594 | 2152 | echo "configure:2153: checking for $ac_word" >&5 |
093e61a6 RS |
2153 | if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then |
2154 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
2155 | else |
2156 | case "$valgrind_path" in | |
56694dd9 ZW |
2157 | [\\/]* | ?:[\\/]*) |
2158 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
2159 | ;; | |
414d23ae | 2160 | *) |
56694dd9 ZW |
2161 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
2162 | for ac_dir in $PATH; do | |
2163 | IFS="$ac_save_IFS" | |
2164 | test -z "$ac_dir" && ac_dir=. | |
2165 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2166 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
2167 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
2168 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
2169 | break 2 | |
2170 | fi | |
2171 | fi | |
2172 | done | |
2173 | done | |
2174 | IFS="$ac_save_IFS" | |
2175 | ;; | |
414d23ae | 2176 | esac |
75e93faa | 2177 | fi |
414d23ae HPN |
2178 | valgrind_path="$ac_cv_path_valgrind_path" |
2179 | if test -n "$valgrind_path"; then | |
093e61a6 | 2180 | echo "$ac_t""$valgrind_path" 1>&6 |
414d23ae | 2181 | else |
093e61a6 | 2182 | echo "$ac_t""no" 1>&6 |
414d23ae HPN |
2183 | fi |
2184 | ||
a207b594 HPN |
2185 | if test "x$valgrind_path" = "x" \ |
2186 | || (test $have_valgrind_h = no \ | |
2187 | && test $gcc_cv_header_memcheck_h = no \ | |
2188 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
2189 | { echo "configure: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" 1>&2; exit 1; } | |
414d23ae HPN |
2190 | fi |
2191 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
2192 | valgrind_command="$valgrind_path -q" | |
093e61a6 | 2193 | cat >> confdefs.h <<\EOF |
414d23ae | 2194 | #define ENABLE_VALGRIND_CHECKING 1 |
093e61a6 | 2195 | EOF |
75e93faa | 2196 | |
a207b594 HPN |
2197 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
2198 | cat >> confdefs.h <<\EOF | |
2199 | #define HAVE_VALGRIND_MEMCHECK_H 1 | |
2200 | EOF | |
2201 | ||
2202 | fi | |
14011ca4 | 2203 | if test $gcc_cv_header_memcheck_h = yes; then |
093e61a6 | 2204 | cat >> confdefs.h <<\EOF |
14011ca4 | 2205 | #define HAVE_MEMCHECK_H 1 |
093e61a6 | 2206 | EOF |
14011ca4 AJ |
2207 | |
2208 | fi | |
414d23ae | 2209 | fi |
75e93faa | 2210 | |
75e93faa ZW |
2211 | |
2212 | ||
414d23ae HPN |
2213 | # Enable code coverage collection |
2214 | # Check whether --enable-coverage or --disable-coverage was given. | |
2215 | if test "${enable_coverage+set}" = set; then | |
2216 | enableval="$enable_coverage" | |
2217 | case "${enableval}" in | |
2218 | yes|noopt) | |
e61a2eb7 | 2219 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" |
414d23ae HPN |
2220 | ;; |
2221 | opt) | |
e61a2eb7 | 2222 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" |
414d23ae HPN |
2223 | ;; |
2224 | *) | |
093e61a6 | 2225 | { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; } |
414d23ae HPN |
2226 | ;; |
2227 | esac | |
75e93faa | 2228 | else |
414d23ae | 2229 | coverage_flags="" |
093e61a6 RS |
2230 | fi |
2231 | ||
5c3bc9fb | 2232 | |
414d23ae | 2233 | |
73458fb7 NN |
2234 | # ------------------------------- |
2235 | # Miscenalleous configure options | |
2236 | # ------------------------------- | |
34a86c2b NN |
2237 | |
2238 | # With stabs | |
2239 | # Check whether --with-stabs or --without-stabs was given. | |
2240 | if test "${with_stabs+set}" = set; then | |
2241 | withval="$with_stabs" | |
2242 | stabs="$with_stabs" | |
2243 | else | |
2244 | stabs=no | |
093e61a6 | 2245 | fi |
34a86c2b | 2246 | |
cafe096b | 2247 | |
34a86c2b NN |
2248 | # Determine whether or not multilibs are enabled. |
2249 | # Check whether --enable-multilib or --disable-multilib was given. | |
2250 | if test "${enable_multilib+set}" = set; then | |
2251 | enableval="$enable_multilib" | |
093e61a6 | 2252 | : |
34a86c2b NN |
2253 | else |
2254 | enable_multilib=yes | |
093e61a6 RS |
2255 | fi |
2256 | ||
75e93faa | 2257 | |
34a86c2b | 2258 | |
414d23ae HPN |
2259 | # Enable __cxa_atexit for C++. |
2260 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
2261 | if test "${enable___cxa_atexit+set}" = set; then | |
2262 | enableval="$enable___cxa_atexit" | |
093e61a6 RS |
2263 | : |
2264 | fi | |
75e93faa ZW |
2265 | |
2266 | ||
414d23ae HPN |
2267 | # Enable threads |
2268 | # Pass with no value to take the default | |
2269 | # Pass with a value to specify a thread package | |
2270 | # Check whether --enable-threads or --disable-threads was given. | |
2271 | if test "${enable_threads+set}" = set; then | |
2272 | enableval="$enable_threads" | |
093e61a6 | 2273 | : |
414d23ae HPN |
2274 | else |
2275 | enable_threads='' | |
093e61a6 RS |
2276 | fi |
2277 | ||
c2e494a8 | 2278 | # Save in case it gets overwritten in config.gcc |
414d23ae | 2279 | enable_threads_flag=$enable_threads |
414d23ae HPN |
2280 | |
2281 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
2282 | if test "${enable_objc_gc+set}" = set; then | |
2283 | enableval="$enable_objc_gc" | |
2284 | if test x$enable_objc_gc = xno; then | |
2285 | objc_boehm_gc='' | |
2286 | else | |
2287 | objc_boehm_gc=1 | |
2288 | fi | |
2289 | else | |
2290 | objc_boehm_gc='' | |
093e61a6 | 2291 | fi |
75e93faa ZW |
2292 | |
2293 | ||
414d23ae HPN |
2294 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
2295 | if test "${with_dwarf2+set}" = set; then | |
2296 | withval="$with_dwarf2" | |
2297 | dwarf2="$with_dwarf2" | |
75e93faa | 2298 | else |
414d23ae | 2299 | dwarf2=no |
093e61a6 RS |
2300 | fi |
2301 | ||
75e93faa | 2302 | |
414d23ae HPN |
2303 | # Check whether --enable-shared or --disable-shared was given. |
2304 | if test "${enable_shared+set}" = set; then | |
2305 | enableval="$enable_shared" | |
093e61a6 | 2306 | |
414d23ae HPN |
2307 | case $enable_shared in |
2308 | yes | no) ;; | |
2309 | *) | |
2310 | enable_shared=no | |
2311 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
2312 | for pkg in $enableval; do | |
2313 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
2314 | enable_shared=yes | |
2315 | fi | |
2316 | done | |
2317 | IFS="$ac_save_ifs" | |
2318 | ;; | |
2319 | esac | |
2320 | ||
75e93faa | 2321 | else |
414d23ae | 2322 | enable_shared=yes |
093e61a6 | 2323 | fi |
75e93faa | 2324 | |
75e93faa | 2325 | |
75e93faa | 2326 | |
4977bab6 ZW |
2327 | # Check whether --with-sysroot or --without-sysroot was given. |
2328 | if test "${with_sysroot+set}" = set; then | |
2329 | withval="$with_sysroot" | |
093e61a6 | 2330 | |
4977bab6 | 2331 | case ${with_sysroot} in |
caa55b1e | 2332 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
2333 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
2334 | esac | |
093e61a6 | 2335 | |
4977bab6 ZW |
2336 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
2337 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
2338 | ||
047d636f DJ |
2339 | if test "x$exec_prefix" = xNONE; then |
2340 | if test "x$prefix" = xNONE; then | |
2341 | test_prefix=/usr/local | |
2342 | else | |
2343 | test_prefix=$prefix | |
2344 | fi | |
2345 | else | |
2346 | test_prefix=$exec_prefix | |
2347 | fi | |
2348 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
2349 | "${test_prefix}"|"${test_prefix}/"*|\ |
2350 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
2351 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
2352 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
2353 | ;; | |
2354 | esac | |
2355 | ||
4977bab6 | 2356 | else |
093e61a6 | 2357 | |
4977bab6 | 2358 | TARGET_SYSTEM_ROOT= |
db720d9a | 2359 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
2360 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
2361 | ||
093e61a6 RS |
2362 | fi |
2363 | ||
4977bab6 ZW |
2364 | |
2365 | ||
2366 | ||
2367 | ||
d1bd0ded | 2368 | # Build with intermodule optimisations |
d1bd0ded GK |
2369 | # Check whether --enable-intermodule or --disable-intermodule was given. |
2370 | if test "${enable_intermodule+set}" = set; then | |
2371 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
2372 | case ${enable_intermodule} in |
2373 | yes) onestep="-onestep";; | |
2374 | *) onestep="";; | |
d1bd0ded | 2375 | esac |
0c46c5c7 KC |
2376 | else |
2377 | onestep="" | |
d1bd0ded GK |
2378 | fi |
2379 | ||
2380 | ||
2381 | ||
73458fb7 NN |
2382 | # ------------------------- |
2383 | # Checks for other programs | |
2384 | # ------------------------- | |
5b67ad6f | 2385 | |
093e61a6 | 2386 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
a207b594 | 2387 | echo "configure:2388: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
093e61a6 RS |
2388 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
2389 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
2390 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9a25f70 | 2391 | else |
093e61a6 | 2392 | cat > conftestmake <<\EOF |
e9a25f70 | 2393 | all: |
093e61a6 RS |
2394 | @echo 'ac_maketemp="${MAKE}"' |
2395 | EOF | |
e9a25f70 | 2396 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
093e61a6 | 2397 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` |
e9a25f70 JL |
2398 | if test -n "$ac_maketemp"; then |
2399 | eval ac_cv_prog_make_${ac_make}_set=yes | |
2400 | else | |
2401 | eval ac_cv_prog_make_${ac_make}_set=no | |
2402 | fi | |
093e61a6 | 2403 | rm -f conftestmake |
e9a25f70 JL |
2404 | fi |
2405 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
093e61a6 | 2406 | echo "$ac_t""yes" 1>&6 |
e9a25f70 JL |
2407 | SET_MAKE= |
2408 | else | |
093e61a6 | 2409 | echo "$ac_t""no" 1>&6 |
e9a25f70 JL |
2410 | SET_MAKE="MAKE=${MAKE-make}" |
2411 | fi | |
2412 | ||
2413 | ||
861bb6c1 | 2414 | # Find some useful tools |
2c4902b9 | 2415 | for ac_prog in mawk gawk nawk awk |
861bb6c1 | 2416 | do |
093e61a6 | 2417 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 2418 | set dummy $ac_prog; ac_word=$2 |
093e61a6 | 2419 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
a207b594 | 2420 | echo "configure:2421: checking for $ac_word" >&5 |
093e61a6 RS |
2421 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2422 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 JL |
2423 | else |
2424 | if test -n "$AWK"; then | |
2425 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2426 | else | |
093e61a6 RS |
2427 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2428 | ac_dummy="$PATH" | |
2429 | for ac_dir in $ac_dummy; do | |
2430 | test -z "$ac_dir" && ac_dir=. | |
2431 | if test -f $ac_dir/$ac_word; then | |
2432 | ac_cv_prog_AWK="$ac_prog" | |
2433 | break | |
2434 | fi | |
2435 | done | |
2436 | IFS="$ac_save_ifs" | |
861bb6c1 JL |
2437 | fi |
2438 | fi | |
093e61a6 | 2439 | AWK="$ac_cv_prog_AWK" |
861bb6c1 | 2440 | if test -n "$AWK"; then |
093e61a6 | 2441 | echo "$ac_t""$AWK" 1>&6 |
861bb6c1 | 2442 | else |
093e61a6 | 2443 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
2444 | fi |
2445 | ||
093e61a6 | 2446 | test -n "$AWK" && break |
861bb6c1 JL |
2447 | done |
2448 | ||
2c4902b9 NN |
2449 | # We need awk to run opts.sh (to create options.c and options.h). |
2450 | # Bail out if it's missing. | |
2451 | case ${AWK} in | |
2452 | "") { echo "configure: error: can't build without awk, bailing out" 1>&2; exit 1; } ;; | |
2453 | esac | |
2454 | ||
093e61a6 | 2455 | echo $ac_n "checking whether ln works""... $ac_c" 1>&6 |
2c4902b9 | 2456 | echo "configure:2457: checking whether ln works" >&5 |
093e61a6 RS |
2457 | if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then |
2458 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2459 | else |
2460 | rm -f conftestdata_t | |
2461 | echo >conftestdata_f | |
2462 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2463 | then | |
2464 | gcc_cv_prog_LN="ln" | |
2465 | else | |
2466 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2467 | then | |
2468 | gcc_cv_prog_LN="ln -s" | |
2469 | else | |
2470 | gcc_cv_prog_LN=cp | |
2471 | fi | |
2472 | fi | |
2473 | rm -f conftestdata_f conftestdata_t | |
2474 | ||
2475 | fi | |
2476 | LN="$gcc_cv_prog_LN" | |
2477 | if test "$gcc_cv_prog_LN" = "ln"; then | |
093e61a6 | 2478 | echo "$ac_t""yes" 1>&6 |
0a4b6309 RL |
2479 | else |
2480 | if test "$gcc_cv_prog_LN" = "ln -s"; then | |
093e61a6 | 2481 | echo "$ac_t""no, using ln -s" 1>&6 |
0a4b6309 | 2482 | else |
093e61a6 | 2483 | echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6 |
0a4b6309 RL |
2484 | fi |
2485 | fi | |
2486 | ||
093e61a6 | 2487 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
2c4902b9 | 2488 | echo "configure:2489: checking whether ln -s works" >&5 |
093e61a6 RS |
2489 | if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then |
2490 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2491 | else |
2492 | rm -f conftestdata_t | |
2493 | echo >conftestdata_f | |
2494 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2495 | then | |
2496 | gcc_cv_prog_LN_S="ln -s" | |
2497 | else | |
2498 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2499 | then | |
2500 | gcc_cv_prog_LN_S=ln | |
2501 | else | |
2502 | gcc_cv_prog_LN_S=cp | |
2503 | fi | |
2504 | fi | |
2505 | rm -f conftestdata_f conftestdata_t | |
2506 | ||
2507 | fi | |
2508 | LN_S="$gcc_cv_prog_LN_S" | |
2509 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
093e61a6 | 2510 | echo "$ac_t""yes" 1>&6 |
0a4b6309 RL |
2511 | else |
2512 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
093e61a6 | 2513 | echo "$ac_t""no, using ln" 1>&6 |
0a4b6309 | 2514 | else |
093e61a6 | 2515 | echo "$ac_t""no, and neither does ln, so using cp" 1>&6 |
0a4b6309 RL |
2516 | fi |
2517 | fi | |
2518 | ||
093e61a6 RS |
2519 | # Extract the first word of "ranlib", so it can be a program name with args. |
2520 | set dummy ranlib; ac_word=$2 | |
2521 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2c4902b9 | 2522 | echo "configure:2523: checking for $ac_word" >&5 |
093e61a6 RS |
2523 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2524 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 JL |
2525 | else |
2526 | if test -n "$RANLIB"; then | |
2527 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2528 | else | |
093e61a6 RS |
2529 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2530 | ac_dummy="$PATH" | |
2531 | for ac_dir in $ac_dummy; do | |
2532 | test -z "$ac_dir" && ac_dir=. | |
2533 | if test -f $ac_dir/$ac_word; then | |
2534 | ac_cv_prog_RANLIB="ranlib" | |
2535 | break | |
2536 | fi | |
2537 | done | |
2538 | IFS="$ac_save_ifs" | |
2539 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
861bb6c1 JL |
2540 | fi |
2541 | fi | |
093e61a6 | 2542 | RANLIB="$ac_cv_prog_RANLIB" |
861bb6c1 | 2543 | if test -n "$RANLIB"; then |
093e61a6 | 2544 | echo "$ac_t""$RANLIB" 1>&6 |
cafe096b | 2545 | else |
093e61a6 | 2546 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
2547 | fi |
2548 | ||
0a4b6309 RL |
2549 | # Find a good install program. We prefer a C program (faster), |
2550 | # so one script is as good as another. But avoid the broken or | |
2551 | # incompatible versions: | |
2552 | # SysV /etc/install, /usr/sbin/install | |
2553 | # SunOS /usr/etc/install | |
2554 | # IRIX /sbin/install | |
2555 | # AIX /bin/install | |
2556 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2557 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2558 | # ./install, which can be erroneously created by make from ./install.sh. | |
093e61a6 | 2559 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
2c4902b9 | 2560 | echo "configure:2561: checking for a BSD compatible install" >&5 |
0a4b6309 | 2561 | if test -z "$INSTALL"; then |
093e61a6 RS |
2562 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
2563 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2564 | else |
2565 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
2566 | for ac_dir in $PATH; do | |
2567 | # Account for people who put trailing slashes in PATH elements. | |
2568 | case "$ac_dir/" in | |
2569 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2570 | *) | |
2571 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2572 | for ac_prog in ginstall scoinst install; do | |
2573 | if test -f $ac_dir/$ac_prog; then | |
2574 | if test $ac_prog = install && | |
2575 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2576 | # AIX install. It has an incompatible calling convention. | |
2577 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
2578 | : | |
2579 | else | |
2580 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2581 | break 2 | |
2582 | fi | |
2583 | fi | |
2584 | done | |
2585 | ;; | |
2586 | esac | |
2587 | done | |
2588 | IFS="$ac_save_IFS" | |
2589 | ||
2590 | fi | |
2591 | if test "${ac_cv_path_install+set}" = set; then | |
2592 | INSTALL="$ac_cv_path_install" | |
2593 | else | |
2594 | # As a last resort, use the slow shell script. We don't cache a | |
2595 | # path for INSTALL within a source directory, because that will | |
2596 | # break other packages using the cache if that directory is | |
2597 | # removed, or if the path is relative. | |
2598 | INSTALL="$ac_install_sh" | |
2599 | fi | |
2600 | fi | |
093e61a6 | 2601 | echo "$ac_t""$INSTALL" 1>&6 |
0a4b6309 RL |
2602 | |
2603 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2604 | # It thinks the first close brace ends the variable substitution. | |
2605 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2606 | ||
2607 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2608 | ||
861bb6c1 | 2609 | |
3a000df0 KC |
2610 | # See if cmp has --ignore-initial. |
2611 | echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6 | |
2c4902b9 | 2612 | echo "configure:2613: checking for cmp's capabilities" >&5 |
3a000df0 KC |
2613 | if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then |
2614 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2615 | else | |
2616 | echo abfoo >t1 | |
2617 | echo cdfoo >t2 | |
269a7343 | 2618 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
2619 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
2620 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 2621 | : |
3a000df0 KC |
2622 | else |
2623 | gcc_cv_prog_cmp_skip=gnucompare | |
2624 | fi | |
269a7343 KG |
2625 | fi |
2626 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
2627 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
2628 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
2629 | : | |
2630 | else | |
2631 | gcc_cv_prog_cmp_skip=fastcompare | |
2632 | fi | |
2633 | fi | |
3a000df0 KC |
2634 | fi |
2635 | rm t1 t2 | |
2636 | ||
2637 | fi | |
2638 | ||
2639 | echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6 | |
2640 | make_compare_target=$gcc_cv_prog_cmp_skip | |
2641 | ||
2642 | ||
2643 | ||
73458fb7 NN |
2644 | # See if we have the mktemp command. |
2645 | # Extract the first word of "mktemp", so it can be a program name with args. | |
2646 | set dummy mktemp; ac_word=$2 | |
093e61a6 | 2647 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
2c4902b9 | 2648 | echo "configure:2649: checking for $ac_word" >&5 |
093e61a6 RS |
2649 | if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then |
2650 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2651 | else |
2652 | if test -n "$have_mktemp_command"; then | |
2653 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
2654 | else | |
093e61a6 RS |
2655 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2656 | ac_dummy="$PATH" | |
2657 | for ac_dir in $ac_dummy; do | |
2658 | test -z "$ac_dir" && ac_dir=. | |
2659 | if test -f $ac_dir/$ac_word; then | |
2660 | ac_cv_prog_have_mktemp_command="yes" | |
2661 | break | |
2662 | fi | |
2663 | done | |
2664 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2665 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
2666 | fi | |
2667 | fi | |
093e61a6 | 2668 | have_mktemp_command="$ac_cv_prog_have_mktemp_command" |
73458fb7 | 2669 | if test -n "$have_mktemp_command"; then |
093e61a6 | 2670 | echo "$ac_t""$have_mktemp_command" 1>&6 |
73458fb7 | 2671 | else |
093e61a6 | 2672 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2673 | fi |
2674 | ||
2675 | ||
2676 | # Do we have a single-tree copy of texinfo? | |
2677 | if test -f $srcdir/../texinfo/Makefile.in; then | |
2678 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
2679 | gcc_cv_prog_makeinfo_modern=yes | |
093e61a6 | 2680 | echo "$ac_t""Using makeinfo from the unified source tree." 1>&6 |
73458fb7 NN |
2681 | else |
2682 | # See if makeinfo has been installed and is modern enough | |
2683 | # that we can use it. | |
2684 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
2685 | set dummy makeinfo; ac_word=$2 | |
093e61a6 | 2686 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
2c4902b9 | 2687 | echo "configure:2688: checking for $ac_word" >&5 |
093e61a6 RS |
2688 | if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then |
2689 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2690 | else |
2691 | if test -n "$MAKEINFO"; then | |
2692 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
2693 | else | |
093e61a6 RS |
2694 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2695 | ac_dummy="$PATH" | |
2696 | for ac_dir in $ac_dummy; do | |
2697 | test -z "$ac_dir" && ac_dir=. | |
2698 | if test -f $ac_dir/$ac_word; then | |
2699 | ac_cv_prog_MAKEINFO="makeinfo" | |
2700 | break | |
2701 | fi | |
2702 | done | |
2703 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2704 | fi |
2705 | fi | |
093e61a6 | 2706 | MAKEINFO="$ac_cv_prog_MAKEINFO" |
73458fb7 | 2707 | if test -n "$MAKEINFO"; then |
093e61a6 | 2708 | echo "$ac_t""$MAKEINFO" 1>&6 |
73458fb7 | 2709 | else |
093e61a6 | 2710 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2711 | fi |
2712 | ||
2713 | if test -n "$MAKEINFO"; then | |
2714 | # Found it, now check the version. | |
093e61a6 | 2715 | echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 |
2c4902b9 | 2716 | echo "configure:2717: checking for modern makeinfo" >&5 |
093e61a6 RS |
2717 | if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then |
2718 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2719 | else |
2720 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
2721 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
2c4902b9 | 2722 | echo "configure:2723: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
2723 | case $ac_prog_version in |
2724 | '') gcc_cv_prog_makeinfo_modern=no;; | |
2725 | 4.[2-9]*) | |
2726 | gcc_cv_prog_makeinfo_modern=yes;; | |
2727 | *) gcc_cv_prog_makeinfo_modern=no;; | |
2728 | esac | |
2729 | ||
2730 | fi | |
093e61a6 RS |
2731 | |
2732 | echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6 | |
73458fb7 NN |
2733 | else |
2734 | gcc_cv_prog_makeinfo_modern=no | |
2735 | fi | |
2736 | ||
2737 | fi | |
2738 | ||
2739 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
093e61a6 | 2740 | echo "configure: warning: |
cafe096b | 2741 | *** Makeinfo is missing or too old. |
093e61a6 | 2742 | *** Info documentation will not be built." 1>&2 |
73458fb7 NN |
2743 | BUILD_INFO= |
2744 | else | |
093e61a6 | 2745 | BUILD_INFO=info |
73458fb7 NN |
2746 | fi |
2747 | ||
2748 | # Is pod2man recent enough to regenerate manpages? | |
093e61a6 | 2749 | echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 |
2c4902b9 | 2750 | echo "configure:2751: checking for recent Pod::Man" >&5 |
73458fb7 | 2751 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
093e61a6 RS |
2752 | echo "$ac_t""yes" 1>&6 |
2753 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 2754 | else |
093e61a6 | 2755 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2756 | GENERATED_MANPAGES= |
2757 | fi | |
2758 | ||
2759 | # How about lex? | |
2760 | if test -f $srcdir/../flex/skel.c; then | |
2761 | FLEX='$(objdir)/../flex/flex' | |
2762 | else | |
2763 | # Extract the first word of "flex", so it can be a program name with args. | |
2764 | set dummy flex; ac_word=$2 | |
093e61a6 | 2765 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
2c4902b9 | 2766 | echo "configure:2767: checking for $ac_word" >&5 |
093e61a6 RS |
2767 | if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then |
2768 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2769 | else |
2770 | if test -n "$FLEX"; then | |
2771 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
2772 | else | |
093e61a6 RS |
2773 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2774 | ac_dummy="$PATH" | |
2775 | for ac_dir in $ac_dummy; do | |
2776 | test -z "$ac_dir" && ac_dir=. | |
2777 | if test -f $ac_dir/$ac_word; then | |
2778 | ac_cv_prog_FLEX="flex" | |
2779 | break | |
2780 | fi | |
2781 | done | |
2782 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2783 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex" |
2784 | fi | |
2785 | fi | |
093e61a6 | 2786 | FLEX="$ac_cv_prog_FLEX" |
73458fb7 | 2787 | if test -n "$FLEX"; then |
093e61a6 | 2788 | echo "$ac_t""$FLEX" 1>&6 |
73458fb7 | 2789 | else |
093e61a6 | 2790 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2791 | fi |
2792 | ||
2793 | fi | |
2794 | ||
2795 | # Bison? | |
2796 | # The -L switch is so bison can find its skeleton file. | |
2797 | if test -f $srcdir/../bison/bison.simple; then | |
2798 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' | |
2799 | else | |
2800 | # Extract the first word of "bison", so it can be a program name with args. | |
2801 | set dummy bison; ac_word=$2 | |
093e61a6 | 2802 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
2c4902b9 | 2803 | echo "configure:2804: checking for $ac_word" >&5 |
093e61a6 RS |
2804 | if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then |
2805 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2806 | else |
2807 | if test -n "$BISON"; then | |
2808 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
2809 | else | |
093e61a6 RS |
2810 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2811 | ac_dummy="$PATH" | |
2812 | for ac_dir in $ac_dummy; do | |
2813 | test -z "$ac_dir" && ac_dir=. | |
2814 | if test -f $ac_dir/$ac_word; then | |
2815 | ac_cv_prog_BISON="bison" | |
2816 | break | |
2817 | fi | |
2818 | done | |
2819 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2820 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison" |
2821 | fi | |
2822 | fi | |
093e61a6 | 2823 | BISON="$ac_cv_prog_BISON" |
73458fb7 | 2824 | if test -n "$BISON"; then |
093e61a6 | 2825 | echo "$ac_t""$BISON" 1>&6 |
73458fb7 | 2826 | else |
093e61a6 | 2827 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2828 | fi |
2829 | ||
2830 | fi | |
2831 | ||
2832 | # -------------------- | |
2833 | # Checks for C headers | |
2834 | # -------------------- | |
2835 | ||
093e61a6 | 2836 | echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 |
2c4902b9 | 2837 | echo "configure:2838: checking for GNU C library" >&5 |
093e61a6 RS |
2838 | if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then |
2839 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2840 | else | |
2841 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 2842 | #line 2843 "configure" |
093e61a6 | 2843 | #include "confdefs.h" |
73458fb7 | 2844 | #include <features.h> |
093e61a6 | 2845 | int main() { |
73458fb7 NN |
2846 | |
2847 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
2848 | #error Not a GNU C library system | |
2849 | #endif | |
093e61a6 RS |
2850 | ; return 0; } |
2851 | EOF | |
2c4902b9 | 2852 | if { (eval echo configure:2853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 2853 | rm -rf conftest* |
73458fb7 NN |
2854 | gcc_cv_glibc=yes |
2855 | else | |
093e61a6 RS |
2856 | echo "configure: failed program was:" >&5 |
2857 | cat conftest.$ac_ext >&5 | |
2858 | rm -rf conftest* | |
2859 | gcc_cv_glibc=no | |
73458fb7 | 2860 | fi |
093e61a6 | 2861 | rm -f conftest* |
73458fb7 NN |
2862 | fi |
2863 | ||
093e61a6 | 2864 | echo "$ac_t""$gcc_cv_glibc" 1>&6 |
73458fb7 | 2865 | if test $gcc_cv_glibc = yes; then |
093e61a6 | 2866 | cat >> confdefs.h <<\EOF |
73458fb7 | 2867 | #define _GNU_SOURCE 1 |
093e61a6 | 2868 | EOF |
73458fb7 NN |
2869 | |
2870 | fi | |
2871 | ||
093e61a6 | 2872 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
2c4902b9 | 2873 | echo "configure:2874: checking for ANSI C header files" >&5 |
093e61a6 RS |
2874 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2875 | echo $ac_n "(cached) $ac_c" 1>&6 | |
956d6950 | 2876 | else |
093e61a6 | 2877 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 2878 | #line 2879 "configure" |
093e61a6 | 2879 | #include "confdefs.h" |
956d6950 JL |
2880 | #include <stdlib.h> |
2881 | #include <stdarg.h> | |
2882 | #include <string.h> | |
2883 | #include <float.h> | |
093e61a6 RS |
2884 | EOF |
2885 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2c4902b9 | 2886 | { (eval echo configure:2887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2887 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2888 | if test -z "$ac_err"; then | |
2889 | rm -rf conftest* | |
956d6950 JL |
2890 | ac_cv_header_stdc=yes |
2891 | else | |
093e61a6 RS |
2892 | echo "$ac_err" >&5 |
2893 | echo "configure: failed program was:" >&5 | |
2894 | cat conftest.$ac_ext >&5 | |
2895 | rm -rf conftest* | |
2896 | ac_cv_header_stdc=no | |
956d6950 | 2897 | fi |
093e61a6 | 2898 | rm -f conftest* |
956d6950 JL |
2899 | |
2900 | if test $ac_cv_header_stdc = yes; then | |
2901 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
093e61a6 | 2902 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 2903 | #line 2904 "configure" |
093e61a6 | 2904 | #include "confdefs.h" |
956d6950 | 2905 | #include <string.h> |
093e61a6 | 2906 | EOF |
956d6950 | 2907 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 | 2908 | egrep "memchr" >/dev/null 2>&1; then |
956d6950 JL |
2909 | : |
2910 | else | |
093e61a6 | 2911 | rm -rf conftest* |
956d6950 JL |
2912 | ac_cv_header_stdc=no |
2913 | fi | |
2914 | rm -f conftest* | |
2915 | ||
2916 | fi | |
2917 | ||
2918 | if test $ac_cv_header_stdc = yes; then | |
2919 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
093e61a6 | 2920 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 2921 | #line 2922 "configure" |
093e61a6 | 2922 | #include "confdefs.h" |
956d6950 | 2923 | #include <stdlib.h> |
093e61a6 | 2924 | EOF |
956d6950 | 2925 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 | 2926 | egrep "free" >/dev/null 2>&1; then |
956d6950 JL |
2927 | : |
2928 | else | |
093e61a6 | 2929 | rm -rf conftest* |
956d6950 JL |
2930 | ac_cv_header_stdc=no |
2931 | fi | |
2932 | rm -f conftest* | |
2933 | ||
2934 | fi | |
2935 | ||
2936 | if test $ac_cv_header_stdc = yes; then | |
2937 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
093e61a6 | 2938 | if test "$cross_compiling" = yes; then |
956d6950 JL |
2939 | : |
2940 | else | |
093e61a6 | 2941 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 2942 | #line 2943 "configure" |
093e61a6 | 2943 | #include "confdefs.h" |
956d6950 | 2944 | #include <ctype.h> |
093e61a6 RS |
2945 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
2946 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
cafe096b | 2947 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
093e61a6 RS |
2948 | int main () { int i; for (i = 0; i < 256; i++) |
2949 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2950 | exit (0); } | |
2951 | ||
2952 | EOF | |
2c4902b9 | 2953 | if { (eval echo configure:2954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 2954 | then |
956d6950 JL |
2955 | : |
2956 | else | |
093e61a6 RS |
2957 | echo "configure: failed program was:" >&5 |
2958 | cat conftest.$ac_ext >&5 | |
2959 | rm -fr conftest* | |
2960 | ac_cv_header_stdc=no | |
956d6950 | 2961 | fi |
093e61a6 | 2962 | rm -fr conftest* |
956d6950 | 2963 | fi |
093e61a6 | 2964 | |
956d6950 JL |
2965 | fi |
2966 | fi | |
cafe096b | 2967 | |
093e61a6 RS |
2968 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
2969 | if test $ac_cv_header_stdc = yes; then | |
2970 | cat >> confdefs.h <<\EOF | |
956d6950 | 2971 | #define STDC_HEADERS 1 |
093e61a6 | 2972 | EOF |
956d6950 JL |
2973 | |
2974 | fi | |
2975 | ||
093e61a6 | 2976 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
2c4902b9 | 2977 | echo "configure:2978: checking whether time.h and sys/time.h may both be included" >&5 |
093e61a6 RS |
2978 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
2979 | echo $ac_n "(cached) $ac_c" 1>&6 | |
956d6950 | 2980 | else |
093e61a6 | 2981 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 2982 | #line 2983 "configure" |
093e61a6 | 2983 | #include "confdefs.h" |
956d6950 JL |
2984 | #include <sys/types.h> |
2985 | #include <sys/time.h> | |
2986 | #include <time.h> | |
093e61a6 RS |
2987 | int main() { |
2988 | struct tm *tp; | |
2989 | ; return 0; } | |
2990 | EOF | |
2c4902b9 | 2991 | if { (eval echo configure:2992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 2992 | rm -rf conftest* |
956d6950 JL |
2993 | ac_cv_header_time=yes |
2994 | else | |
093e61a6 RS |
2995 | echo "configure: failed program was:" >&5 |
2996 | cat conftest.$ac_ext >&5 | |
2997 | rm -rf conftest* | |
2998 | ac_cv_header_time=no | |
956d6950 | 2999 | fi |
093e61a6 | 3000 | rm -f conftest* |
956d6950 | 3001 | fi |
cafe096b | 3002 | |
093e61a6 RS |
3003 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
3004 | if test $ac_cv_header_time = yes; then | |
3005 | cat >> confdefs.h <<\EOF | |
956d6950 | 3006 | #define TIME_WITH_SYS_TIME 1 |
093e61a6 | 3007 | EOF |
956d6950 JL |
3008 | |
3009 | fi | |
3010 | ||
093e61a6 | 3011 | echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 |
2c4902b9 | 3012 | echo "configure:3013: checking for working stdbool.h" >&5 |
093e61a6 RS |
3013 | if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then |
3014 | echo $ac_n "(cached) $ac_c" 1>&6 | |
827ae6cf | 3015 | else |
093e61a6 | 3016 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3017 | #line 3018 "configure" |
093e61a6 | 3018 | #include "confdefs.h" |
827ae6cf | 3019 | #include <stdbool.h> |
093e61a6 | 3020 | int main() { |
827ae6cf | 3021 | bool foo = false; |
093e61a6 RS |
3022 | ; return 0; } |
3023 | EOF | |
2c4902b9 | 3024 | if { (eval echo configure:3025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3025 | rm -rf conftest* |
827ae6cf RO |
3026 | ac_cv_header_stdbool_h=yes |
3027 | else | |
093e61a6 RS |
3028 | echo "configure: failed program was:" >&5 |
3029 | cat conftest.$ac_ext >&5 | |
3030 | rm -rf conftest* | |
3031 | ac_cv_header_stdbool_h=no | |
827ae6cf | 3032 | fi |
093e61a6 | 3033 | rm -f conftest* |
827ae6cf | 3034 | fi |
cafe096b | 3035 | |
093e61a6 RS |
3036 | echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6 |
3037 | if test $ac_cv_header_stdbool_h = yes; then | |
3038 | cat >> confdefs.h <<\EOF | |
827ae6cf | 3039 | #define HAVE_STDBOOL_H 1 |
093e61a6 | 3040 | EOF |
827ae6cf RO |
3041 | |
3042 | fi | |
3043 | ||
093e61a6 | 3044 | echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 |
2c4902b9 | 3045 | echo "configure:3046: checking whether string.h and strings.h may both be included" >&5 |
093e61a6 RS |
3046 | if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then |
3047 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 | 3048 | else |
093e61a6 | 3049 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3050 | #line 3051 "configure" |
093e61a6 | 3051 | #include "confdefs.h" |
0a4b6309 RL |
3052 | #include <string.h> |
3053 | #include <strings.h> | |
093e61a6 | 3054 | int main() { |
0a4b6309 | 3055 | |
093e61a6 RS |
3056 | ; return 0; } |
3057 | EOF | |
2c4902b9 | 3058 | if { (eval echo configure:3059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3059 | rm -rf conftest* |
0a4b6309 RL |
3060 | gcc_cv_header_string=yes |
3061 | else | |
093e61a6 RS |
3062 | echo "configure: failed program was:" >&5 |
3063 | cat conftest.$ac_ext >&5 | |
3064 | rm -rf conftest* | |
3065 | gcc_cv_header_string=no | |
0a4b6309 | 3066 | fi |
093e61a6 | 3067 | rm -f conftest* |
0a4b6309 | 3068 | fi |
cafe096b | 3069 | |
093e61a6 RS |
3070 | echo "$ac_t""$gcc_cv_header_string" 1>&6 |
3071 | if test $gcc_cv_header_string = yes; then | |
3072 | cat >> confdefs.h <<\EOF | |
0a4b6309 | 3073 | #define STRING_WITH_STRINGS 1 |
093e61a6 | 3074 | EOF |
0a4b6309 RL |
3075 | |
3076 | fi | |
3077 | ||
093e61a6 | 3078 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
2c4902b9 | 3079 | echo "configure:3080: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
093e61a6 RS |
3080 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
3081 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9831ca0 | 3082 | else |
093e61a6 | 3083 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3084 | #line 3085 "configure" |
093e61a6 | 3085 | #include "confdefs.h" |
e9831ca0 KG |
3086 | #include <sys/types.h> |
3087 | #include <sys/wait.h> | |
3088 | #ifndef WEXITSTATUS | |
093e61a6 | 3089 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
3090 | #endif |
3091 | #ifndef WIFEXITED | |
093e61a6 | 3092 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 3093 | #endif |
093e61a6 RS |
3094 | int main() { |
3095 | int s; | |
3096 | wait (&s); | |
3097 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
3098 | ; return 0; } | |
3099 | EOF | |
2c4902b9 | 3100 | if { (eval echo configure:3101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3101 | rm -rf conftest* |
e9831ca0 KG |
3102 | ac_cv_header_sys_wait_h=yes |
3103 | else | |
093e61a6 RS |
3104 | echo "configure: failed program was:" >&5 |
3105 | cat conftest.$ac_ext >&5 | |
3106 | rm -rf conftest* | |
3107 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 3108 | fi |
093e61a6 | 3109 | rm -f conftest* |
e9831ca0 | 3110 | fi |
cafe096b | 3111 | |
093e61a6 RS |
3112 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 |
3113 | if test $ac_cv_header_sys_wait_h = yes; then | |
3114 | cat >> confdefs.h <<\EOF | |
e9831ca0 | 3115 | #define HAVE_SYS_WAIT_H 1 |
093e61a6 | 3116 | EOF |
e9831ca0 KG |
3117 | |
3118 | fi | |
3119 | ||
093e61a6 | 3120 | for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \ |
1072ec3f | 3121 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 3122 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 3123 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 3124 | do |
093e61a6 RS |
3125 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
3126 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
2c4902b9 | 3127 | echo "configure:3128: checking for $ac_hdr" >&5 |
093e61a6 RS |
3128 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3129 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3130 | else | |
3131 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 3132 | #line 3133 "configure" |
093e61a6 RS |
3133 | #include "confdefs.h" |
3134 | #include <$ac_hdr> | |
3135 | EOF | |
3136 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2c4902b9 | 3137 | { (eval echo configure:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3138 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3139 | if test -z "$ac_err"; then | |
3140 | rm -rf conftest* | |
3141 | eval "ac_cv_header_$ac_safe=yes" | |
3142 | else | |
3143 | echo "$ac_err" >&5 | |
3144 | echo "configure: failed program was:" >&5 | |
3145 | cat conftest.$ac_ext >&5 | |
3146 | rm -rf conftest* | |
3147 | eval "ac_cv_header_$ac_safe=no" | |
956d6950 | 3148 | fi |
093e61a6 | 3149 | rm -f conftest* |
956d6950 | 3150 | fi |
093e61a6 RS |
3151 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3152 | echo "$ac_t""yes" 1>&6 | |
3153 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3154 | cat >> confdefs.h <<EOF | |
3155 | #define $ac_tr_hdr 1 | |
3156 | EOF | |
3157 | ||
3158 | else | |
3159 | echo "$ac_t""no" 1>&6 | |
956d6950 JL |
3160 | fi |
3161 | done | |
3162 | ||
3163 | ||
f24af81b | 3164 | # Check for thread headers. |
093e61a6 RS |
3165 | ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` |
3166 | echo $ac_n "checking for thread.h""... $ac_c" 1>&6 | |
2c4902b9 | 3167 | echo "configure:3168: checking for thread.h" >&5 |
093e61a6 RS |
3168 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3169 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3170 | else | |
3171 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 3172 | #line 3173 "configure" |
093e61a6 | 3173 | #include "confdefs.h" |
cafe096b | 3174 | #include <thread.h> |
093e61a6 RS |
3175 | EOF |
3176 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2c4902b9 | 3177 | { (eval echo configure:3178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3178 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3179 | if test -z "$ac_err"; then | |
3180 | rm -rf conftest* | |
3181 | eval "ac_cv_header_$ac_safe=yes" | |
3182 | else | |
3183 | echo "$ac_err" >&5 | |
3184 | echo "configure: failed program was:" >&5 | |
3185 | cat conftest.$ac_ext >&5 | |
3186 | rm -rf conftest* | |
3187 | eval "ac_cv_header_$ac_safe=no" | |
f24af81b | 3188 | fi |
093e61a6 | 3189 | rm -f conftest* |
f24af81b | 3190 | fi |
093e61a6 RS |
3191 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3192 | echo "$ac_t""yes" 1>&6 | |
f24af81b TT |
3193 | have_thread_h=yes |
3194 | else | |
093e61a6 RS |
3195 | echo "$ac_t""no" 1>&6 |
3196 | have_thread_h= | |
f24af81b TT |
3197 | fi |
3198 | ||
093e61a6 RS |
3199 | ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` |
3200 | echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 | |
2c4902b9 | 3201 | echo "configure:3202: checking for pthread.h" >&5 |
093e61a6 RS |
3202 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3203 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f24af81b | 3204 | else |
093e61a6 | 3205 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3206 | #line 3207 "configure" |
093e61a6 | 3207 | #include "confdefs.h" |
cafe096b | 3208 | #include <pthread.h> |
093e61a6 RS |
3209 | EOF |
3210 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2c4902b9 | 3211 | { (eval echo configure:3212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3212 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3213 | if test -z "$ac_err"; then | |
3214 | rm -rf conftest* | |
3215 | eval "ac_cv_header_$ac_safe=yes" | |
3216 | else | |
3217 | echo "$ac_err" >&5 | |
3218 | echo "configure: failed program was:" >&5 | |
3219 | cat conftest.$ac_ext >&5 | |
3220 | rm -rf conftest* | |
3221 | eval "ac_cv_header_$ac_safe=no" | |
f24af81b | 3222 | fi |
093e61a6 | 3223 | rm -f conftest* |
f24af81b | 3224 | fi |
093e61a6 RS |
3225 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3226 | echo "$ac_t""yes" 1>&6 | |
f24af81b TT |
3227 | have_pthread_h=yes |
3228 | else | |
093e61a6 RS |
3229 | echo "$ac_t""no" 1>&6 |
3230 | have_pthread_h= | |
f24af81b TT |
3231 | fi |
3232 | ||
3233 | ||
84c041a1 | 3234 | # These tests can't be done till we know if we have limits.h. |
093e61a6 | 3235 | echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 |
2c4902b9 | 3236 | echo "configure:3237: checking for CHAR_BIT" >&5 |
093e61a6 RS |
3237 | if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then |
3238 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3239 | else | |
3240 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 3241 | #line 3242 "configure" |
093e61a6 | 3242 | #include "confdefs.h" |
75e93faa ZW |
3243 | #ifdef HAVE_LIMITS_H |
3244 | #include <limits.h> | |
3245 | #endif | |
3246 | #ifdef CHAR_BIT | |
3247 | found | |
3248 | #endif | |
093e61a6 | 3249 | EOF |
75e93faa | 3250 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3251 | egrep "found" >/dev/null 2>&1; then |
3252 | rm -rf conftest* | |
75e93faa ZW |
3253 | gcc_cv_decl_char_bit=yes |
3254 | else | |
093e61a6 | 3255 | rm -rf conftest* |
75e93faa ZW |
3256 | gcc_cv_decl_char_bit=no |
3257 | fi | |
3258 | rm -f conftest* | |
3259 | ||
3260 | ||
3261 | fi | |
093e61a6 RS |
3262 | |
3263 | echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 | |
75e93faa | 3264 | if test $gcc_cv_decl_char_bit = no; then |
093e61a6 | 3265 | echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 |
2c4902b9 | 3266 | echo "configure:3267: checking number of bits in a byte" >&5 |
093e61a6 RS |
3267 | if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then |
3268 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa ZW |
3269 | else |
3270 | i=8 | |
3271 | gcc_cv_c_nbby= | |
3272 | while test $i -lt 65; do | |
093e61a6 | 3273 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3274 | #line 3275 "configure" |
093e61a6 | 3275 | #include "confdefs.h" |
75e93faa | 3276 | |
093e61a6 | 3277 | int main() { |
4e70264f ZW |
3278 | switch(0) { |
3279 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
3280 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
3281 | ; } | |
093e61a6 RS |
3282 | ; return 0; } |
3283 | EOF | |
2c4902b9 | 3284 | if { (eval echo configure:3285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3285 | rm -rf conftest* |
4e70264f | 3286 | gcc_cv_c_nbby=$i; break |
75e93faa | 3287 | else |
093e61a6 RS |
3288 | echo "configure: failed program was:" >&5 |
3289 | cat conftest.$ac_ext >&5 | |
75e93faa | 3290 | fi |
093e61a6 | 3291 | rm -f conftest* |
75e93faa ZW |
3292 | i=`expr $i + 1` |
3293 | done | |
3294 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
3295 | ||
3296 | fi | |
093e61a6 RS |
3297 | |
3298 | echo "$ac_t""$gcc_cv_c_nbby" 1>&6 | |
75e93faa | 3299 | if test $gcc_cv_c_nbby = failed; then |
093e61a6 | 3300 | { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; } |
75e93faa | 3301 | else |
093e61a6 | 3302 | cat >> confdefs.h <<EOF |
75e93faa | 3303 | #define CHAR_BIT $gcc_cv_c_nbby |
093e61a6 | 3304 | EOF |
75e93faa ZW |
3305 | |
3306 | fi | |
3307 | fi | |
093e61a6 | 3308 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
2c4902b9 | 3309 | echo "configure:3310: checking whether byte ordering is bigendian" >&5 |
093e61a6 RS |
3310 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
3311 | echo $ac_n "(cached) $ac_c" 1>&6 | |
84c041a1 | 3312 | else |
4977bab6 ZW |
3313 | ac_cv_c_bigendian=unknown |
3314 | # See if sys/param.h defines the BYTE_ORDER macro. | |
093e61a6 | 3315 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3316 | #line 3317 "configure" |
093e61a6 | 3317 | #include "confdefs.h" |
4977bab6 ZW |
3318 | #include <sys/types.h> |
3319 | #include <sys/param.h> | |
093e61a6 | 3320 | int main() { |
2d6eb5bf | 3321 | |
4977bab6 ZW |
3322 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
3323 | bogus endian macros | |
84c041a1 | 3324 | #endif |
093e61a6 RS |
3325 | ; return 0; } |
3326 | EOF | |
2c4902b9 | 3327 | if { (eval echo configure:3328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3328 | rm -rf conftest* |
4977bab6 | 3329 | # It does; now see whether it defined to BIG_ENDIAN or not. |
093e61a6 | 3330 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3331 | #line 3332 "configure" |
093e61a6 | 3332 | #include "confdefs.h" |
4977bab6 ZW |
3333 | #include <sys/types.h> |
3334 | #include <sys/param.h> | |
093e61a6 | 3335 | int main() { |
4977bab6 ZW |
3336 | |
3337 | #if BYTE_ORDER != BIG_ENDIAN | |
3338 | not big endian | |
84c041a1 | 3339 | #endif |
093e61a6 RS |
3340 | ; return 0; } |
3341 | EOF | |
2c4902b9 | 3342 | if { (eval echo configure:3343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3343 | rm -rf conftest* |
4977bab6 ZW |
3344 | ac_cv_c_bigendian=yes |
3345 | else | |
093e61a6 RS |
3346 | echo "configure: failed program was:" >&5 |
3347 | cat conftest.$ac_ext >&5 | |
3348 | rm -rf conftest* | |
3349 | ac_cv_c_bigendian=no | |
4977bab6 | 3350 | fi |
093e61a6 | 3351 | rm -f conftest* |
4977bab6 | 3352 | else |
093e61a6 RS |
3353 | echo "configure: failed program was:" >&5 |
3354 | cat conftest.$ac_ext >&5 | |
4977bab6 | 3355 | fi |
093e61a6 | 3356 | rm -f conftest* |
4977bab6 ZW |
3357 | if test $ac_cv_c_bigendian = unknown; then |
3358 | if test "$cross_compiling" = yes; then | |
093e61a6 RS |
3359 | echo $ac_n "cross-compiling... " 2>&6 |
3360 | else | |
3361 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 3362 | #line 3363 "configure" |
093e61a6 | 3363 | #include "confdefs.h" |
4977bab6 ZW |
3364 | main () { |
3365 | /* Are we little or big endian? From Harbison&Steele. */ | |
3366 | union | |
3367 | { | |
3368 | long l; | |
3369 | char c[sizeof (long)]; | |
3370 | } u; | |
3371 | u.l = 1; | |
3372 | exit (u.c[sizeof (long) - 1] == 1); | |
3373 | } | |
093e61a6 | 3374 | EOF |
2c4902b9 | 3375 | if { (eval echo configure:3376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 3376 | then |
4977bab6 ZW |
3377 | ac_cv_c_bigendian=no |
3378 | else | |
093e61a6 RS |
3379 | echo "configure: failed program was:" >&5 |
3380 | cat conftest.$ac_ext >&5 | |
3381 | rm -fr conftest* | |
3382 | ac_cv_c_bigendian=yes | |
4977bab6 | 3383 | fi |
093e61a6 | 3384 | rm -fr conftest* |
84c041a1 | 3385 | fi |
093e61a6 | 3386 | |
4977bab6 ZW |
3387 | fi |
3388 | fi | |
093e61a6 RS |
3389 | |
3390 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 | |
4977bab6 | 3391 | if test $ac_cv_c_bigendian = unknown; then |
093e61a6 | 3392 | echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 |
2c4902b9 | 3393 | echo "configure:3394: checking to probe for byte ordering" >&5 |
2d6eb5bf | 3394 | |
4977bab6 ZW |
3395 | cat >conftest.c <<EOF |
3396 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
3397 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
3398 | void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } | |
3399 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
3400 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
3401 | void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } | |
3402 | int main() { _ascii (); _ebcdic (); return 0; } | |
3403 | EOF | |
3404 | if test -f conftest.c ; then | |
3405 | if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then | |
3406 | if test `grep -l BIGenDianSyS conftest.o` ; then | |
3407 | echo $ac_n ' big endian probe OK, ' 1>&6 | |
3408 | ac_cv_c_bigendian=yes | |
3409 | fi | |
3410 | if test `grep -l LiTTleEnDian conftest.o` ; then | |
3411 | echo $ac_n ' little endian probe OK, ' 1>&6 | |
3412 | if test $ac_cv_c_bigendian = yes ; then | |
3413 | ac_cv_c_bigendian=unknown; | |
3414 | else | |
3415 | ac_cv_c_bigendian=no | |
3416 | fi | |
3417 | fi | |
3418 | echo $ac_n 'guessing bigendian ... ' >&6 | |
3419 | fi | |
3420 | fi | |
093e61a6 | 3421 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
84c041a1 | 3422 | fi |
4977bab6 | 3423 | if test $ac_cv_c_bigendian = yes; then |
093e61a6 | 3424 | cat >> confdefs.h <<\EOF |
4977bab6 | 3425 | #define WORDS_BIGENDIAN 1 |
093e61a6 | 3426 | EOF |
cafe096b | 3427 | |
093e61a6 | 3428 | cat >> confdefs.h <<\EOF |
84c041a1 | 3429 | #define HOST_WORDS_BIG_ENDIAN 1 |
093e61a6 | 3430 | EOF |
84c041a1 | 3431 | |
4977bab6 ZW |
3432 | BYTEORDER=4321 |
3433 | else | |
3434 | BYTEORDER=1234 | |
3435 | fi | |
093e61a6 | 3436 | cat >> confdefs.h <<EOF |
4977bab6 | 3437 | #define BYTEORDER $BYTEORDER |
093e61a6 | 3438 | EOF |
4977bab6 ZW |
3439 | |
3440 | if test $ac_cv_c_bigendian = unknown; then | |
093e61a6 | 3441 | { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; } |
84c041a1 ZW |
3442 | fi |
3443 | ||
75e93faa | 3444 | |
73458fb7 NN |
3445 | # -------- |
3446 | # UNSORTED | |
3447 | # -------- | |
1e608388 | 3448 | |
73458fb7 NN |
3449 | # Stage specific cflags for build. |
3450 | stage1_cflags= | |
3451 | case $build in | |
3452 | vax-*-*) | |
3453 | if test x$GCC = xyes | |
3454 | then | |
3455 | stage1_cflags="-Wa,-J" | |
3456 | else | |
3457 | stage1_cflags="-J" | |
3458 | fi | |
3459 | ;; | |
3460 | powerpc-*-darwin*) | |
3461 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
3462 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
3463 | # Apple's GCC has bugs in designated initializer handling, so disable | |
3464 | # that too. | |
3465 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
3466 | ;; | |
3467 | esac | |
1e608388 | 3468 | |
1e608388 | 3469 | |
4e70264f ZW |
3470 | # These libraries may be used by collect2. |
3471 | # We may need a special search path to get them linked. | |
093e61a6 | 3472 | echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 |
2c4902b9 | 3473 | echo "configure:3474: checking for collect2 libraries" >&5 |
093e61a6 RS |
3474 | if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then |
3475 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4e70264f ZW |
3476 | else |
3477 | save_LIBS="$LIBS" | |
7f2749d4 | 3478 | for libs in '' -lld -lmld \ |
4e70264f ZW |
3479 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
3480 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
3481 | do | |
3482 | LIBS="$libs" | |
093e61a6 | 3483 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3484 | #line 3485 "configure" |
093e61a6 | 3485 | #include "confdefs.h" |
4e70264f ZW |
3486 | /* Override any gcc2 internal prototype to avoid an error. */ |
3487 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3488 | builtin and then its argument prototype would still apply. */ |
3489 | char ldopen(); | |
3490 | ||
3491 | int main() { | |
3492 | ldopen() | |
3493 | ; return 0; } | |
3494 | EOF | |
2c4902b9 | 3495 | if { (eval echo configure:3496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3496 | rm -rf conftest* |
4e70264f ZW |
3497 | gcc_cv_collect2_libs="$libs"; break |
3498 | else | |
093e61a6 RS |
3499 | echo "configure: failed program was:" >&5 |
3500 | cat conftest.$ac_ext >&5 | |
4e70264f | 3501 | fi |
093e61a6 | 3502 | rm -f conftest* |
4e70264f ZW |
3503 | done |
3504 | LIBS="$save_LIBS" | |
3505 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
3506 | fi | |
093e61a6 RS |
3507 | |
3508 | echo "$ac_t""$gcc_cv_collect2_libs" 1>&6 | |
4e70264f ZW |
3509 | case $gcc_cv_collect2_libs in |
3510 | "none required") ;; | |
3511 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
3512 | esac | |
3513 | ||
3514 | ||
7f2749d4 RK |
3515 | # When building Ada code on Alpha, we need exc_resume which is usually in |
3516 | # -lexc. So test for it. | |
3517 | save_LIBS="$LIBS" | |
3518 | LIBS= | |
3519 | ||
093e61a6 | 3520 | echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6 |
2c4902b9 | 3521 | echo "configure:3522: checking for library containing exc_resume" >&5 |
093e61a6 RS |
3522 | if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then |
3523 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3524 | else | |
3525 | ac_func_search_save_LIBS="$LIBS" | |
3526 | ac_cv_search_exc_resume="no" | |
3527 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 3528 | #line 3529 "configure" |
093e61a6 | 3529 | #include "confdefs.h" |
7f2749d4 RK |
3530 | /* Override any gcc2 internal prototype to avoid an error. */ |
3531 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3532 | builtin and then its argument prototype would still apply. */ |
3533 | char exc_resume(); | |
3534 | ||
3535 | int main() { | |
3536 | exc_resume() | |
3537 | ; return 0; } | |
3538 | EOF | |
2c4902b9 | 3539 | if { (eval echo configure:3540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3540 | rm -rf conftest* |
7f2749d4 RK |
3541 | ac_cv_search_exc_resume="none required" |
3542 | else | |
093e61a6 RS |
3543 | echo "configure: failed program was:" >&5 |
3544 | cat conftest.$ac_ext >&5 | |
7f2749d4 | 3545 | fi |
093e61a6 RS |
3546 | rm -f conftest* |
3547 | test "$ac_cv_search_exc_resume" = "no" && for i in exc; do | |
3548 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3549 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 3550 | #line 3551 "configure" |
093e61a6 | 3551 | #include "confdefs.h" |
7f2749d4 RK |
3552 | /* Override any gcc2 internal prototype to avoid an error. */ |
3553 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3554 | builtin and then its argument prototype would still apply. */ |
3555 | char exc_resume(); | |
3556 | ||
3557 | int main() { | |
3558 | exc_resume() | |
3559 | ; return 0; } | |
3560 | EOF | |
2c4902b9 | 3561 | if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3562 | rm -rf conftest* |
3563 | ac_cv_search_exc_resume="-l$i" | |
7f2749d4 RK |
3564 | break |
3565 | else | |
093e61a6 RS |
3566 | echo "configure: failed program was:" >&5 |
3567 | cat conftest.$ac_ext >&5 | |
7f2749d4 | 3568 | fi |
093e61a6 RS |
3569 | rm -f conftest* |
3570 | done | |
3571 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 3572 | fi |
cafe096b | 3573 | |
093e61a6 RS |
3574 | echo "$ac_t""$ac_cv_search_exc_resume" 1>&6 |
3575 | if test "$ac_cv_search_exc_resume" != "no"; then | |
3576 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" | |
3577 | ||
3578 | else : | |
3579 | ||
7f2749d4 RK |
3580 | fi |
3581 | GNAT_LIBEXC="$LIBS" | |
3582 | LIBS="$save_LIBS" | |
3583 | ||
3584 | ||
62c9aa5f ZW |
3585 | # Some systems put ldexp and frexp in libm instead of libc; assume |
3586 | # they're both in the same place. jcf-dump needs them. | |
3587 | save_LIBS="$LIBS" | |
3588 | LIBS= | |
3589 | ||
093e61a6 | 3590 | echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6 |
2c4902b9 | 3591 | echo "configure:3592: checking for library containing ldexp" >&5 |
093e61a6 RS |
3592 | if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then |
3593 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3594 | else | |
3595 | ac_func_search_save_LIBS="$LIBS" | |
3596 | ac_cv_search_ldexp="no" | |
3597 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 3598 | #line 3599 "configure" |
093e61a6 | 3599 | #include "confdefs.h" |
62c9aa5f ZW |
3600 | /* Override any gcc2 internal prototype to avoid an error. */ |
3601 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3602 | builtin and then its argument prototype would still apply. */ |
3603 | char ldexp(); | |
3604 | ||
3605 | int main() { | |
3606 | ldexp() | |
3607 | ; return 0; } | |
3608 | EOF | |
2c4902b9 | 3609 | if { (eval echo configure:3610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3610 | rm -rf conftest* |
62c9aa5f ZW |
3611 | ac_cv_search_ldexp="none required" |
3612 | else | |
093e61a6 RS |
3613 | echo "configure: failed program was:" >&5 |
3614 | cat conftest.$ac_ext >&5 | |
62c9aa5f | 3615 | fi |
093e61a6 RS |
3616 | rm -f conftest* |
3617 | test "$ac_cv_search_ldexp" = "no" && for i in m; do | |
3618 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3619 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 3620 | #line 3621 "configure" |
093e61a6 | 3621 | #include "confdefs.h" |
62c9aa5f ZW |
3622 | /* Override any gcc2 internal prototype to avoid an error. */ |
3623 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3624 | builtin and then its argument prototype would still apply. */ |
3625 | char ldexp(); | |
3626 | ||
3627 | int main() { | |
3628 | ldexp() | |
3629 | ; return 0; } | |
3630 | EOF | |
2c4902b9 | 3631 | if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3632 | rm -rf conftest* |
3633 | ac_cv_search_ldexp="-l$i" | |
62c9aa5f ZW |
3634 | break |
3635 | else | |
093e61a6 RS |
3636 | echo "configure: failed program was:" >&5 |
3637 | cat conftest.$ac_ext >&5 | |
62c9aa5f | 3638 | fi |
093e61a6 RS |
3639 | rm -f conftest* |
3640 | done | |
3641 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 3642 | fi |
cafe096b | 3643 | |
093e61a6 RS |
3644 | echo "$ac_t""$ac_cv_search_ldexp" 1>&6 |
3645 | if test "$ac_cv_search_ldexp" != "no"; then | |
3646 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" | |
3647 | ||
3648 | else : | |
3649 | ||
62c9aa5f ZW |
3650 | fi |
3651 | LDEXP_LIB="$LIBS" | |
3652 | LIBS="$save_LIBS" | |
3653 | ||
3654 | ||
956d6950 JL |
3655 | # Use <inttypes.h> only if it exists, |
3656 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
093e61a6 | 3657 | echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 |
2c4902b9 | 3658 | echo "configure:3659: checking for inttypes.h" >&5 |
093e61a6 RS |
3659 | if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then |
3660 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3661 | else | |
3662 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 3663 | #line 3664 "configure" |
093e61a6 | 3664 | #include "confdefs.h" |
956d6950 JL |
3665 | #include <sys/types.h> |
3666 | #include <inttypes.h> | |
093e61a6 | 3667 | int main() { |
956d6950 | 3668 | intmax_t i = -1; |
093e61a6 RS |
3669 | ; return 0; } |
3670 | EOF | |
2c4902b9 | 3671 | if { (eval echo configure:3672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3672 | rm -rf conftest* |
0056a9b5 | 3673 | gcc_cv_header_inttypes_h=yes |
956d6950 | 3674 | else |
093e61a6 RS |
3675 | echo "configure: failed program was:" >&5 |
3676 | cat conftest.$ac_ext >&5 | |
3677 | rm -rf conftest* | |
3678 | gcc_cv_header_inttypes_h=no | |
956d6950 | 3679 | fi |
093e61a6 | 3680 | rm -f conftest* |
956d6950 JL |
3681 | fi |
3682 | ||
093e61a6 | 3683 | echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 |
0056a9b5 | 3684 | if test $gcc_cv_header_inttypes_h = yes; then |
093e61a6 | 3685 | cat >> confdefs.h <<\EOF |
0056a9b5 | 3686 | #define HAVE_INTTYPES_H 1 |
093e61a6 | 3687 | EOF |
0056a9b5 KG |
3688 | |
3689 | fi | |
956d6950 | 3690 | |
c149cc37 | 3691 | |
6af8c740 KG |
3692 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
3693 | sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ | |
4e87a651 | 3694 | fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \ |
56694dd9 ZW |
3695 | scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \ |
3696 | setlocale | |
956d6950 | 3697 | do |
093e61a6 | 3698 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
2c4902b9 | 3699 | echo "configure:3700: checking for $ac_func" >&5 |
093e61a6 RS |
3700 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3701 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3702 | else | |
3703 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 3704 | #line 3705 "configure" |
093e61a6 | 3705 | #include "confdefs.h" |
956d6950 | 3706 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
3707 | which can conflict with char $ac_func(); below. */ |
3708 | #include <assert.h> | |
956d6950 JL |
3709 | /* Override any gcc2 internal prototype to avoid an error. */ |
3710 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3711 | builtin and then its argument prototype would still apply. */ |
3712 | char $ac_func(); | |
3713 | ||
3714 | int main() { | |
3715 | ||
956d6950 JL |
3716 | /* The GNU C library defines this for functions which it implements |
3717 | to always fail with ENOSYS. Some functions are actually named | |
3718 | something starting with __ and the normal name is an alias. */ | |
3719 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3720 | choke me | |
3721 | #else | |
093e61a6 | 3722 | $ac_func(); |
956d6950 JL |
3723 | #endif |
3724 | ||
093e61a6 RS |
3725 | ; return 0; } |
3726 | EOF | |
2c4902b9 | 3727 | if { (eval echo configure:3728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3728 | rm -rf conftest* |
3729 | eval "ac_cv_func_$ac_func=yes" | |
3730 | else | |
3731 | echo "configure: failed program was:" >&5 | |
3732 | cat conftest.$ac_ext >&5 | |
3733 | rm -rf conftest* | |
3734 | eval "ac_cv_func_$ac_func=no" | |
3735 | fi | |
3736 | rm -f conftest* | |
3737 | fi | |
956d6950 | 3738 | |
093e61a6 RS |
3739 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3740 | echo "$ac_t""yes" 1>&6 | |
3741 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3742 | cat >> confdefs.h <<EOF | |
3743 | #define $ac_tr_func 1 | |
3744 | EOF | |
3745 | ||
3746 | else | |
3747 | echo "$ac_t""no" 1>&6 | |
956d6950 JL |
3748 | fi |
3749 | done | |
3750 | ||
6885fc87 | 3751 | |
39f6c4c8 | 3752 | if test x$ac_cv_func_mbstowcs = xyes; then |
093e61a6 | 3753 | echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6 |
2c4902b9 | 3754 | echo "configure:3755: checking whether mbstowcs works" >&5 |
093e61a6 RS |
3755 | if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then |
3756 | echo $ac_n "(cached) $ac_c" 1>&6 | |
39f6c4c8 KW |
3757 | else |
3758 | if test "$cross_compiling" = yes; then | |
3759 | gcc_cv_func_mbstowcs_works=yes | |
3760 | else | |
093e61a6 | 3761 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3762 | #line 3763 "configure" |
093e61a6 | 3763 | #include "confdefs.h" |
39f6c4c8 KW |
3764 | #include <stdlib.h> |
3765 | int main() | |
3766 | { | |
3767 | mbstowcs(0, "", 0); | |
3768 | return 0; | |
3769 | } | |
093e61a6 | 3770 | EOF |
2c4902b9 | 3771 | if { (eval echo configure:3772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 3772 | then |
39f6c4c8 KW |
3773 | gcc_cv_func_mbstowcs_works=yes |
3774 | else | |
093e61a6 RS |
3775 | echo "configure: failed program was:" >&5 |
3776 | cat conftest.$ac_ext >&5 | |
3777 | rm -fr conftest* | |
3778 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 3779 | fi |
093e61a6 | 3780 | rm -fr conftest* |
39f6c4c8 | 3781 | fi |
093e61a6 | 3782 | |
39f6c4c8 | 3783 | fi |
cafe096b | 3784 | |
093e61a6 RS |
3785 | echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6 |
3786 | if test x$gcc_cv_func_mbstowcs_works = xyes; then | |
3787 | cat >> confdefs.h <<\EOF | |
39f6c4c8 | 3788 | #define HAVE_WORKING_MBSTOWCS 1 |
093e61a6 | 3789 | EOF |
39f6c4c8 KW |
3790 | |
3791 | fi | |
3792 | fi | |
3793 | ||
093e61a6 | 3794 | echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
2c4902b9 | 3795 | echo "configure:3796: checking for ssize_t" >&5 |
093e61a6 RS |
3796 | if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
3797 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f12bc141 | 3798 | else |
093e61a6 | 3799 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3800 | #line 3801 "configure" |
093e61a6 RS |
3801 | #include "confdefs.h" |
3802 | #include <sys/types.h> | |
3803 | #if STDC_HEADERS | |
3804 | #include <stdlib.h> | |
3805 | #include <stddef.h> | |
3806 | #endif | |
3807 | EOF | |
3808 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3809 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3810 | rm -rf conftest* | |
cb65112a | 3811 | ac_cv_type_ssize_t=yes |
f12bc141 | 3812 | else |
093e61a6 RS |
3813 | rm -rf conftest* |
3814 | ac_cv_type_ssize_t=no | |
f12bc141 | 3815 | fi |
093e61a6 | 3816 | rm -f conftest* |
cafe096b | 3817 | |
093e61a6 RS |
3818 | fi |
3819 | echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 | |
3820 | if test $ac_cv_type_ssize_t = no; then | |
3821 | cat >> confdefs.h <<\EOF | |
f12bc141 | 3822 | #define ssize_t int |
093e61a6 | 3823 | EOF |
f12bc141 ZW |
3824 | |
3825 | fi | |
3826 | ||
0b9d02c6 | 3827 | |
e256b8b6 DA |
3828 | # Try to determine the array type of the second argument of getgroups |
3829 | # for the target system (int or gid_t). | |
093e61a6 | 3830 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
2c4902b9 | 3831 | echo "configure:3832: checking for uid_t in sys/types.h" >&5 |
093e61a6 RS |
3832 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
3833 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3834 | else | |
3835 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 3836 | #line 3837 "configure" |
093e61a6 | 3837 | #include "confdefs.h" |
e256b8b6 | 3838 | #include <sys/types.h> |
093e61a6 | 3839 | EOF |
e256b8b6 | 3840 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3841 | egrep "uid_t" >/dev/null 2>&1; then |
3842 | rm -rf conftest* | |
e256b8b6 DA |
3843 | ac_cv_type_uid_t=yes |
3844 | else | |
093e61a6 | 3845 | rm -rf conftest* |
e256b8b6 DA |
3846 | ac_cv_type_uid_t=no |
3847 | fi | |
3848 | rm -f conftest* | |
3849 | ||
3850 | fi | |
cafe096b | 3851 | |
093e61a6 RS |
3852 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
3853 | if test $ac_cv_type_uid_t = no; then | |
3854 | cat >> confdefs.h <<\EOF | |
e256b8b6 | 3855 | #define uid_t int |
093e61a6 | 3856 | EOF |
cafe096b | 3857 | |
093e61a6 | 3858 | cat >> confdefs.h <<\EOF |
e256b8b6 | 3859 | #define gid_t int |
093e61a6 | 3860 | EOF |
e256b8b6 DA |
3861 | |
3862 | fi | |
3863 | ||
093e61a6 | 3864 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 |
2c4902b9 | 3865 | echo "configure:3866: checking type of array argument to getgroups" >&5 |
093e61a6 RS |
3866 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
3867 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e256b8b6 DA |
3868 | else |
3869 | if test "$cross_compiling" = yes; then | |
3870 | ac_cv_type_getgroups=cross | |
3871 | else | |
093e61a6 | 3872 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3873 | #line 3874 "configure" |
093e61a6 RS |
3874 | #include "confdefs.h" |
3875 | ||
e256b8b6 DA |
3876 | /* Thanks to Mike Rendell for this test. */ |
3877 | #include <sys/types.h> | |
3878 | #define NGID 256 | |
3879 | #undef MAX | |
3880 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
093e61a6 | 3881 | main() |
e256b8b6 DA |
3882 | { |
3883 | gid_t gidset[NGID]; | |
3884 | int i, n; | |
3885 | union { gid_t gval; long lval; } val; | |
3886 | ||
3887 | val.lval = -1; | |
3888 | for (i = 0; i < NGID; i++) | |
3889 | gidset[i] = val.gval; | |
3890 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
3891 | gidset); | |
3892 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
3893 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
3894 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
3895 | } | |
cafe096b | 3896 | |
093e61a6 | 3897 | EOF |
2c4902b9 | 3898 | if { (eval echo configure:3899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 RS |
3899 | then |
3900 | ac_cv_type_getgroups=gid_t | |
3901 | else | |
3902 | echo "configure: failed program was:" >&5 | |
3903 | cat conftest.$ac_ext >&5 | |
3904 | rm -fr conftest* | |
3905 | ac_cv_type_getgroups=int | |
e256b8b6 | 3906 | fi |
093e61a6 | 3907 | rm -fr conftest* |
e256b8b6 | 3908 | fi |
093e61a6 | 3909 | |
e256b8b6 | 3910 | if test $ac_cv_type_getgroups = cross; then |
093e61a6 | 3911 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3912 | #line 3913 "configure" |
093e61a6 | 3913 | #include "confdefs.h" |
e256b8b6 | 3914 | #include <unistd.h> |
093e61a6 | 3915 | EOF |
e256b8b6 | 3916 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3917 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
3918 | rm -rf conftest* | |
e256b8b6 DA |
3919 | ac_cv_type_getgroups=gid_t |
3920 | else | |
093e61a6 | 3921 | rm -rf conftest* |
e256b8b6 DA |
3922 | ac_cv_type_getgroups=int |
3923 | fi | |
3924 | rm -f conftest* | |
3925 | ||
3926 | fi | |
3927 | fi | |
3928 | ||
093e61a6 RS |
3929 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 |
3930 | cat >> confdefs.h <<EOF | |
e256b8b6 | 3931 | #define GETGROUPS_T $ac_cv_type_getgroups |
093e61a6 | 3932 | EOF |
e256b8b6 DA |
3933 | |
3934 | ||
3935 | if test "${target}" = "${build}"; then | |
3936 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
3937 | else | |
3938 | case "${target}" in | |
3939 | # This condition may need some tweaking. It should include all | |
3940 | # targets where the array type of the second argument of getgroups | |
3941 | # is int and the type of gid_t is not equivalent to int. | |
3942 | *-*-sunos* | *-*-ultrix*) | |
3943 | TARGET_GETGROUPS_T=int | |
3944 | ;; | |
3945 | *) | |
3946 | TARGET_GETGROUPS_T=gid_t | |
3947 | ;; | |
3948 | esac | |
3949 | fi | |
3950 | ||
3951 | ||
093e61a6 | 3952 | echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 |
2c4902b9 | 3953 | echo "configure:3954: checking whether the printf functions support %p" >&5 |
093e61a6 RS |
3954 | if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then |
3955 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
3956 | else |
3957 | if test "$cross_compiling" = yes; then | |
3958 | gcc_cv_func_printf_ptr=no | |
3959 | else | |
093e61a6 | 3960 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 3961 | #line 3962 "configure" |
093e61a6 | 3962 | #include "confdefs.h" |
0a4b6309 RL |
3963 | #include <stdio.h> |
3964 | ||
86cf1cbd | 3965 | int main() |
0a4b6309 RL |
3966 | { |
3967 | char buf[64]; | |
3968 | char *p = buf, *q = NULL; | |
3969 | sprintf(buf, "%p", p); | |
3970 | sscanf(buf, "%p", &q); | |
86cf1cbd | 3971 | return (p != q); |
0a4b6309 | 3972 | } |
093e61a6 | 3973 | EOF |
2c4902b9 | 3974 | if { (eval echo configure:3975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 3975 | then |
0a4b6309 RL |
3976 | gcc_cv_func_printf_ptr=yes |
3977 | else | |
093e61a6 RS |
3978 | echo "configure: failed program was:" >&5 |
3979 | cat conftest.$ac_ext >&5 | |
3980 | rm -fr conftest* | |
3981 | gcc_cv_func_printf_ptr=no | |
0a4b6309 | 3982 | fi |
093e61a6 | 3983 | rm -fr conftest* |
0a4b6309 | 3984 | fi |
093e61a6 | 3985 | |
0a4b6309 RL |
3986 | rm -f core core.* *.core |
3987 | fi | |
cafe096b | 3988 | |
093e61a6 RS |
3989 | echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6 |
3990 | if test $gcc_cv_func_printf_ptr = yes ; then | |
3991 | cat >> confdefs.h <<\EOF | |
0a4b6309 | 3992 | #define HAVE_PRINTF_PTR 1 |
093e61a6 | 3993 | EOF |
0a4b6309 RL |
3994 | |
3995 | fi | |
3996 | ||
1072ec3f ZW |
3997 | if test $ac_cv_header_sys_mman_h != yes \ |
3998 | || test $ac_cv_func_mmap != yes; then | |
3999 | gcc_cv_func_mmap_file=no | |
4000 | gcc_cv_func_mmap_dev_zero=no | |
4001 | gcc_cv_func_mmap_anon=no | |
4002 | else | |
4003 | echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6 | |
2c4902b9 | 4004 | echo "configure:4005: checking whether read-only mmap of a plain file works" >&5 |
1072ec3f ZW |
4005 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_file'+set}'`\" = set"; then |
4006 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4007 | else | |
4008 | # Add a system to this blacklist if | |
4009 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a | |
4010 | # memory area containing the same data that you'd get if you applied | |
4011 | # read() to the same fd. The only system known to have a problem here | |
4012 | # is VMS, where text files have record structure. | |
4013 | case "$host_os" in | |
e31f8eda | 4014 | vms* | ultrix*) |
1072ec3f ZW |
4015 | gcc_cv_func_mmap_file=no ;; |
4016 | *) | |
4017 | gcc_cv_func_mmap_file=yes;; | |
4018 | esac | |
4019 | fi | |
4020 | ||
4021 | echo "$ac_t""$gcc_cv_func_mmap_file" 1>&6 | |
4022 | echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6 | |
2c4902b9 | 4023 | echo "configure:4024: checking whether mmap from /dev/zero works" >&5 |
1072ec3f ZW |
4024 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_dev_zero'+set}'`\" = set"; then |
4025 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4026 | else | |
4027 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
4028 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
4029 | # zeroed pages with both the following properties: | |
4030 | # 1. If you map N consecutive pages in with one call, and then | |
4031 | # unmap any subset of those pages, the pages that were not | |
4032 | # explicitly unmapped remain accessible. | |
4033 | # 2. If you map two adjacent blocks of memory and then unmap them | |
4034 | # both at once, they must both go away. | |
4035 | # Systems known to be in this category are Windows (all variants), | |
4036 | # VMS, and Darwin. | |
4037 | case "$host_os" in | |
2ce240d3 | 4038 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
4039 | gcc_cv_func_mmap_dev_zero=no ;; |
4040 | *) | |
4041 | gcc_cv_func_mmap_dev_zero=yes;; | |
4042 | esac | |
4043 | fi | |
4044 | ||
4045 | echo "$ac_t""$gcc_cv_func_mmap_dev_zero" 1>&6 | |
4046 | ||
4047 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
4048 | echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6 | |
2c4902b9 | 4049 | echo "configure:4050: checking for MAP_ANON(YMOUS)" >&5 |
1072ec3f ZW |
4050 | if eval "test \"`echo '$''{'gcc_cv_decl_map_anon'+set}'`\" = set"; then |
4051 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4052 | else | |
4053 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 4054 | #line 4055 "configure" |
1072ec3f ZW |
4055 | #include "confdefs.h" |
4056 | #include <sys/types.h> | |
4057 | #include <sys/mman.h> | |
4058 | #include <unistd.h> | |
4059 | ||
4060 | #ifndef MAP_ANONYMOUS | |
4061 | #define MAP_ANONYMOUS MAP_ANON | |
4062 | #endif | |
4063 | ||
4064 | int main() { | |
4065 | int n = MAP_ANONYMOUS; | |
4066 | ; return 0; } | |
4067 | EOF | |
2c4902b9 | 4068 | if { (eval echo configure:4069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
1072ec3f ZW |
4069 | rm -rf conftest* |
4070 | gcc_cv_decl_map_anon=yes | |
4071 | else | |
4072 | echo "configure: failed program was:" >&5 | |
4073 | cat conftest.$ac_ext >&5 | |
4074 | rm -rf conftest* | |
4075 | gcc_cv_decl_map_anon=no | |
4076 | fi | |
4077 | rm -f conftest* | |
4078 | fi | |
4079 | ||
4080 | echo "$ac_t""$gcc_cv_decl_map_anon" 1>&6 | |
4081 | ||
4082 | if test $gcc_cv_decl_map_anon = no; then | |
4083 | gcc_cv_func_mmap_anon=no | |
4084 | else | |
4085 | echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6 | |
2c4902b9 | 4086 | echo "configure:4087: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
1072ec3f ZW |
4087 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_anon'+set}'`\" = set"; then |
4088 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4089 | else | |
4090 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
4091 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
4092 | # doesn't give anonymous zeroed pages with the same properties listed | |
4093 | # above for use of /dev/zero. | |
4094 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
4095 | case "$host_os" in | |
4096 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
4097 | gcc_cv_func_mmap_anon=no ;; | |
4098 | *) | |
4099 | gcc_cv_func_mmap_anon=yes;; | |
4100 | esac | |
4101 | fi | |
4102 | ||
4103 | echo "$ac_t""$gcc_cv_func_mmap_anon" 1>&6 | |
4104 | fi | |
4105 | fi | |
4106 | ||
4107 | if test $gcc_cv_func_mmap_file = yes; then | |
4108 | cat >> confdefs.h <<\EOF | |
4109 | #define HAVE_MMAP_FILE 1 | |
4110 | EOF | |
4111 | ||
4112 | fi | |
4113 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
4114 | cat >> confdefs.h <<\EOF | |
4115 | #define HAVE_MMAP_DEV_ZERO 1 | |
4116 | EOF | |
4117 | ||
4118 | fi | |
4119 | if test $gcc_cv_func_mmap_anon = yes; then | |
4120 | cat >> confdefs.h <<\EOF | |
4121 | #define HAVE_MMAP_ANON 1 | |
4122 | EOF | |
4123 | ||
4124 | fi | |
4125 | ||
b27d2bd5 MK |
4126 | |
4127 | case "${host}" in | |
ee262b6f | 4128 | *-*-*vms*) |
2c55543b | 4129 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
4130 | # won't work, and it isn't easily adaptable. It makes more sense to |
4131 | # just force it. | |
4132 | ac_cv_func_vfork_works=yes | |
4133 | ;; | |
b27d2bd5 | 4134 | esac |
093e61a6 | 4135 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
2c4902b9 | 4136 | echo "configure:4137: checking for pid_t" >&5 |
093e61a6 RS |
4137 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
4138 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4139 | else | |
4140 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 4141 | #line 4142 "configure" |
093e61a6 RS |
4142 | #include "confdefs.h" |
4143 | #include <sys/types.h> | |
4144 | #if STDC_HEADERS | |
4145 | #include <stdlib.h> | |
4146 | #include <stddef.h> | |
4147 | #endif | |
4148 | EOF | |
4149 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4150 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
4151 | rm -rf conftest* | |
cb65112a | 4152 | ac_cv_type_pid_t=yes |
c375c43b | 4153 | else |
093e61a6 RS |
4154 | rm -rf conftest* |
4155 | ac_cv_type_pid_t=no | |
c375c43b | 4156 | fi |
093e61a6 | 4157 | rm -f conftest* |
cafe096b | 4158 | |
093e61a6 RS |
4159 | fi |
4160 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 | |
4161 | if test $ac_cv_type_pid_t = no; then | |
4162 | cat >> confdefs.h <<\EOF | |
c375c43b | 4163 | #define pid_t int |
093e61a6 | 4164 | EOF |
c375c43b KG |
4165 | |
4166 | fi | |
4167 | ||
093e61a6 RS |
4168 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
4169 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
2c4902b9 | 4170 | echo "configure:4171: checking for vfork.h" >&5 |
093e61a6 RS |
4171 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4172 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cafe096b | 4173 | else |
093e61a6 | 4174 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 4175 | #line 4176 "configure" |
093e61a6 RS |
4176 | #include "confdefs.h" |
4177 | #include <vfork.h> | |
4178 | EOF | |
4179 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2c4902b9 | 4180 | { (eval echo configure:4181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
4181 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4182 | if test -z "$ac_err"; then | |
4183 | rm -rf conftest* | |
4184 | eval "ac_cv_header_$ac_safe=yes" | |
4185 | else | |
4186 | echo "$ac_err" >&5 | |
4187 | echo "configure: failed program was:" >&5 | |
4188 | cat conftest.$ac_ext >&5 | |
4189 | rm -rf conftest* | |
4190 | eval "ac_cv_header_$ac_safe=no" | |
c375c43b | 4191 | fi |
093e61a6 | 4192 | rm -f conftest* |
c375c43b | 4193 | fi |
093e61a6 RS |
4194 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
4195 | echo "$ac_t""yes" 1>&6 | |
4196 | cat >> confdefs.h <<\EOF | |
4197 | #define HAVE_VFORK_H 1 | |
4198 | EOF | |
c375c43b | 4199 | |
093e61a6 RS |
4200 | else |
4201 | echo "$ac_t""no" 1>&6 | |
c375c43b KG |
4202 | fi |
4203 | ||
093e61a6 | 4204 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
2c4902b9 | 4205 | echo "configure:4206: checking for working vfork" >&5 |
093e61a6 RS |
4206 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
4207 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4208 | else | |
4209 | if test "$cross_compiling" = yes; then | |
4210 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
2c4902b9 | 4211 | echo "configure:4212: checking for vfork" >&5 |
093e61a6 RS |
4212 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
4213 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4214 | else | |
4215 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 4216 | #line 4217 "configure" |
093e61a6 | 4217 | #include "confdefs.h" |
c375c43b | 4218 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
4219 | which can conflict with char vfork(); below. */ |
4220 | #include <assert.h> | |
c375c43b KG |
4221 | /* Override any gcc2 internal prototype to avoid an error. */ |
4222 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
4223 | builtin and then its argument prototype would still apply. */ |
4224 | char vfork(); | |
4225 | ||
4226 | int main() { | |
4227 | ||
c375c43b KG |
4228 | /* The GNU C library defines this for functions which it implements |
4229 | to always fail with ENOSYS. Some functions are actually named | |
4230 | something starting with __ and the normal name is an alias. */ | |
093e61a6 | 4231 | #if defined (__stub_vfork) || defined (__stub___vfork) |
c375c43b KG |
4232 | choke me |
4233 | #else | |
093e61a6 | 4234 | vfork(); |
c375c43b KG |
4235 | #endif |
4236 | ||
093e61a6 RS |
4237 | ; return 0; } |
4238 | EOF | |
2c4902b9 | 4239 | if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
4240 | rm -rf conftest* |
4241 | eval "ac_cv_func_vfork=yes" | |
4242 | else | |
4243 | echo "configure: failed program was:" >&5 | |
4244 | cat conftest.$ac_ext >&5 | |
4245 | rm -rf conftest* | |
4246 | eval "ac_cv_func_vfork=no" | |
4247 | fi | |
4248 | rm -f conftest* | |
c375c43b KG |
4249 | fi |
4250 | ||
093e61a6 RS |
4251 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
4252 | echo "$ac_t""yes" 1>&6 | |
4253 | : | |
c375c43b | 4254 | else |
093e61a6 | 4255 | echo "$ac_t""no" 1>&6 |
c375c43b | 4256 | fi |
093e61a6 | 4257 | |
c375c43b KG |
4258 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
4259 | else | |
093e61a6 | 4260 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 4261 | #line 4262 "configure" |
093e61a6 | 4262 | #include "confdefs.h" |
c375c43b KG |
4263 | /* Thanks to Paul Eggert for this test. */ |
4264 | #include <stdio.h> | |
4265 | #include <sys/types.h> | |
4266 | #include <sys/stat.h> | |
093e61a6 RS |
4267 | #ifdef HAVE_UNISTD_H |
4268 | #include <unistd.h> | |
c375c43b | 4269 | #endif |
093e61a6 RS |
4270 | #ifdef HAVE_VFORK_H |
4271 | #include <vfork.h> | |
c375c43b KG |
4272 | #endif |
4273 | /* On some sparc systems, changes by the child to local and incoming | |
093e61a6 RS |
4274 | argument registers are propagated back to the parent. |
4275 | The compiler is told about this with #include <vfork.h>, | |
4276 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
4277 | Test for this by using a static variable whose address | |
4278 | is put into a register that is clobbered by the vfork. */ | |
4279 | static | |
c375c43b KG |
4280 | #ifdef __cplusplus |
4281 | sparc_address_test (int arg) | |
093e61a6 | 4282 | #else |
c375c43b KG |
4283 | sparc_address_test (arg) int arg; |
4284 | #endif | |
4285 | { | |
4286 | static pid_t child; | |
4287 | if (!child) { | |
4288 | child = vfork (); | |
4289 | if (child < 0) { | |
4290 | perror ("vfork"); | |
4291 | _exit(2); | |
4292 | } | |
4293 | if (!child) { | |
4294 | arg = getpid(); | |
4295 | write(-1, "", 0); | |
4296 | _exit (arg); | |
4297 | } | |
4298 | } | |
4299 | } | |
093e61a6 | 4300 | main() { |
c375c43b KG |
4301 | pid_t parent = getpid (); |
4302 | pid_t child; | |
4303 | ||
093e61a6 | 4304 | sparc_address_test (); |
c375c43b KG |
4305 | |
4306 | child = vfork (); | |
4307 | ||
4308 | if (child == 0) { | |
093e61a6 RS |
4309 | /* Here is another test for sparc vfork register problems. |
4310 | This test uses lots of local variables, at least | |
4311 | as many local variables as main has allocated so far | |
4312 | including compiler temporaries. 4 locals are enough for | |
4313 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
4314 | A buggy compiler should reuse the register of parent | |
4315 | for one of the local variables, since it will think that | |
4316 | parent can't possibly be used any more in this routine. | |
4317 | Assigning to the local variable will thus munge parent | |
4318 | in the parent process. */ | |
c375c43b KG |
4319 | pid_t |
4320 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
4321 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
4322 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
4323 | use the same hardware register for all 8 local variables. */ | |
4324 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
4325 | || p != p5 || p != p6 || p != p7) | |
4326 | _exit(1); | |
4327 | ||
093e61a6 RS |
4328 | /* On some systems (e.g. IRIX 3.3), |
4329 | vfork doesn't separate parent from child file descriptors. | |
4330 | If the child closes a descriptor before it execs or exits, | |
4331 | this munges the parent's descriptor as well. | |
4332 | Test for this by closing stdout in the child. */ | |
c375c43b KG |
4333 | _exit(close(fileno(stdout)) != 0); |
4334 | } else { | |
4335 | int status; | |
4336 | struct stat st; | |
4337 | ||
4338 | while (wait(&status) != child) | |
4339 | ; | |
4340 | exit( | |
4341 | /* Was there some problem with vforking? */ | |
4342 | child < 0 | |
4343 | ||
4344 | /* Did the child fail? (This shouldn't happen.) */ | |
4345 | || status | |
4346 | ||
4347 | /* Did the vfork/compiler bug occur? */ | |
4348 | || parent != getpid() | |
4349 | ||
4350 | /* Did the file descriptor bug occur? */ | |
4351 | || fstat(fileno(stdout), &st) != 0 | |
4352 | ); | |
4353 | } | |
4354 | } | |
093e61a6 | 4355 | EOF |
2c4902b9 | 4356 | if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 4357 | then |
c375c43b KG |
4358 | ac_cv_func_vfork_works=yes |
4359 | else | |
093e61a6 RS |
4360 | echo "configure: failed program was:" >&5 |
4361 | cat conftest.$ac_ext >&5 | |
4362 | rm -fr conftest* | |
4363 | ac_cv_func_vfork_works=no | |
c375c43b | 4364 | fi |
093e61a6 | 4365 | rm -fr conftest* |
cafe096b | 4366 | fi |
c375c43b KG |
4367 | |
4368 | fi | |
4369 | ||
093e61a6 RS |
4370 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
4371 | if test $ac_cv_func_vfork_works = no; then | |
4372 | cat >> confdefs.h <<\EOF | |
c375c43b | 4373 | #define vfork fork |
093e61a6 | 4374 | EOF |
c375c43b KG |
4375 | |
4376 | fi | |
4377 | ||
81bf3d9e | 4378 | |
f91abfce | 4379 | |
093e61a6 | 4380 | |
b7f2fb96 | 4381 | am_cv_lib_iconv_ldpath= |
093e61a6 | 4382 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
f91abfce TT |
4383 | if test "${with_libiconv_prefix+set}" = set; then |
4384 | withval="$with_libiconv_prefix" | |
093e61a6 | 4385 | |
f91abfce TT |
4386 | for dir in `echo "$withval" | tr : ' '`; do |
4387 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 4388 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
f91abfce | 4389 | done |
093e61a6 RS |
4390 | |
4391 | fi | |
f91abfce TT |
4392 | |
4393 | ||
093e61a6 | 4394 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 |
2c4902b9 | 4395 | echo "configure:4396: checking for iconv" >&5 |
093e61a6 RS |
4396 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
4397 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f91abfce | 4398 | else |
093e61a6 | 4399 | |
f91abfce TT |
4400 | am_cv_func_iconv="no, consider installing GNU libiconv" |
4401 | am_cv_lib_iconv=no | |
093e61a6 | 4402 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 4403 | #line 4404 "configure" |
093e61a6 | 4404 | #include "confdefs.h" |
f91abfce TT |
4405 | #include <stdlib.h> |
4406 | #include <iconv.h> | |
093e61a6 | 4407 | int main() { |
f91abfce TT |
4408 | iconv_t cd = iconv_open("",""); |
4409 | iconv(cd,NULL,NULL,NULL,NULL); | |
4410 | iconv_close(cd); | |
093e61a6 RS |
4411 | ; return 0; } |
4412 | EOF | |
2c4902b9 | 4413 | if { (eval echo configure:4414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 4414 | rm -rf conftest* |
f91abfce TT |
4415 | am_cv_func_iconv=yes |
4416 | else | |
093e61a6 RS |
4417 | echo "configure: failed program was:" >&5 |
4418 | cat conftest.$ac_ext >&5 | |
f91abfce | 4419 | fi |
093e61a6 | 4420 | rm -f conftest* |
f91abfce TT |
4421 | if test "$am_cv_func_iconv" != yes; then |
4422 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 4423 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
093e61a6 | 4424 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 4425 | #line 4426 "configure" |
093e61a6 | 4426 | #include "confdefs.h" |
f91abfce TT |
4427 | #include <stdlib.h> |
4428 | #include <iconv.h> | |
093e61a6 | 4429 | int main() { |
f91abfce TT |
4430 | iconv_t cd = iconv_open("",""); |
4431 | iconv(cd,NULL,NULL,NULL,NULL); | |
4432 | iconv_close(cd); | |
093e61a6 RS |
4433 | ; return 0; } |
4434 | EOF | |
2c4902b9 | 4435 | if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 4436 | rm -rf conftest* |
f91abfce TT |
4437 | am_cv_lib_iconv=yes |
4438 | am_cv_func_iconv=yes | |
4439 | else | |
093e61a6 RS |
4440 | echo "configure: failed program was:" >&5 |
4441 | cat conftest.$ac_ext >&5 | |
f91abfce | 4442 | fi |
093e61a6 | 4443 | rm -f conftest* |
f91abfce TT |
4444 | LIBS="$am_save_LIBS" |
4445 | fi | |
093e61a6 | 4446 | |
cafe096b | 4447 | fi |
cafe096b | 4448 | |
093e61a6 RS |
4449 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
4450 | if test "$am_cv_func_iconv" = yes; then | |
4451 | cat >> confdefs.h <<\EOF | |
f91abfce | 4452 | #define HAVE_ICONV 1 |
093e61a6 | 4453 | EOF |
f91abfce | 4454 | |
093e61a6 | 4455 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 |
2c4902b9 | 4456 | echo "configure:4457: checking for iconv declaration" >&5 |
093e61a6 RS |
4457 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
4458 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f91abfce | 4459 | else |
093e61a6 RS |
4460 | |
4461 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 4462 | #line 4463 "configure" |
093e61a6 | 4463 | #include "confdefs.h" |
f91abfce TT |
4464 | |
4465 | #include <stdlib.h> | |
4466 | #include <iconv.h> | |
4467 | extern | |
4468 | #ifdef __cplusplus | |
4469 | "C" | |
4470 | #endif | |
4471 | #if defined(__STDC__) || defined(__cplusplus) | |
4472 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
4473 | #else | |
4474 | size_t iconv(); | |
4475 | #endif | |
4476 | ||
093e61a6 | 4477 | int main() { |
f91abfce | 4478 | |
093e61a6 RS |
4479 | ; return 0; } |
4480 | EOF | |
2c4902b9 | 4481 | if { (eval echo configure:4482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4482 | rm -rf conftest* |
f91abfce TT |
4483 | am_cv_proto_iconv_arg1="" |
4484 | else | |
093e61a6 RS |
4485 | echo "configure: failed program was:" >&5 |
4486 | cat conftest.$ac_ext >&5 | |
4487 | rm -rf conftest* | |
4488 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 4489 | fi |
093e61a6 | 4490 | rm -f conftest* |
f91abfce TT |
4491 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" |
4492 | fi | |
4493 | ||
4494 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
093e61a6 RS |
4495 | echo "$ac_t""${ac_t:- |
4496 | }$am_cv_proto_iconv" 1>&6 | |
4497 | cat >> confdefs.h <<EOF | |
f91abfce | 4498 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
093e61a6 | 4499 | EOF |
f91abfce TT |
4500 | |
4501 | fi | |
4502 | LIBICONV= | |
4503 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 4504 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
f91abfce | 4505 | fi |
093e61a6 | 4506 | |
f91abfce | 4507 | |
56694dd9 ZW |
4508 | # Until we have in-tree GNU iconv: |
4509 | LIBICONV_DEP= | |
4510 | ||
4511 | ||
4512 | ||
4513 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
2c4902b9 | 4514 | echo "configure:4515: checking for LC_MESSAGES" >&5 |
56694dd9 ZW |
4515 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
4516 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4517 | else | |
4518 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 4519 | #line 4520 "configure" |
56694dd9 ZW |
4520 | #include "confdefs.h" |
4521 | #include <locale.h> | |
4522 | int main() { | |
4523 | return LC_MESSAGES | |
4524 | ; return 0; } | |
4525 | EOF | |
2c4902b9 | 4526 | if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
56694dd9 ZW |
4527 | rm -rf conftest* |
4528 | am_cv_val_LC_MESSAGES=yes | |
4529 | else | |
4530 | echo "configure: failed program was:" >&5 | |
4531 | cat conftest.$ac_ext >&5 | |
4532 | rm -rf conftest* | |
4533 | am_cv_val_LC_MESSAGES=no | |
4534 | fi | |
4535 | rm -f conftest* | |
4536 | fi | |
4537 | ||
4538 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
4539 | if test $am_cv_val_LC_MESSAGES = yes; then | |
4540 | cat >> confdefs.h <<\EOF | |
4541 | #define HAVE_LC_MESSAGES 1 | |
4542 | EOF | |
4543 | ||
4544 | fi | |
4545 | ||
f91abfce | 4546 | |
86cf1cbd KG |
4547 | # We will need to find libiberty.h and ansidecl.h |
4548 | saved_CFLAGS="$CFLAGS" | |
4549 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
8e944909 | 4550 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d | 4551 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
236ce4b2 | 4552 | fprintf_unlocked strstr errno snprintf vasprintf \ |
c1800ec8 | 4553 | malloc realloc calloc free basename getopt clock |
81bf3d9e | 4554 | do |
f31e826b | 4555 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
093e61a6 | 4556 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
2c4902b9 | 4557 | echo "configure:4558: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4558 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4559 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4560 | else | |
4561 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 4562 | #line 4563 "configure" |
093e61a6 | 4563 | #include "confdefs.h" |
7afe8c41 KG |
4564 | #undef $ac_tr_decl |
4565 | #define $ac_tr_decl 1 | |
093e61a6 | 4566 | |
d02af173 | 4567 | #include "ansidecl.h" |
86cf1cbd | 4568 | #include "system.h" |
f31e826b | 4569 | |
093e61a6 | 4570 | int main() { |
86cf1cbd KG |
4571 | #ifndef $ac_func |
4572 | char *(*pfn) = (char *(*)) $ac_func ; | |
4573 | #endif | |
093e61a6 RS |
4574 | ; return 0; } |
4575 | EOF | |
2c4902b9 | 4576 | if { (eval echo configure:4577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4577 | rm -rf conftest* |
f31e826b | 4578 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 4579 | else |
093e61a6 RS |
4580 | echo "configure: failed program was:" >&5 |
4581 | cat conftest.$ac_ext >&5 | |
4582 | rm -rf conftest* | |
4583 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 4584 | fi |
093e61a6 | 4585 | rm -f conftest* |
81bf3d9e RH |
4586 | fi |
4587 | ||
f31e826b | 4588 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
093e61a6 | 4589 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
86cf1cbd | 4590 | #define $ac_tr_decl 1 |
093e61a6 RS |
4591 | EOF |
4592 | ||
81bf3d9e | 4593 | else |
093e61a6 | 4594 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
f31e826b | 4595 | #define $ac_tr_decl 0 |
093e61a6 RS |
4596 | EOF |
4597 | ||
81bf3d9e RH |
4598 | fi |
4599 | ||
4600 | done | |
86cf1cbd | 4601 | if test x = y ; then |
093e61a6 | 4602 | cat >> confdefs.h <<\EOF |
f31e826b | 4603 | #define HAVE_DECL_GETENV 1 |
093e61a6 RS |
4604 | EOF |
4605 | cat >> confdefs.h <<\EOF | |
f31e826b | 4606 | #define HAVE_DECL_ATOL 1 |
093e61a6 RS |
4607 | EOF |
4608 | cat >> confdefs.h <<\EOF | |
f31e826b | 4609 | #define HAVE_DECL_SBRK 1 |
093e61a6 RS |
4610 | EOF |
4611 | cat >> confdefs.h <<\EOF | |
f31e826b | 4612 | #define HAVE_DECL_ABORT 1 |
093e61a6 RS |
4613 | EOF |
4614 | cat >> confdefs.h <<\EOF | |
f31e826b | 4615 | #define HAVE_DECL_ATOF 1 |
093e61a6 RS |
4616 | EOF |
4617 | cat >> confdefs.h <<\EOF | |
f31e826b | 4618 | #define HAVE_DECL_GETCWD 1 |
093e61a6 RS |
4619 | EOF |
4620 | cat >> confdefs.h <<\EOF | |
f31e826b | 4621 | #define HAVE_DECL_GETWD 1 |
093e61a6 | 4622 | EOF |
86cf1cbd | 4623 | \ |
093e61a6 | 4624 | cat >> confdefs.h <<\EOF |
f31e826b | 4625 | #define HAVE_DECL_STRSIGNAL 1 |
093e61a6 RS |
4626 | EOF |
4627 | cat >> confdefs.h <<\EOF | |
f31e826b | 4628 | #define HAVE_DECL_PUTC_UNLOCKED 1 |
093e61a6 RS |
4629 | EOF |
4630 | cat >> confdefs.h <<\EOF | |
f31e826b | 4631 | #define HAVE_DECL_FPUTS_UNLOCKED 1 |
093e61a6 RS |
4632 | EOF |
4633 | cat >> confdefs.h <<\EOF | |
3b681e9d | 4634 | #define HAVE_DECL_FWRITE_UNLOCKED 1 |
093e61a6 | 4635 | EOF |
3b681e9d | 4636 | \ |
093e61a6 | 4637 | cat >> confdefs.h <<\EOF |
3b681e9d | 4638 | #define HAVE_DECL_FPRINTF_UNLOCKED 1 |
093e61a6 RS |
4639 | EOF |
4640 | cat >> confdefs.h <<\EOF | |
f31e826b | 4641 | #define HAVE_DECL_STRSTR 1 |
093e61a6 RS |
4642 | EOF |
4643 | cat >> confdefs.h <<\EOF | |
6c889b67 | 4644 | #define HAVE_DECL_ERRNO 1 |
236ce4b2 ZW |
4645 | EOF |
4646 | cat >> confdefs.h <<\EOF | |
4647 | #define HAVE_DECL_SNPRINTF 1 | |
093e61a6 RS |
4648 | EOF |
4649 | cat >> confdefs.h <<\EOF | |
a7475ab1 | 4650 | #define HAVE_DECL_VASPRINTF 1 |
093e61a6 | 4651 | EOF |
86cf1cbd | 4652 | \ |
093e61a6 | 4653 | cat >> confdefs.h <<\EOF |
f31e826b | 4654 | #define HAVE_DECL_MALLOC 1 |
093e61a6 RS |
4655 | EOF |
4656 | cat >> confdefs.h <<\EOF | |
f31e826b | 4657 | #define HAVE_DECL_REALLOC 1 |
093e61a6 RS |
4658 | EOF |
4659 | cat >> confdefs.h <<\EOF | |
f31e826b | 4660 | #define HAVE_DECL_CALLOC 1 |
093e61a6 RS |
4661 | EOF |
4662 | cat >> confdefs.h <<\EOF | |
f31e826b | 4663 | #define HAVE_DECL_FREE 1 |
093e61a6 RS |
4664 | EOF |
4665 | cat >> confdefs.h <<\EOF | |
f31e826b | 4666 | #define HAVE_DECL_BASENAME 1 |
093e61a6 RS |
4667 | EOF |
4668 | cat >> confdefs.h <<\EOF | |
f31e826b | 4669 | #define HAVE_DECL_GETOPT 1 |
093e61a6 RS |
4670 | EOF |
4671 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4672 | #define HAVE_DECL_CLOCK 1 |
093e61a6 | 4673 | EOF |
81bf3d9e RH |
4674 | fi |
4675 | ||
81bf3d9e RH |
4676 | |
4677 | for ac_func in getrlimit setrlimit getrusage | |
4678 | do | |
f31e826b | 4679 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
093e61a6 | 4680 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
2c4902b9 | 4681 | echo "configure:4682: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4682 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4683 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4684 | else | |
4685 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 4686 | #line 4687 "configure" |
093e61a6 | 4687 | #include "confdefs.h" |
7afe8c41 KG |
4688 | #undef $ac_tr_decl |
4689 | #define $ac_tr_decl 1 | |
093e61a6 | 4690 | |
d02af173 | 4691 | #include "ansidecl.h" |
86cf1cbd | 4692 | #include "system.h" |
81bf3d9e RH |
4693 | #ifdef HAVE_SYS_RESOURCE_H |
4694 | #include <sys/resource.h> | |
4695 | #endif | |
4696 | ||
f31e826b | 4697 | |
093e61a6 | 4698 | int main() { |
86cf1cbd KG |
4699 | #ifndef $ac_func |
4700 | char *(*pfn) = (char *(*)) $ac_func ; | |
4701 | #endif | |
093e61a6 RS |
4702 | ; return 0; } |
4703 | EOF | |
2c4902b9 | 4704 | if { (eval echo configure:4705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4705 | rm -rf conftest* |
f31e826b | 4706 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 4707 | else |
093e61a6 RS |
4708 | echo "configure: failed program was:" >&5 |
4709 | cat conftest.$ac_ext >&5 | |
4710 | rm -rf conftest* | |
4711 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 4712 | fi |
093e61a6 | 4713 | rm -f conftest* |
81bf3d9e RH |
4714 | fi |
4715 | ||
f31e826b | 4716 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
093e61a6 | 4717 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
86cf1cbd | 4718 | #define $ac_tr_decl 1 |
093e61a6 RS |
4719 | EOF |
4720 | ||
81bf3d9e | 4721 | else |
093e61a6 | 4722 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
f31e826b | 4723 | #define $ac_tr_decl 0 |
093e61a6 RS |
4724 | EOF |
4725 | ||
81bf3d9e RH |
4726 | fi |
4727 | ||
4728 | done | |
86cf1cbd | 4729 | if test x = y ; then |
093e61a6 | 4730 | cat >> confdefs.h <<\EOF |
f31e826b | 4731 | #define HAVE_DECL_GETRLIMIT 1 |
093e61a6 RS |
4732 | EOF |
4733 | cat >> confdefs.h <<\EOF | |
f31e826b | 4734 | #define HAVE_DECL_SETRLIMIT 1 |
093e61a6 RS |
4735 | EOF |
4736 | cat >> confdefs.h <<\EOF | |
f31e826b | 4737 | #define HAVE_DECL_GETRUSAGE 1 |
093e61a6 | 4738 | EOF |
86cf1cbd KG |
4739 | fi |
4740 | ||
81bf3d9e | 4741 | |
093e61a6 | 4742 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 4743 | #line 4744 "configure" |
093e61a6 | 4744 | #include "confdefs.h" |
b2522d2b HPN |
4745 | |
4746 | #include "ansidecl.h" | |
4747 | #include "system.h" | |
4748 | #ifdef HAVE_SYS_RESOURCE_H | |
4749 | #include <sys/resource.h> | |
4750 | #endif | |
4751 | ||
093e61a6 | 4752 | int main() { |
b2522d2b | 4753 | rlim_t l = 0; |
093e61a6 RS |
4754 | ; return 0; } |
4755 | EOF | |
2c4902b9 | 4756 | if { (eval echo configure:4757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b2522d2b HPN |
4757 | : |
4758 | else | |
093e61a6 RS |
4759 | echo "configure: failed program was:" >&5 |
4760 | cat conftest.$ac_ext >&5 | |
4761 | rm -rf conftest* | |
4762 | cat >> confdefs.h <<\EOF | |
b2522d2b | 4763 | #define rlim_t long |
093e61a6 | 4764 | EOF |
b2522d2b HPN |
4765 | |
4766 | fi | |
093e61a6 | 4767 | rm -f conftest* |
b2522d2b | 4768 | |
351df804 | 4769 | for ac_func in ldgetname |
c1800ec8 ZW |
4770 | do |
4771 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
093e61a6 | 4772 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
2c4902b9 | 4773 | echo "configure:4774: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4774 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4775 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4776 | else | |
4777 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 4778 | #line 4779 "configure" |
093e61a6 | 4779 | #include "confdefs.h" |
c1800ec8 ZW |
4780 | #undef $ac_tr_decl |
4781 | #define $ac_tr_decl 1 | |
093e61a6 | 4782 | |
351df804 KG |
4783 | #include "ansidecl.h" |
4784 | #include "system.h" | |
4785 | #ifdef HAVE_LDFCN_H | |
4786 | #include <ldfcn.h> | |
4787 | #endif | |
4788 | ||
4789 | ||
093e61a6 | 4790 | int main() { |
351df804 KG |
4791 | #ifndef $ac_func |
4792 | char *(*pfn) = (char *(*)) $ac_func ; | |
4793 | #endif | |
093e61a6 RS |
4794 | ; return 0; } |
4795 | EOF | |
2c4902b9 | 4796 | if { (eval echo configure:4797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4797 | rm -rf conftest* |
351df804 KG |
4798 | eval "gcc_cv_have_decl_$ac_func=yes" |
4799 | else | |
093e61a6 RS |
4800 | echo "configure: failed program was:" >&5 |
4801 | cat conftest.$ac_ext >&5 | |
4802 | rm -rf conftest* | |
4803 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 4804 | fi |
093e61a6 | 4805 | rm -f conftest* |
351df804 KG |
4806 | fi |
4807 | ||
4808 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
093e61a6 | 4809 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
351df804 | 4810 | #define $ac_tr_decl 1 |
093e61a6 RS |
4811 | EOF |
4812 | ||
351df804 | 4813 | else |
093e61a6 | 4814 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
351df804 | 4815 | #define $ac_tr_decl 0 |
093e61a6 RS |
4816 | EOF |
4817 | ||
351df804 KG |
4818 | fi |
4819 | ||
4820 | done | |
4821 | if test x = y ; then | |
093e61a6 | 4822 | cat >> confdefs.h <<\EOF |
351df804 | 4823 | #define HAVE_DECL_LDGETNAME 1 |
093e61a6 | 4824 | EOF |
351df804 KG |
4825 | fi |
4826 | ||
4827 | ||
4828 | for ac_func in times | |
4829 | do | |
4830 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
093e61a6 | 4831 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
2c4902b9 | 4832 | echo "configure:4833: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4833 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4834 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4835 | else | |
4836 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 4837 | #line 4838 "configure" |
093e61a6 | 4838 | #include "confdefs.h" |
351df804 KG |
4839 | #undef $ac_tr_decl |
4840 | #define $ac_tr_decl 1 | |
093e61a6 | 4841 | |
c1800ec8 ZW |
4842 | #include "ansidecl.h" |
4843 | #include "system.h" | |
4844 | #ifdef HAVE_SYS_TIMES_H | |
4845 | #include <sys/times.h> | |
4846 | #endif | |
4847 | ||
4848 | ||
093e61a6 | 4849 | int main() { |
c1800ec8 ZW |
4850 | #ifndef $ac_func |
4851 | char *(*pfn) = (char *(*)) $ac_func ; | |
4852 | #endif | |
093e61a6 RS |
4853 | ; return 0; } |
4854 | EOF | |
2c4902b9 | 4855 | if { (eval echo configure:4856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4856 | rm -rf conftest* |
c1800ec8 ZW |
4857 | eval "gcc_cv_have_decl_$ac_func=yes" |
4858 | else | |
093e61a6 RS |
4859 | echo "configure: failed program was:" >&5 |
4860 | cat conftest.$ac_ext >&5 | |
4861 | rm -rf conftest* | |
4862 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 4863 | fi |
093e61a6 | 4864 | rm -f conftest* |
c1800ec8 ZW |
4865 | fi |
4866 | ||
4867 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
093e61a6 | 4868 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
c1800ec8 | 4869 | #define $ac_tr_decl 1 |
093e61a6 RS |
4870 | EOF |
4871 | ||
c1800ec8 | 4872 | else |
093e61a6 | 4873 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
c1800ec8 | 4874 | #define $ac_tr_decl 0 |
093e61a6 RS |
4875 | EOF |
4876 | ||
c1800ec8 ZW |
4877 | fi |
4878 | ||
4879 | done | |
4880 | if test x = y ; then | |
093e61a6 | 4881 | cat >> confdefs.h <<\EOF |
c1800ec8 | 4882 | #define HAVE_DECL_TIMES 1 |
093e61a6 | 4883 | EOF |
c1800ec8 ZW |
4884 | fi |
4885 | ||
4886 | ||
4887 | # More time-related stuff. | |
093e61a6 | 4888 | echo $ac_n "checking for struct tms""... $ac_c" 1>&6 |
2c4902b9 | 4889 | echo "configure:4890: checking for struct tms" >&5 |
093e61a6 RS |
4890 | if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then |
4891 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4892 | else | |
4893 | ||
4894 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 4895 | #line 4896 "configure" |
093e61a6 | 4896 | #include "confdefs.h" |
c1800ec8 ZW |
4897 | |
4898 | #include "ansidecl.h" | |
4899 | #include "system.h" | |
4900 | #ifdef HAVE_SYS_TIMES_H | |
4901 | #include <sys/times.h> | |
4902 | #endif | |
4903 | ||
093e61a6 | 4904 | int main() { |
c1800ec8 | 4905 | struct tms tms; |
093e61a6 RS |
4906 | ; return 0; } |
4907 | EOF | |
2c4902b9 | 4908 | if { (eval echo configure:4909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4909 | rm -rf conftest* |
c1800ec8 ZW |
4910 | ac_cv_struct_tms=yes |
4911 | else | |
093e61a6 RS |
4912 | echo "configure: failed program was:" >&5 |
4913 | cat conftest.$ac_ext >&5 | |
4914 | rm -rf conftest* | |
4915 | ac_cv_struct_tms=no | |
c1800ec8 | 4916 | fi |
093e61a6 | 4917 | rm -f conftest* |
c1800ec8 | 4918 | fi |
cafe096b | 4919 | |
093e61a6 RS |
4920 | echo "$ac_t""$ac_cv_struct_tms" 1>&6 |
4921 | if test $ac_cv_struct_tms = yes; then | |
4922 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4923 | #define HAVE_STRUCT_TMS 1 |
093e61a6 | 4924 | EOF |
c1800ec8 ZW |
4925 | |
4926 | fi | |
4927 | ||
4928 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
4929 | # revisit after autoconf 2.50. | |
093e61a6 | 4930 | echo $ac_n "checking for clock_t""... $ac_c" 1>&6 |
2c4902b9 | 4931 | echo "configure:4932: checking for clock_t" >&5 |
093e61a6 RS |
4932 | if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then |
4933 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4934 | else | |
4935 | ||
4936 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 4937 | #line 4938 "configure" |
093e61a6 | 4938 | #include "confdefs.h" |
c1800ec8 ZW |
4939 | |
4940 | #include "ansidecl.h" | |
4941 | #include "system.h" | |
4942 | ||
093e61a6 | 4943 | int main() { |
c1800ec8 | 4944 | clock_t x; |
093e61a6 RS |
4945 | ; return 0; } |
4946 | EOF | |
2c4902b9 | 4947 | if { (eval echo configure:4948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4948 | rm -rf conftest* |
c1800ec8 ZW |
4949 | gcc_cv_type_clock_t=yes |
4950 | else | |
093e61a6 RS |
4951 | echo "configure: failed program was:" >&5 |
4952 | cat conftest.$ac_ext >&5 | |
4953 | rm -rf conftest* | |
4954 | gcc_cv_type_clock_t=no | |
c1800ec8 | 4955 | fi |
093e61a6 | 4956 | rm -f conftest* |
c1800ec8 | 4957 | fi |
cafe096b | 4958 | |
093e61a6 RS |
4959 | echo "$ac_t""$gcc_cv_type_clock_t" 1>&6 |
4960 | if test $gcc_cv_type_clock_t = yes; then | |
4961 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4962 | #define HAVE_CLOCK_T 1 |
093e61a6 | 4963 | EOF |
c1800ec8 ZW |
4964 | |
4965 | fi | |
4966 | ||
093e61a6 | 4967 | echo $ac_n "checking for uchar""... $ac_c" 1>&6 |
2c4902b9 | 4968 | echo "configure:4969: checking for uchar" >&5 |
093e61a6 RS |
4969 | if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then |
4970 | echo $ac_n "(cached) $ac_c" 1>&6 | |
a12b5bd9 | 4971 | else |
093e61a6 | 4972 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 4973 | #line 4974 "configure" |
093e61a6 | 4974 | #include "confdefs.h" |
a12b5bd9 ZW |
4975 | |
4976 | #include "ansidecl.h" | |
4977 | #include "system.h" | |
4978 | ||
093e61a6 | 4979 | int main() { |
a12b5bd9 ZW |
4980 | if ((uchar *)0) return 0; |
4981 | if (sizeof(uchar)) return 0; | |
093e61a6 RS |
4982 | ; return 0; } |
4983 | EOF | |
2c4902b9 | 4984 | if { (eval echo configure:4985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4985 | rm -rf conftest* |
a12b5bd9 ZW |
4986 | ac_cv_type_uchar=yes |
4987 | else | |
093e61a6 RS |
4988 | echo "configure: failed program was:" >&5 |
4989 | cat conftest.$ac_ext >&5 | |
4990 | rm -rf conftest* | |
4991 | ac_cv_type_uchar=no | |
a12b5bd9 | 4992 | fi |
093e61a6 | 4993 | rm -f conftest* |
a12b5bd9 | 4994 | fi |
cafe096b | 4995 | |
093e61a6 RS |
4996 | echo "$ac_t""$gcc_cv_type_uchar" 1>&6 |
4997 | if test $ac_cv_type_uchar = yes; then | |
4998 | cat >> confdefs.h <<\EOF | |
a12b5bd9 | 4999 | #define HAVE_UCHAR 1 |
093e61a6 | 5000 | EOF |
a12b5bd9 ZW |
5001 | |
5002 | fi | |
5003 | ||
eb70d86d AS |
5004 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
5005 | CFLAGS="$saved_CFLAGS" | |
5006 | ||
07cf4226 DM |
5007 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
5008 | if test "${enable_initfini_array+set}" = set; then | |
5009 | enableval="$enable_initfini_array" | |
093e61a6 | 5010 | : |
07cf4226 | 5011 | else |
093e61a6 RS |
5012 | |
5013 | echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6 | |
2c4902b9 | 5014 | echo "configure:5015: checking for .preinit_array/.init_array/.fini_array support" >&5 |
093e61a6 RS |
5015 | if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then |
5016 | echo $ac_n "(cached) $ac_c" 1>&6 | |
07cf4226 | 5017 | else |
eb70d86d | 5018 | if test "$cross_compiling" = yes; then |
918c4fe4 | 5019 | gcc_cv_initfini_array=no |
eb70d86d | 5020 | else |
093e61a6 | 5021 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 5022 | #line 5023 "configure" |
093e61a6 | 5023 | #include "confdefs.h" |
eb70d86d | 5024 | |
07cf4226 DM |
5025 | static int x = -1; |
5026 | int main (void) { return x; } | |
5027 | int foo (void) { x = 0; } | |
5028 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
093e61a6 | 5029 | EOF |
2c4902b9 | 5030 | if { (eval echo configure:5031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 5031 | then |
918c4fe4 | 5032 | gcc_cv_initfini_array=yes |
eb70d86d | 5033 | else |
093e61a6 RS |
5034 | echo "configure: failed program was:" >&5 |
5035 | cat conftest.$ac_ext >&5 | |
5036 | rm -fr conftest* | |
5037 | gcc_cv_initfini_array=no | |
eb70d86d | 5038 | fi |
093e61a6 | 5039 | rm -fr conftest* |
eb70d86d | 5040 | fi |
093e61a6 | 5041 | |
07cf4226 | 5042 | fi |
093e61a6 RS |
5043 | |
5044 | echo "$ac_t""$gcc_cv_initfini_array" 1>&6 | |
eb70d86d | 5045 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 5046 | |
093e61a6 | 5047 | fi |
cafe096b | 5048 | |
093e61a6 RS |
5049 | if test $enable_initfini_array = yes; then |
5050 | cat >> confdefs.h <<\EOF | |
eb70d86d | 5051 | #define HAVE_INITFINI_ARRAY 1 |
093e61a6 | 5052 | EOF |
07cf4226 | 5053 | |
eb70d86d | 5054 | fi |
81bf3d9e | 5055 | |
093e61a6 RS |
5056 | # mkdir takes a single argument on some systems. |
5057 | echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 | |
2c4902b9 | 5058 | echo "configure:5059: checking if mkdir takes one argument" >&5 |
093e61a6 RS |
5059 | if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then |
5060 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75923b2f | 5061 | else |
093e61a6 | 5062 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 5063 | #line 5064 "configure" |
093e61a6 | 5064 | #include "confdefs.h" |
75923b2f MK |
5065 | |
5066 | #include <sys/types.h> | |
5067 | #ifdef HAVE_SYS_STAT_H | |
5068 | # include <sys/stat.h> | |
5069 | #endif | |
5070 | #ifdef HAVE_UNISTD_H | |
5071 | # include <unistd.h> | |
5072 | #endif | |
5073 | #ifdef HAVE_DIRECT_H | |
5074 | # include <direct.h> | |
5075 | #endif | |
093e61a6 | 5076 | int main() { |
75923b2f | 5077 | mkdir ("foo", 0); |
093e61a6 RS |
5078 | ; return 0; } |
5079 | EOF | |
2c4902b9 | 5080 | if { (eval echo configure:5081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 5081 | rm -rf conftest* |
75923b2f MK |
5082 | gcc_cv_mkdir_takes_one_arg=no |
5083 | else | |
093e61a6 RS |
5084 | echo "configure: failed program was:" >&5 |
5085 | cat conftest.$ac_ext >&5 | |
5086 | rm -rf conftest* | |
5087 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 5088 | fi |
093e61a6 | 5089 | rm -f conftest* |
75923b2f | 5090 | fi |
cafe096b | 5091 | |
093e61a6 RS |
5092 | echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 |
5093 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then | |
5094 | cat >> confdefs.h <<\EOF | |
75923b2f | 5095 | #define MKDIR_TAKES_ONE_ARG 1 |
093e61a6 | 5096 | EOF |
75923b2f MK |
5097 | |
5098 | fi | |
5099 | ||
5100 | ||
861bb6c1 JL |
5101 | # File extensions |
5102 | manext='.1' | |
5103 | objext='.o' | |
5104 | ||
5105 | ||
5106 | ||
4977bab6 ZW |
5107 | # With Setjmp/Longjmp based exception handling. |
5108 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
5109 | if test "${enable_sjlj_exceptions+set}" = set; then | |
5110 | enableval="$enable_sjlj_exceptions" | |
5111 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
093e61a6 | 5112 | cat >> confdefs.h <<EOF |
cafe096b | 5113 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj |
093e61a6 RS |
5114 | EOF |
5115 | ||
5116 | fi | |
4977bab6 ZW |
5117 | |
5118 | ||
c6c51600 AS |
5119 | if test x$host = x$target; then |
5120 | echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6 | |
2c4902b9 | 5121 | echo "configure:5122: checking for main in -lunwind" >&5 |
093e61a6 RS |
5122 | ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'` |
5123 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5124 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4977bab6 | 5125 | else |
093e61a6 | 5126 | ac_save_LIBS="$LIBS" |
4977bab6 | 5127 | LIBS="-lunwind $LIBS" |
093e61a6 | 5128 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 5129 | #line 5130 "configure" |
093e61a6 | 5130 | #include "confdefs.h" |
4977bab6 | 5131 | |
093e61a6 RS |
5132 | int main() { |
5133 | main() | |
5134 | ; return 0; } | |
5135 | EOF | |
2c4902b9 | 5136 | if { (eval echo configure:5137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5137 | rm -rf conftest* |
5138 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5139 | else | |
5140 | echo "configure: failed program was:" >&5 | |
5141 | cat conftest.$ac_ext >&5 | |
5142 | rm -rf conftest* | |
5143 | eval "ac_cv_lib_$ac_lib_var=no" | |
5144 | fi | |
5145 | rm -f conftest* | |
5146 | LIBS="$ac_save_LIBS" | |
4977bab6 | 5147 | |
093e61a6 RS |
5148 | fi |
5149 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5150 | echo "$ac_t""yes" 1>&6 | |
4977bab6 ZW |
5151 | use_libunwind_default=yes |
5152 | else | |
093e61a6 RS |
5153 | echo "$ac_t""no" 1>&6 |
5154 | use_libunwind_default=no | |
4977bab6 ZW |
5155 | fi |
5156 | ||
c6c51600 AS |
5157 | else |
5158 | use_libunwind_default=no | |
5159 | fi | |
4977bab6 ZW |
5160 | # Use libunwind based exception handling. |
5161 | # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. | |
5162 | if test "${enable_libunwind_exceptions+set}" = set; then | |
5163 | enableval="$enable_libunwind_exceptions" | |
5164 | use_libunwind_exceptions=$enableval | |
5165 | else | |
5166 | use_libunwind_exceptions=$use_libunwind_default | |
093e61a6 | 5167 | fi |
cafe096b | 5168 | |
093e61a6 RS |
5169 | if test x"$use_libunwind_exceptions" = xyes; then |
5170 | cat >> confdefs.h <<\EOF | |
4977bab6 | 5171 | #define USE_LIBUNWIND_EXCEPTIONS 1 |
093e61a6 | 5172 | EOF |
4977bab6 ZW |
5173 | |
5174 | fi | |
5175 | ||
34a86c2b NN |
5176 | # -------------------------------------------------------- |
5177 | # Build, host, and target specific configuration fragments | |
5178 | # -------------------------------------------------------- | |
5179 | ||
5b28c537 NN |
5180 | # Collect build-machine-specific information. |
5181 | . ${srcdir}/config.build | |
5182 | ||
a89ea0df NN |
5183 | # Collect host-machine-specific information. |
5184 | . ${srcdir}/config.host | |
5185 | ||
ef69da62 | 5186 | target_gtfiles= |
a89ea0df NN |
5187 | |
5188 | # Collect target-machine-specific information. | |
8ad9fb33 | 5189 | . ${srcdir}/config.gcc |
861bb6c1 JL |
5190 | |
5191 | extra_objs="${host_extra_objs} ${extra_objs}" | |
5192 | ||
5193 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 5194 | if test x"$tm_file" = x |
861bb6c1 JL |
5195 | then tm_file=$cpu_type/$cpu_type.h; fi |
5196 | ||
6b2adea9 | 5197 | if test x"$extra_headers" = x |
861bb6c1 JL |
5198 | then extra_headers=; fi |
5199 | ||
75bffa71 | 5200 | if test x$md_file = x |
e98e406f | 5201 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 5202 | |
75bffa71 | 5203 | if test x$out_file = x |
861bb6c1 JL |
5204 | then out_file=$cpu_type/$cpu_type.c; fi |
5205 | ||
75bffa71 | 5206 | if test x"$tmake_file" = x |
861bb6c1 JL |
5207 | then tmake_file=$cpu_type/t-$cpu_type |
5208 | fi | |
5209 | ||
90e6a802 | 5210 | if test x"$dwarf2" = xyes |
756ee602 | 5211 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
5212 | fi |
5213 | ||
861bb6c1 | 5214 | # Say what files are being used for the output code and MD file. |
11642c3a | 5215 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
5216 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
5217 | ||
11642c3a | 5218 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
5219 | # about them and drop them. |
5220 | ||
11642c3a ZW |
5221 | bx= |
5222 | for x in $build_xm_file; do | |
5223 | if test -f $srcdir/config/$x | |
5224 | then bx="$bx $x" | |
093e61a6 | 5225 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5226 | fi |
5227 | done | |
5228 | build_xm_file="$bx" | |
5229 | ||
5230 | hx= | |
5231 | for x in $host_xm_file; do | |
5232 | if test -f $srcdir/config/$x | |
5233 | then hx="$hx $x" | |
093e61a6 | 5234 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5235 | fi |
5236 | done | |
5237 | host_xm_file="$hx" | |
5238 | ||
5239 | tx= | |
5240 | for x in $xm_file; do | |
5241 | if test -f $srcdir/config/$x | |
5242 | then tx="$tx $x" | |
093e61a6 | 5243 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5244 | fi |
5245 | done | |
5246 | xm_file="$tx" | |
5247 | ||
861bb6c1 JL |
5248 | count=a |
5249 | for f in $tm_file; do | |
5250 | count=${count}x | |
5251 | done | |
75bffa71 | 5252 | if test $count = ax; then |
861bb6c1 JL |
5253 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
5254 | else | |
5255 | echo "Using the following target machine macro files:" | |
5256 | for f in $tm_file; do | |
5257 | echo " $srcdir/config/$f" | |
5258 | done | |
5259 | fi | |
5260 | ||
4977bab6 | 5261 | if test x$need_64bit_hwint = xyes; then |
093e61a6 | 5262 | cat >> confdefs.h <<\EOF |
4977bab6 | 5263 | #define NEED_64BIT_HOST_WIDE_INT 1 |
093e61a6 | 5264 | EOF |
4977bab6 ZW |
5265 | |
5266 | fi | |
5267 | ||
861bb6c1 JL |
5268 | count=a |
5269 | for f in $host_xm_file; do | |
5270 | count=${count}x | |
5271 | done | |
11642c3a ZW |
5272 | if test $count = a; then |
5273 | : | |
5274 | elif test $count = ax; then | |
861bb6c1 JL |
5275 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
5276 | else | |
5277 | echo "Using the following host machine macro files:" | |
5278 | for f in $host_xm_file; do | |
5279 | echo " $srcdir/config/$f" | |
5280 | done | |
5281 | fi | |
476d9098 | 5282 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 5283 | |
75bffa71 | 5284 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
5285 | count=a |
5286 | for f in $build_xm_file; do | |
5287 | count=${count}x | |
5288 | done | |
11642c3a ZW |
5289 | if test $count = a; then |
5290 | : | |
5291 | elif test $count = ax; then | |
861bb6c1 JL |
5292 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
5293 | else | |
5294 | echo "Using the following build machine macro files:" | |
5295 | for f in $build_xm_file; do | |
5296 | echo " $srcdir/config/$f" | |
5297 | done | |
5298 | fi | |
5299 | fi | |
5300 | ||
c2e494a8 NN |
5301 | # Check if a valid thread package |
5302 | case ${enable_threads_flag} in | |
5303 | "" | no) | |
5304 | # No threads | |
5305 | target_thread_file='single' | |
5306 | ;; | |
5307 | yes) | |
5308 | # default | |
5309 | target_thread_file='single' | |
5310 | ;; | |
769e49eb NN |
5311 | aix | dce | gnat | irix | posix | rtems | \ |
5312 | single | solaris | vxworks | win32 ) | |
c2e494a8 NN |
5313 | target_thread_file=${enable_threads_flag} |
5314 | ;; | |
5315 | *) | |
5316 | echo "${enable_threads_flag} is an unknown thread package" 1>&2 | |
5317 | exit 1 | |
5318 | ;; | |
5319 | esac | |
5320 | ||
5321 | if test x${thread_file} = x; then | |
5322 | # No thread file set by target-specific clauses in config.gcc, | |
5323 | # so use file chosen by default logic above | |
5324 | thread_file=${target_thread_file} | |
861bb6c1 JL |
5325 | fi |
5326 | ||
2121a768 JT |
5327 | if test x$enable___cxa_atexit = xyes || \ |
5328 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
5329 | cat >> confdefs.h <<\EOF | |
5330 | #define DEFAULT_USE_CXA_ATEXIT 1 | |
5331 | EOF | |
5332 | ||
5333 | fi | |
5334 | ||
a5381466 | 5335 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
5336 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
5337 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
093e61a6 RS |
5338 | |
5339 | cat >> confdefs.h <<EOF | |
e22340b0 | 5340 | #define EXTRA_MODES_FILE "config/$extra_modes" |
093e61a6 | 5341 | EOF |
a5381466 ZW |
5342 | |
5343 | fi | |
5344 | ||
b7cb92ad | 5345 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 5346 | # the first file included by config.h. |
4977bab6 | 5347 | # If host=build, it is correct to have bconfig include auto-host.h |
093e61a6 | 5348 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 5349 | # work to find out the build config parameters. |
75bffa71 | 5350 | if test x$host = x$build |
db81d74a | 5351 | then |
eaf4e618 | 5352 | build_auto=auto-host.h |
06f0b04c | 5353 | FORBUILD=.. |
b7cb92ad JL |
5354 | else |
5355 | # We create a subdir, then run autoconf in the subdir. | |
5356 | # To prevent recursion we set host and build for the new | |
5357 | # invocation of configure to the build for this invocation | |
093e61a6 | 5358 | # of configure. |
b7cb92ad JL |
5359 | tempdir=build.$$ |
5360 | rm -rf $tempdir | |
5361 | mkdir $tempdir | |
5362 | cd $tempdir | |
5363 | case ${srcdir} in | |
255b8a49 | 5364 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
5365 | *) realsrcdir=../${srcdir};; |
5366 | esac | |
d920e825 L |
5367 | saved_CFLAGS="${CFLAGS}" |
5368 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
5369 | ${realsrcdir}/configure \ | |
534d0cc0 | 5370 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 5371 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
5372 | |
5373 | # We just finished tests for the build machine, so rename | |
5374 | # the file auto-build.h in the gcc directory. | |
5375 | mv auto-host.h ../auto-build.h | |
5376 | cd .. | |
5377 | rm -rf $tempdir | |
eaf4e618 | 5378 | build_auto=auto-build.h |
3b1b059c | 5379 | FORBUILD=../${build_subdir} |
db81d74a RH |
5380 | fi |
5381 | ||
06f0b04c | 5382 | |
eaf4e618 | 5383 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
5384 | tm_p_file="${tm_p_file} tm-preds.h" |
5385 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
5386 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 5387 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 KG |
5388 | # put this back in temporarily. |
5389 | xm_file="ansidecl.h ${xm_file}" | |
0056a9b5 | 5390 | |
34a86c2b NN |
5391 | # -------- |
5392 | # UNSORTED | |
5393 | # -------- | |
5394 | ||
f1943b77 | 5395 | # Get the version trigger filename from the toplevel |
75bffa71 | 5396 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
5397 | gcc_version_trigger=$with_gcc_version_trigger |
5398 | else | |
5399 | gcc_version_trigger=${srcdir}/version.c | |
5400 | fi | |
022dae81 | 5401 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 5402 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 5403 | |
cc1e60ea | 5404 | # Compile in configure arguments. |
8105825d | 5405 | if test -f configargs.h ; then |
cc1e60ea | 5406 | # Being re-configured. |
022dae81 | 5407 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
5408 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
5409 | else | |
5410 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
5411 | fi | |
eeae7b41 DJ |
5412 | |
5413 | # Double all backslashes and backslash all quotes to turn | |
5414 | # gcc_config_arguments into a C string. | |
5415 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
5416 | $gcc_config_arguments | |
5417 | EOF | |
5418 | gcc_config_arguments_str=`cat conftest.out` | |
5419 | rm -f conftest.out | |
5420 | ||
cc1e60ea JM |
5421 | cat > configargs.h <<EOF |
5422 | /* Generated automatically. */ | |
eeae7b41 | 5423 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 5424 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
5425 | |
5426 | static const struct { | |
5427 | const char *name, *value; | |
5428 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
5429 | EOF |
5430 | ||
ab87f8c8 JL |
5431 | # Internationalization |
5432 | PACKAGE=gcc | |
5433 | VERSION="$gcc_version" | |
861bb6c1 | 5434 | |
ab87f8c8 JL |
5435 | |
5436 | ||
56694dd9 ZW |
5437 | # If we haven't got the data from the intl directory, |
5438 | # assume NLS is disabled. | |
5439 | USE_NLS=no | |
5440 | LIBINTL= | |
5441 | LIBINTL_DEP= | |
5442 | INCINTL= | |
5443 | XGETTEXT= | |
5444 | GMSGFMT= | |
5445 | POSUB= | |
5446 | if test -f ../intl/config.intl; then | |
5447 | . ../intl/config.intl | |
093e61a6 | 5448 | fi |
56694dd9 | 5449 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 |
2c4902b9 | 5450 | echo "configure:5451: checking whether NLS is requested" >&5 |
56694dd9 ZW |
5451 | if test x"$USE_NLS" != xyes; then |
5452 | echo "$ac_t""no" 1>&6 | |
5453 | else | |
5454 | echo "$ac_t""yes" 1>&6 | |
5455 | cat >> confdefs.h <<\EOF | |
5456 | #define ENABLE_NLS 1 | |
5457 | EOF | |
5458 | ||
093e61a6 | 5459 | |
56694dd9 | 5460 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 |
2c4902b9 | 5461 | echo "configure:5462: checking for catalogs to be installed" >&5 |
56694dd9 ZW |
5462 | # Look for .po and .gmo files in the source directory. |
5463 | CATALOGS= | |
5464 | XLINGUAS= | |
5465 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
5466 | # If there aren't any .gmo files the shell will give us the | |
5467 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
5468 | # weeded out. | |
5469 | case "$cat" in *\**) | |
5470 | continue;; | |
5471 | esac | |
5472 | # The quadruple backslash is collapsed to a double backslash | |
5473 | # by the backticks, then collapsed again by the double quotes, | |
5474 | # leaving us with one backslash in the sed expression (right | |
5475 | # before the dot that mustn't act as a wildcard). | |
5476 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"` | |
5477 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"` | |
5478 | # The user is allowed to set LINGUAS to a list of languages to | |
5479 | # install catalogs for. If it's empty that means "all of them." | |
5480 | if test "x$LINGUAS" = x; then | |
5481 | CATALOGS="$CATALOGS $cat" | |
5482 | XLINGUAS="$XLINGUAS $lang" | |
5483 | else | |
5484 | case "$LINGUAS" in *$lang*) | |
5485 | CATALOGS="$CATALOGS $cat" | |
5486 | XLINGUAS="$XLINGUAS $lang" | |
5487 | ;; | |
5488 | esac | |
5489 | fi | |
5490 | done | |
5491 | LINGUAS="$XLINGUAS" | |
5492 | echo "$ac_t""$LINGUAS" 1>&6 | |
5493 | fi | |
861bb6c1 | 5494 | |
56694dd9 ZW |
5495 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
5496 | # -liconv on the link line twice. | |
5497 | case "$LIBINTL" in *$LIBICONV*) | |
5498 | LIBICONV= ;; | |
5499 | esac | |
dc6746e7 | 5500 | |
56694dd9 ZW |
5501 | # Windows32 Registry support for specifying GCC installation paths. |
5502 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
5503 | if test "${enable_win32_registry+set}" = set; then | |
5504 | enableval="$enable_win32_registry" | |
5505 | : | |
dc6746e7 PT |
5506 | fi |
5507 | ||
56694dd9 ZW |
5508 | case $host_os in |
5509 | win32 | pe | cygwin* | mingw32* | uwin*) | |
5510 | echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 | |
2c4902b9 | 5511 | echo "configure:5512: checking whether windows registry support is requested" >&5 |
56694dd9 ZW |
5512 | if test "x$enable_win32_registry" != xno; then |
5513 | cat >> confdefs.h <<\EOF | |
5514 | #define ENABLE_WIN32_REGISTRY 1 | |
5515 | EOF | |
861bb6c1 | 5516 | |
56694dd9 ZW |
5517 | echo "$ac_t""yes" 1>&6 |
5518 | ||
5519 | echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 | |
2c4902b9 | 5520 | echo "configure:5521: checking for library containing RegOpenKeyExA" >&5 |
56694dd9 | 5521 | if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then |
093e61a6 | 5522 | echo $ac_n "(cached) $ac_c" 1>&6 |
ab87f8c8 | 5523 | else |
56694dd9 ZW |
5524 | ac_func_search_save_LIBS="$LIBS" |
5525 | ac_cv_search_RegOpenKeyExA="no" | |
093e61a6 | 5526 | cat > conftest.$ac_ext <<EOF |
2c4902b9 | 5527 | #line 5528 "configure" |
093e61a6 | 5528 | #include "confdefs.h" |
ab87f8c8 JL |
5529 | /* Override any gcc2 internal prototype to avoid an error. */ |
5530 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 | 5531 | builtin and then its argument prototype would still apply. */ |
56694dd9 | 5532 | char RegOpenKeyExA(); |
093e61a6 RS |
5533 | |
5534 | int main() { | |
56694dd9 | 5535 | RegOpenKeyExA() |
093e61a6 RS |
5536 | ; return 0; } |
5537 | EOF | |
2c4902b9 | 5538 | if { (eval echo configure:5539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 5539 | rm -rf conftest* |
56694dd9 | 5540 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 5541 | else |
093e61a6 RS |
5542 | echo "configure: failed program was:" >&5 |
5543 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5544 | fi |
093e61a6 | 5545 | rm -f conftest* |
56694dd9 ZW |
5546 | test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do |
5547 | LIBS="-l$i $ac_func_search_save_LIBS" | |
5548 | cat > conftest.$ac_ext <<EOF | |
2c4902b9 | 5549 | #line 5550 "configure" |
093e61a6 | 5550 | #include "confdefs.h" |
56694dd9 ZW |
5551 | /* Override any gcc2 internal prototype to avoid an error. */ |
5552 | /* We use char because int might match the return type of a gcc2 | |
5553 | builtin and then its argument prototype would still apply. */ | |
5554 | char RegOpenKeyExA(); | |
ab87f8c8 | 5555 | |
093e61a6 | 5556 | int main() { |
56694dd9 | 5557 | RegOpenKeyExA() |
093e61a6 RS |
5558 | ; return 0; } |
5559 | EOF | |
2c4902b9 | 5560 | if { (eval echo configure:5561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 5561 | rm -rf conftest* |
56694dd9 ZW |
5562 | ac_cv_search_RegOpenKeyExA="-l$i" |
5563 | break | |
861bb6c1 | 5564 | else |
093e61a6 RS |
5565 | echo "configure: failed program was:" >&5 |
5566 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5567 | fi |
093e61a6 | 5568 | rm -f conftest* |
56694dd9 ZW |
5569 | done |
5570 | LIBS="$ac_func_search_save_LIBS" | |
861bb6c1 JL |
5571 | fi |
5572 | ||
56694dd9 ZW |
5573 | echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6 |
5574 | if test "$ac_cv_search_RegOpenKeyExA" != "no"; then | |
5575 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" | |
5576 | ||
5577 | else : | |
5578 | ||
ab87f8c8 | 5579 | fi |
cafe096b | 5580 | else |
56694dd9 | 5581 | echo "$ac_t""no" 1>&6 |
093e61a6 | 5582 | fi |
ab87f8c8 | 5583 | |
56694dd9 ZW |
5584 | # Check if user specified a different registry key. |
5585 | case "x${enable_win32_registry}" in | |
5586 | x | xyes) | |
5587 | # default. | |
5588 | gcc_cv_win32_registry_key="$VERSION" | |
5589 | ;; | |
5590 | xno) | |
5591 | # no registry lookup. | |
5592 | gcc_cv_win32_registry_key='' | |
5593 | ;; | |
5594 | *) | |
5595 | # user-specified key. | |
5596 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
5597 | ;; | |
5598 | esac | |
ab87f8c8 | 5599 | |
56694dd9 ZW |
5600 | if test "x$enable_win32_registry" != xno; then |
5601 | echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 | |
2c4902b9 | 5602 | echo "configure:5603: checking registry key on windows hosts" >&5 |
56694dd9 ZW |
5603 | cat >> confdefs.h <<EOF |
5604 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" | |
093e61a6 | 5605 | EOF |
cafe096b | 5606 | |
56694dd9 | 5607 | echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6 |
093e61a6 | 5608 | fi |
56694dd9 ZW |
5609 | ;; |
5610 | esac | |
ab87f8c8 | 5611 | |
56694dd9 ZW |
5612 | # Get an absolute path to the GCC top-level source directory |
5613 | holddir=`${PWDCMD-pwd}` | |
5614 | cd $srcdir | |
5615 | topdir=`${PWDCMD-pwd}` | |
5616 | cd $holddir | |
ab87f8c8 | 5617 | |
56694dd9 | 5618 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 5619 | xmake_file= |
c406e779 | 5620 | for f in ${host_xmake_file} |
56694dd9 ZW |
5621 | do |
5622 | if test -f ${srcdir}/config/$f | |
5623 | then | |
2ed26f6b | 5624 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
5625 | fi |
5626 | done | |
093e61a6 | 5627 | |
56694dd9 | 5628 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 5629 | tmake_file_= |
c406e779 | 5630 | for f in ${tmake_file} |
56694dd9 ZW |
5631 | do |
5632 | if test -f ${srcdir}/config/$f | |
5633 | then | |
2ed26f6b | 5634 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
5635 | fi |
5636 | done | |
2ed26f6b | 5637 | tmake_file="${tmake_file_}" |
71a94577 | 5638 | |
56694dd9 | 5639 | symbolic_link='ln -s' |
34a86c2b | 5640 | |
ab87f8c8 JL |
5641 | # If the host doesn't support symlinks, modify CC in |
5642 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
5643 | # Otherwise, we can use "CC=$(CC)". | |
5644 | rm -f symtest.tem | |
5645 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
5646 | then | |
5647 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 5648 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 | 5649 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
596151e1 | 5650 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
ab87f8c8 JL |
5651 | else |
5652 | rm -f symtest.tem | |
5653 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
5654 | then | |
5655 | symbolic_link="cp -p" | |
5656 | else | |
5657 | symbolic_link="cp" | |
5658 | fi | |
5659 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 5660 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 | 5661 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
596151e1 | 5662 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" |
ab87f8c8 JL |
5663 | fi |
5664 | rm -f symtest.tem | |
5665 | ||
5666 | out_object_file=`basename $out_file .c`.o | |
5667 | ||
5668 | tm_file_list= | |
e22340b0 | 5669 | tm_include_list= |
ab87f8c8 | 5670 | for f in $tm_file; do |
64ccbc99 | 5671 | case $f in |
d02af173 | 5672 | defaults.h ) |
e22340b0 ZW |
5673 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
5674 | tm_include_list="${tm_include_list} $f" | |
5675 | ;; | |
5676 | * ) | |
5677 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
5678 | tm_include_list="${tm_include_list} config/$f" | |
5679 | ;; | |
64ccbc99 | 5680 | esac |
ab87f8c8 JL |
5681 | done |
5682 | ||
11642c3a | 5683 | tm_p_file_list= |
e22340b0 | 5684 | tm_p_include_list= |
11642c3a | 5685 | for f in $tm_p_file; do |
4977bab6 ZW |
5686 | case $f in |
5687 | tm-preds.h ) | |
e22340b0 ZW |
5688 | tm_p_file_list="${tm_p_file_list} $f" |
5689 | tm_p_include_list="${tm_p_include_list} $f" | |
5690 | ;; | |
5691 | * ) | |
5692 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
5693 | tm_p_include_list="${tm_p_include_list} config/$f" | |
5694 | esac | |
5695 | done | |
5696 | ||
5697 | xm_file_list= | |
5698 | xm_include_list= | |
5699 | for f in $xm_file; do | |
5700 | case $f in | |
5701 | ansidecl.h ) | |
5702 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
5703 | xm_include_list="${xm_include_list} $f" | |
5704 | ;; | |
5705 | auto-host.h ) | |
5706 | xm_file_list="${xm_file_list} $f" | |
5707 | xm_include_list="${xm_include_list} $f" | |
5708 | ;; | |
5709 | * ) | |
5710 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
5711 | xm_include_list="${xm_include_list} config/$f" | |
5712 | ;; | |
4977bab6 | 5713 | esac |
11642c3a ZW |
5714 | done |
5715 | ||
ab87f8c8 | 5716 | host_xm_file_list= |
e22340b0 | 5717 | host_xm_include_list= |
ab87f8c8 | 5718 | for f in $host_xm_file; do |
64ccbc99 | 5719 | case $f in |
d02af173 | 5720 | ansidecl.h ) |
e22340b0 ZW |
5721 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
5722 | host_xm_include_list="${host_xm_include_list} $f" | |
5723 | ;; | |
e2500fed | 5724 | auto-host.h ) |
e22340b0 ZW |
5725 | host_xm_file_list="${host_xm_file_list} $f" |
5726 | host_xm_include_list="${host_xm_include_list} $f" | |
5727 | ;; | |
5728 | * ) | |
5729 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
5730 | host_xm_include_list="${host_xm_include_list} config/$f" | |
5731 | ;; | |
64ccbc99 | 5732 | esac |
ab87f8c8 JL |
5733 | done |
5734 | ||
5735 | build_xm_file_list= | |
5736 | for f in $build_xm_file; do | |
64ccbc99 | 5737 | case $f in |
d02af173 | 5738 | ansidecl.h ) |
e22340b0 ZW |
5739 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
5740 | build_xm_include_list="${build_xm_include_list} $f" | |
5741 | ;; | |
e2500fed | 5742 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
5743 | build_xm_file_list="${build_xm_file_list} $f" |
5744 | build_xm_include_list="${build_xm_include_list} $f" | |
5745 | ;; | |
5746 | * ) | |
5747 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
5748 | build_xm_include_list="${build_xm_include_list} config/$f" | |
5749 | ;; | |
64ccbc99 | 5750 | esac |
ab87f8c8 JL |
5751 | done |
5752 | ||
a078a589 ZW |
5753 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
5754 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
093e61a6 RS |
5755 | CROSS= |
5756 | ALL=all.internal | |
5757 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
5758 | if test x$host != x$target |
5759 | then | |
a078a589 ZW |
5760 | CROSS="-DCROSS_COMPILE" |
5761 | ALL=all.cross | |
5762 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 | 5763 | case "$host","$target" in |
3a7e8b87 GK |
5764 | # Darwin crosses can use the host system's libraries and headers, |
5765 | # because of the fat library support. Of course, it must be the | |
5766 | # same version of Darwin on both sides. Allow the user to | |
5767 | # just say --target=foo-darwin without a version number to mean | |
5768 | # "the version on this system". | |
5769 | *-*-darwin*,*-*-darwin*) | |
5770 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
5771 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
5772 | if test $hostos = $targetos -o $targetos = darwin ; then | |
5773 | CROSS= | |
5774 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
5775 | with_headers=yes | |
5776 | fi | |
5777 | ;; | |
5778 | ||
343f59d9 AM |
5779 | i?86-*-*,x86_64-*-* \ |
5780 | | powerpc*-*-*,powerpc64*-*-*) | |
5781 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
5782 | esac | |
7a615b25 AO |
5783 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
5784 | # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) | |
5785 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
5786 | fi |
5787 | ||
b39d221a EC |
5788 | # If this is a cross-compiler that does not |
5789 | # have its own set of headers then define | |
5790 | # inhibit_libc | |
5791 | ||
dc06db20 R |
5792 | # If this is using newlib, without having the headers available now, |
5793 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
5794 | # This prevents libgcc2 from containing any code which requires libc |
5795 | # support. | |
b39d221a | 5796 | inhibit_libc= |
dc06db20 R |
5797 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
5798 | test x$with_newlib = xyes ; } && | |
e50084fa | 5799 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
b39d221a | 5800 | inhibit_libc=-Dinhibit_libc |
b39d221a EC |
5801 | fi |
5802 | ||
5803 | ||
a078a589 ZW |
5804 | # When building gcc with a cross-compiler, we need to adjust things so |
5805 | # that the generator programs are still built with the native compiler. | |
5806 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
5807 | |
5808 | # These are the normal (build=host) settings: | |
093e61a6 RS |
5809 | BUILD_PREFIX= |
5810 | BUILD_PREFIX_1=ignore- | |
eaf9f3b2 | 5811 | CC_FOR_BUILD='$(CC)' |
093e61a6 | 5812 | BUILD_CFLAGS='$(ALL_CFLAGS)' |
a078a589 | 5813 | |
093e61a6 | 5814 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
5815 | |
5816 | # Possibly disable fixproto, on a per-target basis. | |
5817 | case ${use_fixproto} in | |
5818 | no) | |
5819 | STMP_FIXPROTO= | |
5820 | ;; | |
5821 | yes) | |
5822 | STMP_FIXPROTO=stmp-fixproto | |
5823 | ;; | |
5824 | esac | |
5825 | ||
a078a589 | 5826 | |
83599948 NS |
5827 | # And these apply if build != host, or we are generating coverage data |
5828 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 5829 | then |
5c35940c NN |
5830 | BUILD_PREFIX=build- |
5831 | BUILD_PREFIX_1=build- | |
b11e4747 | 5832 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 5833 | |
7a615b25 AO |
5834 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
5835 | STMP_FIXINC= | |
5836 | STMP_FIXPROTO= | |
5837 | fi | |
ab87f8c8 JL |
5838 | fi |
5839 | ||
5840 | # Expand extra_headers to include complete path. | |
5841 | # This substitutes for lots of t-* files. | |
5842 | extra_headers_list= | |
b1ef58c8 NN |
5843 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
5844 | for file in ${extra_headers} ; do | |
5845 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
5846 | done | |
ab87f8c8 | 5847 | |
ab87f8c8 | 5848 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
5849 | case $use_collect2 in |
5850 | no) use_collect2= ;; | |
5851 | "") ;; | |
093e61a6 | 5852 | *) |
34a86c2b NN |
5853 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
5854 | xm_defines="${xm_defines} USE_COLLECT2" | |
5855 | ;; | |
5856 | esac | |
ab87f8c8 | 5857 | |
d869a8c4 NN |
5858 | # Identify the assembler which will work hand-in-glove with the newly |
5859 | # built GCC, so that we can examine its features. This is the assembler | |
5860 | # which will be driven by the driver program. | |
5861 | # | |
5862 | # If build != host, and we aren't building gas in-tree, we identify a | |
5863 | # build->target assembler and hope that it will have the same features | |
5864 | # as the host->target assembler we'll be using. | |
093e61a6 | 5865 | echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 |
2c4902b9 | 5866 | echo "configure:5867: checking what assembler to use" >&5 |
34a86c2b | 5867 | in_tree_gas=no |
ab87f8c8 | 5868 | gcc_cv_as= |
981d4858 JM |
5869 | gcc_cv_gas_major_version= |
5870 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
5871 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
5872 | if test -x "$DEFAULT_ASSEMBLER"; then | |
5873 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
5874 | elif test -x "$AS"; then | |
5875 | gcc_cv_as="$AS" | |
5876 | elif test -x as$host_exeext; then | |
5877 | # Build using assembler in the current directory. | |
5878 | gcc_cv_as=./as$host_exeext | |
34a86c2b NN |
5879 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
5880 | && test -f ../gas/Makefile; then | |
ad9c4d9f NN |
5881 | # Single tree build which includes gas. |
5882 | in_tree_gas=yes | |
5883 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
5884 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
5885 | $gcc_cv_as_gas_srcdir/configure \ | |
5886 | $gcc_cv_as_gas_srcdir/configure.in \ | |
5887 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
5888 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
5889 | if test x$gcc_cv_gas_version != x; then | |
5890 | break | |
5891 | fi | |
5892 | done | |
5893 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
5894 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
5895 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
5896 | case $gcc_cv_gas_patch_version in |
5897 | "") gcc_cv_gas_patch_version="0" ;; | |
5898 | esac | |
8ada417f ZW |
5899 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
5900 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
5901 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 5902 | |
f9c1196a ZW |
5903 | rm -f as$host_exeext |
5904 | $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
5408ac6c HPN |
5905 | in_tree_gas_is_elf=no |
5906 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
5907 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
5908 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
5909 | then | |
5910 | in_tree_gas_is_elf=yes | |
5911 | fi | |
981d4858 | 5912 | fi |
9e423e6d | 5913 | |
534d0cc0 | 5914 | if test "x$gcc_cv_as" = x; then |
779243f7 JL |
5915 | # Search the same directories that the installed compiler will |
5916 | # search. Else we may find the wrong assembler and lose. If we | |
5917 | # do not find a suitable assembler binary, then try the user's | |
5918 | # path. | |
5919 | # | |
5920 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
5921 | # user's path. Unfortunately, there is no good way to get at the | |
5922 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
5923 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
5924 | # to be fixed as part of the make/configure rewrite too. | |
5925 | ||
5926 | if test "x$exec_prefix" = xNONE; then | |
5927 | if test "x$prefix" = xNONE; then | |
5928 | test_prefix=/usr/local | |
5929 | else | |
5930 | test_prefix=$prefix | |
5931 | fi | |
5932 | else | |
5933 | test_prefix=$exec_prefix | |
5934 | fi | |
5935 | ||
5936 | # If the loop below does not find an assembler, then use whatever | |
5937 | # one we can find in the users's path. | |
5938 | # user's path. | |
55a2ea2a AM |
5939 | if test "x$program_prefix" != xNONE; then |
5940 | gcc_cv_as=${program_prefix}as$host_exeext | |
5941 | else | |
5942 | gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext | |
5943 | fi | |
5944 | ||
caa55b1e NN |
5945 | test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \ |
5946 | $test_prefix/lib/gcc-lib/$target_noncanonical \ | |
5947 | /usr/lib/gcc/$target_noncanonical/$gcc_version \ | |
5948 | /usr/lib/gcc/$target_noncanonical \ | |
5949 | $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ | |
5950 | $test_prefix/$target_noncanonical/bin" | |
55a2ea2a AM |
5951 | |
5952 | if test x$host = x$target; then | |
5953 | test_dirs="$test_dirs \ | |
779243f7 JL |
5954 | /usr/libexec \ |
5955 | /usr/ccs/gcc \ | |
5956 | /usr/ccs/bin \ | |
5957 | /udk/usr/ccs/bin \ | |
5958 | /bsd43/usr/lib/cmplrs/cc \ | |
5959 | /usr/cross64/usr/bin \ | |
5960 | /usr/lib/cmplrs/cc \ | |
5961 | /sysv/usr/lib/cmplrs/cc \ | |
5962 | /svr4/usr/lib/cmplrs/cc \ | |
5963 | /usr/bin" | |
55a2ea2a | 5964 | fi |
779243f7 JL |
5965 | |
5966 | for dir in $test_dirs; do | |
55a2ea2a | 5967 | if test -x $dir/as$host_exeext; then |
779243f7 JL |
5968 | gcc_cv_as=$dir/as$host_exeext |
5969 | break; | |
5970 | fi | |
5971 | done | |
9e423e6d | 5972 | fi |
34a86c2b NN |
5973 | case $in_tree_gas in |
5974 | yes) | |
093e61a6 | 5975 | echo "$ac_t"""newly built gas"" 1>&6 |
34a86c2b NN |
5976 | ;; |
5977 | no) | |
093e61a6 | 5978 | echo "$ac_t""$gcc_cv_as" 1>&6 |
34a86c2b NN |
5979 | ;; |
5980 | esac | |
981d4858 | 5981 | |
d869a8c4 NN |
5982 | # Identify the linker which will work hand-in-glove with the newly |
5983 | # built GCC, so that we can examine its features. This is the linker | |
5984 | # which will be driven by the driver program. | |
5985 | # | |
5986 | # If build != host, and we aren't building gas in-tree, we identify a | |
5987 | # build->target linker and hope that it will have the same features | |
5988 | # as the host->target linker we'll be using. | |
093e61a6 | 5989 | echo $ac_n "checking what linker to use""... $ac_c" 1>&6 |
2c4902b9 | 5990 | echo "configure:5991: checking what linker to use" >&5 |
34a86c2b | 5991 | in_tree_ld=no |
275b60d6 JJ |
5992 | gcc_cv_ld= |
5993 | gcc_cv_gld_major_version= | |
5994 | gcc_cv_gld_minor_version= | |
5995 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
5996 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
5997 | if test -x "$DEFAULT_LINKER"; then | |
5998 | gcc_cv_ld="$DEFAULT_LINKER" | |
5999 | elif test -x "$LD"; then | |
6000 | gcc_cv_ld="$LD" | |
f9c1196a | 6001 | elif test -x collect-ld$host_exeext; then |
275b60d6 | 6002 | # Build using linker in the current directory. |
f9c1196a | 6003 | gcc_cv_ld=./collect-ld$host_exeext |
34a86c2b NN |
6004 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
6005 | && test -f ../ld/Makefile; then | |
275b60d6 | 6006 | # Single tree build which includes ld. |
34a86c2b | 6007 | in_tree_ld=yes |
5408ac6c HPN |
6008 | in_tree_ld_is_elf=no |
6009 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
6010 | || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then | |
6011 | in_tree_ld_is_elf=yes | |
6012 | fi | |
275b60d6 JJ |
6013 | for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in |
6014 | do | |
6015 | gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
6016 | if test x$gcc_cv_gld_version != x; then | |
6017 | break | |
6018 | fi | |
6019 | done | |
6020 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
6021 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
f9c1196a ZW |
6022 | rm -f collect-ld$host_exeext |
6023 | $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ | |
6024 | 2>/dev/null | |
275b60d6 JJ |
6025 | fi |
6026 | ||
534d0cc0 | 6027 | if test "x$gcc_cv_ld" = x; then |
275b60d6 JJ |
6028 | # Search the same directories that the installed compiler will |
6029 | # search. Else we may find the wrong linker and lose. If we | |
6030 | # do not find a suitable linker binary, then try the user's | |
6031 | # path. | |
6032 | # | |
6033 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
6034 | # user's path. Unfortunately, there is no good way to get at the | |
6035 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
6036 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
6037 | # to be fixed as part of the make/configure rewrite too. | |
6038 | ||
6039 | if test "x$exec_prefix" = xNONE; then | |
6040 | if test "x$prefix" = xNONE; then | |
6041 | test_prefix=/usr/local | |
6042 | else | |
6043 | test_prefix=$prefix | |
6044 | fi | |
6045 | else | |
6046 | test_prefix=$exec_prefix | |
6047 | fi | |
6048 | ||
6049 | # If the loop below does not find an linker, then use whatever | |
6050 | # one we can find in the users's path. | |
6051 | # user's path. | |
55a2ea2a AM |
6052 | if test "x$program_prefix" != xNONE; then |
6053 | gcc_cv_ld=${program_prefix}ld$host_exeext | |
6054 | else | |
6055 | gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext | |
6056 | fi | |
6057 | ||
caa55b1e NN |
6058 | test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \ |
6059 | $test_prefix/lib/gcc-lib/$target_noncanonical \ | |
6060 | /usr/lib/gcc/$target_noncanonical/$gcc_version \ | |
6061 | /usr/lib/gcc/$target_noncanonical \ | |
6062 | $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ | |
6063 | $test_prefix/$target_noncanonical/bin" | |
55a2ea2a AM |
6064 | |
6065 | if test x$host = x$target; then | |
6066 | test_dirs="$test_dirs \ | |
275b60d6 JJ |
6067 | /usr/libexec \ |
6068 | /usr/ccs/gcc \ | |
6069 | /usr/ccs/bin \ | |
6070 | /udk/usr/ccs/bin \ | |
6071 | /bsd43/usr/lib/cmplrs/cc \ | |
6072 | /usr/cross64/usr/bin \ | |
6073 | /usr/lib/cmplrs/cc \ | |
6074 | /sysv/usr/lib/cmplrs/cc \ | |
6075 | /svr4/usr/lib/cmplrs/cc \ | |
6076 | /usr/bin" | |
55a2ea2a | 6077 | fi |
275b60d6 JJ |
6078 | |
6079 | for dir in $test_dirs; do | |
55a2ea2a | 6080 | if test -x $dir/ld$host_exeext; then |
275b60d6 JJ |
6081 | gcc_cv_ld=$dir/ld$host_exeext |
6082 | break; | |
6083 | fi | |
6084 | done | |
6085 | fi | |
34a86c2b NN |
6086 | case $in_tree_ld in |
6087 | yes) | |
093e61a6 | 6088 | echo "$ac_t"""newly built ld"" 1>&6 |
34a86c2b NN |
6089 | ;; |
6090 | no) | |
093e61a6 | 6091 | echo "$ac_t""$gcc_cv_ld" 1>&6 |
34a86c2b NN |
6092 | ;; |
6093 | esac | |
275b60d6 | 6094 | |
981d4858 | 6095 | # Figure out what nm we will be using. |
f9c1196a | 6096 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
093e61a6 | 6097 | echo $ac_n "checking what nm to use""... $ac_c" 1>&6 |
2c4902b9 | 6098 | echo "configure:6099: checking what nm to use" >&5 |
f9c1196a | 6099 | in_tree_nm=no |
981d4858 JM |
6100 | if test -x nm$host_exeext; then |
6101 | gcc_cv_nm=./nm$host_exeext | |
f9c1196a ZW |
6102 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
6103 | && test -f ../binutils/Makefile; then | |
6104 | # Single tree build which includes binutils. | |
6105 | in_tree_nm=yes | |
6106 | gcc_cv_nm=./nm$host_exeext | |
6107 | rm -f nm$host_exeext | |
6108 | $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
534d0cc0 AM |
6109 | elif test "x$program_prefix" != xNONE; then |
6110 | gcc_cv_nm=${program_prefix}nm$host_exeext | |
6111 | else | |
6112 | gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext | |
981d4858 | 6113 | fi |
f9c1196a | 6114 | case $in_tree_nm in |
093e61a6 RS |
6115 | yes) echo "$ac_t"""newly built nm"" 1>&6 ;; |
6116 | no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;; | |
f9c1196a | 6117 | esac |
981d4858 | 6118 | |
3cae5780 | 6119 | # Figure out what objdump we will be using. |
093e61a6 | 6120 | echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 |
2c4902b9 | 6121 | echo "configure:6122: checking what objdump to use" >&5 |
f9c1196a | 6122 | in_tree_objdump=no |
3cae5780 AS |
6123 | if test -x objdump$host_exeext; then |
6124 | gcc_cv_objdump=./objdump$host_exeext | |
f9c1196a ZW |
6125 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
6126 | && test -f ../binutils/Makefile; then | |
6127 | # Single tree build which includes binutils. | |
6128 | in_tree_objdump=yes | |
6129 | gcc_cv_objdump=./objdump$host_exeext | |
6130 | rm -f objdump$host_exeext | |
6131 | $symbolic_link ../binutils/objdump$host_exeext \ | |
6132 | objdump$host_exeext 2>/dev/null | |
534d0cc0 AM |
6133 | elif test "x$program_prefix" != xNONE; then |
6134 | gcc_cv_objdump=${program_prefix}objdump$host_exeext | |
6135 | else | |
f9c1196a ZW |
6136 | gcc_cv_objdump=`echo objdump | \ |
6137 | sed ${program_transform_name}`$host_exeext | |
3cae5780 | 6138 | fi |
f9c1196a | 6139 | case $in_tree_objdump in |
093e61a6 RS |
6140 | yes) echo "$ac_t"""newly built objdump"" 1>&6 ;; |
6141 | no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;; | |
f9c1196a | 6142 | esac |
3cae5780 | 6143 | |
981d4858 | 6144 | # Figure out what assembler alignment features are present. |
8ada417f | 6145 | echo $ac_n "checking assembler for .balign and .p2align""... $ac_c" 1>&6 |
2c4902b9 | 6146 | echo "configure:6147: checking assembler for .balign and .p2align" >&5 |
8ada417f ZW |
6147 | if eval "test \"`echo '$''{'gcc_cv_as_balign_and_p2align'+set}'`\" = set"; then |
6148 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6149 | else | |
6150 | gcc_cv_as_balign_and_p2align=no | |
6151 | if test $in_tree_gas = yes; then | |
6152 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
6153 | then gcc_cv_as_balign_and_p2align=yes | |
6154 | fi | |
6155 | elif test x$gcc_cv_as != x; then | |
6156 | echo '.balign 4 | |
6157 | .p2align 2' > conftest.s | |
2c4902b9 | 6158 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6159 | then |
6160 | gcc_cv_as_balign_and_p2align=yes | |
6161 | else | |
6162 | echo "configure: failed program was" >&5 | |
6163 | cat conftest.s >&5 | |
6164 | fi | |
6165 | rm -f conftest.o conftest.s | |
6166 | fi | |
6167 | fi | |
ad9c4d9f | 6168 | |
8ada417f ZW |
6169 | echo "$ac_t""$gcc_cv_as_balign_and_p2align" 1>&6 |
6170 | if test $gcc_cv_as_balign_and_p2align = yes; then | |
6171 | cat >> confdefs.h <<\EOF | |
981d4858 | 6172 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
093e61a6 | 6173 | EOF |
981d4858 | 6174 | |
ad9c4d9f NN |
6175 | fi |
6176 | ||
8ada417f | 6177 | echo $ac_n "checking assembler for .p2align with maximum skip""... $ac_c" 1>&6 |
2c4902b9 | 6178 | echo "configure:6179: checking assembler for .p2align with maximum skip" >&5 |
8ada417f ZW |
6179 | if eval "test \"`echo '$''{'gcc_cv_as_max_skip_p2align'+set}'`\" = set"; then |
6180 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6181 | else | |
6182 | gcc_cv_as_max_skip_p2align=no | |
6183 | if test $in_tree_gas = yes; then | |
6184 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
6185 | then gcc_cv_as_max_skip_p2align=yes | |
6186 | fi | |
6187 | elif test x$gcc_cv_as != x; then | |
6188 | echo '.p2align 4,,7' > conftest.s | |
2c4902b9 | 6189 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6190 | then |
6191 | gcc_cv_as_max_skip_p2align=yes | |
6192 | else | |
6193 | echo "configure: failed program was" >&5 | |
6194 | cat conftest.s >&5 | |
6195 | fi | |
6196 | rm -f conftest.o conftest.s | |
6197 | fi | |
ad9c4d9f NN |
6198 | fi |
6199 | ||
8ada417f ZW |
6200 | echo "$ac_t""$gcc_cv_as_max_skip_p2align" 1>&6 |
6201 | if test $gcc_cv_as_max_skip_p2align = yes; then | |
6202 | cat >> confdefs.h <<\EOF | |
9e423e6d | 6203 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
093e61a6 | 6204 | EOF |
9e423e6d | 6205 | |
9e423e6d | 6206 | fi |
ad9c4d9f | 6207 | |
8ada417f | 6208 | echo $ac_n "checking assembler for working .subsection -1""... $ac_c" 1>&6 |
2c4902b9 | 6209 | echo "configure:6210: checking assembler for working .subsection -1" >&5 |
8ada417f ZW |
6210 | if eval "test \"`echo '$''{'gcc_cv_as_subsection_m1'+set}'`\" = set"; then |
6211 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6212 | else | |
6213 | gcc_cv_as_subsection_m1=no | |
6214 | if test $in_tree_gas = yes; then | |
6215 | if test $in_tree_gas_is_elf = yes \ | |
6216 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
6217 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 6218 | fi |
8ada417f ZW |
6219 | elif test x$gcc_cv_as != x; then |
6220 | echo 'conftest_label1: .word 0 | |
d1accaa3 JJ |
6221 | .subsection -1 |
6222 | conftest_label2: .word 0 | |
8ada417f | 6223 | .previous' > conftest.s |
2c4902b9 | 6224 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6225 | then |
6226 | if test x$gcc_cv_nm != x; then | |
6227 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
6228 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
6229 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
6230 | then : | |
6231 | else gcc_cv_as_subsection_m1=yes | |
6232 | fi | |
6233 | rm -f conftest.nm1 conftest.nm2 | |
6234 | fi | |
6235 | else | |
6236 | echo "configure: failed program was" >&5 | |
6237 | cat conftest.s >&5 | |
6238 | fi | |
6239 | rm -f conftest.o conftest.s | |
6240 | fi | |
981d4858 | 6241 | fi |
8ada417f ZW |
6242 | |
6243 | echo "$ac_t""$gcc_cv_as_subsection_m1" 1>&6 | |
6244 | if test $gcc_cv_as_subsection_m1 = yes; then | |
6245 | cat >> confdefs.h <<\EOF | |
981d4858 | 6246 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
093e61a6 | 6247 | EOF |
981d4858 | 6248 | |
d1accaa3 | 6249 | fi |
ad9c4d9f | 6250 | |
8ada417f | 6251 | echo $ac_n "checking assembler for .weak""... $ac_c" 1>&6 |
2c4902b9 | 6252 | echo "configure:6253: checking assembler for .weak" >&5 |
8ada417f ZW |
6253 | if eval "test \"`echo '$''{'gcc_cv_as_weak'+set}'`\" = set"; then |
6254 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6255 | else | |
6256 | gcc_cv_as_weak=no | |
6257 | if test $in_tree_gas = yes; then | |
6258 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
6259 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 6260 | fi |
8ada417f ZW |
6261 | elif test x$gcc_cv_as != x; then |
6262 | echo ' .weak foobar' > conftest.s | |
2c4902b9 | 6263 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6264 | then |
6265 | gcc_cv_as_weak=yes | |
6266 | else | |
6267 | echo "configure: failed program was" >&5 | |
6268 | cat conftest.s >&5 | |
6269 | fi | |
6270 | rm -f conftest.o conftest.s | |
6271 | fi | |
981d4858 | 6272 | fi |
8ada417f ZW |
6273 | |
6274 | echo "$ac_t""$gcc_cv_as_weak" 1>&6 | |
6275 | if test $gcc_cv_as_weak = yes; then | |
6276 | cat >> confdefs.h <<\EOF | |
981d4858 | 6277 | #define HAVE_GAS_WEAK 1 |
093e61a6 | 6278 | EOF |
981d4858 | 6279 | |
12822146 | 6280 | fi |
ad9c4d9f | 6281 | |
8ada417f ZW |
6282 | # .hidden needs to be supported in both the assembler and the linker, |
6283 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
6284 | # This is irritatingly difficult to feature test for; we have to check the | |
6285 | # date string after the version number. If we've got an in-tree | |
6286 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
6287 | # to be safe. | |
6288 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
6289 | echo $ac_n "checking assembler for .hidden""... $ac_c" 1>&6 | |
2c4902b9 | 6290 | echo "configure:6291: checking assembler for .hidden" >&5 |
8ada417f ZW |
6291 | if eval "test \"`echo '$''{'gcc_cv_as_hidden'+set}'`\" = set"; then |
6292 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6293 | else | |
6294 | gcc_cv_as_hidden=no | |
6295 | if test $in_tree_gas = yes; then | |
6296 | if test $in_tree_gas_is_elf = yes \ | |
6297 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
6298 | then gcc_cv_as_hidden=yes | |
6299 | fi | |
6300 | elif test x$gcc_cv_as != x; then | |
6301 | echo ' .hidden foobar | |
6302 | foobar:' > conftest.s | |
2c4902b9 | 6303 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6304 | then |
6305 | gcc_cv_as_hidden=yes | |
6306 | else | |
6307 | echo "configure: failed program was" >&5 | |
6308 | cat conftest.s >&5 | |
6309 | fi | |
6310 | rm -f conftest.o conftest.s | |
6311 | fi | |
6312 | fi | |
ad9c4d9f | 6313 | |
8ada417f | 6314 | echo "$ac_t""$gcc_cv_as_hidden" 1>&6 |
ad9c4d9f | 6315 | |
ad9c4d9f | 6316 | |
8ada417f | 6317 | echo $ac_n "checking linker for .hidden support""... $ac_c" 1>&6 |
2c4902b9 | 6318 | echo "configure:6319: checking linker for .hidden support" >&5 |
8ada417f ZW |
6319 | if eval "test \"`echo '$''{'gcc_cv_ld_hidden'+set}'`\" = set"; then |
6320 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6321 | else | |
6322 | if test $in_tree_ld = yes ; then | |
6323 | gcc_cv_ld_hidden=no | |
6324 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
6325 | && test $in_tree_ld_is_elf = yes; then | |
6326 | gcc_cv_ld_hidden=yes | |
6327 | fi | |
6328 | else | |
6329 | gcc_cv_ld_hidden=yes | |
bace148a | 6330 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
6331 | if echo "$ld_ver" | grep GNU > /dev/null; then |
6332 | ld_vers=`echo $ld_ver | sed -n \ | |
6333 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
6334 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
6335 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
6336 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
6337 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
6338 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'` | |
6339 | ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` | |
6340 | if test 0"$ld_date" -lt 20020404; then | |
6341 | if test -n "$ld_date"; then | |
6342 | # If there was date string, but was earlier than 2002-04-04, fail | |
6343 | gcc_cv_ld_hidden=no | |
6344 | elif test -z "$ld_vers"; then | |
6345 | # If there was no date string nor ld version number, something is wrong | |
6346 | gcc_cv_ld_hidden=no | |
6347 | else | |
6348 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
6349 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
6350 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
6351 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
6352 | if test "$ld_vers_major" -lt 2; then | |
6353 | gcc_cv_ld_hidden=no | |
6354 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
6355 | gcc_cv_ld_hidden="no" | |
6356 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
6357 | gcc_cv_ld_hidden=no | |
c72931a6 | 6358 | fi |
8ada417f | 6359 | fi |
789b7de5 | 6360 | fi |
8ada417f | 6361 | else |
eb53bcc0 | 6362 | # non-GNU linkers don't seem to support .hidden yet |
dc5f3d7c | 6363 | gcc_cv_ld_hidden=no |
8ada417f ZW |
6364 | fi |
6365 | fi | |
6d07784a | 6366 | fi |
ad9c4d9f | 6367 | |
8ada417f ZW |
6368 | echo "$ac_t""$gcc_cv_ld_hidden" 1>&6 |
6369 | libgcc_visibility=no | |
ad9c4d9f | 6370 | |
8e3940b2 | 6371 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f ZW |
6372 | libgcc_visibility=yes |
6373 | cat >> confdefs.h <<\EOF | |
6374 | #define HAVE_GAS_HIDDEN 1 | |
6375 | EOF | |
ad9c4d9f NN |
6376 | |
6377 | fi | |
6378 | ||
8ada417f ZW |
6379 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
6380 | echo $ac_n "checking assembler for .sleb128 and .uleb128""... $ac_c" 1>&6 | |
2c4902b9 | 6381 | echo "configure:6382: checking assembler for .sleb128 and .uleb128" >&5 |
8ada417f ZW |
6382 | if eval "test \"`echo '$''{'gcc_cv_as_leb128'+set}'`\" = set"; then |
6383 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6384 | else | |
6385 | gcc_cv_as_leb128=no | |
6386 | if test $in_tree_gas = yes; then | |
6387 | if test $in_tree_gas_is_elf = yes \ | |
6388 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
6389 | then gcc_cv_as_leb128=yes | |
6390 | fi | |
6391 | elif test x$gcc_cv_as != x; then | |
6392 | echo ' .data | |
b7460f24 RH |
6393 | .uleb128 L2 - L1 |
6394 | L1: | |
6395 | .uleb128 1280 | |
6396 | .sleb128 -1010 | |
8ada417f | 6397 | L2:' > conftest.s |
2c4902b9 | 6398 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6399 | then |
6400 | # GAS versions before 2.11 do not support uleb128, | |
6401 | # despite appearing to. | |
6402 | # ??? There exists an elf-specific test that will crash | |
6403 | # the assembler. Perhaps it's better to figure out whether | |
6404 | # arbitrary sections are supported and try the test. | |
bace148a | 6405 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
6406 | if echo "$as_ver" | grep GNU > /dev/null; then |
6407 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
6408 | as_major=`echo $as_ver | sed 's/\..*//'` | |
6409 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
6410 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
6411 | then : | |
6412 | else gcc_cv_as_leb128=yes | |
6413 | fi | |
6414 | fi | |
6415 | else | |
6416 | echo "configure: failed program was" >&5 | |
6417 | cat conftest.s >&5 | |
6418 | fi | |
6419 | rm -f conftest.o conftest.s | |
6420 | fi | |
b7460f24 | 6421 | fi |
8ada417f ZW |
6422 | |
6423 | echo "$ac_t""$gcc_cv_as_leb128" 1>&6 | |
6424 | if test $gcc_cv_as_leb128 = yes; then | |
6425 | cat >> confdefs.h <<\EOF | |
b7460f24 | 6426 | #define HAVE_AS_LEB128 1 |
093e61a6 | 6427 | EOF |
b7460f24 RH |
6428 | |
6429 | fi | |
ad9c4d9f | 6430 | |
8ada417f ZW |
6431 | # GAS versions up to and including 2.11.0 may mis-optimize |
6432 | # .eh_frame data. | |
6433 | echo $ac_n "checking assembler for eh_frame optimization""... $ac_c" 1>&6 | |
2c4902b9 | 6434 | echo "configure:6435: checking assembler for eh_frame optimization" >&5 |
8ada417f ZW |
6435 | if eval "test \"`echo '$''{'gcc_cv_as_eh_frame'+set}'`\" = set"; then |
6436 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6437 | else | |
6438 | gcc_cv_as_eh_frame=no | |
6439 | if test $in_tree_gas = yes; then | |
6440 | if test $in_tree_gas_is_elf = yes \ | |
6441 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
6442 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 6443 | fi |
8ada417f ZW |
6444 | elif test x$gcc_cv_as != x; then |
6445 | echo ' .text | |
c64688ae RH |
6446 | .LFB1: |
6447 | .4byte 0 | |
6448 | .L1: | |
6449 | .4byte 0 | |
6450 | .LFE1: | |
6451 | .section .eh_frame,"aw",@progbits | |
6452 | __FRAME_BEGIN__: | |
6453 | .4byte .LECIE1-.LSCIE1 | |
6454 | .LSCIE1: | |
6455 | .4byte 0x0 | |
6456 | .byte 0x1 | |
6457 | .ascii "z\0" | |
6458 | .byte 0x1 | |
6459 | .byte 0x78 | |
6460 | .byte 0x1a | |
6461 | .byte 0x0 | |
6462 | .byte 0x4 | |
6463 | .4byte 1 | |
6464 | .p2align 1 | |
6465 | .LECIE1: | |
6466 | .LSFDE1: | |
6467 | .4byte .LEFDE1-.LASFDE1 | |
6468 | .LASFDE1: | |
6469 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
6470 | .4byte .LFB1 | |
6471 | .4byte .LFE1-.LFB1 | |
6472 | .byte 0x4 | |
6473 | .4byte .LFE1-.LFB1 | |
6474 | .byte 0x4 | |
6475 | .4byte .L1-.LFB1 | |
8ada417f | 6476 | .LEFDE1:' > conftest.s |
2c4902b9 | 6477 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6478 | then |
6479 | cat > conftest.lit <<EOF | |
c64688ae RH |
6480 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
6481 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 6482 | 0020 08000000 04080000 0044 .........D |
01efb963 | 6483 | EOF |
8ada417f | 6484 | cat > conftest.big <<EOF |
01efb963 AS |
6485 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
6486 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 6487 | 0020 00000008 04000000 0844 .........D |
c64688ae | 6488 | EOF |
8ada417f ZW |
6489 | # If the assembler didn't choke, and we can objdump, |
6490 | # and we got the correct data, then succeed. | |
6491 | if test x$gcc_cv_objdump != x \ | |
6492 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
6493 | | tail -3 > conftest.got \ | |
6494 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ | |
6495 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
6496 | then | |
6497 | gcc_cv_as_eh_frame=yes | |
2c4902b9 | 6498 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'; { (eval echo configure:6499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
8ada417f ZW |
6499 | gcc_cv_as_eh_frame=buggy |
6500 | else | |
6501 | # Uh oh, what do we do now? | |
6502 | gcc_cv_as_eh_frame=no | |
6503 | fi | |
6504 | else | |
6505 | echo "configure: failed program was" >&5 | |
6506 | cat conftest.s >&5 | |
6507 | fi | |
6508 | rm -f conftest.o conftest.s | |
6509 | fi | |
c64688ae | 6510 | fi |
c64688ae | 6511 | |
8ada417f | 6512 | echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 |
ad9c4d9f NN |
6513 | |
6514 | ||
8ada417f ZW |
6515 | if test $gcc_cv_as_eh_frame = buggy; then |
6516 | cat >> confdefs.h <<\EOF | |
6517 | #define USE_AS_TRADITIONAL_FORMAT 1 | |
6518 | EOF | |
ad9c4d9f NN |
6519 | |
6520 | fi | |
6521 | ||
8ada417f | 6522 | echo $ac_n "checking assembler for section merging support""... $ac_c" 1>&6 |
2c4902b9 | 6523 | echo "configure:6524: checking assembler for section merging support" >&5 |
8ada417f ZW |
6524 | if eval "test \"`echo '$''{'gcc_cv_as_shf_merge'+set}'`\" = set"; then |
6525 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6526 | else | |
6527 | gcc_cv_as_shf_merge=no | |
6528 | if test $in_tree_gas = yes; then | |
6529 | if test $in_tree_gas_is_elf = yes \ | |
6530 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
6531 | then gcc_cv_as_shf_merge=yes | |
6532 | fi | |
6533 | elif test x$gcc_cv_as != x; then | |
6534 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s | |
2c4902b9 | 6535 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'; { (eval echo configure:6536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6536 | then |
6537 | gcc_cv_as_shf_merge=yes | |
6538 | else | |
6539 | echo "configure: failed program was" >&5 | |
6540 | cat conftest.s >&5 | |
6541 | fi | |
6542 | rm -f conftest.o conftest.s | |
6543 | fi | |
201556f0 | 6544 | fi |
8ada417f ZW |
6545 | |
6546 | echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 | |
8ad9fb33 AP |
6547 | |
6548 | cat >> confdefs.h <<EOF | |
6549 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` | |
093e61a6 | 6550 | EOF |
201556f0 | 6551 | |
201556f0 | 6552 | |
8ada417f | 6553 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
6554 | conftest_s= |
6555 | tls_first_major= | |
6556 | tls_first_minor= | |
9739c90c | 6557 | tls_as_opt= |
f996902d | 6558 | case "$target" in |
6f9b006d RH |
6559 | alpha*-*-*) |
6560 | conftest_s=' | |
6561 | .section ".tdata","awT",@progbits | |
6562 | foo: .long 25 | |
6563 | .text | |
6564 | ldq $27,__tls_get_addr($29) !literal!1 | |
6565 | lda $16,foo($29) !tlsgd!1 | |
6566 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
6567 | ldq $27,__tls_get_addr($29) !literal!2 | |
6568 | lda $16,foo($29) !tlsldm!2 | |
6569 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
6570 | ldq $1,foo($29) !gotdtprel | |
6571 | ldah $2,foo($29) !dtprelhi | |
6572 | lda $3,foo($2) !dtprello | |
6573 | lda $4,foo($29) !dtprel | |
6574 | ldq $1,foo($29) !gottprel | |
6575 | ldah $2,foo($29) !tprelhi | |
6576 | lda $3,foo($2) !tprello | |
6577 | lda $4,foo($29) !tprel' | |
6578 | tls_first_major=2 | |
6579 | tls_first_minor=13 | |
6580 | ;; | |
f996902d RH |
6581 | i[34567]86-*-*) |
6582 | conftest_s=' | |
6583 | .section ".tdata","awT",@progbits | |
6584 | foo: .long 25 | |
6585 | .text | |
6586 | movl %gs:0, %eax | |
6587 | leal foo@TLSGD(,%ebx,1), %eax | |
6588 | leal foo@TLSLDM(%ebx), %eax | |
6589 | leal foo@DTPOFF(%eax), %edx | |
6590 | movl foo@GOTTPOFF(%ebx), %eax | |
6591 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
6592 | addl foo@GOTNTPOFF(%ebx), %eax |
6593 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
6594 | movl $foo@TPOFF, %eax |
6595 | subl $foo@TPOFF, %eax | |
6596 | leal foo@NTPOFF(%ecx), %eax' | |
6597 | tls_first_major=2 | |
75d38379 JJ |
6598 | tls_first_minor=14 |
6599 | ;; | |
6600 | x86_64-*-*) | |
6601 | conftest_s=' | |
6602 | .section ".tdata","awT",@progbits | |
6603 | foo: .long 25 | |
6604 | .text | |
6605 | movq %fs:0, %rax | |
6606 | leaq foo@TLSGD(%rip), %rdi | |
6607 | leaq foo@TLSLD(%rip), %rdi | |
6608 | leaq foo@DTPOFF(%rax), %rdx | |
6609 | movq foo@GOTTPOFF(%rip), %rax | |
6610 | movq $foo@TPOFF, %rax' | |
6611 | tls_first_major=2 | |
6612 | tls_first_minor=14 | |
f996902d | 6613 | ;; |
7b6e506e RH |
6614 | ia64-*-*) |
6615 | conftest_s=' | |
6616 | .section ".tdata","awT",@progbits | |
6617 | foo: data8 25 | |
6618 | .text | |
6619 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
6620 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
6621 | addl r18 = @ltoff(@tprel(foo#)), gp | |
6622 | addl r19 = @dtprel(foo#), gp | |
6623 | adds r21 = @dtprel(foo#), r13 | |
6624 | movl r23 = @dtprel(foo#) | |
6625 | addl r20 = @tprel(foo#), gp | |
6626 | adds r22 = @tprel(foo#), r13 | |
6627 | movl r24 = @tprel(foo#)' | |
6628 | tls_first_major=2 | |
6629 | tls_first_minor=13 | |
6630 | ;; | |
c4501e62 JJ |
6631 | powerpc-*-*) |
6632 | conftest_s=' | |
6633 | .section ".tdata","awT",@progbits | |
6634 | .align 2 | |
6635 | ld0: .space 4 | |
6636 | ld1: .space 4 | |
6637 | x1: .space 4 | |
6638 | x2: .space 4 | |
6639 | x3: .space 4 | |
6640 | .text | |
6641 | addi 3,31,ld0@got@tlsgd | |
6642 | bl __tls_get_addr | |
6643 | addi 3,31,x1@got@tlsld | |
6644 | bl __tls_get_addr | |
6645 | addi 9,3,x1@dtprel | |
6646 | addis 9,3,x2@dtprel@ha | |
6647 | addi 9,9,x2@dtprel@l | |
6648 | lwz 9,x3@got@tprel(31) | |
6649 | add 9,9,x@tls | |
6650 | addi 9,2,x1@tprel | |
6651 | addis 9,2,x2@tprel@ha | |
6652 | addi 9,9,x2@tprel@l' | |
6653 | tls_first_major=2 | |
6654 | tls_first_minor=14 | |
9739c90c | 6655 | tls_as_opt=-a32 |
c4501e62 JJ |
6656 | ;; |
6657 | powerpc64-*-*) | |
6658 | conftest_s=' | |
6659 | .section ".tdata","awT",@progbits | |
6660 | .align 3 | |
6661 | ld0: .space 8 | |
6662 | ld1: .space 8 | |
6663 | x1: .space 8 | |
6664 | x2: .space 8 | |
6665 | x3: .space 8 | |
6666 | .text | |
6667 | addi 3,2,ld0@got@tlsgd | |
6668 | bl .__tls_get_addr | |
6669 | nop | |
6670 | addi 3,2,ld1@toc | |
6671 | bl .__tls_get_addr | |
6672 | nop | |
6673 | addi 3,2,x1@got@tlsld | |
6674 | bl .__tls_get_addr | |
6675 | nop | |
6676 | addi 9,3,x1@dtprel | |
6677 | bl .__tls_get_addr | |
6678 | nop | |
6679 | addis 9,3,x2@dtprel@ha | |
6680 | addi 9,9,x2@dtprel@l | |
6681 | bl .__tls_get_addr | |
6682 | nop | |
6683 | ld 9,x3@got@dtprel(2) | |
6684 | add 9,9,3 | |
6685 | bl .__tls_get_addr | |
6686 | nop' | |
6687 | tls_first_major=2 | |
6688 | tls_first_minor=14 | |
9739c90c | 6689 | tls_as_opt=-a64 |
c4501e62 | 6690 | ;; |
fd3cd001 UW |
6691 | s390-*-*) |
6692 | conftest_s=' | |
6693 | .section ".tdata","awT",@progbits | |
6694 | foo: .long 25 | |
6695 | .text | |
6696 | .long foo@TLSGD | |
6697 | .long foo@TLSLDM | |
6698 | .long foo@DTPOFF | |
6699 | .long foo@NTPOFF | |
6700 | .long foo@GOTNTPOFF | |
6701 | .long foo@INDNTPOFF | |
6702 | l %r1,foo@GOTNTPOFF(%r12) | |
6703 | l %r1,0(%r1):tls_load:foo | |
6704 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
6705 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
6706 | tls_first_major=2 | |
6707 | tls_first_minor=14 | |
9739c90c | 6708 | tls_as_opt=-m31 |
fd3cd001 UW |
6709 | ;; |
6710 | s390x-*-*) | |
6711 | conftest_s=' | |
6712 | .section ".tdata","awT",@progbits | |
6713 | foo: .long 25 | |
6714 | .text | |
6715 | .quad foo@TLSGD | |
6716 | .quad foo@TLSLDM | |
6717 | .quad foo@DTPOFF | |
6718 | .quad foo@NTPOFF | |
6719 | .quad foo@GOTNTPOFF | |
6720 | lg %r1,foo@GOTNTPOFF(%r12) | |
6721 | larl %r1,foo@INDNTPOFF | |
6722 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
6723 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
6724 | tls_first_major=2 | |
6725 | tls_first_minor=14 | |
9739c90c | 6726 | tls_as_opt="-m64 -Aesame" |
fd3cd001 | 6727 | ;; |
9ff13962 KK |
6728 | sh-*-* | sh[34]-*-*) |
6729 | conftest_s=' | |
6730 | .section ".tdata","awT",@progbits | |
6731 | foo: .long 25 | |
6732 | .text | |
6733 | .long foo@TLSGD | |
6734 | .long foo@TLSLDM | |
6735 | .long foo@DTPOFF | |
6736 | .long foo@GOTTPOFF | |
6737 | .long foo@TPOFF' | |
6738 | tls_first_major=2 | |
6739 | tls_first_minor=13 | |
6740 | ;; | |
5751a10b JJ |
6741 | sparc*-*-*) |
6742 | conftest_s=' | |
6743 | .section ".tdata","awT",@progbits | |
6744 | foo: .long 25 | |
6745 | .text | |
6746 | sethi %tgd_hi22(foo), %o0 | |
6747 | add %o0, %tgd_lo10(foo), %o1 | |
6748 | add %l7, %o1, %o0, %tgd_add(foo) | |
6749 | call __tls_get_addr, %tgd_call(foo) | |
6750 | sethi %tldm_hi22(foo), %l1 | |
6751 | add %l1, %tldm_lo10(foo), %l2 | |
6752 | add %l7, %l2, %o0, %tldm_add(foo) | |
6753 | call __tls_get_addr, %tldm_call(foo) | |
6754 | sethi %tldo_hix22(foo), %l3 | |
6755 | xor %l3, %tldo_lox10(foo), %l4 | |
6756 | add %o0, %l4, %l5, %tldo_add(foo) | |
6757 | sethi %tie_hi22(foo), %o3 | |
6758 | add %o3, %tie_lo10(foo), %o3 | |
6759 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
6760 | add %g7, %o2, %o4, %tie_add(foo) | |
6761 | sethi %tle_hix22(foo), %l1 | |
6762 | xor %l1, %tle_lox10(foo), %o5 | |
6763 | ld [%g7 + %o5], %o1' | |
6764 | tls_first_major=2 | |
6765 | tls_first_minor=14 | |
6766 | tls_as_opt=-32 | |
6767 | ;; | |
f996902d RH |
6768 | esac |
6769 | if test -z "$tls_first_major"; then | |
8ada417f ZW |
6770 | : # If we don't have a check, assume no support. |
6771 | else | |
6772 | echo $ac_n "checking assembler for thread-local storage support""... $ac_c" 1>&6 | |
2c4902b9 | 6773 | echo "configure:6774: checking assembler for thread-local storage support" >&5 |
8ada417f ZW |
6774 | if eval "test \"`echo '$''{'gcc_cv_as_tls'+set}'`\" = set"; then |
6775 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6776 | else | |
6777 | gcc_cv_as_tls=no | |
6778 | if test $in_tree_gas = yes; then | |
6779 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
6780 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 6781 | fi |
8ada417f ZW |
6782 | elif test x$gcc_cv_as != x; then |
6783 | echo "$conftest_s" > conftest.s | |
2c4902b9 | 6784 | if { ac_try='$gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s >&5'; { (eval echo configure:6785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6785 | then |
6786 | gcc_cv_as_tls=yes | |
6787 | else | |
6788 | echo "configure: failed program was" >&5 | |
6789 | cat conftest.s >&5 | |
6790 | fi | |
6791 | rm -f conftest.o conftest.s | |
f996902d | 6792 | fi |
f996902d | 6793 | fi |
8ada417f ZW |
6794 | |
6795 | echo "$ac_t""$gcc_cv_as_tls" 1>&6 | |
6796 | if test $gcc_cv_as_tls = yes; then | |
093e61a6 | 6797 | cat >> confdefs.h <<\EOF |
f996902d | 6798 | #define HAVE_AS_TLS 1 |
093e61a6 | 6799 | EOF |
f996902d RH |
6800 | |
6801 | fi | |
8ada417f ZW |
6802 | fi |
6803 | ||
6804 | # Target-specific assembler checks. | |
f996902d | 6805 | |
3a37b08e RH |
6806 | case "$target" in |
6807 | # All TARGET_ABI_OSF targets. | |
6808 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
8ada417f | 6809 | echo $ac_n "checking assembler for explicit relocation support""... $ac_c" 1>&6 |
2c4902b9 | 6810 | echo "configure:6811: checking assembler for explicit relocation support" >&5 |
8ada417f | 6811 | if eval "test \"`echo '$''{'gcc_cv_as_alpha_explicit_relocs'+set}'`\" = set"; then |
093e61a6 | 6812 | echo $ac_n "(cached) $ac_c" 1>&6 |
3a37b08e | 6813 | else |
8ada417f ZW |
6814 | gcc_cv_as_alpha_explicit_relocs=no |
6815 | if test $in_tree_gas = yes; then | |
6816 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
6817 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 6818 | fi |
8ada417f ZW |
6819 | elif test x$gcc_cv_as != x; then |
6820 | echo ' .set nomacro | |
3a37b08e RH |
6821 | .text |
6822 | extbl $3, $2, $3 !lituse_bytoff!1 | |
6823 | ldq $2, a($29) !literal!1 | |
6824 | ldq $4, b($29) !literal!2 | |
6825 | ldq_u $3, 0($2) !lituse_base!1 | |
6826 | ldq $27, f($29) !literal!5 | |
6827 | jsr $26, ($27), f !lituse_jsr!5 | |
6828 | ldah $29, 0($26) !gpdisp!3 | |
6829 | lda $0, c($29) !gprel | |
6830 | ldah $1, d($29) !gprelhigh | |
6831 | lda $1, d($1) !gprellow | |
8ada417f | 6832 | lda $29, 0($29) !gpdisp!3' > conftest.s |
2c4902b9 | 6833 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6834 | then |
6835 | gcc_cv_as_alpha_explicit_relocs=yes | |
6836 | else | |
6837 | echo "configure: failed program was" >&5 | |
6838 | cat conftest.s >&5 | |
6839 | fi | |
6840 | rm -f conftest.o conftest.s | |
6841 | fi | |
cafe096b | 6842 | fi |
cafe096b | 6843 | |
8ada417f ZW |
6844 | echo "$ac_t""$gcc_cv_as_alpha_explicit_relocs" 1>&6 |
6845 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then | |
6846 | cat >> confdefs.h <<\EOF | |
3a37b08e | 6847 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
093e61a6 | 6848 | EOF |
3a37b08e | 6849 | |
8ada417f | 6850 | fi |
3a37b08e | 6851 | ;; |
8ada417f | 6852 | |
1cb36a98 | 6853 | sparc*-*-*) |
8ada417f | 6854 | echo $ac_n "checking assembler for .register""... $ac_c" 1>&6 |
2c4902b9 | 6855 | echo "configure:6856: checking assembler for .register" >&5 |
8ada417f | 6856 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_register_op'+set}'`\" = set"; then |
093e61a6 | 6857 | echo $ac_n "(cached) $ac_c" 1>&6 |
5b68c389 | 6858 | else |
8ada417f ZW |
6859 | gcc_cv_as_sparc_register_op=no |
6860 | if test x$gcc_cv_as != x; then | |
6861 | echo '.register %g2, #scratch' > conftest.s | |
2c4902b9 | 6862 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6863 | then |
6864 | gcc_cv_as_sparc_register_op=yes | |
6865 | else | |
6866 | echo "configure: failed program was" >&5 | |
6867 | cat conftest.s >&5 | |
6868 | fi | |
6869 | rm -f conftest.o conftest.s | |
6870 | fi | |
cafe096b | 6871 | fi |
cafe096b | 6872 | |
8ada417f ZW |
6873 | echo "$ac_t""$gcc_cv_as_sparc_register_op" 1>&6 |
6874 | if test $gcc_cv_as_sparc_register_op = yes; then | |
6875 | cat >> confdefs.h <<\EOF | |
1cb36a98 | 6876 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
093e61a6 | 6877 | EOF |
1cb36a98 | 6878 | |
8ada417f | 6879 | fi |
1cb36a98 | 6880 | |
8ada417f | 6881 | echo $ac_n "checking assembler for -relax option""... $ac_c" 1>&6 |
2c4902b9 | 6882 | echo "configure:6883: checking assembler for -relax option" >&5 |
8ada417f | 6883 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_relax'+set}'`\" = set"; then |
093e61a6 | 6884 | echo $ac_n "(cached) $ac_c" 1>&6 |
e95b1e6a | 6885 | else |
8ada417f ZW |
6886 | gcc_cv_as_sparc_relax=no |
6887 | if test x$gcc_cv_as != x; then | |
6888 | echo '.text' > conftest.s | |
2c4902b9 | 6889 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'; { (eval echo configure:6890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6890 | then |
6891 | gcc_cv_as_sparc_relax=yes | |
6892 | else | |
6893 | echo "configure: failed program was" >&5 | |
6894 | cat conftest.s >&5 | |
6895 | fi | |
6896 | rm -f conftest.o conftest.s | |
6897 | fi | |
cafe096b | 6898 | fi |
cafe096b | 6899 | |
8ada417f ZW |
6900 | echo "$ac_t""$gcc_cv_as_sparc_relax" 1>&6 |
6901 | if test $gcc_cv_as_sparc_relax = yes; then | |
6902 | cat >> confdefs.h <<\EOF | |
e95b1e6a | 6903 | #define HAVE_AS_RELAX_OPTION 1 |
093e61a6 | 6904 | EOF |
e95b1e6a | 6905 | |
8ada417f | 6906 | fi |
e95b1e6a | 6907 | |
8ada417f | 6908 | echo $ac_n "checking assembler for unaligned pcrel relocs""... $ac_c" 1>&6 |
2c4902b9 | 6909 | echo "configure:6910: checking assembler for unaligned pcrel relocs" >&5 |
093e61a6 RS |
6910 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then |
6911 | echo $ac_n "(cached) $ac_c" 1>&6 | |
17e9e88c | 6912 | else |
8ada417f ZW |
6913 | gcc_cv_as_sparc_ua_pcrel=no |
6914 | if test x$gcc_cv_as != x; then | |
6915 | echo '.text | |
6916 | foo: | |
6917 | nop | |
6918 | .data | |
6919 | .align 4 | |
6920 | .byte 0 | |
6921 | .uaword %r_disp32(foo)' > conftest.s | |
2c4902b9 | 6922 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'; { (eval echo configure:6923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6923 | then |
6924 | if test x$gcc_cv_ld != x \ | |
6925 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
6926 | gcc_cv_as_sparc_ua_pcrel=yes | |
6927 | fi | |
6928 | rm -f conftest | |
6929 | else | |
6930 | echo "configure: failed program was" >&5 | |
6931 | cat conftest.s >&5 | |
6932 | fi | |
6933 | rm -f conftest.o conftest.s | |
6934 | fi | |
cafe096b | 6935 | fi |
cafe096b | 6936 | |
093e61a6 | 6937 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6 |
8ada417f ZW |
6938 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
6939 | cat >> confdefs.h <<\EOF | |
17e9e88c | 6940 | #define HAVE_AS_SPARC_UA_PCREL 1 |
093e61a6 | 6941 | EOF |
17e9e88c | 6942 | |
17e9e88c | 6943 | |
8ada417f | 6944 | echo $ac_n "checking assembler for unaligned pcrel relocs against hidden symbols""... $ac_c" 1>&6 |
2c4902b9 | 6945 | echo "configure:6946: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
093e61a6 RS |
6946 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then |
6947 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cf7b8b0d | 6948 | else |
8ada417f ZW |
6949 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
6950 | if test x$gcc_cv_as != x; then | |
6951 | echo '.data | |
6952 | .align 4 | |
6953 | .byte 0x31 | |
6954 | .uaword %r_disp32(foo) | |
6955 | .byte 0x32, 0x33, 0x34 | |
6956 | .global foo | |
6957 | .hidden foo | |
6958 | foo: | |
6959 | .skip 4' > conftest.s | |
2c4902b9 | 6960 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'; { (eval echo configure:6961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6961 | then |
6962 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
6963 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
6964 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
6965 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
6966 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
6967 | | grep 'DISP32' > /dev/null 2>&1; then | |
6968 | : | |
6969 | else | |
6970 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 6971 | fi |
8ada417f ZW |
6972 | fi |
6973 | rm -f conftest | |
6974 | else | |
6975 | echo "configure: failed program was" >&5 | |
6976 | cat conftest.s >&5 | |
6977 | fi | |
6978 | rm -f conftest.o conftest.s | |
6979 | fi | |
cafe096b | 6980 | fi |
cafe096b | 6981 | |
093e61a6 | 6982 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6 |
8ada417f ZW |
6983 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
6984 | cat >> confdefs.h <<\EOF | |
cf7b8b0d | 6985 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
093e61a6 | 6986 | EOF |
cf7b8b0d | 6987 | |
8ada417f ZW |
6988 | fi |
6989 | ||
6990 | fi # unaligned pcrel relocs | |
cf7b8b0d | 6991 | |
8ada417f | 6992 | echo $ac_n "checking assembler for offsetable %lo()""... $ac_c" 1>&6 |
2c4902b9 | 6993 | echo "configure:6994: checking assembler for offsetable %lo()" >&5 |
8ada417f | 6994 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_offsetable_lo10'+set}'`\" = set"; then |
093e61a6 | 6995 | echo $ac_n "(cached) $ac_c" 1>&6 |
5b68c389 | 6996 | else |
8ada417f ZW |
6997 | gcc_cv_as_sparc_offsetable_lo10=no |
6998 | if test x$gcc_cv_as != x; then | |
6999 | echo '.text | |
7000 | or %g1, %lo(ab) + 12, %g1 | |
7001 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
2c4902b9 | 7002 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'; { (eval echo configure:7003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7003 | then |
7004 | if test x$gcc_cv_objdump != x \ | |
7005 | && %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ | |
7006 | | grep ' 82106000 82106000' > /dev/null 2>&1; then | |
7007 | gcc_cv_as_offsetable_lo10=yes | |
7008 | fi | |
7009 | else | |
7010 | echo "configure: failed program was" >&5 | |
7011 | cat conftest.s >&5 | |
7012 | fi | |
7013 | rm -f conftest.o conftest.s | |
7014 | fi | |
cafe096b | 7015 | fi |
cafe096b | 7016 | |
8ada417f ZW |
7017 | echo "$ac_t""$gcc_cv_as_sparc_offsetable_lo10" 1>&6 |
7018 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then | |
7019 | cat >> confdefs.h <<\EOF | |
1cb36a98 | 7020 | #define HAVE_AS_OFFSETABLE_LO10 1 |
093e61a6 | 7021 | EOF |
1cb36a98 | 7022 | |
8ada417f | 7023 | fi |
1cb36a98 RH |
7024 | ;; |
7025 | ||
c307e6dd | 7026 | i[34567]86-*-* | x86_64-*-*) |
8ada417f | 7027 | echo $ac_n "checking assembler for filds and fists mnemonics""... $ac_c" 1>&6 |
2c4902b9 | 7028 | echo "configure:7029: checking assembler for filds and fists mnemonics" >&5 |
8ada417f ZW |
7029 | if eval "test \"`echo '$''{'gcc_cv_as_ix86_filds_fists'+set}'`\" = set"; then |
7030 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7031 | else | |
7032 | gcc_cv_as_ix86_filds_fists=no | |
7033 | if test $in_tree_gas = yes; then | |
7034 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
7035 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 7036 | fi |
8ada417f ZW |
7037 | elif test x$gcc_cv_as != x; then |
7038 | echo 'filds mem; fists mem' > conftest.s | |
2c4902b9 | 7039 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7040 | then |
7041 | gcc_cv_as_ix86_filds_fists=yes | |
7042 | else | |
7043 | echo "configure: failed program was" >&5 | |
7044 | cat conftest.s >&5 | |
981d4858 | 7045 | fi |
8ada417f ZW |
7046 | rm -f conftest.o conftest.s |
7047 | fi | |
7048 | fi | |
ad9c4d9f | 7049 | |
8ada417f ZW |
7050 | echo "$ac_t""$gcc_cv_as_ix86_filds_fists" 1>&6 |
7051 | if test $gcc_cv_as_ix86_filds_fists = yes; then | |
7052 | cat >> confdefs.h <<\EOF | |
7053 | #define HAVE_GAS_FILDS_FISTS 1 | |
7054 | EOF | |
ad9c4d9f | 7055 | |
f6f5dff2 RO |
7056 | fi |
7057 | ||
7058 | echo $ac_n "checking assembler for cmov syntax""... $ac_c" 1>&6 | |
2c4902b9 | 7059 | echo "configure:7060: checking assembler for cmov syntax" >&5 |
f6f5dff2 RO |
7060 | if eval "test \"`echo '$''{'gcc_cv_as_ix86_cmov_sun_syntax'+set}'`\" = set"; then |
7061 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7062 | else | |
7063 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
7064 | if test x$gcc_cv_as != x; then | |
7065 | echo 'cmovl.l %edx, %eax' > conftest.s | |
2c4902b9 | 7066 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
f6f5dff2 RO |
7067 | then |
7068 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
7069 | else | |
7070 | echo "configure: failed program was" >&5 | |
7071 | cat conftest.s >&5 | |
7072 | fi | |
7073 | rm -f conftest.o conftest.s | |
7074 | fi | |
7075 | fi | |
7076 | ||
7077 | echo "$ac_t""$gcc_cv_as_ix86_cmov_sun_syntax" 1>&6 | |
7078 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then | |
7079 | cat >> confdefs.h <<\EOF | |
7080 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 | |
7081 | EOF | |
7082 | ||
ad9c4d9f NN |
7083 | fi |
7084 | ||
6f3ca281 ZW |
7085 | # This one is used unconditionally by i386.[ch]; it is to be defined |
7086 | # to 1 if the feature is present, 0 otherwise. | |
8ada417f | 7087 | echo $ac_n "checking assembler for GOTOFF in data""... $ac_c" 1>&6 |
2c4902b9 | 7088 | echo "configure:7089: checking assembler for GOTOFF in data" >&5 |
8ada417f ZW |
7089 | if eval "test \"`echo '$''{'gcc_cv_as_ix86_gotoff_in_data'+set}'`\" = set"; then |
7090 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7091 | else | |
7092 | gcc_cv_as_ix86_gotoff_in_data=no | |
7093 | if test $in_tree_gas = yes; then | |
7094 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
7095 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
7096 | fi | |
7097 | elif test x$gcc_cv_as != x; then | |
7098 | echo ' .text | |
f88c65f7 RH |
7099 | .L0: |
7100 | nop | |
7101 | .data | |
8ada417f | 7102 | .long .L0@GOTOFF' > conftest.s |
2c4902b9 | 7103 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7104 | then |
7105 | gcc_cv_as_ix86_gotoff_in_data=yes | |
7106 | else | |
7107 | echo "configure: failed program was" >&5 | |
7108 | cat conftest.s >&5 | |
f88c65f7 | 7109 | fi |
8ada417f ZW |
7110 | rm -f conftest.o conftest.s |
7111 | fi | |
7112 | fi | |
7113 | ||
7114 | echo "$ac_t""$gcc_cv_as_ix86_gotoff_in_data" 1>&6 | |
6f3ca281 ZW |
7115 | |
7116 | cat >> confdefs.h <<EOF | |
7117 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` | |
093e61a6 | 7118 | EOF |
f88c65f7 | 7119 | |
1cb36a98 | 7120 | ;; |
ef1ecf87 RH |
7121 | |
7122 | ia64*-*-*) | |
8ada417f | 7123 | echo $ac_n "checking assembler for ltoffx and ldxmov relocs""... $ac_c" 1>&6 |
2c4902b9 | 7124 | echo "configure:7125: checking assembler for ltoffx and ldxmov relocs" >&5 |
8ada417f | 7125 | if eval "test \"`echo '$''{'gcc_cv_as_ia64_ltoffx_ldxmov_relocs'+set}'`\" = set"; then |
093e61a6 | 7126 | echo $ac_n "(cached) $ac_c" 1>&6 |
ef1ecf87 | 7127 | else |
8ada417f ZW |
7128 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
7129 | if test $in_tree_gas = yes; then | |
7130 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
7131 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 7132 | fi |
8ada417f ZW |
7133 | elif test x$gcc_cv_as != x; then |
7134 | echo ' .text | |
ef1ecf87 RH |
7135 | addl r15 = @ltoffx(x#), gp |
7136 | ;; | |
cfa9ee99 | 7137 | ld8.mov r16 = [r15], x#' > conftest.s |
2c4902b9 | 7138 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f | 7139 | then |
cfa9ee99 | 7140 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
7141 | else |
7142 | echo "configure: failed program was" >&5 | |
7143 | cat conftest.s >&5 | |
2c4a9cff | 7144 | fi |
8ada417f ZW |
7145 | rm -f conftest.o conftest.s |
7146 | fi | |
7147 | fi | |
7148 | ||
7149 | echo "$ac_t""$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" 1>&6 | |
cfa9ee99 AS |
7150 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
7151 | cat >> confdefs.h <<\EOF | |
7152 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 | |
7153 | EOF | |
8ada417f | 7154 | |
cfa9ee99 | 7155 | fi |
8ada417f | 7156 | |
2c4a9cff | 7157 | ;; |
8ada417f | 7158 | |
2c4a9cff | 7159 | powerpc*-*-*) |
8ada417f ZW |
7160 | case $target in |
7161 | *-*-aix) conftest_s=' .csect .textPR';; | |
7162 | *) conftest_s=' .text';; | |
7163 | esac | |
7164 | conftest_s="$conftest_s | |
7165 | mfcr 3,128" | |
7166 | ||
7167 | echo $ac_n "checking assembler for mfcr field support""... $ac_c" 1>&6 | |
2c4902b9 | 7168 | echo "configure:7169: checking assembler for mfcr field support" >&5 |
8ada417f | 7169 | if eval "test \"`echo '$''{'gcc_cv_as_powerpc_mfcrf'+set}'`\" = set"; then |
2c4a9cff DE |
7170 | echo $ac_n "(cached) $ac_c" 1>&6 |
7171 | else | |
8ada417f ZW |
7172 | gcc_cv_as_powerpc_mfcrf=no |
7173 | if test $in_tree_gas = yes; then | |
7174 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
7175 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 7176 | fi |
8ada417f ZW |
7177 | elif test x$gcc_cv_as != x; then |
7178 | echo "$conftest_s" > conftest.s | |
2c4902b9 | 7179 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7180 | then |
7181 | gcc_cv_as_powerpc_mfcrf=yes | |
7182 | else | |
7183 | echo "configure: failed program was" >&5 | |
7184 | cat conftest.s >&5 | |
7185 | fi | |
7186 | rm -f conftest.o conftest.s | |
7187 | fi | |
2c4a9cff DE |
7188 | fi |
7189 | ||
8ada417f ZW |
7190 | echo "$ac_t""$gcc_cv_as_powerpc_mfcrf" 1>&6 |
7191 | if test $gcc_cv_as_powerpc_mfcrf = yes; then | |
7192 | cat >> confdefs.h <<\EOF | |
2c4a9cff | 7193 | #define HAVE_AS_MFCRF 1 |
093e61a6 | 7194 | EOF |
ef1ecf87 | 7195 | |
8ada417f ZW |
7196 | fi |
7197 | ;; | |
7198 | ||
7199 | mips*-*-*) | |
7200 | echo $ac_n "checking assembler for explicit relocation support""... $ac_c" 1>&6 | |
2c4902b9 | 7201 | echo "configure:7202: checking assembler for explicit relocation support" >&5 |
8ada417f ZW |
7202 | if eval "test \"`echo '$''{'gcc_cv_as_mips_explicit_relocs'+set}'`\" = set"; then |
7203 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7204 | else | |
7205 | gcc_cv_as_mips_explicit_relocs=no | |
7206 | if test $in_tree_gas = yes; then | |
7207 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
7208 | then gcc_cv_as_mips_explicit_relocs=yes | |
7209 | fi | |
7210 | elif test x$gcc_cv_as != x; then | |
7211 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s | |
2c4902b9 | 7212 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7213 | then |
7214 | gcc_cv_as_mips_explicit_relocs=yes | |
7215 | else | |
7216 | echo "configure: failed program was" >&5 | |
7217 | cat conftest.s >&5 | |
ef1ecf87 | 7218 | fi |
8ada417f ZW |
7219 | rm -f conftest.o conftest.s |
7220 | fi | |
7221 | fi | |
7222 | ||
7223 | echo "$ac_t""$gcc_cv_as_mips_explicit_relocs" 1>&6 | |
7224 | if test $gcc_cv_as_mips_explicit_relocs = yes; then | |
7225 | if test x$target_cpu_default = x | |
7226 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
7227 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
7228 | fi | |
7229 | fi | |
7230 | ||
ef1ecf87 | 7231 | ;; |
1cb36a98 | 7232 | esac |
9d147085 RH |
7233 | # ??? Not all targets support dwarf2 debug_line, even within a version |
7234 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
7235 | # info to the output file. So, as supported targets are added to gas 2.11, | |
7236 | # add some instruction here to (also) show we expect this might work. | |
7237 | # ??? Once 2.11 is released, probably need to add first known working | |
7238 | # version to the per-target configury. | |
7239 | case "$target" in | |
80486e06 | 7240 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a HPN |
7241 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
7242 | | xstormy16*-*-* | cris-*-*) | |
9d147085 RH |
7243 | insn="nop" |
7244 | ;; | |
7245 | ia64*-*-*) | |
7246 | insn="nop 0" | |
7247 | ;; | |
2853bc5a HPN |
7248 | mmix-*-*) |
7249 | insn="swym 0" | |
7250 | ;; | |
8ada417f ZW |
7251 | esac |
7252 | if test x"$insn" != x; then | |
7253 | conftest_s="\ | |
7254 | .file 1 \"conftest.s\" | |
7255 | .loc 1 3 0 | |
7256 | $insn" | |
7257 | echo $ac_n "checking assembler for dwarf2 debug_line support""... $ac_c" 1>&6 | |
2c4902b9 | 7258 | echo "configure:7259: checking assembler for dwarf2 debug_line support" >&5 |
8ada417f ZW |
7259 | if eval "test \"`echo '$''{'gcc_cv_as_dwarf2_debug_line'+set}'`\" = set"; then |
7260 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7261 | else | |
7262 | gcc_cv_as_dwarf2_debug_line=no | |
7263 | if test $in_tree_gas = yes; then | |
7264 | if test $in_tree_gas_is_elf = yes \ | |
7265 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
7266 | then gcc_cv_as_dwarf2_debug_line=yes | |
7267 | fi | |
7268 | elif test x$gcc_cv_as != x; then | |
7269 | echo "$conftest_s" > conftest.s | |
2c4902b9 | 7270 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7271 | then |
7272 | # ??? This fails with non-gnu grep. Maybe use objdump? | |
7273 | if grep debug_line conftest.o > /dev/null 2>&1; then | |
7274 | gcc_cv_as_dwarf2_debug_line=yes | |
7275 | fi | |
7276 | else | |
7277 | echo "configure: failed program was" >&5 | |
7278 | cat conftest.s >&5 | |
7279 | fi | |
7280 | rm -f conftest.o conftest.s | |
7281 | fi | |
7282 | fi | |
ad9c4d9f | 7283 | |
8ada417f | 7284 | echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 |
ad9c4d9f | 7285 | |
ad9c4d9f | 7286 | |
8ada417f ZW |
7287 | # The .debug_line file table must be in the exact order that |
7288 | # we specified the files, since these indices are also used | |
7289 | # by DW_AT_decl_file. Approximate this test by testing if | |
7290 | # the assembler bitches if the same index is assigned twice. | |
7291 | echo $ac_n "checking assembler for buggy dwarf2 .file directive""... $ac_c" 1>&6 | |
2c4902b9 | 7292 | echo "configure:7293: checking assembler for buggy dwarf2 .file directive" >&5 |
8ada417f ZW |
7293 | if eval "test \"`echo '$''{'gcc_cv_as_dwarf2_file_buggy'+set}'`\" = set"; then |
7294 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7295 | else | |
7296 | gcc_cv_as_dwarf2_file_buggy=no | |
7297 | if test x$gcc_cv_as != x; then | |
7298 | echo ' .file 1 "foo.s" | |
7299 | .file 1 "bar.s"' > conftest.s | |
2c4902b9 | 7300 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7301 | then |
7302 | gcc_cv_as_dwarf2_file_buggy=yes | |
7303 | else | |
7304 | echo "configure: failed program was" >&5 | |
7305 | cat conftest.s >&5 | |
7306 | fi | |
7307 | rm -f conftest.o conftest.s | |
7308 | fi | |
ad9c4d9f NN |
7309 | fi |
7310 | ||
8ada417f ZW |
7311 | echo "$ac_t""$gcc_cv_as_dwarf2_file_buggy" 1>&6 |
7312 | ||
7313 | ||
7314 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
7315 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
093e61a6 | 7316 | cat >> confdefs.h <<\EOF |
9d147085 | 7317 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
093e61a6 | 7318 | EOF |
9d147085 | 7319 | |
8ada417f | 7320 | fi |
ad9c4d9f | 7321 | |
8ada417f | 7322 | echo $ac_n "checking assembler for --gdwarf2 option""... $ac_c" 1>&6 |
2c4902b9 | 7323 | echo "configure:7324: checking assembler for --gdwarf2 option" >&5 |
8ada417f ZW |
7324 | if eval "test \"`echo '$''{'gcc_cv_as_gdwarf2_flag'+set}'`\" = set"; then |
7325 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7326 | else | |
7327 | gcc_cv_as_gdwarf2_flag=no | |
7328 | if test $in_tree_gas = yes; then | |
7329 | if test $in_tree_gas_is_elf = yes \ | |
7330 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
7331 | then gcc_cv_as_gdwarf2_flag=yes | |
7332 | fi | |
7333 | elif test x$gcc_cv_as != x; then | |
7334 | echo "$insn" > conftest.s | |
2c4902b9 | 7335 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'; { (eval echo configure:7336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7336 | then |
7337 | gcc_cv_as_gdwarf2_flag=yes | |
7338 | else | |
7339 | echo "configure: failed program was" >&5 | |
7340 | cat conftest.s >&5 | |
7341 | fi | |
7342 | rm -f conftest.o conftest.s | |
7343 | fi | |
ad9c4d9f NN |
7344 | fi |
7345 | ||
8ada417f ZW |
7346 | echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6 |
7347 | if test $gcc_cv_as_gdwarf2_flag = yes; then | |
7348 | cat >> confdefs.h <<\EOF | |
5f0e9ea2 | 7349 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
093e61a6 | 7350 | EOF |
5f0e9ea2 GK |
7351 | |
7352 | fi | |
ad9c4d9f | 7353 | |
8ada417f | 7354 | echo $ac_n "checking assembler for --gstabs option""... $ac_c" 1>&6 |
2c4902b9 | 7355 | echo "configure:7356: checking assembler for --gstabs option" >&5 |
8ada417f ZW |
7356 | if eval "test \"`echo '$''{'gcc_cv_as_gstabs_flag'+set}'`\" = set"; then |
7357 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7358 | else | |
7359 | gcc_cv_as_gstabs_flag=no | |
7360 | if test $in_tree_gas = yes; then | |
7361 | if test $in_tree_gas_is_elf = yes \ | |
7362 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
7363 | then gcc_cv_as_gstabs_flag=yes | |
7364 | fi | |
7365 | elif test x$gcc_cv_as != x; then | |
7366 | echo "$insn" > conftest.s | |
2c4902b9 | 7367 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'; { (eval echo configure:7368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7368 | then |
7369 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
7370 | # and warns about it, but still exits successfully. So check for | |
7371 | # this. | |
2c4902b9 | 7372 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'; { (eval echo configure:7373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7373 | then : |
7374 | else gcc_cv_as_gstabs_flag=yes | |
7375 | fi | |
7376 | else | |
7377 | echo "configure: failed program was" >&5 | |
7378 | cat conftest.s >&5 | |
7379 | fi | |
7380 | rm -f conftest.o conftest.s | |
7381 | fi | |
ad9c4d9f NN |
7382 | fi |
7383 | ||
8ada417f ZW |
7384 | echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 |
7385 | if test $gcc_cv_as_gstabs_flag = yes; then | |
7386 | cat >> confdefs.h <<\EOF | |
5f0e9ea2 | 7387 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
093e61a6 | 7388 | EOF |
5f0e9ea2 GK |
7389 | |
7390 | fi | |
8ada417f | 7391 | fi |
5f0e9ea2 | 7392 | |
093e61a6 | 7393 | echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6 |
2c4902b9 | 7394 | echo "configure:7395: checking linker read-only and read-write section mixing" >&5 |
96d0f4dc | 7395 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 7396 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
7397 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 \ |
7398 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
7399 | gcc_cv_ld_ro_rw_mix=read-write |
7400 | fi | |
7401 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
7402 | echo '.section myfoosect, "a"' > conftest1.s |
7403 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 7404 | echo '.byte 1' >> conftest2.s |
90e145da | 7405 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 7406 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
7407 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
7408 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
7409 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 7410 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 7411 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 7412 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 7413 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
7414 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
7415 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
7416 | gcc_cv_ld_ro_rw_mix=read-only | |
7417 | else | |
7418 | gcc_cv_ld_ro_rw_mix=read-write | |
7419 | fi | |
7420 | fi | |
7421 | fi | |
7422 | rm -f conftest.* conftest[123].* | |
7423 | fi | |
7424 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
093e61a6 | 7425 | cat >> confdefs.h <<\EOF |
96d0f4dc | 7426 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
093e61a6 | 7427 | EOF |
96d0f4dc JJ |
7428 | |
7429 | fi | |
093e61a6 | 7430 | echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6 |
96d0f4dc | 7431 | |
093e61a6 | 7432 | echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6 |
2c4902b9 | 7433 | echo "configure:7434: checking linker PT_GNU_EH_FRAME support" >&5 |
275b60d6 | 7434 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 7435 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
7436 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 \ |
7437 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
7438 | gcc_cv_ld_eh_frame_hdr=yes |
7439 | fi | |
7440 | elif test x$gcc_cv_ld != x; then | |
7441 | # Check if linker supports --eh-frame-hdr option | |
7442 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
7443 | gcc_cv_ld_eh_frame_hdr=yes | |
7444 | fi | |
7445 | fi | |
7446 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | |
093e61a6 | 7447 | cat >> confdefs.h <<\EOF |
275b60d6 | 7448 | #define HAVE_LD_EH_FRAME_HDR 1 |
093e61a6 | 7449 | EOF |
275b60d6 JJ |
7450 | |
7451 | fi | |
093e61a6 | 7452 | echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6 |
275b60d6 | 7453 | |
24a4dd31 | 7454 | echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6 |
2c4902b9 | 7455 | echo "configure:7456: checking linker position independent executable support" >&5 |
24a4dd31 JJ |
7456 | gcc_cv_ld_pie=no |
7457 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
7458 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 \ |
7459 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
7460 | gcc_cv_ld_pie=yes |
7461 | fi | |
7462 | elif test x$gcc_cv_ld != x; then | |
7463 | # Check if linker supports -pie option | |
7464 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
7465 | gcc_cv_ld_pie=yes | |
7466 | fi | |
7467 | fi | |
7468 | if test x"$gcc_cv_ld_pie" = xyes; then | |
7469 | cat >> confdefs.h <<\EOF | |
7470 | #define HAVE_LD_PIE 1 | |
7471 | EOF | |
7472 | ||
7473 | fi | |
7474 | echo "$ac_t""$gcc_cv_ld_pie" 1>&6 | |
7475 | ||
4357a6c3 CD |
7476 | # Miscellaneous target-specific checks. |
7477 | case "$target" in | |
7478 | mips*-*-*) | |
093e61a6 | 7479 | echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6 |
2c4902b9 | 7480 | echo "configure:7481: checking whether libgloss uses STARTUP directives consistently" >&5 |
4357a6c3 CD |
7481 | gcc_cv_mips_libgloss_startup=no |
7482 | gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss | |
7483 | if test "x$exec_prefix" = xNONE; then | |
7484 | if test "x$prefix" = xNONE; then | |
7485 | test_prefix=/usr/local | |
7486 | else | |
7487 | test_prefix=$prefix | |
7488 | fi | |
7489 | else | |
7490 | test_prefix=$exec_prefix | |
7491 | fi | |
caa55b1e | 7492 | for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_noncanonical/lib/idt.ld |
4357a6c3 CD |
7493 | do |
7494 | if grep '^STARTUP' $f > /dev/null 2>&1; then | |
7495 | gcc_cv_mips_libgloss_startup=yes | |
7496 | break | |
7497 | fi | |
7498 | done | |
7499 | if test x"$gcc_cv_mips_libgloss_startup" = xyes; then | |
093e61a6 | 7500 | cat >> confdefs.h <<\EOF |
4357a6c3 | 7501 | #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1 |
093e61a6 | 7502 | EOF |
4357a6c3 CD |
7503 | |
7504 | fi | |
093e61a6 | 7505 | echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6 |
4357a6c3 CD |
7506 | ;; |
7507 | esac | |
7508 | ||
9fb28a67 | 7509 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 7510 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
093e61a6 | 7511 | cat >> confdefs.h <<EOF |
793e9558 | 7512 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
093e61a6 | 7513 | EOF |
793e9558 PB |
7514 | |
7515 | fi | |
7516 | ||
861bb6c1 | 7517 | # Figure out what language subdirectories are present. |
71205e0b MH |
7518 | # Look if the user specified --enable-languages="..."; if not, use |
7519 | # the environment variable $LANGUAGES if defined. $LANGUAGES might | |
7520 | # go away some day. | |
cc9a08e0 | 7521 | # NB: embedded tabs in this IF block -- do not untabify |
71205e0b MH |
7522 | if test x"${enable_languages+set}" != xset; then |
7523 | if test x"${LANGUAGES+set}" = xset; then | |
cc9a08e0 | 7524 | enable_languages="${LANGUAGES}" |
093e61a6 | 7525 | echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2 |
cc9a08e0 | 7526 | |
71205e0b MH |
7527 | else |
7528 | enable_languages=all | |
7529 | fi | |
d6c6b553 | 7530 | else |
015089dd TJ |
7531 | if test x"${enable_languages}" = x \ |
7532 | || test x"${enable_languages}" = xyes; | |
cc9a08e0 | 7533 | then |
093e61a6 | 7534 | { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; } |
d6c6b553 | 7535 | fi |
71205e0b | 7536 | fi |
cc9a08e0 | 7537 | enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` |
75382c6d TT |
7538 | |
7539 | # First scan to see if an enabled language requires some other language. | |
7540 | # We assume that a given config-lang.in will list all the language | |
7541 | # front ends it requires, even if some are required indirectly. | |
c406e779 | 7542 | for lang in ${srcdir}/*/config-lang.in |
75382c6d TT |
7543 | do |
7544 | case $lang in | |
75382c6d TT |
7545 | # The odd quoting in the next line works around |
7546 | # an apparent bug in bash 1.12 on linux. | |
7547 | ${srcdir}/[*]/config-lang.in) | |
7548 | ;; | |
7549 | *) | |
7550 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
7551 | this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` | |
7552 | for other in $this_lang_requires | |
7553 | do | |
7554 | case ,${enable_languages}, in | |
7555 | *,$other,*) | |
7556 | ;; | |
7557 | *,all,*) | |
7558 | ;; | |
1bf17cc4 | 7559 | *,$lang_alias,*) |
75382c6d TT |
7560 | enable_languages="$enable_languages,$other" |
7561 | ;; | |
7562 | esac | |
7563 | done | |
7564 | ;; | |
7565 | esac | |
7566 | done | |
7567 | ||
015089dd TJ |
7568 | expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'` |
7569 | found_languages= | |
861bb6c1 | 7570 | subdirs= |
c406e779 | 7571 | for lang in ${srcdir}/*/config-lang.in |
861bb6c1 JL |
7572 | do |
7573 | case $lang in | |
861bb6c1 JL |
7574 | # The odd quoting in the next line works around |
7575 | # an apparent bug in bash 1.12 on linux. | |
7576 | ${srcdir}/[*]/config-lang.in) ;; | |
71205e0b MH |
7577 | *) |
7578 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
2b60b2cb AO |
7579 | this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` |
7580 | build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` | |
71205e0b MH |
7581 | if test "x$lang_alias" = x |
7582 | then | |
7583 | echo "$lang doesn't set \$language." 1>&2 | |
7584 | exit 1 | |
7585 | fi | |
2b60b2cb AO |
7586 | case ${build_by_default},${enable_languages}, in |
7587 | *,$lang_alias,*) add_this_lang=yes ;; | |
7588 | no,*) add_this_lang=no ;; | |
7589 | *,all,*) add_this_lang=yes ;; | |
7590 | *) add_this_lang=no ;; | |
7591 | esac | |
015089dd | 7592 | found_languages="${found_languages} ${lang_alias}" |
71205e0b MH |
7593 | if test x"${add_this_lang}" = xyes; then |
7594 | case $lang in | |
7595 | ${srcdir}/ada/config-lang.in) | |
1ffc5c6e | 7596 | if test x$have_gnat = xyes ; then |
71205e0b MH |
7597 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" |
7598 | fi | |
7599 | ;; | |
7600 | *) | |
7601 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
7602 | ;; | |
7603 | esac | |
7604 | fi | |
7605 | ;; | |
861bb6c1 JL |
7606 | esac |
7607 | done | |
7608 | ||
015089dd TJ |
7609 | missing_languages= |
7610 | for expected_language in ${expected_languages} .. | |
093e61a6 | 7611 | do |
015089dd TJ |
7612 | if test "${expected_language}" != ..; then |
7613 | missing_language="${expected_language}" | |
7614 | if test "${expected_language}" = "c" \ | |
7615 | || test "${expected_language}" = "all"; then | |
7616 | missing_language= | |
7617 | fi | |
7618 | for found_language in ${found_languages} .. | |
093e61a6 | 7619 | do |
015089dd TJ |
7620 | if test "${found_language}" != ..; then |
7621 | if test "${expected_language}" = "${found_language}"; then | |
7622 | missing_language= | |
7623 | fi | |
7624 | fi | |
7625 | done | |
7626 | if test "x${missing_language}" != x; then | |
7627 | missing_languages="${missing_languages} ${missing_language}" | |
7628 | fi | |
7629 | fi | |
7630 | done | |
7631 | ||
7632 | if test "x$missing_languages" != x; then | |
093e61a6 | 7633 | { echo "configure: error: |
015089dd | 7634 | The following requested languages were not found:${missing_languages} |
093e61a6 | 7635 | The following languages were available: c${found_languages}" 1>&2; exit 1; } |
02ef40d9 TJ |
7636 | fi |
7637 | ||
f24af81b TT |
7638 | # Make gthr-default.h if we have a thread file. |
7639 | gthread_flags= | |
75bffa71 | 7640 | if test $thread_file != single; then |
f24af81b | 7641 | rm -f gthr-default.h |
db0d1ed9 | 7642 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h |
f24af81b TT |
7643 | gthread_flags=-DHAVE_GTHR_DEFAULT |
7644 | fi | |
7645 | ||
7646 | ||
81bf3d9e RH |
7647 | # Find out what GC implementation we want, or may, use. |
7648 | # Check whether --with-gc or --without-gc was given. | |
7649 | if test "${with_gc+set}" = set; then | |
7650 | withval="$with_gc" | |
7651 | case "$withval" in | |
b6f61163 | 7652 | simple | page | zone) |
81bf3d9e RH |
7653 | GGC=ggc-$withval |
7654 | ;; | |
7655 | *) | |
093e61a6 | 7656 | { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; } |
81bf3d9e RH |
7657 | ;; |
7658 | esac | |
7659 | else | |
005537df | 7660 | GGC=ggc-page |
093e61a6 RS |
7661 | fi |
7662 | ||
81bf3d9e RH |
7663 | |
7664 | echo "Using $GGC for garbage collection." | |
7665 | ||
3c809ba4 | 7666 | # Use the system's zlib library. |
b8dad04b ZW |
7667 | zlibdir=-L../zlib |
7668 | zlibinc="-I\$(srcdir)/../zlib" | |
3c809ba4 AG |
7669 | # Check whether --with-system-zlib or --without-system-zlib was given. |
7670 | if test "${with_system_zlib+set}" = set; then | |
7671 | withval="$with_system_zlib" | |
7672 | zlibdir= | |
7673 | zlibinc= | |
7674 | ||
093e61a6 RS |
7675 | fi |
7676 | ||
3c809ba4 AG |
7677 | |
7678 | ||
7679 | ||
dc6746e7 | 7680 | |
093e61a6 | 7681 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
2c4902b9 | 7682 | echo "configure:7683: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
dc6746e7 PT |
7683 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
7684 | if test "${enable_maintainer_mode+set}" = set; then | |
7685 | enableval="$enable_maintainer_mode" | |
7686 | maintainer_mode=$enableval | |
7687 | else | |
7688 | maintainer_mode=no | |
093e61a6 RS |
7689 | fi |
7690 | ||
dc6746e7 | 7691 | |
093e61a6 | 7692 | echo "$ac_t""$maintainer_mode" 1>&6 |
dc6746e7 PT |
7693 | |
7694 | if test "$maintainer_mode" = "yes"; then | |
7695 | MAINT='' | |
7696 | else | |
7697 | MAINT='#' | |
7698 | fi | |
7699 | ||
861bb6c1 JL |
7700 | # Make empty files to contain the specs and options for each language. |
7701 | # Then add #include lines to for a compiler that has specs and/or options. | |
7702 | ||
d7b42618 | 7703 | lang_opt_files= |
861bb6c1 | 7704 | lang_specs_files= |
3103b7db | 7705 | lang_tree_files= |
861bb6c1 JL |
7706 | for subdir in . $subdirs |
7707 | do | |
d7b42618 NB |
7708 | if test -f $srcdir/$subdir/lang.opt; then |
7709 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
7710 | fi | |
75bffa71 | 7711 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 7712 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 7713 | fi |
3103b7db | 7714 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 7715 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 7716 | fi |
861bb6c1 JL |
7717 | done |
7718 | ||
7719 | # These (without "all_") are set in each config-lang.in. | |
7720 | # `language' must be a single word so is spelled singularly. | |
7721 | all_languages= | |
7722 | all_boot_languages= | |
7723 | all_compilers= | |
7724 | all_stagestuff= | |
6eb95e99 | 7725 | all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders' |
861bb6c1 | 7726 | # List of language makefile fragments. |
2ed26f6b ZW |
7727 | all_lang_makefrags= |
7728 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 7729 | all_lang_makefiles= |
e2500fed | 7730 | # Files for gengtype |
ef69da62 | 7731 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
7732 | # Files for gengtype with language |
7733 | all_gtfiles_files_langs= | |
7734 | all_gtfiles_files_files= | |
861bb6c1 JL |
7735 | |
7736 | # Add the language fragments. | |
7737 | # Languages are added via two mechanisms. Some information must be | |
7738 | # recorded in makefile variables, these are defined in config-lang.in. | |
7739 | # We accumulate them and plug them into the main Makefile. | |
7740 | # The other mechanism is a set of hooks for each of the main targets | |
7741 | # like `clean', `install', etc. | |
7742 | ||
861bb6c1 | 7743 | language_hooks="Make-hooks" |
861bb6c1 | 7744 | |
c406e779 | 7745 | for s in $subdirs |
861bb6c1 | 7746 | do |
861bb6c1 JL |
7747 | language= |
7748 | boot_language= | |
7749 | compilers= | |
7750 | stagestuff= | |
861bb6c1 | 7751 | outputs= |
e2500fed | 7752 | gtfiles= |
861bb6c1 | 7753 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 7754 | if test "x$language" = x |
861bb6c1 JL |
7755 | then |
7756 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
7757 | exit 1 | |
7758 | fi | |
2ed26f6b | 7759 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in" |
72aaffbd | 7760 | if test -f ${srcdir}/$s/Makefile.in |
2ed26f6b | 7761 | then all_lang_makefiles="$s/Makefile" |
72aaffbd | 7762 | fi |
861bb6c1 | 7763 | all_languages="$all_languages $language" |
75bffa71 | 7764 | if test "x$boot_language" = xyes |
861bb6c1 JL |
7765 | then |
7766 | all_boot_languages="$all_boot_languages $language" | |
7767 | fi | |
7768 | all_compilers="$all_compilers $compilers" | |
7769 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 7770 | all_outputs="$all_outputs $outputs" |
e2500fed | 7771 | all_gtfiles="$all_gtfiles $gtfiles" |
c406e779 | 7772 | for f in $gtfiles |
8ac9d31f | 7773 | do |
8ac9d31f TJ |
7774 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
7775 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f | 7776 | done |
861bb6c1 JL |
7777 | done |
7778 | ||
8ac9d31f TJ |
7779 | # Pick up gtfiles for c |
7780 | gtfiles= | |
7781 | s="c" | |
7782 | . ${srcdir}/c-config-lang.in | |
7783 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 7784 | for f in $gtfiles |
8ac9d31f | 7785 | do |
8ac9d31f TJ |
7786 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
7787 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f TJ |
7788 | done |
7789 | ||
cbc59f01 | 7790 | check_languages= |
c406e779 | 7791 | for language in $all_languages |
cbc59f01 | 7792 | do |
cbc59f01 | 7793 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
7794 | done |
7795 | ||
62b81e45 MM |
7796 | # We link each language in with a set of hooks, reached indirectly via |
7797 | # lang.${target}. | |
861bb6c1 JL |
7798 | |
7799 | rm -f Make-hooks | |
7800 | touch Make-hooks | |
65ebbf81 | 7801 | target_list="all.build all.cross start.encap rest.encap tags \ |
a207b594 | 7802 | install-normal install-common install-man \ |
436a88a6 | 7803 | uninstall \ |
a03ad584 | 7804 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 7805 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
7806 | for t in $target_list |
7807 | do | |
7808 | x= | |
c406e779 | 7809 | for lang in $all_languages |
861bb6c1 | 7810 | do |
ab87f8c8 | 7811 | x="$x $lang.$t" |
861bb6c1 JL |
7812 | done |
7813 | echo "lang.$t: $x" >> Make-hooks | |
7814 | done | |
7815 | ||
cc06d68c | 7816 | # Create .gdbinit. |
861bb6c1 | 7817 | |
cc06d68c GP |
7818 | echo "dir ." > .gdbinit |
7819 | echo "dir ${srcdir}" >> .gdbinit | |
7820 | if test x$gdb_needs_out_file_path = xyes | |
7821 | then | |
7822 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
7823 | fi | |
7824 | if test "x$subdirs" != x; then | |
7825 | for s in $subdirs | |
7826 | do | |
7827 | echo "dir ${srcdir}/$s" >> .gdbinit | |
7828 | done | |
861bb6c1 | 7829 | fi |
cc06d68c | 7830 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 7831 | |
8f8d3278 NC |
7832 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
7833 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
7834 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
7835 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
7836 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
7837 | # make and thus we'd get different behavior depending on where we built the | |
7838 | # sources. | |
5949a9fc | 7839 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 7840 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 7841 | else |
8f8d3278 NC |
7842 | # An explanation of the sed strings: |
7843 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
7844 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
7845 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 7846 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
7847 | # |
7848 | # (*) Note this pattern overwrites the first character of the string | |
7849 | # with a forward slash if one is not already present. This is not a | |
7850 | # problem because the exact names of the sub-directories concerned is | |
7851 | # unimportant, just the number of them matters. | |
7852 | # | |
7853 | # The practical upshot of these patterns is like this: | |
7854 | # | |
7855 | # prefix exec_prefix result | |
7856 | # ------ ----------- ------ | |
7857 | # /foo /foo/bar ../ | |
7858 | # /foo/ /foo/bar ../ | |
7859 | # /foo /foo/bar/ ../ | |
7860 | # /foo/ /foo/bar/ ../ | |
7861 | # /foo /foo/bar/ugg ../../ | |
7862 | # | |
4c112cda | 7863 | dollar='$$' |
caa55b1e | 7864 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
7865 | fi |
7866 | ||
7867 | ||
2ce3c6c6 | 7868 | |
2bbea3a6 RH |
7869 | # Find a directory in which to install a shared libgcc. |
7870 | ||
7871 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
7872 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
7873 | enableval="$enable_version_specific_runtime_libs" | |
093e61a6 RS |
7874 | : |
7875 | fi | |
2bbea3a6 RH |
7876 | |
7877 | ||
5b15f277 RH |
7878 | # Check whether --with-slibdir or --without-slibdir was given. |
7879 | if test "${with_slibdir+set}" = set; then | |
7880 | withval="$with_slibdir" | |
7881 | slibdir="$with_slibdir" | |
7882 | else | |
7883 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 7884 | slibdir='$(libsubdir)' |
5b15f277 | 7885 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
7886 | slibdir='$(build_tooldir)/lib' |
7887 | else | |
5b15f277 | 7888 | slibdir='$(libdir)' |
2bbea3a6 | 7889 | fi |
093e61a6 RS |
7890 | fi |
7891 | ||
2bbea3a6 RH |
7892 | |
7893 | ||
1e6347d8 | 7894 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
7895 | |
7896 | ||
861bb6c1 JL |
7897 | # Substitute configuration variables |
7898 | ||
7899 | ||
7900 | ||
7901 | ||
7902 | ||
7903 | ||
7904 | ||
7905 | ||
7906 | ||
7907 | ||
7908 | ||
7909 | ||
7910 | ||
7911 | ||
7912 | ||
7913 | ||
7914 | ||
7915 | ||
7916 | ||
7917 | ||
7918 | ||
7919 | ||
7920 | ||
7921 | ||
7922 | ||
7923 | ||
7924 | ||
7925 | ||
7926 | ||
7927 | ||
7928 | ||
7929 | ||
7930 | ||
7931 | ||
7932 | ||
7933 | ||
7934 | ||
7935 | ||
7936 | ||
7937 | ||
7938 | ||
7939 | ||
7940 | ||
7941 | ||
7942 | ||
7943 | ||
9b16d2c4 | 7944 | |
e9a25f70 | 7945 | |
6e26218f | 7946 | |
c8724862 | 7947 | |
e061d1ce | 7948 | |
d8bb17c8 | 7949 | |
11642c3a ZW |
7950 | |
7951 | ||
7952 | ||
7953 | ||
7954 | ||
7955 | ||
7956 | ||
3d9d2476 | 7957 | |
596151e1 | 7958 | |
8ac9d31f TJ |
7959 | |
7960 | ||
7961 | ||
e2500fed | 7962 | |
51b9ff45 KC |
7963 | |
7964 | ||
e22340b0 | 7965 | |
861bb6c1 JL |
7966 | |
7967 | ||
7903cebc NN |
7968 | # Echo link setup. |
7969 | if test x${build} = x${host} ; then | |
7970 | if test x${host} = x${target} ; then | |
7971 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
7972 | else | |
7973 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
7974 | echo " from ${host} to ${target}." 1>&2 | |
7975 | fi | |
861bb6c1 | 7976 | else |
7903cebc NN |
7977 | if test x${host} = x${target} ; then |
7978 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
7979 | echo " for ${target}." 1>&2 | |
7980 | else | |
7981 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
7982 | echo " from ${host} to ${target}." 1>&2 | |
7983 | fi | |
861bb6c1 JL |
7984 | fi |
7985 | ||
7986 | # Configure the subdirectories | |
7987 | # AC_CONFIG_SUBDIRS($subdirs) | |
7988 | ||
7989 | # Create the Makefile | |
7990 | # and configure language subdirectories | |
093e61a6 RS |
7991 | trap '' 1 2 15 |
7992 | cat > confcache <<\EOF | |
861bb6c1 JL |
7993 | # This file is a shell script that caches the results of configure |
7994 | # tests run on this system so they can be shared between configure | |
093e61a6 RS |
7995 | # scripts and configure runs. It is not useful on other systems. |
7996 | # If it contains results you don't want to keep, you may remove or edit it. | |
861bb6c1 | 7997 | # |
093e61a6 RS |
7998 | # By default, configure uses ./config.cache as the cache file, |
7999 | # creating it if it does not exist already. You can give configure | |
8000 | # the --cache-file=FILE option to use a different cache file; that is | |
8001 | # what configure does when it calls configure scripts in | |
8002 | # subdirectories, so they share the cache. | |
8003 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
8004 | # config.status only pays attention to the cache file if you give it the | |
8005 | # --recheck option to rerun configure. | |
861bb6c1 | 8006 | # |
093e61a6 | 8007 | EOF |
861bb6c1 JL |
8008 | # The following way of writing the cache mishandles newlines in values, |
8009 | # but we know of no workaround that is simple, portable, and efficient. | |
8010 | # So, don't put newlines in cache variables' values. | |
8011 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
8012 | # and sets the high bit in the cache file unless we assign to the vars. | |
093e61a6 RS |
8013 | (set) 2>&1 | |
8014 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
8015 | *ac_space=\ *) | |
8016 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
8017 | # turns \\\\ into \\, and sed turns \\ into \). | |
8018 | sed -n \ | |
8019 | -e "s/'/'\\\\''/g" \ | |
8020 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
8021 | ;; | |
8022 | *) | |
8023 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
8024 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
8025 | ;; | |
8026 | esac >> confcache | |
8027 | if cmp -s $cache_file confcache; then | |
8028 | : | |
8029 | else | |
861bb6c1 | 8030 | if test -w $cache_file; then |
093e61a6 RS |
8031 | echo "updating cache $cache_file" |
8032 | cat confcache > $cache_file | |
861bb6c1 JL |
8033 | else |
8034 | echo "not updating unwritable cache $cache_file" | |
8035 | fi | |
8036 | fi | |
8037 | rm -f confcache | |
8038 | ||
093e61a6 RS |
8039 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
8040 | ||
861bb6c1 JL |
8041 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
8042 | # Let make expand exec_prefix. | |
8043 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
8044 | ||
093e61a6 RS |
8045 | # Any assignment to VPATH causes Sun make to only execute |
8046 | # the first set of double-colon rules, so remove it if not needed. | |
8047 | # If there is a colon in the path, we need to keep it. | |
861bb6c1 | 8048 | if test "x$srcdir" = x.; then |
093e61a6 | 8049 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
861bb6c1 JL |
8050 | fi |
8051 | ||
093e61a6 | 8052 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
cafe096b | 8053 | |
093e61a6 | 8054 | DEFS=-DHAVE_CONFIG_H |
cafe096b | 8055 | |
093e61a6 | 8056 | # Without the "./", some shells look in PATH for config.status. |
cafe096b | 8057 | : ${CONFIG_STATUS=./config.status} |
cafe096b | 8058 | |
093e61a6 RS |
8059 | echo creating $CONFIG_STATUS |
8060 | rm -f $CONFIG_STATUS | |
8061 | cat > $CONFIG_STATUS <<EOF | |
8062 | #! /bin/sh | |
8063 | # Generated automatically by configure. | |
8064 | # Run this file to recreate the current configuration. | |
8065 | # This directory was configured as follows, | |
8066 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
cafe096b | 8067 | # |
093e61a6 | 8068 | # $0 $ac_configure_args |
cafe096b | 8069 | # |
093e61a6 RS |
8070 | # Compiler output produced by configure, useful for debugging |
8071 | # configure, is in ./config.log if it exists. | |
cafe096b | 8072 | |
093e61a6 RS |
8073 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
8074 | for ac_option | |
cafe096b | 8075 | do |
093e61a6 RS |
8076 | case "\$ac_option" in |
8077 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
8078 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
8079 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
8080 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
8081 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
8082 | exit 0 ;; | |
8083 | -help | --help | --hel | --he | --h) | |
8084 | echo "\$ac_cs_usage"; exit 0 ;; | |
8085 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
cafe096b EC |
8086 | esac |
8087 | done | |
8088 | ||
093e61a6 | 8089 | ac_given_srcdir=$srcdir |
cafe096b | 8090 | |
093e61a6 RS |
8091 | trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
8092 | EOF | |
8093 | cat >> $CONFIG_STATUS <<EOF | |
cafe096b | 8094 | |
093e61a6 RS |
8095 | # Protect against being on the right side of a sed subst in config.status. |
8096 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
8097 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
8098 | $ac_vpsub | |
8099 | $extrasub | |
8100 | s%@SHELL@%$SHELL%g | |
8101 | s%@CFLAGS@%$CFLAGS%g | |
8102 | s%@CPPFLAGS@%$CPPFLAGS%g | |
8103 | s%@CXXFLAGS@%$CXXFLAGS%g | |
8104 | s%@FFLAGS@%$FFLAGS%g | |
8105 | s%@DEFS@%$DEFS%g | |
8106 | s%@LDFLAGS@%$LDFLAGS%g | |
8107 | s%@LIBS@%$LIBS%g | |
8108 | s%@exec_prefix@%$exec_prefix%g | |
8109 | s%@prefix@%$prefix%g | |
8110 | s%@program_transform_name@%$program_transform_name%g | |
8111 | s%@bindir@%$bindir%g | |
8112 | s%@sbindir@%$sbindir%g | |
8113 | s%@libexecdir@%$libexecdir%g | |
8114 | s%@datadir@%$datadir%g | |
8115 | s%@sysconfdir@%$sysconfdir%g | |
8116 | s%@sharedstatedir@%$sharedstatedir%g | |
8117 | s%@localstatedir@%$localstatedir%g | |
8118 | s%@libdir@%$libdir%g | |
8119 | s%@includedir@%$includedir%g | |
8120 | s%@oldincludedir@%$oldincludedir%g | |
8121 | s%@infodir@%$infodir%g | |
8122 | s%@mandir@%$mandir%g | |
8123 | s%@host@%$host%g | |
8124 | s%@host_alias@%$host_alias%g | |
8125 | s%@host_cpu@%$host_cpu%g | |
8126 | s%@host_vendor@%$host_vendor%g | |
8127 | s%@host_os@%$host_os%g | |
8128 | s%@target@%$target%g | |
8129 | s%@target_alias@%$target_alias%g | |
8130 | s%@target_cpu@%$target_cpu%g | |
8131 | s%@target_vendor@%$target_vendor%g | |
8132 | s%@target_os@%$target_os%g | |
8133 | s%@build@%$build%g | |
8134 | s%@build_alias@%$build_alias%g | |
8135 | s%@build_cpu@%$build_cpu%g | |
8136 | s%@build_vendor@%$build_vendor%g | |
8137 | s%@build_os@%$build_os%g | |
4665e56c NN |
8138 | s%@build_subdir@%$build_subdir%g |
8139 | s%@host_subdir@%$host_subdir%g | |
093e61a6 RS |
8140 | s%@target_subdir@%$target_subdir%g |
8141 | s%@CC@%$CC%g | |
8142 | s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g | |
8143 | s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g | |
8144 | s%@CPP@%$CPP%g | |
8145 | s%@GNATBIND@%$GNATBIND%g | |
8146 | s%@ADAC@%$ADAC%g | |
8147 | s%@strict1_warn@%$strict1_warn%g | |
8148 | s%@warn_cflags@%$warn_cflags%g | |
8149 | s%@WERROR@%$WERROR%g | |
8150 | s%@nocommon_flag@%$nocommon_flag%g | |
8151 | s%@valgrind_path@%$valgrind_path%g | |
8152 | s%@valgrind_path_defines@%$valgrind_path_defines%g | |
8153 | s%@valgrind_command@%$valgrind_command%g | |
8154 | s%@coverage_flags@%$coverage_flags%g | |
8155 | s%@enable_multilib@%$enable_multilib%g | |
8156 | s%@enable_shared@%$enable_shared%g | |
8157 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g | |
8158 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
8159 | s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g | |
d1bd0ded | 8160 | s%@onestep@%$onestep%g |
093e61a6 RS |
8161 | s%@SET_MAKE@%$SET_MAKE%g |
8162 | s%@AWK@%$AWK%g | |
8163 | s%@LN@%$LN%g | |
8164 | s%@LN_S@%$LN_S%g | |
8165 | s%@RANLIB@%$RANLIB%g | |
8166 | s%@INSTALL@%$INSTALL%g | |
8167 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
8168 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
3a000df0 | 8169 | s%@make_compare_target@%$make_compare_target%g |
093e61a6 RS |
8170 | s%@have_mktemp_command@%$have_mktemp_command%g |
8171 | s%@MAKEINFO@%$MAKEINFO%g | |
8172 | s%@BUILD_INFO@%$BUILD_INFO%g | |
8173 | s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g | |
093e61a6 RS |
8174 | s%@FLEX@%$FLEX%g |
8175 | s%@BISON@%$BISON%g | |
8176 | s%@stage1_cflags@%$stage1_cflags%g | |
8177 | s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g | |
8178 | s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g | |
8179 | s%@LDEXP_LIB@%$LDEXP_LIB%g | |
8180 | s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g | |
8181 | s%@LIBICONV@%$LIBICONV%g | |
56694dd9 | 8182 | s%@LIBICONV_DEP@%$LIBICONV_DEP%g |
093e61a6 RS |
8183 | s%@manext@%$manext%g |
8184 | s%@objext@%$objext%g | |
8185 | s%@extra_modes_file@%$extra_modes_file%g | |
8186 | s%@FORBUILD@%$FORBUILD%g | |
8187 | s%@PACKAGE@%$PACKAGE%g | |
8188 | s%@VERSION@%$VERSION%g | |
093e61a6 | 8189 | s%@USE_NLS@%$USE_NLS%g |
56694dd9 ZW |
8190 | s%@LIBINTL@%$LIBINTL%g |
8191 | s%@LIBINTL_DEP@%$LIBINTL_DEP%g | |
8192 | s%@INCINTL@%$INCINTL%g | |
093e61a6 | 8193 | s%@XGETTEXT@%$XGETTEXT%g |
56694dd9 | 8194 | s%@GMSGFMT@%$GMSGFMT%g |
093e61a6 | 8195 | s%@POSUB@%$POSUB%g |
56694dd9 | 8196 | s%@CATALOGS@%$CATALOGS%g |
093e61a6 RS |
8197 | s%@CROSS@%$CROSS%g |
8198 | s%@ALL@%$ALL%g | |
8199 | s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g | |
8200 | s%@inhibit_libc@%$inhibit_libc%g | |
8201 | s%@BUILD_PREFIX@%$BUILD_PREFIX%g | |
8202 | s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g | |
eaf9f3b2 | 8203 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g |
093e61a6 RS |
8204 | s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g |
8205 | s%@STMP_FIXINC@%$STMP_FIXINC%g | |
8206 | s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g | |
8207 | s%@libgcc_visibility@%$libgcc_visibility%g | |
8208 | s%@gthread_flags@%$gthread_flags%g | |
8209 | s%@GGC@%$GGC%g | |
8210 | s%@zlibdir@%$zlibdir%g | |
8211 | s%@zlibinc@%$zlibinc%g | |
8212 | s%@MAINT@%$MAINT%g | |
8213 | s%@gcc_tooldir@%$gcc_tooldir%g | |
8214 | s%@dollar@%$dollar%g | |
8215 | s%@slibdir@%$slibdir%g | |
8216 | s%@objdir@%$objdir%g | |
8217 | s%@subdirs@%$subdirs%g | |
8218 | s%@srcdir@%$srcdir%g | |
51b9ff45 KC |
8219 | s%@docobjdir@%$docobjdir%g |
8220 | s%@parsedir@%$parsedir%g | |
093e61a6 RS |
8221 | s%@all_boot_languages@%$all_boot_languages%g |
8222 | s%@all_compilers@%$all_compilers%g | |
8223 | s%@all_gtfiles@%$all_gtfiles%g | |
8224 | s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g | |
8225 | s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g | |
2ed26f6b | 8226 | s%@all_lang_makefrags@%$all_lang_makefrags%g |
093e61a6 RS |
8227 | s%@all_lang_makefiles@%$all_lang_makefiles%g |
8228 | s%@all_languages@%$all_languages%g | |
8229 | s%@all_stagestuff@%$all_stagestuff%g | |
8230 | s%@build_exeext@%$build_exeext%g | |
8231 | s%@build_install_headers_dir@%$build_install_headers_dir%g | |
8232 | s%@build_xm_file_list@%$build_xm_file_list%g | |
e22340b0 | 8233 | s%@build_xm_include_list@%$build_xm_include_list%g |
093e61a6 RS |
8234 | s%@build_xm_defines@%$build_xm_defines%g |
8235 | s%@check_languages@%$check_languages%g | |
8236 | s%@cc_set_by_configure@%$cc_set_by_configure%g | |
8237 | s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g | |
8238 | s%@cpp_install_dir@%$cpp_install_dir%g | |
2ed26f6b ZW |
8239 | s%@xmake_file@%$xmake_file%g |
8240 | s%@tmake_file@%$tmake_file%g | |
093e61a6 RS |
8241 | s%@extra_headers_list@%$extra_headers_list%g |
8242 | s%@extra_objs@%$extra_objs%g | |
8243 | s%@extra_parts@%$extra_parts%g | |
8244 | s%@extra_passes@%$extra_passes%g | |
8245 | s%@extra_programs@%$extra_programs%g | |
8246 | s%@float_h_file@%$float_h_file%g | |
8247 | s%@gcc_config_arguments@%$gcc_config_arguments%g | |
8248 | s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g | |
8249 | s%@libstdcxx_incdir@%$libstdcxx_incdir%g | |
8250 | s%@gcc_version@%$gcc_version%g | |
8251 | s%@gcc_version_full@%$gcc_version_full%g | |
8252 | s%@gcc_version_trigger@%$gcc_version_trigger%g | |
8253 | s%@host_exeext@%$host_exeext%g | |
8254 | s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g | |
8255 | s%@host_xm_file_list@%$host_xm_file_list%g | |
e22340b0 | 8256 | s%@host_xm_include_list@%$host_xm_include_list%g |
093e61a6 RS |
8257 | s%@host_xm_defines@%$host_xm_defines%g |
8258 | s%@out_host_hook_obj@%$out_host_hook_obj%g | |
8259 | s%@install@%$install%g | |
d7b42618 | 8260 | s%@lang_opt_files@%$lang_opt_files%g |
093e61a6 RS |
8261 | s%@lang_specs_files@%$lang_specs_files%g |
8262 | s%@lang_tree_files@%$lang_tree_files%g | |
8263 | s%@local_prefix@%$local_prefix%g | |
8264 | s%@md_file@%$md_file%g | |
8265 | s%@objc_boehm_gc@%$objc_boehm_gc%g | |
8266 | s%@out_file@%$out_file%g | |
8267 | s%@out_object_file@%$out_object_file%g | |
8268 | s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g | |
8269 | s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g | |
8270 | s%@symbolic_link@%$symbolic_link%g | |
8271 | s%@thread_file@%$thread_file%g | |
8272 | s%@tm_file_list@%$tm_file_list%g | |
e22340b0 | 8273 | s%@tm_include_list@%$tm_include_list%g |
093e61a6 RS |
8274 | s%@tm_defines@%$tm_defines%g |
8275 | s%@tm_p_file_list@%$tm_p_file_list%g | |
e22340b0 ZW |
8276 | s%@tm_p_include_list@%$tm_p_include_list%g |
8277 | s%@xm_file_list@%$xm_file_list%g | |
8278 | s%@xm_include_list@%$xm_include_list%g | |
093e61a6 | 8279 | s%@xm_defines@%$xm_defines%g |
caa55b1e | 8280 | s%@target_noncanonical@%$target_noncanonical%g |
093e61a6 RS |
8281 | s%@c_target_objs@%$c_target_objs%g |
8282 | s%@cxx_target_objs@%$cxx_target_objs%g | |
8283 | s%@target_cpu_default@%$target_cpu_default%g | |
861bb6c1 | 8284 | /@language_hooks@/r $language_hooks |
093e61a6 RS |
8285 | s%@language_hooks@%%g |
8286 | ||
861bb6c1 | 8287 | CEOF |
093e61a6 | 8288 | EOF |
861bb6c1 | 8289 | |
093e61a6 RS |
8290 | cat >> $CONFIG_STATUS <<\EOF |
8291 | ||
8292 | # Split the substitutions into bite-sized pieces for seds with | |
8293 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
8294 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
8295 | ac_file=1 # Number of current file. | |
8296 | ac_beg=1 # First line for current file. | |
8297 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
8298 | ac_more_lines=: | |
8299 | ac_sed_cmds="" | |
8300 | while $ac_more_lines; do | |
8301 | if test $ac_beg -gt 1; then | |
8302 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
8303 | else | |
8304 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
8305 | fi | |
8306 | if test ! -s conftest.s$ac_file; then | |
8307 | ac_more_lines=false | |
8308 | rm -f conftest.s$ac_file | |
8309 | else | |
8310 | if test -z "$ac_sed_cmds"; then | |
8311 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
861bb6c1 | 8312 | else |
093e61a6 | 8313 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
861bb6c1 | 8314 | fi |
093e61a6 RS |
8315 | ac_file=`expr $ac_file + 1` |
8316 | ac_beg=$ac_end | |
8317 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
861bb6c1 | 8318 | fi |
093e61a6 RS |
8319 | done |
8320 | if test -z "$ac_sed_cmds"; then | |
8321 | ac_sed_cmds=cat | |
8322 | fi | |
8323 | EOF | |
861bb6c1 | 8324 | |
093e61a6 RS |
8325 | cat >> $CONFIG_STATUS <<EOF |
8326 | ||
8327 | CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"} | |
8328 | EOF | |
8329 | cat >> $CONFIG_STATUS <<\EOF | |
8330 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
861bb6c1 | 8331 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
093e61a6 RS |
8332 | case "$ac_file" in |
8333 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8334 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8335 | *) ac_file_in="${ac_file}.in" ;; | |
861bb6c1 JL |
8336 | esac |
8337 | ||
093e61a6 | 8338 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
cafe096b | 8339 | |
093e61a6 RS |
8340 | # Remove last slash and all that follows it. Not all systems have dirname. |
8341 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8342 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8343 | # The file is in a subdirectory. | |
8344 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8345 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
8346 | # A "../" for each directory in $ac_dir_suffix. | |
8347 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
8348 | else | |
8349 | ac_dir_suffix= ac_dots= | |
8350 | fi | |
cafe096b | 8351 | |
093e61a6 RS |
8352 | case "$ac_given_srcdir" in |
8353 | .) srcdir=. | |
8354 | if test -z "$ac_dots"; then top_srcdir=. | |
8355 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
8356 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
861bb6c1 | 8357 | *) # Relative path. |
093e61a6 RS |
8358 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
8359 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
8360 | esac | |
861bb6c1 | 8361 | |
cafe096b | 8362 | |
093e61a6 RS |
8363 | echo creating "$ac_file" |
8364 | rm -f "$ac_file" | |
8365 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
8366 | case "$ac_file" in | |
8367 | *Makefile*) ac_comsub="1i\\ | |
8368 | # $configure_input" ;; | |
8369 | *) ac_comsub= ;; | |
8370 | esac | |
cafe096b | 8371 | |
093e61a6 RS |
8372 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
8373 | sed -e "$ac_comsub | |
8374 | s%@configure_input@%$configure_input%g | |
8375 | s%@srcdir@%$srcdir%g | |
8376 | s%@top_srcdir@%$top_srcdir%g | |
8377 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
8378 | fi; done | |
8379 | rm -f conftest.s* | |
861bb6c1 JL |
8380 | |
8381 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
8382 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
8383 | # | |
8384 | # ac_d sets the value in "#define NAME VALUE" lines. | |
093e61a6 RS |
8385 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
8386 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
8387 | ac_dC='\3' | |
8388 | ac_dD='%g' | |
8389 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
8390 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8391 | ac_uB='\([ ]\)%\1#\2define\3' | |
861bb6c1 | 8392 | ac_uC=' ' |
093e61a6 RS |
8393 | ac_uD='\4%g' |
8394 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
8395 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8396 | ac_eB='$%\1#\2define\3' | |
8397 | ac_eC=' ' | |
8398 | ac_eD='%g' | |
8399 | ||
8400 | if test "${CONFIG_HEADERS+set}" != set; then | |
8401 | EOF | |
8402 | cat >> $CONFIG_STATUS <<EOF | |
8403 | CONFIG_HEADERS="auto-host.h:config.in" | |
8404 | EOF | |
8405 | cat >> $CONFIG_STATUS <<\EOF | |
8406 | fi | |
8407 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
861bb6c1 | 8408 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
093e61a6 RS |
8409 | case "$ac_file" in |
8410 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8411 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8412 | *) ac_file_in="${ac_file}.in" ;; | |
861bb6c1 JL |
8413 | esac |
8414 | ||
093e61a6 RS |
8415 | echo creating $ac_file |
8416 | ||
8417 | rm -f conftest.frag conftest.in conftest.out | |
8418 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8419 | cat $ac_file_inputs > conftest.in | |
8420 | ||
8421 | EOF | |
8422 | ||
8423 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
8424 | # the proper values into config.h.in to produce config.h. And first: | |
8425 | # Protect against being on the right side of a sed subst in config.status. | |
8426 | # Protect against being in an unquoted here document in config.status. | |
8427 | rm -f conftest.vals | |
8428 | cat > conftest.hdr <<\EOF | |
8429 | s/[\\&%]/\\&/g | |
8430 | s%[\\$`]%\\&%g | |
8431 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
8432 | s%ac_d%ac_u%gp | |
8433 | s%ac_u%ac_e%gp | |
8434 | EOF | |
8435 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
8436 | rm -f conftest.hdr | |
861bb6c1 JL |
8437 | |
8438 | # This sed command replaces #undef with comments. This is necessary, for | |
8439 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
8440 | # on some systems where configure will not decide to define it. | |
093e61a6 RS |
8441 | cat >> conftest.vals <<\EOF |
8442 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
8443 | EOF | |
8444 | ||
8445 | # Break up conftest.vals because some shells have a limit on | |
8446 | # the size of here documents, and old seds have small limits too. | |
861bb6c1 JL |
8447 | |
8448 | rm -f conftest.tail | |
093e61a6 | 8449 | while : |
861bb6c1 | 8450 | do |
093e61a6 RS |
8451 | ac_lines=`grep -c . conftest.vals` |
8452 | # grep -c gives empty output for an empty file on some AIX systems. | |
8453 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
8454 | # Write a limited-size here document to conftest.frag. | |
8455 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
8456 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
861bb6c1 | 8457 | echo 'CEOF |
093e61a6 RS |
8458 | sed -f conftest.frag conftest.in > conftest.out |
8459 | rm -f conftest.in | |
8460 | mv conftest.out conftest.in | |
8461 | ' >> $CONFIG_STATUS | |
8462 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
8463 | rm -f conftest.vals | |
8464 | mv conftest.tail conftest.vals | |
861bb6c1 | 8465 | done |
093e61a6 RS |
8466 | rm -f conftest.vals |
8467 | ||
8468 | cat >> $CONFIG_STATUS <<\EOF | |
8469 | rm -f conftest.frag conftest.h | |
8470 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
8471 | cat conftest.in >> conftest.h | |
8472 | rm -f conftest.in | |
8473 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
8474 | echo "$ac_file is unchanged" | |
8475 | rm -f conftest.h | |
cafe096b | 8476 | else |
093e61a6 RS |
8477 | # Remove last slash and all that follows it. Not all systems have dirname. |
8478 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8479 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8480 | # The file is in a subdirectory. | |
8481 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
cafe096b | 8482 | fi |
093e61a6 RS |
8483 | rm -f $ac_file |
8484 | mv conftest.h $ac_file | |
cafe096b | 8485 | fi |
093e61a6 | 8486 | fi; done |
861bb6c1 | 8487 | |
093e61a6 RS |
8488 | EOF |
8489 | cat >> $CONFIG_STATUS <<EOF | |
093e61a6 RS |
8490 | subdirs='$subdirs' |
8491 | symbolic_link='$symbolic_link' | |
8492 | ||
8493 | EOF | |
8494 | cat >> $CONFIG_STATUS <<\EOF | |
093e61a6 | 8495 | |
861bb6c1 | 8496 | case x$CONFIG_HEADERS in |
b7cb92ad | 8497 | xauto-host.h:config.in) |
861bb6c1 JL |
8498 | echo > cstamp-h ;; |
8499 | esac | |
2ed26f6b | 8500 | # Make sure all the subdirs exist. |
c406e779 | 8501 | for d in $subdirs |
2ed26f6b | 8502 | do |
2ed26f6b | 8503 | test -d $d || mkdir $d |
2ed26f6b | 8504 | done |
93cf819d BK |
8505 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
8506 | # bootstrapping and the installation procedure can still use | |
8507 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
8508 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
8509 | # This is virtually a duplicate of what happens in configure.lang; we do | |
8510 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 8511 | if test "$symbolic_link" = "ln -s"; then |
c406e779 | 8512 | for d in ${subdirs} fixinc ; do |
1e6347d8 | 8513 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 8514 | cd $d |
6a1b7268 | 8515 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
8516 | do |
8517 | rm -f $t | |
8518 | $symbolic_link ../$t $t 2>/dev/null | |
8519 | done | |
8520 | cd $STARTDIR | |
93cf819d BK |
8521 | done |
8522 | else true ; fi | |
cafe096b | 8523 | |
093e61a6 RS |
8524 | exit 0 |
8525 | EOF | |
861bb6c1 | 8526 | chmod +x $CONFIG_STATUS |
093e61a6 RS |
8527 | rm -fr confdefs* $ac_clean_files |
8528 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
861bb6c1 | 8529 |